grafana/public/sass/pages/_explore.scss
2019-01-28 12:47:01 +01:00

455 lines
7.2 KiB
SCSS

.small-screens {
display: none;
}
.timepicker {
display: flex;
}
.timepicker-rangestring {
margin-left: 0.5em;
}
.datasource-picker {
.ds-picker {
min-width: 200px;
max-width: 200px;
}
}
.sidemenu-open {
.toolbar-header-splitted,
.toolbar-header {
padding: 0;
margin-left: 0;
}
}
.toolbar-splitted,
.toolbar {
display: flex;
background: inherit;
justify-content: space-between;
height: auto;
padding: 0px $dashboard-padding;
}
.toolbar {
flex-flow: row nowrap;
}
.toolbar-splitted {
flex-flow: row wrap;
}
.toolbar-item-splitted,
.toolbar-item {
align-self: center;
}
.toolbar-item-splitted:first-child {
flex: 1 1 100%;
}
.toolbar-header-splitted,
.toolbar-header {
display: flex;
flex: 1 1 0;
flex-flow: row nowrap;
font-size: 18px;
min-height: 55px;
line-height: 55px;
justify-content: space-between;
margin-left: $panel-margin * 3;
}
.toolbar-header {
align-items: center;
}
.toolbar-header-title {
color: darken($link-color, 5%);
.fa {
font-size: 100%;
opacity: 0.75;
margin-right: 0.5em;
}
}
.toolbar-header-datasource {
padding-left: $dashboard-padding;
flex: 2 1 auto;
}
.toolbar-header-close {
padding-right: 8px;
}
.toolbar-content-splitted,
.toolbar-content {
display: flex;
flex: 2 1 0;
flex-flow: row wrap;
justify-content: flex-end;
align-items: center;
}
.toolbar-content-item {
padding: 10px 2px;
}
@media only screen and (max-width: 1545px) {
.timepicker-splitted {
.timepicker-rangestring {
display: none;
}
}
}
@media only screen and (max-width: 1070px) {
.timepicker {
.timepicker-rangestring {
display: none;
}
}
}
@media only screen and (max-width: 800px) {
.large-screens {
display: none;
}
.small-screens {
display: inline-block;
}
.sidemenu-open {
.toolbar-header-splitted,
.toolbar-header {
margin-left: $dashboard-padding;
}
}
.toolbar-header-splitted,
.toolbar-header {
margin-left: $dashboard-padding;
}
.toolbar {
flex-flow: row wrap;
}
.toolbar-content {
align-self: flex-start;
justify-content: flex-start;
}
.toolbar-content-item {
padding: 5px 2px;
}
.btn.navbar-button {
.btn-title {
display: none;
}
}
}
.explore {
flex: 1 1 auto;
}
.explore + .explore {
border-left: 1px dotted $table-border;
}
.explore-container {
padding: $dashboard-padding;
}
.explore-wrapper {
display: flex;
> .explore-split {
width: 50%;
}
}
.explore-panel {
margin-top: $panel-margin;
}
.explore-panel__body {
padding: $panel-padding;
}
.explore-panel__header {
padding: $panel-padding;
padding-top: 5px;
padding-bottom: 0;
display: flex;
cursor: pointer;
margin-bottom: 5px;
transition: all 0.1s linear;
}
.explore-panel__header-label {
font-weight: 500;
margin-right: $panel-margin;
font-size: $font-size-h6;
box-shadow: $text-shadow-faint;
}
.explore-panel__header-buttons {
margin-right: $panel-margin;
font-size: $font-size-lg;
line-height: $font-size-h6;
}
.result-options {
margin: 2 * $panel-margin 0;
}
.time-series-disclaimer {
width: 300px;
margin: $panel-margin auto;
padding: 10px 0;
border-radius: $border-radius;
text-align: center;
background-color: $panel-bg;
.disclaimer-icon {
color: $yellow;
margin-right: $panel-margin/2;
}
.show-all-time-series {
cursor: pointer;
color: $external-link-color;
}
}
.navbar .elapsed-time {
position: absolute;
left: 0;
right: 0;
top: 3.5rem;
text-align: center;
font-size: 0.8rem;
}
.graph-legend {
flex-wrap: wrap;
}
.explore-panel__loader {
height: 2px;
position: relative;
overflow: hidden;
background: none;
margin: $panel-margin / 2;
transition: background-color 1s ease;
}
.explore-panel__loader--active {
background: $text-color-faint;
}
.explore-panel__loader--active:after {
content: ' ';
display: block;
width: 25%;
top: 0;
top: -50%;
height: 250%;
position: absolute;
animation: loader 2s cubic-bezier(0.17, 0.67, 0.83, 0.67);
animation-iteration-count: 100;
background: $blue;
}
@keyframes loader {
from {
left: -25%;
}
to {
left: 100%;
}
}
.query-row {
display: flex;
position: relative;
& + & {
margin-top: 0.5rem;
}
}
.query-row-tools {
white-space: nowrap;
}
.query-row-status {
position: absolute;
top: 0;
right: 90px;
z-index: 1015;
display: flex;
flex-direction: column;
justify-content: center;
height: 34px;
}
.query-row-field {
margin-right: 3px;
width: 100%;
}
.query-transactions {
display: table;
}
.query-transaction {
display: table-row;
color: $text-color-faint;
line-height: 1.44;
}
.query-transaction--loading {
animation: query-loading-color-change 1s alternate 100;
}
@keyframes query-loading-color-change {
from {
color: $text-color-faint;
}
to {
color: $blue;
}
}
.query-transaction__type,
.query-transaction__duration {
display: table-cell;
font-size: $font-size-xs;
text-align: right;
padding-right: 0.25em;
}
// Prometheus-specifics, to be extracted to datasource soon
.explore {
.prom-query-field {
display: flex;
}
.prom-query-field-wrapper {
width: 100%;
}
.prom-query-field-info {
margin: 0.25em 0.5em 0.5em;
display: flex;
details {
margin-left: 1em;
}
}
}
// ReactTable basic overrides (does not include pivot/groups/filters)
// When integrating ReactTable as new panel plugin, move to _panel_table.scss
.ReactTable {
border: none;
}
.ReactTable .rt-table {
// Allow some space for the no-data text
min-height: 90px;
}
.ReactTable .rt-thead.-header {
box-shadow: none;
background: $list-item-bg;
border-top: 2px solid $body-bg;
border-bottom: 2px solid $body-bg;
height: 2em;
}
.ReactTable .rt-thead.-header .rt-th {
text-align: left;
color: $blue;
font-weight: 500;
}
.ReactTable .rt-thead .rt-td,
.ReactTable .rt-thead .rt-th {
padding: 0.45em 0 0.45em 1.1em;
border-right: none;
box-shadow: none;
}
.ReactTable .rt-tbody .rt-td {
padding: 0.45em 0 0.45em 1.1em;
border-bottom: 2px solid $body-bg;
border-right: 2px solid $body-bg;
}
.ReactTable .rt-tbody .rt-td:last-child {
border-right: none;
}
.ReactTable .-pagination {
border-top: none;
box-shadow: none;
margin-top: $panel-margin;
}
.ReactTable .-pagination .-btn {
color: $blue;
background: $list-item-bg;
}
.ReactTable .-pagination input,
.ReactTable .-pagination select {
color: $input-color;
background-color: $input-bg;
}
.ReactTable .-loading {
background: $input-bg;
}
.ReactTable .-loading.-active {
opacity: 0.8;
}
.ReactTable .-loading > div {
color: $input-color;
}
.ReactTable .rt-tr .rt-td:last-child {
text-align: right;
}
.ReactTable .rt-noData {
top: 60px;
z-index: inherit;
}
// React-component cascade fix: show "loading" even though item can expand
.rc-cascader-menu-item-loading:after {
position: absolute;
right: 12px;
content: 'loading';
color: #767980;
font-style: italic;
}
// TODO Experimental
.cheat-sheet-item {
margin: 2*$panel-margin 0;
width: 50%;
}
.cheat-sheet-item__title {
font-size: $font-size-h3;
}
.cheat-sheet-item__expression {
margin: $panel-margin/2 0;
cursor: pointer;
}