diff --git a/client/app/assets/less/inc/ant-variables.less b/client/app/assets/less/inc/ant-variables.less index bbdf93ae3f..d1cd2234a4 100644 --- a/client/app/assets/less/inc/ant-variables.less +++ b/client/app/assets/less/inc/ant-variables.less @@ -12,8 +12,7 @@ /* -------------------------------------------------------- Font -----------------------------------------------------------*/ -@redash-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", - sans-serif; +@redash-font: "Inter", sans-serif; @font-family-no-number: @redash-font; @font-family: @redash-font; @code-family: @redash-font; diff --git a/client/app/assets/less/inc/variables.less b/client/app/assets/less/inc/variables.less index 0b8468b30f..4fbe64aa73 100755 --- a/client/app/assets/less/inc/variables.less +++ b/client/app/assets/less/inc/variables.less @@ -1,287 +1,296 @@ /* -------------------------------------------------------- Paths -----------------------------------------------------------*/ -@imgpath: ~'../img'; -@fontpath: ~'../fonts'; - +@imgpath: ~"../img"; +@fontpath: ~"../fonts"; /* -------------------------------------------------------- Container -----------------------------------------------------------*/ -@container-tablet: 100%; -@container-desktop: 100%; -@container-large-desktop: 100%; - +@container-tablet: 100%; +@container-desktop: 100%; +@container-large-desktop: 100%; /* -------------------------------------------------------- Template Variables -----------------------------------------------------------*/ -@header-height: 60px; -@sidebar-left-width: 240px; -@sidebar-left-mid-width: 64px; -@logo-width: @sidebar-left-width; -@logo-height: @header-height; -@boxed-width: 1170px; -@body-bg: #edecec; -@spacing: 15px; -@redash-radius: 3px; - +@header-height: 60px; +@sidebar-left-width: 240px; +@sidebar-left-mid-width: 64px; +@logo-width: @sidebar-left-width; +@logo-height: @header-height; +@boxed-width: 1170px; +@body-bg: #edecec; +@spacing: 15px; +@redash-radius: 3px; /* -------------------------------------------------------- Branding -----------------------------------------------------------*/ -@brand-bg: #191C22; -@sidebar: @brand-bg; -@sidebar-active-bg: #121419; -@color-dark: #9BA1B1; - +@brand-bg: #191c22; +@sidebar: @brand-bg; +@sidebar-active-bg: #121419; +@color-dark: #9ba1b1; /* -------------------------------------------------------- Font -----------------------------------------------------------*/ -@font-icon: 'Material-Design-Iconic-Font'; -@font-family-sans-serif: 'Roboto', sans-serif; -@redash-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; -@font-size-base: 13px; - +@font-icon: "Material-Design-Iconic-Font"; +@font-family-sans-serif: "Inter", sans-serif; +@redash-font: "Inter", sans-serif; +@font-size-base: 13px; /* -------------------------------------------------------- Typograpgy -----------------------------------------------------------*/ -@text-color: #767676; -@link: #02a4c4; -@link-hover-decoration: none; -@headings-color: #333; - +@text-color: #767676; +@link: #02a4c4; +@link-hover-decoration: none; +@headings-color: #333; /* -------------------------------------------------------- Form -----------------------------------------------------------*/ -@input-color: #595959; -@input-color-placeholder: #b4b4b4; -@input-border: #e8e8e8; -@input-border-radius: 0; -@input-border-radius-large: 0px; -@redash-input-radius: 2px; -@input-height-large: 40px; -@input-height-base: 35px; -@input-height-small: 30px; -@input-border-focus: #79c2ff; -@input-group-addon-bg: @light-gray; +@input-color: #595959; +@input-color-placeholder: #b4b4b4; +@input-border: #e8e8e8; +@input-border-radius: 0; +@input-border-radius-large: 0px; +@redash-input-radius: 2px; +@input-height-large: 40px; +@input-height-base: 35px; +@input-height-small: 30px; +@input-border-focus: #79c2ff; +@input-group-addon-bg: @light-gray; /* -------------------------------------------------------- Colors -----------------------------------------------------------*/ -@white: #ffffff; -@black: #000000; -@blue: #2196F3; -@red: #F44336; -@purple: #9C27B0; -@deeppurple: #673AB7; -@lightblue: #03A9F4; -@cyan: #00BCD4; -@teal: #009688; -@green: #4CAF50; -@lightgreen: #8BC34A; -@lime: #CDDC39; -@yellow: #FFEB3B; -@yellow-darker: #fbd208; -@amber: #FFC107; -@orange: #FF9800; -@deeporange: #FF5722; -@gray: #9E9E9E; -@bluegray: #607D8B; -@indigo: #3F51B5; -@pink: #E91E63; -@brown: #795548; -@light-gray: #FCFCFC; -@gray-light: #828282; -@ace: #f8f8f8; +@white: #ffffff; +@white-100: #fbfdff; +@white-200: #f2f7fb; +@gray-50: #f2f3f6; +@gray-100: #e5e7ee; +@gray-200: #cad3e5; +@gray-300: #95a3be; +@gray-300A: #a6b5d3; +@gray-400: #7e87a8; +@gray-500: #596284; +@gray-500A: #6a7290; +@gray-600: #474e6a; +@gray-700: #353b4f; +@gray-800: #2d3142; +@gray-900: #323643; +@primary-100: #fbf6fe; +@primary-200: #f7e8ff; +@primary-300: #d8a2f3; +@primary-400: #c87dee; +@primary-500: #b045e6; +@primary-500A: #aa00ff; +@primary-600: #8d37b8; +@primary-700: #7b1fa2; +@secondary-100: #fdf8ff; +@secondary-200: #fee6ee; +@secondary-300: #f48caf; +@secondary-400: #f06695; +@secondary-500: #ec407a; +@secondary-500B: #f50057; +@secondary-600: #d43a6e; +@secondary-700: #bd3362; + +@black: #000000; +@blue: #2196f3; +@red: #f44336; +@purple: #9c27b0; +@deeppurple: #673ab7; +@lightblue: #03a9f4; +@cyan: #00bcd4; +@teal: #009688; +@green: #4caf50; +@lightgreen: #8bc34a; +@lime: #cddc39; +@yellow: #ffeb3b; +@yellow-darker: #fbd208; +@amber: #ffc107; +@orange: #ff9800; +@deeporange: #ff5722; +@gray: #9e9e9e; +@bluegray: #607d8b; +@indigo: #3f51b5; +@pink: #e91e63; +@brown: #795548; +@light-gray: #fcfcfc; +@gray-light: #828282; +@ace: #f8f8f8; @redash-gray: rgba(102, 136, 153, 1); @redash-orange: rgba(255, 120, 100, 1); @redash-black: rgba(0, 0, 0, 1); @redash-yellow: rgba(252, 252, 161, 0.75); - /** Form States **/ -@state-success-text: @green; -@state-info-text: @blue; -@state-danger-text: lighten(@red, 5%); - +/** Form States **/ +@state-success-text: @green; +@state-info-text: @blue; +@state-danger-text: lighten(@red, 5%); /* -------------------------------------------------------- Alert -----------------------------------------------------------*/ -@alert-success-border: transparent; -@alert-info-border: transparent; -@alert-danger-border: transparent; -@alert-inverse-border: transparent; - -@alert-success-bg: fade(@green, 70%); -@alert-info-bg: fade(@blue, 70%); -@alert-danger-bg: fade(@red, 70%); -@alert-inverse-bg: #333; +@alert-success-border: transparent; +@alert-info-border: transparent; +@alert-danger-border: transparent; +@alert-inverse-border: transparent; -@alert-success-text: #fff; -@alert-info-text: #fff; -@alert-danger-text: #fff; -@alert-inverse-text: #fff; +@alert-success-bg: fade(@green, 70%); +@alert-info-bg: fade(@blue, 70%); +@alert-danger-bg: fade(@red, 70%); +@alert-inverse-bg: #333; +@alert-success-text: #fff; +@alert-info-text: #fff; +@alert-danger-text: #fff; +@alert-inverse-text: #fff; /* -------------------------------------------------------- Bootstrap Brands -----------------------------------------------------------*/ -@brand-default: #eee; -@brand-primary: @blue; -@brand-info: @cyan; -@brand-success: @green; -@brand-warning: @orange; -@brand-danger: @red; - +@brand-default: #eee; +@brand-primary: @blue; +@brand-info: @cyan; +@brand-success: @green; +@brand-warning: @orange; +@brand-danger: @red; /* -------------------------------------------------------- Border Radius -----------------------------------------------------------*/ -@border-radius-base: 2px; -@border-radius-large: 2px; -@border-radius-small: 2px; - +@border-radius-base: 2px; +@border-radius-large: 2px; +@border-radius-small: 2px; /* -------------------------------------------------------- Dropdown -----------------------------------------------------------*/ -@dropdown-fallback-border: transparent; -@dropdown-border: transparent; -@dropdown-divider-bg: ''; -@dropdown-link-hover-bg: rgba(0,0,0,0.075); -@dropdown-link-color: #333; -@dropdown-link-hover-color: #333; -@dropdown-link-disabled-color: #e4e4e4; -@dropdown-divider-bg: rgba(0,0,0,0.08); -@dropdown-link-active-color: #333; -@dropdown-link-active-bg: rgba(0, 0, 0, 0.075); -@zindex-dropdown: 9; -@dropdown-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); +@dropdown-fallback-border: transparent; +@dropdown-border: transparent; +@dropdown-divider-bg: ""; +@dropdown-link-hover-bg: rgba(0, 0, 0, 0.075); +@dropdown-link-color: #333; +@dropdown-link-hover-color: #333; +@dropdown-link-disabled-color: #e4e4e4; +@dropdown-divider-bg: rgba(0, 0, 0, 0.08); +@dropdown-link-active-color: #333; +@dropdown-link-active-bg: rgba(0, 0, 0, 0.075); +@zindex-dropdown: 9; +@dropdown-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); /* -------------------------------------------------------- Page Header -----------------------------------------------------------*/ -@page-header-border-color: transparent; - +@page-header-border-color: transparent; /* -------------------------------------------------------- Buttons -----------------------------------------------------------*/ -@btn-default-border: @input-border; -@btn-font-weight: 400; - +@btn-default-border: @input-border; +@btn-font-weight: 400; /* -------------------------------------------------------- Tables -----------------------------------------------------------*/ -@table-bg: #fff; -@table-border-color: #f0f0f0; -@table-cell-padding: 10px; -@table-condensed-cell-padding: 7px; -@table-bg-accent: @light-gray; -@table-bg-active: #FFFCBE; -@table-bg-hover: lighten(@light-gray, 2%); - +@table-bg: #fff; +@table-border-color: #f0f0f0; +@table-cell-padding: 10px; +@table-condensed-cell-padding: 7px; +@table-bg-accent: @light-gray; +@table-bg-active: #fffcbe; +@table-bg-hover: lighten(@light-gray, 2%); /* -------------------------------------------------------- Pagination -----------------------------------------------------------*/ -@pagination-bg: #E2E2E2; -@pagination-border: #fff; -@pagination-color: #7E7E7E; -@pagination-active-bg: @lightblue; -@pagination-active-border: @pagination-border; -@pagination-disabled-bg: #E2E2E2; -@pagination-disabled-border: @pagination-border; -@pagination-hover-color: #333; -@pagination-hover-bg: #d7d7d7; -@pagination-hover-border: @pagination-border; - +@pagination-bg: #e2e2e2; +@pagination-border: #fff; +@pagination-color: #7e7e7e; +@pagination-active-bg: @lightblue; +@pagination-active-border: @pagination-border; +@pagination-disabled-bg: #e2e2e2; +@pagination-disabled-border: @pagination-border; +@pagination-hover-color: #333; +@pagination-hover-bg: #d7d7d7; +@pagination-hover-border: @pagination-border; /* -------------------------------------------------------- Thumbnail -----------------------------------------------------------*/ -@thumbnail-bg: #fff; -@thumbnail-border: #eee; +@thumbnail-bg: #fff; +@thumbnail-border: #eee; /* -------------------------------------------------------- Carousel -----------------------------------------------------------*/ -@carousel-caption-color: #fff; - +@carousel-caption-color: #fff; /* -------------------------------------------------------- Modal -----------------------------------------------------------*/ -@modal-content-fallback-border-color: transparent; -@modal-content-border-color: transparent; -@modal-backdrop-bg: #000; -@modal-header-border-color: transparent; -@modal-title-line-height: transparent; -@modal-footer-border-color: transparent; -@zindex-modal-background: 10; - +@modal-content-fallback-border-color: transparent; +@modal-content-border-color: transparent; +@modal-backdrop-bg: #000; +@modal-header-border-color: transparent; +@modal-title-line-height: transparent; +@modal-footer-border-color: transparent; +@zindex-modal-background: 10; /* -------------------------------------------------------- Tooltips -----------------------------------------------------------*/ -@tooltip-bg: #333; -@tooltip-opacity: 1; - +@tooltip-bg: #333; +@tooltip-opacity: 1; /* -------------------------------------------------------- Popobver -----------------------------------------------------------*/ -@zindex-popover: 9; -@popover-title-bg: #fff; -@popover-border-color: #fff; -@popover-fallback-border-color: #fff; - +@zindex-popover: 9; +@popover-title-bg: #fff; +@popover-border-color: #fff; +@popover-fallback-border-color: #fff; /* -------------------------------------------------------- Breacrumb -----------------------------------------------------------*/ -@breadcrumb-bg: transparent; -@breadcrumb-padding-horizontal: 20px; -@breadcrumb-active-color: #7c7c7c; - +@breadcrumb-bg: transparent; +@breadcrumb-padding-horizontal: 20px; +@breadcrumb-active-color: #7c7c7c; /* -------------------------------------------------------- Jumbotron -----------------------------------------------------------*/ -@jumbotron-bg: #F7F7F7; - +@jumbotron-bg: #f7f7f7; /* -------------------------------------------------------- List Group -----------------------------------------------------------*/ -@list-group-border: #f4f4f4; -@list-group-active-color: #000; -@list-group-active-bg: #f5f5f5; -@list-group-active-border: @list-group-border; -@list-group-disabled-color: #B5B4B4; -@list-group-disabled-bg: #fff; -@list-group-disabled-text-color: #B5B4B4; - +@list-group-border: #f4f4f4; +@list-group-active-color: #000; +@list-group-active-bg: #f5f5f5; +@list-group-active-border: @list-group-border; +@list-group-disabled-color: #b5b4b4; +@list-group-disabled-bg: #fff; +@list-group-disabled-text-color: #b5b4b4; /* -------------------------------------------------------- Badges -----------------------------------------------------------*/ -@badge-color: #fff; -@badge-bg: @brand-primary; -@badge-border-radius: 2px; -@badge-font-weight: 400; -@badge-active-color: #fff; -@badge-active-bg: @brand-primary; - +@badge-color: #fff; +@badge-bg: @brand-primary; +@badge-border-radius: 2px; +@badge-font-weight: 400; +@badge-active-color: #fff; +@badge-active-bg: @brand-primary; /* -------------------------------------------------------- Misc -----------------------------------------------------------*/ -@code-bg: transparent; -@tile-shadow: 0 1px 1px rgba(0,0,0,0.07); +@code-bg: transparent; +@tile-shadow: 0 1px 1px rgba(0, 0, 0, 0.07); diff --git a/client/app/components/QueryLink.less b/client/app/components/QueryLink.less index 386241ce73..faa33a2678 100644 --- a/client/app/components/QueryLink.less +++ b/client/app/components/QueryLink.less @@ -1,7 +1,4 @@ .query-link { .visualization-name { - font-size: 15px; - font-weight: 500; - color: rgba(0, 0, 0, 0.8); } -} \ No newline at end of file +} diff --git a/client/app/components/dashboards/dashboard-grid.less b/client/app/components/dashboards/dashboard-grid.less index 1f5d0b39bf..e854a2c90b 100644 --- a/client/app/components/dashboards/dashboard-grid.less +++ b/client/app/components/dashboards/dashboard-grid.less @@ -1,3 +1,5 @@ +@import (reference, less) "~@/assets/less/inc/variables"; + .dashboard-wrapper { flex-grow: 1; margin-bottom: 70px; @@ -18,6 +20,9 @@ overflow: hidden; margin: 0; padding: 0; + border-radius: 16px; + background-color: @white-100; + box-shadow: none !important; } .pivot-table-visualization-container > table, @@ -182,3 +187,27 @@ } } } + +@keyframes spin { + to { + transform: rotate(360deg); + } +} + +.animate-spin { + animation: spin 1s linear infinite !important; + color: @primary-500; +} +.widget-main { + display: flex; + flex-direction: column; + height: 100%; + width: 100%; + padding-inline: 24px; +} +.spinner-container { + display: flex; + flex: 1 1 0%; + align-items: center; + justify-content: center; +} diff --git a/client/app/components/dashboards/dashboard-widget/VisualizationWidget.jsx b/client/app/components/dashboards/dashboard-widget/VisualizationWidget.jsx index 9a021cc8bd..fceb9c249e 100644 --- a/client/app/components/dashboards/dashboard-widget/VisualizationWidget.jsx +++ b/client/app/components/dashboards/dashboard-widget/VisualizationWidget.jsx @@ -302,15 +302,20 @@ class VisualizationWidget extends React.Component { ); default: return ( -
-
-