From b688ab883e9c112829c05ed1717e8f29ccd5479b Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Mon, 19 Sep 2022 13:41:04 +1000 Subject: web: Put status icon into one label In some recent changes I've been looking at the narrow view of the console page. One thing that remains inconsistent is the magnifying arrow; it can jump around depending on the page width and in my subjective opinion it looks a little out of context. This proposes making a single "pill" for the status and magnifying icon. The width should be consistent, and the magnifying glass floating right behind a divider to inidicate it is separate to the status -- it is also set to not break so it stays together. Change-Id: I183d4c939a1c74e21198564d1d51e33ecdbc813c --- web/src/containers/build/Console.jsx | 51 ++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/web/src/containers/build/Console.jsx b/web/src/containers/build/Console.jsx index 74f1274d7..9faf59974 100644 --- a/web/src/containers/build/Console.jsx +++ b/web/src/containers/build/Console.jsx @@ -29,6 +29,7 @@ import { DataListItemCells, DataListToggle, DataListContent, + Divider, Flex, FlexItem, Label, @@ -231,35 +232,39 @@ class HostTask extends React.Component { {name} ) - let label = null + let labelColor = null + let labelString = null + if (this.state.failed) { - label = + labelColor = 'red' + labelString = 'Failed' } else if (this.state.changed) { - label = + labelColor = 'orange' + labelString = 'Changed' } else if (this.state.skipped) { - label = + labelColor = 'grey' + labelString = 'Skipped' } else if (this.state.ok) { - label = + labelColor = 'green' + labelString = 'OK' } dataListCells.push( - - - Click for details}> - - - - - Click for details}> - {label} - - - + Click for details}> + + ) dataListCells.push( @@ -325,7 +330,9 @@ class HostTask extends React.Component { } const modalDescription = - {label} + + + -- cgit v1.2.1