From cfea8bdcae0ef392f7d83fa119a18c1a4b04f565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 13 Feb 2019 11:14:53 +0100 Subject: [PATCH] Prettier had not been running as a precommit hook for some time so had to run in on all files again --- .../ColorPicker/ColorPicker.story.tsx | 2 +- .../components/ColorPicker/ColorPicker.tsx | 2 +- .../ColorPicker/ColorPickerPopover.test.tsx | 12 +- .../ColorPicker/ColorPickerPopover.tsx | 1 - .../ColorPicker/NamedColorsPalette.test.tsx | 7 +- .../ColorPicker/SpectrumPalettePointer.tsx | 1 - .../CustomScrollbar/_CustomScrollbar.scss | 2 +- .../src/components/FormLabel/FormLabel.tsx | 2 +- .../src/components/Gauge/Gauge.test.tsx | 2 +- .../PanelOptionsGrid/PanelOptionsGrid.tsx | 7 +- .../src/components/Select/Select.tsx | 4 +- .../src/components/Tooltip/Tooltip.tsx | 2 +- .../ValueMappingsEditor.tsx | 18 +- packages/grafana-ui/src/components/index.scss | 2 +- packages/grafana-ui/src/themes/dark.ts | 2 +- packages/grafana-ui/src/themes/default.ts | 16 +- .../src/themes/selectThemeVariant.test.ts | 10 +- .../src/themes/selectThemeVariant.ts | 6 +- packages/grafana-ui/src/types/index.ts | 1 - .../src/utils/namedColorsPalette.test.ts | 2 +- .../src/utils/namedColorsPalette.ts | 8 +- .../grafana-ui/src/utils/processTimeSeries.ts | 2 +- .../src/utils/storybook/withTheme.tsx | 7 +- .../src/utils/valueFormats/categories.ts | 4 +- .../ErrorBoundary/ErrorBoundary.tsx | 2 +- public/app/core/components/Footer/Footer.tsx | 77 +- public/app/core/components/Page/Page.tsx | 33 +- .../app/core/components/Page/PageContents.tsx | 1 - .../components/sidemenu/SideMenu.test.tsx | 6 +- public/app/core/config.ts | 2 +- .../app/core/directives/autofill_event_fix.ts | 2 +- .../app/core/directives/dropdown_typeahead.ts | 2 +- public/app/core/logs_model.ts | 2 +- public/app/core/profiler.ts | 1 - public/app/core/selectors/navModel.ts | 2 +- .../core/services/__mocks__/backend_srv.ts | 3 - .../app/core/specs/PasswordStrength.test.tsx | 13 +- public/app/core/utils/explore.test.ts | 2 +- public/app/core/utils/explore.ts | 9 +- public/app/core/utils/kbn.ts | 8 +- public/app/core/utils/scrollbar.ts | 4 +- public/app/core/utils/text.ts | 4 +- public/app/core/utils/url.ts | 14 +- public/app/features/admin/AdminEditOrgCtrl.ts | 2 - .../app/features/admin/AdminListOrgsCtrl.ts | 2 - public/app/features/admin/ServerStats.tsx | 2 +- public/app/features/admin/StyleGuideCtrl.ts | 1 - public/app/features/alerting/AlertTabCtrl.ts | 6 +- .../AdHocFilters/AdHocFiltersCtrl.ts | 8 +- .../AddPanelWidget/AddPanelWidget.tsx | 6 +- .../DashboardPermissions.tsx | 4 +- .../components/DashboardRow/DashboardRow.tsx | 10 +- .../DashboardSettings/DashboardSettings.tsx | 2 +- .../dashboard/components/SubMenu/SubMenu.tsx | 2 +- .../containers/DashboardPage.test.tsx | 58 +- .../dashboard/dashgrid/DashboardGrid.tsx | 20 +- .../dashgrid/PanelHeader/PanelHeader.tsx | 10 +- .../PanelHeader/PanelHeaderCorner.tsx | 9 +- .../dashboard/dashgrid/PanelResizer.tsx | 2 +- public/app/features/dashboard/index.ts | 1 - .../dashboard/panel_editor/QueryEditorRow.tsx | 9 +- .../dashboard/services/DashboardSrv.ts | 2 +- .../dashboard/state/DashboardModel.ts | 1 - .../dashboard/state/PanelModel.test.ts | 5 +- .../app/features/dashboard/state/actions.ts | 1 - .../dashboard/state/initDashboard.test.ts | 16 +- .../features/dashboard/state/reducers.test.ts | 2 +- .../app/features/dashboard/state/reducers.ts | 1 - .../features/dashboard/utils/panel.test.ts | 4 +- public/app/features/dashboard/utils/panel.ts | 4 +- .../datasources/DataSourceDashboards.test.tsx | 2 +- .../datasources/DataSourceDashboards.tsx | 11 +- .../app/features/folders/CreateFolderCtrl.ts | 1 - .../features/folders/FolderDashboardsCtrl.ts | 1 - .../app/features/org/OrgDetailsPage.test.tsx | 6 +- public/app/features/playlist/playlist_srv.ts | 2 +- .../features/plugins/PluginListPage.test.tsx | 6 +- .../app/features/plugins/PluginListPage.tsx | 4 +- public/app/features/plugins/datasource_srv.ts | 2 +- public/app/features/plugins/state/actions.ts | 3 +- public/app/features/plugins/state/reducers.ts | 2 +- .../templating/specs/template_srv.test.ts | 2 +- .../templating/specs/variable_srv.test.ts | 8 +- .../app/features/templating/variable_srv.ts | 14 +- .../app/features/users/UsersListPage.test.tsx | 6 +- public/app/features/users/UsersListPage.tsx | 10 +- .../datasource/cloudwatch/datasource.ts | 1 - .../cloudwatch/specs/datasource.test.ts | 16 +- .../elasticsearch/specs/datasource.test.ts | 4 +- .../app_insights/response_parser.ts | 6 +- .../editor/KustoQueryField.tsx | 86 +- .../editor/editor_component.tsx | 11 +- .../editor/kusto/kusto.ts | 887 +++++++--- .../query_ctrl.ts | 17 +- .../loki/components/LokiQueryEditor.tsx | 4 +- .../app/plugins/datasource/loki/datasource.ts | 58 +- public/app/plugins/datasource/loki/types.ts | 1 - .../datasource/mssql/specs/datasource.test.ts | 2 +- .../plugins/datasource/prometheus/types.ts | 1 - .../datasource/testdata/QueryEditor.tsx | 2 +- .../plugins/datasource/testdata/datasource.ts | 1 - .../app/plugins/datasource/testdata/types.ts | 1 - .../app/plugins/panel/graph/Legend/Legend.tsx | 2 +- public/app/plugins/panel/graph/graph.ts | 1 - .../plugins/panel/graph/time_regions_form.ts | 2 +- .../panel/graph2/GraphPanelOptions.tsx | 1 - .../app/plugins/panel/heatmap/color_legend.ts | 5 +- public/app/plugins/panel/singlestat/module.ts | 5 +- public/app/plugins/panel/text/module.ts | 5 +- public/app/routes/ReactContainer.tsx | 8 +- public/app/types/index.ts | 2 - public/sass/_variables.dark.scss | 21 +- public/sass/_variables.light.scss | 38 +- public/sass/_variables.scss | 4 +- public/sass/base/_font_awesome.scss | 26 +- public/sass/base/_forms.scss | 44 +- public/sass/base/_grafana_icons.scss | 123 +- public/sass/base/_icons.scss | 3 +- public/sass/base/_normalize.scss | 20 +- public/sass/base/font-awesome/_core.scss | 3 +- public/sass/base/font-awesome/_mixins.scss | 7 +- public/sass/base/font-awesome/_path.scss | 19 +- public/sass/base/font-awesome/_variables.scss | 1576 ++++++++--------- public/sass/components/_cards.scss | 2 +- public/sass/components/_gf-form.scss | 1 - public/sass/components/_navbar.scss | 5 +- public/sass/components/_panel_editor.scss | 2 - public/sass/components/_query_editor.scss | 3 - public/sass/components/_view_states.scss | 1 - public/sass/mixins/_drop_element.scss | 52 +- public/sass/mixins/_forms.scss | 3 +- public/sass/utils/_hacks.scss | 20 +- 132 files changed, 1991 insertions(+), 1690 deletions(-) diff --git a/packages/grafana-ui/src/components/ColorPicker/ColorPicker.story.tsx b/packages/grafana-ui/src/components/ColorPicker/ColorPicker.story.tsx index 1fb31e86d72..f7fa71391ae 100644 --- a/packages/grafana-ui/src/components/ColorPicker/ColorPicker.story.tsx +++ b/packages/grafana-ui/src/components/ColorPicker/ColorPicker.story.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { storiesOf } from '@storybook/react'; -import { boolean } from '@storybook/addon-knobs'; +import { boolean } from '@storybook/addon-knobs'; import { SeriesColorPicker, ColorPicker } from './ColorPicker'; import { action } from '@storybook/addon-actions'; import { withCenteredStory } from '../../utils/storybook/withCenteredStory'; diff --git a/packages/grafana-ui/src/components/ColorPicker/ColorPicker.tsx b/packages/grafana-ui/src/components/ColorPicker/ColorPicker.tsx index a48ecc44c45..27371d5515f 100644 --- a/packages/grafana-ui/src/components/ColorPicker/ColorPicker.tsx +++ b/packages/grafana-ui/src/components/ColorPicker/ColorPicker.tsx @@ -30,7 +30,7 @@ export const warnAboutColorPickerPropsDeprecation = (componentName: string, prop export const colorPickerFactory = ( popover: React.ComponentType, - displayName = 'ColorPicker', + displayName = 'ColorPicker' ) => { return class ColorPicker extends Component { static displayName = displayName; diff --git a/packages/grafana-ui/src/components/ColorPicker/ColorPickerPopover.test.tsx b/packages/grafana-ui/src/components/ColorPicker/ColorPickerPopover.test.tsx index 444f0e658c8..7a5000653d4 100644 --- a/packages/grafana-ui/src/components/ColorPicker/ColorPickerPopover.test.tsx +++ b/packages/grafana-ui/src/components/ColorPicker/ColorPickerPopover.test.tsx @@ -15,7 +15,7 @@ describe('ColorPickerPopover', () => { describe('rendering', () => { it('should render provided color as selected if color provided by name', () => { - const wrapper = mount( {}} theme={getTheme()}/>); + const wrapper = mount( {}} theme={getTheme()} />); const selectedSwatch = wrapper.find(ColorSwatch).findWhere(node => node.key() === BasicGreen.name); const notSelectedSwatches = wrapper.find(ColorSwatch).filterWhere(node => node.prop('isSelected') === false); @@ -25,7 +25,9 @@ describe('ColorPickerPopover', () => { }); it('should render provided color as selected if color provided by hex', () => { - const wrapper = mount( {}} theme={getTheme()} />); + const wrapper = mount( + {}} theme={getTheme()} /> + ); const selectedSwatch = wrapper.find(ColorSwatch).findWhere(node => node.key() === BasicGreen.name); const notSelectedSwatches = wrapper.find(ColorSwatch).filterWhere(node => node.prop('isSelected') === false); @@ -46,7 +48,11 @@ describe('ColorPickerPopover', () => { it('should pass hex color value to onChange prop by default', () => { wrapper = mount( - + ); const basicBlueSwatch = wrapper.find(ColorSwatch).findWhere(node => node.key() === BasicBlue.name); diff --git a/packages/grafana-ui/src/components/ColorPicker/ColorPickerPopover.tsx b/packages/grafana-ui/src/components/ColorPicker/ColorPickerPopover.tsx index b4c77a5e373..d3d70175c4b 100644 --- a/packages/grafana-ui/src/components/ColorPicker/ColorPickerPopover.tsx +++ b/packages/grafana-ui/src/components/ColorPicker/ColorPickerPopover.tsx @@ -119,4 +119,3 @@ export class ColorPickerPopover extends React ); } } - diff --git a/packages/grafana-ui/src/components/ColorPicker/NamedColorsPalette.test.tsx b/packages/grafana-ui/src/components/ColorPicker/NamedColorsPalette.test.tsx index 7a1ba95e81d..1f2ce33d235 100644 --- a/packages/grafana-ui/src/components/ColorPicker/NamedColorsPalette.test.tsx +++ b/packages/grafana-ui/src/components/ColorPicker/NamedColorsPalette.test.tsx @@ -7,7 +7,6 @@ import { getTheme } from '../../themes'; import { GrafanaThemeType } from '../../types'; describe('NamedColorsPalette', () => { - const BasicGreen = getColorDefinitionByName('green'); describe('theme support for named colors', () => { @@ -23,13 +22,15 @@ describe('NamedColorsPalette', () => { expect(selectedSwatch.prop('color')).toBe(BasicGreen.variants.dark); wrapper.unmount(); - wrapper = mount( {}} />); + wrapper = mount( + {}} /> + ); selectedSwatch = wrapper.find(ColorSwatch).findWhere(node => node.key() === BasicGreen.name); expect(selectedSwatch.prop('color')).toBe(BasicGreen.variants.light); }); it('should render dar variant of provided color when theme not provided', () => { - wrapper = mount( {}} theme={getTheme()}/>); + wrapper = mount( {}} theme={getTheme()} />); selectedSwatch = wrapper.find(ColorSwatch).findWhere(node => node.key() === BasicGreen.name); expect(selectedSwatch.prop('color')).toBe(BasicGreen.variants.dark); }); diff --git a/packages/grafana-ui/src/components/ColorPicker/SpectrumPalettePointer.tsx b/packages/grafana-ui/src/components/ColorPicker/SpectrumPalettePointer.tsx index 7e3b2cf06a3..5790de86e29 100644 --- a/packages/grafana-ui/src/components/ColorPicker/SpectrumPalettePointer.tsx +++ b/packages/grafana-ui/src/components/ColorPicker/SpectrumPalettePointer.tsx @@ -15,7 +15,6 @@ const SpectrumPalettePointer: React.FunctionComponent = ({