grafana/public/sass/components/_panel_header.scss
Torkel Ödegaard 335cec07a5
Graph: Add data links feature (click on graph) (#17267)
* WIP: initial panel links editor

* WIP: Added dashboard migration to new panel drilldown link schema

* Make link_srv interpolate new variables

* Fix failing tests

* Drilldown: Add context menu to graph viz (#17284)

* Add simple context menu for adding graph annotations and showing drilldown links

* Close graph context menu when user start scrolling

* Move context menu component to grafana/ui

* Make graph context menu appear on click, use cmd/ctrl click for quick annotations

* Move graph context menu controller to separate file

* Drilldown: datapoint variables interpolation (#17328)

* Add simple context menu for adding graph annotations and showing drilldown links

* Close graph context menu when user start scrolling

* Move context menu component to grafana/ui

* Make graph context menu appear on click, use cmd/ctrl click for quick annotations

* Add util for absolute time range transformation

* Add series name and datapoint timestamp interpolation

* Rename drilldown link variables tot snake case, use const values instead of strings in tests

* Bring LinkSrv.getPanelLinkAnchorInfo for compatibility reasons and add deprecation warning

* Rename seriesLabel to seriesName

* Drilldown: use separate editors for panel and series links (#17355)

* Use correct target ini context menu links

* Rename PanelLinksEditor to DrilldownLinksEditor and mote it to grafana/ui

* Expose DrilldownLinksEditor as an angular directive

* Enable visualization specifix drilldown links

* Props interfaces rename

* Drilldown: Add variables suggestion and syntax highlighting for drilldown link editor (#17391)

* Add variables suggestion in drilldown link editor

* Enable prism

* Fix backspace not working

* Move slate value helpers to grafana/ui

* Add syntax higlighting for links input

* Rename drilldown link components to data links

* Add template variabe suggestions

* Bugfix

* Fix regexp not working in Firefox

* Display correct links in panel header corner

* bugfix

* bugfix

* Bugfix

* Context menu UI tweaks

* Use data link terminology instead of drilldown

* DataLinks: changed autocomplete syntax

* Use singular form for data link

* Use the same syntax higlighting for built-in and template variables in data links editor

* UI improvements to context menu

* UI review tweaks

* Tweak layout of data link editor

* Fix vertical spacing

* Remove data link header in context menu

* Remove pointer cursor from series label in context menu

* Fix variable selection on click

* DataLinks: migrations for old links

* Update docs about data links

* Use value time instead of time range when interpolating datapoint timestamp

* Remove not used util

* Update docs

* Moved icon a bit more down

* Interpolate value ts only when using __value_time variable

* Bring href property back to LinkModel

* Add any type annotations

* Fix TS error on slate's Value type

* minor changes
2019-06-25 11:38:51 +02:00

194 lines
3.1 KiB
SCSS

$panel-header-no-title-zindex: 1;
.panel-header {
&:hover {
transition: background-color 0.1s ease-in-out;
background-color: $panel-header-hover-bg;
}
}
.panel-container--no-title {
.panel-header {
position: absolute;
width: 100%;
z-index: $panel-header-z-index;
}
.panel-content {
height: 100%;
}
}
.panel-title-container {
cursor: move;
word-wrap: break-word;
display: block;
}
.panel-title {
border: 0px;
font-weight: $font-weight-semi-bold;
position: relative;
width: 100%;
display: flex;
flex-wrap: nowrap;
justify-content: center;
height: $panel-header-height;
align-items: center;
}
.panel-title-text {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
max-width: calc(100% - 38px);
cursor: pointer;
font-weight: $font-weight-semi-bold;
&:hover {
color: $link-hover-color;
}
.panel-has-alert & {
max-width: calc(100% - 54px);
}
}
.panel-menu-container {
width: 1px;
height: 19px;
display: inline-block;
}
.panel-menu-toggle {
color: $text-color-weak;
cursor: pointer;
padding: 3px 5px;
visibility: hidden;
opacity: 0;
width: 16px;
height: 16px;
left: 1px;
top: 2px;
&:hover {
color: $link-hover-color;
}
}
.panel-loading {
position: absolute;
top: 4px;
right: 4px;
z-index: $panel-header-z-index + 1;
font-size: $font-size-sm;
color: $text-color-weak;
}
.panel-empty {
display: flex;
align-items: center;
height: 100%;
width: 100%;
p {
text-align: center;
color: $text-muted;
font-size: $font-size-lg;
width: 100%;
}
}
.panel-menu {
top: 25px;
left: -100px;
}
.panel-info-corner-inner {
width: 0;
height: 0;
position: absolute;
left: 0;
bottom: 0;
}
@mixin panel-corner-color($corner-bg) {
.panel-info-corner-inner {
border-left: $panel-header-height solid $corner-bg;
border-right: none;
border-bottom: $panel-header-height solid transparent;
}
}
.panel-info-corner {
color: $text-muted;
cursor: pointer;
position: absolute;
display: none;
left: 0;
width: $panel-header-height;
height: $panel-header-height;
z-index: $panel-header-no-title-zindex + 1;
top: 0;
.fa {
position: relative;
top: -2px;
left: 6px;
font-size: 75%;
z-index: $panel-header-no-title-zindex + 2;
}
&--info {
display: block;
@include panel-corner-color(lighten($panel-corner, 6%));
.fa:before {
content: '\f129';
}
}
&--links {
display: block;
@include panel-corner-color(lighten($panel-corner, 6%));
.fa {
left: 4px;
}
.fa:before {
content: '\f08e';
}
}
&--error {
display: block;
color: $white;
@include panel-corner-color($popover-error-bg);
.fa:before {
content: '\f12a';
}
}
}
.panel-info-content {
a {
color: $gray-6;
&:hover {
color: darken($white, 10%);
}
}
.panel-info-corner-links {
list-style: none;
padding-left: 0;
}
}
.panel-time-info {
font-weight: $font-weight-semi-bold;
float: right;
margin-right: 8px;
color: $blue;
font-size: 85%;
position: absolute;
right: 0;
}