Fixed indentation.

This commit is contained in:
Filip Barl
2017-10-17 11:14:39 +02:00
parent 510d6447df
commit dfe4944ec7
7 changed files with 34 additions and 14 deletions

View File

@@ -36,5 +36,22 @@
"react/prefer-stateless-function": 0,
"react/sort-comp": 0,
"react/prop-types": 0,
"function-paren-newline": 0,
"jsx-a11y/anchor-is-valid": 0,
"jsx-a11y/click-events-have-key-events": 0,
"jsx-a11y/label-has-for": 0,
"jsx-a11y/mouse-events-have-key-events": 0,
"jsx-a11y/no-noninteractive-element-interactions": 0,
"no-multi-spaces": 0,
"no-restricted-globals": 0,
"object-curly-newline": 0,
"padded-blocks": 0,
"prefer-destructuring": 0,
"react/default-props-match-prop-types": 0,
"react/jsx-closing-tag-location": 0,
"react/jsx-max-props-per-line": 0,
"react/jsx-wrap-multilines": 0,
"spaced-comment": 0,
}
}

View File

@@ -778,6 +778,7 @@ export function resetLocalViewState() {
return (dispatch) => {
dispatch({type: ActionTypes.RESET_LOCAL_VIEW_STATE});
storageSet('scopeViewState', '');
// eslint-disable-next-line prefer-destructuring
window.location.href = window.location.href.split('#')[0];
};
}

View File

@@ -1,8 +1,7 @@
import React from 'react';
import classnames from 'classnames';
export default function NodesError({children, faIconClass, hidden,
mainClassName = 'nodes-chart-error'}) {
const NodesError = ({ children, faIconClass, hidden, mainClassName = 'nodes-chart-error'}) => {
const className = classnames(mainClassName, {
hide: hidden
});
@@ -18,4 +17,6 @@ export default function NodesError({children, faIconClass, hidden,
{children}
</div>
);
}
};
export default NodesError;

View File

@@ -21,7 +21,7 @@ const CloudLink = ({ alwaysShow, ...props }) => (
<CloudFeature alwaysShow={alwaysShow}>
<LinkWrapper {...props} />
</CloudFeature>
);
);
class LinkWrapper extends React.Component {
constructor(props, context) {

View File

@@ -87,8 +87,8 @@ class NodeDetails extends React.Component {
// caused by a bug having to do with animating the details panel).
const spinnerClassName = classNames('fa fa-circle-o-notch', { 'fa-spin': this.props.mounted });
const nodeColor = (node ?
getNodeColorDark(node.get('rank'), label, node.get('pseudo')) :
getNeutralColor());
getNodeColorDark(node.get('rank'), label, node.get('pseudo')) :
getNeutralColor());
const tools = this.renderTools();
const styles = {
header: {

View File

@@ -13,14 +13,14 @@ export const activeTopologyZoomCacheKeyPathSelector = createSelector(
state => JSON.stringify(activeTopologyOptionsSelector(state)),
],
(isGraphViewMode, viewMode, topologyId, pinnedMetricType, topologyOptions) => (
isGraphViewMode ?
isGraphViewMode
// In graph view, selecting different options/filters produces a different layout.
['zoomCache', viewMode, topologyId, topologyOptions] :
? ['zoomCache', viewMode, topologyId, topologyOptions]
// Otherwise we're in the resource view where the options are hidden (for now),
// but pinning different metrics can result in very different layouts.
// TODO: Take `topologyId` into account once the resource
// view layouts start differing between the topologies.
['zoomCache', viewMode, pinnedMetricType]
: ['zoomCache', viewMode, pinnedMetricType]
)
);

View File

@@ -197,11 +197,12 @@ function getNodesForTopologies(state, dispatch, topologyIds, topologyOptions = m
// fetch sequentially
state.get('topologyUrlsById')
.filter((_, topologyId) => topologyIds.contains(topologyId))
.reduce((sequence, topologyUrl, topologyId) => sequence.then(() => {
const optionsQuery = buildUrlQuery(topologyOptions.get(topologyId), state);
return doRequest({ url: `${getApiPath()}${topologyUrl}?${optionsQuery}` });
})
.then(json => dispatch(receiveNodesForTopology(json.nodes, topologyId))),
.reduce((sequence, topologyUrl, topologyId) => sequence
.then(() => {
const optionsQuery = buildUrlQuery(topologyOptions.get(topologyId), state);
return doRequest({ url: `${getApiPath()}${topologyUrl}?${optionsQuery}` });
})
.then(json => dispatch(receiveNodesForTopology(json.nodes, topologyId))),
Promise.resolve());
}