Files
grafana/public/sass/components/_panel_editor.scss
2018-12-13 08:56:20 +01:00

343 lines
5.8 KiB
SCSS

.panel-editor-container {
display: flex;
flex-direction: column;
height: 100%;
}
.panel-wrapper {
height: 100%;
&--edit {
height: 40%;
margin: 0 $dashboard-padding;
}
&--view {
flex: 1 1 0;
height: 80%;
margin: 0 $dashboard-padding;
padding-top: $dashboard-padding;
}
}
.panel-editor-container__editor {
margin-top: $panel-margin*2;
display: flex;
flex-direction: row;
flex: 1 1 0;
position: relative;
}
.panel-editor__right {
display: flex;
flex-direction: column;
flex-grow: 1;
background: $page-bg;
margin: 0 20px 0 84px;
border-radius: 3px;
box-shadow: $panel-editor-shadow;
}
.panel-editor__close {
@include buttonBackground($btn-inverse-bg, $btn-inverse-bg-hl);
position: absolute;
left: 11px;
top: 5px;
width: 40px;
height: 40px;
border-radius: 50%;
display: flex;
align-items: center;
i {
flex-grow: 1;
text-align: center;
font-size: 20px;
}
}
.panel-editor__scroll {
flex-grow: 1;
min-width: 0;
display: flex;
}
.panel-editor__content {
padding: 40px 20px;
}
.panel-editor__toolbar-view {
background: $panel-editor-toolbar-view-bg;
padding: 20px;
}
.panel-in-fullscreen {
.sidemenu {
display: none;
}
.dashboard-container {
padding: 0;
}
.submenu-controls {
padding: 0 $dashboard-padding $panel-margin $dashboard-padding;
}
.panel-editor-container__panel {
margin: 0 $dashboard-padding;
}
}
.panel-editor-resizer {
position: absolute;
height: 2px;
width: 100%;
top: -23px;
text-align: center;
border-bottom: 2px dashed transparent;
&:hover {
transition: border-color 0.2s ease-in 0.4s;
transition-delay: 0.2s;
border-color: $text-color-faint;
}
}
.panel-editor-resizer__handle {
display: inline-block;
width: 180px;
position: relative;
border-radius: 2px;
height: 7px;
cursor: grabbing;
background: $input-label-bg;
top: -9px;
&:hover {
transition: background 0.2s ease-in 0.4s;
transition-delay: 0.2s;
background: linear-gradient(90deg, $orange, $red);
.panel-editor-resizer__handle-dots {
transition: opacity 0.2s ease-in;
opacity: 0;
}
}
}
.panel-editor-resizer__handle-dots {
border-top: 2px dashed $text-color-faint;
position: relative;
top: 4px;
}
.viz-picker {
margin-top: -40px;
padding: 20px;
position: relative;
}
.viz-picker-list {
display: flex;
flex-wrap: wrap;
}
.viz-picker__item {
background: $panel-bg;
border: $panel-border;
border-radius: 3px;
height: 100px;
width: 150px;
flex-shrink: 0;
flex-direction: column;
text-align: center;
cursor: pointer;
display: flex;
margin-right: 10px;
margin-bottom: 10px;
//border: 1px solid transparent;
align-items: center;
justify-content: center;
padding-bottom: 6px;
transition: transform 1 ease;
&--current {
box-shadow: 0 0 6px $orange;
border: 1px solid $orange;
}
&:hover {
box-shadow: $panel-editor-viz-item-shadow-hover;
background: $panel-editor-viz-item-bg-hover;
border: $panel-editor-viz-item-border-hover;
}
}
.viz-picker__item-name {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
font-size: $font-size-sm;
display: flex;
flex-direction: column;
align-self: center;
height: 23px;
font-weight: 500;
}
.viz-picker__item-img {
height: 55px;
}
.panel-editor-tabs {
position: relative;
z-index: 2;
display: flex;
flex-direction: column;
position: absolute;
top: 44px;
left: 20px;
align-items: flex-start;
&::before {
content: '';
display: block;
position: absolute;
top: 10px;
bottom: 10px;
left: 21px;
width: 2px;
background: $panel-editor-tabs-line-color;
}
}
.panel-editor-tabs__item {
margin-bottom: 25px;
position: relative;
z-index: 1;
text-align: center;
&:last-child {
margin-bottom: 0;
}
}
.panel-editor-tabs__link {
display: inline-block;
&.active {
position: relative;
}
.gicon {
height: 44px;
width: 53px;
margin-right: 5px;
transition: transform 0.1s ease 0.1s;
&:hover {
filter: $panel-editor-side-menu-shadow;
transform: translate(-2px, -2px);
transform: scale(1.1);
}
}
}
.ds-picker-list {
display: flex;
flex-wrap: wrap;
margin-bottom: 13px;
flex-direction: column;
}
.ds-picker-list__item {
background: $panel-editor-viz-item-bg;
border: $panel-editor-viz-item-border;
border-radius: 3px;
display: flex;
cursor: pointer;
margin-bottom: 3px;
padding: 5px 15px;
align-items: center;
height: 44px;
&--selected {
background: $panel-editor-viz-item-bg-hover;
border: $panel-editor-viz-item-border-hover;
box-shadow: $panel-editor-viz-item-shadow-hover;
}
&--active {
box-shadow: 0 0 6px $orange;
border: 1px solid $orange;
.ds-picker-list__name {
color: $text-color;
}
}
}
.ds-picker {
position: relative;
min-width: 200px;
}
.ds-picker-menu {
min-width: 400px;
max-width: 500px;
position: absolute;
background: $panel-editor-toolbar-view-bg;
padding: 5px;
overflow: auto;
}
.ds-picker-list__name {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
font-size: $font-size-md;
padding-left: 15px;
}
.ds-picker-list__img {
width: 30px;
}
.form-option-box {
margin-bottom: 20px;
}
.form-option-box__header {
border-bottom: 2px solid $dark-4;
padding: 5px 0px;
font-size: $font-size-md;
margin-bottom: 20px;
}
.form-section {
margin-bottom: 10px;
}
.form-section__header {
padding: 5px 10px;
font-size: $font-size-h5;
margin-bottom: 20px;
background: $input-label-bg;
border-radius: 3px;
position: relative;
.btn {
position: absolute;
right: 0;
top: 2px;
}
}
.form-section__body {
padding: 0 10px;
}
.panel-editor-tabs__item-popover {
background: $orange;
}