git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube...
authorSweidan Omar <TFS\sweidan.omar>
Thu, 28 Apr 2022 06:39:14 +0000 (06:39 +0000)
committerSweidan Omar <TFS\sweidan.omar>
Thu, 28 Apr 2022 06:39:14 +0000 (06:39 +0000)
server/user.mediacube.gui/pages/jobeditor2.zul

index 4d6b703d6ad26e539920f9c5920c2e97e8ceb3f5..206df9c1eab858980356596e1ebc806e6d3ab32a 100644 (file)
@@ -9,18 +9,19 @@
                        setTimeout(function(){ toast._close(); }, 3000);\r
                }\r
        </script>\r
-       <vlayout height="100%" viewModel="@id('jem') @init('user.jobengine.zk.model.JobEditorModel')">\r
+       <vlayout height="100%" viewModel="@id('jem2') @init('user.jobengine.zk.model.JobEditorModel2')">\r
                <toolbar>\r
                        <toolbarbutton label="Futtatás" iconSclass="z-icon-play" onClick="@command('execute')" \r
                                disabled="${not sessionScope.userPrincipal.admin}" autodisable="self" />\r
-                       <toolbarbutton label="scheduledjobs.json mentése" iconSclass="z-icon-save" id="SaveScheduleButton" onClick="@command('saveSchedule')" />\r
-                       <toolbarbutton label="folyamatsablon mentése" iconSclass="z-icon-save" id="SaveTemplateButton" onClick="@command('saveTemplateXml')" />\r
-                       <toolbarbutton label="folyamat duplikálása" id="DuplicateTemplateButton" onClick="@command('duplicateProcess')" />\r
+                       <toolbarbutton label="scheduledjobs.json mentése" id="SaveScheduleButton" iconSclass="z-icon-save" onClick="@command('saveSchedulesJson')" />\r
+                       <toolbarbutton label="folyamatsablon mentése" id="SaveTemplateButton" iconSclass="z-icon-save" onClick="@command('saveJobTemplate')" />\r
+                       <toolbarbutton label="folyamat duplikálása" id="DuplicateTemplateButton" onClick="@command('duplicateTemplate')" />\r
                        <toolbarbutton label="folyamat bejegyzés másolása" id="CopyProcessButton" onClick="@command('copyProcessEntry')" />\r
                </toolbar>\r
                <borderlayout vflex="true">\r
                        <center border="none" vflex="true">\r
-                               <listbox vflex="true" model="@load(jem.jobs)" selectedItem="@bind(jem.selectedJob)">\r
+                               <listbox vflex="true" model="@bind(jem2.jobs)" selectedItem="@bind(jem2.editingJob)"\r
+                                       onSelect="@command('onSelectJob')">\r
                                        <listhead>\r
                                                <listheader hflex="1" label="Név" align="left" />\r
                                        </listhead>\r
@@ -46,7 +47,7 @@
                                                        <tabpanel>\r
                                                                <borderlayout>\r
                                                                        <north size="50%" splittable="true">\r
-                                                                               <grid visible="@bind(not empty jem.editingJob)" sizedByContent="false" span="true" vflex="true"\r
+                                                                               <grid visible="@bind(not empty jem2.editingJob)" sizedByContent="false" span="true" vflex="true"\r
                                                                                        style="border: none; background: #e3e3e3 !important;" oddRowSclass="listbox-odd-style" \r
                                                                                        sclass="listbox-normal-style"\r
                                                                                        emptyMessage="A részletek megtekintéséhez jelöljön ki egy folyamatot.">\r
                                                                                        <rows>\r
                                                                                                <row>\r
                                                                                                        <label value="Name"/>\r
