Commit Graph

13 Commits

Author SHA1 Message Date
Thomas Haller
918be83493 cli: rework printing of "wired" and "wifi" device details 2018-07-09 15:43:55 +02:00
Thomas Haller
d6949a2924 cli: rework printing of "capabilities" device details 2018-07-09 15:43:55 +02:00
Thomas Haller
2fc475ccdf cli: rework printing of "connections" device details 2018-07-09 15:43:55 +02:00
Thomas Haller
fede017001 cli: rework printing of "general" device details 2018-07-09 15:43:55 +02:00
Thomas Haller
283b1d18b7 cli: rework printing of device status 2018-07-09 15:43:55 +02:00
Lubomir Rintel
31aa2cfe29 cli: use a palette to implement coloring
This basically replaces the (NMMetaTermColor, NMMetaTermFormat) combo
with NMMetaColor that describes the colored element semantically as
opposed to storing the raw attributes.

A (currently static) paletted is used to translate the semantic color
code to the actual ANSI controle sequence. This matches what
terminal-colors.d(5) schemes use, making it convenient to implement
customizable palettes.
2018-05-10 14:36:58 +02:00
Thomas Haller
ca0e749c40 cli: move and rename TermColor and TermFormat 2017-04-05 16:53:06 +02:00
Thomas Haller
bfb9fd0d2f cli: split tracking of meta data out of NmcOutputField
When generating output data, nmcli iterates over a list of
property-descriptors (nmc_fields_ip4_config), creates an intermediate
array (output_data) and finally prints it.

However, previously both the meta data (nmc_fields_ip4_config) and
the intermediate format use the same type NmcOutputField. This means,
certain fields are relevant to describe a property, and other fields
are output/formatting fields.

Split this up. Now, the meta data is tracked in form of an NMMetaAbstractInfo
lists. This separates the information about properties from intermediate steps
during creation of the output.

Note that currently functions like print_ip4_config() still have all the
knowledge about how to generate the output. That is wrong, instead, the
meta data (NMMetaAbstractInfo) should describe how to create the output
and then all those functions could be replaced. This means, later we want
to add more knowledge to the NMMetaAbstractInfo, so it is important to
keep them separate from NmcOutputField.
2017-04-05 16:53:06 +02:00
Lubomir Rintel
8cc6ce7e44 cli: add -f argument completion 2016-08-01 15:51:29 +02:00
Lubomir Rintel
3068886043 cli/device: export some useful completion functions
Wi-Fi access point completion functionality and stuff useful for completing
"ifname" and "ap" for "nmcli c up".
2016-08-01 13:52:36 +02:00
Lubomir Rintel
402828d2ed cli/devices: export device_state_to_color()
Also, get rid of the ColorInfo structure. It was not too nice anyway.
2016-07-19 14:29:05 +02:00
Lubomir Rintel
d03f347b9d cli: add nmcli monitor
https://bugzilla.redhat.com/show_bug.cgi?id=1034158
2015-12-05 12:16:23 +01:00
Dan Winship
3d25d70461 clients: reorganize source tree, put all the installed clients together
Create a new clients/ subdirectory at the top level, and move cli/ and
tui/ into it, as well as nm-online.c (which was previously in test/,
which made no sense).

cli/ was split into two subdirectories, src/ and completion/. While
this does simplify things (given that the completion file and the
binary both need to be named "nmcli"), it bloats the source tree, and
we can work around it by just renaming the completion file at install
time. Then we can combine the two directories into one and just have
it all under clients/cli/.
2014-07-30 15:56:19 -04:00