style: lint
This commit is contained in:
parent
9df5afc607
commit
19b1176435
@ -4,12 +4,7 @@ import styled from 'styled-components';
|
|||||||
import remcalc from 'remcalc';
|
import remcalc from 'remcalc';
|
||||||
import { EEditor } from './editors';
|
import { EEditor } from './editors';
|
||||||
|
|
||||||
import {
|
import { FormGroup, Input, Button, Card } from 'joyent-ui-toolkit';
|
||||||
FormGroup,
|
|
||||||
Input,
|
|
||||||
Button,
|
|
||||||
Card
|
|
||||||
} from 'joyent-ui-toolkit';
|
|
||||||
|
|
||||||
const FilenameContainer = styled.span`
|
const FilenameContainer = styled.span`
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { Row, Col } from 'react-styled-flexboxgrid';
|
||||||
|
import remcalc from 'remcalc';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
FormMeta,
|
FormMeta,
|
||||||
Button,
|
Button,
|
||||||
@ -7,9 +10,6 @@ import {
|
|||||||
Small,
|
Small,
|
||||||
FormGroup
|
FormGroup
|
||||||
} from 'joyent-ui-toolkit';
|
} from 'joyent-ui-toolkit';
|
||||||
import { Row, Col } from 'react-styled-flexboxgrid';
|
|
||||||
import remcalc from 'remcalc';
|
|
||||||
import { Field } from 'redux-form';
|
|
||||||
|
|
||||||
const ButtonsRow = Row.extend`margin: ${remcalc(29)} 0 ${remcalc(60)} 0;`;
|
const ButtonsRow = Row.extend`margin: ${remcalc(29)} 0 ${remcalc(60)} 0;`;
|
||||||
|
|
||||||
|
@ -20,12 +20,7 @@ import DeploymentGroupConfigQuery from '@graphql/DeploymentGroupConfig.gql';
|
|||||||
|
|
||||||
import { client } from '@state/store';
|
import { client } from '@state/store';
|
||||||
import { ErrorMessage } from '@components/messaging';
|
import { ErrorMessage } from '@components/messaging';
|
||||||
import {
|
import { Environment, Name, Review, Manifest } from '@components/manifest';
|
||||||
Environment,
|
|
||||||
Name,
|
|
||||||
Review,
|
|
||||||
Manifest
|
|
||||||
} from '@components/manifest';
|
|
||||||
|
|
||||||
const INTERPOLATE_REGEX = /\$([_a-z][_a-z0-9]*)/gi;
|
const INTERPOLATE_REGEX = /\$([_a-z][_a-z0-9]*)/gi;
|
||||||
|
|
||||||
@ -405,7 +400,11 @@ class DeploymentGroupEditOrCreate extends Component {
|
|||||||
const { dataCenter } = this.props;
|
const { dataCenter } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<NameForm dataCenter={dataCenter} onSubmit={this.handleNameSubmit} onCancel={this.handleCancel} />
|
<NameForm
|
||||||
|
dataCenter={dataCenter}
|
||||||
|
onSubmit={this.handleNameSubmit}
|
||||||
|
onCancel={this.handleCancel}
|
||||||
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,11 +177,12 @@ const processServicesForTopology = services => {
|
|||||||
// metricsData should prob be an array rather than an object
|
// metricsData should prob be an array rather than an object
|
||||||
const processInstancesMetrics = instances =>
|
const processInstancesMetrics = instances =>
|
||||||
forceArray(instances).reduce((metrics, instance) => {
|
forceArray(instances).reduce((metrics, instance) => {
|
||||||
instance.metrics && instance.metrics.forEach(instanceMetrics => {
|
instance.metrics &&
|
||||||
metrics[instanceMetrics.name] = forceArray(
|
instance.metrics.forEach(instanceMetrics => {
|
||||||
metrics[instanceMetrics.name]
|
metrics[instanceMetrics.name] = forceArray(
|
||||||
).concat([instanceMetrics]);
|
metrics[instanceMetrics.name]
|
||||||
});
|
).concat([instanceMetrics]);
|
||||||
|
});
|
||||||
|
|
||||||
return metrics;
|
return metrics;
|
||||||
}, {});
|
}, {});
|
||||||
|
@ -9,7 +9,6 @@ import { Store, files } from '../../mocks';
|
|||||||
|
|
||||||
import { Files } from '@components/manifest';
|
import { Files } from '@components/manifest';
|
||||||
|
|
||||||
|
|
||||||
it('renders <Files /> without throwing', () => {
|
it('renders <Files /> without throwing', () => {
|
||||||
const tree = renderer
|
const tree = renderer
|
||||||
.create(
|
.create(
|
||||||
|
@ -32,15 +32,15 @@ it('renders <Manifest /> without throwing', () => {
|
|||||||
it('renders <Manifest /> without throwing', () => {
|
it('renders <Manifest /> without throwing', () => {
|
||||||
const renderer = new ShallowRenderer();
|
const renderer = new ShallowRenderer();
|
||||||
renderer.render(
|
renderer.render(
|
||||||
<Store>
|
<Store>
|
||||||
<ManifestTestForm
|
<ManifestTestForm
|
||||||
defaultValue="test"
|
defaultValue="test"
|
||||||
handleSubmit={() => {}}
|
handleSubmit={() => {}}
|
||||||
onCancel={() => {}}
|
onCancel={() => {}}
|
||||||
loading
|
loading
|
||||||
/>
|
/>
|
||||||
</Store>
|
</Store>
|
||||||
)
|
);
|
||||||
const tree = renderer.getRenderOutput();
|
const tree = renderer.getRenderOutput();
|
||||||
expect(tree).toMatchSnapshot();
|
expect(tree).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
@ -48,14 +48,14 @@ it('renders <Manifest /> without throwing', () => {
|
|||||||
it('renders <Manifest /> without throwing', () => {
|
it('renders <Manifest /> without throwing', () => {
|
||||||
const renderer = new ShallowRenderer();
|
const renderer = new ShallowRenderer();
|
||||||
renderer.render(
|
renderer.render(
|
||||||
<Store>
|
<Store>
|
||||||
<ManifestTestForm
|
<ManifestTestForm
|
||||||
defaultValue="test"
|
defaultValue="test"
|
||||||
handleSubmit={() => {}}
|
handleSubmit={() => {}}
|
||||||
onCancel={() => {}}
|
onCancel={() => {}}
|
||||||
/>
|
/>
|
||||||
</Store>
|
</Store>
|
||||||
)
|
);
|
||||||
const tree = renderer.getRenderOutput();
|
const tree = renderer.getRenderOutput();
|
||||||
expect(tree).toMatchSnapshot();
|
expect(tree).toMatchSnapshot();
|
||||||
});
|
});
|
@ -9,7 +9,6 @@ import 'jest-styled-components';
|
|||||||
import { ServicesTopology } from '@containers/services/topology.js';
|
import { ServicesTopology } from '@containers/services/topology.js';
|
||||||
import { Router, Store, services } from '../../mocks';
|
import { Router, Store, services } from '../../mocks';
|
||||||
|
|
||||||
|
|
||||||
it('renders <ServicesTopology /> without throwing', () => {
|
it('renders <ServicesTopology /> without throwing', () => {
|
||||||
const tree = renderer
|
const tree = renderer
|
||||||
.create(
|
.create(
|
||||||
|
@ -8,7 +8,6 @@ const buildArray = require('build-array');
|
|||||||
const forceArray = require('force-array');
|
const forceArray = require('force-array');
|
||||||
const lfind = require('lodash.find');
|
const lfind = require('lodash.find');
|
||||||
const findIndex = require('lodash.findindex');
|
const findIndex = require('lodash.findindex');
|
||||||
const flatten = require('lodash.flatten');
|
|
||||||
const uniq = require('lodash.uniq');
|
const uniq = require('lodash.uniq');
|
||||||
const yaml = require('js-yaml');
|
const yaml = require('js-yaml');
|
||||||
const hasha = require('hasha');
|
const hasha = require('hasha');
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
.nyc_output
|
.nyc_output
|
||||||
coverage
|
coverage
|
||||||
|
dist
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
.nyc_output
|
.nyc_output
|
||||||
coverage
|
coverage
|
||||||
|
dist
|
@ -1,7 +1,7 @@
|
|||||||
import { Subscriber } from 'react-broadcast';
|
import { Subscriber } from 'react-broadcast';
|
||||||
import Baseline from '../baseline';
|
import Baseline from '../baseline';
|
||||||
import typography from '../typography';
|
import typography from '../typography';
|
||||||
import is, { isNot } from 'styled-is';
|
import { isNot } from 'styled-is';
|
||||||
import remcalc from 'remcalc';
|
import remcalc from 'remcalc';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import { Broadcast, Subscriber } from 'react-broadcast';
|
import { Broadcast, Subscriber } from 'react-broadcast';
|
||||||
import remcalc from 'remcalc';
|
import remcalc from 'remcalc';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import is, { isNot } from 'styled-is';
|
import { isNot } from 'styled-is';
|
||||||
import Baseline from '../baseline';
|
import Baseline from '../baseline';
|
||||||
import Card from './card';
|
import Card from './card';
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import styled from 'styled-components';
|
|||||||
import Baseline from '../baseline';
|
import Baseline from '../baseline';
|
||||||
import typography from '../typography';
|
import typography from '../typography';
|
||||||
import remcalc from 'remcalc';
|
import remcalc from 'remcalc';
|
||||||
import is, { isNot } from 'styled-is';
|
import is from 'styled-is';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import Title from './title';
|
import Title from './title';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
@ -3,7 +3,7 @@ import isString from 'lodash.isstring';
|
|||||||
import typography from '../typography';
|
import typography from '../typography';
|
||||||
import Baseline from '../baseline';
|
import Baseline from '../baseline';
|
||||||
import remcalc from 'remcalc';
|
import remcalc from 'remcalc';
|
||||||
import is, { isNot } from 'styled-is';
|
import is from 'styled-is';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { Subscriber } from 'react-broadcast';
|
import { Subscriber } from 'react-broadcast';
|
||||||
import is from 'styled-is';
|
import is from 'styled-is';
|
||||||
import Baseline from '../baseline';
|
import Baseline from '../baseline';
|
||||||
import breakpoints from '../breakpoints';
|
|
||||||
import Label from '../label';
|
import Label from '../label';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
@ -92,8 +92,7 @@ class Tooltip extends Component {
|
|||||||
left = 'auto',
|
left = 'auto',
|
||||||
bottom = 'auto',
|
bottom = 'auto',
|
||||||
right = 'auto',
|
right = 'auto',
|
||||||
secondary,
|
secondary
|
||||||
...rest
|
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
if (typeof top === 'number') {
|
if (typeof top === 'number') {
|
||||||
|
@ -6,7 +6,7 @@ import Baseline from '../../baseline';
|
|||||||
import InstancesIcon from './icon-instances.svg';
|
import InstancesIcon from './icon-instances.svg';
|
||||||
import { Point } from '../prop-types';
|
import { Point } from '../prop-types';
|
||||||
import { GraphText } from './shapes';
|
import { GraphText } from './shapes';
|
||||||
import { HealthyIcon, UnhealthyIcon } from '../../icons';
|
import { HealthyIcon } from '../../icons';
|
||||||
|
|
||||||
const StyledInstancesIcon = styled(InstancesIcon)`
|
const StyledInstancesIcon = styled(InstancesIcon)`
|
||||||
fill: ${props => props.theme.white};
|
fill: ${props => props.theme.white};
|
||||||
@ -61,7 +61,8 @@ const GraphNodeInfo = ({ data, pos }) => {
|
|||||||
const healthy = (
|
const healthy = (
|
||||||
<HealthyIcon
|
<HealthyIcon
|
||||||
healthy={
|
healthy={
|
||||||
instancesHealthy && instancesHealthy.total === instancesHealthy.healthy ? (
|
instancesHealthy &&
|
||||||
|
instancesHealthy.total === instancesHealthy.healthy ? (
|
||||||
'HEALTHY'
|
'HEALTHY'
|
||||||
) : (
|
) : (
|
||||||
'UNHEALTHY'
|
'UNHEALTHY'
|
||||||
|
Loading…
Reference in New Issue
Block a user