mirror of
https://github.com/hashicorp/vault.git
synced 2025-09-04 21:41:09 +02:00
* increase bar width, show new clients only, add timestamp to header, update bar color * remove extra timestamps, switch to basic bar chart * update docs and styling * remove unneeded timestamp args * show new client running totatls * initial test updates * update test * clean up new client total calc into util fn * bits of clean up and todos * update tests * update to avoid activity call when in CE and missing either start or end time * update todos * update tests * tidying * move new client total onto payload for easier access * update more tests to align with copy changes and new client totals * remove addressed TODOs * Update comment * add changelog entry * revert to using total, update tests and clean up * Update ui/app/components/clients/page/counts.hbs Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com> * remove duplicate charts and update descriptions * update tests after removing extra charts * tidy * update instances of byMonthActivityData to use byMonthNewClients and update tests * Update ui/app/components/clients/running-total.ts Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com> * update chart styles --------- Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
186 lines
3.7 KiB
SCSS
186 lines
3.7 KiB
SCSS
@use 'sass:color';
|
|
@use '../utils/box-shadow_variables';
|
|
@use '../utils/color_variables';
|
|
@use '../utils/font_variables';
|
|
@use '../utils/size_variables';
|
|
|
|
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
.chart-wrapper {
|
|
border: box-shadow_variables.$light-border;
|
|
border-radius: size_variables.$radius-large;
|
|
padding: size_variables.$spacing-12 size_variables.$spacing-24;
|
|
margin-bottom: size_variables.$spacing-16;
|
|
}
|
|
|
|
// GRID LAYOUT //
|
|
.single-chart-grid {
|
|
display: grid;
|
|
grid-template-columns: 1fr 0.3fr 3.7fr;
|
|
grid-template-rows: 0.5fr 1fr 1fr 0.5fr 0.25fr;
|
|
width: 100%;
|
|
&.no-legend {
|
|
grid-template-rows: 0.5fr 1fr 1fr 0.25fr;
|
|
}
|
|
}
|
|
|
|
.chart-header {
|
|
grid-column-start: 1;
|
|
grid-column-end: span col4-end;
|
|
grid-row-start: 1;
|
|
box-shadow: inset 0 -1px 0 color_variables.$ui-gray-200;
|
|
}
|
|
|
|
.has-header-link {
|
|
display: grid;
|
|
grid-template-columns: 4fr 1fr;
|
|
|
|
.header-right {
|
|
text-align: right;
|
|
> button {
|
|
&:hover,
|
|
&:focus {
|
|
background-color: transparent;
|
|
background-color: color.adjust(color_variables.$ui-gray-050, $lightness: -5%);
|
|
border-color: color.adjust(color_variables.$ui-gray-300, $lightness: -5%);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.chart-container-wide {
|
|
grid-column-start: 3;
|
|
grid-column-end: 4;
|
|
grid-row-start: 2;
|
|
grid-row-end: span 3;
|
|
justify-self: center;
|
|
height: 300px;
|
|
max-width: 700px;
|
|
width: 100%;
|
|
|
|
svg.chart {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
}
|
|
|
|
.chart-container-left {
|
|
grid-column-start: 1;
|
|
grid-column-end: 4;
|
|
grid-row-start: 2;
|
|
grid-row-end: 5;
|
|
padding-bottom: size_variables.$spacing-36;
|
|
margin-bottom: size_variables.$spacing-12;
|
|
box-shadow: inset 0 -1px 0 color_variables.$ui-gray-200;
|
|
|
|
> h2 {
|
|
padding-left: 18px;
|
|
}
|
|
> p {
|
|
padding-left: 18px;
|
|
}
|
|
}
|
|
|
|
.chart-container-right {
|
|
grid-column-start: 4;
|
|
grid-column-end: 8;
|
|
grid-row-start: 2;
|
|
grid-row-end: 5;
|
|
padding-bottom: size_variables.$spacing-36;
|
|
margin-bottom: size_variables.$spacing-12;
|
|
box-shadow: inset 0 -1px 0 color_variables.$ui-gray-200;
|
|
|
|
> h2 {
|
|
padding-left: 18px;
|
|
}
|
|
> p {
|
|
padding-left: 18px;
|
|
}
|
|
}
|
|
|
|
.chart-empty-state {
|
|
place-self: center stretch;
|
|
grid-row-end: span 2;
|
|
grid-column-start: 1;
|
|
grid-column-end: span 3;
|
|
max-width: none;
|
|
padding-right: 20px;
|
|
padding-left: 20px;
|
|
display: flex;
|
|
|
|
> div {
|
|
box-shadow: none !important;
|
|
}
|
|
|
|
> div.empty-state {
|
|
white-space: nowrap;
|
|
align-self: stretch;
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
.chart-subTitle {
|
|
grid-column-start: 1;
|
|
grid-column-end: 3;
|
|
grid-row-start: 2;
|
|
}
|
|
|
|
.data-details-top {
|
|
grid-column-start: 1;
|
|
grid-column-end: 3;
|
|
grid-row-start: 3;
|
|
}
|
|
|
|
.data-details-bottom {
|
|
grid-column-start: 1;
|
|
grid-column-end: 3;
|
|
grid-row-start: 4;
|
|
}
|
|
|
|
.legend {
|
|
grid-row-start: 5;
|
|
grid-column-start: 2;
|
|
grid-column-end: 6;
|
|
align-self: center;
|
|
justify-self: center;
|
|
font-size: size_variables.$size-9;
|
|
}
|
|
|
|
// FONT STYLES //
|
|
|
|
h2.chart-title {
|
|
font-weight: font_variables.$font-weight-bold;
|
|
font-size: size_variables.$size-5;
|
|
line-height: size_variables.$spacing-24;
|
|
margin-bottom: size_variables.$spacing-4;
|
|
}
|
|
|
|
p.chart-description {
|
|
color: color_variables.$ui-gray-700;
|
|
font-size: 14px;
|
|
line-height: 18px;
|
|
margin-bottom: size_variables.$spacing-8;
|
|
}
|
|
|
|
p.chart-subtext {
|
|
color: color_variables.$ui-gray-500;
|
|
font-size: size_variables.$size-8;
|
|
line-height: 16px;
|
|
margin-top: size_variables.$spacing-8;
|
|
}
|
|
|
|
h3.data-details {
|
|
font-weight: font_variables.$font-weight-bold;
|
|
font-size: size_variables.$size-8;
|
|
line-height: 14px;
|
|
margin-bottom: size_variables.$spacing-8;
|
|
}
|
|
|
|
p.data-details {
|
|
font-weight: font_variables.$font-weight-normal;
|
|
font-size: size_variables.$size-4;
|
|
}
|