Files
grafana/public/sass/_variables.dark.scss

325 lines
9.3 KiB
SCSS
Raw Normal View History

2016-02-15 15:27:41 +01:00
// Global values
// --------------------------------------------------
// Grays
// -------------------------
$black: #000;
2016-02-19 12:26:39 +01:00
// -------------------------
$black: #000;
2016-02-20 16:09:31 +01:00
$dark-1: #141414;
$dark-2: #1f1d1d;
2016-02-20 16:09:31 +01:00
$dark-3: #292929;
$dark-4: #333333;
2016-02-19 12:26:39 +01:00
$dark-5: #444444;
$gray-1: #555555;
$gray-2: #7B7B7B;
2016-02-19 12:26:39 +01:00
$gray-3: #b3b3b3;
$gray-4: #D8D9DA;
$gray-5: #ECECEC;
$gray-6: #f4f5f8;
2016-02-19 12:26:39 +01:00
$gray-7: #fbfbfb;
$white: #fff;
2016-02-15 15:27:41 +01:00
// Accent colors
// -------------------------
$blue: #33B5E5;
2016-02-16 08:30:37 +01:00
$blue-dark: #005f81;
$green: #609000;
2016-02-15 15:27:41 +01:00
$red: #CC3900;
$yellow: #ECBB13;
$pink: #FF4444;
$purple: #9933CC;
$variable: #32D1DF;
$orange: #eb7b18;
2016-02-15 15:27:41 +01:00
$brand-primary: $orange;
$brand-success: $green;
$brand-warning: $brand-primary;
$brand-danger: $red;
2016-02-15 15:27:41 +01:00
// Status colors
// -------------------------
$online: #10a345;
$warn: #F79520;
2016-02-15 15:27:41 +01:00
$critical: #ed2e18;
2016-02-16 09:42:46 +01:00
// Scaffolding
2016-02-15 15:27:41 +01:00
// -------------------------
$body-bg: rgb(20,20,20);
$page-bg: $dark-2;
$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 08:30:37 +01:00
2016-02-24 10:32:22 +01:00
// gradients
$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%);
$page-gradient: linear-gradient(60deg, transparent 70%, darken($page-bg, 4%) 98%);
2016-02-16 09:42:46 +01:00
// Links
// -------------------------
$link-color: darken($white, 11%);
$link-color-disabled: darken($link-color, 30%);
2016-02-16 10:42:06 +01:00
$link-hover-color: $white;
$external-link-color: $blue;
2016-02-15 15:27:41 +01:00
2016-02-16 09:42:46 +01:00
// Typography
// -------------------------
$headings-color: darken($white,11%);
$abbr-border-color: $gray-3 !default;
$text-muted: $text-color-weak;
2016-02-15 15:27:41 +01:00
2016-02-19 12:26:39 +01:00
$blockquote-small-color: $gray-3 !default;
$blockquote-border-color: $gray-4 !default;
2016-02-15 15:27:41 +01:00
2016-02-16 10:42:06 +01:00
$hr-border-color: rgba(0,0,0,.1) !default;
2016-02-16 09:42:46 +01:00
// Components
$component-active-color: #fff !default;
$component-active-bg: $brand-primary !default;
2016-02-16 09:42:46 +01:00
// Panel
// -------------------------
$panel-bg: $dark-2;
$panel-border: solid 1px $dark-3;
$panel-drop-zone-bg: repeating-linear-gradient(-128deg, #111, #111 10px, #191919 10px, #222 20px);
$panel-menu-border: solid 1px black;
2016-02-16 09:42:46 +01:00
$divider-border-color: #555;
2016-02-16 09:42:46 +01:00
// Graphite Target Editor
$tight-form-border: #050505;
2016-02-19 12:26:39 +01:00
$tight-form-bg: $dark-3;
2016-02-19 12:26:39 +01:00
$tight-form-func-bg: #333;
$tight-form-func-highlight-bg: #444;
2016-02-16 09:42:46 +01:00
$modal-background: $black;
$code-tag-bg: $gray-1;
2016-04-14 11:38:07 -04:00
$code-tag-border: lighten($code-tag-bg, 2%);
2016-02-16 09:42:46 +01:00
2016-02-15 15:27:41 +01:00
// Lists
2016-02-20 11:05:06 +01:00
$grafanaListBackground: $dark-3;
$grafanaListAccent: lighten($dark-2, 2%);
2016-02-19 12:26:39 +01:00
$grafanaListBorderTop: $dark-3;
2016-02-15 15:27:41 +01:00
$grafanaListBorderBottom: $black;
$grafanaListHighlight: #333;
$grafanaListMainLinkColor: $text-color;
2016-02-15 15:27:41 +01:00
// Scrollbars
$scrollbarBackground: #3a3a3a;
$scrollbarBackground2: #3a3a3a;
$scrollbarBorder: black;
// Tables
// -------------------------
2016-02-16 10:42:06 +01:00
$table-bg: transparent; // overall background-color
$table-bg-accent: $dark-3; // for striping
$table-bg-hover: $dark-4; // for hover
2016-02-19 12:26:39 +01:00
$table-border: $dark-3; // table and cell border
2016-02-15 15:27:41 +01:00
// Buttons
// -------------------------
$btn-primary-bg: $brand-primary;
$btn-primary-bg-hl: lighten($brand-primary, 8%);
2016-02-15 15:27:41 +01:00
2016-02-20 11:05:06 +01:00
$btn-secondary-bg: $blue-dark;
2016-03-21 13:37:56 +01:00
$btn-secondary-bg-hl: lighten($blue-dark, 5%);
2016-02-15 15:27:41 +01:00
2016-02-19 14:21:57 +01:00
$btn-success-bg: lighten($green, 3%);
$btn-success-bg-hl: darken($green, 3%);
2016-02-15 15:27:41 +01:00
2016-02-19 14:21:57 +01:00
$btn-warning-bg: $brand-warning;
2016-02-20 11:05:06 +01:00
$btn-warning-bg-hl: lighten($brand-warning, 8%);
2016-02-15 15:27:41 +01:00
$btn-danger-bg: $red;
$btn-danger-bg-hl: lighten($red, 5%);
2016-02-15 15:27:41 +01:00
2016-02-19 14:21:57 +01:00
$btn-inverse-bg: $dark-3;
$btn-inverse-bg-hl: lighten($dark-3, 4%);
2016-02-19 14:21:57 +01:00
$btn-inverse-text-color: $link-color;
2016-02-15 15:27:41 +01:00
2016-02-19 14:21:57 +01:00
$btn-link-color: $gray-3;
2016-02-15 15:27:41 +01:00
$iconContainerBackground: $black;
2016-02-15 15:27:41 +01:00
$btn-divider-left: $dark-4;
$btn-divider-right: $dark-2;
$btn-drag-image: '../img/grab_dark.svg';
2016-02-15 15:27:41 +01:00
// Forms
// -------------------------
2016-02-20 16:09:31 +01:00
$input-bg: $dark-4;
$input-bg-disabled: $dark-3;
2016-02-19 12:26:39 +01:00
$input-color: $gray-4;
2016-02-20 16:09:31 +01:00
$input-border-color: $dark-4;
$input-box-shadow: inset 1px 0px 0.3rem 0px rgba(150, 150, 150, 0.10);
$input-border-focus: $input-border-color !default;
$input-box-shadow-focus: rgba(102,175,233,.6) !default;
2016-02-20 16:09:31 +01:00
$input-color-placeholder: $gray-1 !default;
$input-label-bg: $dark-3;
$input-invalid-border-color: lighten($red, 5%);
2016-02-15 15:27:41 +01:00
// Search
2016-02-20 16:16:29 +01:00
$search-shadow: 0 0 35px 0 $body-bg;
2016-02-15 15:27:41 +01:00
// Dropdowns
// -------------------------
2016-02-19 12:26:39 +01:00
$dropdownBackground: $dark-3;
2016-02-15 15:27:41 +01:00
$dropdownBorder: rgba(0,0,0,.2);
$dropdownDividerTop: transparent;
$dropdownDividerBottom: #444;
$dropdownDivider: $dropdownDividerBottom;
2016-02-16 09:42:46 +01:00
$dropdownTitle: $link-color-disabled;
2016-02-15 15:27:41 +01:00
2016-02-16 09:42:46 +01:00
$dropdownLinkColor: $text-color;
2016-02-15 15:27:41 +01:00
$dropdownLinkColorHover: $white;
$dropdownLinkColorActive: $white;
$dropdownLinkBackgroundActive: $dark-4;
$dropdownLinkBackgroundHover: $dark-4;
2016-02-15 15:27:41 +01:00
// COMPONENT VARIABLES
// --------------------------------------------------
// -------------------------
2016-02-16 09:42:46 +01:00
$placeholderText: darken($text-color, 25%);
2016-02-15 15:27:41 +01:00
// Horizontal forms & lists
// -------------------------
$horizontalComponentOffset: 180px;
// Wells
// -------------------------
$wellBackground: #131517;
$navbarHeight: 52px;
2016-02-19 12:26:39 +01:00
$navbarBackgroundHighlight: $dark-3;
$navbarBackground: $dark-3;
2016-02-16 09:42:46 +01:00
$navbarBorder: 1px solid $body-bg;
2016-02-15 15:27:41 +01:00
2016-02-19 12:26:39 +01:00
$navbarText: $gray-4;
$navbarLinkColor: $gray-4;
2016-02-15 15:27:41 +01:00
$navbarLinkColorHover: $white;
$navbarLinkColorActive: $navbarLinkColorHover;
$navbarLinkBackgroundHover: transparent;
$navbarLinkBackgroundActive: $navbarBackground;
2016-02-16 09:42:46 +01:00
$navbarBrandColor: $link-color;
$navbarDropdownShadow: inset 0px 4px 10px -4px $body-bg;
2016-02-15 15:27:41 +01:00
$navbarButtonBackground: lighten($navbarBackground, 3%);
$navbarButtonBackgroundHighlight: lighten($navbarBackground, 5%);
2016-02-15 16:02:58 +01:00
// Sidemenu
// -------------------------
$side-menu-bg: $body-bg;
$side-menu-item-hover-bg: $dark-3;
$side-menu-opacity: 0.97;
2016-02-15 16:02:58 +01:00
2016-02-15 15:27:41 +01:00
// Pagination
// -------------------------
2016-02-16 09:42:46 +01:00
$paginationBackground: $body-bg;
2016-02-15 15:27:41 +01:00
$paginationBorder: transparent;
$paginationActiveBackground: $blue;
// Form states and alerts
// -------------------------
$warning-text-color: $warn;
$error-text-color: #E84D4D;
$success-text-color: #12D95A;
$info-text-color: $blue-dark;
2016-02-15 15:27:41 +01: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 15:27:41 +01:00
2016-02-22 11:41:50 +01:00
// popover
2017-04-13 20:28:13 +02:00
$popover-bg: $panel-bg;
$popover-color: $text-color;
2017-04-14 13:08:03 +02:00
$popover-border-color: $gray-1;
2016-02-22 11:41:50 +01:00
$popover-help-bg: $btn-secondary-bg;
$popover-help-color: $text-color;
$popover-error-bg: $btn-danger-bg;
// Tooltips and popovers
// -------------------------
2016-04-12 13:00:33 -04:00
$tooltipColor: $popover-help-color;
$tooltipBackground: $popover-help-bg;
$tooltipArrowWidth: 5px;
$tooltipArrowColor: $tooltipBackground;
$tooltipLinkColor: $link-color;
$graph-tooltip-bg: $dark-1;
2016-02-15 15:27:41 +01:00
// images
$checkboxImageUrl: '../img/checkbox.png';
// cards
$card-background: linear-gradient(135deg, #2f2f2f, #262626);
$card-background-hover: linear-gradient(135deg, #343434, #262626);
$card-shadow: -1px -1px 0 0 hsla(0, 0%, 100%, .1), 1px 1px 0 0 rgba(0, 0, 0, .3);
2017-07-31 14:39:33 +02:00
// info box
$info-box-background: linear-gradient(100deg, #1a4552, #00374a);
2017-07-31 14:39:33 +02:00
// footer
$footer-link-color: $gray-1;
$footer-link-hover: $gray-4;
2017-05-20 18:21:41 +02:00
// collapse box
$collapse-box-body-border: $dark-5;
$collapse-box-body-error-border: $red;
// json-explorer
$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-05-20 18:21:41 +02:00
$json-explorer-null-color: #EEC97D;
$json-explorer-undefined-color: rgb(239, 143, 190);
$json-explorer-function-color: #FD48CB;
$json-explorer-rotate-time: 100ms;
$json-explorer-toggler-opacity: 0.6;
$json-explorer-toggler-color: #45376F;
$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
// -------------------------
$diff-label-bg: $dark-2;
$diff-label-fg: $white;
$diff-group-bg: $dark-4;
$diff-arrow-color: $white;
$diff-json-bg: $dark-4;
$diff-json-fg: $gray-5;
$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 19:14:39 -04: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
$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 19:14:39 -04:00
$diff-json-icon: $gray-7;