From b8aec634139e4ef2ca900c50ee1265034d017542 Mon Sep 17 00:00:00 2001 From: RachelElysia <71795832+RachelElysia@users.noreply.github.com> Date: Mon, 3 May 2021 18:58:23 -0400 Subject: [PATCH] Host details page styling (#710) * Host details page restyled to match Figma * Page uses flexboxes * Text match Figma --- assets/images/icon-chevron-down-9x6@2x.png | Bin 0 -> 408 bytes .../hosts/HostDetailsPage/HostDetailsPage.jsx | 55 ++++++++++-------- .../pages/hosts/HostDetailsPage/_styles.scss | 50 ++++++++++++---- 3 files changed, 71 insertions(+), 34 deletions(-) create mode 100644 assets/images/icon-chevron-down-9x6@2x.png diff --git a/assets/images/icon-chevron-down-9x6@2x.png b/assets/images/icon-chevron-down-9x6@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..46c0151dfe773ed186915a143068ba7b8b261fa7 GIT binary patch literal 408 zcmV;J0cZY+P)HK~#7F?Uv6` zgHRC0cLVB`QqqDQmRlm>e;?!2<#Dw)`C}7N=j*JSPTP@wB~MRVL1*CI)1QB3=`n48o-} z-^xIb_&;3UlMv%iFuTS(5#sI>%gbyY<|M?Z0=?p(m9BV=b_Mo{Zy|5IT|()NNrGto z-H2bf64x@Y`N5KzhAzcx#65s&zB@q&TSRQ&Y|SHpK9z7Y^OMPDNQP*?!}O}inR%>) zwYJ|b+GF_g7Q_HPlyFmt+bPDRiP0XYO;la+tb`+!$aPH^uj1@ANQm*M#&u0todwxE zNPA5bcp@Rzr(wrLyBnnW4u43BluEv{T}&R&!TAFkjF}8CSsNk%0000 query an
offline host. - @@ -219,7 +222,7 @@ export class HostDetailsPage extends Component { }); return ( -
+

Labels

{labels.length === 0 ? (

No labels are associated with this host.

@@ -344,6 +347,12 @@ export class HostDetailsPage extends Component { Object.keys(object).forEach((key) => { if (object[key] === "") { object[key] = "--"; + } else if ( + key === "logger_tls_period" || + key === "config_tls_refresh" || + key === "distributed_interval" + ) { + object[key] = `${object[key]} sec`; } }); }); @@ -356,6 +365,12 @@ export class HostDetailsPage extends Component { return (
+
+ + back chevron + Back to Hosts + +
@@ -395,22 +410,20 @@ export class HostDetailsPage extends Component {
{renderActionButtons()}
-
+

About this host

- Last seen - Enrolled - Uptime -
-
- - {humanHostLastSeen(aboutData.seen_time)} - + Created at {humanHostEnrolled(aboutData.last_enrolled_at)} + Updated at + + {humanHostLastSeen(aboutData.seen_time)} + + Uptime {humanHostUptime(aboutData.uptime)} @@ -419,33 +432,27 @@ export class HostDetailsPage extends Component {
Hardware model - Serial number - IP address -
-
{aboutData.hardware_model} + Serial number {aboutData.hardware_serial} + IPv4 {aboutData.primary_ip}
-
-

Osquery configuration

-
-
- Config refresh +
+

Agent Options

+
+
+ Config TLS refresh {osqueryData.config_tls_refresh} -
-
Logger TLS period {osqueryData.logger_tls_period} -
-
Distributed interval {osqueryData.distributed_interval} diff --git a/frontend/pages/hosts/HostDetailsPage/_styles.scss b/frontend/pages/hosts/HostDetailsPage/_styles.scss index 126722c77e..f56ed3adba 100644 --- a/frontend/pages/hosts/HostDetailsPage/_styles.scss +++ b/frontend/pages/hosts/HostDetailsPage/_styles.scss @@ -1,17 +1,34 @@ +a { + font-size: $x-small; + color: $core-vibrant-blue; + font-weight: $bold; + text-decoration: none; +} + .host-details { display: flex; - flex-direction: column; + flex-wrap: wrap; + flex-grow: 1; + align-content: flex-start; padding-bottom: 50px; min-width: 0; + background-color: $ui-off-white; + gap: $pad-large; .section { + flex: 100%; display: flex; flex-direction: column; - margin: $pad-xxlarge 0 0; + background-color: $core-white; + border-radius: 16px; + border: 1px solid $ui-fleet-blue-15; + padding: $pad-xxlarge; + box-shadow: 0px 3px 0px rgba(226, 228, 234, 0.4); &__header { - margin: 0 0 $pad-medium; font-size: $medium; + font-weight: bold; + margin: 0 0 $pad-medium 0; } .info { @@ -94,7 +111,8 @@ } } - .about { + .about, + .osquery { .info { &__item { &--about { @@ -107,18 +125,25 @@ display: flex; flex-direction: column; margin-right: $pad-xxlarge; + } + &__data { + margin-bottom: $pad-medium; - span { - margin-bottom: $pad-medium; - - &:last-child { - margin-bottom: 0; - } + &:last-child { + margin-bottom: 0; } } } } + .col-50 { + flex: 2; + } + + .col-25 { + flex: 1; + } + .status { color: $core-fleet-black; text-transform: capitalize; @@ -224,4 +249,9 @@ white-space: nowrap; } } + + #back-chevron { + width: 12px; + margin-right: 10px; + } }