Răsfoiți Sursa

HUE-3797 [editor] Add refresh parameter call

Romain Rigaux 9 ani în urmă
părinte
comite
6b5649b

+ 4 - 2
apps/oozie/src/oozie/static/oozie/js/coordinator-editor.ko.js

@@ -87,6 +87,9 @@ var Coordinator = function (vm, coordinator) {
     self.end_date.value(self.properties.endDateUI() + "T" + self.properties.endTimeUI());
   }
 
+  self.refreshParameters = function() {
+    self.properties.workflow.valueHasMutated();
+  }
 
   self.properties.workflow.subscribe(function (newVal) {
     if (newVal) {
@@ -188,7 +191,7 @@ var CoordinatorEditorViewModel = function (coordinator_json, credentials_json, w
   self.availableSettings = ko.observableArray([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60]);
 
   if (coordinator_json.id == null && self.coordinator.properties.workflow()) {
-    self.coordinator.properties.workflow.valueHasMutated();
+    self.coordinator.refreshParameters();
   }
 
   self.workflowModalFilter = ko.observable("");
@@ -214,7 +217,6 @@ var CoordinatorEditorViewModel = function (coordinator_json, credentials_json, w
     return null;
   }
 
-
   self.save = function (cb) {
     if (!self.isSaving()) {
       self.isSaving(true);

+ 3 - 0
desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

@@ -1376,6 +1376,9 @@
                 'last_modified': data.last_modified
               });
             }
+            if (! self.schedulerViewModel) {
+              self.loadScheduler();
+            }
             hueUtils.changeURL('/notebook/editor?editor=' + data.id);
           }
           else {

+ 1 - 1
desktop/libs/notebook/src/notebook/templates/editor_components.mako

@@ -1048,7 +1048,7 @@ ${ hueIcons.symbols() }
       <!-- ko if: $root.selectedNotebook() -->
       <!-- ko with: $root.selectedNotebook() -->
         <!-- ko if: $root.selectedNotebook().isSaved() -->
-           Refresh</br>
+          <a data-bind="click: function() { schedulerViewModel.coordinator.refreshParameters(); }">Refresh</a></br>
           <a data-bind="click: showSubmitPopup">Start</a></br>
           <a href="#scheduledJobsTab" data-toggle="tab">${_('View')}</a>