]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
baculum: Backup job wizard improvements
authorMarcin Haba <marcin.haba@bacula.pl>
Tue, 13 Jul 2021 03:04:19 +0000 (05:04 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:03:25 +0000 (09:03 +0100)
gui/baculum/protected/Web/Pages/NewBackupJobWizard.page [moved from gui/baculum/protected/Web/Pages/NewJobWizard.page with 97% similarity]
gui/baculum/protected/Web/Pages/NewBackupJobWizard.php [moved from gui/baculum/protected/Web/Pages/NewJobWizard.php with 95% similarity]

similarity index 97%
rename from gui/baculum/protected/Web/Pages/NewJobWizard.page
rename to gui/baculum/protected/Web/Pages/NewBackupJobWizard.page
index 4e7e96e561e914b61f86a935b43ddaaae73dd797..5b0e5d95a424667b7e3eb7446245f75c3a959f7e 100644 (file)
@@ -19,7 +19,7 @@
                                        <div class="step w3-padding w3-text-white w3-margin-right <%=($this->Parent->ActiveStepIndex === 0 ? 'w3-light-green' : 'w3-green')%>">
                                                <div class="w3-left"><i class="fa fa-tasks w3-xxxlarge"></i></div>
                                                <div class="w3-clear"></div>
-                                               <h4><com:TTranslate Text="Type" /></h4>
+                                               <h4><com:TTranslate Text="General" /></h4>
                                        </div>
                                </div>
                                <div class="w3-third w3-padding-16">
                                </com:TLinkButton>
                        </div>
                </prop:StepNavigationTemplate>
-                
                <prop:FinishNavigationTemplate>
                        <div class="w3-center w3-section">
                                <com:TLinkButton
                        </div>
                        </div>
                </prop:FinishNavigationTemplate>
-               <com:TWizardStep ID="Step1" Title="<%[ Step 1 - select job type ]%>" StepType="Auto">
+               <com:TWizardStep ID="Step1" Title="<%[ Step 1 - basic information about new job ]%>" StepType="Auto">
                        <div class="w3-container">
-                               <h2><%[ New job wizard ]%></h2>
-                               <p><%[ This wizard enables you to create in easy way a new job. ]%></p>
+                               <h2><%[ New backup job wizard ]%></h2>
+                               <p><%[ This wizard enables you to create in easy way a new backup job. ]%></p>
                                <!--p><%[ To start please select job type that you wish to create. ]%></p-->
                        </div>
                        <div class="w3-container w3-margin-top">
-                               <com:Application.Web.Portlets.DirectiveComboBox
-                                       ID="Type"
-                                       DirectiveName="Type"
-                                       Label="Job Type"
-                                       Show="true"
+                               <com:Application.Web.Portlets.DirectiveTextBox
+                                       ID="Name"
+                                       DirectiveName="Name"
+                                       Label="Job Name"
                                        ValidationGroup="NewJobDirective"
                                        Required="true"
+                                       Show="true"
                                        />
                        </div>
                        <div class="w3-container w3-margin-top">
                                <com:Application.Web.Portlets.DirectiveTextBox
-                                       ID="Name"
-                                       DirectiveName="Name"
-                                       Label="Job Name"
+                                       ID="Description"
+                                       DirectiveName="Description"
+                                       Label="Description"
                                        ValidationGroup="NewJobDirective"
-                                       Required="true"
+                                       Required="false"
                                        Show="true"
                                        />
                        </div>
                <com:TWizardStep ID="Step6" Title="<%[ Step 6 - summary ]%>" StepType="Finish">
                        <fieldset>
                                <legend><%[ General ]%></legend>
-                               <div class="w3-container">
-                                       <div class="w3-quarter">Job Type</div>
-                                       <div class="w3-threequarter bold"><%=$this->Type->getDirectiveValue()%></div>
-                               </div>
                                <div class="w3-container">
                                        <div class="w3-quarter">Job Name</div>
                                        <div class="w3-threequarter bold"><%=$this->Name->getDirectiveValue()%></div>
                                </div>
+                               <div class="w3-container">
+                                       <div class="w3-quarter">Description</div>
+                                       <div class="w3-threequarter bold"><%=$this->Description->getDirectiveValue() ?: '-'%></div>
+                               </div>
                                <div class="w3-container">
                                        <div class="w3-quarter">JobDefs</div>
                                        <div class="w3-threequarter bold"><%=$this->JobDefs->getDirectiveValue() ?: '-'%></div>
similarity index 95%
rename from gui/baculum/protected/Web/Pages/NewJobWizard.php
rename to gui/baculum/protected/Web/Pages/NewBackupJobWizard.php
index 08b952ab504561cf1ebcad03776040784e85eac3..54c6d05977c1899dd9f3d527df924e7596684dea 100644 (file)
@@ -3,7 +3,7 @@
  * Bacula(R) - The Network Backup Solution
  * Baculum   - Bacula web interface
  *
- * Copyright (C) 2013-2020 Kern Sibbald
+ * Copyright (C) 2013-2021 Kern Sibbald
  *
  * The main author of Baculum is Marcin Haba.
  * The original author of Bacula is Kern Sibbald, with contributions
@@ -25,13 +25,13 @@ Prado::using('System.Web.UI.ActiveControls.TActiveLabel');
 Prado::using('System.Web.UI.WebControls.TWizard');
 
 /**
- * New job wizard page.
+ * New backup job wizard page.
  *
  * @author Marcin Haba <marcin.haba@bacula.pl>
  * @category Page
  * @package Baculum Web
  */
-class NewJobWizard extends BaculumWebPage {
+class NewBackupJobWizard extends BaculumWebPage {
 
        const PREV_STEP = 'PrevStep';
        const JOBDEFS = 'JobDefs';
@@ -61,7 +61,6 @@ class NewJobWizard extends BaculumWebPage {
                }
                switch ($step_index) {
                        case 0: {
-                               $this->loadJobTypes();
                                $this->loadJobDefs();
                                break;
                        }
@@ -113,19 +112,6 @@ class NewJobWizard extends BaculumWebPage {
        public function wizardNext($sender, $param) {
        }
 
-       /**
-        * Load Job Types (step 1).
-        *
-        * @return none
-        */
-       public function loadJobTypes() {
-               //$jobtype_list = array('Backup', 'Restore', 'Copy', 'Verify', 'Migrate', 'Admin');
-               $jobtype_list = array('Backup');
-               asort($jobtype_list);
-               $this->Type->setData($jobtype_list);
-               $this->Type->setDirectiveValue($jobtype_list[0]);
-               $this->Type->onLoad(null);
-       }
 
        /**
         * Load JobDefs (step 1).
@@ -431,10 +417,10 @@ class NewJobWizard extends BaculumWebPage {
                $jobdefs = $this->getJobDefs();
                $job = array(
                        'Name' => $this->Name->getDirectiveValue(),
-                       'Type' => $this->Type->getDirectiveValue(),
+                       'Type' => 'Backup',
                );
                $jd = $this->JobDefs->getDirectiveValue();
-               $directives = array('Client', 'Fileset', 'Storage', 'SpoolData', 'SpoolAttributes',
+               $directives = array('Description', 'Client', 'Fileset', 'Storage', 'SpoolData', 'SpoolAttributes',
                        'SpoolSize', 'Pool', 'FullBackupPool', 'IncrementalBackupPool', 'DifferentialBackupPool',
                        'Level', 'Accurate', 'MaximumConcurrentJobs', 'Priority', 'ReRunFailedLevels', 'Schedule',
                        'RescheduleOnError', 'RescheduleIncompleteJobs', 'RescheduleInterval', 'RescheduleTimes',