]> git.sur5r.net Git - bacula/bacula/blob - gui/baculum/protected/Portlets/JobRunConfiguration.tpl
Update ReleaseNotes + ChangeLog
[bacula/bacula] / gui / baculum / protected / Portlets / JobRunConfiguration.tpl
1 <%@ MasterClass="Application.Portlets.ConfigurationPanel"%>
2 <com:TContent ID="ConfigurationWindowContent">
3         <com:TActivePanel DefaultButton="Run">
4                 <h4><%[ Job name: ]%> <com:TActiveLabel ID="JobName" /><com:TActiveLabel ID="JobID" Visible="false" /></h4>
5                 <span class="text tab tab_active" rel="jobrun_actions_tab"><%[ Actions ]%></span>
6                 <span class="text tab" rel="jobrun_console_tab"><%[ Console status ]%></span>
7                 <hr class="tabs" />
8                 <div id="jobrun_actions_tab">
9                         <com:TValidationSummary
10                                 ID="ValidationSummary"
11                                 CssClass="validation-error-summary"
12                                 ValidationGroup="JobRunGroup"
13                                 AutoUpdate="true"
14                                 Display="Dynamic"
15                                 HeaderText="<%[ There is not possible to run selected action because: ]%>" />
16                         <div class="line">
17                                 <div class="text"><com:TLabel ForControl="Level" Text="<%[ Level: ]%>" /></div>
18                                 <div class="field">
19                                         <com:TActiveDropDownList ID="Level" AutoPostBack="false" CssClass="textbox-auto">
20                                                 <prop:Attributes.onchange>
21                                                         var job_to_verify = $('<%=$this->JobToVerifyOptionsLine->ClientID%>');
22                                                         var verify_options = $('<%=$this->JobToVerifyOptionsLine->ClientID%>');
23                                                         var verify_by_job_name = $('<%=$this->JobToVerifyJobNameLine->ClientID%>');
24                                                         var verify_by_jobid = $('<%=$this->JobToVerifyJobIdLine->ClientID%>');
25                                                         var accurate = $('<%=$this->AccurateLine->ClientID%>');
26                                                         var estimate = $('<%=$this->EstimateLine->ClientID%>');
27                                                         var verify_current_opt = $('<%=$this->JobToVerifyOptions->ClientID%>').value;
28                                                         if(/^(<%=implode('|', $this->jobToVerify)%>)$/.test(this.value)) {
29                                                                 accurate.hide();
30                                                                 estimate.hide();
31                                                                 verify_options.show();
32                                                                 job_to_verify.show();
33                                                                 if (verify_current_opt == 'jobid') {
34                                                                         verify_by_job_name.hide();
35                                                                         verify_by_jobid.show();
36                                                                 } else if (verify_current_opt == 'jobname') {
37                                                                         verify_by_job_name.show();
38                                                                         verify_by_jobid.hide();
39                                                                 }
40                                                         } else if (job_to_verify.visible()) {
41                                                                 job_to_verify.hide();
42                                                                 verify_options.hide();
43                                                                 verify_by_job_name.hide();
44                                                                 verify_by_jobid.hide();
45                                                                 accurate.show();
46                                                                 estimate.show();
47                                                         }
48                                                 </prop:Attributes.onchange>
49                                         </com:TActiveDropDownList>
50                                 </div>
51                         </div>
52                         <com:TActivePanel ID="JobToVerifyOptionsLine" CssClass="line">
53                                 <div class="text"><com:TLabel ForControl="JobToVerifyOptions" Text="<%[ Verify option: ]%>" /></div>
54                                 <div class="field">
55                                         <com:TActiveDropDownList ID="JobToVerifyOptions" AutoPostBack="false" CssClass="textbox-auto">
56                                                 <prop:Attributes.onchange>
57                                                         var verify_by_job_name = $('<%=$this->JobToVerifyJobNameLine->ClientID%>');
58                                                         var verify_by_jobid = $('<%=$this->JobToVerifyJobIdLine->ClientID%>');
59                                                         if (this.value == 'jobname') {
60                                                                 verify_by_jobid.hide();
61                                                                 verify_by_job_name.show();
62                                                         } else if (this.value == 'jobid') {
63                                                                 verify_by_job_name.hide();
64                                                                 verify_by_jobid.show();
65                                                         } else {
66                                                                 verify_by_job_name.hide();
67                                                                 verify_by_jobid.hide();
68                                                         }
69                                                 </prop:Attributes.onchange>
70                                         </com:TActiveDropDownList>
71                                 </div>
72                         </com:TActivePanel>
73                         <com:TActivePanel ID="JobToVerifyJobNameLine" CssClass="line">
74                                 <div class="text"><com:TLabel ForControl="JobToVerifyJobName" Text="<%[ Job to Verify: ]%>" /></div>
75                                 <div class="field">
76                                         <com:TActiveDropDownList ID="JobToVerifyJobName" AutoPostBack="false" CssClass="textbox-auto" />
77                                 </div>
78                         </com:TActivePanel>
79                         <com:TActivePanel ID="JobToVerifyJobIdLine" CssClass="line">
80                                 <div class="text"><com:TLabel ForControl="JobToVerifyJobId" Text="<%[ JobId to Verify: ]%>" /></div>
81                                 <div class="field">
82                                         <com:TActiveTextBox ID="JobToVerifyJobId" CssClass="textbox-auto" AutoPostBack="false" />
83                                         <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" />
84                                 </div>
85                         </com:TActivePanel>
86                         <div class="line">
87                                 <div class="text"><com:TLabel ForControl="Client" Text="<%[ Client: ]%>" /></div>
88                                 <div class="field">
89                                         <com:TActiveDropDownList ID="Client" AutoPostBack="false" CssClass="textbox-auto" />
90                                 </div>
91                         </div>
92                         <div class="line">
93                                 <div class="text"><com:TLabel ForControl="FileSet" Text="<%[ FileSet: ]%>" /></div>
94                                 <div class="field">
95                                         <com:TActiveDropDownList ID="FileSet" AutoPostBack="false" CssClass="textbox-auto" />
96                                 </div>
97                         </div>
98                         <div class="line">
99                                 <div class="text"><com:TLabel ForControl="Pool" Text="<%[ Pool: ]%>" /></div>
100                                 <div class="field">
101                                         <com:TActiveDropDownList ID="Pool" AutoPostBack="false" CssClass="textbox-auto" />
102                                 </div>
103                         </div>
104                         <div class="line">
105                                 <div class="text"><com:TLabel ForControl="Storage" Text="<%[ Storage: ]%>" /></div>
106                                 <div class="field">
107                                         <com:TActiveDropDownList ID="Storage" AutoPostBack="false" CssClass="textbox-auto" />
108                                 </div>
109                         </div>
110                         <div class="line">
111                                 <div class="text"><com:TLabel ForControl="Priority" Text="<%[ Priority: ]%>" /></div>
112                                 <div class="field">
113                                         <com:TActiveTextBox ID="Priority" CssClass="textbox-auto" AutoPostBack="false" />
114                                         <com:TActiveCustomValidator ID="PriorityValidator" ValidationGroup="JobRunGroup" ControlToValidate="Priority" ErrorMessage="<%[ Priority value must be integer greather than 0. ]%>" ControlCssClass="validation-error" Display="None" OnServerValidate="priorityValidator" />
115                                 </div>
116                         </div>
117                         <com:TPanel ID="AccurateLine" CssClass="line">
118                                 <div class="text"><com:TLabel ForControl="Accurate" Text="<%[ Accurate: ]%>" /></div>
119                                 <div class="field"><com:TActiveCheckBox ID="Accurate" AutoPostBack="false" /></div>
120                         </com:TPanel>
121                         <div class="line">
122                                 <div class="text"><com:TLabel ForControl="GoToStartedJob" Text="<%[ Go to started job after start: ]%>" /></div>
123                                 <div class="field"><com:TActiveCheckBox ID="GoToStartedJob" AutoPostBack="false" Checked="true" /></div>
124                         </div>
125                         <com:TCallback ID="ReloadRunJobs" OnCallback="Page.JobRunWindow.prepareData" ClientSide.OnComplete="SlideWindow.getObj('JobRunWindow').setLoadRequest();" />
126                         <script type="text/javascript">
127                                 var jobrun_callback_func = function() {
128                                         /* If Job Run list window is not open or if actually toolbar is used
129                                          * then Job Run window refresh does not take place.
130                                          */
131                                         var obj = SlideWindow.getObj('JobRunWindow');
132                                         if (obj.isWindowOpen() === false || obj.isToolbarOpen() === true) {
133                                                 return;
134                                         }
135                                         var mainForm = Prado.Validation.getForm();
136                                         var callback = <%=$this->ReloadRunJobs->ActiveControl->Javascript%>;
137                                         if (Prado.Validation.managers[mainForm].getValidatorsWithError('JobRunGroup').length == 0) {
138                                                 callback.dispatch();
139                                         }
140                                 }
141                         </script>
142                         <div class="button">
143                                 <com:BActiveButton ID="Run" Text="<%[ Run job ]%>" ValidationGroup="JobRunGroup" CausesValidation="true" OnClick="run_job">
144                                         <prop:ClientSide.OnSuccess>
145                                                 ConfigurationWindow.getObj('JobRunWindow').progress(false);
146                                                 oMonitor();
147                                                 jobrun_callback_func();
148                                                 if (Prado.Validation.isValid(Prado.Validation.getForm(), 'JobRunGroup') === true) {
149                                                         if ($('<%=$this->GoToStartedJob->ClientID%>').checked === true) {
150                                                                 ConfigurationWindow.getObj('JobWindow').progress(false);
151                                                                 ConfigurationWindow.getObj('JobWindow').show();
152                                                                 ConfigurationWindow.getObj('JobWindow').switchTabByNo(2);
153                                                         } else {
154                                                                 ConfigurationWindow.getObj('JobRunWindow').switchTab('jobrun_console_tab');
155                                                         }
156                                                 }
157                                         </prop:ClientSide.OnSuccess>
158                                 </com:BActiveButton>
159                                 <com:TPanel ID="EstimateLine" CssClass="button_line">
160                                         <com:BActiveButton ID="Estimate" Text="<%[ Estimate job ]%>" OnClick="estimate">
161                                                 <prop:ClientSide.OnSuccess>
162                                                         ConfigurationWindow.getObj('JobRunWindow').progress(false);
163                                                         if (Prado.Validation.isValid(Prado.Validation.getForm(), 'JobRunGroup') === true) {
164                                                                 ConfigurationWindow.getObj('JobRunWindow').switchTab('jobrun_console_tab');
165                                                         }
166                                                 </prop:ClientSide.OnSuccess>
167                                         </com:BActiveButton>
168                                 </com:TPanel>
169                         </div>
170                 </div>
171                 <div id="jobrun_console_tab" style="display: none">
172                         <div class="field-full">
173                                 <com:TActiveTextBox ID="Estimation" TextMode="MultiLine" CssClass="textbox-auto" Style="height: 475px;" ReadOnly="true" />
174                         </div>
175                 </div>
176         </com:TActivePanel>
177 </com:TContent>