mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-02 17:50:39 +00:00
Fixed indentation.
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -21,7 +21,7 @@ const CloudLink = ({ alwaysShow, ...props }) => (
|
||||
<CloudFeature alwaysShow={alwaysShow}>
|
||||
<LinkWrapper {...props} />
|
||||
</CloudFeature>
|
||||
);
|
||||
);
|
||||
|
||||
class LinkWrapper extends React.Component {
|
||||
constructor(props, context) {
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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]
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user