Bläddra i källkod

JB Progress bar wdg provides 2 different information which was causing issues with fetching of logs (#1783)

* fix progress bar and logs icon in oozie wf when run

* included information for both wdg with lastindex '@' and '-'.

ID with '@' for last index provides: wdg_hive2-cec1746-4d3a-8320-40a3cc1e560b
ID with '-' provides: wdg_bcedc7ef-bae0-058b-d01a-17078fa73da8"
Mahesh Balakrishnan 4 år sedan
förälder
incheckning
90b5f052bb

+ 7 - 3
apps/oozie/src/oozie/templates/dashboard/list_oozie_workflow_graph.mako

@@ -87,9 +87,13 @@ ${ dashboard.import_layout() }
                     _w = viewModel.getWidgetById('33430f0f-ebfa-c3ec-f237-3e77efa03d0a');
                   }
                   else {
-                    var actionName = actionId.toLowerCase().substr(actionId.lastIndexOf('@') + 1)
-                    if ($("[id^=wdg_][id*=" + actionName + "]").length > 0) {
-                      _w = viewModel.getWidgetById($("[id^=wdg_][id*=" + actionName + "]").attr("id").substr(4));
+                    var actionNameNew = actionId.toLowerCase().substr(actionId.lastIndexOf('@') + 1)
+                    var actionNameOld = actionId.toLowerCase().substr(actionId.lastIndexOf('-') + 1)
+                    if ($("[id^=wdg_][id*=" + actionNameNew + "]").length > 0) {
+                      _w = viewModel.getWidgetById($("[id^=wdg_][id*=" + actionNameNew + "]").attr("id").substr(4));
+                    }
+                    else if ($("[id^=wdg_][id*=" + actionNameOld + "]").length > 0) {
+                      _w = viewModel.getWidgetById($("[id^=wdg_][id*=" + actionNameOld + "]").attr("id").substr(4));
                     }
                     else {
                       _w = viewModel.getWidgetById('33430f0f-ebfa-c3ec-f237-3e77efa03d0a');