grafana/public/sass/_variables.dark.scss

412 lines
9.8 KiB
SCSS
Raw Normal View History

2016-02-15 08:27:41 -06:00
// Global values
// --------------------------------------------------
$theme-name: dark;
2016-02-15 08:27:41 -06:00
// Grays
// -------------------------
2017-12-19 09:22:41 -06:00
$black: #000;
2016-02-19 05:26:39 -06:00
// -------------------------
2017-12-19 09:22:41 -06:00
$black: #000;
$dark-1: #141414;
$dark-2: #1f1f20;
$dark-3: #262628;
$dark-4: #333333;
$dark-5: #444444;
$gray-1: #555555;
$gray-2: #8e8e8e;
$gray-3: #b3b3b3;
$gray-4: #d8d9da;
$gray-5: #ececec;
$gray-6: #f4f5f8;
$gray-7: #fbfbfb;
$gray-blue: #212327;
$input-black: #09090b;
$white: #fff;
2016-02-15 08:27:41 -06:00
// Accent colors
// -------------------------
2017-12-19 09:22:41 -06:00
$blue: #33b5e5;
$blue-dark: #005f81;
$green: #299c46;
$red: #d44a3a;
$yellow: #ecbb13;
$pink: #ff4444;
$purple: #9933cc;
$variable: #32d1df;
$orange: #eb7b18;
$brand-primary: $orange;
$brand-success: $green;
$brand-warning: $brand-primary;
$brand-danger: $red;
$query-red: #e24d42;
$query-green: #74e680;
$query-purple: #fe85fc;
$query-keyword: #66d9ef;
2018-05-25 05:51:27 -05:00
$query-orange: $orange;
2016-02-15 08:27:41 -06:00
// Status colors
// -------------------------
2017-12-19 09:22:41 -06:00
$online: #10a345;
$warn: #f79520;
$critical: #ed2e18;
2016-02-15 08:27:41 -06:00
2016-02-16 02:42:46 -06:00
// Scaffolding
2016-02-15 08:27:41 -06:00
// -------------------------
2017-12-19 09:22:41 -06:00
$body-bg: rgb(23, 24, 25);
$page-bg: rgb(22, 23, 25);
2017-11-30 08:37:03 -06:00
2017-12-19 09:22:41 -06:00
$body-color: $gray-4;
$text-color: $gray-4;
$text-color-strong: $white;
$text-color-weak: $gray-2;
$text-color-faint: $dark-5;
$text-color-emphasis: $gray-5;
$text-shadow-strong: 1px 1px 4px $black;
$text-shadow-faint: 1px 1px 4px rgb(45, 45, 45);
2016-02-16 01:30:37 -06:00
2016-02-24 03:32:22 -06:00
// gradients
2017-12-19 09:22:41 -06:00
$brand-gradient: linear-gradient(
to right,
rgba(255, 213, 0, 0.7) 0%,
rgba(255, 68, 0, 0.7) 99%,
rgba(255, 68, 0, 0.7) 100%
);
2018-11-06 01:01:00 -06:00
2017-11-29 06:21:42 -06:00
$page-gradient: linear-gradient(180deg, #222426 10px, rgb(22, 23, 25) 100px);
$edit-gradient: linear-gradient(180deg, rgb(22, 23, 25) 50%, #090909);
2016-02-24 03:32:22 -06:00
2016-02-16 02:42:46 -06:00
// Links
// -------------------------
2017-12-19 09:22:41 -06:00
$link-color: darken($white, 11%);
$link-color-disabled: darken($link-color, 30%);
$link-hover-color: $white;
$external-link-color: $blue;
2016-02-15 08:27:41 -06:00
2016-02-16 02:42:46 -06:00
// Typography
// -------------------------
2017-12-19 09:22:41 -06:00
$headings-color: darken($white, 11%);
$abbr-border-color: $gray-3 !default;
$text-muted: $text-color-weak;
2016-02-15 08:27:41 -06:00
$hr-border-color: $dark-4;
2016-02-16 02:42:46 -06:00
// Panel
// -------------------------
2017-12-19 09:22:41 -06:00
$panel-bg: #212124;
$panel-border-color: $dark-1;
$panel-border: solid 1px $panel-border-color;
$panel-header-hover-bg: $dark-4;
$panel-corner: $panel-bg;
2016-02-16 02:42:46 -06:00
2017-12-03 01:11:07 -06:00
// page header
$page-header-bg: linear-gradient(90deg, #292a2d, black);
$page-header-shadow: inset 0px -4px 14px $dark-2;
$page-header-border-color: $dark-4;
2017-12-19 09:22:41 -06:00
$divider-border-color: #555;
2016-02-16 02:42:46 -06:00
// Graphite Target Editor
2017-12-19 09:22:41 -06:00
$tight-form-bg: $dark-3;
$tight-form-func-bg: #333334;
$tight-form-func-highlight-bg: #444445;
2016-02-16 02:42:46 -06:00
2017-12-19 09:22:41 -06:00
$modal-backdrop-bg: #353c42;
$code-tag-bg: $dark-1;
$code-tag-border: $dark-4;
2016-04-14 10:38:07 -05:00
// cards
$card-background: linear-gradient(135deg, #2f2f32, #262628);
$card-background-hover: linear-gradient(135deg, #343436, #262628);
$card-shadow: -1px -1px 0 0 hsla(0, 0%, 100%, 0.1), 1px 1px 0 0 rgba(0, 0, 0, 0.3);
2016-02-16 02:42:46 -06:00
2016-02-15 08:27:41 -06:00
// Lists
2017-12-19 09:22:41 -06:00
$list-item-bg: $card-background;
$list-item-hover-bg: lighten($gray-blue, 2%);
$list-item-link-color: $text-color;
2017-12-19 09:22:41 -06:00
$list-item-shadow: $card-shadow;
2018-11-06 01:01:00 -06:00
$empty-list-cta-bg: $gray-blue;
2016-02-15 08:27:41 -06:00
// Scrollbars
2017-12-01 08:56:08 -06:00
$scrollbarBackground: #404357;
2016-02-15 08:27:41 -06:00
$scrollbarBackground2: #3a3a3a;
2017-12-01 08:56:08 -06:00
2016-02-15 08:27:41 -06:00
$scrollbarBorder: black;
// Tables
// -------------------------
2017-12-19 09:22:41 -06:00
$table-bg: transparent; // overall background-color
$table-bg-accent: $dark-3; // for striping
$table-bg-hover: $dark-4; // for hover
$table-border: $dark-3; // table and cell border
2016-02-15 08:27:41 -06:00
2017-12-19 09:22:41 -06:00
$table-bg-odd: $dark-2;
$table-bg-hover: $dark-3;
2016-02-15 08:27:41 -06:00
// Buttons
// -------------------------
2017-12-19 09:22:41 -06:00
$btn-primary-bg: #ff6600;
$btn-primary-bg-hl: #bc3e06;
2016-02-15 08:27:41 -06:00
2017-12-19 09:22:41 -06:00
$btn-secondary-bg-hl: lighten($blue-dark, 5%);
2018-11-06 01:01:00 -06:00
$btn-secondary-bg: $blue-dark;
2016-02-15 08:27:41 -06:00
2017-12-19 09:22:41 -06:00
$btn-success-bg: $green;
$btn-success-bg-hl: darken($green, 6%);
2016-02-15 08:27:41 -06:00
2017-12-19 09:22:41 -06:00
$btn-warning-bg: $brand-warning;
$btn-warning-bg-hl: lighten($brand-warning, 8%);
2016-02-15 08:27:41 -06:00
2017-12-19 09:22:41 -06:00
$btn-danger-bg: $red;
$btn-danger-bg-hl: darken($red, 8%);
2016-02-15 08:27:41 -06:00
2017-12-19 09:22:41 -06:00
$btn-inverse-bg: $dark-3;
$btn-inverse-bg-hl: lighten($dark-3, 4%);
$btn-inverse-text-color: $link-color;
$btn-inverse-text-shadow: 0px 1px 0 rgba(0, 0, 0, 0.1);
2016-02-15 08:27:41 -06:00
2018-05-25 05:51:27 -05:00
$btn-active-bg: $gray-4;
$btn-active-text-color: $blue-dark;
2017-12-19 09:22:41 -06:00
$btn-link-color: $gray-3;
2016-02-15 08:27:41 -06:00
2017-12-19 09:22:41 -06:00
$iconContainerBackground: $black;
2016-02-15 08:27:41 -06:00
2017-12-19 09:22:41 -06:00
$btn-divider-left: $dark-4;
$btn-divider-right: $dark-2;
$btn-drag-image: '../img/grab_dark.svg';
2016-02-15 08:27:41 -06:00
// Forms
// -------------------------
2017-12-19 09:22:41 -06:00
$input-bg: $input-black;
$input-bg-disabled: $dark-3;
$input-color: $gray-4;
$input-border-color: $dark-3;
$input-box-shadow: inset 1px 0px 0.3rem 0px rgba(150, 150, 150, 0.1);
$input-border-focus: $input-border-color;
$input-box-shadow-focus: rgba(102, 175, 233, 0.6);
$input-color-placeholder: $gray-1 !default;
$input-label-bg: $gray-blue;
$input-label-border-color: $dark-3;
$input-color-select-arrow: $white;
2016-02-15 08:27:41 -06:00
// Search
2017-12-08 11:15:24 -06:00
$search-shadow: 0 0 30px 0 $black;
2017-11-29 10:13:50 -06:00
$search-filter-box-bg: $gray-blue;
2016-02-15 08:27:41 -06:00
2018-05-25 05:51:27 -05:00
// Typeahead
$typeahead-shadow: 0 5px 10px 0 $black;
$typeahead-selected-bg: $dark-4;
$typeahead-selected-color: $yellow;
2018-05-25 05:51:27 -05:00
2016-02-15 08:27:41 -06:00
// Dropdowns
// -------------------------
2017-12-19 09:22:41 -06:00
$dropdownBackground: $dark-3;
$dropdownBorder: rgba(0, 0, 0, 0.2);
$dropdownDividerTop: transparent;
$dropdownDividerBottom: #444;
$dropdownDivider: $dropdownDividerBottom;
2016-02-15 08:27:41 -06:00
2017-12-19 09:22:41 -06:00
$dropdownLinkColor: $text-color;
$dropdownLinkColorHover: $white;
$dropdownLinkColorActive: $white;
2016-02-15 08:27:41 -06:00
2017-12-19 09:22:41 -06:00
$dropdownLinkBackgroundActive: $dark-4;
$dropdownLinkBackgroundHover: $dark-4;
2016-02-15 08:27:41 -06:00
// COMPONENT VARIABLES
// --------------------------------------------------
// -------------------------
2017-12-19 09:22:41 -06:00
$placeholderText: darken($text-color, 25%);
2016-02-15 08:27:41 -06:00
// Horizontal forms & lists
// -------------------------
2017-12-19 09:22:41 -06:00
$horizontalComponentOffset: 180px;
2016-02-15 08:27:41 -06:00
// Wells
// -------------------------
2017-12-19 09:22:41 -06:00
$navbarHeight: 55px;
2018-12-07 07:59:38 -06:00
2017-12-19 09:22:41 -06:00
$navbarBackground: $panel-bg;
$navbarBorder: 1px solid $dark-3;
$navbarShadow: 0 0 20px black;
$navbarLinkColor: $gray-4;
$navbarButtonBackground: $navbarBackground;
2017-06-12 14:11:22 -05:00
$navbarButtonBackgroundHighlight: $body-bg;
2016-02-15 08:27:41 -06:00
$navbar-button-border: #2f2f32;
2016-02-15 09:02:58 -06:00
// Sidemenu
// -------------------------
2017-12-19 09:22:41 -06:00
$side-menu-bg: $black;
$side-menu-bg-mobile: $side-menu-bg;
2017-06-08 15:17:43 -05:00
$side-menu-item-hover-bg: $dark-2;
2017-12-19 09:22:41 -06:00
$side-menu-shadow: 0 0 20px black;
$side-menu-link-color: $link-color;
2016-02-15 09:02:58 -06:00
2017-06-12 09:46:02 -05:00
// Menu dropdowns
// -------------------------
2017-12-19 09:22:41 -06:00
$menu-dropdown-bg: $body-bg;
$menu-dropdown-hover-bg: $dark-2;
2017-06-12 14:11:22 -05:00
$menu-dropdown-shadow: 5px 5px 20px -5px $black;
2017-06-12 09:46:02 -05:00
// Breadcrumb
// -------------------------
// Tabs
// -------------------------
2017-12-19 09:22:41 -06:00
$tab-border-color: $dark-4;
2016-02-15 09:02:58 -06:00
2018-11-11 10:46:40 -06:00
// Toolbar
2018-12-13 00:44:58 -06:00
$toolbar-bg: $input-black;
2018-11-11 10:46:40 -06:00
2016-02-15 08:27:41 -06:00
// Pagination
// -------------------------
// Form states and alerts
// -------------------------
2017-12-19 09:22:41 -06:00
$warning-text-color: $warn;
$error-text-color: #e84d4d;
$success-text-color: #12d95a;
$info-text-color: $blue-dark;
2016-02-15 08:27:41 -06:00
2017-12-19 09:22:41 -06:00
$alert-error-bg: linear-gradient(90deg, #d44939, #e0603d);
$alert-success-bg: linear-gradient(90deg, #3aa655, #47b274);
$alert-warning-bg: linear-gradient(90deg, #d44939, #e0603d);
$alert-info-bg: linear-gradient(100deg, #1a4552, #00374a);
2016-02-15 08:27:41 -06:00
2016-02-22 04:41:50 -06:00
// popover
2017-12-19 09:22:41 -06:00
$popover-bg: $page-bg;
$popover-color: $text-color;
$popover-border-color: $dark-4;
$popover-shadow: 0 0 20px black;
2017-12-19 09:22:41 -06:00
$popover-help-bg: $btn-secondary-bg;
$popover-help-color: $text-color;
2016-02-22 04:41:50 -06:00
2017-12-19 09:22:41 -06:00
$popover-error-bg: $btn-danger-bg;
// Tooltips and popovers
// -------------------------
2017-12-19 09:22:41 -06:00
$tooltipColor: $popover-help-color;
$tooltipArrowWidth: 5px;
$tooltipLinkColor: $link-color;
$graph-tooltip-bg: $dark-1;
2019-01-29 06:42:29 -06:00
$tooltipBackground: $black;
$tooltipColor: $gray-4;
2019-01-07 06:05:27 -06:00
$tooltipArrowColor: $tooltipBackground;
$tooltipBackgroundError: $brand-danger;
$tooltipBackgroundBrand: $brand-primary;
2019-01-07 06:05:27 -06:00
2016-02-15 08:27:41 -06:00
// images
$checkboxImageUrl: '../img/checkbox.png';
2017-07-31 07:39:33 -05:00
// info box
$info-box-border-color: darken($blue, 12%);
2017-07-31 07:39:33 -05:00
// footer
2017-12-19 09:22:41 -06:00
$footer-link-color: $gray-2;
$footer-link-hover: $gray-4;
2017-05-20 11:21:41 -05:00
// json-explorer
$json-explorer-default-color: $text-color;
2017-05-20 15:55:36 -05:00
$json-explorer-string-color: #23d662;
$json-explorer-number-color: $variable;
$json-explorer-boolean-color: $variable;
2017-12-19 09:22:41 -06:00
$json-explorer-null-color: #eec97d;
2017-05-20 11:21:41 -05:00
$json-explorer-undefined-color: rgb(239, 143, 190);
2017-12-19 09:22:41 -06:00
$json-explorer-function-color: #fd48cb;
2017-05-20 11:21:41 -05:00
$json-explorer-rotate-time: 100ms;
$json-explorer-toggler-opacity: 0.6;
2017-12-19 09:22:41 -06: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 18:14:39 -05:00
// Changelog and diff
// -------------------------
2017-12-19 09:22:41 -06:00
$diff-label-bg: $dark-2;
$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 18:14:39 -05:00
2017-12-19 09:22:41 -06:00
$diff-group-bg: $dark-4;
$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 18:14:39 -05:00
2017-12-19 09:22:41 -06:00
$diff-json-bg: $dark-4;
$diff-json-fg: $gray-5;
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 18:14:39 -05:00
2017-12-19 09:22:41 -06:00
$diff-json-added: #457740;
$diff-json-deleted: #a04338;
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 18:14:39 -05:00
2017-12-19 09:22:41 -06: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 18:14:39 -05:00
2017-12-19 09:22:41 -06:00
$diff-json-changed-fg: $gray-5;
$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 18:14:39 -05:00
2017-12-19 09:22:41 -06:00
$diff-json-icon: $gray-7;
//Submenu
$variable-option-bg: $blue-dark;
//Switch Slider
// -------------------------
2018-11-16 14:45:19 -06:00
$switch-bg: $input-bg;
$switch-slider-color: $dark-2;
$switch-slider-off-bg: $gray-1;
$switch-slider-on-bg: linear-gradient(90deg, $orange, $red);
$switch-slider-shadow: 0 0 3px black;
//Checkbox
// -------------------------
$checkbox-bg: $dark-1;
2018-11-23 00:31:13 -06:00
$checkbox-border: 1px solid $gray-1;
$checkbox-checked-bg: linear-gradient(0deg, $orange, $red);
$checkbox-color: $dark-1;
//Panel Edit
// -------------------------
$panel-editor-shadow: 0 0 20px black;
2018-12-12 06:59:19 -06:00
$panel-editor-border: 1px solid $dark-3;
$panel-editor-side-menu-shadow: drop-shadow(0 0 10px $black);
2018-12-13 00:44:58 -06:00
$panel-editor-toolbar-view-bg: $input-black;
$panel-editor-viz-item-shadow: 0 0 8px $dark-5;
$panel-editor-viz-item-border: 1px solid $dark-5;
$panel-editor-viz-item-shadow-hover: 0 0 4px $blue;
$panel-editor-viz-item-border-hover: 1px solid $blue;
2018-12-13 00:44:58 -06:00
$panel-editor-viz-item-bg: $input-black;
$panel-editor-tabs-line-color: #e3e3e3;
$panel-editor-viz-item-bg-hover: darken($blue, 47%);
$panel-editor-viz-item-bg-hover-active: darken($orange, 45%);
2019-01-13 05:42:21 -06:00
$panel-options-group-border: 1px solid $dark-3;
$panel-options-group-header-bg: linear-gradient(0deg, $gray-blue, $dark-1);
2018-12-13 09:02:14 -06:00
$panel-grid-placeholder-bg: darken($blue, 47%);
$panel-grid-placeholder-shadow: 0 0 4px $blue;
2018-12-07 07:59:38 -06:00
// logs
$logs-color-unkown: $gray-2;
// toggle-group
$button-toggle-group-btn-active-bg: linear-gradient(90deg, $orange, $red);
$button-toggle-group-btn-active-shadow: inset 0 0 4px $black;
$button-toggle-group-btn-seperator-border: 1px solid $page-bg;
$vertical-resize-handle-bg: $dark-5;
$vertical-resize-handle-dots: $gray-1;
$vertical-resize-handle-dots-hover: $gray-2;