grafana/public/sass/components/_navbar.scss

240 lines
4.1 KiB
SCSS
Raw Normal View History

2016-02-15 08:27:41 -06:00
.navbar {
position: relative;
z-index: $zindex-navbar-fixed;
2017-12-01 08:56:08 -06:00
height: $navbarHeight;
padding: 0 20px 0 60px;
2017-10-14 14:17:16 -05:00
display: flex;
2017-12-02 08:35:59 -06:00
flex-grow: 1;
2017-12-08 11:15:24 -06:00
border-bottom: 1px solid transparent;
transition-duration: 350ms;
transition-timing-function: ease-in-out;
transition-property: box-shadow, border-bottom;
@include media-breakpoint-up(md) {
padding-left: $dashboard-padding;
margin-left: 0;
}
2017-12-08 11:15:24 -06:00
}
2017-12-09 15:45:33 -06:00
@mixin navbar-alt-look() {
background: $page-header-bg;
box-shadow: $search-shadow;
border-bottom: $navbarBorder;
}
2017-12-08 11:15:24 -06:00
.dashboard-page--settings-open {
.navbar {
2017-12-09 15:45:33 -06:00
@include navbar-alt-look();
2017-12-08 11:15:24 -06:00
}
.navbar-buttons--tv,
2017-12-11 06:29:23 -06:00
.navbar-button--add-panel,
.navbar-button--star,
2018-01-16 07:41:08 -06:00
.navbar-button--save,
2017-12-11 06:29:23 -06:00
.navbar-button--share,
.navbar-button--settings,
2017-12-08 11:15:24 -06:00
.navbar-page-btn .fa-caret-down,
Explore & Dashboard: New Refresh picker (#16505) * Added RefreshButton * Added RefreshSelect * Added RefreshSelectButton * Added RefreshPicker * Removed the magic string Paused * Minor style changes and using Off instead of Pause * Added HeadlessSelect * Added HeadlessSelect story * Added SelectButton * Removed RefreshSelectButton * Added TimePicker and moved ClickOutsideWrapper to ui/components * Added TimePickerPopOver * Added react-calendar * Missed yarn lock file * Added inputs to popover * Added TimePicker and RefreshPicker to DashNav * Moved TimePicker and RefreshPicker to app/core * Added react-calendar to app and removed from ui/components * Fixed PopOver onClick * Moved everything back to ui components because of typings problems * Exporing RefreshPicker and TimePicker * Added Apply and inputs * Added typings * Added TimePickerInput and logic * Fixed parsing of string to Moments * Fixed range string * Styling and connecting the calendars and inputs * Changed Calendar styling * Added backward forward and zoom * Fixed responsive styles * Moved TimePicker and RefreshPicker into app core * Renamed menuIsOpen to isOpen * Changed from className={} to className="" * Moved Popover to TimePickerOptionGroup * Renamed all PopOver to Popover * Renamed popOver to popover and some minor refactorings * Renamed files with git mv * Added ButtonSelect and refactored RefreshPicker * Refactored TimePicker to use new ButtonSelect * Removed HeadlessSelect as suggested * fix: Fix typings and misc errors after rebase * wip: Enable time picker on dashboard and add tooltip * Merge branch 'master' into hugoh/new-timepicker-and-unified-component # Conflicts: # packages/grafana-ui/package.json # packages/grafana-ui/src/components/Input/Input.test.tsx # packages/grafana-ui/src/components/Input/Input.tsx # packages/grafana-ui/src/utils/validate.ts # public/app/features/dashboard/panel_editor/QueryOptions.tsx # yarn.lock * fix: Snapshot update * Move TimePicker default options into the TimePicker as statics, pass the tooltipContent down the line when wanted and wrap the button in a tooltip element * fix: Override internal state prop if we provide one in a prop * Updated snapshots * Let dashnav control refreshPicker state * feat: Add a stringToMs function * wip: RefreshPicker * wip: Move RefreshPicker to @grafana/ui * wip: Move TimePicker to @grafana/ui * wip: Remove comments * wip: Add refreshPicker to explore * wip: Use default intervals if the prop is missing * wip: Nicer way of setting defaults * fix: Control the select component * wip: Add onMoveForward/onMoveBack * Remove code related to the new time picker and refresh picker from dashnav * Fix: Typings after merge * chore: Minor fix after merge * chore: Remove _.map usage * chore: Moved refresh-picker logic out of the refresh picker since it will work a little differently in explore and dashboards until we have replaced the TimeSrv * feat: Add an Interval component to @grafana/ui * chore: Remove intervalId from redux state and move setInterval logic from ExploreToolbar to its own Interval component * feat: Add refreshInterval to Explore's URL state * feat: Pick up refreshInterval from url on page load * fix: Set default refreshInterval when no value can be retained from URL * fix: Update test initial state with refreshInterval * fix: Handle URLs before RefreshPicker * fix: Move RefreshInterval to url position 3 since the segments can take multiple positions * fix: A better way of detecting urls without RefreshInterval in Explore * chore: Some Explore typings * fix: Attach refresh picker to interval picker * chore: Sass fix for refresh button border radius * fix: Remove refreshInterval from URL * fix: Intervals now start when previous interval is finished * fix: Use clearTimeout instead of clearInterval * fix: Make sure there's a delay set before adding a timeout when we have slow explore queries * wip: Add refresh picker to dashboard * feat: Add util for removing keys with empty values * feat: RefreshPicker in dashboards and tmp rem out old RefreshPicker * fix: Remove the jumpy:ness in the refreshpicker * Changed placement and made it hide when your in dashboard settings * chore: Move logic related to refresh picker out of DashNav to its own component * feat: Add tooltip to refreshpicker * fix: Fix bug with refreshpicker not updating when setting to 'off' * fix: Make it possible to override refresh intervals using the dashboard intervals * chore: Change name of Interval to SetInterval to align with ecmascripts naming since its basically the same but declarative and async * fix: Use default intervals when auto refresh is empty in dashboard settings * fix: Hide time/interval picker when hidden is true on the model, such as on the home dashboard * fix: Interval picker will have to handle location changes since timeSrv wont * RefreshPicker: Refactoring refresh picker * RefreshPicker: minor refactoring
2019-04-16 02:15:23 -05:00
.refresh-picker,
.time-picker {
2017-12-08 11:15:24 -06:00
display: none;
}
2017-12-08 08:53:26 -06:00
2017-12-08 11:15:24 -06:00
.navbar-buttons--close {
display: flex;
}
2016-02-15 08:27:41 -06:00
}
.panel-in-fullscreen,
.panel-in-fullscreen.view-mode--tv {
2018-11-10 10:27:25 -06:00
.navbar {
padding-left: $navbar-padding;
2018-11-10 10:27:25 -06:00
}
2017-12-11 06:29:23 -06:00
.navbar-button--add-panel,
.navbar-button--star,
.navbar-button--tv {
display: none;
}
2017-12-09 15:45:33 -06:00
}
.navbar-page-btn {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
display: block;
margin: 0;
color: $headings-color;
font-size: $font-size-lg;
min-height: $navbarHeight;
2017-12-08 11:15:24 -06:00
line-height: $navbarHeight;
2017-10-25 05:37:34 -05:00
.gicon {
top: -2px;
2017-10-25 05:37:34 -05:00
position: relative;
font-size: 17px;
2017-10-25 05:37:34 -05:00
line-height: 8px;
opacity: 0.75;
margin-right: 10px;
display: none;
@include media-breakpoint-up(md) {
display: inline-block;
}
2017-10-25 05:37:34 -05:00
}
}
.navbar-page-btn__folder {
color: $text-color-weak;
display: none;
@include media-breakpoint-up(lg) {
display: inline-block;
}
2016-02-15 08:27:41 -06:00
}
// element is needed here to override font-awesome specificity
i.navbar-page-btn__folder-icon {
font-size: $font-size-sm;
color: $text-color-weak;
padding: 0 $space-sm;
position: relative;
top: -1px;
}
// element is needed here to override font-awesome specificity
i.navbar-page-btn__search {
font-size: $font-size-xs;
padding: 0 $space-xs;
}
2017-12-01 08:56:08 -06:00
.navbar-buttons {
2018-10-26 06:20:10 -05:00
// height: $navbarHeight;
2017-12-01 08:56:08 -06:00
display: flex;
align-items: center;
justify-content: flex-end;
2019-02-03 14:06:07 -06:00
margin-left: 10px;
2017-12-08 11:15:24 -06:00
&--close {
display: none;
2017-12-11 06:29:23 -06:00
margin-right: 0;
2017-12-08 11:15:24 -06:00
}
&--zoom {
margin-right: 0;
}
2017-12-01 08:56:08 -06:00
}
2017-12-01 08:58:12 -06:00
.navbar__spacer {
flex-grow: 1;
}
2017-12-01 08:56:08 -06:00
.navbar-button {
@include buttonBackground($btn-inverse-bg, $btn-inverse-bg-hl, $btn-inverse-text-color, $btn-inverse-text-shadow);
2017-12-01 08:56:08 -06:00
2019-02-11 06:24:02 -06:00
display: flex;
align-items: center;
2017-12-01 08:56:08 -06:00
font-weight: $btn-font-weight;
padding: 6px $space-sm;
TimePicker: New time picker dropdown & custom range UI (#16811) * feat: Add new picker to DashNavTimeControls * chore: noImplicitAny limit reached * chore: noImplicityAny fix * chore: Add momentUtc helper to avoid the isUtc conditionals * chore: Move getRaw from Explore's time picker to grafana/ui utils and rename to getRawRange * feat: Use helper functions to convert utc to browser time * fix: Dont Select current value when pressing tab when using Time Picker * fix: Add tabIndex to time range inputs so tab works smoothly and prevent mouseDown event to propagate to react-select * fix: Add spacing to custom range labels * fix: Updated snapshot * fix: Re-adding getRaw() temporary to fix the build * fix: Disable scroll event in Popper when we're using the TimePicker so the popup wont "follow" the menu * fix: Move all "Last xxxx" quick ranges to the menu and show a "UTC" text when applicable * fix: Add zoom functionality * feat: Add logic to mark selected option as active * fix: Add tooltip to zoom button * fix: lint fix after rebase * chore: Remove old time picker from DashNav * TimePicker: minor design update * chore: Move all time picker quick ranges to the menu * fix: Remove the popover border-right, since the quick ranges are gone * chore: Remove function not in use * Fix: Close time picker on resize event * Fix: Remove border bottom * Fix: Use fa icons on prev/next arrows * Fix: Pass ref from TimePicker to TimePickerOptionGroup so the popover will align as it should * Fix: time picker ui adjustments to get better touch area on buttons * Fix: Dont increase line height on large screens * TimePicker: style updates * Fix: Add more prominent colors for selected dates and fade out dates in previous/next month * TimePicker: style updates2 * TimePicker: Big refactorings and style changes * Removed use of Popper not sure we need that here? * Made active selected item in the list have the "selected" checkmark * Changed design of popover * Changed design of and implementation of the Custom selection in the dropdown it did not feel like a item you could select like the rest now the list is just a normal list * TimePicker: Refactoring & style changes * TimePicker: use same date format everywhere * TimePicker: Calendar style updates * TimePicker: fixed unit test * fixed unit test * TimeZone: refactoring time zone type * TimePicker: refactoring * TimePicker: finally to UTC to work * TimePicker: better way to handle calendar utc dates * TimePicker: Fixed tooltip issues * Updated snapshot * TimePicker: moved tooltip from DashNavControls into TimePicker
2019-06-24 07:39:59 -05:00
line-height: 18px;
2017-12-01 08:56:08 -06:00
color: $text-muted;
border: 1px solid $navbar-button-border;
margin-left: $space-xs;
white-space: nowrap;
2017-12-01 08:56:08 -06:00
.gicon {
font-size: 16px;
}
.fa {
font-size: 16px;
}
&--add-panel {
padding: 2px 10px;
2017-12-01 08:58:12 -06:00
2017-12-01 08:56:08 -06:00
.gicon {
font-size: 22px;
}
}
Explore & Dashboard: New Refresh picker (#16505) * Added RefreshButton * Added RefreshSelect * Added RefreshSelectButton * Added RefreshPicker * Removed the magic string Paused * Minor style changes and using Off instead of Pause * Added HeadlessSelect * Added HeadlessSelect story * Added SelectButton * Removed RefreshSelectButton * Added TimePicker and moved ClickOutsideWrapper to ui/components * Added TimePickerPopOver * Added react-calendar * Missed yarn lock file * Added inputs to popover * Added TimePicker and RefreshPicker to DashNav * Moved TimePicker and RefreshPicker to app/core * Added react-calendar to app and removed from ui/components * Fixed PopOver onClick * Moved everything back to ui components because of typings problems * Exporing RefreshPicker and TimePicker * Added Apply and inputs * Added typings * Added TimePickerInput and logic * Fixed parsing of string to Moments * Fixed range string * Styling and connecting the calendars and inputs * Changed Calendar styling * Added backward forward and zoom * Fixed responsive styles * Moved TimePicker and RefreshPicker into app core * Renamed menuIsOpen to isOpen * Changed from className={} to className="" * Moved Popover to TimePickerOptionGroup * Renamed all PopOver to Popover * Renamed popOver to popover and some minor refactorings * Renamed files with git mv * Added ButtonSelect and refactored RefreshPicker * Refactored TimePicker to use new ButtonSelect * Removed HeadlessSelect as suggested * fix: Fix typings and misc errors after rebase * wip: Enable time picker on dashboard and add tooltip * Merge branch 'master' into hugoh/new-timepicker-and-unified-component # Conflicts: # packages/grafana-ui/package.json # packages/grafana-ui/src/components/Input/Input.test.tsx # packages/grafana-ui/src/components/Input/Input.tsx # packages/grafana-ui/src/utils/validate.ts # public/app/features/dashboard/panel_editor/QueryOptions.tsx # yarn.lock * fix: Snapshot update * Move TimePicker default options into the TimePicker as statics, pass the tooltipContent down the line when wanted and wrap the button in a tooltip element * fix: Override internal state prop if we provide one in a prop * Updated snapshots * Let dashnav control refreshPicker state * feat: Add a stringToMs function * wip: RefreshPicker * wip: Move RefreshPicker to @grafana/ui * wip: Move TimePicker to @grafana/ui * wip: Remove comments * wip: Add refreshPicker to explore * wip: Use default intervals if the prop is missing * wip: Nicer way of setting defaults * fix: Control the select component * wip: Add onMoveForward/onMoveBack * Remove code related to the new time picker and refresh picker from dashnav * Fix: Typings after merge * chore: Minor fix after merge * chore: Remove _.map usage * chore: Moved refresh-picker logic out of the refresh picker since it will work a little differently in explore and dashboards until we have replaced the TimeSrv * feat: Add an Interval component to @grafana/ui * chore: Remove intervalId from redux state and move setInterval logic from ExploreToolbar to its own Interval component * feat: Add refreshInterval to Explore's URL state * feat: Pick up refreshInterval from url on page load * fix: Set default refreshInterval when no value can be retained from URL * fix: Update test initial state with refreshInterval * fix: Handle URLs before RefreshPicker * fix: Move RefreshInterval to url position 3 since the segments can take multiple positions * fix: A better way of detecting urls without RefreshInterval in Explore * chore: Some Explore typings * fix: Attach refresh picker to interval picker * chore: Sass fix for refresh button border radius * fix: Remove refreshInterval from URL * fix: Intervals now start when previous interval is finished * fix: Use clearTimeout instead of clearInterval * fix: Make sure there's a delay set before adding a timeout when we have slow explore queries * wip: Add refresh picker to dashboard * feat: Add util for removing keys with empty values * feat: RefreshPicker in dashboards and tmp rem out old RefreshPicker * fix: Remove the jumpy:ness in the refreshpicker * Changed placement and made it hide when your in dashboard settings * chore: Move logic related to refresh picker out of DashNav to its own component * feat: Add tooltip to refreshpicker * fix: Fix bug with refreshpicker not updating when setting to 'off' * fix: Make it possible to override refresh intervals using the dashboard intervals * chore: Change name of Interval to SetInterval to align with ecmascripts naming since its basically the same but declarative and async * fix: Use default intervals when auto refresh is empty in dashboard settings * fix: Hide time/interval picker when hidden is true on the model, such as on the home dashboard * fix: Interval picker will have to handle location changes since timeSrv wont * RefreshPicker: Refactoring refresh picker * RefreshPicker: minor refactoring
2019-04-16 02:15:23 -05:00
&--refresh {
padding-left: 8px;
padding-right: 8px;
}
&--attached {
margin-left: 0;
border-radius: 0 2px 2px 0;
}
&--settings {
.gicon {
filter: $navbar-btn-gicon-brightness;
}
&:hover {
.gicon {
filter: brightness(0.8);
}
}
}
2017-12-01 08:56:08 -06:00
&--tight {
2017-12-08 11:15:24 -06:00
padding: 7px 4px;
2017-12-01 08:58:12 -06:00
2017-12-01 08:56:08 -06:00
.fa {
font-size: 14px;
position: relative;
top: 1px;
2017-12-01 08:56:08 -06:00
}
}
2017-12-08 11:15:24 -06:00
&--secondary {
@include buttonBackground($btn-secondary-bg, $btn-secondary-bg-hl);
2017-12-08 11:15:24 -06:00
}
@include media-breakpoint-down(lg) {
.btn-title {
margin-left: $space-xs;
display: none;
}
}
}
2019-02-07 09:14:11 -06:00
.navbar-edit {
display: flex;
height: $navbarHeight;
align-items: center;
2019-02-18 14:29:42 -06:00
padding-right: 13px;
2019-02-07 09:14:11 -06:00
}
.navbar-edit__back-btn {
2019-02-07 09:14:11 -06:00
background: transparent;
2019-02-07 12:06:51 -06:00
border: 2px solid $text-color;
2019-02-07 09:14:11 -06:00
border-radius: 50%;
width: 34px;
height: 34px;
2019-02-07 12:06:51 -06:00
transition: transform 0.1s ease 0.1s;
color: $text-color;
2019-02-07 09:14:11 -06:00
i {
font-size: $font-size-lg;
2019-02-07 12:06:51 -06:00
position: relative;
top: 1px;
right: 1px;
2019-02-07 12:06:51 -06:00
}
&:hover {
color: $text-color-strong;
border-color: $text-color-strong;
2019-02-07 09:14:11 -06:00
}
}
.navbar-settings-title {
display: block;
margin: 0;
color: $headings-color;
font-size: $font-size-lg;
min-height: $navbarHeight;
line-height: $navbarHeight;
}