aboutsummaryrefslogtreecommitdiffstats
path: root/lib/AdminPanel/Module
diff options
context:
space:
mode:
authorMatteo Pasotti <matteo.pasotti@gmail.com>2014-11-25 19:56:17 +0100
committerMatteo Pasotti <matteo.pasotti@gmail.com>2014-11-25 19:56:17 +0100
commit7a19999048695a16c544fae1ea38c7aa86a6d83f (patch)
treee6df3185ddad6ac26c34391cbe4068cb5888081e /lib/AdminPanel/Module
parent30a40a655cdc3381be8f2a1255ab7fcf91febac2 (diff)
downloadmanatools-7a19999048695a16c544fae1ea38c7aa86a6d83f.tar
manatools-7a19999048695a16c544fae1ea38c7aa86a6d83f.tar.gz
manatools-7a19999048695a16c544fae1ea38c7aa86a6d83f.tar.bz2
manatools-7a19999048695a16c544fae1ea38c7aa86a6d83f.tar.xz
manatools-7a19999048695a16c544fae1ea38c7aa86a6d83f.zip
user is now allowed to change PrettyHostname, StaticHostname, Chassis and IconName
Diffstat (limited to 'lib/AdminPanel/Module')
-rw-r--r--lib/AdminPanel/Module/Hosts.pm42
1 files changed, 34 insertions, 8 deletions
diff --git a/lib/AdminPanel/Module/Hosts.pm b/lib/AdminPanel/Module/Hosts.pm
index c820540b..9f841184 100644
--- a/lib/AdminPanel/Module/Hosts.pm
+++ b/lib/AdminPanel/Module/Hosts.pm
@@ -137,10 +137,6 @@ sub _changeHostNameDialog {
my $headerString = shift();
- my $hostIpString = "";
- my $hostNameString = "";
- my $hostAliasesString = "";
-
my $factory = yui::YUI::widgetFactory;
my $dlg = $factory->createPopupDialog();
my $layout = $factory->createVBox($dlg);
@@ -155,16 +151,41 @@ sub _changeHostNameDialog {
# content
my $firstHbox = $factory->createHBox($vbox_content);
my $secondHbox = $factory->createHBox($vbox_content);
+ my $thirdHbox = $factory->createHBox($vbox_content);
+ my $fourthHbox = $factory->createHBox($vbox_content);
+ my $fifthHbox = $factory->createHBox($vbox_content);
+ my $sixthHbox = $factory->createHBox($vbox_content);
my $labelHostName = $factory->createLabel($secondHbox,$self->loc->N("Hostname"));
$labelHostName->setWeight($yui::YD_HORIZ, 10);
-
my $textHostName = $factory->createInputField($secondHbox,"");
$textHostName->setWeight($yui::YD_HORIZ, 30);
-
- $hostNameString = $self->cfgHosts->_getLocalHostName();
- $textHostName->setValue($hostNameString);
+ my $labelPrettyHostName = $factory->createLabel($thirdHbox,$self->loc->N("Pretty Hostname"));
+ $labelPrettyHostName->setWeight($yui::YD_HORIZ, 10);
+ my $textPrettyHostName = $factory->createInputField($thirdHbox,"");
+ $textPrettyHostName->setWeight($yui::YD_HORIZ, 30);
+
+ my $labelStaticHostName = $factory->createLabel($fourthHbox,$self->loc->N("Static Hostname"));
+ $labelStaticHostName->setWeight($yui::YD_HORIZ, 10);
+ my $textStaticHostName = $factory->createInputField($fourthHbox,"");
+ $textStaticHostName->setWeight($yui::YD_HORIZ, 30);
+
+ my $labelChassis = $factory->createLabel($fifthHbox,$self->loc->N("Chassis"));
+ $labelChassis->setWeight($yui::YD_HORIZ, 10);
+ my $textChassis = $factory->createInputField($fifthHbox,"");
+ $textChassis->setWeight($yui::YD_HORIZ, 30);
+
+ my $labelIconName = $factory->createLabel($sixthHbox,$self->loc->N("Icon Name"));
+ $labelIconName->setWeight($yui::YD_HORIZ, 10);
+ my $textIconName = $factory->createInputField($sixthHbox,"");
+ $textIconName->setWeight($yui::YD_HORIZ, 30);
+
+ $textHostName->setValue($self->cfgHosts->_getLocalHostName());
+ $textPrettyHostName->setValue($self->cfgHosts->_getLocalPrettyHostName());
+ $textStaticHostName->setValue($self->cfgHosts->_getLocalStaticHostName());
+ $textChassis->setValue($self->cfgHosts->_getLocalChassis());
+ $textIconName->setValue($self->cfgHosts->_getLocalIconName());
# footer
my $cancelButton = $factory->createPushButton($factory->createLeft($hbox_footer),$self->loc->N("Cancel"));
@@ -186,6 +207,10 @@ sub _changeHostNameDialog {
}
elsif($widget == $okButton) {
$self->cfgHosts->_setLocalHostName($textHostName->value());
+ $self->cfgHosts->_setLocalPrettyHostName($textPrettyHostName->value());
+ $self->cfgHosts->_setLocalStaticHostName($textStaticHostName->value());
+ $self->cfgHosts->_setLocalChassis($textChassis->value());
+ $self->cfgHosts->_setLocalIconName($textIconName->value());
last;
}
}
@@ -477,6 +502,7 @@ sub _manageHostsDialog {
}
}elsif ($widget == $hnButton) {
$self->_changeHostNameDialog("Change the HostName FQDN");
+ $self->setupTable();
}elsif ($widget == $aboutButton) {
$self->sh_gui->AboutDialog({
name => $appTitle,