@@ -32,7 +34,7 @@ export function DataSourceCategories({ categories, onClickDataSourceType }: Prop
))}
{/* Find more */}
-
+
Find more data source plugins
@@ -40,3 +42,17 @@ export function DataSourceCategories({ categories, onClickDataSourceType }: Prop
>
);
}
+
+const getStyles = (theme: GrafanaTheme2) => ({
+ category: css({
+ marginBottom: theme.spacing(2),
+ }),
+ header: css({
+ fontSize: theme.typography.h5.fontSize,
+ marginBottom: theme.spacing(1),
+ }),
+ more: css({
+ margin: theme.spacing(4),
+ textAlign: 'center',
+ }),
+});
diff --git a/public/sass/_angular.scss b/public/sass/_angular.scss
index 7745ac688b3..69fe9fdf8db 100644
--- a/public/sass/_angular.scss
+++ b/public/sass/_angular.scss
@@ -1864,3 +1864,74 @@ $easing: cubic-bezier(0, 0, 0.265, 1);
background: transparent;
display: block;
}
+
+.add-data-source-item {
+ padding: $space-md;
+ display: flex;
+ align-items: center;
+ cursor: pointer;
+ background: $card-background;
+ border-radius: 3px;
+ margin-bottom: $space-xxs;
+
+ &:hover {
+ background: $card-background-hover;
+
+ .add-data-source-item-actions {
+ opacity: 1;
+ transition: 0.15s opacity ease-in-out;
+ }
+ }
+}
+
+.add-data-source-item-text-wrapper {
+ display: flex;
+ flex-direction: column;
+ flex-grow: 1;
+}
+
+.add-data-source-item-logo {
+ margin-right: $space-lg;
+ margin-left: $space-sm;
+ width: 55px;
+ max-height: 55px;
+}
+
+.add-data-source-item-desc {
+ font-size: $font-size-sm;
+ color: $text-color-weak;
+}
+
+.add-data-source-item-actions {
+ opacity: 0;
+ padding-left: $space-md;
+ display: flex;
+ align-items: center;
+
+ > button {
+ margin-left: $space-md;
+ cursor: pointer;
+ }
+}
+
+.add-data-source-item-badge {
+ margin-top: 6px;
+}
+
+.add-data-source-item-text {
+ font-size: $font-size-h5;
+}
+
+.panel-empty {
+ display: flex;
+ align-items: center;
+ height: 100%;
+ width: 100%;
+
+ p {
+ text-align: center;
+ color: $text-muted;
+ font-size: $font-size-lg;
+ width: 100%;
+ }
+}
diff --git a/public/sass/_grafana.scss b/public/sass/_grafana.scss
index fa9ec6aec8b..b24b2d4648e 100644
--- a/public/sass/_grafana.scss
+++ b/public/sass/_grafana.scss
@@ -24,15 +24,12 @@
@import 'components/tags';
@import 'components/gf-form';
@import 'components/filter-table';
-@import 'components/slate_editor';
@import 'components/modals';
@import 'components/dropdown';
@import 'components/infobox';
@import 'components/query_editor';
@import 'components/query_part';
@import 'components/dashboard_grid';
-@import 'components/add_data_source';
-@import 'components/panel_header';
// PAGES
@import 'pages/dashboard';
diff --git a/public/sass/components/_add_data_source.scss b/public/sass/components/_add_data_source.scss
deleted file mode 100644
index c641948c285..00000000000
--- a/public/sass/components/_add_data_source.scss
+++ /dev/null
@@ -1,86 +0,0 @@
-.add-data-source-header {
- margin-bottom: $space-xl;
- padding-top: $spacer;
- text-align: center;
-}
-
-.add-data-source-search {
- display: flex;
- justify-content: center;
- margin-bottom: $space-lg;
-}
-
-.add-data-source-category {
- margin-bottom: $space-md;
-}
-
-.add-data-source-category__header {
- font-size: $font-size-h5;
- margin-bottom: $space-sm;
-}
-
-.add-data-source-item {
- padding: $space-md;
- display: flex;
- align-items: center;
- cursor: pointer;
- background: $card-background;
- border-radius: 3px;
- margin-bottom: $space-xxs;
-
- &:hover {
- background: $card-background-hover;
-
- .add-data-source-item-actions {
- opacity: 1;
- transition: 0.15s opacity ease-in-out;
- }
- }
-}
-
-.add-data-source-item-text-wrapper {
- display: flex;
- flex-direction: column;
- flex-grow: 1;
-}
-
-.add-data-source-item-desc {
- font-size: $font-size-sm;
- color: $text-color-weak;
-}
-
-.add-data-source-item-badge {
- margin-top: 6px;
-}
-
-.add-data-source-item-text {
- font-size: $font-size-h5;
-}
-
-.add-data-source-item-logo {
- margin-right: $space-lg;
- margin-left: $space-sm;
- width: 55px;
- max-height: 55px;
-}
-
-.add-data-source-item-actions {
- opacity: 0;
- padding-left: $space-md;
- display: flex;
- align-items: center;
-
- > button {
- margin-left: $space-md;
- cursor: pointer;
- }
-}
-
-.add-datasource-item-actions__btn-icon {
- margin-left: $space-sm;
-}
-
-.add-data-source-more {
- text-align: center;
- margin: $space-xl;
-}
diff --git a/public/sass/components/_panel_header.scss b/public/sass/components/_panel_header.scss
deleted file mode 100644
index 15db9a5d91f..00000000000
--- a/public/sass/components/_panel_header.scss
+++ /dev/null
@@ -1,122 +0,0 @@
-.panel-header {
- &:hover {
- transition: background-color 0.1s ease-in-out;
- background-color: $panel-header-hover-bg;
- }
-}
-
-.panel-container--no-title {
- .panel-header {
- position: absolute;
- left: min(50px, 10%); // allows space for interaction in the corders
- right: min(50px, 10%);
- z-index: $panel-header-z-index;
-
- &:hover {
- left: 0;
- right: 0;
- }
- }
- .panel-content {
- height: 100%;
- }
-}
-
-.panel-title-container {
- cursor: move;
- word-wrap: break-word;
- display: block;
-}
-
-.panel-title {
- border: 0px;
- font-weight: $font-weight-semi-bold;
- position: relative;
- width: 100%;
- display: flex;
- flex-wrap: nowrap;
- justify-content: center;
- height: $panel-header-height;
- line-height: $panel-header-height;
- align-items: center;
-}
-
-.panel-menu-container {
- width: 0px;
- height: 19px;
- display: inline-block;
-}
-
-.panel-menu-toggle {
- position: absolute;
- top: calc(50% - 9px);
- color: $text-color-weak;
- cursor: pointer;
- margin: 2px 0 0 2px;
- visibility: hidden;
- opacity: 0;
-
- &:hover {
- color: $link-hover-color;
- }
-}
-
-.panel-loading {
- position: absolute;
- top: 0px;
- right: 4px;
- z-index: $panel-header-z-index + 1;
- font-size: $font-size-lg;
- color: $text-color-weak;
-
- &:hover {
- cursor: pointer;
- }
-}
-
-.panel-empty {
- display: flex;
- align-items: center;
- height: 100%;
- width: 100%;
-
- p {
- text-align: center;
- color: $text-muted;
- font-size: $font-size-lg;
- width: 100%;
- }
-}
-
-.panel-menu {
- top: 25px;
- left: -100px;
-}
-
-.panel-info-content {
- overflow: auto;
-
- code {
- white-space: normal;
- word-wrap: break-word;
- }
-
- pre > code {
- display: block;
- }
-
- .panel-info-corner-links {
- list-style: none;
- padding-left: 0;
- }
-}
-
-.panel-time-info {
- font-weight: $font-weight-semi-bold;
- float: right;
- margin-right: 8px;
- color: $blue;
- font-size: 85%;
- position: absolute;
- right: 0;
-}
diff --git a/public/sass/components/_slate_editor.scss b/public/sass/components/_slate_editor.scss
deleted file mode 100644
index bd596c4542a..00000000000
--- a/public/sass/components/_slate_editor.scss
+++ /dev/null
@@ -1,165 +0,0 @@
-.slate-query-field {
- font-size: $font-size-base;
- font-family: $font-family-monospace;
- height: auto;
- word-break: break-word;
- // Affects only placeholder in query field. Adds scrollbar only if content is cropped.
- overflow: auto;
-}
-
-.slate-query-field__wrapper {
- position: relative;
- display: inline-block;
- padding: 6px 8px;
- min-height: $input-height;
- width: 100%;
- color: $text-color;
- background-color: $input-bg;
- background-image: none;
- border: $input-border;
- border-radius: $border-radius;
- transition: all 0.3s;
- line-height: $input-line-height;
-}
-
-.slate-query-field__wrapper--disabled {
- background-color: inherit;
- cursor: not-allowed;
-}
-
-.slate-typeahead {
- .typeahead {
- position: relative;
- z-index: $zindex-typeahead;
- border-radius: $border-radius;
- border: $panel-border;
- max-height: calc(66vh);
- overflow-y: scroll;
- overflow-x: hidden;
- outline: none;
- list-style: none;
- background: $panel-bg;
- color: $text-color;
- box-shadow: $typeahead-shadow;
- }
-
- .typeahead-group__title {
- color: $text-color-weak;
- font-size: $font-size-sm;
- line-height: $line-height-base;
- padding: $space-sm;
- }
-
- .typeahead-item {
- height: auto;
- font-family: $font-family-monospace;
- padding: $space-sm $space-sm $space-sm $space-md;
- font-size: $font-size-sm;
- text-overflow: ellipsis;
- overflow: hidden;
- z-index: 1;
- display: block;
- white-space: nowrap;
- cursor: pointer;
- transition:
- color 0.3s cubic-bezier(0.645, 0.045, 0.355, 1),
- border-color 0.3s cubic-bezier(0.645, 0.045, 0.355, 1),
- background 0.3s cubic-bezier(0.645, 0.045, 0.355, 1),
- padding 0.15s cubic-bezier(0.645, 0.045, 0.355, 1);
- }
-
- .typeahead-item__selected {
- background-color: $typeahead-selected-bg;
-
- .typeahead-item-hint {
- font-size: $font-size-xs;
- color: $text-color;
- white-space: normal;
- }
- }
-
- .typeahead-match {
- color: $typeahead-selected-color;
- border-bottom: 1px solid $typeahead-selected-color;
- // Undoing mark styling
- padding: inherit;
- background: inherit;
- }
-}
-
-/* SYNTAX */
-
-.slate-query-field,
-.prism-syntax-highlight {
- .token.comment,
- .token.block-comment,
- .token.prolog,
- .token.doctype,
- .token.cdata {
- color: $text-color-weak;
- }
-
- .token.variable,
- .token.entity {
- color: $text-color;
- }
-
- .token.property,
- .token.tag,
- .token.constant,
- .token.symbol,
- .token.deleted {
- color: $query-red;
- }
-
- .token.attr-value,
- .token.selector,
- .token.string,
- .token.char,
- .token.builtin,
- .token.inserted {
- color: $query-green;
- }
-
- .token.boolean,
- .token.number,
- .token.operator,
- .token.url {
- color: $query-purple;
- }
-
- .token.function,
- .token.attr-name,
- .token.function-name,
- .token.atrule,
- .token.keyword,
- .token.class-name {
- color: $text-blue;
- }
-
- .token.punctuation,
- .token.regex,
- .token.important {
- color: $query-orange;
- }
-
- .token.important {
- font-weight: normal;
- }
-
- .token.bold {
- font-weight: bold;
- }
-
- .token.italic {
- font-style: italic;
- }
-
- .token.entity {
- cursor: help;
- }
-
- .namespace {
- opacity: 0.7;
- }
-}