diff --git a/package.json b/package.json index 70067a166a6..ca3836e03e2 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "postcss-browser-reporter": "^0.5.0", "postcss-loader": "^2.0.6", "postcss-reporter": "^5.0.0", - "prettier": "1.9.2", + "prettier": "1.16.4", "react-hot-loader": "^4.3.6", "react-test-renderer": "^16.5.0", "redux-mock-store": "^1.5.3", @@ -129,8 +129,14 @@ } }, "lint-staged": { - "*.{ts,tsx,json,scss}": ["prettier --write", "git add"], - "*pkg/**/*.go": ["gofmt -w -s", "git add"] + "*.{ts,tsx,json,scss}": [ + "prettier --write", + "git add" + ], + "*pkg/**/*.go": [ + "gofmt -w -s", + "git add" + ] }, "prettier": { "trailingComma": "es5", @@ -196,7 +202,12 @@ "**/@types/react": "16.7.6" }, "workspaces": { - "packages": ["packages/*"], - "nohoist": ["**/@types/*", "**/@types/*/**"] + "packages": [ + "packages/*" + ], + "nohoist": [ + "**/@types/*", + "**/@types/*/**" + ] } } diff --git a/packages/grafana-ui/src/components/EmptySearchResult/_EmptySearchResult.scss b/packages/grafana-ui/src/components/EmptySearchResult/_EmptySearchResult.scss index 3a1e3fa8b57..72e31b3828d 100644 --- a/packages/grafana-ui/src/components/EmptySearchResult/_EmptySearchResult.scss +++ b/packages/grafana-ui/src/components/EmptySearchResult/_EmptySearchResult.scss @@ -4,5 +4,5 @@ padding: $spacer; min-width: 350px; border-radius: $border-radius; - margin-bottom: $spacer*2; + margin-bottom: $spacer * 2; } diff --git a/packages/grafana-ui/src/components/Gauge/Gauge.tsx b/packages/grafana-ui/src/components/Gauge/Gauge.tsx index 2ec0517e96a..8dea01589f1 100644 --- a/packages/grafana-ui/src/components/Gauge/Gauge.tsx +++ b/packages/grafana-ui/src/components/Gauge/Gauge.tsx @@ -115,9 +115,9 @@ export class Gauge extends PureComponent { getFontScale(length: number): number { if (length > 12) { - return FONT_SCALE - length * 5 / 120; + return FONT_SCALE - (length * 5) / 120; } - return FONT_SCALE - length * 5 / 105; + return FONT_SCALE - (length * 5) / 105; } draw() { diff --git a/packages/grafana-ui/src/components/Tooltip/Popper.tsx b/packages/grafana-ui/src/components/Tooltip/Popper.tsx index cf4b9cdd653..d43f37ecfcc 100644 --- a/packages/grafana-ui/src/components/Tooltip/Popper.tsx +++ b/packages/grafana-ui/src/components/Tooltip/Popper.tsx @@ -17,12 +17,7 @@ const transitionStyles: { [key: string]: object } = { exiting: { opacity: 0, transitionDelay: '500ms' }, }; -export type RenderPopperArrowFn = ( - props: { - arrowProps: PopperArrowProps; - placement: string; - } -) => JSX.Element; +export type RenderPopperArrowFn = (props: { arrowProps: PopperArrowProps; placement: string }) => JSX.Element; interface Props extends React.HTMLAttributes { show: boolean; diff --git a/public/app/core/components/PermissionList/PermissionListItem.tsx b/public/app/core/components/PermissionList/PermissionListItem.tsx index c33b564154a..b949209d6a3 100644 --- a/public/app/core/components/PermissionList/PermissionListItem.tsx +++ b/public/app/core/components/PermissionList/PermissionListItem.tsx @@ -61,15 +61,14 @@ export default class PermissionsListItem extends PureComponent { {item.name} - {item.inherited && - folderInfo && ( - - Inherited from folder{' '} - - {folderInfo.title} - {' '} - - )} + {item.inherited && folderInfo && ( + + Inherited from folder{' '} + + {folderInfo.title} + {' '} + + )} {inheritedFromRoot && Default Permission} Can diff --git a/public/app/core/components/json_explorer/helpers.ts b/public/app/core/components/json_explorer/helpers.ts index 65e7502a810..64f40ddcfb1 100644 --- a/public/app/core/components/json_explorer/helpers.ts +++ b/public/app/core/components/json_explorer/helpers.ts @@ -3,14 +3,14 @@ /* * Escapes `"` characters from string -*/ + */ function escapeString(str: string): string { return str.replace('"', '"'); } /* * Determines if a value is an object -*/ + */ export function isObject(value: any): boolean { const type = typeof value; return !!value && type === 'object'; @@ -20,7 +20,7 @@ export function isObject(value: any): boolean { * Gets constructor name of an object. * From http://stackoverflow.com/a/332429 * -*/ + */ export function getObjectName(object: object): string { if (object === undefined) { return ''; @@ -43,7 +43,7 @@ export function getObjectName(object: object): string { /* * Gets type of an object. Returns "null" for null objects -*/ + */ export function getType(object: object): string { if (object === null) { return 'null'; @@ -53,7 +53,7 @@ export function getType(object: object): string { /* * Generates inline preview for a JavaScript object based on a value -*/ + */ export function getValuePreview(object: object, value: string): string { const type = getType(object); @@ -78,7 +78,7 @@ export function getValuePreview(object: object, value: string): string { /* * Generates inline preview for a JavaScript object -*/ + */ let value = ''; export function getPreview(obj: object): string { if (isObject(obj)) { @@ -94,15 +94,15 @@ export function getPreview(obj: object): string { /* * Generates a prefixed CSS class name -*/ + */ export function cssClass(className: string): string { return `json-formatter-${className}`; } /* - * Creates a new DOM element with given type and class - * TODO: move me to helpers -*/ + * Creates a new DOM element with given type and class + * TODO: move me to helpers + */ export function createElement(type: string, className?: string, content?: Element | string): Element { const el = document.createElement(type); if (className) { diff --git a/public/app/core/components/json_explorer/json_explorer.ts b/public/app/core/components/json_explorer/json_explorer.ts index 228154f9884..e4c92f662b1 100644 --- a/public/app/core/components/json_explorer/json_explorer.ts +++ b/public/app/core/components/json_explorer/json_explorer.ts @@ -83,7 +83,7 @@ export class JsonExplorer { /* * is formatter open? - */ + */ private get isOpen(): boolean { if (this._isOpen !== null) { return this._isOpen; @@ -94,14 +94,14 @@ export class JsonExplorer { /* * set open state (from toggler) - */ + */ private set isOpen(value: boolean) { this._isOpen = value; } /* * is this a date string? - */ + */ private get isDate(): boolean { return ( this.type === 'string' && @@ -111,14 +111,14 @@ export class JsonExplorer { /* * is this a URL string? - */ + */ private get isUrl(): boolean { return this.type === 'string' && this.json.indexOf('http') === 0; } /* * is this an array? - */ + */ private get isArray(): boolean { return Array.isArray(this.json); } @@ -126,21 +126,21 @@ export class JsonExplorer { /* * is this an object? * Note: In this context arrays are object as well - */ + */ private get isObject(): boolean { return isObject(this.json); } /* * is this an empty object with no properties? - */ + */ private get isEmptyObject(): boolean { return !this.keys.length && !this.isArray; } /* * is this an empty object or array? - */ + */ private get isEmpty(): boolean { return this.isEmptyObject || (this.keys && !this.keys.length && this.isArray); } @@ -148,14 +148,14 @@ export class JsonExplorer { /* * did we receive a key argument? * This means that the formatter was called as a sub formatter of a parent formatter - */ + */ private get hasKey(): boolean { return typeof this.key !== 'undefined'; } /* * if this is an object, get constructor function name - */ + */ private get constructorName(): string { return getObjectName(this.json); } @@ -163,7 +163,7 @@ export class JsonExplorer { /* * get type of this value * Possible values: all JavaScript primitive types plus "array" and "null" - */ + */ private get type(): string { return getType(this.json); } @@ -171,7 +171,7 @@ export class JsonExplorer { /* * get object keys * If there is an empty key we pad it wit quotes to make it visible - */ + */ private get keys(): string[] { if (this.isObject) { return Object.keys(this.json).map(key => (key ? key : '""')); diff --git a/public/app/core/components/sidemenu/BottomNavLinks.tsx b/public/app/core/components/sidemenu/BottomNavLinks.tsx index 21c83864c62..e1665c9ebc5 100644 --- a/public/app/core/components/sidemenu/BottomNavLinks.tsx +++ b/public/app/core/components/sidemenu/BottomNavLinks.tsx @@ -47,7 +47,8 @@ class BottomNavLinks extends PureComponent {
Current Org:
- Switch + + Switch
diff --git a/public/app/core/components/sidemenu/SideMenu.tsx b/public/app/core/components/sidemenu/SideMenu.tsx index 29ef0fed069..1428ae181f5 100644 --- a/public/app/core/components/sidemenu/SideMenu.tsx +++ b/public/app/core/components/sidemenu/SideMenu.tsx @@ -29,7 +29,8 @@ export class SideMenu extends PureComponent {
-  Close + +  Close
, , diff --git a/public/app/core/utils/explore.ts b/public/app/core/utils/explore.ts index 913d8d1704f..9c6be4be242 100644 --- a/public/app/core/utils/explore.ts +++ b/public/app/core/utils/explore.ts @@ -153,7 +153,7 @@ export function buildQueryTransaction( }; } -export const clearQueryKeys: ((query: DataQuery) => object) = ({ key, refId, ...rest }) => rest; +export const clearQueryKeys: (query: DataQuery) => object = ({ key, refId, ...rest }) => rest; const isMetricSegment = (segment: { [key: string]: string }) => segment.hasOwnProperty('expr'); const isUISegment = (segment: { [key: string]: string }) => segment.hasOwnProperty('ui'); diff --git a/public/app/core/utils/kbn.ts b/public/app/core/utils/kbn.ts index 91a57c84090..887c30229d3 100644 --- a/public/app/core/utils/kbn.ts +++ b/public/app/core/utils/kbn.ts @@ -143,7 +143,7 @@ kbn.secondsToHhmmss = seconds => { }; kbn.to_percent = (nr, outof) => { - return Math.floor(nr / outof * 10000) / 100 + '%'; + return Math.floor((nr / outof) * 10000) / 100 + '%'; }; kbn.addslashes = str => { diff --git a/public/app/features/alerting/AlertRuleList.tsx b/public/app/features/alerting/AlertRuleList.tsx index d20c977273c..9b4ceac3acd 100644 --- a/public/app/features/alerting/AlertRuleList.tsx +++ b/public/app/features/alerting/AlertRuleList.tsx @@ -149,4 +149,9 @@ const mapDispatchToProps = { togglePauseAlertRule, }; -export default hot(module)(connect(mapStateToProps, mapDispatchToProps)(AlertRuleList)); +export default hot(module)( + connect( + mapStateToProps, + mapDispatchToProps + )(AlertRuleList) +); diff --git a/public/app/features/api-keys/ApiKeysPage.tsx b/public/app/features/api-keys/ApiKeysPage.tsx index e249fdeb7a8..4be5012a985 100644 --- a/public/app/features/api-keys/ApiKeysPage.tsx +++ b/public/app/features/api-keys/ApiKeysPage.tsx @@ -263,4 +263,9 @@ const mapDispatchToProps = { addApiKey, }; -export default hot(module)(connect(mapStateToProps, mapDispatchToProps)(ApiKeysPage)); +export default hot(module)( + connect( + mapStateToProps, + mapDispatchToProps + )(ApiKeysPage) +); diff --git a/public/app/features/dashboard/components/AddPanelWidget/_AddPanelWidget.scss b/public/app/features/dashboard/components/AddPanelWidget/_AddPanelWidget.scss index 288b2e7a410..8daf935d918 100644 --- a/public/app/features/dashboard/components/AddPanelWidget/_AddPanelWidget.scss +++ b/public/app/features/dashboard/components/AddPanelWidget/_AddPanelWidget.scss @@ -32,7 +32,7 @@ .add-panel-widget__title { font-size: $font-size-md; font-weight: $font-weight-semi-bold; - margin-right: $spacer*2; + margin-right: $spacer * 2; } .add-panel-widget__link { diff --git a/public/app/features/dashboard/components/DashNav/DashNav.tsx b/public/app/features/dashboard/components/DashNav/DashNav.tsx index 99ce3f904cd..453c5d1f9ac 100644 --- a/public/app/features/dashboard/components/DashNav/DashNav.tsx +++ b/public/app/features/dashboard/components/DashNav/DashNav.tsx @@ -267,4 +267,7 @@ const mapDispatchToProps = { updateLocation, }; -export default connect(mapStateToProps, mapDispatchToProps)(DashNav); +export default connect( + mapStateToProps, + mapDispatchToProps +)(DashNav); diff --git a/public/app/features/dashboard/containers/DashboardPage.tsx b/public/app/features/dashboard/containers/DashboardPage.tsx index bdb601a692f..c52774f7e0e 100644 --- a/public/app/features/dashboard/containers/DashboardPage.tsx +++ b/public/app/features/dashboard/containers/DashboardPage.tsx @@ -306,4 +306,9 @@ const mapDispatchToProps = { updateLocation, }; -export default hot(module)(connect(mapStateToProps, mapDispatchToProps)(DashboardPage)); +export default hot(module)( + connect( + mapStateToProps, + mapDispatchToProps + )(DashboardPage) +); diff --git a/public/app/features/dashboard/containers/SoloPanelPage.tsx b/public/app/features/dashboard/containers/SoloPanelPage.tsx index 6dcf2775547..30088d73cb5 100644 --- a/public/app/features/dashboard/containers/SoloPanelPage.tsx +++ b/public/app/features/dashboard/containers/SoloPanelPage.tsx @@ -107,4 +107,9 @@ const mapDispatchToProps = { initDashboard, }; -export default hot(module)(connect(mapStateToProps, mapDispatchToProps)(SoloPanelPage)); +export default hot(module)( + connect( + mapStateToProps, + mapDispatchToProps + )(SoloPanelPage) +); diff --git a/public/app/features/dashboard/dashgrid/PanelHeader/PanelHeaderCorner.tsx b/public/app/features/dashboard/dashgrid/PanelHeader/PanelHeaderCorner.tsx index ef2fb69358d..42b89bc1273 100644 --- a/public/app/features/dashboard/dashgrid/PanelHeader/PanelHeaderCorner.tsx +++ b/public/app/features/dashboard/dashgrid/PanelHeader/PanelHeaderCorner.tsx @@ -49,21 +49,20 @@ export class PanelHeaderCorner extends Component { return (
- {panel.links && - panel.links.length > 0 && ( -
    - {panel.links.map((link, idx) => { - const info = linkSrv.getPanelLinkAnchorInfo(link, panel.scopedVars); - return ( -
  • - - {info.title} - -
  • - ); - })} -
- )} + {panel.links && panel.links.length > 0 && ( +
    + {panel.links.map((link, idx) => { + const info = linkSrv.getPanelLinkAnchorInfo(link, panel.scopedVars); + return ( +
  • + + {info.title} + +
  • + ); + })} +
+ )}
); }; diff --git a/public/app/features/dashboard/services/TimeSrv.ts b/public/app/features/dashboard/services/TimeSrv.ts index 1f7bdae6b04..fb521d9b849 100644 --- a/public/app/features/dashboard/services/TimeSrv.ts +++ b/public/app/features/dashboard/services/TimeSrv.ts @@ -227,8 +227,8 @@ export class TimeSrv { const timespan = range.to.valueOf() - range.from.valueOf(); const center = range.to.valueOf() - timespan / 2; - const to = center + timespan * factor / 2; - const from = center - timespan * factor / 2; + const to = center + (timespan * factor) / 2; + const from = center - (timespan * factor) / 2; this.setTime({ from: moment.utc(from), to: moment.utc(to) }); } diff --git a/public/app/features/dashboard/state/DashboardMigrator.ts b/public/app/features/dashboard/state/DashboardMigrator.ts index c43f4c491c0..d7c63f834b1 100644 --- a/public/app/features/dashboard/state/DashboardMigrator.ts +++ b/public/app/features/dashboard/state/DashboardMigrator.ts @@ -487,7 +487,7 @@ export class DashboardMigrator { for (const panel of row.panels) { panel.span = panel.span || DEFAULT_PANEL_SPAN; if (panel.minSpan) { - panel.minSpan = Math.min(GRID_COLUMN_COUNT, GRID_COLUMN_COUNT / 12 * panel.minSpan); + panel.minSpan = Math.min(GRID_COLUMN_COUNT, (GRID_COLUMN_COUNT / 12) * panel.minSpan); } const panelWidth = Math.floor(panel.span) * widthFactor; const panelHeight = panel.height ? getGridHeight(panel.height) : rowGridHeight; diff --git a/public/app/features/datasources/DataSourceDashboards.tsx b/public/app/features/datasources/DataSourceDashboards.tsx index 89f5ddacc56..548145a79f5 100644 --- a/public/app/features/datasources/DataSourceDashboards.tsx +++ b/public/app/features/datasources/DataSourceDashboards.tsx @@ -98,4 +98,9 @@ const mapDispatchToProps = { removeDashboard, }; -export default hot(module)(connect(mapStateToProps, mapDispatchToProps)(DataSourceDashboards)); +export default hot(module)( + connect( + mapStateToProps, + mapDispatchToProps + )(DataSourceDashboards) +); diff --git a/public/app/features/datasources/DataSourcesListPage.tsx b/public/app/features/datasources/DataSourcesListPage.tsx index b0b2ee56169..09442f5739c 100644 --- a/public/app/features/datasources/DataSourcesListPage.tsx +++ b/public/app/features/datasources/DataSourcesListPage.tsx @@ -115,4 +115,9 @@ const mapDispatchToProps = { setDataSourcesLayoutMode, }; -export default hot(module)(connect(mapStateToProps, mapDispatchToProps)(DataSourcesListPage)); +export default hot(module)( + connect( + mapStateToProps, + mapDispatchToProps + )(DataSourcesListPage) +); diff --git a/public/app/features/datasources/NewDataSourcePage.tsx b/public/app/features/datasources/NewDataSourcePage.tsx index 6cec3254106..7b028a4e3ea 100644 --- a/public/app/features/datasources/NewDataSourcePage.tsx +++ b/public/app/features/datasources/NewDataSourcePage.tsx @@ -80,4 +80,9 @@ const mapDispatchToProps = { setDataSourceTypeSearchQuery, }; -export default hot(module)(connect(mapStateToProps, mapDispatchToProps)(NewDataSourcePage)); +export default hot(module)( + connect( + mapStateToProps, + mapDispatchToProps + )(NewDataSourcePage) +); diff --git a/public/app/features/datasources/settings/DataSourceSettingsPage.tsx b/public/app/features/datasources/settings/DataSourceSettingsPage.tsx index ba50c9430ba..01eea098ea4 100644 --- a/public/app/features/datasources/settings/DataSourceSettingsPage.tsx +++ b/public/app/features/datasources/settings/DataSourceSettingsPage.tsx @@ -259,4 +259,9 @@ const mapDispatchToProps = { setIsDefault, }; -export default hot(module)(connect(mapStateToProps, mapDispatchToProps)(DataSourceSettingsPage)); +export default hot(module)( + connect( + mapStateToProps, + mapDispatchToProps + )(DataSourceSettingsPage) +); diff --git a/public/app/features/explore/Explore.tsx b/public/app/features/explore/Explore.tsx index aca8f033fb3..52c3e258f4a 100644 --- a/public/app/features/explore/Explore.tsx +++ b/public/app/features/explore/Explore.tsx @@ -200,43 +200,42 @@ export class Explore extends React.PureComponent {
)} - {datasourceInstance && - !datasourceError && ( -
- - - {({ width }) => { - if (width === 0) { - return null; - } + {datasourceInstance && !datasourceError && ( +
+ + + {({ width }) => { + if (width === 0) { + return null; + } - return ( -
- - {showingStartPage && } - {!showingStartPage && ( - <> - {supportsGraph && !supportsLogs && } - {supportsTable && } - {supportsLogs && ( - - )} - - )} - -
- ); - }} -
-
- )} + return ( +
+ + {showingStartPage && } + {!showingStartPage && ( + <> + {supportsGraph && !supportsLogs && } + {supportsTable && } + {supportsLogs && ( + + )} + + )} + +
+ ); + }} +
+
+ )} ); } @@ -287,4 +286,9 @@ const mapDispatchToProps = { setQueries, }; -export default hot(module)(connect(mapStateToProps, mapDispatchToProps)(Explore)); +export default hot(module)( + connect( + mapStateToProps, + mapDispatchToProps + )(Explore) +); diff --git a/public/app/features/explore/ExploreToolbar.tsx b/public/app/features/explore/ExploreToolbar.tsx index adcd0c8afa8..6b49d7dcd91 100644 --- a/public/app/features/explore/ExploreToolbar.tsx +++ b/public/app/features/explore/ExploreToolbar.tsx @@ -193,4 +193,9 @@ const mapDispatchToProps: DispatchProps = { split: splitOpen, }; -export const ExploreToolbar = hot(module)(connect(mapStateToProps, mapDispatchToProps)(UnConnectedExploreToolbar)); +export const ExploreToolbar = hot(module)( + connect( + mapStateToProps, + mapDispatchToProps + )(UnConnectedExploreToolbar) +); diff --git a/public/app/features/explore/Graph.tsx b/public/app/features/explore/Graph.tsx index 3a641697781..7600d8725bc 100644 --- a/public/app/features/explore/Graph.tsx +++ b/public/app/features/explore/Graph.tsx @@ -217,11 +217,13 @@ export class Graph extends PureComponent { let series = [{ data: [[0, 0]] }]; if (data && data.length > 0) { - series = data.filter((ts: TimeSeries) => !hiddenSeries.has(ts.alias)).map((ts: TimeSeries) => ({ - color: ts.color, - label: ts.label, - data: ts.getFlotPairs('null'), - })); + series = data + .filter((ts: TimeSeries) => !hiddenSeries.has(ts.alias)) + .map((ts: TimeSeries) => ({ + color: ts.color, + label: ts.label, + data: ts.getFlotPairs('null'), + })); } this.dynamicOptions = this.getDynamicOptions(); @@ -242,17 +244,15 @@ export class Graph extends PureComponent { return ( <> - {this.props.data && - this.props.data.length > MAX_NUMBER_OF_TIME_SERIES && - !this.state.showAllTimeSeries && ( -
- - {`Showing only ${MAX_NUMBER_OF_TIME_SERIES} time series. `} - {`Show all ${ - this.props.data.length - }`} -
- )} + {this.props.data && this.props.data.length > MAX_NUMBER_OF_TIME_SERIES && !this.state.showAllTimeSeries && ( +
+ + {`Showing only ${MAX_NUMBER_OF_TIME_SERIES} time series. `} + {`Show all ${ + this.props.data.length + }`} +
+ )}
diff --git a/public/app/features/explore/GraphContainer.tsx b/public/app/features/explore/GraphContainer.tsx index 92aac41367c..161750143d9 100644 --- a/public/app/features/explore/GraphContainer.tsx +++ b/public/app/features/explore/GraphContainer.tsx @@ -70,4 +70,9 @@ const mapDispatchToProps = { changeTime, }; -export default hot(module)(connect(mapStateToProps, mapDispatchToProps)(GraphContainer)); +export default hot(module)( + connect( + mapStateToProps, + mapDispatchToProps + )(GraphContainer) +); diff --git a/public/app/features/explore/LogLabelStats.tsx b/public/app/features/explore/LogLabelStats.tsx index b0bd69170c5..d689b6e70b2 100644 --- a/public/app/features/explore/LogLabelStats.tsx +++ b/public/app/features/explore/LogLabelStats.tsx @@ -60,7 +60,9 @@ export class LogLabelStats extends PureComponent {
- {topRows.map(stat => )} + {topRows.map(stat => ( + + ))} {insertActiveRow && activeRow && } {otherCount > 0 && ( diff --git a/public/app/features/explore/LogMessageAnsi.tsx b/public/app/features/explore/LogMessageAnsi.tsx index ea751879c2e..bed28bc674d 100644 --- a/public/app/features/explore/LogMessageAnsi.tsx +++ b/public/app/features/explore/LogMessageAnsi.tsx @@ -61,15 +61,14 @@ export class LogMessageAnsi extends PureComponent { render() { const { chunks } = this.state; - return chunks.map( - (chunk, index) => - chunk.style ? ( - - {chunk.text} - - ) : ( - chunk.text - ) + return chunks.map((chunk, index) => + chunk.style ? ( + + {chunk.text} + + ) : ( + chunk.text + ) ); } } diff --git a/public/app/features/explore/LogRow.tsx b/public/app/features/explore/LogRow.tsx index d7ba0f8d12e..e5c3ec0558c 100644 --- a/public/app/features/explore/LogRow.tsx +++ b/public/app/features/explore/LogRow.tsx @@ -161,26 +161,23 @@ export class LogRow extends PureComponent { )}
{containsAnsiCodes && } - {!containsAnsiCodes && - parsed && ( - - )} - {!containsAnsiCodes && - !parsed && - needsHighlighter && ( - - )} + {!containsAnsiCodes && parsed && ( + + )} + {!containsAnsiCodes && !parsed && needsHighlighter && ( + + )} {!containsAnsiCodes && !parsed && !needsHighlighter && row.entry} {showFieldStats && (
diff --git a/public/app/features/explore/Logs.tsx b/public/app/features/explore/Logs.tsx index a20d8a2f19c..f8e833d9ee1 100644 --- a/public/app/features/explore/Logs.tsx +++ b/public/app/features/explore/Logs.tsx @@ -237,17 +237,16 @@ export default class Logs extends PureComponent {
- {hasData && - meta && ( -
- {meta.map(item => ( -
- {item.label}: - {renderMetaItem(item.value, item.kind)} -
- ))} -
- )} + {hasData && meta && ( +
+ {meta.map(item => ( +
+ {item.label}: + {renderMetaItem(item.value, item.kind)} +
+ ))} +
+ )}
{hasData && @@ -282,16 +281,14 @@ export default class Logs extends PureComponent { ))} {hasData && deferLogs && Rendering {dedupedData.rows.length} rows...}
- {!loading && - !hasData && - !scanning && ( -
- No logs found. - - Scan for older logs - -
- )} + {!loading && !hasData && !scanning && ( +
+ No logs found. + + Scan for older logs + +
+ )} {scanning && (
diff --git a/public/app/features/explore/LogsContainer.tsx b/public/app/features/explore/LogsContainer.tsx index f91b14175cb..6c2c5cd96e2 100644 --- a/public/app/features/explore/LogsContainer.tsx +++ b/public/app/features/explore/LogsContainer.tsx @@ -127,4 +127,9 @@ const mapDispatchToProps = { toggleLogLevelAction, }; -export default hot(module)(connect(mapStateToProps, mapDispatchToProps)(LogsContainer)); +export default hot(module)( + connect( + mapStateToProps, + mapDispatchToProps + )(LogsContainer) +); diff --git a/public/app/features/explore/QueryRow.tsx b/public/app/features/explore/QueryRow.tsx index 79901b15116..03ad8e7baa4 100644 --- a/public/app/features/explore/QueryRow.tsx +++ b/public/app/features/explore/QueryRow.tsx @@ -169,4 +169,9 @@ const mapDispatchToProps = { runQueries, }; -export default hot(module)(connect(mapStateToProps, mapDispatchToProps)(QueryRow)); +export default hot(module)( + connect( + mapStateToProps, + mapDispatchToProps + )(QueryRow) +); diff --git a/public/app/features/explore/TableContainer.tsx b/public/app/features/explore/TableContainer.tsx index e41d4a1eecb..e24ca070f2f 100644 --- a/public/app/features/explore/TableContainer.tsx +++ b/public/app/features/explore/TableContainer.tsx @@ -51,4 +51,9 @@ const mapDispatchToProps = { toggleTable, }; -export default hot(module)(connect(mapStateToProps, mapDispatchToProps)(TableContainer)); +export default hot(module)( + connect( + mapStateToProps, + mapDispatchToProps + )(TableContainer) +); diff --git a/public/app/features/explore/Wrapper.tsx b/public/app/features/explore/Wrapper.tsx index f64b2704b71..35d09cfd9bb 100644 --- a/public/app/features/explore/Wrapper.tsx +++ b/public/app/features/explore/Wrapper.tsx @@ -82,4 +82,9 @@ const mapDispatchToProps = { resetExploreAction, }; -export default hot(module)(connect(mapStateToProps, mapDispatchToProps)(Wrapper)); +export default hot(module)( + connect( + mapStateToProps, + mapDispatchToProps + )(Wrapper) +); diff --git a/public/app/features/folders/FolderPermissions.tsx b/public/app/features/folders/FolderPermissions.tsx index f564991f291..a3aae423b75 100644 --- a/public/app/features/folders/FolderPermissions.tsx +++ b/public/app/features/folders/FolderPermissions.tsx @@ -132,4 +132,9 @@ const mapDispatchToProps = { addFolderPermission, }; -export default hot(module)(connect(mapStateToProps, mapDispatchToProps)(FolderPermissions)); +export default hot(module)( + connect( + mapStateToProps, + mapDispatchToProps + )(FolderPermissions) +); diff --git a/public/app/features/folders/FolderSettingsPage.tsx b/public/app/features/folders/FolderSettingsPage.tsx index a4c2ee0f2d3..c82b9487840 100644 --- a/public/app/features/folders/FolderSettingsPage.tsx +++ b/public/app/features/folders/FolderSettingsPage.tsx @@ -113,4 +113,9 @@ const mapDispatchToProps = { deleteFolder, }; -export default hot(module)(connect(mapStateToProps, mapDispatchToProps)(FolderSettingsPage)); +export default hot(module)( + connect( + mapStateToProps, + mapDispatchToProps + )(FolderSettingsPage) +); diff --git a/public/app/features/org/OrgDetailsPage.tsx b/public/app/features/org/OrgDetailsPage.tsx index 236558db40a..d1bcfbc9268 100644 --- a/public/app/features/org/OrgDetailsPage.tsx +++ b/public/app/features/org/OrgDetailsPage.tsx @@ -65,4 +65,9 @@ const mapDispatchToProps = { updateOrganization, }; -export default hot(module)(connect(mapStateToProps, mapDispatchToProps)(OrgDetailsPage)); +export default hot(module)( + connect( + mapStateToProps, + mapDispatchToProps + )(OrgDetailsPage) +); diff --git a/public/app/features/plugins/PluginListPage.tsx b/public/app/features/plugins/PluginListPage.tsx index 5026b4426b7..cf8969f291f 100644 --- a/public/app/features/plugins/PluginListPage.tsx +++ b/public/app/features/plugins/PluginListPage.tsx @@ -81,4 +81,9 @@ const mapDispatchToProps = { setPluginsSearchQuery, }; -export default hot(module)(connect(mapStateToProps, mapDispatchToProps)(PluginListPage)); +export default hot(module)( + connect( + mapStateToProps, + mapDispatchToProps + )(PluginListPage) +); diff --git a/public/app/features/plugins/plugin_component.ts b/public/app/features/plugins/plugin_component.ts index 0b305e05f5b..23f736e0698 100644 --- a/public/app/features/plugins/plugin_component.ts +++ b/public/app/features/plugins/plugin_component.ts @@ -136,27 +136,29 @@ function pluginDirectiveLoader($compile, datasourceSrv, $rootScope, $q, $http, $ // Datasource ConfigCtrl case 'datasource-config-ctrl': { const dsMeta = scope.ctrl.datasourceMeta; - return importPluginModule(dsMeta.module).then((dsModule): any => { - if (!dsModule.ConfigCtrl) { - return { notFound: true }; + return importPluginModule(dsMeta.module).then( + (dsModule): any => { + if (!dsModule.ConfigCtrl) { + return { notFound: true }; + } + + scope.$watch( + 'ctrl.current', + () => { + scope.onModelChanged(scope.ctrl.current); + }, + true + ); + + return { + baseUrl: dsMeta.baseUrl, + name: 'ds-config-' + dsMeta.id, + bindings: { meta: '=', current: '=' }, + attrs: { meta: 'ctrl.datasourceMeta', current: 'ctrl.current' }, + Component: dsModule.ConfigCtrl, + }; } - - scope.$watch( - 'ctrl.current', - () => { - scope.onModelChanged(scope.ctrl.current); - }, - true - ); - - return { - baseUrl: dsMeta.baseUrl, - name: 'ds-config-' + dsMeta.id, - bindings: { meta: '=', current: '=' }, - attrs: { meta: 'ctrl.datasourceMeta', current: 'ctrl.current' }, - Component: dsModule.ConfigCtrl, - }; - }); + ); } // AppConfigCtrl case 'app-config-ctrl': { diff --git a/public/app/features/teams/TeamGroupSync.tsx b/public/app/features/teams/TeamGroupSync.tsx index 3c90af74647..363fc2f2ccc 100644 --- a/public/app/features/teams/TeamGroupSync.tsx +++ b/public/app/features/teams/TeamGroupSync.tsx @@ -116,26 +116,25 @@ export class TeamGroupSync extends PureComponent {
- {groups.length === 0 && - !isAdding && ( -
-
There are no external groups to sync with
- -
- {headerTooltip} - - Learn more - -
+ {groups.length === 0 && !isAdding && ( +
+
There are no external groups to sync with
+ +
+ {headerTooltip} + + Learn more +
- )} +
+ )} {groups.length > 0 && (
@@ -167,4 +166,7 @@ const mapDispatchToProps = { removeTeamGroup, }; -export default connect(mapStateToProps, mapDispatchToProps)(TeamGroupSync); +export default connect( + mapStateToProps, + mapDispatchToProps +)(TeamGroupSync); diff --git a/public/app/features/teams/TeamList.tsx b/public/app/features/teams/TeamList.tsx index 06d7d4d65a2..60921a3378b 100644 --- a/public/app/features/teams/TeamList.tsx +++ b/public/app/features/teams/TeamList.tsx @@ -161,4 +161,9 @@ const mapDispatchToProps = { setSearchQuery, }; -export default hot(module)(connect(mapStateToProps, mapDispatchToProps)(TeamList)); +export default hot(module)( + connect( + mapStateToProps, + mapDispatchToProps + )(TeamList) +); diff --git a/public/app/features/teams/TeamMembers.tsx b/public/app/features/teams/TeamMembers.tsx index 643b51b07bd..e5c3aaafef0 100644 --- a/public/app/features/teams/TeamMembers.tsx +++ b/public/app/features/teams/TeamMembers.tsx @@ -62,7 +62,9 @@ export class TeamMembers extends PureComponent { return ( - {labels.map(label => {}} />)} + {labels.map(label => ( + {}} /> + ))} ); } @@ -156,4 +158,7 @@ const mapDispatchToProps = { setSearchMemberQuery, }; -export default connect(mapStateToProps, mapDispatchToProps)(TeamMembers); +export default connect( + mapStateToProps, + mapDispatchToProps +)(TeamMembers); diff --git a/public/app/features/teams/TeamPages.tsx b/public/app/features/teams/TeamPages.tsx index 235936aa8f5..15adc8b3856 100644 --- a/public/app/features/teams/TeamPages.tsx +++ b/public/app/features/teams/TeamPages.tsx @@ -108,4 +108,9 @@ const mapDispatchToProps = { loadTeam, }; -export default hot(module)(connect(mapStateToProps, mapDispatchToProps)(TeamPages)); +export default hot(module)( + connect( + mapStateToProps, + mapDispatchToProps + )(TeamPages) +); diff --git a/public/app/features/teams/TeamSettings.tsx b/public/app/features/teams/TeamSettings.tsx index 8d77cd32017..2187be4fcc2 100644 --- a/public/app/features/teams/TeamSettings.tsx +++ b/public/app/features/teams/TeamSettings.tsx @@ -98,4 +98,7 @@ const mapDispatchToProps = { updateTeam, }; -export default connect(mapStateToProps, mapDispatchToProps)(TeamSettings); +export default connect( + mapStateToProps, + mapDispatchToProps +)(TeamSettings); diff --git a/public/app/features/templating/variable_srv.ts b/public/app/features/templating/variable_srv.ts index ee7215e310a..f4d95721846 100644 --- a/public/app/features/templating/variable_srv.ts +++ b/public/app/features/templating/variable_srv.ts @@ -54,15 +54,17 @@ export class VariableSrv { onTimeRangeUpdated(timeRange: TimeRange) { this.templateSrv.updateTimeRange(timeRange); - const promises = this.variables.filter(variable => variable.refresh === 2).map(variable => { - const previousOptions = variable.options.slice(); + const promises = this.variables + .filter(variable => variable.refresh === 2) + .map(variable => { + const previousOptions = variable.options.slice(); - return variable.updateOptions().then(() => { - if (angular.toJson(previousOptions) !== angular.toJson(variable.options)) { - this.dashboard.templateVariableValueUpdated(); - } + return variable.updateOptions().then(() => { + if (angular.toJson(previousOptions) !== angular.toJson(variable.options)) { + this.dashboard.templateVariableValueUpdated(); + } + }); }); - }); return this.$q.all(promises).then(() => { this.dashboard.startRefresh(); diff --git a/public/app/features/users/InviteeRow.tsx b/public/app/features/users/InviteeRow.tsx index d75ffb790f3..fd9ff32fbdd 100644 --- a/public/app/features/users/InviteeRow.tsx +++ b/public/app/features/users/InviteeRow.tsx @@ -52,6 +52,9 @@ const mapDispatchToProps = { revokeInvite, }; -export default connect(() => { - return {}; -}, mapDispatchToProps)(InviteeRow); +export default connect( + () => { + return {}; + }, + mapDispatchToProps +)(InviteeRow); diff --git a/public/app/features/users/UsersActionBar.tsx b/public/app/features/users/UsersActionBar.tsx index bfeadba7396..00c579978f9 100644 --- a/public/app/features/users/UsersActionBar.tsx +++ b/public/app/features/users/UsersActionBar.tsx @@ -92,4 +92,7 @@ const mapDispatchToProps = { setUsersSearchQuery, }; -export default connect(mapStateToProps, mapDispatchToProps)(UsersActionBar); +export default connect( + mapStateToProps, + mapDispatchToProps +)(UsersActionBar); diff --git a/public/app/features/users/UsersListPage.tsx b/public/app/features/users/UsersListPage.tsx index 5a2f4b2e441..cb8fdf52790 100644 --- a/public/app/features/users/UsersListPage.tsx +++ b/public/app/features/users/UsersListPage.tsx @@ -138,4 +138,9 @@ const mapDispatchToProps = { removeUser, }; -export default hot(module)(connect(mapStateToProps, mapDispatchToProps)(UsersListPage)); +export default hot(module)( + connect( + mapStateToProps, + mapDispatchToProps + )(UsersListPage) +); diff --git a/public/app/plugins/datasource/grafana-azure-monitor-datasource/annotations_query_ctrl.ts b/public/app/plugins/datasource/grafana-azure-monitor-datasource/annotations_query_ctrl.ts index 8d9df1d13f3..7b46ee7b9fd 100644 --- a/public/app/plugins/datasource/grafana-azure-monitor-datasource/annotations_query_ctrl.ts +++ b/public/app/plugins/datasource/grafana-azure-monitor-datasource/annotations_query_ctrl.ts @@ -4,7 +4,8 @@ export class AzureMonitorAnnotationsQueryCtrl { annotation: any; workspaces: any[]; - defaultQuery = '\n| where $__timeFilter() \n| project TimeGenerated, Text=YourTitleColumn, Tags="tag1,tag2"'; + defaultQuery = + '\n| where $__timeFilter() \n| project TimeGenerated, Text=YourTitleColumn, Tags="tag1,tag2"'; /** @ngInject */ constructor() { diff --git a/public/app/plugins/datasource/grafana-azure-monitor-datasource/editor/query_field.tsx b/public/app/plugins/datasource/grafana-azure-monitor-datasource/editor/query_field.tsx index f24fd9e9dd1..9162a56e3ea 100644 --- a/public/app/plugins/datasource/grafana-azure-monitor-datasource/editor/query_field.tsx +++ b/public/app/plugins/datasource/grafana-azure-monitor-datasource/editor/query_field.tsx @@ -311,8 +311,8 @@ class QueryField extends React.Component { let selectedIndex = Math.max(this.state.typeaheadIndex, 0); const flattenedSuggestions = flattenSuggestions(suggestions); selectedIndex = selectedIndex % flattenedSuggestions.length || 0; - const selectedKeys = (flattenedSuggestions.length > 0 ? [flattenedSuggestions[selectedIndex]] : []).map( - i => (typeof i === 'object' ? i.text : i) + const selectedKeys = (flattenedSuggestions.length > 0 ? [flattenedSuggestions[selectedIndex]] : []).map(i => + typeof i === 'object' ? i.text : i ); // Create typeahead in DOM root so we can later position it absolutely diff --git a/public/app/plugins/datasource/influxdb/datasource.ts b/public/app/plugins/datasource/influxdb/datasource.ts index 4e4c3feaebd..494bda2dcd0 100644 --- a/public/app/plugins/datasource/influxdb/datasource.ts +++ b/public/app/plugins/datasource/influxdb/datasource.ts @@ -78,46 +78,48 @@ export default class InfluxDatasource { // replace templated variables allQueries = this.templateSrv.replace(allQueries, scopedVars); - return this._seriesQuery(allQueries, options).then((data): any => { - if (!data || !data.results) { - return []; - } - - const seriesList = []; - for (i = 0; i < data.results.length; i++) { - const result = data.results[i]; - if (!result || !result.series) { - continue; + return this._seriesQuery(allQueries, options).then( + (data): any => { + if (!data || !data.results) { + return []; } - const target = queryTargets[i]; - let alias = target.alias; - if (alias) { - alias = this.templateSrv.replace(target.alias, options.scopedVars); - } - - const influxSeries = new InfluxSeries({ - series: data.results[i].series, - alias: alias, - }); - - switch (target.resultFormat) { - case 'table': { - seriesList.push(influxSeries.getTable()); - break; + const seriesList = []; + for (i = 0; i < data.results.length; i++) { + const result = data.results[i]; + if (!result || !result.series) { + continue; } - default: { - const timeSeries = influxSeries.getTimeSeries(); - for (y = 0; y < timeSeries.length; y++) { - seriesList.push(timeSeries[y]); + + const target = queryTargets[i]; + let alias = target.alias; + if (alias) { + alias = this.templateSrv.replace(target.alias, options.scopedVars); + } + + const influxSeries = new InfluxSeries({ + series: data.results[i].series, + alias: alias, + }); + + switch (target.resultFormat) { + case 'table': { + seriesList.push(influxSeries.getTable()); + break; + } + default: { + const timeSeries = influxSeries.getTimeSeries(); + for (y = 0; y < timeSeries.length; y++) { + seriesList.push(timeSeries[y]); + } + break; } - break; } } - } - return { data: seriesList }; - }); + return { data: seriesList }; + } + ); } annotationQuery(options) { diff --git a/public/app/plugins/datasource/prometheus/components/PromQueryField.tsx b/public/app/plugins/datasource/prometheus/components/PromQueryField.tsx index 01cd8c02fbd..2ff720a1a04 100644 --- a/public/app/plugins/datasource/prometheus/components/PromQueryField.tsx +++ b/public/app/plugins/datasource/prometheus/components/PromQueryField.tsx @@ -38,15 +38,17 @@ export function groupMetricsByPrefix(metrics: string[], delimiter = '_'): Cascad const metricsOptions = _.chain(metrics) .filter(metric => !ruleRegex.test(metric)) .groupBy(metric => metric.split(delimiter)[0]) - .map((metricsForPrefix: string[], prefix: string): CascaderOption => { - const prefixIsMetric = metricsForPrefix.length === 1 && metricsForPrefix[0] === prefix; - const children = prefixIsMetric ? [] : metricsForPrefix.sort().map(m => ({ label: m, value: m })); - return { - children, - label: prefix, - value: prefix, - }; - }) + .map( + (metricsForPrefix: string[], prefix: string): CascaderOption => { + const prefixIsMetric = metricsForPrefix.length === 1 && metricsForPrefix[0] === prefix; + const children = prefixIsMetric ? [] : metricsForPrefix.sort().map(m => ({ label: m, value: m })); + return { + children, + label: prefix, + value: prefix, + }; + } + ) .sortBy('label') .value(); diff --git a/public/app/plugins/datasource/prometheus/datasource.ts b/public/app/plugins/datasource/prometheus/datasource.ts index be62bd3b9f0..a4f4ceb55d7 100644 --- a/public/app/plugins/datasource/prometheus/datasource.ts +++ b/public/app/plugins/datasource/prometheus/datasource.ts @@ -487,13 +487,15 @@ export function alignRange(start, end, step) { export function extractRuleMappingFromGroups(groups: any[]) { return groups.reduce( (mapping, group) => - group.rules.filter(rule => rule.type === 'recording').reduce( - (acc, rule) => ({ - ...acc, - [rule.name]: rule.query, - }), - mapping - ), + group.rules + .filter(rule => rule.type === 'recording') + .reduce( + (acc, rule) => ({ + ...acc, + [rule.name]: rule.query, + }), + mapping + ), {} ); } diff --git a/public/app/plugins/datasource/stackdriver/components/Help.tsx b/public/app/plugins/datasource/stackdriver/components/Help.tsx index 8e1acdef7fc..7c11d3e7277 100644 --- a/public/app/plugins/datasource/stackdriver/components/Help.tsx +++ b/public/app/plugins/datasource/stackdriver/components/Help.tsx @@ -57,18 +57,18 @@ export class Help extends React.Component {
- {rawQuery && - displaRawQuery && ( -
-
{rawQuery}
-
- )} + {rawQuery && displaRawQuery && ( +
+
{rawQuery}
+
+ )} {displayHelp && (
               
Alias Patterns
Format the legend keys any way you want by using alias patterns. Format the legend - keys any way you want by using alias patterns.

+ keys any way you want by using alias patterns. +

Example: {`${'{{metricDescriptor.name}} - {{metricDescriptor.label.instance_name}}'}`}
diff --git a/public/app/plugins/datasource/stackdriver/components/Metrics.tsx b/public/app/plugins/datasource/stackdriver/components/Metrics.tsx index 39a0c45cca1..06094d0c1e9 100644 --- a/public/app/plugins/datasource/stackdriver/components/Metrics.tsx +++ b/public/app/plugins/datasource/stackdriver/components/Metrics.tsx @@ -92,12 +92,14 @@ export class Metrics extends React.Component { if (!selectedMetricDescriptor) { return []; } - const metricsByService = metricDescriptors.filter(m => m.service === selectedMetricDescriptor.service).map(m => ({ - service: m.service, - value: m.type, - label: m.displayName, - description: m.description, - })); + const metricsByService = metricDescriptors + .filter(m => m.service === selectedMetricDescriptor.service) + .map(m => ({ + service: m.service, + value: m.type, + label: m.displayName, + description: m.description, + })); return metricsByService; } @@ -105,12 +107,14 @@ export class Metrics extends React.Component { const { metricDescriptors } = this.state; const { templateSrv, metricType } = this.props; - const metrics = metricDescriptors.filter(m => m.service === templateSrv.replace(service)).map(m => ({ - service: m.service, - value: m.type, - label: m.displayName, - description: m.description, - })); + const metrics = metricDescriptors + .filter(m => m.service === templateSrv.replace(service)) + .map(m => ({ + service: m.service, + value: m.type, + label: m.displayName, + description: m.description, + })); this.setState({ service, metrics }); diff --git a/public/app/plugins/datasource/stackdriver/components/VariableQueryEditor.tsx b/public/app/plugins/datasource/stackdriver/components/VariableQueryEditor.tsx index be06c71c289..5c8eaf5b5b8 100644 --- a/public/app/plugins/datasource/stackdriver/components/VariableQueryEditor.tsx +++ b/public/app/plugins/datasource/stackdriver/components/VariableQueryEditor.tsx @@ -58,7 +58,7 @@ export class StackdriverVariableQueryEditor extends PureComponent * { - margin-right: $spacer*2; + margin-right: $spacer * 2; } } diff --git a/public/sass/components/_panel_text.scss b/public/sass/components/_panel_text.scss index 8b137891791..e69de29bb2d 100644 --- a/public/sass/components/_panel_text.scss +++ b/public/sass/components/_panel_text.scss @@ -1 +0,0 @@ - diff --git a/public/sass/components/_search.scss b/public/sass/components/_search.scss index eba03283510..4408d8f66e6 100644 --- a/public/sass/components/_search.scss +++ b/public/sass/components/_search.scss @@ -77,7 +77,7 @@ .search-filter-box { background: $search-filter-box-bg; border-radius: 2px; - padding: $spacer*1.5; + padding: $spacer * 1.5; min-width: 340px; margin-bottom: $spacer * 1.5; } @@ -259,7 +259,7 @@ .search-button-row { text-align: center; - padding: $spacer*2 $spacer; + padding: $spacer * 2 $spacer; background: $panel-bg; } diff --git a/public/sass/components/_tabbed_view.scss b/public/sass/components/_tabbed_view.scss index a47d9d65ceb..6abadfa465b 100644 --- a/public/sass/components/_tabbed_view.scss +++ b/public/sass/components/_tabbed_view.scss @@ -20,7 +20,7 @@ .tabbed-view-title { float: left; padding-top: 0.5rem; - margin: 0 $spacer*3 0 0; + margin: 0 $spacer * 3 0 0; } .tabbed-view-panel-title { @@ -45,7 +45,7 @@ } .tabbed-view-body { - padding: $spacer*2 $spacer $spacer $spacer; + padding: $spacer * 2 $spacer $spacer $spacer; display: flex; flex-direction: column; flex: 1; diff --git a/public/sass/components/edit_sidemenu.scss b/public/sass/components/edit_sidemenu.scss index 8d60851b4d3..5204c9f5d33 100644 --- a/public/sass/components/edit_sidemenu.scss +++ b/public/sass/components/edit_sidemenu.scss @@ -9,7 +9,7 @@ } .edit-sidemenu-aside { - margin-right: $spacer*2; + margin-right: $spacer * 2; } .edit-sidemenu { diff --git a/public/sass/layout/_page.scss b/public/sass/layout/_page.scss index 425cbc903c0..1711e40d0c1 100644 --- a/public/sass/layout/_page.scss +++ b/public/sass/layout/_page.scss @@ -39,8 +39,8 @@ width: 100%; margin-left: auto; margin-right: auto; - padding-left: $spacer*2; - padding-right: $spacer*2; + padding-left: $spacer * 2; + padding-right: $spacer * 2; max-width: 980px; @include clearfix(); } @@ -93,7 +93,7 @@ } .page-body { - padding-top: $spacer*2; + padding-top: $spacer * 2; } .page-heading { @@ -164,5 +164,5 @@ } .page-sidebar-section { - margin-bottom: $spacer*2; + margin-bottom: $spacer * 2; } diff --git a/public/sass/mixins/_buttons.scss b/public/sass/mixins/_buttons.scss index 8561a03d02b..2b2aa8bd049 100644 --- a/public/sass/mixins/_buttons.scss +++ b/public/sass/mixins/_buttons.scss @@ -1,6 +1,6 @@ // Button backgrounds // ------------------ -@mixin buttonBackground($startColor, $endColor, $text-color: #fff, $textShadow: 0px 1px 0 rgba(0,0,0,0.1)) { +@mixin buttonBackground($startColor, $endColor, $text-color: #fff, $textShadow: 0px 1px 0 rgba(0, 0, 0, 0.1)) { // gradientBar will set the background to a pleasing blend of these, to support IE<=9 @include gradientBar($startColor, $endColor, $text-color, $textShadow); diff --git a/public/sass/mixins/_drop_element.scss b/public/sass/mixins/_drop_element.scss index eb354b219fc..1e3f743f654 100644 --- a/public/sass/mixins/_drop_element.scss +++ b/public/sass/mixins/_drop_element.scss @@ -41,7 +41,7 @@ &:before { top: 100%; left: 50%; - margin-left: - $popover-arrow-size; + margin-left: -$popover-arrow-size; border-top-color: $border-color; } } @@ -52,7 +52,7 @@ &:before { bottom: 100%; left: 50%; - margin-left: - $popover-arrow-size; + margin-left: -$popover-arrow-size; border-bottom-color: $border-color; } } @@ -63,7 +63,7 @@ &:before { left: 100%; top: 50%; - margin-top: - $popover-arrow-size; + margin-top: -$popover-arrow-size; border-left-color: $border-color; } } @@ -74,14 +74,14 @@ &:before { right: 100%; top: 50%; - margin-top: - $popover-arrow-size; + margin-top: -$popover-arrow-size; border-right-color: $border-color; } } // Target middle/center, element corner &.drop-element-attached-left.drop-target-attached-center .drop-content { - left: - $popover-arrow-size * 2; + left: -$popover-arrow-size * 2; } &.drop-element-attached-right.drop-target-attached-center .drop-content { diff --git a/public/sass/mixins/_mixins.scss b/public/sass/mixins/_mixins.scss index b6b028b7c87..89285cc2496 100644 --- a/public/sass/mixins/_mixins.scss +++ b/public/sass/mixins/_mixins.scss @@ -278,7 +278,7 @@ } // Gradient Bar Colors for buttons and alerts -@mixin gradientBar($primaryColor, $secondaryColor, $text-color: #fff, $textShadow: 0 -1px 0 rgba(0,0,0,0.25)) { +@mixin gradientBar($primaryColor, $secondaryColor, $text-color: #fff, $textShadow: 0 -1px 0 rgba(0, 0, 0, 0.25)) { color: $text-color; text-shadow: $textShadow; @include gradient-vertical($primaryColor, $secondaryColor); diff --git a/public/sass/pages/_explore.scss b/public/sass/pages/_explore.scss index 9b8f18e8681..90579ff67ad 100644 --- a/public/sass/pages/_explore.scss +++ b/public/sass/pages/_explore.scss @@ -452,7 +452,7 @@ // TODO Experimental .cheat-sheet-item { - margin: 2*$panel-margin 0; + margin: 2 * $panel-margin 0; width: 50%; } diff --git a/yarn.lock b/yarn.lock index 9b98595ac51..7ffb68ed4a2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13500,10 +13500,10 @@ preserve@^0.2.0: resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks= -prettier@1.9.2: - version "1.9.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.9.2.tgz#96bc2132f7a32338e6078aeb29727178c6335827" - integrity sha512-piXx9N2WT8hWb7PBbX1glAuJVIkEyUV9F5fMXFINpZ0x3otVOFKKeGmeuiclFJlP/UrgTckyV606VjH2rNK4bw== +prettier@1.16.4: + version "1.16.4" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.16.4.tgz#73e37e73e018ad2db9c76742e2647e21790c9717" + integrity sha512-ZzWuos7TI5CKUeQAtFd6Zhm2s6EpAD/ZLApIhsF9pRvRtM1RFo61dM/4MSRUA0SuLugA/zgrZD8m0BaY46Og7g== prettier@^1.12.1: version "1.16.1"