-                                                                                                       <textbox value="@bind(jem.editingJob.name) @validator()" instant="true"/>\r
+                                                                                                       <textbox value="@bind(jem2.editingJob.name) @validator(jem2.nameValidator)" instant="true"/>\r
+                                                                                               </row>\r
+                                                                                               <row>\r
+                                                                                                       <label value="Template"/>\r
+                                                                                                       <textbox value="@bind(jem2.editingJob.template) @validator(jem2.templateNameValidator)" \r
+                                                                                                               instant="true" constraint="/^[\w\-. ]+$/" />\r
+                                                                                               </row>\r
+                                                                                               <row>\r
+                                                                                                       <label value="Active" />\r
+                                                                                                       <checkbox disabled="true" value="@bind(empty jem2.editingJob.active ? false : jem2.editingJob.active) @validator(jem2.templateNameValidator)" \r
+                                                                                                               onClick="@command('onActiveClicked')" id="ActiveCheckbox"/>\r
+                                                                                               </row>\r
+                                                                                               <row>\r
+                                                                                                       <label value="Execute immediate"/>\r
+                                                                                                       <checkbox disabled="true" value="@bind(empty jem2.editingJob.executeimmediate ? false : jem2.editingJob.executeimmediate)" \r
+                                                                                                               onClick="@command('onExecuteImmediateClicked')" id="ExecuteImmediateCheckbox"/>\r
+                                                                                               </row>\r
+                                                                                               <row>\r
+                                                                                                       <label value="Cron expression"/>\r
+                                                                                                       <textbox value="@bind(jem2.editingJob.cronexpression) @validator(jem2.cronExpressionValidator)" instant="true"/>\r
+                                                                                               </row>\r
+                                                                                               <row>\r
+                                                                                                       <label value="Next execution"/>\r
+                                                                                                       <label value="@bind(jem2.editingJob.nextTime)"/>\r
                                                                                                </row>\r
-<!--                                                                                           <row> -->\r
-<!--                                                                                                   <label value="Template"/> -->\r
-<!--                                                                                                   <textbox id="templateNameTextbox"  -->\r
-<!--                                                                                                           value="@bind(jem.selectedJob.template)" onChange="@command('onTemplateNameChanged')"/> -->\r
-<!--                                                                                           </row> -->\r
-<!--                                                                                           <row> -->\r
-<!--                                                                                                   <label value="Active"/> -->\r
-<!--                                                                                                   <checkbox id="activeCheckbox"  -->\r
-<!--                                                                                                           value="@bind(empty jem.selectedJob.active ? false : jem.selectedJob.active)" onClick="@command('onActiveChanged')"/> -->\r
-<!--                                                                                           </row> -->\r
-<!--                                                                                           <row> -->\r
-<!--                                                                                                   <label value="Execute immediate"/> -->\r
-<!--                                                                                                   <checkbox id="executeImmediateCheckbox"  -->\r
-<!--                                                                                                           value="@bind(empty jem.selectedJob.executeimmediate ? false : jem.selectedJob.executeimmediate)" onClick="@command('onExecuteImmediateChanged')"/> -->\r
-<!--                                                                                           </row> -->\r
-<!--                                                                                           <row> -->\r
-<!--                                                                                                   <label value="Cron expression"/> -->\r
-<!--                                                                                                   <textbox id="cronExpressionTextbox"  -->\r
-<!--                                                                                                           value="@bind(jem.selectedJob.cronexpression)" onChange="@command('onCronExpressionChanged')"/> -->\r
-<!--                                                                                           </row> -->\r
-<!--                                                                                           <row> -->\r
-<!--                                                                                                   <label value="Next execution"/> -->\r
-<!--                                                                                                   <label value="@bind(jem.selectedJob.nextTime)"/> -->\r
-<!--                                                                                           </row> -->\r
                                                                                        </rows>\r
                                                                                </grid>\r
                                                                        </north>\r
                                                                        <center border="none" flex="true">\r
