From 8faea865adb1673896788a780d2472ab2e7e2cf7 Mon Sep 17 00:00:00 2001 From: Marcin Haba Date: Sun, 20 Dec 2015 10:20:05 +0100 Subject: [PATCH] baculum: Switch to started job status just after job start --- gui/baculum/protected/Class/Miscellaneous.php | 12 +++++ gui/baculum/protected/Lang/en/messages.mo | Bin 26123 -> 26201 bytes gui/baculum/protected/Lang/en/messages.po | 3 ++ gui/baculum/protected/Lang/pl/messages.mo | Bin 28196 -> 28289 bytes gui/baculum/protected/Lang/pl/messages.po | 3 ++ gui/baculum/protected/Pages/RestoreWizard.php | 7 ++- .../protected/Portlets/JobConfiguration.php | 42 ++++++++++++------ .../protected/Portlets/JobConfiguration.tpl | 3 +- gui/baculum/protected/Portlets/JobList.tpl | 4 ++ .../Portlets/JobRunConfiguration.php | 9 +++- .../Portlets/JobRunConfiguration.tpl | 17 +++++-- gui/baculum/themes/Baculum-v1/style.css | 3 ++ gui/baculum/themes/Baculum-v1/wheel.gif | Bin 0 -> 24045 bytes 13 files changed, 83 insertions(+), 20 deletions(-) create mode 100644 gui/baculum/themes/Baculum-v1/wheel.gif diff --git a/gui/baculum/protected/Class/Miscellaneous.php b/gui/baculum/protected/Class/Miscellaneous.php index 58fd5d6a50..f1e33a03be 100644 --- a/gui/baculum/protected/Class/Miscellaneous.php +++ b/gui/baculum/protected/Class/Miscellaneous.php @@ -241,5 +241,17 @@ class Miscellaneous extends TModule { } return $elements; } + + public function findJobIdStartedJob($output) { + $jobid = null; + $output = array_reverse($output); // jobid is ussually at the end of output + for ($i = 0; $i < count($output); $i++) { + if (preg_match('/^Job queued\.\sJobId=(?P\d+)$/', $output[$i], $match) === 1) { + $jobid = $match['jobid']; + break; + } + } + return $jobid; + } } ?> diff --git a/gui/baculum/protected/Lang/en/messages.mo b/gui/baculum/protected/Lang/en/messages.mo index 76f61215d83d3f375820247838f6420d33f0928d..14202632c6ef9dd69c127a1b5481ef74c382a50b 100644 GIT binary patch delta 7314 zcmajjd0bXi9>?*+CZM>oNTL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QzC5iA2sngF0$c=IHPHy|l$w z=Kon@Gfs@fe%KG6CekS9VRJjkWMd#PhPEbnHxWr$$ENZJ;{9uv&rcbe%#X}~@=pDd GqW%jG2=syg diff --git a/gui/baculum/protected/Lang/en/messages.po b/gui/baculum/protected/Lang/en/messages.po index 3d956bc290..790af8a41f 100644 --- a/gui/baculum/protected/Lang/en/messages.po +++ b/gui/baculum/protected/Lang/en/messages.po @@ -1022,3 +1022,6 @@ msgstr "Job:" msgid "Media Type" msgstr "Media Type" +msgid "Go to started job after start:" +msgstr "Go to started job after start:" + diff --git a/gui/baculum/protected/Lang/pl/messages.mo b/gui/baculum/protected/Lang/pl/messages.mo index 8b5aa0da1072998851ad540a170459f7dd5b4b32..953bc6e95a16a4efa61f341f6e1eb895e721d993 100644 GIT binary patch delta 7313 zcmZwLd7MwxAII@yjBUm`3xhGfV;O^4tb?(P-5C2)*1=#f!Z4PJaEo8lqEv?R%Tkge zq_X~ylqE}vN>U_~mWf}8Xd%DX`+JT@{`lQTpLw2h?mhRO^Ev0<8NGU@$RlTqc;AEs zE-@VaiWn1#TY`)^Ou2iwT8)`ZV|ko{WpEw_uaL$7!hk z4`C=ScCPied&cahP?i%Xu_9i;#`qVO!^G;=6!cN=g;j7eR>lPwjcZU3{17#uW2pO` zMh*OmJAVT;(A!wrqfp9cGf>ePh3XK4N_`ya0j-_GQSFa77ojq^8a0viSQ2-l`t3ut ze~-$*byqLRNlzy#QP7BEP#qiMV?~TfM$PDh8ut8Q)QmnyU3U?+me;WX{*A1XNvvs? zs0V6~3_)E#&N&4&;8`_|=b!038WL!D+_@dq@dwlZuc1;MP|F&LwW%jz5)Q>M%tx*L zTJ&cCmC1ds{V-}mU!(3@P>cLONZ~3CyKp>r?T9fkc5^*|m8d_7>i7z3AnULm?sN5D z@C5aeb&TnOUtv#-jkRl?i|RKYAH@}@x2dLA*N(IyDwWBo-P+Naj*QLBz^1qiwNxii zGdP3Vq!%#||3YO%qthN~hH6hmWwZyX-(XZfFN=aw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peR8%)by#x$Xt5i%(z`j3O3MjwRv={r9_$9mFO3 zmf4@4J+M{2yFOtS3r|?}#q$njmaL?59n~GZym=4kR|adJlKKs?n4i zyY>%o7UBIXBbUNI-HDaXTG*FJCH^3OB7P%2BnA-&h=+*H(C;yLtwmB%0BF7&9=EXiL09eH-x^(S-WTc%Aqc zp=0vmsR>D**|uW-?R*f6i3`Nf#Jxley>A~KUAYGhFA+7UFTrH&Lwrhk4e?(hn(!sA z5*>&n&OeSiLMU?-d4HE)_m=rX8tZXl6c%D3&L^6_!M;QcWgTlP U#wPlOR6Lm$UBBW;pH0dC19yr2{{R30 diff --git a/gui/baculum/protected/Lang/pl/messages.po b/gui/baculum/protected/Lang/pl/messages.po index a6dd6c206b..8292ffd2b8 100644 --- a/gui/baculum/protected/Lang/pl/messages.po +++ b/gui/baculum/protected/Lang/pl/messages.po @@ -1023,3 +1023,6 @@ msgstr "Zadanie:" msgid "Media Type" msgstr "Media Type" +msgid "Go to started job after start:" +msgstr "Przejdź do uruchomionego zadania po starcie:" + diff --git a/gui/baculum/protected/Pages/RestoreWizard.php b/gui/baculum/protected/Pages/RestoreWizard.php index 67e7ddcd44..cae5afce5f 100644 --- a/gui/baculum/protected/Pages/RestoreWizard.php +++ b/gui/baculum/protected/Pages/RestoreWizard.php @@ -426,7 +426,12 @@ class RestoreWizard extends BaculumPage $restoreProps['replace'] = $this->ReplaceFiles->SelectedValue; $ret = $this->getModule('api')->create(array('jobs', 'restore'), $restoreProps); - $this->goToDefaultPage(array('open' => 'Job')); + $jobid = $this->getModule('misc')->findJobIdStartedJob($ret->output); + $urlParams = array('open' => 'Job'); + if (is_numeric($jobid)) { + $urlParams['id'] = $jobid; + } + $this->goToDefaultPage($urlParams); } } ?> diff --git a/gui/baculum/protected/Portlets/JobConfiguration.php b/gui/baculum/protected/Portlets/JobConfiguration.php index ba3fddb6ec..1c5ffcb087 100644 --- a/gui/baculum/protected/Portlets/JobConfiguration.php +++ b/gui/baculum/protected/Portlets/JobConfiguration.php @@ -35,11 +35,17 @@ class JobConfiguration extends Portlets { public $verifyOptions = array('jobname' => 'Verify by Job Name', 'jobid' => 'Verify by JobId'); - public function configure($jobId) { + public function configure($jobId, $params = array()) { $jobdata = $this->Application->getModule('api')->get(array('jobs', $jobId))->output; $this->JobName->Text = $jobdata->job; $this->JobID->Text = $jobdata->jobid; $joblog = $this->Application->getModule('api')->get(array('joblog', $jobdata->jobid))->output; + $runningJobStates = $this->Application->getModule('misc')->getRunningJobStates(); + if (in_array($jobdata->jobstatus, $runningJobStates)) { + $this->Estimation->CssClass = 'textbox-auto wheel-loader'; + } else { + $this->Estimation->CssClass = 'textbox-auto'; + } $this->Estimation->Text = is_array($joblog) ? implode(PHP_EOL, $joblog) : Prado::localize("Output for selected job is not available yet or you do not have enabled logging job logs to catalog database. For watching job log there is need to add to the job Messages resource next directive: console = all, !skipped, !saved"); $this->Level->dataSource = $this->Application->getModule('misc')->getJobLevels(); @@ -86,11 +92,12 @@ class JobConfiguration extends Portlets { foreach($filesetsAll as $director => $filesets) { $filesetsList = array_merge($filesets, $filesetsList); } + $selectedFileset = ''; if($jobdata->filesetid != 0) { - $selectedFileset = $this->Application->getModule('api')->get(array('filesets', $jobdata->filesetid), true)->output; + $selectedFileset = $this->Application->getModule('api')->get(array('filesets', $jobdata->filesetid), true)->output->fileset; } $this->FileSet->dataSource = array_combine($filesetsList, $filesetsList); - $this->FileSet->SelectedValue = @$selectedFileset->fileset; + $this->FileSet->SelectedValue = array_key_exists('fileset', $params) ? $params['fileset'] : $selectedFileset; $this->FileSet->dataBind(); $pools = $this->Application->getModule('api')->get(array('pools'), true)->output; @@ -99,7 +106,7 @@ class JobConfiguration extends Portlets { $poolList[$pool->poolid] = $pool->name; } $this->Pool->dataSource = $poolList; - $this->Pool->SelectedValue = $jobdata->poolid; + $this->Pool->SelectedValue = array_key_exists('poolid', $params) ? $params['poolid'] : $jobdata->poolid; $this->Pool->dataBind(); $jobshow = $this->Application->getModule('api')->get(array('jobs', 'show', $jobdata->jobid), true)->output; @@ -120,24 +127,27 @@ class JobConfiguration extends Portlets { $this->Storage->dataBind(); $runningJobStates = $this->Application->getModule('misc')->getRunningJobStates(); + $isJobRunning = in_array($jobdata->jobstatus, $runningJobStates); $this->Priority->Text = ($jobdata->priorjobid == 0) ? self::DEFAULT_JOB_PRIORITY : $jobdata->priorjobid; $this->DeleteButton->Visible = true; - $this->CancelButton->Visible = $this->RefreshStart->Value = in_array($jobdata->jobstatus, $runningJobStates); + $this->CancelButton->Visible = $isJobRunning; + $this->RefreshStart->Value = $isJobRunning; $this->Run->Display = 'Dynamic'; $this->EstimateLine->Display = 'Dynamic'; $this->Status->Visible = true; } public function status($sender, $param) { - $refreshStart = false; - for ($i = 0; $i < count($_SESSION['monitor_data']['running_jobs']); $i++) { - if ($_SESSION['monitor_data']['running_jobs'][$i]->jobid == $this->JobID->Text) { - $refreshStart = true; - break; - } + $jobdata = $this->Application->getModule('api')->get(array('jobs', $this->JobID->Text))->output; + $runningJobStates = $this->Application->getModule('misc')->getRunningJobStates(); + if (in_array($jobdata->jobstatus, $runningJobStates)) { + $this->RefreshStart->Value = true; + } else { + $this->RefreshStart->Value = false; + $this->CancelButton->Visible = false; + $this->Estimation->CssClass = 'textbox-auto'; } - $this->RefreshStart->Value = $refreshStart; $joblog = $this->Application->getModule('api')->get(array('joblog', $this->JobID->Text))->output; $this->Estimation->Text = is_array($joblog) ? implode(PHP_EOL, $joblog) : Prado::localize("Output for selected job is not available yet or you do not have enabled logging job logs to catalog database. For watching job log there is need to add to the job Messages resource next directive: console = all, !skipped, !saved"); @@ -149,12 +159,14 @@ class JobConfiguration extends Portlets { $this->Run->Display = 'None'; $this->DeleteButton->Visible = false; $this->EstimateLine->Display = 'None'; + $this->Estimation->CssClass = 'textbox-auto'; } public function cancel($sender, $param) { $this->Application->getModule('api')->set(array('jobs', 'cancel', $this->JobID->Text), array('a' => 'b')); $this->CancelButton->Visible = false; $this->status(null, null); + $this->Estimation->CssClass = 'textbox-auto'; } public function run_again($sender, $param) { @@ -193,7 +205,11 @@ class JobConfiguration extends Portlets { } } $result = $this->Application->getModule('api')->create(array('jobs', 'run'), $params)->output; - if (!is_null($sender) || !is_numeric($param)) { + $startedJobId = $this->Application->getModule('misc')->findJobIdStartedJob($result); + if (is_numeric($startedJobId)) { + $params['jobid'] = $startedJobId; + $this->configure($startedJobId, $params); + } else { $this->Estimation->Text = implode(PHP_EOL, $result); } } diff --git a/gui/baculum/protected/Portlets/JobConfiguration.tpl b/gui/baculum/protected/Portlets/JobConfiguration.tpl index cdf4fa841e..5afc5dc7c4 100644 --- a/gui/baculum/protected/Portlets/JobConfiguration.tpl +++ b/gui/baculum/protected/Portlets/JobConfiguration.tpl @@ -174,9 +174,10 @@ + ConfigurationWindow.getObj('JobWindow').switchTab('job_console_tab'); ConfigurationWindow.getObj('JobWindow').progress(false); - job_callback_func(); oMonitor(); + job_callback_func(); diff --git a/gui/baculum/protected/Portlets/JobList.tpl b/gui/baculum/protected/Portlets/JobList.tpl index 66956b43d4..e79d97f9ff 100644 --- a/gui/baculum/protected/Portlets/JobList.tpl +++ b/gui/baculum/protected/Portlets/JobList.tpl @@ -78,6 +78,7 @@ + ConfigurationWindow.getObj('JobWindow').progress(true); var img_btn = $('run_job_again_btn'); var img_src_path = img_btn.readAttribute('src').replace(/[^\/]+\S$/, ''); img_btn.writeAttribute('disabled', 'disabled'); @@ -88,6 +89,9 @@ var img_src_path = img_btn.readAttribute('src').replace(/[^\/]+\S$/, ''); img_btn.writeAttribute('src', img_src_path + 'play.png'); img_btn.removeAttribute('disabled'); + ConfigurationWindow.getObj('JobWindow').progress(false); + ConfigurationWindow.getObj('JobWindow').show(); + ConfigurationWindow.getObj('JobWindow').switchTabByNo(2); status_callback_func(); oMonitor(); diff --git a/gui/baculum/protected/Portlets/JobRunConfiguration.php b/gui/baculum/protected/Portlets/JobRunConfiguration.php index f56e3eef4c..cef6b799d4 100644 --- a/gui/baculum/protected/Portlets/JobRunConfiguration.php +++ b/gui/baculum/protected/Portlets/JobRunConfiguration.php @@ -152,7 +152,14 @@ class JobRunConfiguration extends Portlets { } $result = $this->Application->getModule('api')->create(array('jobs', 'run'), $params)->output; - $this->Estimation->Text = implode(PHP_EOL, $result); + + $startedJobId = $this->Application->getModule('misc')->findJobIdStartedJob($result); + if ($this->GoToStartedJob->Checked === true && is_numeric($startedJobId)) { + $params['jobid'] = $startedJobId; + $this->getPage()->JobConfiguration->configure($startedJobId, $params); + } else { + $this->Estimation->Text = implode(PHP_EOL, $result); + } } public function estimate($sender, $param) { diff --git a/gui/baculum/protected/Portlets/JobRunConfiguration.tpl b/gui/baculum/protected/Portlets/JobRunConfiguration.tpl index 01c86e3e41..c3d03305f3 100644 --- a/gui/baculum/protected/Portlets/JobRunConfiguration.tpl +++ b/gui/baculum/protected/Portlets/JobRunConfiguration.tpl @@ -118,7 +118,11 @@
- +
+
+
+
+