Skip to content

Commit 0ee52c8

Browse files
committed
Merge pull request #9693 from GilbertCherrie/workflow_table_remove_icon_text
Workflow table remove icon text
2 parents 5b1208e + c4aea55 commit 0ee52c8

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

app/stylesheet/miq-data-table.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,3 +418,10 @@ table.miq_preview {
418418
color: var(--red);
419419
}
420420
}
421+
422+
#workflows_table {
423+
td.no_text {
424+
width: 50px;
425+
padding-left: 24px;
426+
}
427+
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
#main_div
2-
= render :partial => 'layouts/gtl'
2+
#workflows_table
3+
= render :partial => 'layouts/gtl'

lib/gtl_formatter.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ class GtlFormatter
1212
COLUMN_WITH_ICON = {
1313
'authentication_status' => 'authentication_status_image',
1414
'last_compliance_status' => 'last_compliance_status_image',
15+
}.freeze
16+
17+
COLUMN_WITH_ICON_NO_TEXT = {
1518
'payload_valid' => 'payload_valid_image',
1619
}.freeze
1720

@@ -134,6 +137,11 @@ def self.format_cols(view, row, controller, options)
134137
item = {:title => text,
135138
:icon => icon,
136139
:text => text}.compact
140+
elsif COLUMN_WITH_ICON_NO_TEXT.key?(col)
141+
icon = send(COLUMN_WITH_ICON_NO_TEXT[col], record)
142+
text = format_col_for_display(view, row, col)
143+
item = {:title => text,
144+
:icon => icon}.compact
137145
elsif COLUMN_WITH_TIME.include?(col)
138146
celltext = format_time_for_display(row, col)
139147
elsif COLUMN_WITH_OS_TEXT.include?(col)

0 commit comments

Comments
 (0)