Skip to content

Commit

Permalink
Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidResende0 committed Sep 29, 2023
1 parent 5fe3ef2 commit 6ab1930
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/javascript/components/request-workflow-status/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const workflowStatusData = (response) => {
}
const rows = response.context ? rowData(response.context) : [];
const headers = headerData();
const name = response.name || response.description || `ConfigurationScript#${response.id}`;
const name = response.name || response.description;
return {
headers, rows, status: response.status, name, parentId: response.parent_id, id: response.id, type: response.type,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ const RequestWorkflowStatusItem = ({ recordId }) => {
isLoading: false,
parentName: response2.name,
validType: true,
message: responseData && responseData.status === workflowStateTypes.error.text ? __('Error message goes here') : undefined,
message: responseData && responseData.status === workflowStateTypes.error.text
? __('An error has occurred with this workflow') : undefined,
});
} else {
setData({
Expand All @@ -64,7 +65,7 @@ const RequestWorkflowStatusItem = ({ recordId }) => {
});
};

/** Logic to reload the component every (RELOAD) 5 seconds. */
/** Logic to reload the component every so often (RELOAD). */
useEffect(() => {
const omitStatus = [workflowStateTypes.success.text, workflowStateTypes.error.text];
if (reloadCount.current <= reloadLimit && data.responseData && data.responseData.status && !omitStatus.includes(data.responseData.status)) {
Expand Down
1 change: 0 additions & 1 deletion app/views/miq_request/_request.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,3 @@
- else
= render :partial => "reconfigure_show"
4 changes: 2 additions & 2 deletions app/views/miq_request/_st_prov_show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
%hr

- record_ids = request_task_configuration_script_ids(@miq_request)
- if record_ids.size > 0
- if record_ids.any?
%h3
= _("Workflow States")
= react('RequestWorkflowStatus', {:ids => record_ids, :recordId => @miq_request.miq_request_tasks.first.options[:configuration_script_id]})
= react('RequestWorkflowStatus', {:ids => record_ids})

0 comments on commit 6ab1930

Please sign in to comment.