-                                                                               <grid model="@load(jem.editingJob.parameters)" style="border: none; background: #e3e3e3 !important;"\r
+                                                                               <grid model="@load(jem2.editingJob.parameters)" style="border: none; background: #e3e3e3 !important;"\r
                                                                                        oddRowSclass="listbox-odd-style" sclass="listbox-normal-style">\r
                                                                                        <columns sizable="true">\r
                                                                                                <column label="Name" hflex="1"/>\r
                                                                                        <rows>\r
                                                                                                <template name="model">\r
                                                                                                        <row>\r
-<!--                                                                                                           <textbox id="parameterNameTextbox" value="@load(each.name)" onChange="@command('onParameterNameChanged')"/> -->\r
-<!--                                                                                                           <textbox id="parameterValueTextbox" value="@load(each.value)" onChange="@command('onParameterValueChanged')"/> -->\r
-<!--                                                                                                           <textbox id="parameterTypeTextbox" value="@load(each.type)" onChange="@command('onParameterTypeChanged')"/> -->\r
-                                                                                                               <label value="@load(each.name)" />\r
-                                                                                                               <label value="@load(each.value)" />\r
-                                                                                                               <label value="@load(each.type)" />\r
+                                                                                                               <textbox value="@bind(each.name) @validator(jem2.parameterNameValidator)" />\r
+                                                                                                               <textbox value="@bind(each.value) @validator(jem2.parameterValueValidator)" />\r
+                                                                                                               <textbox value="@bind(each.type) @validator(jem2.parameterTypeValidator)" />\r
+<!--                                                                                                           <label value="@load(each.name)" /> -->\r
+<!--                                                                                                           <label value="@load(each.value)" /> -->\r
+<!--                                                                                                           <label value="@load(each.type)" /> -->\r
                                                                                                        </row>\r
                                                                                                </template>\r
                                                                                        </rows>\r
                                                        </tabpanel>\r
                                                        <tabpanel>\r
                                                                <label height="100%" ca:data-syntax-highlight="true" multiline="true" pre="true" \r
-                                                                       value="@bind(jem.selectedJob['xml'])" />\r
+                                                                       value="@bind(jem2.editingJob['xml'])" />\r
                                                        </tabpanel>\r
                                                        <tabpanel>\r
-<!--                                                           <vlayout> -->\r
-                                                                       <include src="pages/processVisualizer2.zul" />\r
-<!--                                                                   <hlayout> -->\r
-<!--                                                                           <label value="Folyamat neve:"/> -->\r
-<!--                                                                           <textbox id="processName"/> -->\r
-<!--                                                                           <label value="Időzítés:"/> -->\r
-<!--                                                                           <textbox id="processTiming"/> -->\r
-<!--                                                                           <checkbox id="multiInstance" /> -->\r
-<!--                                                                           <label value="Csak egy példányban fusson"/> -->\r
-<!--                                                                   </hlayout> -->\r
-<!--                                                                   <hlayout> -->\r
-<!--                                                                           <checkbox id="useSessionlog" /> -->\r
-<!--                                                                           <label value="Folyamatszintű napló készítése"/> -->\r
-<!--                                                                           <checkbox id="active" /> -->\r
-<!--                                                                           <label value="Fusson automatikusan"/> -->\r
-<!--                                                                           <checkbox id="executeImmediate" /> -->\r
-<!--                                                                           <label value="A rendszer elindulásakor automatikusan lefut"/> -->\r
-<!--                                                                   </hlayout> -->\r
-<!--                                                           </vlayout> -->\r
+                                                               <include src="pages/processVisualizer2.zul" />\r
                                                        </tabpanel>\r
                                                </tabpanels>\r
                                        </tabbox>\r
                                </vlayout>\r
                        </east>\r
                </borderlayout>\r
-               <div hflex="true" vflex="min" align="center">\r
-<!--                   <button id="reloadButton" label="Frissítés" onClick="@command('reload')" /> -->\r
-<!--                   <button id="closeButton" label="Mégsem" onClick="@command('close')" /> -->\r
-<!--                   <button id="executeButton" label="Futtatás" onClick="@command('execute')" /> -->\r
-               </div>\r
        </vlayout>\r
 </zk>\r