From 740ac545e244877ece455f328ea82dc46d9d3101 Mon Sep 17 00:00:00 2001 From: Marcin Haba Date: Sat, 12 Mar 2016 02:33:19 +0100 Subject: [PATCH] baculum: Show jobs for client --- gui/baculum/protected/Class/JobManager.php | 16 +++ gui/baculum/protected/Lang/en/messages.mo | Bin 28399 -> 28511 bytes gui/baculum/protected/Lang/en/messages.po | 6 ++ gui/baculum/protected/Lang/pl/messages.mo | Bin 30724 -> 30852 bytes gui/baculum/protected/Lang/pl/messages.po | 6 ++ gui/baculum/protected/Lang/pt/messages.mo | Bin 30495 -> 30607 bytes gui/baculum/protected/Lang/pt/messages.po | 6 ++ .../protected/Pages/API/JobsForClient.php | 46 +++++++++ .../Portlets/ClientConfiguration.php | 10 ++ .../Portlets/ClientConfiguration.tpl | 92 ++++++++++++++++++ gui/baculum/protected/Portlets/ClientList.tpl | 2 + gui/baculum/protected/application.xml | 1 + 12 files changed, 185 insertions(+) create mode 100644 gui/baculum/protected/Pages/API/JobsForClient.php diff --git a/gui/baculum/protected/Class/JobManager.php b/gui/baculum/protected/Class/JobManager.php index f08a27001b..078efeea00 100644 --- a/gui/baculum/protected/Class/JobManager.php +++ b/gui/baculum/protected/Class/JobManager.php @@ -131,5 +131,21 @@ class JobManager extends TModule { return JobRecord::finder()->findAllBySql($sql); } + /** + * Get jobs for given client. + * + * @param string $clientid client identifier + * @param array $allowed_jobs jobs allowed to show + * @return array jobs for specific client + */ + public function getJobsForClient($clientid, $allowed_jobs = array()) { + $jobs_criteria = ''; + if (count($allowed_jobs) > 0) { + $jobs_sql = implode("', '", $allowed_jobs); + $jobs_criteria = " AND Job.Name IN ('" . $jobs_sql . "')"; + } + $sql = "SELECT DISTINCT Job.* FROM Client, Job WHERE Client.ClientId='$clientid' AND Client.ClientId=Job.ClientId $jobs_criteria"; + return JobRecord::finder()->findAllBySql($sql); + } } ?> diff --git a/gui/baculum/protected/Lang/en/messages.mo b/gui/baculum/protected/Lang/en/messages.mo index 5fc682c7ea10c41ed624c79ae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~eNg?GjTs(SjIHc97l3onbWOhY&Hu zQxql#Hf4^fQ=@|8hS@`C6jjVWJI%vBcjtE>x8rLdhyc4*eWYX>F7gDAxem}4f_(mi7XDy cU9};<(U+w*^hsZpydgAqM(~D}gSJ=xFV_ES^Z)<= diff --git a/gui/baculum/protected/Lang/en/messages.po b/gui/baculum/protected/Lang/en/messages.po index 3b630625d7..a3b2b2d37d 100644 --- a/gui/baculum/protected/Lang/en/messages.po +++ b/gui/baculum/protected/Lang/en/messages.po @@ -1142,3 +1142,9 @@ msgstr "Jobs on Volume" msgid "No jobs on the volume." msgstr "No jobs on the volume." +msgid "Jobs for Client" +msgstr "Jobs for Client" + +msgid "No jobs for the client." +msgstr "No jobs for the client." + diff --git a/gui/baculum/protected/Lang/pl/messages.mo b/gui/baculum/protected/Lang/pl/messages.mo index 7b2fe042425bd7a416099080fe27f25ec150b643..dd0d0b32618d7735c9f6c9d5ea2d5c7ac724ea08 100644 GIT binary patch delta 8143 zcmZwM37pQ=9>?)Bm@#HC3ub3#m@Ui97-YiOmuxf0h%%VW2(!dkLh_{2W{W|Qtt+KX zYQl|*sOVBgT4hO6w21D_MdP}k?{iMCy06#$zxqAzbIyM`=luTX|9_s*gBN@ryy)XO z5ngAxVVmt^OdQq(8gq^Eu}HNVQyp(iC?3XO{02G1T)-f#aqaaIY&{aSKgpTt+B;!2 z?R~Kx#w2>L>oG|b>eA58nS-^d_d<2h7aQR)jKWgXK<1$@R=WC1Y(o7x48ZqM138Rg zcpUxk7u0nwVFTkaCZwqf#xz6iXpi-A5Juo=R0gJF8+;f;aHsPCCQ$zhW3UFJF|wI4 z^kG_~I=%%pu-j1Q7h?qdn`sm@lLe>)m!d|#5|x3Cs0_X4+<`iN4{Bihu_1nm>hQcX zG|BGIa`r%7XDDidBhjOKQ9{8Vr=cz|#~rX9m6=yueXsLl=PA^TE}+i;9Ut~FrcSb* z$buBRzY>+nwW#B^qWXP1h5Tny*iS=ayn?#7k*Rj($*2>uoE@<)^`58<48U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yjS@%;>>tsZfN+LJ_0BHmp$ zDF0YolDEKj9ska8-p8(le$8BRZFQZ+xwE&s`ysqW`x`_V%JKLSagNaO7V!y@#kmed zFy)Fw0Oh4v9Z%~srQ;c53el3rXkrfKRzwPsME&ph8SyJ&@38;e?8Ldp2pt*NI)7iq zSns55@cmrK&n83&XIEh;_8?|czDhhsoFMiS`ddTC7~(I)XyP~GeWDHbj3BxYbE)gl z#@8{HwnjM5S7ZBhrci^%wnPug{fL)|)PE4j=8(U#t)Fvn*{(SsS zr5ce-oFQH!>Tvy2IGKne{QaW%%ZS1s$2+cYDF0Ta2(JZ~|I@Y9!!+tTULZ!h@_Jtj ze}&*oq7U&X=dy7F(TUKp%i{Z)$@$kP^~FTje#=?XJ$Jf(367%T&xwB!;gqN0PedYR zMsCvaS-h9OIXRequest['id']); + $error = false; + if (!is_null($this->user)) { + $allowed_jobs = $this->getModule('bconsole')->bconsoleCommand($this->director, array('.jobs'), $this->user); + if ($allowed_jobs->exitcode === 0) { + $allowed = $allowed_jobs->output; + } else { + $error = true; + $this->output = $allowed_jobs->output; + $this->error = $allowed_jobs->exitcode; + } + } + + if ($error === false) { + $jobs = $this->getModule('job')->getJobsForClient($clientid, $allowed); + $this->output = $jobs; + $this->error = JobError::ERROR_NO_ERRORS; + } + } +} +?> diff --git a/gui/baculum/protected/Portlets/ClientConfiguration.php b/gui/baculum/protected/Portlets/ClientConfiguration.php index 1b9ed6b76d..f3dd43c43b 100644 --- a/gui/baculum/protected/Portlets/ClientConfiguration.php +++ b/gui/baculum/protected/Portlets/ClientConfiguration.php @@ -21,6 +21,7 @@ */ Prado::using('System.Web.UI.ActiveControls.TActiveCustomValidator'); +Prado::using('System.Web.UI.ActiveControls.TActiveDataGrid'); Prado::using('Application.Portlets.Portlets'); class ClientConfiguration extends Portlets { @@ -41,6 +42,10 @@ class ClientConfiguration extends Portlets { $this->FileRetention->Text = intval($client->fileretention / 86400); // conversion to days $this->JobRetention->Text = intval($client->jobretention / 86400); // conversion to days $this->AutoPrune->Checked = $client->autoprune == 1; + + $jobs_for_client = $this->Application->getModule('api')->get(array('clients', 'jobs', $client->clientid))->output; + $this->JobsForClient->DataSource = $this->Application->getModule('misc')->objectToArray($jobs_for_client); + $this->JobsForClient->dataBind(); } public function status($sender, $param) { @@ -69,5 +74,10 @@ class ClientConfiguration extends Portlets { $isValid = preg_match('/^\d+$/', $this->JobRetention->Text) && $this->JobRetention->Text >= 0; $param->setIsValid($isValid); } + + public function openJob($sender, $param) { + $jobid = $param->CallbackParameter; + $this->getPage()->JobConfiguration->configure($jobid); + } } ?> diff --git a/gui/baculum/protected/Portlets/ClientConfiguration.tpl b/gui/baculum/protected/Portlets/ClientConfiguration.tpl index fd13e84479..8a0ac8c78b 100644 --- a/gui/baculum/protected/Portlets/ClientConfiguration.tpl +++ b/gui/baculum/protected/Portlets/ClientConfiguration.tpl @@ -5,6 +5,7 @@ <%[ Actions ]%> <%[ Console status ]%> + <%[ Jobs for Client ]%>


+ diff --git a/gui/baculum/protected/Portlets/ClientList.tpl b/gui/baculum/protected/Portlets/ClientList.tpl index 59388ab0a4..cc021407a3 100644 --- a/gui/baculum/protected/Portlets/ClientList.tpl +++ b/gui/baculum/protected/Portlets/ClientList.tpl @@ -47,6 +47,8 @@ ConfigurationWindow.getObj('ClientWindow').show(); + Formatters.set_formatters(); + bind_jobs_for_client_action(); ConfigurationWindow.getObj('ClientWindow').progress(false); diff --git a/gui/baculum/protected/application.xml b/gui/baculum/protected/application.xml index 38cf970894..dcfd01cc96 100644 --- a/gui/baculum/protected/application.xml +++ b/gui/baculum/protected/application.xml @@ -27,6 +27,7 @@ + -- 2.39.5