Skip to content

Commit ff56025

Browse files
committed
feat(summary): style on ui
1 parent d5eb326 commit ff56025

File tree

1 file changed

+41
-7
lines changed

1 file changed

+41
-7
lines changed

web/src/components/AnsibleStageView.vue

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,47 @@
8787
<tbody>
8888
<tr v-for="(host, index) in hosts" :key="index">
8989
<td>{{ host.host }}</td>
90-
<td>{{ host.changed }}</td>
91-
<td>{{ host.failed }}</td>
92-
<td>{{ host.ignored }}</td>
93-
<td>{{ host.ok }}</td>
94-
<td>{{ host.rescued }}</td>
95-
<td>{{ host.skipped }}</td>
96-
<td>{{ host.unreachable }}</td>
90+
91+
<td :style="{
92+
color: (host.changed > 0 ? 'brown' : undefined),
93+
'font-weight': (host.changed > 0 ? 'bold' : undefined),
94+
}"
95+
>{{ host.changed }}</td>
96+
97+
<td :style="{
98+
color: (host.failed > 0 ? 'red' : undefined),
99+
'font-weight': (host.failed > 0 ? 'bold' : undefined),
100+
}">{{ host.failed }}</td>
101+
102+
<td :style="{
103+
color: (host.ignored > 0 ? 'red' : undefined),
104+
'font-weight': (host.ignored > 0 ? 'bold' : undefined),
105+
}"
106+
>{{ host.ignored }}</td>
107+
108+
<td :style="{
109+
color: (host.ok > 0 ? 'green' : undefined),
110+
'font-weight': (host.ok > 0 ? 'bold' : undefined),
111+
}"
112+
>{{ host.ok }}</td>
113+
114+
<td :style="{
115+
'font-weight': (host.rescued > 0 ? 'bold' : undefined),
116+
}"
117+
>{{ host.rescued }}</td>
118+
119+
<td :style="{
120+
color: (host.skipped > 0 ? 'rgb(0,170,170)' : undefined),
121+
'font-weight': (host.skipped > 0 ? 'bold' : undefined),
122+
}"
123+
>{{ host.skipped }}</td>
124+
125+
<td :style="{
126+
color: (host.unreachable > 0 ? 'red' : undefined),
127+
'font-weight': (host.unreachable > 0 ? 'bold' : undefined),
128+
}">
129+
{{ host.unreachable }}
130+
</td>
97131
</tr>
98132
</tbody>
99133
</template>

0 commit comments

Comments
 (0)