diff --git a/ui/src/dashboards/components/Dashboard.js b/ui/src/dashboards/components/Dashboard.js index 57ad6e05d4..206b50b311 100644 --- a/ui/src/dashboards/components/Dashboard.js +++ b/ui/src/dashboards/components/Dashboard.js @@ -51,35 +51,37 @@ const Dashboard = ({ )} >
-
- Template Variables -
-
- {templates.map(({id, values}) => { - const items = values.map(value => ({...value, text: value.value})) - const selectedItem = items.find(item => item.selected) || items[0] - const selectedText = selectedItem && selectedItem.text +

Template Variables

+ {templates.map(({id, values, tempVar}) => { + const items = values.map(value => ({...value, text: value.value})) + const selectedItem = items.find(item => item.selected) || items[0] + const selectedText = selectedItem && selectedItem.text - // TODO: change Dropdown to a MultiSelectDropdown, `selected` to - // the full array, and [item] to all `selected` values when we update - // this component to support multiple values - return ( + // TODO: change Dropdown to a MultiSelectDropdown, `selected` to + // the full array, and [item] to all `selected` values when we update + // this component to support multiple values + return ( +
onSelectTemplate(id, [item].map(x => omit(x, 'text')))} /> - ) - })} - -
+ +
+ ) + })} +
{cells.length ? li > a { + &, &:active {background-color: transparent !important;} + font-size: 12px; + font-family: $code-font; + } + > li { + &:hover {@include gradient-h($c-comet,$c-pool);} + } + } +} +.template-control--label { + @include no-user-select(); + order: 1; + height: 18px; + padding: 0 8px; + margin: 0; + font-size: 11px; + font-family: $code-font; + color: $c-potassium; + line-height: 18px; + border-radius: $radius-small $radius-small 0 0; + background-color: $g4-onyx; +} \ No newline at end of file diff --git a/ui/src/style/layout/page-header.scss b/ui/src/style/layout/page-header.scss index 5da4446964..816e0f8a22 100644 --- a/ui/src/style/layout/page-header.scss +++ b/ui/src/style/layout/page-header.scss @@ -31,7 +31,6 @@ $page-header-weight: 400 !important; } .page-header__left, .page-header__right { - flex: 1 0 0; display: flex; align-items: center; diff --git a/ui/src/style/modules/mixins.scss b/ui/src/style/modules/mixins.scss index 5bc20a2681..e9ce2e8df3 100644 --- a/ui/src/style/modules/mixins.scss +++ b/ui/src/style/modules/mixins.scss @@ -70,7 +70,9 @@ $scrollbar-offset: 3px; &::-webkit-scrollbar { width: $scrollbar-width; border-top-right-radius: $radius; + border-top-left-radius: $radius; border-bottom-right-radius: $radius; + border-bottom-left-radius: $radius; &-button { background-color: $trackColor; diff --git a/ui/src/style/pages/dashboards.scss b/ui/src/style/pages/dashboards.scss index 964a03fde6..71dd3f0543 100644 --- a/ui/src/style/pages/dashboards.scss +++ b/ui/src/style/pages/dashboards.scss @@ -41,25 +41,6 @@ $dash-graph-options-arrow: 8px; } .dashboard { - .template-control-bar { - height: 50px; - font-size: 18px; - font-weight: 400; - color: $g14-chromium; - display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 4px; - padding: 10px 15px; - @extend .cell-shell; - .dropdown { - flex: 0 1 auto; - min-width: 100px; - } - .dropdown-toggle { - width: 100%; - } - } .react-grid-item { @extend .cell-shell; } @@ -376,6 +357,12 @@ $dash-graph-options-arrow: 8px; } } +/* + Template Control Bar + ------------------------------------------------------ +*/ +@import '../components/template-control-bar'; + /* Overylay Technology (Cell Edit Mode) ------------------------------------------------------