diff options
author | Michael Larson <slioch@slioch.vyatta.com> | 2010-06-03 18:14:04 -0700 |
---|---|---|
committer | Michael Larson <slioch@slioch.vyatta.com> | 2010-06-03 18:14:04 -0700 |
commit | 0494d74dc72f2c40430b8a426fd55a71a4f02bd7 (patch) | |
tree | 776b8d0629b1bff69082a1f9ba0bd7ebdc494070 /lib/Vyatta/ConfigOutput.pm | |
parent | 8a857b663dffa584dd53b6c8aeac0652ae61825b (diff) | |
download | vyatta-cfg-0494d74dc72f2c40430b8a426fd55a71a4f02bd7.tar.gz vyatta-cfg-0494d74dc72f2c40430b8a426fd55a71a4f02bd7.zip |
implemented modified notation for pre-commit activate/deactivate. added check on modified nodes prior to
load. modified active directory check.
Diffstat (limited to 'lib/Vyatta/ConfigOutput.pm')
-rwxr-xr-x | lib/Vyatta/ConfigOutput.pm | 62 |
1 files changed, 57 insertions, 5 deletions
diff --git a/lib/Vyatta/ConfigOutput.pm b/lib/Vyatta/ConfigOutput.pm index 0cfb42b..81ee92d 100755 --- a/lib/Vyatta/ConfigOutput.pm +++ b/lib/Vyatta/ConfigOutput.pm @@ -85,7 +85,7 @@ sub displayValues { if ($is_multi) { my @ovals = $config->returnOrigValues('','true'); - my @nvals = $config->returnValues(''); + my @nvals = $config->returnValues('','true'); if ($is_text) { @ovals = map { (txt_need_quotes($_)) ? "\"$_\"" : "$_"; } @ovals; @nvals = map { (txt_need_quotes($_)) ? "\"$_\"" : "$_"; } @nvals; @@ -209,7 +209,25 @@ sub displayDeletedOrigChildren { my ($state, $n) = $config->getDeactivated($path); if (defined $state) { - $dis = '! '; + if ($state eq 'active') { + if (defined($dont_show_as_deleted)) { + $dis = '! '; + } + else { + $dis = 'A '; + } + } + elsif ($state eq 'local') { + if (defined($dont_show_as_deleted)) { + $dis = ' '; + } + else { + $dis = 'D '; + } + } + else { + $dis = '! '; + } } else { $dis = ''; @@ -244,7 +262,25 @@ sub displayDeletedOrigChildren { #need separate check here my ($state, $n) = $config->getDeactivated($path); if (defined $state) { - $dis = '! '; + if ($state eq 'active') { + if (defined($dont_show_as_deleted)) { + $dis = '! '; + } + else { + $dis = 'A '; + } + } + elsif ($state eq 'local') { + if (defined($dont_show_as_deleted)) { + $dis = ' '; + } + else { + $dis = 'D '; + } + } + else { + $dis = '! '; + } } else { $dis = ''; @@ -308,7 +344,15 @@ sub displayChildren { my ($state, $n) = $config->getDeactivated($path); if (defined $state) { - $dis = '! '; + if ($state eq 'active') { + $dis = 'A '; + } + elsif ($state eq 'local') { + $dis = 'D '; + } + else { + $dis = '! '; + } } else { $dis = ''; @@ -350,7 +394,15 @@ sub displayChildren { my ($state, $n) = $config->getDeactivated($path); if (defined $state) { - $dis = '! '; + if ($state eq 'active') { + $dis = 'A '; + } + elsif ($state eq 'local') { + $dis = 'D '; + } + else { + $dis = '! '; + } } else { $dis = ''; |