diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-14 21:09:20 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-14 21:09:20 +0300 |
commit | 835f1214dcc4e08e3076f269b7b2aa854ea4257a (patch) | |
tree | 07366d250301a8b2a8d7f24d220f4db21b5f6f59 /app/assets/javascripts/monitoring | |
parent | 8309ef26ed9ae22e3115a0203dfff302812c154a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/monitoring')
31 files changed, 84 insertions, 85 deletions
diff --git a/app/assets/javascripts/monitoring/components/alert_widget.vue b/app/assets/javascripts/monitoring/components/alert_widget.vue index 0ffbf169941..9724ef9950b 100644 --- a/app/assets/javascripts/monitoring/components/alert_widget.vue +++ b/app/assets/javascripts/monitoring/components/alert_widget.vue @@ -1,12 +1,12 @@ <script> import { GlBadge, GlLoadingIcon, GlModalDirective, GlIcon, GlTooltip, GlSprintf } from '@gitlab/ui'; import { values, get } from 'lodash'; -import { s__ } from '~/locale'; import { deprecatedCreateFlash as createFlash } from '~/flash'; import { BV_SHOW_MODAL, BV_HIDE_MODAL } from '~/lib/utils/constants'; +import { s__ } from '~/locale'; +import { OPERATORS } from '../constants'; import AlertsService from '../services/alerts_service'; import { alertsValidator, queriesValidator } from '../validators'; -import { OPERATORS } from '../constants'; import AlertWidgetForm from './alert_widget_form.vue'; export default { diff --git a/app/assets/javascripts/monitoring/components/alert_widget_form.vue b/app/assets/javascripts/monitoring/components/alert_widget_form.vue index b26941891e4..68fd3e256ec 100644 --- a/app/assets/javascripts/monitoring/components/alert_widget_form.vue +++ b/app/assets/javascripts/monitoring/components/alert_widget_form.vue @@ -1,6 +1,4 @@ <script> -import { isEmpty, findKey } from 'lodash'; -import Vue from 'vue'; import { GlLink, GlButton, @@ -13,12 +11,14 @@ import { GlTooltipDirective, GlIcon, } from '@gitlab/ui'; +import { isEmpty, findKey } from 'lodash'; +import Vue from 'vue'; import { __, s__ } from '~/locale'; -import Translate from '~/vue_shared/translate'; import TrackEventDirective from '~/vue_shared/directives/track_event'; import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; -import { alertsValidator, queriesValidator } from '../validators'; +import Translate from '~/vue_shared/translate'; import { OPERATORS } from '../constants'; +import { alertsValidator, queriesValidator } from '../validators'; Vue.use(Translate); diff --git a/app/assets/javascripts/monitoring/components/charts/anomaly.vue b/app/assets/javascripts/monitoring/components/charts/anomaly.vue index cb533c38fa0..8569a67da34 100644 --- a/app/assets/javascripts/monitoring/components/charts/anomaly.vue +++ b/app/assets/javascripts/monitoring/components/charts/anomaly.vue @@ -1,9 +1,9 @@ <script> +import { GlChartSeriesLabel } from '@gitlab/ui/dist/charts'; import produce from 'immer'; import { flattenDeep, isNumber } from 'lodash'; -import { GlChartSeriesLabel } from '@gitlab/ui/dist/charts'; -import { roundOffFloat } from '~/lib/utils/common_utils'; import { hexToRgb } from '~/lib/utils/color_utils'; +import { roundOffFloat } from '~/lib/utils/common_utils'; import { areaOpacityValues, symbolSizes, colorValues, panelTypes } from '../../constants'; import { graphDataValidatorForAnomalyValues } from '../../utils'; import MonitorTimeSeriesChart from './time_series.vue'; diff --git a/app/assets/javascripts/monitoring/components/charts/column.vue b/app/assets/javascripts/monitoring/components/charts/column.vue index bb1882c90af..37251af2049 100644 --- a/app/assets/javascripts/monitoring/components/charts/column.vue +++ b/app/assets/javascripts/monitoring/components/charts/column.vue @@ -1,11 +1,11 @@ <script> import { GlResizeObserverDirective } from '@gitlab/ui'; import { GlColumnChart } from '@gitlab/ui/dist/charts'; -import { getSvgIconPathContent } from '~/lib/utils/icon_utils'; import { makeDataSeries } from '~/helpers/monitor_helper'; +import { getSvgIconPathContent } from '~/lib/utils/icon_utils'; import { chartHeight } from '../../constants'; -import { graphDataValidatorForValues } from '../../utils'; import { timezones } from '../../format_date'; +import { graphDataValidatorForValues } from '../../utils'; import { getTimeAxisOptions, getYAxisOptions, getChartGrid } from './options'; export default { diff --git a/app/assets/javascripts/monitoring/components/charts/heatmap.vue b/app/assets/javascripts/monitoring/components/charts/heatmap.vue index 22214a76aba..ed888ef022c 100644 --- a/app/assets/javascripts/monitoring/components/charts/heatmap.vue +++ b/app/assets/javascripts/monitoring/components/charts/heatmap.vue @@ -1,8 +1,8 @@ <script> import { GlResizeObserverDirective } from '@gitlab/ui'; import { GlHeatmap } from '@gitlab/ui/dist/charts'; -import { graphDataValidatorForValues } from '../../utils'; import { formatDate, timezones, formats } from '../../format_date'; +import { graphDataValidatorForValues } from '../../utils'; export default { components: { diff --git a/app/assets/javascripts/monitoring/components/charts/options.js b/app/assets/javascripts/monitoring/components/charts/options.js index 163a7be6973..643550a7144 100644 --- a/app/assets/javascripts/monitoring/components/charts/options.js +++ b/app/assets/javascripts/monitoring/components/charts/options.js @@ -1,8 +1,8 @@ import { isFinite, uniq, sortBy, includes } from 'lodash'; import { SUPPORTED_FORMATS, getFormatter } from '~/lib/utils/unit_format'; import { __, s__ } from '~/locale'; -import { formatDate, timezones, formats } from '../../format_date'; import { thresholdModeTypes } from '../../constants'; +import { formatDate, timezones, formats } from '../../format_date'; const yAxisBoundaryGap = [0.1, 0.1]; /** diff --git a/app/assets/javascripts/monitoring/components/charts/single_stat.vue b/app/assets/javascripts/monitoring/components/charts/single_stat.vue index 4cf583fed18..6d6a7af600b 100644 --- a/app/assets/javascripts/monitoring/components/charts/single_stat.vue +++ b/app/assets/javascripts/monitoring/components/charts/single_stat.vue @@ -1,7 +1,7 @@ <script> import { GlSingleStat } from '@gitlab/ui/dist/charts'; -import { __ } from '~/locale'; import { SUPPORTED_FORMATS, getFormatter } from '~/lib/utils/unit_format'; +import { __ } from '~/locale'; import { graphDataValidatorForValues } from '../../utils'; const defaultPrecision = 2; diff --git a/app/assets/javascripts/monitoring/components/charts/stacked_column.vue b/app/assets/javascripts/monitoring/components/charts/stacked_column.vue index bfa0bd5333b..a53f899f752 100644 --- a/app/assets/javascripts/monitoring/components/charts/stacked_column.vue +++ b/app/assets/javascripts/monitoring/components/charts/stacked_column.vue @@ -4,8 +4,8 @@ import { GlStackedColumnChart } from '@gitlab/ui/dist/charts'; import { getSvgIconPathContent } from '~/lib/utils/icon_utils'; import { s__ } from '~/locale'; import { chartHeight, legendLayoutTypes } from '../../constants'; -import { graphDataValidatorForValues } from '../../utils'; import { formats, timezones } from '../../format_date'; +import { graphDataValidatorForValues } from '../../utils'; import { getTimeAxisOptions, axisTypes } from './options'; export default { diff --git a/app/assets/javascripts/monitoring/components/charts/time_series.vue b/app/assets/javascripts/monitoring/components/charts/time_series.vue index b720700d36d..99008d047af 100644 --- a/app/assets/javascripts/monitoring/components/charts/time_series.vue +++ b/app/assets/javascripts/monitoring/components/charts/time_series.vue @@ -1,15 +1,15 @@ <script> -import { isEmpty, omit, throttle } from 'lodash'; import { GlLink, GlTooltip, GlResizeObserverDirective, GlIcon } from '@gitlab/ui'; import { GlAreaChart, GlLineChart, GlChartSeriesLabel } from '@gitlab/ui/dist/charts'; -import { s__ } from '~/locale'; -import { getSvgIconPathContent } from '~/lib/utils/icon_utils'; +import { isEmpty, omit, throttle } from 'lodash'; import { makeDataSeries } from '~/helpers/monitor_helper'; +import { getSvgIconPathContent } from '~/lib/utils/icon_utils'; +import { s__ } from '~/locale'; import { panelTypes, chartHeight, lineTypes, lineWidths, legendLayoutTypes } from '../../constants'; -import { graphDataValidatorForValues } from '../../utils'; import { formatDate, timezones } from '../../format_date'; -import { getYAxisOptions, getTimeAxisOptions, getChartGrid, getTooltipFormatter } from './options'; +import { graphDataValidatorForValues } from '../../utils'; import { annotationsYAxis, generateAnnotationsSeries } from './annotations'; +import { getYAxisOptions, getTimeAxisOptions, getChartGrid, getTooltipFormatter } from './options'; export const timestampToISODate = (timestamp) => new Date(timestamp).toISOString(); diff --git a/app/assets/javascripts/monitoring/components/create_dashboard_modal.vue b/app/assets/javascripts/monitoring/components/create_dashboard_modal.vue index 74799002b17..bfaf8b2bd28 100644 --- a/app/assets/javascripts/monitoring/components/create_dashboard_modal.vue +++ b/app/assets/javascripts/monitoring/components/create_dashboard_modal.vue @@ -1,7 +1,7 @@ <script> import { GlButton, GlModal, GlSprintf } from '@gitlab/ui'; -import { s__ } from '~/locale'; import { isSafeURL } from '~/lib/utils/url_utility'; +import { s__ } from '~/locale'; export default { components: { GlButton, GlModal, GlSprintf }, diff --git a/app/assets/javascripts/monitoring/components/dashboard.vue b/app/assets/javascripts/monitoring/components/dashboard.vue index 5ec87332288..bfb18206b62 100644 --- a/app/assets/javascripts/monitoring/components/dashboard.vue +++ b/app/assets/javascripts/monitoring/components/dashboard.vue @@ -1,30 +1,30 @@ <script> -import { mapActions, mapState, mapGetters } from 'vuex'; -import VueDraggable from 'vuedraggable'; -import Mousetrap from 'mousetrap'; import { GlButton, GlModalDirective, GlTooltipDirective, GlIcon } from '@gitlab/ui'; -import { s__ } from '~/locale'; +import Mousetrap from 'mousetrap'; +import VueDraggable from 'vuedraggable'; +import { mapActions, mapState, mapGetters } from 'vuex'; import { deprecatedCreateFlash as createFlash } from '~/flash'; +import invalidUrl from '~/lib/utils/invalid_url'; import { ESC_KEY } from '~/lib/utils/keys'; import { mergeUrlParams, updateHistory } from '~/lib/utils/url_utility'; -import invalidUrl from '~/lib/utils/invalid_url'; -import TrackEventDirective from '~/vue_shared/directives/track_event'; +import { s__ } from '~/locale'; import { defaultTimeRange } from '~/vue_shared/constants'; +import TrackEventDirective from '~/vue_shared/directives/track_event'; +import { metricStates, keyboardShortcutKeys } from '../constants'; import { timeRangeFromUrl, panelToUrl, expandedPanelPayloadFromUrl, convertVariablesForURL, } from '../utils'; -import { metricStates, keyboardShortcutKeys } from '../constants'; import DashboardHeader from './dashboard_header.vue'; import DashboardPanel from './dashboard_panel.vue'; -import GraphGroup from './graph_group.vue'; import EmptyState from './empty_state.vue'; +import GraphGroup from './graph_group.vue'; import GroupEmptyState from './group_empty_state.vue'; -import VariablesSection from './variables_section.vue'; import LinksSection from './links_section.vue'; +import VariablesSection from './variables_section.vue'; export default { components: { diff --git a/app/assets/javascripts/monitoring/components/dashboard_actions_menu.vue b/app/assets/javascripts/monitoring/components/dashboard_actions_menu.vue index 77d3766d4bc..94cfb562ce3 100644 --- a/app/assets/javascripts/monitoring/components/dashboard_actions_menu.vue +++ b/app/assets/javascripts/monitoring/components/dashboard_actions_menu.vue @@ -1,5 +1,4 @@ <script> -import { mapState, mapGetters, mapActions } from 'vuex'; import { GlButton, GlDropdown, @@ -10,10 +9,11 @@ import { GlModalDirective, GlTooltipDirective, } from '@gitlab/ui'; +import { mapState, mapGetters, mapActions } from 'vuex'; import CustomMetricsFormFields from '~/custom_metrics/components/custom_metrics_form_fields.vue'; -import { s__ } from '~/locale'; import invalidUrl from '~/lib/utils/invalid_url'; import { redirectTo } from '~/lib/utils/url_utility'; +import { s__ } from '~/locale'; import TrackEventDirective from '~/vue_shared/directives/track_event'; import { PANEL_NEW_PAGE } from '../router/constants'; import { getAddMetricTrackingOptions } from '../utils'; diff --git a/app/assets/javascripts/monitoring/components/dashboard_header.vue b/app/assets/javascripts/monitoring/components/dashboard_header.vue index 0303c47203f..3c423bea368 100644 --- a/app/assets/javascripts/monitoring/components/dashboard_header.vue +++ b/app/assets/javascripts/monitoring/components/dashboard_header.vue @@ -1,6 +1,4 @@ <script> -import { debounce } from 'lodash'; -import { mapActions, mapState, mapGetters } from 'vuex'; import { GlButton, GlDropdown, @@ -12,16 +10,18 @@ import { GlTooltipDirective, GlIcon, } from '@gitlab/ui'; -import { mergeUrlParams, redirectTo } from '~/lib/utils/url_utility'; +import { debounce } from 'lodash'; +import { mapActions, mapState, mapGetters } from 'vuex'; import invalidUrl from '~/lib/utils/invalid_url'; +import { mergeUrlParams, redirectTo } from '~/lib/utils/url_utility'; import DateTimePicker from '~/vue_shared/components/date_time_picker/date_time_picker.vue'; import { timeRanges } from '~/vue_shared/constants'; -import { timeRangeToUrl } from '../utils'; import { timezones } from '../format_date'; +import { timeRangeToUrl } from '../utils'; +import ActionsMenu from './dashboard_actions_menu.vue'; import DashboardsDropdown from './dashboards_dropdown.vue'; import RefreshButton from './refresh_button.vue'; -import ActionsMenu from './dashboard_actions_menu.vue'; export default { components: { diff --git a/app/assets/javascripts/monitoring/components/dashboard_panel.vue b/app/assets/javascripts/monitoring/components/dashboard_panel.vue index bf4f52bb4b9..55e73d17842 100644 --- a/app/assets/javascripts/monitoring/components/dashboard_panel.vue +++ b/app/assets/javascripts/monitoring/components/dashboard_panel.vue @@ -1,6 +1,4 @@ <script> -import { mapState } from 'vuex'; -import { mapValues, pickBy } from 'lodash'; import { GlResizeObserverDirective, GlIcon, @@ -15,27 +13,28 @@ import { GlTooltip, GlTooltipDirective, } from '@gitlab/ui'; -import invalidUrl from '~/lib/utils/invalid_url'; +import { mapValues, pickBy } from 'lodash'; +import { mapState } from 'vuex'; +import { BV_SHOW_MODAL } from '~/lib/utils/constants'; import { convertToFixedRange } from '~/lib/utils/datetime_range'; +import invalidUrl from '~/lib/utils/invalid_url'; import { relativePathToAbsolute, getBaseURL, visitUrl, isSafeURL } from '~/lib/utils/url_utility'; import { __, n__ } from '~/locale'; -import { BV_SHOW_MODAL } from '~/lib/utils/constants'; import TrackEventDirective from '~/vue_shared/directives/track_event'; import { panelTypes } from '../constants'; -import { timeRangeToUrl, downloadCSVOptions, generateLinkToChartOptions } from '../utils'; import { graphDataToCsv } from '../csv_export'; -import MonitorEmptyChart from './charts/empty_chart.vue'; -import MonitorTimeSeriesChart from './charts/time_series.vue'; +import { timeRangeToUrl, downloadCSVOptions, generateLinkToChartOptions } from '../utils'; +import AlertWidget from './alert_widget.vue'; import MonitorAnomalyChart from './charts/anomaly.vue'; -import MonitorSingleStatChart from './charts/single_stat.vue'; +import MonitorBarChart from './charts/bar.vue'; +import MonitorColumnChart from './charts/column.vue'; +import MonitorEmptyChart from './charts/empty_chart.vue'; import MonitorGaugeChart from './charts/gauge.vue'; import MonitorHeatmapChart from './charts/heatmap.vue'; -import MonitorColumnChart from './charts/column.vue'; -import MonitorBarChart from './charts/bar.vue'; +import MonitorSingleStatChart from './charts/single_stat.vue'; import MonitorStackedColumnChart from './charts/stacked_column.vue'; - -import AlertWidget from './alert_widget.vue'; +import MonitorTimeSeriesChart from './charts/time_series.vue'; const events = { timeRangeZoom: 'timerangezoom', diff --git a/app/assets/javascripts/monitoring/components/dashboard_panel_builder.vue b/app/assets/javascripts/monitoring/components/dashboard_panel_builder.vue index bcfa1b04322..847339e814a 100644 --- a/app/assets/javascripts/monitoring/components/dashboard_panel_builder.vue +++ b/app/assets/javascripts/monitoring/components/dashboard_panel_builder.vue @@ -1,5 +1,4 @@ <script> -import { mapActions, mapState } from 'vuex'; import { GlCard, GlForm, @@ -10,6 +9,7 @@ import { GlAlert, GlTooltipDirective, } from '@gitlab/ui'; +import { mapActions, mapState } from 'vuex'; import DateTimePicker from '~/vue_shared/components/date_time_picker/date_time_picker.vue'; import { timeRanges } from '~/vue_shared/constants'; import DashboardPanel from './dashboard_panel.vue'; diff --git a/app/assets/javascripts/monitoring/components/dashboards_dropdown.vue b/app/assets/javascripts/monitoring/components/dashboards_dropdown.vue index 1a349aa154a..1238996154d 100644 --- a/app/assets/javascripts/monitoring/components/dashboards_dropdown.vue +++ b/app/assets/javascripts/monitoring/components/dashboards_dropdown.vue @@ -1,5 +1,4 @@ <script> -import { mapState, mapGetters } from 'vuex'; import { GlIcon, GlDropdown, @@ -9,6 +8,7 @@ import { GlSearchBoxByType, GlModalDirective, } from '@gitlab/ui'; +import { mapState, mapGetters } from 'vuex'; const events = { selectDashboard: 'selectDashboard', diff --git a/app/assets/javascripts/monitoring/components/duplicate_dashboard_modal.vue b/app/assets/javascripts/monitoring/components/duplicate_dashboard_modal.vue index b87934a1db2..49d7e3a48a7 100644 --- a/app/assets/javascripts/monitoring/components/duplicate_dashboard_modal.vue +++ b/app/assets/javascripts/monitoring/components/duplicate_dashboard_modal.vue @@ -1,6 +1,6 @@ <script> -import { mapActions, mapGetters } from 'vuex'; import { GlAlert, GlLoadingIcon, GlModal } from '@gitlab/ui'; +import { mapActions, mapGetters } from 'vuex'; import { s__ } from '~/locale'; import DuplicateDashboardForm from './duplicate_dashboard_form.vue'; diff --git a/app/assets/javascripts/monitoring/components/embeds/embed_group.vue b/app/assets/javascripts/monitoring/components/embeds/embed_group.vue index c114ae1809f..8eef3d69a4f 100644 --- a/app/assets/javascripts/monitoring/components/embeds/embed_group.vue +++ b/app/assets/javascripts/monitoring/components/embeds/embed_group.vue @@ -1,7 +1,7 @@ <script> -import { mapState, mapActions, mapGetters } from 'vuex'; -import sum from 'lodash/sum'; import { GlButton, GlCard, GlIcon } from '@gitlab/ui'; +import sum from 'lodash/sum'; +import { mapState, mapActions, mapGetters } from 'vuex'; import { n__ } from '~/locale'; import { monitoringDashboard } from '~/monitoring/stores'; import MetricEmbed from './metric_embed.vue'; diff --git a/app/assets/javascripts/monitoring/components/embeds/metric_embed.vue b/app/assets/javascripts/monitoring/components/embeds/metric_embed.vue index 2fe49152c4f..25500747573 100644 --- a/app/assets/javascripts/monitoring/components/embeds/metric_embed.vue +++ b/app/assets/javascripts/monitoring/components/embeds/metric_embed.vue @@ -1,10 +1,10 @@ <script> import { mapState, mapActions } from 'vuex'; -import DashboardPanel from '~/monitoring/components/dashboard_panel.vue'; import { convertToFixedRange } from '~/lib/utils/datetime_range'; +import DashboardPanel from '~/monitoring/components/dashboard_panel.vue'; import { defaultTimeRange } from '~/vue_shared/constants'; -import { timeRangeFromUrl, removeTimeRangeParams } from '../../utils'; import { sidebarAnimationDuration } from '../../constants'; +import { timeRangeFromUrl, removeTimeRangeParams } from '../../utils'; let sidebarMutationObserver; diff --git a/app/assets/javascripts/monitoring/components/links_section.vue b/app/assets/javascripts/monitoring/components/links_section.vue index 1fa36c14242..3f9f57d4ac1 100644 --- a/app/assets/javascripts/monitoring/components/links_section.vue +++ b/app/assets/javascripts/monitoring/components/links_section.vue @@ -1,6 +1,6 @@ <script> -import { mapGetters } from 'vuex'; import { GlIcon, GlLink } from '@gitlab/ui'; +import { mapGetters } from 'vuex'; export default { components: { diff --git a/app/assets/javascripts/monitoring/components/refresh_button.vue b/app/assets/javascripts/monitoring/components/refresh_button.vue index e0d9f92440b..3daf5b38933 100644 --- a/app/assets/javascripts/monitoring/components/refresh_button.vue +++ b/app/assets/javascripts/monitoring/components/refresh_button.vue @@ -1,6 +1,4 @@ <script> -import Visibility from 'visibilityjs'; -import { mapActions } from 'vuex'; import { GlButtonGroup, GlButton, @@ -9,6 +7,8 @@ import { GlDropdownDivider, GlTooltipDirective, } from '@gitlab/ui'; +import Visibility from 'visibilityjs'; +import { mapActions } from 'vuex'; import { n__, __ } from '~/locale'; import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; diff --git a/app/assets/javascripts/monitoring/components/variables_section.vue b/app/assets/javascripts/monitoring/components/variables_section.vue index a4aa00abbd1..493d37ce263 100644 --- a/app/assets/javascripts/monitoring/components/variables_section.vue +++ b/app/assets/javascripts/monitoring/components/variables_section.vue @@ -1,7 +1,7 @@ <script> import { mapState, mapActions } from 'vuex'; -import { setCustomVariablesFromUrl } from '../utils'; import { VARIABLE_TYPES } from '../constants'; +import { setCustomVariablesFromUrl } from '../utils'; import DropdownField from './variables/dropdown_field.vue'; import TextField from './variables/text_field.vue'; diff --git a/app/assets/javascripts/monitoring/monitoring_app.js b/app/assets/javascripts/monitoring/monitoring_app.js index 2f8c3e2a0c4..ee67e5dd827 100644 --- a/app/assets/javascripts/monitoring/monitoring_app.js +++ b/app/assets/javascripts/monitoring/monitoring_app.js @@ -1,7 +1,7 @@ -import Vue from 'vue'; import { GlToast } from '@gitlab/ui'; -import { createStore } from './stores'; +import Vue from 'vue'; import createRouter from './router'; +import { createStore } from './stores'; import { stateAndPropsFromDataset } from './utils'; Vue.use(GlToast); diff --git a/app/assets/javascripts/monitoring/pages/panel_new_page.vue b/app/assets/javascripts/monitoring/pages/panel_new_page.vue index 8ff6adb47ca..dbda6e80dac 100644 --- a/app/assets/javascripts/monitoring/pages/panel_new_page.vue +++ b/app/assets/javascripts/monitoring/pages/panel_new_page.vue @@ -1,9 +1,9 @@ <script> -import { mapState } from 'vuex'; import { GlButton, GlTooltipDirective } from '@gitlab/ui'; +import { mapState } from 'vuex'; import { s__ } from '~/locale'; -import { DASHBOARD_PAGE } from '../router/constants'; import DashboardPanelBuilder from '../components/dashboard_panel_builder.vue'; +import { DASHBOARD_PAGE } from '../router/constants'; export default { components: { diff --git a/app/assets/javascripts/monitoring/requests/index.js b/app/assets/javascripts/monitoring/requests/index.js index 4a12ca06197..26fedb9c81c 100644 --- a/app/assets/javascripts/monitoring/requests/index.js +++ b/app/assets/javascripts/monitoring/requests/index.js @@ -1,6 +1,6 @@ import axios from '~/lib/utils/axios_utils'; -import statusCodes from '~/lib/utils/http_status'; import { backOff } from '~/lib/utils/common_utils'; +import statusCodes from '~/lib/utils/http_status'; import { PROMETHEUS_TIMEOUT } from '../constants'; const cancellableBackOffRequest = (makeRequestCallback) => diff --git a/app/assets/javascripts/monitoring/stores/actions.js b/app/assets/javascripts/monitoring/stores/actions.js index 391cb35882c..8522ac6a57d 100644 --- a/app/assets/javascripts/monitoring/stores/actions.js +++ b/app/assets/javascripts/monitoring/stores/actions.js @@ -1,23 +1,23 @@ -import * as Sentry from '~/sentry/wrapper'; -import axios from '~/lib/utils/axios_utils'; import { deprecatedCreateFlash as createFlash } from '~/flash'; +import axios from '~/lib/utils/axios_utils'; import { convertToFixedRange } from '~/lib/utils/datetime_range'; +import * as Sentry from '~/sentry/wrapper'; +import { convertObjectPropsToCamelCase } from '../../lib/utils/common_utils'; +import { s__, sprintf } from '../../locale'; +import { ENVIRONMENT_AVAILABLE_STATE, OVERVIEW_DASHBOARD_PATH, VARIABLE_TYPES } from '../constants'; import trackDashboardLoad from '../monitoring_tracking_helper'; -import getEnvironments from '../queries/getEnvironments.query.graphql'; import getAnnotations from '../queries/getAnnotations.query.graphql'; import getDashboardValidationWarnings from '../queries/getDashboardValidationWarnings.query.graphql'; -import { convertObjectPropsToCamelCase } from '../../lib/utils/common_utils'; -import { s__, sprintf } from '../../locale'; +import getEnvironments from '../queries/getEnvironments.query.graphql'; import { getDashboard, getPrometheusQueryData } from '../requests'; -import { ENVIRONMENT_AVAILABLE_STATE, OVERVIEW_DASHBOARD_PATH, VARIABLE_TYPES } from '../constants'; +import * as types from './mutation_types'; import { gqClient, parseEnvironmentsResponse, parseAnnotationsResponse, removeLeadingSlash, } from './utils'; -import * as types from './mutation_types'; const axiosCancelToken = axios.CancelToken; let cancelTokenSource; diff --git a/app/assets/javascripts/monitoring/stores/mutations.js b/app/assets/javascripts/monitoring/stores/mutations.js index 37febd062ff..e0eaf76b5f6 100644 --- a/app/assets/javascripts/monitoring/stores/mutations.js +++ b/app/assets/javascripts/monitoring/stores/mutations.js @@ -1,10 +1,10 @@ -import Vue from 'vue'; import { pick } from 'lodash'; -import httpStatusCodes from '~/lib/utils/http_status'; +import Vue from 'vue'; import { BACKOFF_TIMEOUT } from '~/lib/utils/common_utils'; +import httpStatusCodes from '~/lib/utils/http_status'; import { dashboardEmptyStates, endpointKeys, initialStateKeys, metricStates } from '../constants'; -import { mapToDashboardViewModel, mapPanelToViewModel, normalizeQueryResponseData } from './utils'; import * as types from './mutation_types'; +import { mapToDashboardViewModel, mapPanelToViewModel, normalizeQueryResponseData } from './utils'; import { optionsFromSeriesData } from './variable_mapping'; /** diff --git a/app/assets/javascripts/monitoring/stores/state.js b/app/assets/javascripts/monitoring/stores/state.js index b8ecb15a72f..3883fa3380d 100644 --- a/app/assets/javascripts/monitoring/stores/state.js +++ b/app/assets/javascripts/monitoring/stores/state.js @@ -1,7 +1,7 @@ import invalidUrl from '~/lib/utils/invalid_url'; import { defaultTimeRange } from '~/vue_shared/constants'; -import { timezones } from '../format_date'; import { dashboardEmptyStates } from '../constants'; +import { timezones } from '../format_date'; export default () => ({ // API endpoints diff --git a/app/assets/javascripts/monitoring/stores/utils.js b/app/assets/javascripts/monitoring/stores/utils.js index 305080cc104..20f7c5cdb60 100644 --- a/app/assets/javascripts/monitoring/stores/utils.js +++ b/app/assets/javascripts/monitoring/stores/utils.js @@ -1,9 +1,9 @@ -import { slugify } from '~/lib/utils/text_utility'; -import createGqClient, { fetchPolicies } from '~/lib/graphql'; -import { SUPPORTED_FORMATS } from '~/lib/utils/unit_format'; import { getIdFromGraphQLId } from '~/graphql_shared/utils'; +import createGqClient, { fetchPolicies } from '~/lib/graphql'; import { DATETIME_RANGE_TYPES } from '~/lib/utils/constants'; import { timeRangeToParams, getRangeType } from '~/lib/utils/datetime_range'; +import { slugify } from '~/lib/utils/text_utility'; +import { SUPPORTED_FORMATS } from '~/lib/utils/unit_format'; import { isSafeURL, mergeUrlParams } from '~/lib/utils/url_utility'; import { NOT_IN_DB_PREFIX, linkTypes, OUT_OF_THE_BOX_DASHBOARDS_PATH_PREFIX } from '../constants'; import { mergeURLVariables, parseTemplatingVariables } from './variable_mapping'; diff --git a/app/assets/javascripts/monitoring/stores/variable_mapping.js b/app/assets/javascripts/monitoring/stores/variable_mapping.js index c9e0e383582..4ca7a0b51d6 100644 --- a/app/assets/javascripts/monitoring/stores/variable_mapping.js +++ b/app/assets/javascripts/monitoring/stores/variable_mapping.js @@ -1,6 +1,6 @@ import { isString } from 'lodash'; -import { templatingVariablesFromUrl } from '../utils'; import { VARIABLE_TYPES } from '../constants'; +import { templatingVariablesFromUrl } from '../utils'; /** * This file exclusively deals with parsing user-defined variables diff --git a/app/assets/javascripts/monitoring/utils.js b/app/assets/javascripts/monitoring/utils.js index 01cae7127e5..6306415a8b9 100644 --- a/app/assets/javascripts/monitoring/utils.js +++ b/app/assets/javascripts/monitoring/utils.js @@ -1,16 +1,16 @@ import { pickBy, mapKeys } from 'lodash'; -import { - queryToObject, - mergeUrlParams, - removeParams, - updateHistory, -} from '~/lib/utils/url_utility'; import { parseBoolean } from '~/lib/utils/common_utils'; import { timeRangeParamNames, timeRangeFromParams, timeRangeToParams, } from '~/lib/utils/datetime_range'; +import { + queryToObject, + mergeUrlParams, + removeParams, + updateHistory, +} from '~/lib/utils/url_utility'; import { VARIABLE_PREFIX } from './constants'; /** |