Skip to content

Commit b81a242

Browse files
committed
Updates tooltip for invalid workflow
1 parent 5d6c514 commit b81a242

File tree

3 files changed

+11
-17
lines changed

3 files changed

+11
-17
lines changed

app/javascript/components/miq-data-table/miq-table-cell.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ const MiqTableCell = ({
2525
const alignClass = longText ? 'vertical_align_top' : '';
2626
const longerTextClass = veryLongText ? 'truncate_longer_text' : '';
2727

28+
const cellTitle = cell.data.title ? cell.data.title : cell.value;
2829
const truncateText = (
29-
<span title={cell.value} className={classNames('bx--front-line', wrapClass, longerTextClass)}>
30+
<span title={cellTitle} className={classNames('bx--front-line', wrapClass, longerTextClass)}>
3031
{cell.value}
3132
</span>
3233
);

app/javascript/components/workflows/helper.js

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@ const entryPointsHeaderInfo = () => [
77
];
88

99
/** Function to return the cell data for a row item. */
10-
const cellInfo = (workflow) => [
11-
{ text: workflow.configuration_script_source ? workflow.configuration_script_source.name : '' },
12-
{ text: workflow.name },
13-
];
10+
const cellInfo = (workflow) => {
11+
const isValid = workflow.payload_valid;
12+
const workflowNameTitle = !isValid ? `${workflow.name} (${__('Invalid Workflow')})` : workflow.name;
13+
14+
return [
15+
{ text: workflow.configuration_script_source ? workflow.configuration_script_source.name : '' },
16+
{ text: workflow.name, title: workflowNameTitle },
17+
];
18+
};
1419

1520
/** Function to return the row information for the list */
1621
const rowInfo = (headers, response) => {
@@ -26,17 +31,6 @@ const rowInfo = (headers, response) => {
2631
};
2732
});
2833

29-
// // Sort: valid workflows first (alphabetically), then invalid workflows (alphabetically)
30-
// const sortedRows = rows.sort((a, b) => {
31-
// // If both have same validity status, sort alphabetically by name
32-
// if (a.disabled === b.disabled) {
33-
// return a.name.localeCompare(b.name);
34-
// }
35-
// // Valid workflows come first
36-
// return a.disabled ? 1 : -1;
37-
// });
38-
39-
// const miqRows = rowData(headerKeys, sortedRows, false);
4034
const miqRows = rowData(headerKeys, rows, false);
4135
return miqRows.rowItems;
4236
};

app/stylesheet/miq-data-table.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,6 @@ table.miq_preview {
397397
tbody tr.disabled-row {
398398
opacity: 0.5 !important;
399399
cursor: not-allowed !important;
400-
pointer-events: none !important;
401400
color: #8d8d8d !important;
402401
background-color: #f4f4f4 !important;
403402

0 commit comments

Comments
 (0)