diff --git a/docs/dashboard.md b/docs/dashboard.md index 6b28d2ce86..621b9d62a4 100644 --- a/docs/dashboard.md +++ b/docs/dashboard.md @@ -11,4 +11,4 @@ Then visit `localhost:3100` to view the user interface. ## Individual Rollout view -![Rollouts List](dashboard/rollouts-ui.png) +![Rollouts List](dashboard/rollout-ui.png) diff --git a/ui/src/app/components/action-button/action-button.scss b/ui/src/app/components/action-button/action-button.scss index ee63848158..b4b95454de 100644 --- a/ui/src/app/components/action-button/action-button.scss +++ b/ui/src/app/components/action-button/action-button.scss @@ -21,6 +21,7 @@ @mixin dark-background { border: 1px solid $silver-lining; background-color: $fog; + color: $silver-lining; } &--dark > &__background { @@ -31,6 +32,7 @@ border-radius: 20px; border: 1px solid $argo-color-gray-6; background-color: $argo-color-gray-6; + color: $argo-color-gray-6; &--dark { @include dark-background; @@ -41,11 +43,13 @@ &--selected > &__background { background-color: $sherbert; border-color: $sherbert; + color: $sherbert; transform: scale(1.02); } &--dark:hover > &__background, &--selected#{&}--dark > &__background { + color: $sherbert; background-color: $spray-tan; border-color: $sherbert; } diff --git a/ui/src/app/components/header/header.tsx b/ui/src/app/components/header/header.tsx index b11e46990a..790d8976fb 100644 --- a/ui/src/app/components/header/header.tsx +++ b/ui/src/app/components/header/header.tsx @@ -1,4 +1,4 @@ -import {faQuestion} from '@fortawesome/free-solid-svg-icons'; +import {faBook, faKeyboard} from '@fortawesome/free-solid-svg-icons'; import * as React from 'react'; import {Link, useParams} from 'react-router-dom'; import {RolloutNamespaceInfo, RolloutServiceApi} from '../../../models/rollout/generated'; @@ -7,6 +7,7 @@ import {useServerData} from '../../shared/utils/utils'; import {ActionButton} from '../action-button/action-button'; import {InfoItemRow} from '../info-item/info-item'; import {ThemeToggle} from '../theme-toggle/theme-toggle'; +import {Tooltip} from '../tooltip/tooltip'; import './header.scss'; @@ -36,7 +37,7 @@ const Brand = (props: {path?: string}) => { export const Header = (props: {pageHasShortcuts: boolean; showHelp: () => void}) => { const getNs = React.useCallback(() => new RolloutServiceApi().rolloutServiceGetNamespace(), []); - const nsData = useServerData(getNs); + const namespace = useServerData(getNs).namespace || 'Unknown'; const {name} = useParams<{name: string}>(); const api = React.useContext(RolloutAPIContext); const [version, setVersion] = React.useState('v?'); @@ -51,11 +52,22 @@ export const Header = (props: {pageHasShortcuts: boolean; showHelp: () => void})
- {props.pageHasShortcuts && } + {props.pageHasShortcuts && ( + + + + )} + + + + + - + + + - +
{version}
diff --git a/ui/src/app/components/tooltip/tooltip.scss b/ui/src/app/components/tooltip/tooltip.scss index 503f75faf3..278cbc1613 100644 --- a/ui/src/app/components/tooltip/tooltip.scss +++ b/ui/src/app/components/tooltip/tooltip.scss @@ -9,7 +9,13 @@ background-color: $slate; white-space: nowrap; color: white; + border: 1px solid $slate; &--dark { border: 1px solid $dull-shine; } + + &--inverted { + top: 100%; + bottom: auto; + } } diff --git a/ui/src/app/components/tooltip/tooltip.tsx b/ui/src/app/components/tooltip/tooltip.tsx index ce91cc8b7f..3429794a2c 100644 --- a/ui/src/app/components/tooltip/tooltip.tsx +++ b/ui/src/app/components/tooltip/tooltip.tsx @@ -27,11 +27,11 @@ export const useHover = (): [React.MutableRefObject, boolean] => { return [ref, show]; }; -export const Tooltip = (props: {content: React.ReactNode | string} & React.PropsWithRef) => { +export const Tooltip = (props: {content: React.ReactNode | string; inverted?: boolean} & React.PropsWithRef) => { const [tooltip, showTooltip] = useHover(); return (
-