grafana/public/sass/components/_panel_logs.scss

327 lines
5.0 KiB
SCSS
Raw Normal View History

2018-12-06 06:30:48 -06:00
$column-horizontal-spacing: 10px;
.logs-panel-options {
2018-12-06 01:08:16 -06:00
display: flex;
background-color: $page-bg;
padding: $panel-padding;
padding-top: 10px;
border-radius: $border-radius;
2019-03-12 02:34:55 -05:00
margin: $space-md 0 $space-sm;
2018-12-06 01:08:16 -06:00
border: $panel-border;
flex-direction: column;
}
.logs-panel-controls {
display: flex;
2018-12-06 01:08:16 -06:00
justify-items: flex-start;
align-items: center;
flex-wrap: wrap;
2018-12-06 01:08:16 -06:00
> * {
margin-right: $spacer * 2;
2018-12-06 01:08:16 -06:00
}
}
.logs-panel-nodata {
> * {
margin-left: 0.5em;
}
}
.logs-panel-meta {
flex: 1;
color: $text-color-weak;
margin-bottom: $spacer;
min-width: 30%;
display: flex;
2018-12-06 01:08:16 -06:00
}
.logs-panel-meta__item {
margin-right: $spacer;
display: flex;
align-items: baseline;
2018-12-06 01:08:16 -06:00
}
.logs-panel-meta__label {
margin-right: $spacer / 2;
font-size: $font-size-sm;
font-weight: $font-weight-semi-bold;
2018-12-06 01:08:16 -06:00
}
.logs-panel-meta__value {
font-family: $font-family-monospace;
}
.logs-panel-meta-item__labels {
// compensate for the labels padding
position: relative;
top: 4px;
}
.logs-rows {
font-family: $font-family-monospace;
font-size: $font-size-sm;
2018-12-06 01:08:16 -06:00
display: table;
table-layout: fixed;
width: 100%;
2018-12-06 01:08:16 -06:00
}
.logs-row {
display: table-row;
> div {
display: table-cell;
2018-12-06 06:30:48 -06:00
padding-right: $column-horizontal-spacing;
vertical-align: middle;
2018-12-06 08:51:42 -06:00
border-top: 1px solid transparent;
border-bottom: 1px solid transparent;
2018-12-06 06:30:48 -06:00
}
2018-12-06 07:03:57 -06:00
&:hover {
2018-12-06 08:51:42 -06:00
background: $page-bg;
2018-12-06 01:08:16 -06:00
}
}
.logs-row__time {
white-space: nowrap;
width: 19em;
}
.logs-row__localtime {
white-space: nowrap;
width: 12.5em;
2018-12-06 01:08:16 -06:00
}
.logs-row__labels {
width: 20%;
2018-12-06 14:29:55 -06:00
line-height: 1.2;
position: relative;
}
2018-12-06 01:08:16 -06:00
.logs-row__message {
word-break: break-all;
}
.logs-row__match-highlight {
// Undoing mark styling
background: inherit;
padding: inherit;
color: $typeahead-selected-color;
border-bottom: 1px solid $typeahead-selected-color;
background-color: rgba($typeahead-selected-color, 0.1);
&--preview {
background-color: rgba($typeahead-selected-color, 0.2);
border-bottom-style: dotted;
}
}
.logs-row__level {
position: relative;
width: 10px;
2018-12-06 06:30:48 -06:00
&::after {
content: '';
display: block;
position: absolute;
top: 1px;
bottom: 1px;
width: 3px;
background-color: $logs-color-unkown;
2018-12-06 06:30:48 -06:00
}
2018-12-06 01:08:16 -06:00
&--critical,
&--crit {
2018-12-06 06:30:48 -06:00
&::after {
background-color: #705da0;
}
2018-12-06 01:08:16 -06:00
}
&--error,
&--err {
2018-12-06 06:30:48 -06:00
&::after {
background-color: #e24d42;
}
2018-12-06 01:08:16 -06:00
}
&--warning,
&--warn {
2018-12-06 06:30:48 -06:00
&::after {
background-color: $yellow;
2018-12-06 06:30:48 -06:00
}
2018-12-06 01:08:16 -06:00
}
&--info {
2018-12-06 06:30:48 -06:00
&::after {
background-color: #7eb26d;
}
2018-12-06 01:08:16 -06:00
}
&--debug {
2018-12-06 06:30:48 -06:00
&::after {
background-color: #1f78c1;
}
2018-12-06 01:08:16 -06:00
}
&--trace {
2018-12-06 06:30:48 -06:00
&::after {
background-color: #6ed0e0;
}
2018-12-06 01:08:16 -06:00
}
}
.logs-row__duplicates {
text-align: right;
width: 4em;
2018-12-06 01:08:16 -06:00
}
.logs-row__field-highlight {
// Undoing mark styling
background: inherit;
padding: inherit;
border-bottom: 1px dotted $typeahead-selected-color;
.logs-row__field-highlight--icon {
margin-left: 0.5em;
cursor: pointer;
display: none;
}
}
2018-12-07 03:22:52 -06:00
.logs-row__stats {
margin: 5px 0;
}
.logs-row__field-highlight:hover {
color: $typeahead-selected-color;
border-bottom-style: solid;
.logs-row__field-highlight--icon {
display: inline;
}
}
.logs-labels {
display: flex;
flex-wrap: wrap;
}
2018-12-06 01:08:16 -06:00
.logs-label {
display: flex;
2018-12-06 01:08:16 -06:00
padding: 0 2px;
background-color: $btn-inverse-bg;
border-radius: $border-radius;
margin: 0 4px 2px 0;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
2018-12-06 01:08:16 -06:00
}
.logs-label__icon {
border-left: $panel-border;
padding: 0 2px;
cursor: pointer;
margin-left: 2px;
}
.logs-label__value {
display: inline-block;
max-width: 20em;
text-overflow: ellipsis;
overflow: hidden;
}
2018-12-06 01:08:16 -06:00
.logs-label__stats {
position: absolute;
top: 1.25em;
left: -10px;
z-index: 100;
justify-content: space-between;
box-shadow: $popover-shadow;
}
/*
* Stats popover & message stats box
*/
.logs-stats {
2018-12-06 01:08:16 -06:00
background-color: $popover-bg;
color: $popover-color;
border: 1px solid $popover-border-color;
border-radius: $border-radius;
max-width: 500px;
}
.logs-stats__header {
background-color: $popover-border-color;
padding: 6px 10px;
display: flex;
}
.logs-stats__title {
font-weight: $font-weight-semi-bold;
padding-right: $spacer;
overflow: hidden;
display: inline-block;
white-space: nowrap;
text-overflow: ellipsis;
flex-grow: 1;
2018-12-06 01:08:16 -06:00
}
.logs-stats__body {
padding: 20px 10px 10px 10px;
2018-12-06 01:08:16 -06:00
}
.logs-stats__close {
2018-12-06 01:08:16 -06:00
cursor: pointer;
}
.logs-stats-row {
margin: $spacer/1.75 0;
&--active {
color: $blue;
position: relative;
}
&--active::after {
2018-12-06 01:08:16 -06:00
display: inline;
content: '*';
position: absolute;
top: 0;
left: -8px;
}
&__label {
display: flex;
margin-bottom: 1px;
}
&__value {
flex: 1;
text-overflow: ellipsis;
overflow: hidden;
2018-12-06 01:08:16 -06:00
}
&__count,
&__percent {
text-align: right;
margin-left: 0.5em;
}
&__percent {
width: 3em;
}
&__bar,
&__innerbar {
height: 4px;
overflow: hidden;
background: $text-color-faint;
}
&__innerbar {
background: $blue;
2018-12-06 01:08:16 -06:00
}
}