From b22089404b22dadb8c4bbe8e3fffc4b60a632fb3 Mon Sep 17 00:00:00 2001 From: Marcin Haba Date: Tue, 9 Dec 2014 22:21:24 +0100 Subject: [PATCH] baculum: Enable support for Verify jobs --- gui/baculum/protected/Class/Miscellaneous.php | 82 +++++++++++++++++- gui/baculum/protected/Lang/en/messages.mo | Bin 26274 -> 26660 bytes gui/baculum/protected/Lang/en/messages.po | 17 ++++ gui/baculum/protected/Lang/pl/messages.mo | Bin 28330 -> 28755 bytes gui/baculum/protected/Lang/pl/messages.po | 24 ++++- gui/baculum/protected/Pages/API/JobRun.php | 7 +- .../protected/Portlets/JobConfiguration.php | 63 +++++++++++++- .../protected/Portlets/JobConfiguration.tpl | 74 ++++++++++++++-- gui/baculum/protected/Portlets/JobList.php | 54 ++---------- gui/baculum/protected/Portlets/JobList.tpl | 6 +- .../Portlets/JobRunConfiguration.php | 57 ++++++++++++ .../Portlets/JobRunConfiguration.tpl | 74 ++++++++++++++-- gui/baculum/themes/Baculum-v1/style.css | 4 +- 13 files changed, 390 insertions(+), 72 deletions(-) diff --git a/gui/baculum/protected/Class/Miscellaneous.php b/gui/baculum/protected/Class/Miscellaneous.php index b167b94b42..ad0b61021e 100644 --- a/gui/baculum/protected/Class/Miscellaneous.php +++ b/gui/baculum/protected/Class/Miscellaneous.php @@ -4,7 +4,59 @@ class Miscellaneous extends TModule { const LICENCE_FILE = 'LICENSE'; - private $jobLevels = array('F' => 'Full', 'I' => 'Incremental', 'D'=> 'Differential', 'B' => 'Base', 'f' => 'VirtualFull'); + private $jobTypes = array( + 'B' => 'Backup', + 'M' => 'Migrated', + 'V' => 'Verify', + 'R' => 'Restore', + 'I' => 'Internal', + 'D' => 'Admin', + 'A' => 'Archive', + 'C' => 'Copy', + 'g' => 'Migration' + ); + + private $jobLevels = array( + 'F' => 'Full', + 'I' => 'Incremental', + 'D' => 'Differential', + 'B' => 'Base', + 'f' => 'VirtualFull', + 'V' => 'InitCatalog', + 'C' => 'Catalog', + 'O' => 'VolumeToCatalog', + 'd' => 'DiskToCatalog' + ); + + private $jobStates = array( + 'C' => array('value' => 'Created', 'description' =>'Created but not yet running'), + 'R' => array('value' => 'Running', 'description' => 'Running'), + 'B' => array('value' => 'Blocked', 'description' => 'Blocked'), + 'T' => array('value' => 'Terminated', 'description' =>'Terminated normally'), + 'W' => array('value' => 'Terminated with warnings', 'description' =>'Terminated normally with warnings'), + 'E' => array('value' => 'Error', 'description' =>'Terminated in Error'), + 'e' => array('value' => 'Non-fatal error', 'description' =>'Non-fatal error'), + 'f' => array('value' => 'Fatal error', 'description' =>'Fatal error'), + 'D' => array('value' => 'Verify Diff.', 'description' =>'Verify Differences'), + 'A' => array('value' => 'Canceled by user', 'description' =>'Canceled by the user'), + 'I' => array('value' => 'Incomplete', 'description' =>'Incomplete Job'), + 'F' => array('value' => 'Waiting on FD', 'description' =>'Waiting on the File daemon'), + 'S' => array('value' => 'Waiting on SD', 'description' =>'Waiting on the Storage daemon'), + 'm' => array('value' => 'Waiting for new vol.', 'description' =>'Waiting for a new Volume to be mounted'), + 'M' => array('value' => 'Waiting for mount', 'description' =>'Waiting for a Mount'), + 's' => array('value' => 'Waiting for storage', 'description' =>'Waiting for Storage resource'), + 'j' => array('value' => 'Waiting for job', 'description' =>'Waiting for Job resource'), + 'c' => array('value' => 'Waiting for client', 'description' =>'Waiting for Client resource'), + 'd' => array('value' => 'Waiting for Max. jobs', 'description' =>'Wating for Maximum jobs'), + 't' => array('value' => 'Waiting for start', 'description' =>'Waiting for Start Time'), + 'p' => array('value' => 'Waiting for higher priority', 'description' =>'Waiting for higher priority job to finish'), + 'i' => array('value' => 'Batch insert', 'description' =>'Doing batch insert file records'), + 'a' => array('value' => 'Despooling attributes', 'description' =>'SD despooling attributes'), + 'l' => array('value' => 'Data despooling', 'description' =>'Doing data despooling'), + 'L' => array('value' => 'Commiting data', 'description' =>'Committing data (last despool)') + ); + + private $runningJobStates = array('C', 'R'); /** * Getting the licence from file. @@ -20,6 +72,32 @@ class Miscellaneous extends TModule { return $this->jobLevels; } + public function getJobState($jobStateLetter = null) { + $state; + if(is_null($jobStateLetter)) { + $state = $this->jobStates; + } else { + $state = array_key_exists($jobStateLetter, $this->jobStates) ? $this->jobStates[$jobStateLetter] : null; + } + return $state; + } + + public function getRunningJobStates() { + return $this->runningJobStates; + } + + + public function getJobType($jobTypeLetter = null) { + $type; + if(is_null($jobTypeLetter)) { + $type = $this->jobTypes; + } else { + $type = array_key_exists($jobTypeLetter, $this->jobTypes) ? $this->jobTypes[$jobTypeLetter] : null; + } + return $type; + + } + public function isValidJobLevel($jobLevel) { return array_key_exists($jobLevel, $this->getJobLevels()); } @@ -140,4 +218,4 @@ class Miscellaneous extends TModule { return $elements; } } -?> \ No newline at end of file +?> diff --git a/gui/baculum/protected/Lang/en/messages.mo b/gui/baculum/protected/Lang/en/messages.mo index 0a2bde78893a042367266cc5eaa7d303cc31d224..5b75739980b5aaad03e2be27292fb2e34ecab2d3 100755 GIT binary patch delta 7429 zcmbu@eSFX59>?)(bFbac=4P`SGn<=jmbo8hZs%rHBR64e!yL@eX>#;)C?pXoF*}k< zQ?XJcIk~Ha6qQh-gNhuvE$VR2dA)zvAmJ z==0(sAJ55-qgjC(=miYMjaVIb zqOPyRQ2f?;-L==`CIPg^Vz}`b(~?3f8hT+M&U8M3G1N=30ltUz@hHaP71V&C(RM-& zFr0ckYU1gr^O>lLW}z}P2({ob(nDba1zj)|mFg1I0FOIgb?pb8Cs8-Jgj&fBtclfQ z>~(>t_Eb~`GF&~!nTN{YRP^Y=SrjzWd8iXlqE_-8>ij0uGkXVH;%+3H<{IkJ1T$L= z7>(+m>}-pgXa;J5y)hZHowH)ezf$rV4Z6WLREj@xp2m3Ux3CR1YGjP|-yCHTKw!NsaBmY1oVt*{(hV4^v-`{jq@AWaDPM zioQ+kv;7%0ai0WZ9>WM!X4axNgXqm5YIE*(e(j;az0GxOjr9}lBN%|n$S~BVEJS5s z25OH~U{&0O%HW5n{-2}zpGIZmDl%7d6E&f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pEUyMf<}~t zdTTI{qJrqe&2OoJLz{h-zvTT`ulHZa zR$>#epXjCDI9e0G_)Ff8K-wEoe4EgBLRou}c$WBy*gymkI%*P{OdO&8)tY+EC`^BL?)#By%0wXrJhdg}M0HfUqYOE3d`?l(}@mT_XRe^Yj|1xZ=;|igvLyKlHil?|2H1EBw{XcE1{zWafwJKI&x3- z@kVt4uUL5nwy|phDc7X@CUzqdh<@Juc}=L46WJFRB0CN8dbtyh`M9q893?M>)?cx~Fj&5k%W5jKq6z zBB5gtF^Tva(VMuAxPur*yiZgTI`r|;5y$-lyrR3H_dlBk9mk35iDp)BNx6#XNj(R< z6T68HMD@|du2sEnbt4`j9wah|B(AxNb&+4J{-c4Z{#_B3jfDQCs^fPL|Mz+`<(WiJ z;%DMRBF3)!n)3a`D?~JH7jZE08F8AZKJK%^kN7Te*y{h1^zY6Qb$GyJ{3}t*I#^D* zBaunH52g^|lpn)ii4(*^qJYrRmiX9T;uj3gAf6y@AmRxft+>B4X5mRx|E?Pq9aBC0 zKbz1NLn#G^Tl-NAw(?iF*2?p7ish{Vdoc9{)T8teJG}3TjHU*R2C4Q5;{t! n_IfIOMZ<#d((=?-qDnX9OsKEgit^MMr6&u9M3s)ett{xjk5}mK diff --git a/gui/baculum/protected/Lang/en/messages.po b/gui/baculum/protected/Lang/en/messages.po index dbb62f7e26..a2457c4895 100755 --- a/gui/baculum/protected/Lang/en/messages.po +++ b/gui/baculum/protected/Lang/en/messages.po @@ -986,3 +986,20 @@ msgstr "Vol. Use Duration (in sec.):" msgid "Yes" msgstr "Yes" +msgid "JobId to Verify:" +msgstr "JobId to Verify:" + +msgid "JobId to Verify value must be integer greather than 0." +msgstr "JobId to Verify value must be integer greather than 0." + +msgid "Job to Verify:" +msgstr "Job to Verify:" + +msgid "Verify by Job Name" +msgstr "Verify by Job Name" + +msgid "Verify by JobId" +msgstr "Verify by JobId" + +msgid "Verify option:" +msgstr "Verify option:" diff --git a/gui/baculum/protected/Lang/pl/messages.mo b/g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zBIOroxxzx{t1T@b*<9aL~fb1Wqm5x)`-xdF_gyq}14^{*($P|m|PI1FbH zmEHNpl)opMP#=iRu_f_*Ae9BgXM`y_68>tS@8q#lrcRnXw&-A7QLUm)$$9?OQ}gmC v=I2Du7&&HS-h{D5VHwYQ`Tbs7*8L0r`?ZlPp6?f4RMu~Hy`p0|FZ%os=7poolid) : null; $pool = $this->getModule('pool')->getPoolById($poolid); $priority = property_exists($params, 'priority') ? intval($params->priority) : 10; // default priority is set to 10 + $jobid = property_exists($params, 'jobid') ? 'jobid="' . intval($params->jobid) . '"' : ''; + // @TODO: Move Job name pattern in more appropriate place + $verifyjob = property_exists($params, 'verifyjob') && preg_match('/^[\w\d\.\-\s]+$/', $params->verifyjob) === 1 ? 'verifyjob="' . ($params->verifyjob) . '"' : ''; if(!is_null($job)) { $isValidLevel = $this->getModule('misc')->isValidJobLevel($params->level); @@ -42,7 +45,7 @@ class JobRun extends BaculumAPI { if(!is_null($storage)) { if(!is_null($pool)) { $joblevels = $this->getModule('misc')->getJobLevels(); - $run = $this->getModule('bconsole')->bconsoleCommand($this->director, array('run', 'job="' . $job . '"', 'level="' . $joblevels[$level] . '"', 'fileset="' . $fileset . '"', 'client="' . $client->name . '"', 'storage="' . $storage->name . '"', 'pool="' . $pool->name . '"' , 'priority="' . $priority . '"', 'yes'), $this->user); + $run = $this->getModule('bconsole')->bconsoleCommand($this->director, array('run', 'job="' . $job . '"', 'level="' . $joblevels[$level] . '"', 'fileset="' . $fileset . '"', 'client="' . $client->name . '"', 'storage="' . $storage->name . '"', 'pool="' . $pool->name . '"' , 'priority="' . $priority . '"', $jobid , $verifyjob, 'yes'), $this->user); $this->output = $run->output; $this->error = (integer)$run->exitcode; } else { @@ -72,4 +75,4 @@ class JobRun extends BaculumAPI { } } -?> \ No newline at end of file +?> diff --git a/gui/baculum/protected/Portlets/JobConfiguration.php b/gui/baculum/protected/Portlets/JobConfiguration.php index e08869d227..f0b19fbb9a 100644 --- a/gui/baculum/protected/Portlets/JobConfiguration.php +++ b/gui/baculum/protected/Portlets/JobConfiguration.php @@ -17,13 +17,17 @@ * Bacula® is a registered trademark of Kern Sibbald. */ +Prado::using('System.Web.UI.ActiveControls.TActivePanel'); Prado::using('Application.Portlets.Portlets'); class JobConfiguration extends Portlets { const DEFAULT_JOB_PRIORITY = 10; - private $runningJobStates = array('C', 'R'); + + public $jobToVerify = array('C', 'O', 'd'); + + public $verifyOptions = array('jobname' => 'Verify by Job Name', 'jobid' => 'Verify by JobId'); public function configure($jobId) { $jobdata = $this->Application->getModule('api')->get(array('jobs', $jobId))->output; @@ -36,6 +40,32 @@ class JobConfiguration extends Portlets { $this->Level->SelectedValue = $jobdata->level; $this->Level->dataBind(); + $isVerifyOption = in_array($jobdata->level, $this->jobToVerify); + $this->JobToVerifyOptionsLine->Display = ($isVerifyOption === true) ? 'Dynamic' : 'None'; + $this->JobToVerifyJobNameLine->Display = ($isVerifyOption === true) ? 'Dynamic' : 'None'; + $this->JobToVerifyJobIdLine->Display = 'None'; + $this->AccurateLine->Display = ($isVerifyOption === true) ? 'None' : 'Dynamic'; + $this->EstimateLine->Display = ($isVerifyOption === true) ? 'None' : 'Dynamic'; + + $verifyValues = array(); + + foreach($this->verifyOptions as $value => $text) { + $verifyValues[$value] = Prado::localize($text); + } + + $this->JobToVerifyOptions->dataSource = $verifyValues; + $this->JobToVerifyOptions->dataBind(); + + $jobTasks = $this->Application->getModule('api')->get(array('jobs', 'tasks'))->output; + + $jobsAllDirs = array(); + foreach($jobTasks as $director => $tasks) { + $jobsAllDirs = array_merge($jobsAllDirs, $tasks); + } + + $this->JobToVerifyJobName->dataSource = array_combine($jobsAllDirs, $jobsAllDirs); + $this->JobToVerifyJobName->dataBind(); + $clients = $this->Application->getModule('api')->get(array('clients'))->output; $clientsList = array(); foreach($clients as $client) { @@ -74,9 +104,11 @@ class JobConfiguration extends Portlets { $this->Storage->dataSource = $storagesList; $this->Storage->dataBind(); + $runningJobStates = $this->Application->getModule('misc')->getRunningJobStates(); + $this->Priority->Text = ($jobdata->priorjobid == 0) ? self::DEFAULT_JOB_PRIORITY : $jobdata->priorjobid; $this->DeleteButton->Visible = true; - $this->CancelButton->Visible = in_array($jobdata->jobstatus, $this->runningJobStates); + $this->CancelButton->Visible = in_array($jobdata->jobstatus, $runningJobStates); } public function status($sender, $param) { @@ -106,6 +138,16 @@ class JobConfiguration extends Portlets { $params['storageid'] = $this->Storage->SelectedValue; $params['poolid'] = $this->Pool->SelectedValue; $params['priority'] = $this->Priority->Text; + + if (in_array($this->Level->SelectedItem->Value, $this->jobToVerify)) { + $verifyVals = $this->getVerifyVals(); + if ($this->JobToVerifyOptions->SelectedItem->Value == $verifyVals['jobname']) { + $params['verifyjob'] = $this->JobToVerifyJobName->SelectedValue; + } elseif ($this->JobToVerifyOptions->SelectedItem->Value == $verifyVals['jobid']) { + $params['jobid'] = $this->JobToVerifyJobId->Text; + } + } + $result = $this->Application->getModule('api')->create(array('jobs', 'run'), $params)->output; $this->Estimation->Text = implode(PHP_EOL, $result); } @@ -125,5 +167,22 @@ class JobConfiguration extends Portlets { $isValid = preg_match('/^[0-9]+$/',$this->Priority->Text) === 1 && $this->Priority->Text > 0; $param->setIsValid($isValid); } + + public function jobIdToVerifyValidator($sender, $param) { + $verifyVals = $this->getVerifyVals(); + if(in_array($this->Level->SelectedValue, $this->jobToVerify) && $this->JobToVerifyOptions->SelectedItem->Value == $verifyVals['jobid']) { + $isValid = preg_match('/^[0-9]+$/',$this->JobToVerifyJobId->Text) === 1 && $this->JobToVerifyJobId->Text > 0; + } else { + $isValid = true; + } + $param->setIsValid($isValid); + return $isValid; + } + + private function getVerifyVals() { + $verifyOpt = array_keys($this->verifyOptions); + $verifyVals = array_combine($verifyOpt, $verifyOpt); + return $verifyVals; + } } ?> diff --git a/gui/baculum/protected/Portlets/JobConfiguration.tpl b/gui/baculum/protected/Portlets/JobConfiguration.tpl index 298d5fe4ac..1052462f13 100644 --- a/gui/baculum/protected/Portlets/JobConfiguration.tpl +++ b/gui/baculum/protected/Portlets/JobConfiguration.tpl @@ -13,9 +13,73 @@
- + + + var job_to_verify = $('<%=$this->JobToVerifyOptionsLine->ClientID%>'); + var verify_options = $('<%=$this->JobToVerifyOptionsLine->ClientID%>'); + var verify_by_job_name = $('<%=$this->JobToVerifyJobNameLine->ClientID%>'); + var verify_by_jobid = $('<%=$this->JobToVerifyJobIdLine->ClientID%>'); + var accurate = $('<%=$this->AccurateLine->ClientID%>'); + var estimate = $('<%=$this->EstimateLine->ClientID%>'); + var verify_current_opt = $('<%=$this->JobToVerifyOptions->ClientID%>').value; + if(/^(<%=implode('|', $this->jobToVerify)%>)$/.test(this.value)) { + accurate.hide(); + estimate.hide(); + verify_options.show(); + job_to_verify.show(); + if (verify_current_opt == 'jobid') { + verify_by_job_name.hide(); + verify_by_jobid.show(); + } else if (verify_current_opt == 'jobname') { + verify_by_job_name.show(); + verify_by_jobid.hide(); + } + } else if (job_to_verify.visible()) { + job_to_verify.hide(); + verify_options.hide(); + verify_by_job_name.hide(); + verify_by_jobid.hide(); + accurate.show(); + estimate.show(); + } + +
+ +
+
+ + + var verify_by_job_name = $('<%=$this->JobToVerifyJobNameLine->ClientID%>'); + var verify_by_jobid = $('<%=$this->JobToVerifyJobIdLine->ClientID%>'); + if (this.value == 'jobname') { + verify_by_jobid.hide(); + verify_by_job_name.show(); + } else if (this.value == 'jobid') { + verify_by_job_name.hide(); + verify_by_jobid.show(); + } else { + verify_by_job_name.hide(); + verify_by_jobid.hide(); + } + + +
+
+ +
+
+ +
+
+ +
+
+ + +
+
@@ -68,12 +132,12 @@
-
+
-
-
+ + -
+ diff --git a/gui/baculum/protected/Portlets/JobList.php b/gui/baculum/protected/Portlets/JobList.php index 1748575f0a..12cd790a5b 100644 --- a/gui/baculum/protected/Portlets/JobList.php +++ b/gui/baculum/protected/Portlets/JobList.php @@ -31,18 +31,8 @@ class JobList extends Portlets implements ISlideWindow { public $buttonID; public $windowTitle; public $jobLevels; - private $jobStates; - private $jobTypes = array( - 'B' => 'Backup', - 'M' => 'Migrated', - 'V' => 'Verify', - 'R' => 'Restore', - 'I' => 'Internal', - 'D' => 'Admin', - 'A' => 'Archive', - 'C' => 'Copy', - 'g' => 'Migration' - ); + public $jobStates; + public $jobTypes; public function setID($id) { $this->ID = $id; @@ -71,42 +61,10 @@ class JobList extends Portlets implements ISlideWindow { public function onLoad($param) { parent::onLoad($param); $this->prepareData(); - $this->jobLevels = $this->Application->getModule('misc')->getJobLevels(); - } - - public function getJobType($jobLetter) { - return array_key_exists($jobLetter, $this->jobTypes) ? $this->jobTypes[$jobLetter] : null; - } - - public function getJobState($jobStateLetter) { - $jobstates = array( - 'C' => (object)array('value' => 'Created', 'description' =>'Created but not yet running'), - 'R' => (object)array('value' => 'Running', 'description' => 'Running'), - 'B' => (object)array('value' => 'Blocked', 'description' => 'Blocked'), - 'T' => (object)array('value' => 'Terminated', 'description' =>'Terminated normally'), - 'W' => (object)array('value' => 'Terminated with warnings', 'description' =>'Terminated normally with warnings'), - 'E' => (object)array('value' => 'Error', 'description' =>'Terminated in Error'), - 'e' => (object)array('value' => 'Non-fatal error', 'description' =>'Non-fatal error'), - 'f' => (object)array('value' => 'Fatal error', 'description' =>'Fatal error'), - 'D' => (object)array('value' => 'Verify', 'description' =>'Verify Differences'), - 'A' => (object)array('value' => 'Canceled by user', 'description' =>'Canceled by the user'), - 'I' => (object)array('value' => 'Incomplete', 'description' =>'Incomplete Job'), - 'F' => (object)array('value' => 'Waiting on FD', 'description' =>'Waiting on the File daemon'), - 'S' => (object)array('value' => 'Waiting on SD', 'description' =>'Waiting on the Storage daemon'), - 'm' => (object)array('value' => 'Waiting for new vol.', 'description' =>'Waiting for a new Volume to be mounted'), - 'M' => (object)array('value' => 'Waiting for mount', 'description' =>'Waiting for a Mount'), - 's' => (object)array('value' => 'Waiting for storage', 'description' =>'Waiting for Storage resource'), - 'j' => (object)array('value' => 'Waiting for job', 'description' =>'Waiting for Job resource'), - 'c' => (object)array('value' => 'Waiting for client', 'description' =>'Waiting for Client resource'), - 'd' => (object)array('value' => 'Waiting for Max. jobs', 'description' =>'Wating for Maximum jobs'), - 't' => (object)array('value' => 'Waiting for start', 'description' =>'Waiting for Start Time'), - 'p' => (object)array('value' => 'Waiting for higher priority', 'description' =>'Waiting for higher priority job to finish'), - 'i' => (object)array('value' => 'Batch insert', 'description' =>'Doing batch insert file records'), - 'a' => (object)array('value' => 'Despooling attributes', 'description' =>'SD despooling attributes'), - 'l' => (object)array('value' => 'Data despooling', 'description' =>'Doing data despooling'), - 'L' => (object)array('value' => 'Commiting data', 'description' =>'Committing data (last despool)') - ); - return array_key_exists($jobStateLetter, $jobstates) ? $jobstates[$jobStateLetter] : null; + $misc = $this->Application->getModule('misc'); + $this->jobLevels = $misc->getJobLevels(); + $this->jobStates = $misc->getJobState(); + $this->jobTypes = $misc->getJobType(); } public function prepareData($forceReload = false) { diff --git a/gui/baculum/protected/Portlets/JobList.tpl b/gui/baculum/protected/Portlets/JobList.tpl index 5b8d800f18..cdde59509b 100644 --- a/gui/baculum/protected/Portlets/JobList.tpl +++ b/gui/baculum/protected/Portlets/JobList.tpl @@ -38,19 +38,19 @@ - + T - + L -
<%=isset($this->getPage()->JobWindow->getJobState($this->getParent()->Data['jobstatus'])->value) ? $this->getPage()->JobWindow->getJobState($this->getParent()->Data['jobstatus'])->value : ''%>
+
<%=isset($this->getPage()->JobWindow->jobStates[$this->getParent()->Data['jobstatus']]['value']) ? $this->getPage()->JobWindow->jobStates[$this->getParent()->Data['jobstatus']]['value'] : ''%>
'Verify by Job Name', 'jobid' => 'Verify by JobId'); + public function configure($jobname) { $this->JobName->Text = $jobname; $this->Estimation->Text = ''; @@ -30,6 +35,31 @@ class JobRunConfiguration extends Portlets { $this->Level->dataSource = $this->Application->getModule('misc')->getJobLevels(); $this->Level->dataBind(); + $this->JobToVerifyOptionsLine->Display = 'None'; + $this->JobToVerifyJobNameLine->Display = 'None'; + $this->JobToVerifyJobIdLine->Display = 'None'; + $this->AccurateLine->Display = 'Dynamic'; + $this->EstimateLine->Display = 'Dynamic'; + + $verifyValues = array(); + + foreach($this->verifyOptions as $value => $text) { + $verifyValues[$value] = Prado::localize($text); + } + + $this->JobToVerifyOptions->dataSource = $verifyValues; + $this->JobToVerifyOptions->dataBind(); + + $jobTasks = $this->Application->getModule('api')->get(array('jobs', 'tasks'))->output; + + $jobsAllDirs = array(); + foreach($jobTasks as $director => $tasks) { + $jobsAllDirs = array_merge($jobsAllDirs, $tasks); + } + + $this->JobToVerifyJobName->dataSource = array_combine($jobsAllDirs, $jobsAllDirs); + $this->JobToVerifyJobName->dataBind(); + $clients = $this->Application->getModule('api')->get(array('clients'))->output; $clientsList = array(); foreach($clients as $client) { @@ -77,6 +107,16 @@ class JobRunConfiguration extends Portlets { $params['storageid'] = $this->Storage->SelectedValue; $params['poolid'] = $this->Pool->SelectedValue; $params['priority'] = $this->Priority->Text; + + if (in_array($this->Level->SelectedItem->Value, $this->jobToVerify)) { + $verifyVals = $this->getVerifyVals(); + if ($this->JobToVerifyOptions->SelectedItem->Value == $verifyVals['jobname']) { + $params['verifyjob'] = $this->JobToVerifyJobName->SelectedValue; + } elseif ($this->JobToVerifyOptions->SelectedItem->Value == $verifyVals['jobid']) { + $params['jobid'] = $this->JobToVerifyJobId->Text; + } + } + $result = $this->Application->getModule('api')->create(array('jobs', 'run'), $params)->output; $this->Estimation->Text = implode(PHP_EOL, $result); } @@ -96,5 +136,22 @@ class JobRunConfiguration extends Portlets { $isValid = preg_match('/^[0-9]+$/', $this->Priority->Text) === 1 && $this->Priority->Text > 0; $param->setIsValid($isValid); } + + public function jobIdToVerifyValidator($sender, $param) { + $verifyVals = $this->getVerifyVals(); + if(in_array($this->Level->SelectedValue, $this->jobToVerify) && $this->JobToVerifyOptions->SelectedItem->Value == $verifyVals['jobid']) { + $isValid = preg_match('/^[0-9]+$/',$this->JobToVerifyJobId->Text) === 1 && $this->JobToVerifyJobId->Text > 0; + } else { + $isValid = true; + } + $param->setIsValid($isValid); + return $isValid; + } + + private function getVerifyVals() { + $verifyOpt = array_keys($this->verifyOptions); + $verifyVals = array_combine($verifyOpt, $verifyOpt); + return $verifyVals; + } } ?> diff --git a/gui/baculum/protected/Portlets/JobRunConfiguration.tpl b/gui/baculum/protected/Portlets/JobRunConfiguration.tpl index d83f29a540..e0500c994d 100644 --- a/gui/baculum/protected/Portlets/JobRunConfiguration.tpl +++ b/gui/baculum/protected/Portlets/JobRunConfiguration.tpl @@ -13,9 +13,73 @@
- + + + var job_to_verify = $('<%=$this->JobToVerifyOptionsLine->ClientID%>'); + var verify_options = $('<%=$this->JobToVerifyOptionsLine->ClientID%>'); + var verify_by_job_name = $('<%=$this->JobToVerifyJobNameLine->ClientID%>'); + var verify_by_jobid = $('<%=$this->JobToVerifyJobIdLine->ClientID%>'); + var accurate = $('<%=$this->AccurateLine->ClientID%>'); + var estimate = $('<%=$this->EstimateLine->ClientID%>'); + var verify_current_opt = $('<%=$this->JobToVerifyOptions->ClientID%>').value; + if(/^(<%=implode('|', $this->jobToVerify)%>)$/.test(this.value)) { + accurate.hide(); + estimate.hide(); + verify_options.show(); + job_to_verify.show(); + if (verify_current_opt == 'jobid') { + verify_by_job_name.hide(); + verify_by_jobid.show(); + } else if (verify_current_opt == 'jobname') { + verify_by_job_name.show(); + verify_by_jobid.hide(); + } + } else if (job_to_verify.visible()) { + job_to_verify.hide(); + verify_options.hide(); + verify_by_job_name.hide(); + verify_by_jobid.hide(); + accurate.show(); + estimate.show(); + } + +
+ +
+
+ + + var verify_by_job_name = $('<%=$this->JobToVerifyJobNameLine->ClientID%>'); + var verify_by_jobid = $('<%=$this->JobToVerifyJobIdLine->ClientID%>'); + if (this.value == 'jobname') { + verify_by_jobid.hide(); + verify_by_job_name.show(); + } else if (this.value == 'jobid') { + verify_by_job_name.hide(); + verify_by_jobid.show(); + } else { + verify_by_job_name.hide(); + verify_by_jobid.hide(); + } + + +
+
+ +
+
+ +
+
+ +
+
+ + +
+
@@ -64,12 +128,12 @@
-
+
-
-
+ + -
+ diff --git a/gui/baculum/themes/Baculum-v1/style.css b/gui/baculum/themes/Baculum-v1/style.css index ee37ff7425..181a3b7389 100644 --- a/gui/baculum/themes/Baculum-v1/style.css +++ b/gui/baculum/themes/Baculum-v1/style.css @@ -424,7 +424,7 @@ tr.slide-window-element:hover td, tr.slide-window-element-alternating:hover td{ table.window-section-detail, table.file-browser-detail { background-color: rgba(0,0,0,0.5); width: 100%; - font-size: 11px; + font-size: 10px; font-weight: normal; } @@ -675,7 +675,7 @@ div.job-status-W { } div.job-status-D { - background-color: blue; + background-color: #CB4A2C; } /* -- 2.39.5