File tree Expand file tree Collapse file tree 2 files changed +21
-12
lines changed
app/javascript/components/request-workflow-status Expand file tree Collapse file tree 2 files changed +21
-12
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ export const workflowStateTypes = {
55 failure : { text : 'failure' , tagType : 'red' } ,
66 failed : { text : 'failed' , tagType : 'gray' } ,
77 pending : { text : 'pending' , tagType : 'gray' } ,
8+ running : { text : 'running' , tagType : 'gray' } ,
89} ;
910
1011/** Function to get the header data of workflow states table. */
Original file line number Diff line number Diff line change @@ -87,11 +87,14 @@ const RequestWorkflowStatusItem = ({ recordId }) => {
8787 /** Function to render the status of workflow. */
8888 const renderStatusTag = ( ) => {
8989 const status = workflowStateTypes [ data . responseData . status ] ;
90- return (
91- < Tag type = { status . tagType } title = { status . text } >
92- { status . text . toUpperCase ( ) }
93- </ Tag >
94- ) ;
90+ if ( typeof ( status ) === 'object' && status . tagType && status . text ) {
91+ return (
92+ < Tag type = { status . tagType } title = { status . text } >
93+ { status . text . toUpperCase ( ) }
94+ </ Tag >
95+ ) ;
96+ }
97+ return null ;
9598 } ;
9699
97100 /** Function to render the status of workflow status. */
@@ -117,13 +120,18 @@ const RequestWorkflowStatusItem = ({ recordId }) => {
117120 ) ;
118121
119122 /** Function to render the list. */
120- const renderList = ( { headers, rows } ) => (
121- < MiqDataTable
122- headers = { headers }
123- rows = { rows }
124- mode = "request-workflow-status"
125- />
126- ) ;
123+ const renderList = ( { headers, rows } ) => {
124+ rows . forEach ( ( row ) => {
125+ row . id = `${ row . id } +${ row . duration } ` ;
126+ } ) ;
127+ return (
128+ < MiqDataTable
129+ headers = { headers }
130+ rows = { rows }
131+ mode = "request-workflow-status"
132+ />
133+ ) ;
134+ } ;
127135
128136 return (
129137 < >
You can’t perform that action at this time.
0 commit comments