From 5539f846c9d4910cc0fe5b6f800b87bcfb4ee46f Mon Sep 17 00:00:00 2001 From: Joshua Rodriguez Date: Tue, 12 Nov 2024 13:15:02 -0800 Subject: [PATCH] Fix actions dropdown on Processes page to show disabled actions. --- install/cws-ui/processes.ftl | 88 ++++++++++++++++++------------------ 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/install/cws-ui/processes.ftl b/install/cws-ui/processes.ftl index 7f144a0f..24055108 100644 --- a/install/cws-ui/processes.ftl +++ b/install/cws-ui/processes.ftl @@ -981,15 +981,15 @@ + '' + '' + '`).appendTo(".above-table-buttons"); @@ -998,9 +998,9 @@ + '' + '' + '`).appendTo(".above-table-buttons"); @@ -1446,28 +1446,28 @@ } // Disable everything - $("#action_disable").addClass("disabled"); - $("#action_disable").removeClass("enabled"); - $("#action_enable").addClass("disabled"); - $("#action_enable").removeClass("enabled"); - $("#action_retry_incident").addClass("disabled"); - $("#action_retry_incident").removeClass("enabled"); - $("#action_retry_failed_to_start").addClass("disabled"); - $("#action_retry_failed_to_start").removeClass("enabled"); - $("#action_mark_as_resolved").addClass("disabled"); - $("#action_mark_as_resolved").removeClass("enabled"); - $("#action_open_selected_new_tabs").addClass("disabled"); - $("#action_open_selected_new_tabs").removeClass("enabled"); - $("#action_copy_all_selected_history_links").addClass("disabled"); - $("#action_copy_all_selected_history_links").removeClass("enabled"); - $("#action_download_selected_json").addClass("disabled"); - $("#action_download_selected_json").removeClass("enabled"); - $("#action_download_selected_csv").addClass("disabled"); - $("#action_download_selected_csv").removeClass("enabled"); - $("#action_download_selected_list").addClass("disabled"); - $("#action_download_selected_list").removeClass("enabled"); - $("#action_delete_selected").addClass("disabled"); - $("#action_delete_selected").removeClass("enabled"); + $("#action_disable_atag").addClass("disabled"); + $("#action_disable_atag").removeClass("enabled"); + $("#action_enable_atag").addClass("disabled"); + $("#action_enable_atag").removeClass("enabled"); + $("#action_retry_incident_atag").addClass("disabled"); + $("#action_retry_incident_atag").removeClass("enabled"); + $("#action_retry_failed_to_start_atag").addClass("disabled"); + $("#action_retry_failed_to_start_atag").removeClass("enabled"); + $("#action_mark_as_resolved_atag").addClass("disabled"); + $("#action_mark_as_resolved_atag").removeClass("enabled"); + $("#action_open_selected_new_tabs_atag").addClass("disabled"); + $("#action_open_selected_new_tabs_atag").removeClass("enabled"); + $("#action_copy_all_selected_history_links_atag").addClass("disabled"); + $("#action_copy_all_selected_history_links_atag").removeClass("enabled"); + $("#action_download_selected_json_atag").addClass("disabled"); + $("#action_download_selected_json_atag").removeClass("enabled"); + $("#action_download_selected_csv_atag").addClass("disabled"); + $("#action_download_selected_csv_atag").removeClass("enabled"); + $("#action_download_selected_list_atag").addClass("disabled"); + $("#action_download_selected_list_atag").removeClass("enabled"); + $("#action_delete_selected_atag").addClass("disabled"); + $("#action_delete_selected_atag").removeClass("enabled"); // Remove hrefs from the anchor tags $("#action_disable_atag").removeAttr("href"); @@ -1486,50 +1486,50 @@ // only disabled rows are selected if (disabled) { - $("#action_enable").removeClass("disabled"); + $("#action_enable_atag").removeClass("disabled"); $("#action_enable_atag").attr("href", "javascript:action_enable_rows();"); } // only pending rows are selected else if (pending) { - $("#action_disable").removeClass("disabled"); + $("#action_disable_atag").removeClass("disabled"); $("#action_disable_atag").attr("href", "javascript:action_disable_rows();"); } // only incident rows are selected else if (incident) { - $("#action_retry_incident").removeClass("disabled"); + $("#action_retry_incident_atag").removeClass("disabled"); $("#action_retry_incident_atag").attr("href", "javascript:action_retry_incident_rows()"); } // only failedToStart rows are selected else if (failedToStart) { - $("#action_retry_failed_to_start").removeClass("disabled"); + $("#action_retry_failed_to_start_atag").removeClass("disabled"); $("#action_retry_failed_to_start_atag").attr("href", "javascript:action_retry_failed_to_start();"); } // only failed rows are selected else if (failed) { - $("#action_mark_as_resolved").removeClass("disabled"); + $("#action_mark_as_resolved_atag").removeClass("disabled"); $("#action_mark_as_resolved_atag").attr("href", "javascript:action_mark_as_resolved();"); } else if (running) { - $("#action_delete_selected").removeClass("disabled"); + $("#action_delete_selected_atag").removeClass("disabled"); $("#action_delete_selected_atag").attr("href", "javascript:action_delete_selected();"); } if ((numSelected > 0)) { - $("#action_download_selected_list").removeClass("disabled"); + $("#action_download_selected_list_atag").removeClass("disabled"); $("#action_download_selected_list_atag").attr("href", "javascript:downloadListJSON();"); if (numPendingSelected === 0) { - $("#action_open_selected_new_tabs").removeClass("disabled"); + $("#action_open_selected_new_tabs_atag").removeClass("disabled"); $("#action_open_selected_new_tabs_atag").on("click", function() {action_open_selected_new_tabs();}) // $("#action_open_selected_new_tabs_atag").attr("href", "javascript:action_open_selected_new_tabs();"); - $("#action_copy_all_selected_history_links").removeClass("disabled"); + $("#action_copy_all_selected_history_links_atag").removeClass("disabled"); $("#action_copy_all_selected_history_links_atag").on("click", function() {action_copy_all_selected_history_links();}) - $("#action_download_selected_json").removeClass("disabled"); + $("#action_download_selected_json_atag").removeClass("disabled"); $("#action_download_selected_json_atag").on("click", function() {downloadSelectedJSON();}) // $("#action_download_selected_json_atag").attr("href", "javascript:downloadSelectedJSON();"); - $("#action_download_selected_csv").removeClass("disabled"); + $("#action_download_selected_csv_atag").removeClass("disabled"); $("#action_download_selected_csv_atag").on("click", function() {downloadSelectedCSV();}) // $("#action_download_selected_csv_atag").attr("href", "javascript:downloadSelectedCSV();");