2019-02-18 11:03:52 +01:00
|
|
|
/***
|
|
|
|
|
* !!! THIS FILE WAS GENERATED AUTOMATICALLY !!!
|
|
|
|
|
*
|
2019-02-18 11:05:02 +01:00
|
|
|
* Do not modify this file!
|
2019-02-18 11:03:52 +01:00
|
|
|
* - Edit grafana-ui/src/themes/dark.ts to regenerate
|
|
|
|
|
* - Edit grafana-ui/src/themes/_variables.dark.scss.tmpl.ts to update template
|
|
|
|
|
*
|
|
|
|
|
* !!! THIS FILE WAS GENERATED AUTOMATICALLY !!!
|
|
|
|
|
*/
|
|
|
|
|
|
2023-07-19 16:05:06 +01:00
|
|
|
@use 'sass:color';
|
2016-02-15 15:27:41 +01:00
|
|
|
// Global values
|
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
2017-10-18 07:49:52 +02:00
|
|
|
$theme-name: dark;
|
2016-02-15 15:27:41 +01:00
|
|
|
|
2022-01-31 07:57:14 +01:00
|
|
|
$colors-action-hover: rgba(204, 204, 220, 0.16);
|
|
|
|
|
$colors-action-selected: rgba(204, 204, 220, 0.12);
|
|
|
|
|
|
2019-02-19 13:57:56 +01:00
|
|
|
// New Colors
|
|
|
|
|
// -------------------------
|
2021-04-21 14:25:43 +02:00
|
|
|
$blue-light: #6E9FFF;
|
|
|
|
|
$blue-base: #3D71D9;
|
|
|
|
|
$blue-shade: rgb(90, 134, 222);
|
|
|
|
|
$red-base: #D10E5C;
|
|
|
|
|
$red-shade: rgb(215, 50, 116);
|
|
|
|
|
$green-base: #1A7F4B;
|
|
|
|
|
$green-shade: rgb(60, 146, 102);
|
2019-09-26 09:32:32 +02:00
|
|
|
$orange-dark: #ff780a;
|
2019-02-19 13:57:56 +01:00
|
|
|
|
2020-03-24 10:30:53 +01:00
|
|
|
$gray98: #f7f8fa;
|
|
|
|
|
$gray95: #e9edf2;
|
|
|
|
|
$gray85: #c7d0d9;
|
|
|
|
|
$gray70: #9fa7b3;
|
|
|
|
|
$gray60: #7b8087;
|
|
|
|
|
$gray33: #464c54;
|
2020-04-14 11:32:14 +02:00
|
|
|
$gray25: #2c3235;
|
2020-03-24 10:30:53 +01:00
|
|
|
$gray15: #202226;
|
|
|
|
|
$gray10: #141619;
|
|
|
|
|
$gray05: #0b0c0e;
|
|
|
|
|
|
2016-02-15 15:27:41 +01:00
|
|
|
// Grays
|
2016-02-19 12:26:39 +01:00
|
|
|
// -------------------------
|
2019-02-20 16:11:36 +01:00
|
|
|
$black: #000000;
|
2019-02-19 13:57:56 +01:00
|
|
|
$dark-1: #141414;
|
|
|
|
|
$dark-2: #161719;
|
|
|
|
|
$dark-3: #1f1f20;
|
|
|
|
|
$dark-4: #212124;
|
|
|
|
|
$dark-5: #222426;
|
|
|
|
|
$dark-6: #262628;
|
|
|
|
|
$dark-7: #292a2d;
|
|
|
|
|
$dark-8: #2f2f32;
|
|
|
|
|
$dark-9: #343436;
|
|
|
|
|
$dark-10: #424345;
|
|
|
|
|
$gray-1: #555555;
|
|
|
|
|
$gray-2: #8e8e8e;
|
|
|
|
|
$gray-3: #b3b3b3;
|
|
|
|
|
$gray-4: #d8d9da;
|
|
|
|
|
$gray-5: #ececec;
|
2019-06-24 14:39:59 +02:00
|
|
|
$gray-6: #f4f5f8;
|
2019-02-19 13:57:56 +01:00
|
|
|
|
2019-02-12 21:54:20 +01:00
|
|
|
$white: #ffffff;
|
2016-02-15 15:27:41 +01:00
|
|
|
|
2021-04-15 08:45:19 +02:00
|
|
|
$layer0: #111217;
|
2021-04-12 14:23:00 +02:00
|
|
|
$layer1: #181b1f;
|
|
|
|
|
$layer2: #22252b;
|
|
|
|
|
|
2023-05-03 18:28:37 +02:00
|
|
|
$divider: rgba(204, 204, 220, 0.12);
|
2021-04-12 14:23:00 +02:00
|
|
|
|
2023-05-03 18:28:37 +02:00
|
|
|
$border0: rgba(204, 204, 220, 0.12);
|
|
|
|
|
$border1: rgba(204, 204, 220, 0.20);
|
2021-04-12 14:23:00 +02:00
|
|
|
|
2016-02-15 15:27:41 +01:00
|
|
|
// Accent colors
|
|
|
|
|
// -------------------------
|
2020-04-14 11:32:14 +02:00
|
|
|
$blue: #33a2e5;
|
2019-02-20 16:11:36 +01:00
|
|
|
$red: $red-base;
|
2017-12-19 16:22:41 +01:00
|
|
|
$yellow: #ecbb13;
|
2019-02-20 16:11:36 +01:00
|
|
|
$orange: #eb7b18;
|
2017-12-19 16:22:41 +01:00
|
|
|
$purple: #9933cc;
|
2021-04-20 14:57:09 +02:00
|
|
|
$variable: #6E9FFF;
|
2017-12-19 16:22:41 +01:00
|
|
|
|
2019-02-21 15:05:17 +01:00
|
|
|
$brand-primary: #eb7b18;
|
2021-05-04 22:28:29 +02:00
|
|
|
$brand-success: #1A7F4B;
|
2023-05-01 19:33:30 +02:00
|
|
|
$brand-warning: #FF9900;
|
2021-05-04 22:28:29 +02:00
|
|
|
$brand-danger: #D10E5C;
|
2017-12-19 16:22:41 +01:00
|
|
|
|
2021-05-04 22:28:29 +02:00
|
|
|
$query-red: #FF5286;
|
|
|
|
|
$query-green: #6CCF8E;
|
2018-12-03 17:20:02 +01:00
|
|
|
$query-purple: #fe85fc;
|
2019-02-21 15:05:17 +01:00
|
|
|
$query-orange: #eb7b18;
|
2017-12-15 11:01:18 +01:00
|
|
|
|
2016-02-15 15:27:41 +01:00
|
|
|
// Status colors
|
2020-04-13 09:58:40 +02:00
|
|
|
// -------------------------¨
|
2021-05-18 18:00:30 +02:00
|
|
|
$online: #6CCF8E;
|
2023-05-01 19:33:30 +02:00
|
|
|
$warn: #fbad37;
|
2021-05-18 18:00:30 +02:00
|
|
|
$critical: #FF5286;
|
2016-02-15 15:27:41 +01:00
|
|
|
|
2016-02-16 09:42:46 +01:00
|
|
|
// Scaffolding
|
2016-02-15 15:27:41 +01:00
|
|
|
// -------------------------
|
2021-04-17 19:17:18 +02:00
|
|
|
$body-bg: #111217;
|
|
|
|
|
$page-bg: #111217;
|
2021-04-15 08:45:19 +02:00
|
|
|
$dashboard-bg: #111217;
|
2021-04-12 14:23:00 +02:00
|
|
|
|
2021-12-15 17:50:29 +01:00
|
|
|
$text-color-strong: #FFFFFF;
|
2021-06-11 17:33:56 +02:00
|
|
|
$text-color: rgb(204, 204, 220);
|
|
|
|
|
$text-color-semi-weak: rgba(204, 204, 220, 0.65);
|
|
|
|
|
$text-color-weak: rgba(204, 204, 220, 0.65);
|
2021-12-17 11:49:21 -07:00
|
|
|
$text-color-faint: rgba(204, 204, 220, 0.6);
|
2021-12-21 17:19:22 +01:00
|
|
|
$text-color-emphasis: #FFFFFF;
|
2021-04-20 14:57:09 +02:00
|
|
|
$text-blue: #6E9FFF;
|
2016-03-24 22:01:33 -04:00
|
|
|
|
2016-03-28 13:10:42 +02:00
|
|
|
$text-shadow-faint: 1px 1px 4px rgb(45, 45, 45);
|
2019-02-06 15:51:36 +01:00
|
|
|
$textShadow: none;
|
2016-02-16 08:30:37 +01:00
|
|
|
|
2016-02-24 10:32:22 +01:00
|
|
|
// gradients
|
2022-05-05 17:10:06 +01:00
|
|
|
$brand-gradient-horizontal: linear-gradient(270deg, #F55F3E 0%, #FF8833 100%);
|
|
|
|
|
$brand-gradient-vertical: linear-gradient(0.01deg, #F55F3E 0.01%, #FF8833 99.99%);
|
2016-02-24 10:32:22 +01:00
|
|
|
|
2016-02-16 09:42:46 +01:00
|
|
|
// Links
|
|
|
|
|
// -------------------------
|
2021-06-11 17:33:56 +02:00
|
|
|
$link-color: rgb(204, 204, 220);
|
2021-12-17 11:49:21 -07:00
|
|
|
$link-color-disabled: rgba(204, 204, 220, 0.6);
|
2021-12-21 17:19:22 +01:00
|
|
|
$link-hover-color: #FFFFFF;
|
2021-04-21 14:25:43 +02:00
|
|
|
$external-link-color: #6E9FFF;
|
2016-02-15 15:27:41 +01:00
|
|
|
|
2016-02-16 09:42:46 +01:00
|
|
|
// Typography
|
|
|
|
|
// -------------------------
|
2021-06-11 17:33:56 +02:00
|
|
|
$headings-color: rgb(204, 204, 220);
|
2019-02-19 13:57:56 +01:00
|
|
|
$abbr-border-color: $gray-2 !default;
|
2017-12-19 16:22:41 +01:00
|
|
|
$text-muted: $text-color-weak;
|
2016-02-15 15:27:41 +01:00
|
|
|
|
2019-02-19 13:57:56 +01:00
|
|
|
$hr-border-color: $dark-9;
|
2016-02-16 09:42:46 +01:00
|
|
|
|
|
|
|
|
// Panel
|
|
|
|
|
// -------------------------
|
2021-04-12 14:23:00 +02:00
|
|
|
$panel-bg: #181b1f;
|
2023-05-03 18:28:37 +02:00
|
|
|
$panel-border: 1px solid rgba(204, 204, 220, 0.12);
|
2021-08-25 15:34:19 +02:00
|
|
|
$panel-header-hover-bg: rgba(204, 204, 220, 0.16);
|
2021-04-27 15:13:08 +02:00
|
|
|
$panel-box-shadow: none;
|
2019-01-07 13:56:36 +01:00
|
|
|
$panel-corner: $panel-bg;
|
2016-02-16 09:42:46 +01:00
|
|
|
|
2017-12-03 08:11:07 +01:00
|
|
|
// page header
|
2021-04-17 19:17:18 +02:00
|
|
|
$page-header-bg: #111217;
|
2019-02-19 13:57:56 +01:00
|
|
|
$page-header-shadow: inset 0px -4px 14px $dark-3;
|
2021-04-17 19:17:18 +02:00
|
|
|
$page-header-border-color: #111217;
|
2017-12-03 08:11:07 +01:00
|
|
|
|
2019-02-05 12:05:02 +01:00
|
|
|
$divider-border-color: $gray-1;
|
2016-02-16 09:42:46 +01:00
|
|
|
|
|
|
|
|
// Graphite Target Editor
|
2021-04-12 14:23:00 +02:00
|
|
|
$tight-form-func-bg: #22252b;
|
2021-04-14 21:49:38 +02:00
|
|
|
$tight-form-func-highlight-bg: rgb(40, 43, 49);
|
2016-02-16 09:42:46 +01:00
|
|
|
|
2021-08-25 15:34:19 +02:00
|
|
|
$modal-backdrop-bg: rgba(204, 204, 220, 0.16);
|
2018-10-06 12:09:30 -07:00
|
|
|
$code-tag-bg: $dark-1;
|
2019-02-19 13:57:56 +01:00
|
|
|
$code-tag-border: $dark-9;
|
2016-04-14 11:38:07 -04:00
|
|
|
|
2017-11-23 12:54:12 +01:00
|
|
|
// cards
|
2021-04-12 14:23:00 +02:00
|
|
|
$card-background: #22252b;
|
2021-04-14 21:49:38 +02:00
|
|
|
$card-background-hover: rgb(40, 43, 49);
|
2020-04-23 02:52:11 -07:00
|
|
|
$card-shadow: none;
|
2016-02-16 09:42:46 +01:00
|
|
|
|
2016-02-15 15:27:41 +01:00
|
|
|
// Lists
|
2017-12-19 16:22:41 +01:00
|
|
|
$list-item-bg: $card-background;
|
2019-02-19 13:57:56 +01:00
|
|
|
$list-item-hover-bg: $card-background-hover;
|
2017-12-19 16:22:41 +01:00
|
|
|
$list-item-shadow: $card-shadow;
|
2018-11-06 08:01:00 +01:00
|
|
|
|
2021-04-12 14:23:00 +02:00
|
|
|
$empty-list-cta-bg: #22252b;
|
2016-02-15 15:27:41 +01:00
|
|
|
|
|
|
|
|
// Scrollbars
|
2019-02-21 09:41:53 +01:00
|
|
|
$scrollbarBackground: #404357;
|
|
|
|
|
$scrollbarBackground2: $dark-10;
|
|
|
|
|
$scrollbarBorder: black;
|
2016-02-15 15:27:41 +01:00
|
|
|
|
|
|
|
|
// Tables
|
|
|
|
|
// -------------------------
|
2021-04-12 14:23:00 +02:00
|
|
|
$table-bg-accent: #22252b;
|
2023-05-03 18:28:37 +02:00
|
|
|
$table-border: rgba(204, 204, 220, 0.20);
|
2021-04-12 14:23:00 +02:00
|
|
|
$table-bg-odd: rgb(28, 31, 35);
|
|
|
|
|
$table-bg-hover: rgb(35, 38, 42);
|
2017-12-05 12:48:16 +01:00
|
|
|
|
2016-02-15 15:27:41 +01:00
|
|
|
// Buttons
|
|
|
|
|
// -------------------------
|
2020-03-26 11:50:27 +01:00
|
|
|
$btn-primary-bg: $blue-base;
|
|
|
|
|
$btn-primary-bg-hl: $blue-shade;
|
2016-02-15 15:27:41 +01:00
|
|
|
|
2020-03-26 11:50:27 +01:00
|
|
|
$btn-secondary-bg: $dark-6;
|
2023-07-19 16:05:06 +01:00
|
|
|
$btn-secondary-bg-hl: color.adjust($dark-6, $lightness: 4%);
|
2019-02-11 16:38:05 +01:00
|
|
|
|
2019-02-19 13:57:56 +01:00
|
|
|
$btn-success-bg: $green-base;
|
|
|
|
|
$btn-success-bg-hl: $green-shade;
|
2016-02-15 15:27:41 +01:00
|
|
|
|
2019-02-20 16:11:36 +01:00
|
|
|
$btn-danger-bg: $red-base;
|
|
|
|
|
$btn-danger-bg-hl: $red-shade;
|
2016-02-15 15:27:41 +01:00
|
|
|
|
2019-02-19 13:57:56 +01:00
|
|
|
$btn-inverse-bg: $dark-6;
|
2023-07-19 16:05:06 +01:00
|
|
|
$btn-inverse-bg-hl: color.adjust($dark-6, $lightness: 4%);
|
2017-12-19 16:22:41 +01:00
|
|
|
$btn-inverse-text-color: $link-color;
|
|
|
|
|
$btn-inverse-text-shadow: 0px 1px 0 rgba(0, 0, 0, 0.1);
|
2016-02-15 15:27:41 +01:00
|
|
|
|
2017-12-19 16:22:41 +01:00
|
|
|
$btn-link-color: $gray-3;
|
2016-02-15 15:27:41 +01:00
|
|
|
|
2017-12-19 16:22:41 +01:00
|
|
|
$iconContainerBackground: $black;
|
2016-02-15 15:27:41 +01:00
|
|
|
|
2019-02-19 13:57:56 +01:00
|
|
|
$btn-divider-left: $dark-9;
|
|
|
|
|
$btn-divider-right: $dark-3;
|
2016-08-11 21:22:40 +02:00
|
|
|
|
2018-01-18 14:40:08 +01:00
|
|
|
$btn-drag-image: '../img/grab_dark.svg';
|
2016-08-11 18:25:41 +02:00
|
|
|
|
2019-04-17 15:18:32 +02:00
|
|
|
$navbar-btn-gicon-brightness: brightness(0.5);
|
|
|
|
|
|
2019-11-22 12:26:14 +01:00
|
|
|
$btn-active-box-shadow: 0px 0px 4px rgba(255, 120, 10, 0.5);
|
|
|
|
|
|
2016-02-15 15:27:41 +01:00
|
|
|
// Forms
|
|
|
|
|
// -------------------------
|
2021-04-23 14:06:30 +02:00
|
|
|
$input-bg: #111217;
|
2021-08-25 11:30:32 +02:00
|
|
|
$input-bg-disabled: rgba(204, 204, 220, 0.04);
|
2017-12-19 16:22:41 +01:00
|
|
|
|
2021-06-11 17:33:56 +02:00
|
|
|
$input-color: rgb(204, 204, 220);
|
2023-05-03 18:28:37 +02:00
|
|
|
$input-border-color: rgba(204, 204, 220, 0.20);
|
2020-04-13 09:58:40 +02:00
|
|
|
$input-box-shadow: none;
|
2021-04-23 14:06:30 +02:00
|
|
|
$input-border-focus: #6E9FFF;
|
|
|
|
|
$input-box-shadow-focus: #6E9FFF !default;
|
2021-12-17 11:49:21 -07:00
|
|
|
$input-color-placeholder: rgba(204, 204, 220, 0.6);
|
2021-04-12 14:23:00 +02:00
|
|
|
$input-label-bg: #22252b;
|
2018-10-08 13:39:00 +02:00
|
|
|
$input-color-select-arrow: $white;
|
2016-02-15 15:27:41 +01:00
|
|
|
|
|
|
|
|
// Search
|
2017-12-08 18:15:24 +01:00
|
|
|
$search-shadow: 0 0 30px 0 $black;
|
2016-02-15 15:27:41 +01:00
|
|
|
|
2018-05-25 12:51:27 +02:00
|
|
|
// Typeahead
|
|
|
|
|
$typeahead-shadow: 0 5px 10px 0 $black;
|
2019-02-19 13:57:56 +01:00
|
|
|
$typeahead-selected-bg: $dark-9;
|
2018-12-03 17:20:02 +01:00
|
|
|
$typeahead-selected-color: $yellow;
|
2018-05-25 12:51:27 +02:00
|
|
|
|
2016-02-15 15:27:41 +01:00
|
|
|
// Dropdowns
|
|
|
|
|
// -------------------------
|
2021-04-27 15:13:08 +02:00
|
|
|
$dropdownBackground: #181b1f;
|
2023-05-03 18:28:37 +02:00
|
|
|
$dropdownBorder: rgba(204, 204, 220, 0.12);
|
|
|
|
|
$dropdownDividerTop: rgba(204, 204, 220, 0.12);
|
|
|
|
|
$dropdownDividerBottom: rgba(204, 204, 220, 0.12);
|
2023-05-17 14:23:54 +02:00
|
|
|
$dropdownShadow: 0px 8px 24px rgb(1, 4, 9);
|
2016-02-15 15:27:41 +01:00
|
|
|
|
2020-04-12 15:05:49 +02:00
|
|
|
$dropdownLinkColor: $link-color;
|
2017-12-19 16:22:41 +01:00
|
|
|
$dropdownLinkColorHover: $white;
|
|
|
|
|
$dropdownLinkColorActive: $white;
|
2019-02-19 13:57:56 +01:00
|
|
|
$dropdownLinkBackgroundHover: $dark-9;
|
2016-02-15 15:27:41 +01:00
|
|
|
|
|
|
|
|
// Horizontal forms & lists
|
|
|
|
|
// -------------------------
|
2017-12-19 16:22:41 +01:00
|
|
|
$horizontalComponentOffset: 180px;
|
2016-02-15 15:27:41 +01:00
|
|
|
|
2019-02-06 15:51:36 +01:00
|
|
|
// Navbar
|
2016-02-15 15:27:41 +01:00
|
|
|
// -------------------------
|
2017-12-19 16:22:41 +01:00
|
|
|
$navbarHeight: 55px;
|
2019-02-19 13:57:56 +01:00
|
|
|
$navbarBorder: 1px solid $dark-6;
|
2017-12-19 16:22:41 +01:00
|
|
|
|
2016-02-15 16:02:58 +01:00
|
|
|
// Sidemenu
|
|
|
|
|
// -------------------------
|
2020-03-24 10:30:53 +01:00
|
|
|
$side-menu-bg: $panel-bg;
|
|
|
|
|
$side-menu-bg-mobile: $panel-bg;
|
|
|
|
|
$side-menu-border: none;
|
2021-04-12 14:23:00 +02:00
|
|
|
$side-menu-item-hover-bg: #22252b;
|
2021-04-15 08:45:19 +02:00
|
|
|
$side-menu-shadow: 0 0 30px #111;
|
2020-04-13 09:58:40 +02:00
|
|
|
$side-menu-icon-color: #9fa7b3;
|
2021-06-11 17:33:56 +02:00
|
|
|
$side-menu-header-color: rgb(204, 204, 220);
|
2016-02-15 16:02:58 +01:00
|
|
|
|
2017-06-12 16:46:02 +02:00
|
|
|
// Menu dropdowns
|
|
|
|
|
// -------------------------
|
2021-04-22 09:18:32 +02:00
|
|
|
$menu-dropdown-bg: #181b1f;
|
2021-08-25 15:34:19 +02:00
|
|
|
$menu-dropdown-hover-bg: rgba(204, 204, 220, 0.16);
|
2023-05-17 14:23:54 +02:00
|
|
|
$menu-dropdown-shadow: 0px 8px 24px rgb(1, 4, 9);
|
2017-06-12 16:46:02 +02:00
|
|
|
|
2017-12-05 12:48:16 +01:00
|
|
|
// Tabs
|
|
|
|
|
// -------------------------
|
2019-02-19 13:57:56 +01:00
|
|
|
$tab-border-color: $dark-9;
|
2016-02-15 16:02:58 +01:00
|
|
|
|
2016-02-15 15:27:41 +01:00
|
|
|
// Form states and alerts
|
|
|
|
|
// -------------------------
|
2023-05-01 19:33:30 +02:00
|
|
|
$warning-text-color: #fbad37;
|
2021-04-23 14:06:30 +02:00
|
|
|
$error-text-color: #FF5286;
|
|
|
|
|
$success-text-color: #6CCF8E;
|
2016-02-15 15:27:41 +01:00
|
|
|
|
2021-04-23 14:06:30 +02:00
|
|
|
$alert-error-bg: #D10E5C;
|
|
|
|
|
$alert-success-bg: #1A7F4B;
|
2023-05-01 19:33:30 +02:00
|
|
|
$alert-warning-bg: #FF9900;
|
|
|
|
|
$alert-info-bg: #FF9900;
|
2016-02-15 15:27:41 +01:00
|
|
|
|
2016-04-11 20:33:58 -04:00
|
|
|
// Tooltips and popovers
|
|
|
|
|
// -------------------------
|
2017-12-19 16:22:41 +01:00
|
|
|
$tooltipArrowWidth: 5px;
|
|
|
|
|
$tooltipLinkColor: $link-color;
|
2021-11-01 09:14:53 -05:00
|
|
|
$tooltipExternalLinkColor: $external-link-color;
|
2017-12-19 16:22:41 +01:00
|
|
|
$graph-tooltip-bg: $dark-1;
|
2016-04-11 20:33:58 -04:00
|
|
|
|
2022-05-05 14:28:45 +01:00
|
|
|
$tooltipBackground: #22252b;
|
2021-06-11 17:33:56 +02:00
|
|
|
$tooltipColor: rgb(204, 204, 220);
|
2022-05-05 14:28:45 +01:00
|
|
|
$tooltipArrowColor: #22252b;
|
2021-04-12 14:23:00 +02:00
|
|
|
$tooltipBackgroundError: #D10E5C;
|
2023-05-17 14:23:54 +02:00
|
|
|
$tooltipShadow: 0px 4px 8px rgba(1, 4, 9, 0.75);
|
2019-01-07 13:05:27 +01:00
|
|
|
|
2021-04-22 09:18:32 +02:00
|
|
|
$popover-bg: #181b1f;
|
2021-06-11 17:33:56 +02:00
|
|
|
$popover-color: rgb(204, 204, 220);
|
2023-05-03 18:28:37 +02:00
|
|
|
$popover-border-color: rgba(204, 204, 220, 0.12);
|
2021-04-12 14:23:00 +02:00
|
|
|
$popover-header-bg: #22252b;
|
2023-05-17 14:23:54 +02:00
|
|
|
$popover-shadow: 0px 8px 24px rgb(1, 4, 9);
|
2020-03-30 16:31:53 +02:00
|
|
|
|
|
|
|
|
$popover-help-bg: $tooltipBackground;
|
|
|
|
|
$popover-help-color: $text-color;
|
|
|
|
|
$popover-error-bg: $btn-danger-bg;
|
|
|
|
|
|
2020-07-13 13:52:28 +02:00
|
|
|
$popover-code-bg: $popover-bg;
|
|
|
|
|
$popover-code-boxshadow: $tooltipShadow;
|
|
|
|
|
|
2016-02-15 15:27:41 +01:00
|
|
|
// images
|
2018-01-18 14:40:08 +01:00
|
|
|
$checkboxImageUrl: '../img/checkbox.png';
|
2016-03-15 09:15:24 +01:00
|
|
|
|
2017-07-31 14:39:33 +02:00
|
|
|
// info box
|
2019-02-20 16:11:36 +01:00
|
|
|
$info-box-border-color: $blue-base;
|
2017-07-31 14:39:33 +02:00
|
|
|
|
2016-05-24 08:11:28 +02:00
|
|
|
// footer
|
2017-12-19 16:22:41 +01:00
|
|
|
$footer-link-color: $gray-2;
|
|
|
|
|
$footer-link-hover: $gray-4;
|
2016-11-01 16:06:49 +01:00
|
|
|
|
2017-05-20 18:21:41 +02:00
|
|
|
// json-explorer
|
2017-05-20 23:43:59 +02:00
|
|
|
$json-explorer-default-color: $text-color;
|
2017-05-20 22:55:36 +02:00
|
|
|
$json-explorer-string-color: #23d662;
|
|
|
|
|
$json-explorer-number-color: $variable;
|
|
|
|
|
$json-explorer-boolean-color: $variable;
|
2017-12-19 16:22:41 +01:00
|
|
|
$json-explorer-null-color: #eec97d;
|
2017-05-20 18:21:41 +02:00
|
|
|
$json-explorer-undefined-color: rgb(239, 143, 190);
|
2017-12-19 16:22:41 +01:00
|
|
|
$json-explorer-function-color: #fd48cb;
|
2017-05-20 18:21:41 +02:00
|
|
|
$json-explorer-rotate-time: 100ms;
|
|
|
|
|
$json-explorer-toggler-opacity: 0.6;
|
2017-12-19 16:22:41 +01:00
|
|
|
$json-explorer-bracket-color: #9494ff;
|
|
|
|
|
$json-explorer-key-color: #23a0db;
|
|
|
|
|
$json-explorer-url-color: #027bff;
|
History and Version Control for Dashboard Updates
A simple version control system for dashboards. Closes #1504.
Goals
1. To create a new dashboard version every time a dashboard is saved.
2. To allow users to view all versions of a given dashboard.
3. To allow users to rollback to a previous version of a dashboard.
4. To allow users to compare two versions of a dashboard.
Usage
Navigate to a dashboard, and click the settings cog. From there, click
the "Changelog" button to be brought to the Changelog view. In this
view, a table containing each version of a dashboard can be seen. Each
entry in the table represents a dashboard version. A selectable
checkbox, the version number, date created, name of the user who created
that version, and commit message is shown in the table, along with a
button that allows a user to restore to a previous version of that
dashboard. If a user wants to restore to a previous version of their
dashboard, they can do so by clicking the previously mentioned button.
If a user wants to compare two different versions of a dashboard, they
can do so by clicking the checkbox of two different dashboard versions,
then clicking the "Compare versions" button located below the dashboard.
From there, the user is brought to a view showing a summary of the
dashboard differences. Each summarized change contains a link that can
be clicked to take the user a JSON diff highlighting the changes line by
line.
Overview of Changes
Backend Changes
- A `dashboard_version` table was created to store each dashboard
version, along with a dashboard version model and structs to represent
the queries and commands necessary for the dashboard version API
methods.
- API endpoints were created to support working with dashboard
versions.
- Methods were added to create, update, read, and destroy dashboard
versions in the database.
- Logic was added to compute the diff between two versions, and
display it to the user.
- The dashboard migration logic was updated to save a "Version
1" of each existing dashboard in the database.
Frontend Changes
- New views
- Methods to pull JSON and HTML from endpoints
New API Endpoints
Each endpoint requires the authorization header to be sent in
the format,
```
Authorization: Bearer <jwt>
```
where `<jwt>` is a JSON web token obtained from the Grafana
admin panel.
`GET "/api/dashboards/db/:dashboardId/versions?orderBy=<string>&limit=<int>&start=<int>"`
Get all dashboard versions for the given dashboard ID. Accepts
three URL parameters:
- `orderBy` String to order the results by. Possible values
are `version`, `created`, `created_by`, `message`. Default
is `versions`. Ordering is always in descending order.
- `limit` Maximum number of results to return
- `start` Position in results to start from
`GET "/api/dashboards/db/:dashboardId/versions/:id"`
Get an individual dashboard version by ID, for the given
dashboard ID.
`POST "/api/dashboards/db/:dashboardId/restore"`
Restore to the given dashboard version. Post body is of
content-type `application/json`, and must contain.
```json
{
"dashboardId": <int>,
"version": <int>
}
```
`GET "/api/dashboards/db/:dashboardId/compare/:versionA...:versionB"`
Compare two dashboard versions by ID for the given
dashboard ID, returning a JSON delta formatted
representation of the diff. The URL format follows
what GitHub does. For example, visiting
[/api/dashboards/db/18/compare/22...33](http://ec2-54-80-139-44.compute-1.amazonaws.com:3000/api/dashboards/db/18/compare/22...33)
will return the diff between versions 22 and 33 for
the dashboard ID 18.
Dependencies Added
- The Go package [gojsondiff](https://github.com/yudai/gojsondiff)
was added and vendored.
2017-05-24 19:14:39 -04:00
|
|
|
|
|
|
|
|
// Changelog and diff
|
|
|
|
|
// -------------------------
|
2021-08-25 15:34:19 +02:00
|
|
|
$diff-label-bg: rgba(204, 204, 220, 0.16);
|
2017-12-19 16:22:41 +01:00
|
|
|
$diff-label-fg: $white;
|
History and Version Control for Dashboard Updates
A simple version control system for dashboards. Closes #1504.
Goals
1. To create a new dashboard version every time a dashboard is saved.
2. To allow users to view all versions of a given dashboard.
3. To allow users to rollback to a previous version of a dashboard.
4. To allow users to compare two versions of a dashboard.
Usage
Navigate to a dashboard, and click the settings cog. From there, click
the "Changelog" button to be brought to the Changelog view. In this
view, a table containing each version of a dashboard can be seen. Each
entry in the table represents a dashboard version. A selectable
checkbox, the version number, date created, name of the user who created
that version, and commit message is shown in the table, along with a
button that allows a user to restore to a previous version of that
dashboard. If a user wants to restore to a previous version of their
dashboard, they can do so by clicking the previously mentioned button.
If a user wants to compare two different versions of a dashboard, they
can do so by clicking the checkbox of two different dashboard versions,
then clicking the "Compare versions" button located below the dashboard.
From there, the user is brought to a view showing a summary of the
dashboard differences. Each summarized change contains a link that can
be clicked to take the user a JSON diff highlighting the changes line by
line.
Overview of Changes
Backend Changes
- A `dashboard_version` table was created to store each dashboard
version, along with a dashboard version model and structs to represent
the queries and commands necessary for the dashboard version API
methods.
- API endpoints were created to support working with dashboard
versions.
- Methods were added to create, update, read, and destroy dashboard
versions in the database.
- Logic was added to compute the diff between two versions, and
display it to the user.
- The dashboard migration logic was updated to save a "Version
1" of each existing dashboard in the database.
Frontend Changes
- New views
- Methods to pull JSON and HTML from endpoints
New API Endpoints
Each endpoint requires the authorization header to be sent in
the format,
```
Authorization: Bearer <jwt>
```
where `<jwt>` is a JSON web token obtained from the Grafana
admin panel.
`GET "/api/dashboards/db/:dashboardId/versions?orderBy=<string>&limit=<int>&start=<int>"`
Get all dashboard versions for the given dashboard ID. Accepts
three URL parameters:
- `orderBy` String to order the results by. Possible values
are `version`, `created`, `created_by`, `message`. Default
is `versions`. Ordering is always in descending order.
- `limit` Maximum number of results to return
- `start` Position in results to start from
`GET "/api/dashboards/db/:dashboardId/versions/:id"`
Get an individual dashboard version by ID, for the given
dashboard ID.
`POST "/api/dashboards/db/:dashboardId/restore"`
Restore to the given dashboard version. Post body is of
content-type `application/json`, and must contain.
```json
{
"dashboardId": <int>,
"version": <int>
}
```
`GET "/api/dashboards/db/:dashboardId/compare/:versionA...:versionB"`
Compare two dashboard versions by ID for the given
dashboard ID, returning a JSON delta formatted
representation of the diff. The URL format follows
what GitHub does. For example, visiting
[/api/dashboards/db/18/compare/22...33](http://ec2-54-80-139-44.compute-1.amazonaws.com:3000/api/dashboards/db/18/compare/22...33)
will return the diff between versions 22 and 33 for
the dashboard ID 18.
Dependencies Added
- The Go package [gojsondiff](https://github.com/yudai/gojsondiff)
was added and vendored.
2017-05-24 19:14:39 -04:00
|
|
|
|
2021-04-12 14:23:00 +02:00
|
|
|
$diff-group-bg: #22252b;
|
2017-12-19 16:22:41 +01:00
|
|
|
$diff-arrow-color: $white;
|
History and Version Control for Dashboard Updates
A simple version control system for dashboards. Closes #1504.
Goals
1. To create a new dashboard version every time a dashboard is saved.
2. To allow users to view all versions of a given dashboard.
3. To allow users to rollback to a previous version of a dashboard.
4. To allow users to compare two versions of a dashboard.
Usage
Navigate to a dashboard, and click the settings cog. From there, click
the "Changelog" button to be brought to the Changelog view. In this
view, a table containing each version of a dashboard can be seen. Each
entry in the table represents a dashboard version. A selectable
checkbox, the version number, date created, name of the user who created
that version, and commit message is shown in the table, along with a
button that allows a user to restore to a previous version of that
dashboard. If a user wants to restore to a previous version of their
dashboard, they can do so by clicking the previously mentioned button.
If a user wants to compare two different versions of a dashboard, they
can do so by clicking the checkbox of two different dashboard versions,
then clicking the "Compare versions" button located below the dashboard.
From there, the user is brought to a view showing a summary of the
dashboard differences. Each summarized change contains a link that can
be clicked to take the user a JSON diff highlighting the changes line by
line.
Overview of Changes
Backend Changes
- A `dashboard_version` table was created to store each dashboard
version, along with a dashboard version model and structs to represent
the queries and commands necessary for the dashboard version API
methods.
- API endpoints were created to support working with dashboard
versions.
- Methods were added to create, update, read, and destroy dashboard
versions in the database.
- Logic was added to compute the diff between two versions, and
display it to the user.
- The dashboard migration logic was updated to save a "Version
1" of each existing dashboard in the database.
Frontend Changes
- New views
- Methods to pull JSON and HTML from endpoints
New API Endpoints
Each endpoint requires the authorization header to be sent in
the format,
```
Authorization: Bearer <jwt>
```
where `<jwt>` is a JSON web token obtained from the Grafana
admin panel.
`GET "/api/dashboards/db/:dashboardId/versions?orderBy=<string>&limit=<int>&start=<int>"`
Get all dashboard versions for the given dashboard ID. Accepts
three URL parameters:
- `orderBy` String to order the results by. Possible values
are `version`, `created`, `created_by`, `message`. Default
is `versions`. Ordering is always in descending order.
- `limit` Maximum number of results to return
- `start` Position in results to start from
`GET "/api/dashboards/db/:dashboardId/versions/:id"`
Get an individual dashboard version by ID, for the given
dashboard ID.
`POST "/api/dashboards/db/:dashboardId/restore"`
Restore to the given dashboard version. Post body is of
content-type `application/json`, and must contain.
```json
{
"dashboardId": <int>,
"version": <int>
}
```
`GET "/api/dashboards/db/:dashboardId/compare/:versionA...:versionB"`
Compare two dashboard versions by ID for the given
dashboard ID, returning a JSON delta formatted
representation of the diff. The URL format follows
what GitHub does. For example, visiting
[/api/dashboards/db/18/compare/22...33](http://ec2-54-80-139-44.compute-1.amazonaws.com:3000/api/dashboards/db/18/compare/22...33)
will return the diff between versions 22 and 33 for
the dashboard ID 18.
Dependencies Added
- The Go package [gojsondiff](https://github.com/yudai/gojsondiff)
was added and vendored.
2017-05-24 19:14:39 -04:00
|
|
|
|
2021-04-12 14:23:00 +02:00
|
|
|
$diff-json-bg: #22252b;
|
2021-06-11 17:33:56 +02:00
|
|
|
$diff-json-fg: rgb(204, 204, 220);
|
History and Version Control for Dashboard Updates
A simple version control system for dashboards. Closes #1504.
Goals
1. To create a new dashboard version every time a dashboard is saved.
2. To allow users to view all versions of a given dashboard.
3. To allow users to rollback to a previous version of a dashboard.
4. To allow users to compare two versions of a dashboard.
Usage
Navigate to a dashboard, and click the settings cog. From there, click
the "Changelog" button to be brought to the Changelog view. In this
view, a table containing each version of a dashboard can be seen. Each
entry in the table represents a dashboard version. A selectable
checkbox, the version number, date created, name of the user who created
that version, and commit message is shown in the table, along with a
button that allows a user to restore to a previous version of that
dashboard. If a user wants to restore to a previous version of their
dashboard, they can do so by clicking the previously mentioned button.
If a user wants to compare two different versions of a dashboard, they
can do so by clicking the checkbox of two different dashboard versions,
then clicking the "Compare versions" button located below the dashboard.
From there, the user is brought to a view showing a summary of the
dashboard differences. Each summarized change contains a link that can
be clicked to take the user a JSON diff highlighting the changes line by
line.
Overview of Changes
Backend Changes
- A `dashboard_version` table was created to store each dashboard
version, along with a dashboard version model and structs to represent
the queries and commands necessary for the dashboard version API
methods.
- API endpoints were created to support working with dashboard
versions.
- Methods were added to create, update, read, and destroy dashboard
versions in the database.
- Logic was added to compute the diff between two versions, and
display it to the user.
- The dashboard migration logic was updated to save a "Version
1" of each existing dashboard in the database.
Frontend Changes
- New views
- Methods to pull JSON and HTML from endpoints
New API Endpoints
Each endpoint requires the authorization header to be sent in
the format,
```
Authorization: Bearer <jwt>
```
where `<jwt>` is a JSON web token obtained from the Grafana
admin panel.
`GET "/api/dashboards/db/:dashboardId/versions?orderBy=<string>&limit=<int>&start=<int>"`
Get all dashboard versions for the given dashboard ID. Accepts
three URL parameters:
- `orderBy` String to order the results by. Possible values
are `version`, `created`, `created_by`, `message`. Default
is `versions`. Ordering is always in descending order.
- `limit` Maximum number of results to return
- `start` Position in results to start from
`GET "/api/dashboards/db/:dashboardId/versions/:id"`
Get an individual dashboard version by ID, for the given
dashboard ID.
`POST "/api/dashboards/db/:dashboardId/restore"`
Restore to the given dashboard version. Post body is of
content-type `application/json`, and must contain.
```json
{
"dashboardId": <int>,
"version": <int>
}
```
`GET "/api/dashboards/db/:dashboardId/compare/:versionA...:versionB"`
Compare two dashboard versions by ID for the given
dashboard ID, returning a JSON delta formatted
representation of the diff. The URL format follows
what GitHub does. For example, visiting
[/api/dashboards/db/18/compare/22...33](http://ec2-54-80-139-44.compute-1.amazonaws.com:3000/api/dashboards/db/18/compare/22...33)
will return the diff between versions 22 and 33 for
the dashboard ID 18.
Dependencies Added
- The Go package [gojsondiff](https://github.com/yudai/gojsondiff)
was added and vendored.
2017-05-24 19:14:39 -04:00
|
|
|
|
2019-02-20 16:11:36 +01:00
|
|
|
$diff-json-added: $blue-shade;
|
|
|
|
|
$diff-json-deleted: $red-shade;
|
History and Version Control for Dashboard Updates
A simple version control system for dashboards. Closes #1504.
Goals
1. To create a new dashboard version every time a dashboard is saved.
2. To allow users to view all versions of a given dashboard.
3. To allow users to rollback to a previous version of a dashboard.
4. To allow users to compare two versions of a dashboard.
Usage
Navigate to a dashboard, and click the settings cog. From there, click
the "Changelog" button to be brought to the Changelog view. In this
view, a table containing each version of a dashboard can be seen. Each
entry in the table represents a dashboard version. A selectable
checkbox, the version number, date created, name of the user who created
that version, and commit message is shown in the table, along with a
button that allows a user to restore to a previous version of that
dashboard. If a user wants to restore to a previous version of their
dashboard, they can do so by clicking the previously mentioned button.
If a user wants to compare two different versions of a dashboard, they
can do so by clicking the checkbox of two different dashboard versions,
then clicking the "Compare versions" button located below the dashboard.
From there, the user is brought to a view showing a summary of the
dashboard differences. Each summarized change contains a link that can
be clicked to take the user a JSON diff highlighting the changes line by
line.
Overview of Changes
Backend Changes
- A `dashboard_version` table was created to store each dashboard
version, along with a dashboard version model and structs to represent
the queries and commands necessary for the dashboard version API
methods.
- API endpoints were created to support working with dashboard
versions.
- Methods were added to create, update, read, and destroy dashboard
versions in the database.
- Logic was added to compute the diff between two versions, and
display it to the user.
- The dashboard migration logic was updated to save a "Version
1" of each existing dashboard in the database.
Frontend Changes
- New views
- Methods to pull JSON and HTML from endpoints
New API Endpoints
Each endpoint requires the authorization header to be sent in
the format,
```
Authorization: Bearer <jwt>
```
where `<jwt>` is a JSON web token obtained from the Grafana
admin panel.
`GET "/api/dashboards/db/:dashboardId/versions?orderBy=<string>&limit=<int>&start=<int>"`
Get all dashboard versions for the given dashboard ID. Accepts
three URL parameters:
- `orderBy` String to order the results by. Possible values
are `version`, `created`, `created_by`, `message`. Default
is `versions`. Ordering is always in descending order.
- `limit` Maximum number of results to return
- `start` Position in results to start from
`GET "/api/dashboards/db/:dashboardId/versions/:id"`
Get an individual dashboard version by ID, for the given
dashboard ID.
`POST "/api/dashboards/db/:dashboardId/restore"`
Restore to the given dashboard version. Post body is of
content-type `application/json`, and must contain.
```json
{
"dashboardId": <int>,
"version": <int>
}
```
`GET "/api/dashboards/db/:dashboardId/compare/:versionA...:versionB"`
Compare two dashboard versions by ID for the given
dashboard ID, returning a JSON delta formatted
representation of the diff. The URL format follows
what GitHub does. For example, visiting
[/api/dashboards/db/18/compare/22...33](http://ec2-54-80-139-44.compute-1.amazonaws.com:3000/api/dashboards/db/18/compare/22...33)
will return the diff between versions 22 and 33 for
the dashboard ID 18.
Dependencies Added
- The Go package [gojsondiff](https://github.com/yudai/gojsondiff)
was added and vendored.
2017-05-24 19:14:39 -04:00
|
|
|
|
2017-12-19 16:22:41 +01:00
|
|
|
$diff-json-old: #a04338;
|
|
|
|
|
$diff-json-new: #457740;
|
History and Version Control for Dashboard Updates
A simple version control system for dashboards. Closes #1504.
Goals
1. To create a new dashboard version every time a dashboard is saved.
2. To allow users to view all versions of a given dashboard.
3. To allow users to rollback to a previous version of a dashboard.
4. To allow users to compare two versions of a dashboard.
Usage
Navigate to a dashboard, and click the settings cog. From there, click
the "Changelog" button to be brought to the Changelog view. In this
view, a table containing each version of a dashboard can be seen. Each
entry in the table represents a dashboard version. A selectable
checkbox, the version number, date created, name of the user who created
that version, and commit message is shown in the table, along with a
button that allows a user to restore to a previous version of that
dashboard. If a user wants to restore to a previous version of their
dashboard, they can do so by clicking the previously mentioned button.
If a user wants to compare two different versions of a dashboard, they
can do so by clicking the checkbox of two different dashboard versions,
then clicking the "Compare versions" button located below the dashboard.
From there, the user is brought to a view showing a summary of the
dashboard differences. Each summarized change contains a link that can
be clicked to take the user a JSON diff highlighting the changes line by
line.
Overview of Changes
Backend Changes
- A `dashboard_version` table was created to store each dashboard
version, along with a dashboard version model and structs to represent
the queries and commands necessary for the dashboard version API
methods.
- API endpoints were created to support working with dashboard
versions.
- Methods were added to create, update, read, and destroy dashboard
versions in the database.
- Logic was added to compute the diff between two versions, and
display it to the user.
- The dashboard migration logic was updated to save a "Version
1" of each existing dashboard in the database.
Frontend Changes
- New views
- Methods to pull JSON and HTML from endpoints
New API Endpoints
Each endpoint requires the authorization header to be sent in
the format,
```
Authorization: Bearer <jwt>
```
where `<jwt>` is a JSON web token obtained from the Grafana
admin panel.
`GET "/api/dashboards/db/:dashboardId/versions?orderBy=<string>&limit=<int>&start=<int>"`
Get all dashboard versions for the given dashboard ID. Accepts
three URL parameters:
- `orderBy` String to order the results by. Possible values
are `version`, `created`, `created_by`, `message`. Default
is `versions`. Ordering is always in descending order.
- `limit` Maximum number of results to return
- `start` Position in results to start from
`GET "/api/dashboards/db/:dashboardId/versions/:id"`
Get an individual dashboard version by ID, for the given
dashboard ID.
`POST "/api/dashboards/db/:dashboardId/restore"`
Restore to the given dashboard version. Post body is of
content-type `application/json`, and must contain.
```json
{
"dashboardId": <int>,
"version": <int>
}
```
`GET "/api/dashboards/db/:dashboardId/compare/:versionA...:versionB"`
Compare two dashboard versions by ID for the given
dashboard ID, returning a JSON delta formatted
representation of the diff. The URL format follows
what GitHub does. For example, visiting
[/api/dashboards/db/18/compare/22...33](http://ec2-54-80-139-44.compute-1.amazonaws.com:3000/api/dashboards/db/18/compare/22...33)
will return the diff between versions 22 and 33 for
the dashboard ID 18.
Dependencies Added
- The Go package [gojsondiff](https://github.com/yudai/gojsondiff)
was added and vendored.
2017-05-24 19:14:39 -04:00
|
|
|
|
2017-12-19 16:22:41 +01:00
|
|
|
$diff-json-changed-fg: $gray-5;
|
2017-06-07 12:39:06 +02:00
|
|
|
$diff-json-changed-num: $text-color;
|
History and Version Control for Dashboard Updates
A simple version control system for dashboards. Closes #1504.
Goals
1. To create a new dashboard version every time a dashboard is saved.
2. To allow users to view all versions of a given dashboard.
3. To allow users to rollback to a previous version of a dashboard.
4. To allow users to compare two versions of a dashboard.
Usage
Navigate to a dashboard, and click the settings cog. From there, click
the "Changelog" button to be brought to the Changelog view. In this
view, a table containing each version of a dashboard can be seen. Each
entry in the table represents a dashboard version. A selectable
checkbox, the version number, date created, name of the user who created
that version, and commit message is shown in the table, along with a
button that allows a user to restore to a previous version of that
dashboard. If a user wants to restore to a previous version of their
dashboard, they can do so by clicking the previously mentioned button.
If a user wants to compare two different versions of a dashboard, they
can do so by clicking the checkbox of two different dashboard versions,
then clicking the "Compare versions" button located below the dashboard.
From there, the user is brought to a view showing a summary of the
dashboard differences. Each summarized change contains a link that can
be clicked to take the user a JSON diff highlighting the changes line by
line.
Overview of Changes
Backend Changes
- A `dashboard_version` table was created to store each dashboard
version, along with a dashboard version model and structs to represent
the queries and commands necessary for the dashboard version API
methods.
- API endpoints were created to support working with dashboard
versions.
- Methods were added to create, update, read, and destroy dashboard
versions in the database.
- Logic was added to compute the diff between two versions, and
display it to the user.
- The dashboard migration logic was updated to save a "Version
1" of each existing dashboard in the database.
Frontend Changes
- New views
- Methods to pull JSON and HTML from endpoints
New API Endpoints
Each endpoint requires the authorization header to be sent in
the format,
```
Authorization: Bearer <jwt>
```
where `<jwt>` is a JSON web token obtained from the Grafana
admin panel.
`GET "/api/dashboards/db/:dashboardId/versions?orderBy=<string>&limit=<int>&start=<int>"`
Get all dashboard versions for the given dashboard ID. Accepts
three URL parameters:
- `orderBy` String to order the results by. Possible values
are `version`, `created`, `created_by`, `message`. Default
is `versions`. Ordering is always in descending order.
- `limit` Maximum number of results to return
- `start` Position in results to start from
`GET "/api/dashboards/db/:dashboardId/versions/:id"`
Get an individual dashboard version by ID, for the given
dashboard ID.
`POST "/api/dashboards/db/:dashboardId/restore"`
Restore to the given dashboard version. Post body is of
content-type `application/json`, and must contain.
```json
{
"dashboardId": <int>,
"version": <int>
}
```
`GET "/api/dashboards/db/:dashboardId/compare/:versionA...:versionB"`
Compare two dashboard versions by ID for the given
dashboard ID, returning a JSON delta formatted
representation of the diff. The URL format follows
what GitHub does. For example, visiting
[/api/dashboards/db/18/compare/22...33](http://ec2-54-80-139-44.compute-1.amazonaws.com:3000/api/dashboards/db/18/compare/22...33)
will return the diff between versions 22 and 33 for
the dashboard ID 18.
Dependencies Added
- The Go package [gojsondiff](https://github.com/yudai/gojsondiff)
was added and vendored.
2017-05-24 19:14:39 -04:00
|
|
|
|
2019-02-19 13:57:56 +01:00
|
|
|
$diff-json-icon: $gray-5;
|
2018-07-20 16:02:41 +02:00
|
|
|
|
2018-11-16 13:02:29 +01:00
|
|
|
//Switch Slider
|
|
|
|
|
// -------------------------
|
2018-11-16 12:45:19 -08:00
|
|
|
$switch-bg: $input-bg;
|
2019-02-19 13:57:56 +01:00
|
|
|
$switch-slider-color: $dark-3;
|
2018-11-16 13:02:29 +01:00
|
|
|
$switch-slider-off-bg: $gray-1;
|
2020-04-14 21:17:44 +02:00
|
|
|
$switch-slider-on-bg: #5794f2;
|
2018-11-16 13:02:29 +01:00
|
|
|
$switch-slider-shadow: 0 0 3px black;
|
2018-11-16 16:35:04 +01:00
|
|
|
|
|
|
|
|
//Checkbox
|
|
|
|
|
// -------------------------
|
|
|
|
|
$checkbox-bg: $dark-1;
|
2018-11-23 07:31:13 +01:00
|
|
|
$checkbox-border: 1px solid $gray-1;
|
2019-02-19 13:57:56 +01:00
|
|
|
$checkbox-checked-bg: linear-gradient(0deg, #eb7b18, #d44a3a);
|
2018-11-16 16:35:04 +01:00
|
|
|
$checkbox-color: $dark-1;
|
2018-11-28 15:51:45 +01:00
|
|
|
|
|
|
|
|
//Panel Edit
|
|
|
|
|
// -------------------------
|
|
|
|
|
$panel-editor-shadow: 0 0 20px black;
|
|
|
|
|
$panel-editor-side-menu-shadow: drop-shadow(0 0 10px $black);
|
2019-02-19 13:57:56 +01:00
|
|
|
$panel-editor-viz-item-shadow: 0 0 8px $dark-10;
|
|
|
|
|
$panel-editor-viz-item-border: 1px solid $dark-10;
|
2019-02-20 16:11:36 +01:00
|
|
|
$panel-editor-viz-item-shadow-hover: 0 0 4px $blue-light;
|
|
|
|
|
$panel-editor-viz-item-border-hover: 1px solid $blue-light;
|
2021-04-23 14:06:30 +02:00
|
|
|
$panel-editor-viz-item-bg: $input-bg;
|
2018-11-28 15:51:45 +01:00
|
|
|
$panel-editor-tabs-line-color: #e3e3e3;
|
2019-02-19 13:57:56 +01:00
|
|
|
|
2023-07-19 16:05:06 +01:00
|
|
|
$panel-editor-viz-item-bg-hover: color.adjust($blue-base, $lightness: -46%);
|
2018-11-30 05:14:23 -08:00
|
|
|
|
2023-07-19 16:05:06 +01:00
|
|
|
$panel-grid-placeholder-bg: color.adjust(#1f60c4, $lightness: -30%);
|
2020-04-14 11:32:14 +02:00
|
|
|
$panel-grid-placeholder-shadow: 0 0 4px #3274d9;
|
2018-12-07 14:59:38 +01:00
|
|
|
|
2018-12-06 11:55:01 -08:00
|
|
|
// logs
|
2020-06-22 13:03:34 -07:00
|
|
|
$logs-color-unknown: $gray-2;
|
2018-12-07 17:15:46 +01:00
|
|
|
|
|
|
|
|
// toggle-group
|
2019-02-19 13:57:56 +01:00
|
|
|
$button-toggle-group-btn-active-bg: linear-gradient(90deg, #eb7b18, #d44a3a);
|
2018-12-07 17:15:46 +01:00
|
|
|
$button-toggle-group-btn-active-shadow: inset 0 0 4px $black;
|
2020-06-05 04:53:57 -04:00
|
|
|
$button-toggle-group-btn-separator-border: 1px solid $dark-2;
|
2018-12-18 17:20:09 +01:00
|
|
|
|
2019-02-19 13:57:56 +01:00
|
|
|
$vertical-resize-handle-bg: $dark-10;
|
2018-12-18 17:20:09 +01:00
|
|
|
$vertical-resize-handle-dots: $gray-1;
|
|
|
|
|
$vertical-resize-handle-dots-hover: $gray-2;
|
2019-06-24 14:39:59 +02:00
|
|
|
|
|
|
|
|
// Calendar
|
|
|
|
|
$calendar-bg-days: $input-bg;
|
|
|
|
|
$calendar-bg-now: $dark-10;
|