浏览代码

HUE-4954 [oozie] Be explicit when schedule changes need to be saved before starting

Romain Rigaux 9 年之前
父节点
当前提交
89f879a

+ 2 - 2
desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

@@ -1616,8 +1616,8 @@
             }
 
             if (self.coordinatorUuid()) {
-             self.saveScheduler();
-             self.schedulerViewModel.coordinator.refreshParameters();
+              self.saveScheduler();
+              self.schedulerViewModel.coordinator.refreshParameters();
             }
 
             hueUtils.changeURL('/notebook/editor?editor=' + data.id);

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

@@ -1108,7 +1108,13 @@ ${ hueIcons.symbols() }
     <!-- ko with: $root.selectedNotebook() -->
     <div class="tab-pane" id="scheduleTab">
       <!-- ko if: isSaved() -->
-        <a data-bind="click: showSubmitPopup">${ _('Start') }</a></br>
+        <!-- ko if: coordinatorUuid() && schedulerViewModel.coordinator.isDirty() --> 
+          <a data-bind="click: $root.saveNotebook">${ _('Changes not saved') }</a>
+        <!-- /ko -->
+        <!-- ko if: coordinatorUuid() && ! schedulerViewModel.coordinator.isDirty() --> 
+          <a data-bind="click: showSubmitPopup">${ _('Start') }</a>
+        <!-- /ko -->
+        </br>
         </br>
         <div id="schedulerEditor">
         </div>