Skip to content

Commit 3a2c171

Browse files
committed
Display invalid rows as greyed out
1 parent 2d112a1 commit 3a2c171

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

app/javascript/components/miq-data-table/helper.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export const rowData = (headerKeys, rows, hasCheckbox) => {
133133
const rowItems = [];
134134
const mergedStatus = [];
135135
rows.forEach(({
136-
cells, id, clickable, clickId,
136+
cells, id, clickable, clickId, disabled,
137137
}) => {
138138
const requiredCells = hasCheckbox ? (cells.filter((c) => !c.is_checkbox)) : cells;
139139
const { mergedCells, merged } = mergeIcons(requiredCells);
@@ -143,6 +143,7 @@ export const rowData = (headerKeys, rows, hasCheckbox) => {
143143
result.id = id;
144144
if (clickId) result.clickId = clickId;
145145
result.clickable = clickable;
146+
if (disabled !== undefined) result.disabled = disabled;
146147
return result;
147148
}, {});
148149
rowItems.push(reducedItems);

app/stylesheet/miq-data-table.scss

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,22 @@ table.miq_preview {
404404
.workflows-entry-point-modal-body {
405405
.miq-data-table {
406406
margin-top: 0px;
407+
408+
tbody tr.disabled-row {
409+
opacity: 0.5 !important;
410+
cursor: not-allowed !important;
411+
pointer-events: none !important;
412+
color: #8d8d8d !important;
413+
background-color: #f4f4f4 !important;
414+
415+
&:hover {
416+
background-color: #f4f4f4 !important;
417+
}
418+
419+
td {
420+
color: #8d8d8d !important;
421+
}
422+
}
407423
}
408424
}
409425
}
@@ -436,3 +452,21 @@ table.miq_preview {
436452
padding-left: 24px;
437453
}
438454
}
455+
456+
.automated-workflow-entry-points {
457+
tbody tr.disabled-row {
458+
opacity: 0.5 !important;
459+
cursor: not-allowed !important;
460+
pointer-events: none !important;
461+
color: #8d8d8d !important;
462+
background-color: #f4f4f4 !important;
463+
464+
&:hover {
465+
background-color: #f4f4f4 !important;
466+
}
467+
468+
td {
469+
color: #8d8d8d !important;
470+
}
471+
}
472+
}

0 commit comments

Comments
 (0)