]> git.sur5r.net Git - bacula/bacula/commitdiff
baculum: Split configuration windows into two tabs: actions and console
authorMarcin Haba <marcin.haba@bacula.pl>
Sat, 28 Nov 2015 10:16:37 +0000 (11:16 +0100)
committerMarcin Haba <marcin.haba@bacula.pl>
Sat, 28 Nov 2015 10:16:37 +0000 (11:16 +0100)
12 files changed:
gui/baculum/protected/JavaScript/configuration-window.js
gui/baculum/protected/Lang/en/messages.mo
gui/baculum/protected/Lang/en/messages.po
gui/baculum/protected/Lang/pl/messages.mo
gui/baculum/protected/Lang/pl/messages.po
gui/baculum/protected/Portlets/ClientConfiguration.tpl
gui/baculum/protected/Portlets/JobConfiguration.php
gui/baculum/protected/Portlets/JobConfiguration.tpl
gui/baculum/protected/Portlets/JobRunConfiguration.tpl
gui/baculum/protected/Portlets/StorageConfiguration.php
gui/baculum/protected/Portlets/StorageConfiguration.tpl
gui/baculum/themes/Baculum-v1/style.css

index dbbe28268d9afdd4bcb1d2e2f30516b38db2007f..cd4ff3fb3a6b76d2d9f9a03fdf8a984e388632fc 100644 (file)
@@ -13,6 +13,7 @@ var ConfigurationWindowClass = new Class.create({
 
        show: function() {
                this.hideAll();
+               this.initTabs();
                $(this.window_id).setStyle({'display' : 'block'});
                $$('div[id=' + this.window_id + '] input[type="submit"]').each(function(el) {
                        el.observe('click', function() {
@@ -60,6 +61,38 @@ var ConfigurationWindowClass = new Class.create({
        is_progress: function() {
                return $(this.progress_id).getStyle('display') == 'block';
        },
+
+       initTabs: function() {
+               var show_elements = [];
+               var element;
+               var tabs = $$('div[id=' + this.window_id + '] span.tab');
+               tabs.each(function(el) {
+                       element = el.readAttribute('rel');
+                       show_elements.push($(element));
+                       el.observe('click', function() {
+                               show_elements.invoke('hide');
+                               tabs.invoke('removeClassName', 'tab_active');
+                               el.addClassName('tab_active');
+                               var show_el = $(el.readAttribute('rel'));
+                               $(show_el).show();
+                       }.bind(this));
+               }.bind(this));
+       },
+
+       switchTab: function(tab_rel) {
+               var tabs = $$('div[id=' + this.window_id + '] span.tab');
+               tabs.each(function(el) {
+                       element = el.readAttribute('rel');
+                       if (element == tab_rel) {
+                               el.addClassName('tab_active');
+                       } else {
+                               el.removeClassName('tab_active');
+                       }
+                       $(element).hide();
+               });
+               $(tab_rel).show();
+       },
+
        openConfigurationWindow: function(slideWindowObj) {
                if(this.is_progress() === false) {
                        this.progress(true);
index e7d19e89dd9b755eeb018492331dd8e14380b00c..52ab131e484da7f1ced9af2f0e6186a22c76b707 100644 (file)
Binary files a/gui/baculum/protected/Lang/en/messages.mo and b/gui/baculum/protected/Lang/en/messages.mo differ
index 84dd8cb8761a6c71873dab5fedbde64b08523055..4d5d1c4e28fb06cd0bfefc2975d338327c81d756 100644 (file)
@@ -1013,3 +1013,6 @@ msgstr "Finished jobs:"
 msgid "Add"
 msgstr "Add"
 
+msgid "Actions"
+msgstr "Actions"
+
index d6f894677936e7eccbcc62883a072e9221d858af..b83bca1bed863d26169db876c4c921e36f887eea 100644 (file)
Binary files a/gui/baculum/protected/Lang/pl/messages.mo and b/gui/baculum/protected/Lang/pl/messages.mo differ
index 761e21bf98d4ee40f9d5b1d2fbed5f98bef844d6..13a8987db320ffca048b4b9ba8c0866010423208 100644 (file)
@@ -1014,3 +1014,6 @@ msgstr "Zakończone zadania:"
 msgid "Add"
 msgstr "Dodaj"
 
+msgid "Actions"
+msgstr "Akcje"
+
index 0660892bd4cfb291f256c9a09be153351ef8eda4..6bf974ea4aeb9b6bc541ecef761f3db128147a89 100644 (file)
@@ -1,53 +1,66 @@
 <%@ MasterClass="Application.Portlets.ConfigurationPanel"%>
 <com:TContent ID="ConfigurationWindowContent">
        <com:TActivePanel DefaultButton="Apply">
-               <strong><%[ Client name: ]%> <com:TActiveLabel ID="ClientName" /><com:TActiveLabel ID="ClientIdentifier" Visible="false" /></strong><br />
-               <com:TActiveLabel ID="ClientDescription" Style="font-style: italic; font-size: 12px"/>
-               <hr />
-               <com:TValidationSummary
-                       ID="ValidationSummary"
-                       CssClass="validation-error-summary"
-                       ValidationGroup="ClientGroup"
-                       AutoUpdate="true"
-                       Display="Dynamic"
-                       HeaderText="<%[ There is not possible to run selected action because: ]%>" />
-               <div class="text small"><%[ Console status ]%></div>
-               <div class="field-full" style="min-height: 172px">
-                       <com:TActiveTextBox ID="ShowClient" TextMode="MultiLine" CssClass="textbox-auto" Style="height: 162px; font-size: 11px;" ReadOnly="true" />
-               </div>
-               <div class="button">
-                       <com:BActiveButton ID="Status" Text="<%[ Status ]%>" ClientSide.OnSuccess="ConfigurationWindow.getObj('ClientWindow').progress(false);" OnClick="status" />
-               </div>
-               <div class="line">
-                       <div class="text"><com:TLabel ForControl="FileRetention" Text="<%[ File retention (in days): ]%>" /></div>
-                       <div class="field">
-                               <com:TActiveTextBox ID="FileRetention" MaxLength="14" AutoPostBack="false" CssClass="textbox-auto" Text="" />
-                               <com:TActiveCustomValidator ID="FileRetentionValidator" ValidationGroup="ClientGroup" ControlToValidate="FileRetention" ErrorMessage="<%[ File retention value must be positive integer or zero. ]%>" ControlCssClass="validation-error" Display="None" OnServerValidate="fileRetentionValidator" />
+               <h4><%[ Client name: ]%> <com:TActiveLabel ID="ClientName" /><com:TActiveLabel ID="ClientIdentifier" Visible="false" /></h4>
+               <com:TActiveLabel ID="ClientDescription" CssClass="description" />
+               <span class="text tab tab_active" rel="client_actions_tab"><%[ Actions ]%></span>
+               <span class="text tab" rel="client_console_tab"><%[ Console status ]%></span>
+               <hr class="tabs" />
+               <div id="client_actions_tab">
+                       <com:TValidationSummary
+                               ID="ValidationSummary"
+                               CssClass="validation-error-summary"
+                               ValidationGroup="ClientGroup"
+                               AutoUpdate="true"
+                               Display="Dynamic"
+                               HeaderText="<%[ There is not possible to run selected action because: ]%>" />
+                       <div class="line">
+                               <div class="text"><com:TLabel ForControl="FileRetention" Text="<%[ File retention (in days): ]%>" /></div>
+                               <div class="field">
+                                       <com:TActiveTextBox ID="FileRetention" MaxLength="14" AutoPostBack="false" CssClass="textbox-auto" Text="" />
+                                       <com:TActiveCustomValidator ID="FileRetentionValidator" ValidationGroup="ClientGroup" ControlToValidate="FileRetention" ErrorMessage="<%[ File retention value must be positive integer or zero. ]%>" ControlCssClass="validation-error" Display="None" OnServerValidate="fileRetentionValidator" />
+                               </div>
                        </div>
-               </div>
-               <div class="line">
-                       <div class="text"><com:TLabel ForControl="JobRetention" Text="<%[ Job retention (in days): ]%>" /></div>
-                       <div class="field">
-                               <com:TActiveTextBox ID="JobRetention" MaxLength="14" AutoPostBack="false" CssClass="textbox-auto" Text="" />
-                               <com:TActiveCustomValidator ID="JobRetentionValidator" ValidationGroup="ClientGroup" ControlToValidate="JobRetention" ErrorMessage="<%[ Job retention value must be positive integer or zero. ]%>" ControlCssClass="validation-error" Display="None" OnServerValidate="jobRetentionValidator" />
+                       <div class="line">
+                               <div class="text"><com:TLabel ForControl="JobRetention" Text="<%[ Job retention (in days): ]%>" /></div>
+                               <div class="field">
+                                       <com:TActiveTextBox ID="JobRetention" MaxLength="14" AutoPostBack="false" CssClass="textbox-auto" Text="" />
+                                       <com:TActiveCustomValidator ID="JobRetentionValidator" ValidationGroup="ClientGroup" ControlToValidate="JobRetention" ErrorMessage="<%[ Job retention value must be positive integer or zero. ]%>" ControlCssClass="validation-error" Display="None" OnServerValidate="jobRetentionValidator" />
+                               </div>
                        </div>
-               </div>
-               <div class="line">
-                       <div class="text"><com:TLabel ForControl="AutoPrune" Text="<%[ AutoPrune: ]%>" /></div>
-                       <div class="field"><com:TActiveCheckBox ID="AutoPrune" AutoPostBack="false" /></div>
-               </div>
-               <com:TCallback ID="ReloadClients" OnCallback="Page.ClientWindow.prepareData" ClientSide.OnComplete="SlideWindow.getObj('ClientWindow').setLoadRequest();" />
-               <script type="text/javascript">
-                       var client_callback_func = function() {
-                               var mainForm = Prado.Validation.getForm();
-                               var callback = <%=$this->ReloadClients->ActiveControl->Javascript%>;
-                               if (Prado.Validation.managers[mainForm].getValidatorsWithError('ClientGroup').length == 0) {
-                                       callback.dispatch();
+                       <div class="line">
+                               <div class="text"><com:TLabel ForControl="AutoPrune" Text="<%[ AutoPrune: ]%>" /></div>
+                               <div class="field"><com:TActiveCheckBox ID="AutoPrune" AutoPostBack="false" /></div>
+                       </div>
+                       <com:TCallback ID="ReloadClients" OnCallback="Page.ClientWindow.prepareData" ClientSide.OnComplete="SlideWindow.getObj('ClientWindow').setLoadRequest();" />
+                       <script type="text/javascript">
+                               var client_callback_func = function() {
+                                       var mainForm = Prado.Validation.getForm();
+                                       var callback = <%=$this->ReloadClients->ActiveControl->Javascript%>;
+                                       if (Prado.Validation.managers[mainForm].getValidatorsWithError('ClientGroup').length == 0) {
+                                               callback.dispatch();
+                                       }
                                }
-                       }
-               </script>
-               <div class="button">
-                       <com:BActiveButton ValidationGroup="ClientGroup" OnClick="apply" CausesValidation="true" ID="Apply" Text="<%[ Apply ]%>" ClientSide.OnSuccess="ConfigurationWindow.getObj('ClientWindow').progress(false);client_callback_func();" />
+                       </script>
+                       <div class="button">
+                               <com:BActiveButton ID="Status" Text="<%[ Status ]%>" OnClick="status">
+                                       <prop:ClientSide.OnSuccess>
+                                               ConfigurationWindow.getObj('ClientWindow').progress(false);
+                                               ConfigurationWindow.getObj('ClientWindow').switchTab('client_console_tab');
+                                       </prop:ClientSide.OnSuccess>
+                               </com:BActiveButton>
+                               <com:BActiveButton ValidationGroup="ClientGroup" OnClick="apply" CausesValidation="true" ID="Apply" Text="<%[ Apply ]%>">
+                                       <prop:ClientSide.OnSuccess>
+                                               ConfigurationWindow.getObj('ClientWindow').progress(false);
+                                               client_callback_func();
+                                       </prop:ClientSide.OnSuccess>
+                               </com:BActiveButton>
+                       </div>
+               </div>
+               <div id="client_console_tab" style="display: none">
+                       <div class="field-full">
+                               <com:TActiveTextBox ID="ShowClient" TextMode="MultiLine" CssClass="textbox-auto" Style="height: 475px" ReadOnly="true" />
+                       </div>
                </div>
        </com:TActivePanel>
 </com:TContent>
index 061db243131837fd812ddb9b2f27ca7027e05dac..0be1ad5c71cee34d59cfff2ee3111b1d8fa06db2 100644 (file)
@@ -113,6 +113,9 @@ class JobConfiguration extends Portlets {
                $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->Run->Display = 'Dynamic';
+               $this->EstimateLine->Display = 'Dynamic';
+               $this->Status->Visible = true;
        }
 
        public function status($sender, $param) {
@@ -131,12 +134,16 @@ class JobConfiguration extends Portlets {
 
        public function delete($sender, $param) {
                $this->Application->getModule('api')->remove(array('jobs', $this->JobID->Text));
+               $this->Status->Visible = false;
+               $this->Run->Display = 'None';
                $this->DeleteButton->Visible = false;
+               $this->EstimateLine->Display = 'None';
        }
 
        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);
        }
 
        public function run_again($sender, $param) {
index 2d0d73df8fe6bc59ab239b7911e517eeb96da80b..71e78dbe57f3efb41656099c7c4ab6ccf3a7a766 100644 (file)
 <%@ MasterClass="Application.Portlets.ConfigurationPanel"%>
 <com:TContent ID="ConfigurationWindowContent">
        <com:TActivePanel DefaultButton="Run">
-               <strong><%[ Job name: ]%> <com:TActiveLabel ID="JobName" /><com:TActiveLabel ID="JobID" Visible="false" /></strong>
-               <hr />
-               <com:TValidationSummary
-                       ID="ValidationSummary"
-                       CssClass="validation-error-summary"
-                       ValidationGroup="JobGroup"
-                       AutoUpdate="true"
-                       Display="Dynamic"
-                       />
-               <div class="line">
-                       <div class="text"><com:TLabel ForControl="Level" Text="<%[ Level: ]%>" /></div>
-                       <div class="field">
-                               <com:TActiveDropDownList ID="Level" AutoPostBack="false" CssClass="textbox-auto">
-                                       <prop:Attributes.onchange>
-                                               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') {
+               <h4><%[ Job name: ]%> <com:TActiveLabel ID="JobName" /><com:TActiveLabel ID="JobID" Visible="false" /></h4>
+               <span class="text tab tab_active" rel="job_actions_tab"><%[ Actions ]%></span>
+               <span class="text tab" rel="job_console_tab"><%[ Console status ]%></span>
+               <hr class="tabs" />
+               <div id="job_actions_tab">
+                       <com:TValidationSummary
+                               ID="ValidationSummary"
+                               CssClass="validation-error-summary"
+                               ValidationGroup="JobGroup"
+                               AutoUpdate="true"
+                               Display="Dynamic"
+                               />
+                       <div class="line">
+                               <div class="text"><com:TLabel ForControl="Level" Text="<%[ Level: ]%>" /></div>
+                               <div class="field">
+                                       <com:TActiveDropDownList ID="Level" AutoPostBack="false" CssClass="textbox-auto">
+                                               <prop:Attributes.onchange>
+                                                       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.show();
-                                                       } else if (verify_current_opt == 'jobname') {
-                                                               verify_by_job_name.show();
                                                                verify_by_jobid.hide();
+                                                               accurate.show();
+                                                               estimate.show();
                                                        }
-                                               } 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();
-                                               }
-                                       </prop:Attributes.onchange>
-                               </com:TActiveDropDownList>
-                       </div>
-               </div>
-               <com:TActivePanel ID="JobToVerifyOptionsLine" CssClass="line">
-                       <div class="text"><com:TLabel ForControl="JobToVerifyOptions" Text="<%[ Verify option: ]%>" /></div>
-                       <div class="field">
-                               <com:TActiveDropDownList ID="JobToVerifyOptions" AutoPostBack="false" CssClass="textbox-auto">
-                                       <prop:Attributes.onchange>
-                                               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();
-                                               }
-                                       </prop:Attributes.onchange>
-                               </com:TActiveDropDownList>
+                                               </prop:Attributes.onchange>
+                                       </com:TActiveDropDownList>
+                               </div>
                        </div>
-               </com:TActivePanel>
-               <com:TActivePanel ID="JobToVerifyJobNameLine" CssClass="line">
-                       <div class="text"><com:TLabel ForControl="JobToVerifyJobName" Text="<%[ Job to Verify: ]%>" /></div>
-                       <div class="field">
-                               <com:TActiveDropDownList ID="JobToVerifyJobName" AutoPostBack="false" CssClass="textbox-auto" />
-                       </div>
-               </com:TActivePanel>
-               <com:TActivePanel ID="JobToVerifyJobIdLine" CssClass="line">
-                       <div class="text"><com:TLabel ForControl="JobToVerifyJobId" Text="<%[ JobId to Verify: ]%>" /></div>
-                       <div class="field">
-                               <com:TActiveTextBox ID="JobToVerifyJobId" CssClass="textbox-auto" AutoPostBack="false" />
-                               <com:TActiveCustomValidator ID="JobToVerifyJobIdValidator" ValidationGroup="JobGroup" ControlToValidate="JobToVerifyJobId" ErrorMessage="<%[ JobId to Verify value must be integer greather than 0. ]%>" ControlCssClass="validation-error" Display="None" OnServerValidate="jobIdToVerifyValidator" />
+                       <com:TActivePanel ID="JobToVerifyOptionsLine" CssClass="line">
+                               <div class="text"><com:TLabel ForControl="JobToVerifyOptions" Text="<%[ Verify option: ]%>" /></div>
+                               <div class="field">
+                                       <com:TActiveDropDownList ID="JobToVerifyOptions" AutoPostBack="false" CssClass="textbox-auto">
+                                               <prop:Attributes.onchange>
+                                                       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();
+                                                       }
+                                               </prop:Attributes.onchange>
+                                       </com:TActiveDropDownList>
+                               </div>
+                       </com:TActivePanel>
+                       <com:TActivePanel ID="JobToVerifyJobNameLine" CssClass="line">
+                               <div class="text"><com:TLabel ForControl="JobToVerifyJobName" Text="<%[ Job to Verify: ]%>" /></div>
+                               <div class="field">
+                                       <com:TActiveDropDownList ID="JobToVerifyJobName" AutoPostBack="false" CssClass="textbox-auto" />
+                               </div>
+                       </com:TActivePanel>
+                       <com:TActivePanel ID="JobToVerifyJobIdLine" CssClass="line">
+                               <div class="text"><com:TLabel ForControl="JobToVerifyJobId" Text="<%[ JobId to Verify: ]%>" /></div>
+                               <div class="field">
+                                       <com:TActiveTextBox ID="JobToVerifyJobId" CssClass="textbox-auto" AutoPostBack="false" />
+                                       <com:TActiveCustomValidator ID="JobToVerifyJobIdValidator" ValidationGroup="JobGroup" ControlToValidate="JobToVerifyJobId" ErrorMessage="<%[ JobId to Verify value must be integer greather than 0. ]%>" ControlCssClass="validation-error" Display="None" OnServerValidate="jobIdToVerifyValidator" />
+                               </div>
+                       </com:TActivePanel>
+                       <div class="line">
+                               <div class="text"><com:TLabel ForControl="Client" Text="<%[ Client: ]%>" /></div>
+                               <div class="field">
+                                       <com:TActiveDropDownList ID="Client" AutoPostBack="false" CssClass="textbox-auto" />
+                               </div>
                        </div>
-               </com:TActivePanel>
-               <div class="line">
-                       <div class="text"><com:TLabel ForControl="Client" Text="<%[ Client: ]%>" /></div>
-                       <div class="field">
-                               <com:TActiveDropDownList ID="Client" AutoPostBack="false" CssClass="textbox-auto" />
+                       <div class="line">
+                               <div class="text"><com:TLabel ForControl="FileSet" Text="<%[ FileSet: ]%>" /></div>
+                               <div class="field">
+                                       <com:TActiveDropDownList ID="FileSet" AutoPostBack="false" CssClass="textbox-auto" />
+                               </div>
                        </div>
-               </div>
-               <div class="line">
-                       <div class="text"><com:TLabel ForControl="FileSet" Text="<%[ FileSet: ]%>" /></div>
-                       <div class="field">
-                               <com:TActiveDropDownList ID="FileSet" AutoPostBack="false" CssClass="textbox-auto" />
+                       <div class="line">
+                               <div class="text"><com:TLabel ForControl="Pool" Text="<%[ Pool: ]%>" /></div>
+                               <div class="field">
+                                       <com:TActiveDropDownList ID="Pool" AutoPostBack="false" CssClass="textbox-auto" />
+                               </div>
                        </div>
-               </div>
-               <div class="line">
-                       <div class="text"><com:TLabel ForControl="Pool" Text="<%[ Pool: ]%>" /></div>
-                       <div class="field">
-                               <com:TActiveDropDownList ID="Pool" AutoPostBack="false" CssClass="textbox-auto" />
+                       <div class="line">
+                               <div class="text"><com:TLabel ForControl="Storage" Text="<%[ Storage: ]%>" /></div>
+                               <div class="field">
+                                       <com:TActiveDropDownList ID="Storage" AutoPostBack="false" CssClass="textbox-auto" />
+                               </div>
                        </div>
-               </div>
-               <div class="line">
-                       <div class="text"><com:TLabel ForControl="Storage" Text="<%[ Storage: ]%>" /></div>
-                       <div class="field">
-                               <com:TActiveDropDownList ID="Storage" AutoPostBack="false" CssClass="textbox-auto" />
+                       <div class="line">
+                               <div class="text"><com:TLabel ForControl="Priority" Text="<%[ Priority: ]%>" /></div>
+                               <div class="field">
+                                       <com:TActiveTextBox ID="Priority" CssClass="textbox-auto" AutoPostBack="false" />
+                                       <com:TActiveCustomValidator ID="PriorityValidator" ValidationGroup="JobGroup" ControlToValidate="Priority" ErrorMessage="<%[ Priority value must be integer greather than 0. ]%>" ControlCssClass="validation-error" Display="None" OnServerValidate="priorityValidator" />
+                               </div>
                        </div>
-               </div>
-               <div class="line">
-                       <div class="text"><com:TLabel ForControl="Priority" Text="<%[ Priority: ]%>" /></div>
-                       <div class="field">
-                               <com:TActiveTextBox ID="Priority" CssClass="textbox-auto" AutoPostBack="false" />
-                               <com:TActiveCustomValidator ID="PriorityValidator" ValidationGroup="JobGroup" ControlToValidate="Priority" ErrorMessage="<%[ Priority value must be integer greather than 0. ]%>" ControlCssClass="validation-error" Display="None" OnServerValidate="priorityValidator" />
+                       <com:TActivePanel ID="AccurateLine" CssClass="line">
+                               <div class="text"><com:TLabel ForControl="Accurate" Text="<%[ Accurate: ]%>" /></div>
+                               <div class="field"><com:TActiveCheckBox ID="Accurate" AutoPostBack="false" /></div>
+                       </com:TActivePanel>
+                       <com:TCallback ID="ReloadJobs" OnCallback="Page.JobWindow.prepareData" ClientSide.OnComplete="SlideWindow.getObj('JobWindow').setLoadRequest(); job_callback_duration = new Date().getTime();" />
+                       <script type="text/javascript">
+                               var job_callback_duration;
+                               var job_callback_func = function() {
+                                       /*
+                                        * Check if Job list window is open and if any checkbox from actions is not checked.
+                                        * If yes, then is possible to refresh Job list window.
+                                        */
+                                       if(SlideWindow.getObj('JobWindow').isWindowOpen() === true && SlideWindow.getObj('JobWindow').areActionsOpen() === false) {
+                                               var mainForm = Prado.Validation.getForm();
+                                               var callback = <%=$this->ReloadJobs->ActiveControl->Javascript%>;
+                                               if (Prado.Validation.managers[mainForm].getValidatorsWithError('JobGroup').length == 0) {
+                                                       SlideWindow.getObj('JobWindow').markAllChecked(false);
+                                                       callback.dispatch();
+                                               }
+                                       }
+                               }
+                       </script>
+                       <div class="button">
+                               <com:BActiveButton ID="Status" Text="<%[ Job status ]%>" CausesValidation="false" OnClick="status" CssClass="bbutton">
+                                       <prop:ClientSide.OnSuccess>
+                                               ConfigurationWindow.getObj('JobWindow').progress(false);
+                                               job_callback_func();
+                                               ConfigurationWindow.getObj('JobWindow').switchTab('job_console_tab');
+                                       </prop:ClientSide.OnSuccess>
+                               </com:BActiveButton>
+                               <com:TActiveLabel ID="DeleteButton">
+                                       <com:BActiveButton ID="Delete" Text="<%[ Delete job ]%>" CausesValidation="false" OnClick="delete" CssClass="bbutton">
+                                               <prop:ClientSide.OnSuccess>
+                                                       ConfigurationWindow.getObj('JobWindow').progress(false);
+                                                       job_callback_func();
+                                               </prop:ClientSide.OnSuccess>
+                                       </com:BActiveButton>
+                               </com:TActiveLabel>
+                               <com:TActiveLabel ID="CancelButton">
+                                       <com:BActiveButton ID="Cancel" Text="<%[ Cancel job ]%>" CausesValidation="false" OnClick="cancel" CssClass="bbutton">
+                                               <prop:ClientSide.OnSuccess>
+                                                       ConfigurationWindow.getObj('JobWindow').progress(false);
+                                                       job_callback_func();
+                                                       ConfigurationWindow.getObj('JobWindow').switchTab('job_console_tab');
+                                               </prop:ClientSide.OnSuccess>
+                                       </com:BActiveButton>
+                               </com:TActiveLabel>
+                               <com:TActivePanel ID="EstimateLine" CssClass="button_line">
+                                       <com:BActiveButton ID="Estimate" Text="<%[ Estimate job ]%>" OnClick="estimate" CssClass="bbutton">
+                                               <prop:ClientSide.OnSuccess>
+                                                       ConfigurationWindow.getObj('JobWindow').progress(false);
+                                                       ConfigurationWindow.getObj('JobWindow').switchTab('job_console_tab');
+                                               </prop:ClientSide.OnSuccess>
+                                       </com:BActiveButton>
+                               </com:TActivePanel>
+                               <com:BActiveButton ID="Run" Text="<%[ Run job again ]%>" ValidationGroup="JobGroup" CausesValidation="true" OnClick="run_again">
+                                       <prop:ClientSide.OnSuccess>
+                                               ConfigurationWindow.getObj('JobWindow').progress(false);
+                                               job_callback_func();
+                                               oMonitor();
+                                       </prop:ClientSide.OnSuccess>
+                               </com:BActiveButton>
                        </div>
                </div>
-               <com:TCallback ID="ReloadJobs" OnCallback="Page.JobWindow.prepareData" ClientSide.OnComplete="SlideWindow.getObj('JobWindow').setLoadRequest(); job_callback_duration = new Date().getTime();" />
-               <script type="text/javascript">
-                       var job_callback_duration;
-                       var job_callback_func = function() {
-                               /*
-                                * Check if Job list window is open and if any checkbox from actions is not checked.
-                                * If yes, then is possible to refresh Job list window.
-                                */
-                               if(SlideWindow.getObj('JobWindow').isWindowOpen() === true && SlideWindow.getObj('JobWindow').areActionsOpen() === false) {
-                                       var mainForm = Prado.Validation.getForm();
-                                       var callback = <%=$this->ReloadJobs->ActiveControl->Javascript%>;
-                                       if (Prado.Validation.managers[mainForm].getValidatorsWithError('JobGroup').length == 0) {
-                                               SlideWindow.getObj('JobWindow').markAllChecked(false);
+               <div id="job_console_tab" style="display: none"> 
+                       <com:TCallback ID="RefreshStatus" OnCallback="status" ClientSide.OnComplete="job_callback_duration = new Date().getTime();" />
+                       <script type="text/javascript">
+                               var status_prev = false;
+                               var status_callback_func = function() {
+                                       if($('<%=$this->getID()%>configuration').visible() && ($('<%=$this->RefreshStart->ClientID%>').value === 'true' || status_prev === true)) {
+                                               status_prev = ($('<%=$this->RefreshStart->ClientID%>').value === 'true');
+                                               var callback = <%=$this->RefreshStatus->ActiveControl->Javascript%>;
                                                callback.dispatch();
+                                       } else {
+                                               status_prev = false;
                                        }
                                }
-                       }
-               </script>
-               <div class="button">
-                       <com:BActiveButton ID="Status" Text="<%[ Job status ]%>" CausesValidation="false" OnClick="status" ClientSide.OnSuccess="ConfigurationWindow.getObj('JobWindow').progress(false);job_callback_func();" CssClass="bbutton" />
-                       <com:TActiveLabel ID="DeleteButton"><com:BActiveButton ID="Delete" Text="<%[ Delete job ]%>" CausesValidation="false" OnClick="delete" ClientSide.OnSuccess="ConfigurationWindow.getObj('JobWindow').progress(false);job_callback_func();" CssClass="bbutton" /> </com:TActiveLabel>
-                       <com:TActiveLabel ID="CancelButton"><com:BActiveButton ID="Cancel" Text="<%[ Cancel job ]%>" CausesValidation="false" OnClick="cancel" ClientSide.OnSuccess="ConfigurationWindow.getObj('JobWindow').progress(false);job_callback_func();" CssClass="bbutton" /> </com:TActiveLabel>
-                       <com:BActiveButton ID="Run" Text="<%[ Run job again ]%>" ValidationGroup="JobGroup" CausesValidation="true" OnClick="run_again" ClientSide.OnSuccess="ConfigurationWindow.getObj('JobWindow').progress(false);job_callback_func();oMonitor();"/>
-               </div>
-               <com:TCallback ID="RefreshStatus" OnCallback="status" ClientSide.OnComplete="job_callback_duration = new Date().getTime();" />
-               <script type="text/javascript">
-                       var status_prev = false;
-                       var status_callback_func = function() {
-                               if($('<%=$this->getID()%>configuration').visible() && ($('<%=$this->RefreshStart->ClientID%>').value === 'true' || status_prev === true)) {
-                                       status_prev = ($('<%=$this->RefreshStart->ClientID%>').value === 'true');
-                                       var callback = <%=$this->RefreshStatus->ActiveControl->Javascript%>;
-                                       callback.dispatch();
-                               } else {
-                                       status_prev = false;
-                               }
-                       }
-               </script>
-               <com:TActiveHiddenField ID="RefreshStart" />
-               <div class="text small"><%[ Console status ]%></div>
-               <div class="field-full" style="min-height: 166px">
-                       <com:TActiveTextBox ID="Estimation" TextMode="MultiLine" CssClass="textbox-auto" Style="height: 145px" ReadOnly="true" />
+                       </script>
+                       <com:TActiveHiddenField ID="RefreshStart" />
+                       <div class="field-full" style="min-height: 166px;">
+                               <com:TActiveTextBox ID="Estimation" TextMode="MultiLine" CssClass="textbox-auto" Style="height: 475px" ReadOnly="true" />
+                       </div>
                </div>
-               <com:TActivePanel ID="AccurateLine" CssClass="line">
-                       <div class="text"><com:TLabel ForControl="Accurate" Text="<%[ Accurate: ]%>" /></div>
-                       <div class="field"><com:TActiveCheckBox ID="Accurate" AutoPostBack="false" /></div>
-               </com:TActivePanel>
-               <com:TActivePanel ID="EstimateLine" CssClass="button">
-                       <com:BActiveButton ID="Estimate" Text="<%[ Estimate job ]%>" OnClick="estimate" ClientSide.OnSuccess="ConfigurationWindow.getObj('JobWindow').progress(false);job_callback_func();" />
-               </com:TActivePanel>
        </com:TActivePanel>
 </com:TContent>
index 44e948a155d3cd382eca5d9b00933ea393b885a7..1fecd5e396a9d058796384217084619c63726ea5 100644 (file)
 <%@ MasterClass="Application.Portlets.ConfigurationPanel"%>
 <com:TContent ID="ConfigurationWindowContent">
        <com:TActivePanel DefaultButton="Run">
-               <strong><%[ Job name: ]%> <com:TActiveLabel ID="JobName" /><com:TActiveLabel ID="JobID" Visible="false" /></strong>
-               <hr />
-               <com:TValidationSummary
-                       ID="ValidationSummary"
-                       CssClass="validation-error-summary"
-                       ValidationGroup="JobRunGroup"
-                       AutoUpdate="true"
-                       Display="Dynamic"
-                       HeaderText="<%[ There is not possible to run selected action because: ]%>" />
-               <div class="line">
-                       <div class="text"><com:TLabel ForControl="Level" Text="<%[ Level: ]%>" /></div>
-                       <div class="field">
-                               <com:TActiveDropDownList ID="Level" AutoPostBack="false" CssClass="textbox-auto">
-                                       <prop:Attributes.onchange>
-                                               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') {
+               <h4><%[ Job name: ]%> <com:TActiveLabel ID="JobName" /><com:TActiveLabel ID="JobID" Visible="false" /></h4>
+               <span class="text tab tab_active" rel="jobrun_actions_tab"><%[ Actions ]%></span>
+               <span class="text tab" rel="jobrun_console_tab"><%[ Console status ]%></span>
+               <hr class="tabs" />
+               <div id="jobrun_actions_tab">
+                       <com:TValidationSummary
+                               ID="ValidationSummary"
+                               CssClass="validation-error-summary"
+                               ValidationGroup="JobRunGroup"
+                               AutoUpdate="true"
+                               Display="Dynamic"
+                               HeaderText="<%[ There is not possible to run selected action because: ]%>" />
+                       <div class="line">
+                               <div class="text"><com:TLabel ForControl="Level" Text="<%[ Level: ]%>" /></div>
+                               <div class="field">
+                                       <com:TActiveDropDownList ID="Level" AutoPostBack="false" CssClass="textbox-auto">
+                                               <prop:Attributes.onchange>
+                                                       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.show();
-                                                       } else if (verify_current_opt == 'jobname') {
-                                                               verify_by_job_name.show();
                                                                verify_by_jobid.hide();
+                                                               accurate.show();
+                                                               estimate.show();
                                                        }
-                                               } 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();
-                                               }
-                                       </prop:Attributes.onchange>
-                               </com:TActiveDropDownList>
-                       </div>
-               </div>
-               <com:TActivePanel ID="JobToVerifyOptionsLine" CssClass="line">
-                       <div class="text"><com:TLabel ForControl="JobToVerifyOptions" Text="<%[ Verify option: ]%>" /></div>
-                       <div class="field">
-                               <com:TActiveDropDownList ID="JobToVerifyOptions" AutoPostBack="false" CssClass="textbox-auto">
-                                       <prop:Attributes.onchange>
-                                               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();
-                                               }
-                                       </prop:Attributes.onchange>
-                               </com:TActiveDropDownList>
+                                               </prop:Attributes.onchange>
+                                       </com:TActiveDropDownList>
+                               </div>
                        </div>
-               </com:TActivePanel>
-               <com:TActivePanel ID="JobToVerifyJobNameLine" CssClass="line">
-                       <div class="text"><com:TLabel ForControl="JobToVerifyJobName" Text="<%[ Job to Verify: ]%>" /></div>
-                       <div class="field">
-                               <com:TActiveDropDownList ID="JobToVerifyJobName" AutoPostBack="false" CssClass="textbox-auto" />
+                       <com:TActivePanel ID="JobToVerifyOptionsLine" CssClass="line">
+                               <div class="text"><com:TLabel ForControl="JobToVerifyOptions" Text="<%[ Verify option: ]%>" /></div>
+                               <div class="field">
+                                       <com:TActiveDropDownList ID="JobToVerifyOptions" AutoPostBack="false" CssClass="textbox-auto">
+                                               <prop:Attributes.onchange>
+                                                       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();
+                                                       }
+                                               </prop:Attributes.onchange>
+                                       </com:TActiveDropDownList>
+                               </div>
+                       </com:TActivePanel>
+                       <com:TActivePanel ID="JobToVerifyJobNameLine" CssClass="line">
+                               <div class="text"><com:TLabel ForControl="JobToVerifyJobName" Text="<%[ Job to Verify: ]%>" /></div>
+                               <div class="field">
+                                       <com:TActiveDropDownList ID="JobToVerifyJobName" AutoPostBack="false" CssClass="textbox-auto" />
+                               </div>
+                       </com:TActivePanel>
+                       <com:TActivePanel ID="JobToVerifyJobIdLine" CssClass="line">
+                               <div class="text"><com:TLabel ForControl="JobToVerifyJobId" Text="<%[ JobId to Verify: ]%>" /></div>
+                               <div class="field">
+                                       <com:TActiveTextBox ID="JobToVerifyJobId" CssClass="textbox-auto" AutoPostBack="false" />
+                                       <com:TActiveCustomValidator ID="JobToVerifyJobIdValidator" ValidationGroup="JobRunGroup" ControlToValidate="JobToVerifyJobId" ErrorMessage="<%[ JobId to Verify value must be integer greather than 0. ]%>" ControlCssClass="validation-error" Display="None" OnServerValidate="jobIdToVerifyValidator" />
+                               </div>
+                       </com:TActivePanel>
+                       <div class="line">
+                               <div class="text"><com:TLabel ForControl="Client" Text="<%[ Client: ]%>" /></div>
+                               <div class="field">
+                                       <com:TActiveDropDownList ID="Client" AutoPostBack="false" CssClass="textbox-auto" />
+                               </div>
                        </div>
-               </com:TActivePanel>
-               <com:TActivePanel ID="JobToVerifyJobIdLine" CssClass="line">
-                       <div class="text"><com:TLabel ForControl="JobToVerifyJobId" Text="<%[ JobId to Verify: ]%>" /></div>
-                       <div class="field">
-                               <com:TActiveTextBox ID="JobToVerifyJobId" CssClass="textbox-auto" AutoPostBack="false" />
-                               <com:TActiveCustomValidator ID="JobToVerifyJobIdValidator" ValidationGroup="JobRunGroup" ControlToValidate="JobToVerifyJobId" ErrorMessage="<%[ JobId to Verify value must be integer greather than 0. ]%>" ControlCssClass="validation-error" Display="None" OnServerValidate="jobIdToVerifyValidator" />
+                       <div class="line">
+                               <div class="text"><com:TLabel ForControl="FileSet" Text="<%[ FileSet: ]%>" /></div>
+                               <div class="field">
+                                       <com:TActiveDropDownList ID="FileSet" AutoPostBack="false" CssClass="textbox-auto" />
+                               </div>
                        </div>
-               </com:TActivePanel>
-               <div class="line">
-                       <div class="text"><com:TLabel ForControl="Client" Text="<%[ Client: ]%>" /></div>
-                       <div class="field">
-                               <com:TActiveDropDownList ID="Client" AutoPostBack="false" CssClass="textbox-auto" />
+                       <div class="line">
+                               <div class="text"><com:TLabel ForControl="Pool" Text="<%[ Pool: ]%>" /></div>
+                               <div class="field">
+                                       <com:TActiveDropDownList ID="Pool" AutoPostBack="false" CssClass="textbox-auto" />
+                               </div>
                        </div>
-               </div>
-               <div class="line">
-                       <div class="text"><com:TLabel ForControl="FileSet" Text="<%[ FileSet: ]%>" /></div>
-                       <div class="field">
-                               <com:TActiveDropDownList ID="FileSet" AutoPostBack="false" CssClass="textbox-auto" />
+                       <div class="line">
+                               <div class="text"><com:TLabel ForControl="Storage" Text="<%[ Storage: ]%>" /></div>
+                               <div class="field">
+                                       <com:TActiveDropDownList ID="Storage" AutoPostBack="false" CssClass="textbox-auto" />
+                               </div>
                        </div>
-               </div>
-               <div class="line">
-                       <div class="text"><com:TLabel ForControl="Pool" Text="<%[ Pool: ]%>" /></div>
-                       <div class="field">
-                               <com:TActiveDropDownList ID="Pool" AutoPostBack="false" CssClass="textbox-auto" />
+                       <div class="line">
+                               <div class="text"><com:TLabel ForControl="Priority" Text="<%[ Priority: ]%>" /></div>
+                               <div class="field">
+                                       <com:TActiveTextBox ID="Priority" CssClass="textbox-auto" AutoPostBack="false" />
+                                       <com:TActiveCustomValidator ID="PriorityValidator" ValidationGroup="JobRunGroup" ControlToValidate="Priority" ErrorMessage="<%[ Priority value must be integer greather than 0. ]%>" ControlCssClass="validation-error" Display="None" OnServerValidate="priorityValidator" />
+                               </div>
                        </div>
-               </div>
-               <div class="line">
-                       <div class="text"><com:TLabel ForControl="Storage" Text="<%[ Storage: ]%>" /></div>
-                       <div class="field">
-                               <com:TActiveDropDownList ID="Storage" AutoPostBack="false" CssClass="textbox-auto" />
+                       <com:TPanel ID="AccurateLine" CssClass="line">
+                               <div class="text"><com:TLabel ForControl="Accurate" Text="<%[ Accurate: ]%>" /></div>
+                               <div class="field"><com:TActiveCheckBox ID="Accurate" AutoPostBack="false" /></div>
+                       </com:TPanel>
+                       <com:TCallback ID="ReloadRunJobs" OnCallback="Page.JobRunWindow.prepareData" ClientSide.OnComplete="RunSlideWindow.getObj('JobRunWindow').setLoadRequest();" />
+                       <script type="text/javascript">
+                               var jobrun_callback_func = function() {
+                                       var mainForm = Prado.Validation.getForm();
+                                       var callback = <%=$this->ReloadRunJobs->ActiveControl->Javascript%>;
+                                       if (Prado.Validation.managers[mainForm].getValidatorsWithError('JobRunGroup').length == 0) {
+                                               callback.dispatch();
+                                       }
+                               }
+                       </script>
+                       <div class="button">
+                               <com:BActiveButton ID="Run" Text="<%[ Run job ]%>" ValidationGroup="JobRunGroup" CausesValidation="true" OnClick="run_job">
+                                       <prop:ClientSide.OnSuccess>
+                                               ConfigurationWindow.getObj('JobRunWindow').progress(false);
+                                               jobrun_callback_func();
+                                               if (Prado.Validation.isValid(Prado.Validation.getForm(), 'JobRunGroup') === true) {
+                                                       ConfigurationWindow.getObj('JobRunWindow').switchTab('jobrun_console_tab');
+                                               }
+                                       </prop:ClientSide.OnSuccess>
+                               </com:BActiveButton>
+                               <com:TPanel ID="EstimateLine" CssClass="button_line">
+                                       <com:BActiveButton ID="Estimate" Text="<%[ Estimate job ]%>" OnClick="estimate">
+                                               <prop:ClientSide.OnSuccess>
+                                                       ConfigurationWindow.getObj('JobRunWindow').progress(false);
+                                                       jobrun_callback_func();
+                                                       oMonitor();
+                                                       if (Prado.Validation.isValid(Prado.Validation.getForm(), 'JobRunGroup') === true) {
+                                                               ConfigurationWindow.getObj('JobRunWindow').switchTab('jobrun_console_tab');
+                                                       }
+                                               </prop:ClientSide.OnSuccess>
+                                       </com:BActiveButton>
+                               </com:TPanel>
                        </div>
                </div>
-               <div class="line">
-                       <div class="text"><com:TLabel ForControl="Priority" Text="<%[ Priority: ]%>" /></div>
-                       <div class="field">
-                               <com:TActiveTextBox ID="Priority" CssClass="textbox-auto" AutoPostBack="false" />
-                               <com:TActiveCustomValidator ID="PriorityValidator" ValidationGroup="JobRunGroup" ControlToValidate="Priority" ErrorMessage="<%[ Priority value must be integer greather than 0. ]%>" ControlCssClass="validation-error" Display="None" OnServerValidate="priorityValidator" />
+               <div id="jobrun_console_tab" style="display: none">
+                       <div class="field-full">
+                               <com:TActiveTextBox ID="Estimation" TextMode="MultiLine" CssClass="textbox-auto" Style="height: 475px;" ReadOnly="true" />
                        </div>
                </div>
-               <com:TCallback ID="ReloadRunJobs" OnCallback="Page.JobRunWindow.prepareData" ClientSide.OnComplete="RunSlideWindow.getObj('JobRunWindow').setLoadRequest();" />
-               <script type="text/javascript">
-                       var jobrun_callback_func = function() {
-                               var mainForm = Prado.Validation.getForm();
-                               var callback = <%=$this->ReloadRunJobs->ActiveControl->Javascript%>;
-                               if (Prado.Validation.managers[mainForm].getValidatorsWithError('JobRunGroup').length == 0) {
-                                       callback.dispatch();
-                               }
-                       }
-               </script>
-               <div class="button">
-                       <com:BActiveButton ID="Run" Text="<%[ Run job ]%>" ValidationGroup="JobRunGroup" CausesValidation="true" OnClick="run_job" ClientSide.OnSuccess="ConfigurationWindow.getObj('JobRunWindow').progress(false);jobrun_callback_func();"/>
-               </div>
-               <div class="text small"><%[ Console status ]%></div>
-               <div class="field-full" style="min-height: 90px">
-                       <com:TActiveTextBox ID="Estimation" TextMode="MultiLine" CssClass="textbox-auto" Style="height: 116px; font-size: 11px;" ReadOnly="true" />
-               </div>
-               <com:TPanel ID="AccurateLine" CssClass="line">
-                       <div class="text"><com:TLabel ForControl="Accurate" Text="<%[ Accurate: ]%>" /></div>
-                       <div class="field"><com:TActiveCheckBox ID="Accurate" AutoPostBack="false" /></div>
-               </com:TPanel>
-               <com:TPanel ID="EstimateLine" CssClass="button">
-                       <com:Application.Portlets.BActiveButton ID="Estimate" Text="<%[ Estimate job ]%>" OnClick="estimate"  ClientSide.OnSuccess="ConfigurationWindow.getObj('JobRunWindow').progress(false);jobrun_callback_func();oMonitor();" />
-               </com:TPanel>
        </com:TActivePanel>
 </com:TContent>
index 6e9b5cb591aafa22fe802ca0cde5beed8f3cda6e..58eae5d3c698c9ce0e64415a63724cfa1a60ac83 100644 (file)
@@ -46,7 +46,7 @@ class StorageConfiguration extends Portlets {
        }
 
        public function umount($sender, $param) {
-               $isValid = $this->DriveValidator->IsValid === true && $this->SlotValidator->IsValid === true;
+               $isValid = $this->DriveValidator->IsValid === true;
                if($isValid === false) {
                        return;
                }
@@ -57,7 +57,12 @@ class StorageConfiguration extends Portlets {
        }
 
        public function release($sender, $param) {
-               $release = $this->Application->getModule('api')->get(array('storages', 'release', $this->StorageID->Text))->output;
+               $isValid = $this->DriveValidator->IsValid === true;
+               if($isValid === false) {
+                       return;
+               }
+               $drive = ($this->AutoChanger->Visible === true) ? intval($this->Drive->Text) : 0;
+               $release = $this->Application->getModule('api')->get(array('storages', 'release', $this->StorageID->Text, $drive))->output;
                $this->ShowStorage->Text = implode(PHP_EOL, $release);
        }
 
index 6c5e9feb6d50feddac2b67b99b70eba6d84712e4..7a1dcd42ee8fb71500739f825d47ecff2c15d7a3 100644 (file)
@@ -1,38 +1,69 @@
 <%@ MasterClass="Application.Portlets.ConfigurationPanel"%>
 <com:TContent ID="ConfigurationWindowContent">
-               <strong><%[ Storage name: ]%> <com:TActiveLabel ID="StorageName" /><com:TActiveLabel ID="StorageID" Visible="false" /></strong>
-               <hr />
-               <com:TValidationSummary
-                       ID="ValidationSummary"
-                       CssClass="validation-error-summary"
-                       ValidationGroup="AutoChangerGroup"
-                       AutoUpdate="true"
-                       Display="Dynamic"
-                       HeaderText="<%[ There is not possible to run selected action because: ]%>" />
-               <div class="text small"><%[ Console status ]%></div>
-               <div class="field-full">
-                       <com:TActiveTextBox ID="ShowStorage" TextMode="MultiLine" CssClass="textbox-auto" Style="height: 190px" ReadOnly="true" />
-               </div>
-               <com:TActivePanel ID="AutoChanger" Visible="false" Style="margin-bottom: 10px">
-                       <div class="line">
-                               <div class="text"><com:TLabel ForControl="Drive" Text="<%[ Drive number: ]%>" /></div>
-                               <div class="field">
-                                       <com:TActiveTextBox ID="Drive" AutoPostBack="false" Text="0" MaxLength="3" CssClass="textbox-short" />
-                                       <com:TActiveCustomValidator ID="DriveValidator" ValidationGroup="AutoChangerGroup" ControlToValidate="Drive" ErrorMessage="<%[ Drive number must be integer. ]%>" ControlCssClass="validation-error" Display="None" OnServerValidate="driveValidator" />
+               <h4><%[ Storage name: ]%> <com:TActiveLabel ID="StorageName" /><com:TActiveLabel ID="StorageID" Visible="false" /></h4>
+               <span class="text tab tab_active" rel="storage_actions_tab"><%[ Actions ]%></span>
+               <span class="text tab" rel="storage_console_tab"><%[ Console status ]%></span>
+               <hr class="tabs" />
+               <div id="storage_actions_tab">
+                       <com:TValidationSummary
+                               ID="ValidationSummary"
+                               CssClass="validation-error-summary"
+                               ValidationGroup="AutoChangerGroup"
+                               AutoUpdate="true"
+                               Display="Dynamic"
+                               HeaderText="<%[ There is not possible to run selected action because: ]%>" />
+                       <com:TActivePanel ID="AutoChanger" Visible="false" Style="margin-bottom: 10px">
+                               <div class="line">
+                                       <div class="text"><com:TLabel ForControl="Drive" Text="<%[ Drive number: ]%>" /></div>
+                                       <div class="field">
+                                               <com:TActiveTextBox ID="Drive" AutoPostBack="false" Text="0" MaxLength="3" CssClass="textbox-short" />
+                                               <com:TActiveCustomValidator ID="DriveValidator" ValidationGroup="AutoChangerGroup" ControlToValidate="Drive" ErrorMessage="<%[ Drive number must be integer. ]%>" ControlCssClass="validation-error" Display="None" OnServerValidate="driveValidator" />
+                                       </div>
                                </div>
-                       </div>
-                       <div class="line">
-                               <div class="text"><com:TLabel ForControl="Slot" Text="<%[ Slot number: ]%>" /></div>
-                               <div class="field">
-                                       <com:TActiveTextBox ID="Slot" AutoPostBack="false" Text="0" MaxLength="3" CssClass="textbox-short" />
-                                       <com:TActiveCustomValidator ID="SlotValidator" ValidationGroup="AutoChangerGroup" ControlToValidate="Slot" ErrorMessage="<%[ Slot number must be integer. ]%>" ControlCssClass="validation-error" Display="None" OnServerValidate="slotValidator" />
+                               <div class="line">
+                                       <div class="text"><com:TLabel ForControl="Slot" Text="<%[ Slot number: ]%>" /></div>
+                                       <div class="field">
+                                               <com:TActiveTextBox ID="Slot" AutoPostBack="false" Text="0" MaxLength="3" CssClass="textbox-short" />
+                                               <com:TActiveCustomValidator ID="SlotValidator" ValidationGroup="AutoChangerGroup" ControlToValidate="Slot" ErrorMessage="<%[ Slot number must be integer. ]%>" ControlCssClass="validation-error" Display="None" OnServerValidate="slotValidator" />
+                                       </div>
                                </div>
+                       </com:TActivePanel>
+                       <div class="button-center">
+                               <com:BActiveButton ID="Mount" OnClick="mount" ValidationGroup="AutoChangerGroup" CausesValidation="true" Text="<%[ Mount ]%>">
+                                       <prop:ClientSide.OnSuccess>
+                                               ConfigurationWindow.getObj('StorageWindow').progress(false);
+                                               if (Prado.Validation.isValid(Prado.Validation.getForm(), 'AutoChangerGroup') === true) {
+                                                       ConfigurationWindow.getObj('StorageWindow').switchTab('storage_console_tab');
+                                               }
+                                       </prop:ClientSide.OnSuccess>
+                               </com:BActiveButton>
+                               <com:BActiveButton ID="Release" OnClick="release" Text="<%[ Release ]%>" ValidationGroup="AutoChangerGroup" CausesValidation="true">
+                                       <prop:ClientSide.OnSuccess>
+                                               ConfigurationWindow.getObj('StorageWindow').progress(false);
+                                               if (Prado.Validation.isValid(Prado.Validation.getForm(), 'AutoChangerGroup') === true) {
+                                                       ConfigurationWindow.getObj('StorageWindow').switchTab('storage_console_tab');
+                                               }
+                                       </prop:ClientSide.OnSuccess>
+                               </com:BActiveButton>
+                               <com:BActiveButton ID="Umount" OnClick="umount" ValidationGroup="AutoChangerGroup" CausesValidation="true" Text="<%[ Umount ]%>">
+                                       <prop:ClientSide.OnSuccess>
+                                               ConfigurationWindow.getObj('StorageWindow').progress(false);
+                                               if (Prado.Validation.isValid(Prado.Validation.getForm(), 'AutoChangerGroup') === true) {
+                                                       ConfigurationWindow.getObj('StorageWindow').switchTab('storage_console_tab');
+                                               }
+                                       </prop:ClientSide.OnSuccess>
+                               </com:BActiveButton>
+                               <com:BActiveButton ID="Status" OnClick="status" Text="<%[ Status ]%>">
+                                       <prop:ClientSide.OnSuccess>
+                                               ConfigurationWindow.getObj('StorageWindow').progress(false);
+                                               ConfigurationWindow.getObj('StorageWindow').switchTab('storage_console_tab');
+                                       </prop:ClientSide.OnSuccess>
+                               </com:BActiveButton>
+                       </div>
+               </div>
+               <div id="storage_console_tab" style="display: none">
+                       <div class="field-full">
+                               <com:TActiveTextBox ID="ShowStorage" TextMode="MultiLine" CssClass="textbox-auto" Style="height: 475px" ReadOnly="true" />
                        </div>
-               </com:TActivePanel>
-               <div class="button-center">
-                       <com:BActiveButton ID="Mount" OnClick="mount" ValidationGroup="AutoChangerGroup" CausesValidation="true" Text="<%[ Mount ]%>" ClientSide.OnSuccess="ConfigurationWindow.getObj('StorageWindow').progress(false);" />
-                       <com:BActiveButton ID="Release" OnClick="release" Text="<%[ Release ]%>" ClientSide.OnSuccess="ConfigurationWindow.getObj('StorageWindow').progress(false);" />
-                       <com:BActiveButton ID="Umount" OnClick="umount" ValidationGroup="AutoChangerGroup" CausesValidation="true" Text="<%[ Umount ]%>" ClientSide.OnSuccess="ConfigurationWindow.getObj('StorageWindow').progress(false);" />
-                       <com:BActiveButton ID="Status" OnClick="status" Text="<%[ Status ]%>" ClientSide.OnSuccess="ConfigurationWindow.getObj('StorageWindow').progress(false);" />
                </div>
 </com:TContent>
index c227e627807250f2a1816b40f8e31bb051f2c267..1135fc81ed7ca5316bc070df4d0b106b25cfd183 100644 (file)
@@ -384,7 +384,7 @@ input.bbutton {
        cursor: pointer;
        display: inline-block;
        width: auto;
-       margin: 0 8px;
+       margin: 5px 8px;
        padding: 0 18px;
        min-width: 65px;
        border-radius: 4px;
@@ -748,11 +748,15 @@ div.window-section span {
        padding-left: 12px;
 }
 
-div.button {
+div.button, div.button_line {
        text-align: right;
        margin: 3px 2px 5px 0;
 }
 
+div.button_line {
+       display: inline;
+}
+
 div.button-center {
        text-align: center;
        margin: 5px 0;
@@ -811,6 +815,13 @@ textarea.console {
        border: 0;
 }
 
+.description {
+       display: inline-block;
+       font-style: italic;
+       font-size: 12px;
+       padding: 4px 0;
+}
+
 fieldset {
        margin-bottom: 15px;
        font-size: 14px;
@@ -835,8 +846,21 @@ img {
        border: none;
 }
 
-div.small {
-       font-size: 12px;
+h4 {
+       margin: 6px 0;
+}
+
+hr.tabs {
+       margin-top: 0;
+       background-color: black; /* Firefox and Opera */
+       border-color: black; /* Chrome and Safari */
+       color: black; /* IE 7+ */
+       clear: both;
+}
+
+span.tab, span.tab_active {
+       font-size: 13px;
+       font-weight: bold;
        text-align: center;
        width: 130px;
        background-color: rgb(115, 143, 172);
@@ -845,7 +869,12 @@ div.small {
        border-left: 1px solid black;
        border-right: 1px solid black;
        border-top: 1px solid black;
-       margin: 3px 0;
+       padding: 4px;
+       cursor: pointer;
+}
+
+span.tab_active {
+       background-color: rgb(163, 180, 197);
 }
 
 #graphs {