diff --git a/.sass-lint.yml b/.sass-lint.yml index eb43af293c670..56b85adca8a71 100644 --- a/.sass-lint.yml +++ b/.sass-lint.yml @@ -12,6 +12,7 @@ files: - 'x-pack/plugins/maps/**/*.s+(a|c)ss' - 'x-pack/plugins/spaces/**/*.s+(a|c)ss' - 'x-pack/plugins/security/**/*.s+(a|c)ss' + - 'x-pack/plugins/monitoring/**/*.s+(a|c)ss' ignore: - 'x-pack/plugins/canvas/shareable_runtime/**/*.s+(a|c)ss' rules: diff --git a/x-pack/plugins/monitoring/public/_hacks.scss b/x-pack/plugins/monitoring/public/_hacks.scss deleted file mode 100644 index bd5079a560820..0000000000000 --- a/x-pack/plugins/monitoring/public/_hacks.scss +++ /dev/null @@ -1,24 +0,0 @@ -@import '@elastic/eui/src/components/header/variables'; - -#monitoring-app { - // SASSTODO: PUI tooltips can be replaced with EuiToolTip - .pui-tooltip-inner { - font-size: $euiFontSizeXS; - } - - .monitoring-tooltip__trigger, - .monitoring-tooltip__trigger:hover { - color: $euiTextColor; - } - - // SASSTODO: Remove font awesome - .monTabs--icon { - margin-left: $euiSizeXS; - color: $euiColorDarkShade; - font-size: $euiFontSize; - } - - .monCallout--meta { - margin-top: $euiSize; - } -} diff --git a/x-pack/plugins/monitoring/public/angular/index.ts b/x-pack/plugins/monitoring/public/angular/index.ts index b371503fdb7c9..3f2a51a898d1f 100644 --- a/x-pack/plugins/monitoring/public/angular/index.ts +++ b/x-pack/plugins/monitoring/public/angular/index.ts @@ -12,7 +12,7 @@ import { localAppModule, appModuleName } from './app_modules'; import { MonitoringPluginDependencies } from '../types'; -const APP_WRAPPER_CLASS = 'monitoringApplicationWrapper'; +const APP_WRAPPER_CLASS = 'monApplicationWrapper'; export class AngularApp { private injector?: angular.auto.IInjectorService; diff --git a/x-pack/plugins/monitoring/public/components/chart/_chart.scss b/x-pack/plugins/monitoring/public/components/chart/_chart.scss deleted file mode 100644 index 1b8ebb762533d..0000000000000 --- a/x-pack/plugins/monitoring/public/components/chart/_chart.scss +++ /dev/null @@ -1,97 +0,0 @@ -@mixin monitoringNoUserSelect { - user-select: none; -} - -.monRhythmChart__wrapper .monRhythmChart__zoom { - visibility: hidden; - padding-right: $euiSizeM; -} - -.monRhythmChart__wrapper:hover .monRhythmChart__zoom { - visibility: visible; -} - -.monRhythmChart { - position: relative; - display: flex; - flex-direction: column; - flex: 1 0 auto; -} - -.monRhythmChart__title { - color: $euiTextColor; - margin: 0 0 $euiSizeS; -} - -.monRhythmChart__content { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - display: flex; - flex: 1 0 auto; -} - -.monRhythmChart__visualization { - display: flex; - flex-direction: column; - flex: 1 0 auto; - position: relative; - - // SASSTODO: generic selector - & > div { - min-width: 1px; - width: 100%; - height: 100%; - } - - // SASSTODO: generic selector - div { - @include monitoringNoUserSelect; - } -} - -.monRhythmChart__legendItem { - font-size: $euiFontSizeXS; - cursor: pointer; - color: $euiTextColor; - display: flex; - flex-direction: row; - align-items: center; - - &-isDisabled { - opacity: 0.5; - } -} - -.monRhythmChart__legendHorizontal { - margin-top: $euiSizeXS; -} - -.monRhythmChart__legendLabel { - overflow: hidden; - white-space: nowrap; - display: flex; - flex-direction: row; - align-items: center; -} - -.monRhythmChart__legendValue { - overflow: hidden; - white-space: nowrap; - margin-left: $euiSizeXS; -} - -.monChart__tooltipLabel, -.monChart__tooltipValue { - text-align: left; - font-size: $euiFontSizeXS; - padding: $euiSizeXS; - word-wrap: break-word; - white-space: normal; -} - -.monChart__tooltipLabel { - font-weight: $euiFontWeightBold; -} diff --git a/x-pack/plugins/monitoring/public/components/chart/_index.scss b/x-pack/plugins/monitoring/public/components/chart/_index.scss deleted file mode 100644 index 2626b91b4c1e2..0000000000000 --- a/x-pack/plugins/monitoring/public/components/chart/_index.scss +++ /dev/null @@ -1 +0,0 @@ -@import 'chart'; diff --git a/x-pack/plugins/monitoring/public/components/chart/horizontal_legend.js b/x-pack/plugins/monitoring/public/components/chart/horizontal_legend.js index 738775ed8d4d9..7d7f232f63975 100644 --- a/x-pack/plugins/monitoring/public/components/chart/horizontal_legend.js +++ b/x-pack/plugins/monitoring/public/components/chart/horizontal_legend.js @@ -9,6 +9,7 @@ import { includes, isFunction } from 'lodash'; import { EuiFlexItem, EuiFlexGroup, EuiIcon, EuiKeyboardAccessible } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; +import './horizontal_legend.scss'; export class HorizontalLegend extends React.Component { constructor() { diff --git a/x-pack/plugins/monitoring/public/components/chart/horizontal_legend.scss b/x-pack/plugins/monitoring/public/components/chart/horizontal_legend.scss new file mode 100644 index 0000000000000..a68f86d28d201 --- /dev/null +++ b/x-pack/plugins/monitoring/public/components/chart/horizontal_legend.scss @@ -0,0 +1,30 @@ +.monRhythmChart__legendItem { + font-size: $euiFontSizeXS; + cursor: pointer; + color: $euiTextColor; + display: flex; + flex-direction: row; + align-items: center; + + &-isDisabled { + opacity: .5; + } +} + +.monRhythmChart__legendHorizontal { + margin-top: $euiSizeXS; +} + +.monRhythmChart__legendLabel { + overflow: hidden; + white-space: nowrap; + display: flex; + flex-direction: row; + align-items: center; +} + +.monRhythmChart__legendValue { + overflow: hidden; + white-space: nowrap; + margin-left: $euiSizeXS; +} diff --git a/x-pack/plugins/monitoring/public/components/chart/info_tooltip.js b/x-pack/plugins/monitoring/public/components/chart/info_tooltip.js index 37fe756187cd4..87efd0a065d49 100644 --- a/x-pack/plugins/monitoring/public/components/chart/info_tooltip.js +++ b/x-pack/plugins/monitoring/public/components/chart/info_tooltip.js @@ -6,6 +6,7 @@ import React from 'react'; import { FormattedMessage } from '@kbn/i18n/react'; +import './info_tooltip.scss'; export function InfoTooltip({ series, bucketSize }) { const tableRows = series.map((item, index) => { diff --git a/x-pack/plugins/monitoring/public/components/chart/info_tooltip.scss b/x-pack/plugins/monitoring/public/components/chart/info_tooltip.scss new file mode 100644 index 0000000000000..7798951ce23fc --- /dev/null +++ b/x-pack/plugins/monitoring/public/components/chart/info_tooltip.scss @@ -0,0 +1,12 @@ +.monChart__tooltipLabel, +.monChart__tooltipValue { + text-align: left; + font-size: $euiFontSizeXS; + padding: $euiSizeXS; + word-wrap: break-word; + white-space: normal; +} + +.monChart__tooltipLabel { + font-weight: $euiFontWeightBold; +} diff --git a/x-pack/plugins/monitoring/public/components/chart/monitoring_timeseries_container.js b/x-pack/plugins/monitoring/public/components/chart/monitoring_timeseries_container.js index c5f4082e2b684..c6bd0773343e0 100644 --- a/x-pack/plugins/monitoring/public/components/chart/monitoring_timeseries_container.js +++ b/x-pack/plugins/monitoring/public/components/chart/monitoring_timeseries_container.js @@ -10,6 +10,7 @@ import { getTitle } from './get_title'; import { getUnits } from './get_units'; import { MonitoringTimeseries } from './monitoring_timeseries'; import { InfoTooltip } from './info_tooltip'; +import './monitoring_timeseries_container.scss'; import { EuiIconTip, diff --git a/x-pack/plugins/monitoring/public/components/chart/monitoring_timeseries_container.scss b/x-pack/plugins/monitoring/public/components/chart/monitoring_timeseries_container.scss new file mode 100644 index 0000000000000..0da89b55e69e4 --- /dev/null +++ b/x-pack/plugins/monitoring/public/components/chart/monitoring_timeseries_container.scss @@ -0,0 +1,8 @@ +.monRhythmChart__wrapper .monRhythmChart__zoom { + visibility: hidden; + padding-right: $euiSizeM; +} + +.monRhythmChart__wrapper:hover .monRhythmChart__zoom { + visibility: visible; +} diff --git a/x-pack/plugins/monitoring/public/components/chart/timeseries_visualization.js b/x-pack/plugins/monitoring/public/components/chart/timeseries_visualization.js index 02753f4d1da5b..eb32ee108e7b3 100644 --- a/x-pack/plugins/monitoring/public/components/chart/timeseries_visualization.js +++ b/x-pack/plugins/monitoring/public/components/chart/timeseries_visualization.js @@ -11,6 +11,7 @@ import { TimeseriesContainer } from './timeseries_container'; import { HorizontalLegend } from './horizontal_legend'; import { getValuesForSeriesIndex, getValuesByX } from './get_values_for_legend'; import { DEBOUNCE_SLOW_MS } from '../../../common/constants'; +import './timeseries_visualization.scss'; export class TimeseriesVisualization extends React.Component { constructor(props) { diff --git a/x-pack/plugins/monitoring/public/components/chart/timeseries_visualization.scss b/x-pack/plugins/monitoring/public/components/chart/timeseries_visualization.scss new file mode 100644 index 0000000000000..8c954e2896dc4 --- /dev/null +++ b/x-pack/plugins/monitoring/public/components/chart/timeseries_visualization.scss @@ -0,0 +1,39 @@ +.monRhythmChart { + position: relative; + display: flex; + flex-direction: column; + flex: 1 0 auto; +} + +.monRhythmChart__content { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + display: flex; + flex: 1 0 auto; +} + +@mixin monitoringNoUserSelect { + user-select: none; +} + +.monRhythmChart__visualization { + display: flex; + flex-direction: column; + flex: 1 0 auto; + position: relative; + + // SASSTODO: generic selector + & > div { + min-width: 1px; + width: 100%; + height: 100%; + } + + // SASSTODO: generic selector + div { + @include monitoringNoUserSelect; + } +} diff --git a/x-pack/plugins/monitoring/public/components/cluster/listing/listing.js b/x-pack/plugins/monitoring/public/components/cluster/listing/listing.js index f1a867536b606..d47af51ee159f 100644 --- a/x-pack/plugins/monitoring/public/components/cluster/listing/listing.js +++ b/x-pack/plugins/monitoring/public/components/cluster/listing/listing.js @@ -25,6 +25,7 @@ import { FormattedMessage } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; import { toMountPoint } from '../../../../../../../src/plugins/kibana_react/public'; import { STANDALONE_CLUSTER_CLUSTER_UUID } from '../../../../common/constants'; +import './listing.scss'; const IsClusterSupported = ({ isSupported, children }) => { return isSupported ? children : '-'; @@ -191,7 +192,7 @@ const getColumns = ( if (!licenseType) { return (
+
{message}
+