From: Eric Bollengier Date: Thu, 14 Feb 2008 20:22:52 +0000 (+0000) Subject: ebl add missing client_edit template X-Git-Tag: Release-3.0.0~1867 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0dcc461d0ff06557924ea894a16d7b8cc4a4586c;p=bacula%2Fbacula ebl add missing client_edit template cleanup some SQL git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6420 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/gui/bweb/lang/en/tpl/client_edit.tpl b/gui/bweb/lang/en/tpl/client_edit.tpl new file mode 100644 index 0000000000..4f69e4bb3f --- /dev/null +++ b/gui/bweb/lang/en/tpl/client_edit.tpl @@ -0,0 +1,60 @@ +
+
+

Client

+
+
+
+ > +
+
+ Actions   +
+
+ +
+ +
+
+ + diff --git a/gui/bweb/lang/es/tpl/client_edit.tpl b/gui/bweb/lang/es/tpl/client_edit.tpl new file mode 100644 index 0000000000..4f69e4bb3f --- /dev/null +++ b/gui/bweb/lang/es/tpl/client_edit.tpl @@ -0,0 +1,60 @@ +
+
+

Client

+
+
+
+ > +
+
+ Actions   +
+
+ +
+ +
+
+ + diff --git a/gui/bweb/lang/fr/tpl/client_edit.tpl b/gui/bweb/lang/fr/tpl/client_edit.tpl new file mode 100644 index 0000000000..ac2629ffd4 --- /dev/null +++ b/gui/bweb/lang/fr/tpl/client_edit.tpl @@ -0,0 +1,60 @@ +
+
+

Client

+
+
+
+ > +
+
+ Actions   +
+
+ +
+ +
+
+ + diff --git a/gui/bweb/lib/Bweb.pm b/gui/bweb/lib/Bweb.pm index fe6f774062..7af3b5ad59 100644 --- a/gui/bweb/lib/Bweb.pm +++ b/gui/bweb/lib/Bweb.pm @@ -1565,13 +1565,23 @@ sub client_edit my $f1 = $self->get_client_group_filter(); my $f2 = $self->get_client_filter(); +# client_group_name | here +#-------------------+----- +# GROUP1 | 1 +# GRP3 | 0 + my $query = " -SELECT client_group_name, here - FROM client_group $f1 - LEFT JOIN (SELECT 1 AS here, client_group_id - FROM Client JOIN client_group_member USING (ClientId) $f2 - WHERE Name = $arg->{qclient}) AS temp USING (client_group_id) -"; +SELECT client_group_name, max(here) AS here FROM ( + SELECT client_group_name, 1 AS here + FROM client_group + JOIN client_group_member USING (client_group_id) + JOIN Client USING (ClientId) $f2 + WHERE Name = $arg->{qclient} + UNION ALL + SELECT client_group_name, 0 + FROM client_group $f1 +) AS temp +GROUP by client_group_name"; my $all = $self->dbh_selectall_hashref($query, 'client_group_name'); @@ -3378,18 +3388,22 @@ sub display_user # rolename | userid #------------+-------- -# cancel_job | -# restore | +# cancel_job | 0 +# restore | 0 # run_job | 1 my $role = $self->dbh_selectall_hashref(" -SELECT rolename, temp.userid - FROM bweb_role - LEFT JOIN (SELECT roleid, userid - FROM bweb_user JOIN bweb_role_member USING (userid) - WHERE username = $user) AS temp USING (roleid) -ORDER BY rolename -", 'rolename'); +SELECT rolename, max(here) AS userid FROM ( + SELECT rolename, 1 AS here + FROM bweb_user + JOIN bweb_role_member USING (userid) + JOIN bweb_role USING (roleid) + WHERE username = $user + UNION ALL + SELECT rolename, 0 + FROM bweb_role +) AS temp +GROUP by rolename", 'rolename'); $arg = $self->get_form(qw/db_usernames db_client_groups/); diff --git a/gui/bweb/technotes-2.3 b/gui/bweb/technotes-2.3 index 776dde86be..5613d7e4cf 100644 --- a/gui/bweb/technotes-2.3 +++ b/gui/bweb/technotes-2.3 @@ -1,3 +1,6 @@ +14Feb08 +ebl Cleanup some SQL + 13Feb08 ebl Can modify client list group for a specific client ebl Disable use of Enabled flag in volume mgnt diff --git a/gui/bweb/tpl/client_edit.tpl b/gui/bweb/tpl/client_edit.tpl new file mode 100644 index 0000000000..962e89cc8e --- /dev/null +++ b/gui/bweb/tpl/client_edit.tpl @@ -0,0 +1,60 @@ +
+
+

Client

+
+
+
+ > +
+
+ Actions   +
+
+ +
+ +
+
+ +