aboutsummaryrefslogtreecommitdiffstats
path: root/lib/AdminPanel/Module
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2015-03-16 18:16:50 +0100
committerAngelo Naselli <anaselli@linux.it>2015-03-16 18:16:50 +0100
commitfc9772f1f03684e8dab50ff77d2c46c5e0309c7b (patch)
tree375b76cf80e5d816eb48a4badf3bb949199ef220 /lib/AdminPanel/Module
parent825922057a21a9b09c60edf4b44535d7fd49926d (diff)
downloadcolin-keep-fc9772f1f03684e8dab50ff77d2c46c5e0309c7b.tar
colin-keep-fc9772f1f03684e8dab50ff77d2c46c5e0309c7b.tar.gz
colin-keep-fc9772f1f03684e8dab50ff77d2c46c5e0309c7b.tar.bz2
colin-keep-fc9772f1f03684e8dab50ff77d2c46c5e0309c7b.tar.xz
colin-keep-fc9772f1f03684e8dab50ff77d2c46c5e0309c7b.zip
Moved to namespace to ManaTools
Diffstat (limited to 'lib/AdminPanel/Module')
-rw-r--r--lib/AdminPanel/Module/AdminMouse.pm100
-rw-r--r--lib/AdminPanel/Module/Clock.pm22
-rw-r--r--lib/AdminPanel/Module/DisplayManager.pm18
-rw-r--r--lib/AdminPanel/Module/Firewall.pm48
-rw-r--r--lib/AdminPanel/Module/Hosts.pm20
-rw-r--r--lib/AdminPanel/Module/LogViewer.pm26
-rw-r--r--lib/AdminPanel/Module/Proxy.pm16
-rw-r--r--lib/AdminPanel/Module/Services.pm24
-rw-r--r--lib/AdminPanel/Module/Users.pm34
9 files changed, 154 insertions, 154 deletions
diff --git a/lib/AdminPanel/Module/AdminMouse.pm b/lib/AdminPanel/Module/AdminMouse.pm
index 071a8f3..279fb76 100644
--- a/lib/AdminPanel/Module/AdminMouse.pm
+++ b/lib/AdminPanel/Module/AdminMouse.pm
@@ -1,27 +1,27 @@
# vim: set et ts=4 sw=4:
#*****************************************************************************
-#
+#
# Copyright (c) 2013 - 2015 Angelo Naselli <anaselli@linux.it>
# from drakx services
-#
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2, as
# published by the Free Software Foundation.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
+#
#*****************************************************************************
# NOTE this module has not been ported and does not work
# TODO porting it if it is really needed nowadays
-package AdminPanel::Module::AdminMouse;
+package ManaTools::Module::AdminMouse;
#leaving them atm
use lib qw(/usr/lib/libDrakX);
@@ -34,19 +34,19 @@ use modules;
use mouse;
use c;
-use AdminPanel::Shared;
+use ManaTools::Shared;
use yui;
use Moose;
-extends qw( AdminPanel::Module );
+extends qw( ManaTools::Module );
has '+icon' => (
default => "/usr/share/mcc/themes/default/mousedrake-mdk.png",
);
has '+name' => (
- default => N("AdminMouse"),
+ default => N("AdminMouse"),
);
sub start {
@@ -57,7 +57,7 @@ sub start {
sub _getUntranslatedName {
my ($self, $name, $list) = @_;
-
+
foreach my $n (@{$list}) {
my @names = split(/\|/, $n);
for (my $lev=0; $lev < scalar(@names); $lev++) {
@@ -73,23 +73,23 @@ sub _getUntranslatedName {
sub _adminMouseDialog {
my $self = shift;
-
+
my $datavalue = "TEST";
-
+
my $appTitle = yui::YUI::app()->applicationTitle();
-
+
## set new title to get it in dialog
yui::YUI::app()->setApplicationTitle($self->name);
## set icon if not already set by external launcher
yui::YUI::app()->setApplicationIcon($self->icon);
my $factory = yui::YUI::widgetFactory;
-
+
my $dialog = $factory->createMainDialog;
my $vbox = $factory->createVBox( $dialog );
my $frame = $factory->createFrame ($vbox, N("Please choose your type of mouse."));
my $treeWidget = $factory->createTree($frame, "");
-
+
my $modules_conf = modules::any_conf->read;
my $mouse = mouse::read();
@@ -98,17 +98,17 @@ sub _adminMouseDialog {
my $probed_mouse = mouse::detect($modules_conf);
$mouse = $probed_mouse if !$mouse->{Protocol} || !$probed_mouse->{unsafe};
}
-
+
if (!$mouse || !$::auto) {
$mouse ||= mouse::fullname2mouse('Universal|Any PS/2 & USB mice');
-
+
my $prev = my $fullname = $mouse->{type} . '|' . $mouse->{name};
my $selected = $mouse->{name};
-
- my $fullList = { list => [ mouse::_fullnames() ], items => [], separator => '|', val => \$fullname,
+
+ my $fullList = { list => [ mouse::_fullnames() ], items => [], separator => '|', val => \$fullname,
format => sub { join('|', map { translate($_) } split('\|', $_[0])) } } ;
- my $i;
-
+ my $i;
+
my $itemColl = new yui::YItemCollection;
my @items;
for ($i=0; $i<scalar(@{$fullList->{list}}); $i++) {
@@ -118,37 +118,37 @@ sub _adminMouseDialog {
}
if ($i == 0 || $names[0] ne $items[0]->{label}) {
if ($i != 0) {
- $itemColl->push($items[0]->{item});
+ $itemColl->push($items[0]->{item});
push @{$fullList->{items}}, $items[-1]->{item};;
}
- @items = undef;
+ @items = undef;
my $item = new yui::YTreeItem ($names[0]);
-
+
if ($selected eq $self->_getUntranslatedName($item->label(), $fullList->{list})) {
$item->setSelected(1) ;
$item->setOpen(1);
- my $parent = $item;
+ my $parent = $item;
while($parent = $parent->parent()) {
- $parent->setOpen(1);
+ $parent->setOpen(1);
}
}
$item->DISOWN();
@items = ({item => $item, label => $names[0], level => 0});
for (my $lev=1; $lev < scalar(@names); $lev++) {
$item = new yui::YTreeItem ($items[$lev-1]->{item}, $names[$lev]);
-
+
if ($selected eq $self->_getUntranslatedName($item->label(), $fullList->{list})) {
$item->setSelected(1) ;
$item->setOpen(1);
- my $parent = $item;
+ my $parent = $item;
while($parent = $parent->parent()) {
- $parent->setOpen(1);
+ $parent->setOpen(1);
}
}
$item->DISOWN();
if ($lev < scalar(@names)-1) {
push @items, {item => $item, label => $names[$lev], level => $lev};
- }
+ }
}
}
else {
@@ -159,7 +159,7 @@ sub _adminMouseDialog {
if ($items[$it]->{label} eq $names[$lev] && $items[$it]->{level} == $lev) {
$prevItem = $it;
last;
- }
+ }
}
if ($it == scalar(@items)) {
my $item = new yui::YTreeItem ($items[$prevItem]->{item}, $names[$lev]);
@@ -167,13 +167,13 @@ sub _adminMouseDialog {
if ($selected eq $self->_getUntranslatedName($item->label(), $fullList->{list})) {
$item->setSelected(1) ;
$item->setOpen(1);
- my $parent = $item;
+ my $parent = $item;
while($parent = $parent->parent()) {
- $parent->setOpen(1);
+ $parent->setOpen(1);
}
}
$item->DISOWN();
- push @items, {item => $item, label => $names[$lev], level => $lev};
+ push @items, {item => $item, label => $names[$lev], level => $lev};
}
}
}
@@ -193,7 +193,7 @@ sub _adminMouseDialog {
while(1) {
my $event = $dialog->waitForEvent();
my $eventType = $event->eventType();
-
+
#event type checking
if ($eventType == $yui::YEvent::CancelEvent) {
last;
@@ -206,12 +206,12 @@ sub _adminMouseDialog {
last;
}
elsif ($widget == $aboutButton) {
- my $license = translate($AdminPanel::Shared::License);
- AdminPanel::Shared::AboutDialog(
+ my $license = translate($ManaTools::Shared::License);
+ ManaTools::Shared::AboutDialog(
{ name => N("AdminMouse"),
- version => $self->VERSION,
+ version => $self->VERSION,
copyright => N("Copyright (C) %s Mageia community", '2014'),
- license => $license,
+ license => $license,
comments => N("AdminMouse is the Mageia mouse management tool \n(from the original idea of Mandriva mousedrake)."),
website => 'http://www.mageia.org',
website_label => N("Mageia"),
@@ -224,13 +224,13 @@ sub _adminMouseDialog {
elsif ($widget == $okButton) {
my $continue = 1;
my $selectedItem = $treeWidget->selectedItem();
-
+
my $it=$selectedItem;
my $fullname = $self->_getUntranslatedName($it->label(), $fullList->{list});
while($it = yui::toYTreeItem($it)->parent()) {
$fullname = join("|", $self->_getUntranslatedName($it->label(), $fullList->{list}), $fullname);
}
-
+
if ($fullname ne $prev) {
my $mouse_ = mouse::fullname2mouse($fullname, device => $mouse->{device});
if ($fullname =~ /evdev/) {
@@ -238,16 +238,16 @@ sub _adminMouseDialog {
}
%$mouse = %$mouse_;
}
-
+
if ($mouse->{nbuttons} < 3 ) {
- $mouse->{Emulate3Buttons} = AdminPanel::Shared::ask_YesOrNo('', N("Emulate third button?"));
+ $mouse->{Emulate3Buttons} = ManaTools::Shared::ask_YesOrNo('', N("Emulate third button?"));
}
if ($mouse->{type} eq 'serial') {
my @list = ();
foreach (detect_devices::serialPorts()) {
push @list, detect_devices::serialPort2text($_);
}
- my $choice = AdminPanel::Shared::ask_fromList(N("Mouse Port"),
+ my $choice = ManaTools::Shared::ask_fromList(N("Mouse Port"),
N("Please choose which serial port your mouse is connected to."),
\@list);
if ( !$choice ) {
@@ -257,24 +257,24 @@ sub _adminMouseDialog {
$mouse->{device} = $choice;
}
}
-
+
if ($continue) {
last;
}
}
}
}
-
+
}
# TODO manage write conf without interactive things
# mouse::write_conf($in->do_pkgs, $modules_conf, $mouse, 1);
system('systemctl', 'try-restart', 'gpm.service') if -e '/usr/lib/systemd/system/gpm.service';
-
- AdminPanel::Shared::infoMsgBox(N("Not implemented yet: configuration is not changed"));
-
+
+ ManaTools::Shared::infoMsgBox(N("Not implemented yet: configuration is not changed"));
+
$dialog->destroy();
-
+
#restore old application title
yui::YUI::app()->setApplicationTitle($appTitle);
}
diff --git a/lib/AdminPanel/Module/Clock.pm b/lib/AdminPanel/Module/Clock.pm
index 22fa059..f2bb5c0 100644
--- a/lib/AdminPanel/Module/Clock.pm
+++ b/lib/AdminPanel/Module/Clock.pm
@@ -1,14 +1,14 @@
# vim: set et ts=4 sw=4:
-package AdminPanel::Module::Clock;
+package ManaTools::Module::Clock;
#============================================================= -*-perl-*-
=head1 NAME
-AdminPanel::Module::Clock - This module aims to configure system clock and time
+ManaTools::Module::Clock - This module aims to configure system clock and time
=head1 SYNOPSIS
- my $clockSettings = AdminPanel::Module::Clock->new();
+ my $clockSettings = ManaTools::Module::Clock->new();
$clockSettings->start();
=head1 DESCRIPTION
@@ -19,7 +19,7 @@ Long_description
You can find documentation for this module with the perldoc command:
-perldoc AdminPanel::Module::Clock
+perldoc ManaTools::Module::Clock
=head1 SEE ALSO
@@ -54,15 +54,15 @@ use Moose;
use diagnostics;
-use AdminPanel::Shared::GUI;
-use AdminPanel::Shared::Locales;
-use AdminPanel::Shared::TimeZone;
+use ManaTools::Shared::GUI;
+use ManaTools::Shared::Locales;
+use ManaTools::Shared::TimeZone;
use Time::Piece;
use yui;
-extends qw( AdminPanel::Module );
+extends qw( ManaTools::Module );
### TODO icon
has '+icon' => (
@@ -79,7 +79,7 @@ sub _localeInitialize {
my $self = shift;
# TODO fix domain binding for translation
- $self->loc(AdminPanel::Shared::Locales->new(domain_name => 'libDrakX-standalone') );
+ $self->loc(ManaTools::Shared::Locales->new(domain_name => 'libDrakX-standalone') );
# TODO if we want to give the opportunity to test locally add dir_name => 'path'
}
@@ -93,7 +93,7 @@ has 'sh_gui' => (
sub _SharedGUIInitialize {
my $self = shift;
- $self->sh_gui(AdminPanel::Shared::GUI->new() );
+ $self->sh_gui(ManaTools::Shared::GUI->new() );
}
has 'sh_tz' => (
@@ -105,7 +105,7 @@ has 'sh_tz' => (
sub _SharedTimeZoneInitialize {
my $self = shift;
- $self->sh_tz(AdminPanel::Shared::TimeZone->new() );
+ $self->sh_tz(ManaTools::Shared::TimeZone->new() );
}
diff --git a/lib/AdminPanel/Module/DisplayManager.pm b/lib/AdminPanel/Module/DisplayManager.pm
index 1f6c054..39aa617 100644
--- a/lib/AdminPanel/Module/DisplayManager.pm
+++ b/lib/AdminPanel/Module/DisplayManager.pm
@@ -18,7 +18,7 @@
#
#*****************************************************************************
-package AdminPanel::Module::DisplayManager;
+package ManaTools::Module::DisplayManager;
use Modern::Perl '2011';
use autodie;
@@ -28,9 +28,9 @@ use English;
use utf8;
use yui;
-use AdminPanel::Shared qw(trim apcat);
-use AdminPanel::Shared::GUI;
-# use AdminPanel::Shared::DisplayManager;
+use ManaTools::Shared qw(trim apcat);
+use ManaTools::Shared::GUI;
+# use ManaTools::Shared::DisplayManager;
# TODROP but provides network::network
use lib qw(/usr/lib/libDrakX);
@@ -38,7 +38,7 @@ use network::network;
use MDK::Common::System qw(getVarsFromSh addVarsInSh);
use MDK::Common::Func qw(find);
-extends qw( AdminPanel::Module );
+extends qw( ManaTools::Module );
has '+icon' => (
@@ -120,14 +120,14 @@ sub _localeInitialize {
my $self = shift();
# TODO fix domain binding for translation
- $self->loc(AdminPanel::Shared::Locales->new(domain_name => 'drakdm') );
+ $self->loc(ManaTools::Shared::Locales->new(domain_name => 'drakdm') );
# TODO if we want to give the opportunity to test locally add dir_name => 'path'
}
sub _SharedUGUIInitialize {
my $self = shift();
- $self->sh_gui( AdminPanel::Shared::GUI->new() );
+ $self->sh_gui( ManaTools::Shared::GUI->new() );
}
#=============================================================
@@ -189,7 +189,7 @@ sub ask_for_X_restart {
sub _manageProxyDialog {
my $self = shift;
- ## TODO fix for adminpanel
+ ## TODO fix for manatools
my $appTitle = yui::YUI::app()->applicationTitle();
my $appIcon = yui::YUI::app()->applicationIcon();
## set new title to get it in dialog
@@ -280,7 +280,7 @@ sub _manageProxyDialog {
}
);
}elsif ($widget == $okButton) {
- my $current_choice = AdminPanel::Shared::trim($rb_group->currentButton()->label());
+ my $current_choice = ManaTools::Shared::trim($rb_group->currentButton()->label());
$current_choice =~s/\&//g;
addVarsInSh($self->conffile, { DISPLAYMANAGER => lc($current_choice) } );
$self->ask_for_X_restart();
diff --git a/lib/AdminPanel/Module/Firewall.pm b/lib/AdminPanel/Module/Firewall.pm
index 8158dc2..2ac56a5 100644
--- a/lib/AdminPanel/Module/Firewall.pm
+++ b/lib/AdminPanel/Module/Firewall.pm
@@ -18,7 +18,7 @@
#
#*****************************************************************************
-package AdminPanel::Module::Firewall;
+package ManaTools::Module::Firewall;
use Modern::Perl '2011';
use autodie;
@@ -27,11 +27,11 @@ use Moose::Autobox;
use utf8;
use yui;
-use AdminPanel::Shared qw(trim);
-use AdminPanel::Shared::GUI;
-use AdminPanel::Shared::Firewall;
-use AdminPanel::Shared::Shorewall;
-use AdminPanel::Shared::Services;
+use ManaTools::Shared qw(trim);
+use ManaTools::Shared::GUI;
+use ManaTools::Shared::Firewall;
+use ManaTools::Shared::Shorewall;
+use ManaTools::Shared::Services;
use MDK::Common::Func qw(if_ partition);
use MDK::Common::System qw(getVarsFromSh);
@@ -42,7 +42,7 @@ use MDK::Common::File qw(substInFile output_with_perm);
use List::Util qw(any);
use List::MoreUtils qw(uniq);
-extends qw( AdminPanel::Module );
+extends qw( ManaTools::Module );
has '+icon' => (
default => "/usr/share/icons/manawall.png",
@@ -147,14 +147,14 @@ sub _localeInitialize {
my $self = shift();
# TODO fix domain binding for translation
- $self->loc(AdminPanel::Shared::Locales->new(domain_name => 'drakx-net') );
+ $self->loc(ManaTools::Shared::Locales->new(domain_name => 'drakx-net') );
# TODO if we want to give the opportunity to test locally add dir_name => 'path'
}
sub _SharedUGUIInitialize {
my $self = shift();
- $self->sh_gui(AdminPanel::Shared::GUI->new() );
+ $self->sh_gui(ManaTools::Shared::GUI->new() );
}
sub _initAllServers {
@@ -441,8 +441,8 @@ sub get_conf {
my $self = shift();
my ($disabled, $o_ports) = @_;
my $possible_servers = undef;
- my $conf = AdminPanel::Shared::Shorewall::read_();
- my $shorewall = (AdminPanel::Shared::Shorewall::get_config_file('zones', '') && $conf);
+ my $conf = ManaTools::Shared::Shorewall::read_();
+ my $shorewall = (ManaTools::Shared::Shorewall::get_config_file('zones', '') && $conf);
if ($o_ports) {
return ($disabled, $self->from_ports($o_ports));
@@ -477,7 +477,7 @@ sub set_ifw {
my ($enabled, $rules, $ports) = @_;
if ($enabled)
{
- my $ports_by_proto = AdminPanel::Shared::Shorewall::ports_by_proto($ports);
+ my $ports_by_proto = ManaTools::Shared::Shorewall::ports_by_proto($ports);
output_with_perm("$::prefix/etc/ifw/rules", 0644,
(map { ". /etc/ifw/rules.d/$_\n" } @$rules),
map {
@@ -493,8 +493,8 @@ sub set_ifw {
substInFile {
undef $_ if m!^INCLUDE /etc/ifw/rules|^iptables -I INPUT 2 -j Ifw!;
} "$::prefix/etc/shorewall/start";
- AdminPanel::Shared::Shorewall::set_in_file('start', $enabled, "INCLUDE /etc/ifw/start", "INCLUDE /etc/ifw/rules", "iptables -I INPUT 1 -j Ifw");
- AdminPanel::Shared::Shorewall::set_in_file('stop', $enabled, "iptables -D INPUT -j Ifw", "INCLUDE /etc/ifw/stop");
+ ManaTools::Shared::Shorewall::set_in_file('start', $enabled, "INCLUDE /etc/ifw/start", "INCLUDE /etc/ifw/rules", "iptables -I INPUT 1 -j Ifw");
+ ManaTools::Shared::Shorewall::set_in_file('stop', $enabled, "iptables -D INPUT -j Ifw", "INCLUDE /etc/ifw/stop");
}
#=============================================================
@@ -972,7 +972,7 @@ Have a look at /etc/services for information.");
$self->unlisted([]);
}
my $invalid_ports = check_ports_syntax($txtPortsList->value());
- if(AdminPanel::Shared::trim($invalid_ports) eq '')
+ if(ManaTools::Shared::trim($invalid_ports) eq '')
{
if($txtPortsList->value() =~m/\s+/g)
{
@@ -984,9 +984,9 @@ Have a look at /etc/services for information.");
}
else
{
- if(AdminPanel::Shared::trim($txtPortsList->value()) ne '')
+ if(ManaTools::Shared::trim($txtPortsList->value()) ne '')
{
- push(@{$self->unlisted()}, AdminPanel::Shared::trim($txtPortsList->value()));
+ push(@{$self->unlisted()}, ManaTools::Shared::trim($txtPortsList->value()));
}
}
$retval = 1;
@@ -1021,12 +1021,12 @@ sub get_zones {
my $confref = shift();
my $disabled = shift();
my $conf = ${$confref};
- my $interfacesfile = AdminPanel::Shared::Shorewall::get_config_file('interfaces', $conf->{version} || '');
+ my $interfacesfile = ManaTools::Shared::Shorewall::get_config_file('interfaces', $conf->{version} || '');
network::network::read_net_conf($self->net());
#- find all interfaces but alias interfaces
my @all_intf = grep { !/:/ } uniq(keys(%{$self->net()->{ifcfg}}), detect_devices::get_net_interfaces());
my %net_zone = map { $_ => undef } @all_intf;
- $net_zone{$_} = 1 foreach AdminPanel::Shared::Shorewall::get_net_zone_interfaces($interfacesfile, $self->net(), \@all_intf);
+ $net_zone{$_} = 1 foreach ManaTools::Shared::Shorewall::get_net_zone_interfaces($interfacesfile, $self->net(), \@all_intf);
# if firewall/shorewall is not disabled (i.e. everything has been allowed)
# then ask for network interfaces to protect
@@ -1099,13 +1099,13 @@ sub set_ports {
if (!$disabled || -x "$::prefix/sbin/shorewall") {
# $do_pkgs->ensure_files_are_installed([ [ qw(shorewall shorewall) ], [ qw(shorewall-ipv6 shorewall6) ] ], $::isInstall) or return;
- my $conf = AdminPanel::Shared::Shorewall::read_();
+ my $conf = ManaTools::Shared::Shorewall::read_();
if(!$self->get_zones(\$conf,$disabled))
{
# Cancel button has been pressed, aborting
return 0;
}
- my $shorewall = (AdminPanel::Shared::Shorewall::get_config_file('zones', '') && $conf);
+ my $shorewall = (ManaTools::Shared::Shorewall::get_config_file('zones', '') && $conf);
if (!$shorewall) {
print ("unable to read shorewall configuration, skipping installation");
return 0;
@@ -1118,7 +1118,7 @@ sub set_ports {
print ($disabled ? "disabling shorewall" : "configuring shorewall to allow ports: $ports");
# NOTE: the 2nd param is undef in this case!
- if(!AdminPanel::Shared::Shorewall::write_($shorewall))
+ if(!ManaTools::Shared::Shorewall::write_($shorewall))
{
# user action request
my $action = $self->sh_gui->ask_fromList({
@@ -1129,7 +1129,7 @@ sub set_ports {
list => [ "keep", "drop"],
default => "keep",
});
- AdminPanel::Shared::Shorewall::write_($shorewall,$action);
+ ManaTools::Shared::Shorewall::write_($shorewall,$action);
return 1;
}
}
@@ -1189,7 +1189,7 @@ sub start {
$self->set_ports($disabled, $ports, $self->log_net_drop()) or return;
# restart mandi
- my $services = AdminPanel::Shared::Services->new();
+ my $services = ManaTools::Shared::Services->new();
$services->is_service_running("mandi") and $services->restart("mandi");
# restarting services if needed
diff --git a/lib/AdminPanel/Module/Hosts.pm b/lib/AdminPanel/Module/Hosts.pm
index 90aa452..faae3f0 100644
--- a/lib/AdminPanel/Module/Hosts.pm
+++ b/lib/AdminPanel/Module/Hosts.pm
@@ -18,7 +18,7 @@
#
#*****************************************************************************
-package AdminPanel::Module::Hosts;
+package ManaTools::Module::Hosts;
use Modern::Perl '2011';
use autodie;
@@ -28,11 +28,11 @@ use utf8;
use Glib;
use yui;
-use AdminPanel::Shared qw(trim);
-use AdminPanel::Shared::GUI;
-use AdminPanel::Shared::Hosts;
+use ManaTools::Shared qw(trim);
+use ManaTools::Shared::GUI;
+use ManaTools::Shared::Hosts;
-extends qw( AdminPanel::Module );
+extends qw( ManaTools::Module );
has '+icon' => (
@@ -82,14 +82,14 @@ sub _localeInitialize {
my $self = shift();
# TODO fix domain binding for translation
- $self->loc(AdminPanel::Shared::Locales->new(domain_name => 'drakx-net') );
+ $self->loc(ManaTools::Shared::Locales->new(domain_name => 'drakx-net') );
# TODO if we want to give the opportunity to test locally add dir_name => 'path'
}
sub _SharedUGUIInitialize {
my $self = shift();
- $self->sh_gui(AdminPanel::Shared::GUI->new() );
+ $self->sh_gui(ManaTools::Shared::GUI->new() );
}
#=============================================================
@@ -293,7 +293,7 @@ sub _manipulateHostDialog {
my $res = undef;
my @hosts_toadd;
push @hosts_toadd, $textHostName->value();
- if(AdminPanel::Shared::trim($textHostAlias->value()) ne ""){
+ if(ManaTools::Shared::trim($textHostAlias->value()) ne ""){
push @hosts_toadd, $textHostAlias->value();
}
if($boolEdit == 0){
@@ -405,7 +405,7 @@ sub setupTable {
sub _manageHostsDialog {
my $self = shift;
- ## TODO fix for adminpanel
+ ## TODO fix for manatools
my $appTitle = yui::YUI::app()->applicationTitle();
my $appIcon = yui::YUI::app()->applicationIcon();
## set new title to get it in dialog
@@ -439,7 +439,7 @@ sub _manageHostsDialog {
$self->table($factory->createTable($leftContent,$tableHeader));
# initialize Config::Hosts
- $self->cfgHosts(AdminPanel::Shared::Hosts->new());
+ $self->cfgHosts(ManaTools::Shared::Hosts->new());
$self->setupTable();
my $rightContent = $factory->createRight($hbox_content);
diff --git a/lib/AdminPanel/Module/LogViewer.pm b/lib/AdminPanel/Module/LogViewer.pm
index 130bef3..e009c1c 100644
--- a/lib/AdminPanel/Module/LogViewer.pm
+++ b/lib/AdminPanel/Module/LogViewer.pm
@@ -1,14 +1,14 @@
# vim: set et ts=4 sw=4:
-package AdminPanel::Module::LogViewer;
+package ManaTools::Module::LogViewer;
#============================================================= -*-perl-*-
=head1 NAME
-AdminPanel::Module::LogViewer - Log viewer
+ManaTools::Module::LogViewer - Log viewer
=head1 SYNOPSIS
-my $logViewer = AdminPanel::Module::LogViewer->new();
+my $logViewer = ManaTools::Module::LogViewer->new();
$logViewer->start();
=head1 DESCRIPTION
@@ -21,7 +21,7 @@ file.
You can find documentation for this module with the perldoc command:
-perldoc AdminPanel::Module::::LogViewer
+perldoc ManaTools::Module::::LogViewer
=head1 AUTHOR
@@ -53,10 +53,10 @@ use Moose;
use diagnostics;
use open OUT => ':utf8';
-use AdminPanel::Shared::GUI;
-use AdminPanel::Shared::Locales;
-use AdminPanel::Shared::Services;
-use AdminPanel::Shared::JournalCtl;
+use ManaTools::Shared::GUI;
+use ManaTools::Shared::Locales;
+use ManaTools::Shared::Services;
+use ManaTools::Shared::JournalCtl;
use POSIX qw/strftime floor/;
@@ -66,7 +66,7 @@ use File::HomeDir qw(home);
use yui;
-extends qw( AdminPanel::Module );
+extends qw( ManaTools::Module );
### TODO icon
has '+icon' => (
@@ -83,7 +83,7 @@ sub _localeInitialize {
my $self = shift;
# TODO fix domain binding for translation
- $self->loc(AdminPanel::Shared::Locales->new(domain_name => 'libDrakX-standalone') );
+ $self->loc(ManaTools::Shared::Locales->new(domain_name => 'libDrakX-standalone') );
# TODO if we want to give the opportunity to test locally add dir_name => 'path'
}
@@ -96,7 +96,7 @@ has 'sh_gui' => (
sub _SharedUGUIInitialize {
my $self = shift;
- $self->sh_gui(AdminPanel::Shared::GUI->new() );
+ $self->sh_gui(ManaTools::Shared::GUI->new() );
}
=head1 VERSION
@@ -261,7 +261,7 @@ sub _logViewerPanel {
my $itemCollection = new yui::YItemCollection;
yui::YUI::app()->busyCursor();
- my $serv = AdminPanel::Shared::Services->new();
+ my $serv = ManaTools::Shared::Services->new();
my ($l, $active_services) = $serv->services();
foreach (@{$active_services}) {
@@ -510,7 +510,7 @@ sub _save {
sub _search {
my ($self, $log_opts) = @_;
- my $log = AdminPanel::Shared::JournalCtl->new(%{$log_opts});
+ my $log = ManaTools::Shared::JournalCtl->new(%{$log_opts});
my $all = $log->getLog();
return $all;
diff --git a/lib/AdminPanel/Module/Proxy.pm b/lib/AdminPanel/Module/Proxy.pm
index 5d0165c..ff2af3e 100644
--- a/lib/AdminPanel/Module/Proxy.pm
+++ b/lib/AdminPanel/Module/Proxy.pm
@@ -18,7 +18,7 @@
#
#*****************************************************************************
-package AdminPanel::Module::Proxy;
+package ManaTools::Module::Proxy;
use Modern::Perl '2011';
use autodie;
@@ -28,16 +28,16 @@ use English;
use utf8;
use yui;
-use AdminPanel::Shared qw(trim);
-use AdminPanel::Shared::GUI;
-use AdminPanel::Shared::Proxy;
+use ManaTools::Shared qw(trim);
+use ManaTools::Shared::GUI;
+use ManaTools::Shared::Proxy;
# TODROP but provides network::network
use lib qw(/usr/lib/libDrakX);
use network::network;
use MDK::Common::System qw(getVarsFromSh);
-extends qw( AdminPanel::Module );
+extends qw( ManaTools::Module );
has '+icon' => (
@@ -89,14 +89,14 @@ sub _localeInitialize {
my $self = shift();
# TODO fix domain binding for translation
- $self->loc(AdminPanel::Shared::Locales->new(domain_name => 'drakx-net') );
+ $self->loc(ManaTools::Shared::Locales->new(domain_name => 'drakx-net') );
# TODO if we want to give the opportunity to test locally add dir_name => 'path'
}
sub _SharedUGUIInitialize {
my $self = shift();
- $self->sh_gui( AdminPanel::Shared::GUI->new() );
+ $self->sh_gui( ManaTools::Shared::GUI->new() );
}
#=============================================================
@@ -243,7 +243,7 @@ sub validate {
sub _manageProxyDialog {
my $self = shift;
- ## TODO fix for adminpanel
+ ## TODO fix for manatools
my $appTitle = yui::YUI::app()->applicationTitle();
my $appIcon = yui::YUI::app()->applicationIcon();
## set new title to get it in dialog
diff --git a/lib/AdminPanel/Module/Services.pm b/lib/AdminPanel/Module/Services.pm
index 53c3aae..dca0c0c 100644
--- a/lib/AdminPanel/Module/Services.pm
+++ b/lib/AdminPanel/Module/Services.pm
@@ -1,17 +1,17 @@
# vim: set et ts=4 sw=4:
-package AdminPanel::Module::Services;
+package ManaTools::Module::Services;
#============================================================= -*-perl-*-
=head1 NAME
-AdminPanel::Module::Services - This module aims to manage service
+ManaTools::Module::Services - This module aims to manage service
with GUI
=head1 SYNOPSIS
- my $serviceMan = AdminPanel::Module::Services->new();
+ my $serviceMan = ManaTools::Module::Services->new();
$serviceMan->start();
=head1 DESCRIPTION
@@ -26,11 +26,11 @@ AdminPanel::Module::Services - This module aims to manage service
You can find documentation for this module with the perldoc command:
- perldoc AdminPanel::Module::Services
+ perldoc ManaTools::Module::Services
=head1 SEE ALSO
- AdminPanel::Module
+ ManaTools::Module
=head1 AUTHOR
@@ -64,14 +64,14 @@ use MDK::Common::String qw(formatAlaTeX);
use MDK::Common::DataStructure qw(member);
use yui;
-use AdminPanel::Shared::GUI;
-use AdminPanel::Shared::Locales;
-use AdminPanel::Shared::Services;
+use ManaTools::Shared::GUI;
+use ManaTools::Shared::Locales;
+use ManaTools::Shared::Services;
use File::Basename;
-extends qw( AdminPanel::Module );
+extends qw( ManaTools::Module );
has '+icon' => (
default => "/usr/share/mcc/themes/default/service-mdk.png",
@@ -132,7 +132,7 @@ has 'sh_gui' => (
sub _SharedUGUIInitialize {
my $self = shift();
- $self->sh_gui(AdminPanel::Shared::GUI->new() );
+ $self->sh_gui(ManaTools::Shared::GUI->new() );
}
has 'sh_services' => (
@@ -145,7 +145,7 @@ has 'sh_services' => (
sub _SharedServicesInitialize {
my $self = shift();
- $self->sh_services(AdminPanel::Shared::Services->new() );
+ $self->sh_services(ManaTools::Shared::Services->new() );
}
@@ -159,7 +159,7 @@ sub _localeInitialize {
my $self = shift();
# TODO fix domain binding for translation
- $self->loc(AdminPanel::Shared::Locales->new(domain_name => 'libDrakX-standalone') );
+ $self->loc(ManaTools::Shared::Locales->new(domain_name => 'libDrakX-standalone') );
# TODO if we want to give the opportunity to test locally add dir_name => 'path'
}
diff --git a/lib/AdminPanel/Module/Users.pm b/lib/AdminPanel/Module/Users.pm
index 1be39d1..2ef9066 100644
--- a/lib/AdminPanel/Module/Users.pm
+++ b/lib/AdminPanel/Module/Users.pm
@@ -1,17 +1,17 @@
# vim: set et ts=4 sw=4:
-package AdminPanel::Module::Users;
+package ManaTools::Module::Users;
#============================================================= -*-perl-*-
=head1 NAME
-AdminPanel::Module::Users - This module aims to manage service
+ManaTools::Module::Users - This module aims to manage service
with GUI
=head1 SYNOPSIS
- my $userManager = AdminPanel::Module::Users->new();
+ my $userManager = ManaTools::Module::Users->new();
$userManager->start();
=head1 DESCRIPTION
@@ -24,11 +24,11 @@ AdminPanel::Module::Users - This module aims to manage service
You can find documentation for this module with the perldoc command:
- perldoc AdminPanel::Module::Users
+ perldoc ManaTools::Module::Users
=head1 SEE ALSO
- AdminPanel::Module
+ ManaTools::Module
=head1 AUTHOR
@@ -77,14 +77,14 @@ use Sys::Syslog;
use Glib;
use English;
use yui;
-use AdminPanel::Shared;
-use AdminPanel::Shared::GUI;
-use AdminPanel::Shared::Locales;
-use AdminPanel::Shared::Users;
+use ManaTools::Shared;
+use ManaTools::Shared::GUI;
+use ManaTools::Shared::Locales;
+use ManaTools::Shared::Users;
use MDK::Common::DataStructure qw(member);
use feature 'state';
-extends qw( AdminPanel::Module );
+extends qw( ManaTools::Module );
has '+icon' => (
default => "/usr/share/icons/userdrake.png",
@@ -146,7 +146,7 @@ has 'sh_users' => (
sub _SharedUsersInitialize {
my $self = shift();
- $self->sh_users(AdminPanel::Shared::Users->new() );
+ $self->sh_users(ManaTools::Shared::Users->new() );
}
has 'sh_gui' => (
@@ -158,7 +158,7 @@ has 'sh_gui' => (
sub _SharedUGUIInitialize {
my $self = shift();
- $self->sh_gui(AdminPanel::Shared::GUI->new() );
+ $self->sh_gui(ManaTools::Shared::GUI->new() );
}
has 'loc' => (
@@ -172,7 +172,7 @@ sub _localeInitialize {
my $self = shift();
# TODO fix domain binding for translation
- $self->loc(AdminPanel::Shared::Locales->new(domain_name => 'userdrake') );
+ $self->loc(ManaTools::Shared::Locales->new(domain_name => 'userdrake') );
# TODO if we want to give the opportunity to test locally add dir_name => 'path'
}
@@ -714,7 +714,7 @@ sub _buildUserData {
my $weakness = undef;
if (yui::YUI::app()->hasImageSupport()) {
$factory->createHSpacing($hbox, 2.0);
- my $file = File::ShareDir::dist_file(AdminPanel::Shared::distName(), 'images/Blank16x16.png');
+ my $file = File::ShareDir::dist_file(ManaTools::Shared::distName(), 'images/Blank16x16.png');
$weakness = $factory->createImage($hbox, $file);
}
else {
@@ -1954,9 +1954,9 @@ sub _checkWeaknessPassword {
my $strongp = $self->sh_users->strongPassword($password);
if (yui::YUI::app()->hasImageSupport()) {
- my $file = File::ShareDir::dist_file(AdminPanel::Shared::distName(), 'images/Warning_Shield_Grey16x16.png');
+ my $file = File::ShareDir::dist_file(ManaTools::Shared::distName(), 'images/Warning_Shield_Grey16x16.png');
if ($strongp) {
- $file = File::ShareDir::dist_file(AdminPanel::Shared::distName(), 'images/Checked_Shield_Green16x16.png');
+ $file = File::ShareDir::dist_file(ManaTools::Shared::distName(), 'images/Checked_Shield_Green16x16.png');
}
$weakness_widget->setImage($file);
}
@@ -2381,7 +2381,7 @@ sub _manageUsersDialog {
return;
}
- ## TODO fix for adminpanel
+ ## TODO fix for manatools
my $pixdir = '/usr/share/userdrake/pixmaps/';
## push application title
my $appTitle = yui::YUI::app()->applicationTitle();