1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-28 06:00:06 +02:00

style: format

This commit is contained in:
Sérgio Ramos 2017-09-06 10:46:34 +01:00
parent d4aff642e3
commit cceacbebab
7 changed files with 19 additions and 25 deletions

View File

@ -1,4 +1,4 @@
import React, { Component } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import remcalc from 'remcalc';
@ -8,13 +8,7 @@ import {
Card,
CardView,
CardTitle,
CardSubTitle,
CardDescription,
CardGroupView,
CardOptions,
CardHeader,
CardInfo,
Anchor
CardHeader
} from 'joyent-ui-toolkit';
const MetricView = styled(CardView)`

View File

@ -16,7 +16,6 @@ import {
Card,
CardView,
CardTitle,
CardSubTitle,
CardDescription,
CardGroupView,
CardOptions,

View File

@ -1,5 +1,5 @@
import React, { Component } from 'react';
import { compose, graphql } from 'react-apollo';
import { graphql } from 'react-apollo';
import find from 'lodash.find';
import uniqBy from 'lodash.uniqby';
import get from 'lodash.get';
@ -22,7 +22,7 @@ export const withServiceMetricsPolling = ({
return class extends Component {
componentDidMount() {
this._poll = setInterval(() => {
const { loading, error, service, fetchMoreMetrics } = this.props;
const { loading, fetchMoreMetrics } = this.props;
const previousEnd = getPreviousEnd(this.props);
if (previousEnd) {

View File

@ -30,7 +30,7 @@ export default paths => {
}
render() {
const { error, location, match } = this.props;
const { location, match } = this.props;
if (location.state && location.state.notFound) {
const notFound = location.state.notFound;

View File

@ -1,14 +1,11 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { compose, graphql } from 'react-apollo';
import { connect } from 'react-redux';
import React from 'react';
import { compose } from 'react-apollo';
import moment from 'moment';
import ServiceMetricsQuery from '@graphql/ServiceMetrics.gql';
import { withNotFound, GqlPaths } from '@containers/navigation';
import { LayoutContainer } from '@components/layout';
import { Title } from '@components/navigation';
import { ServiceMetrics as ServiceMetricsComponent } from '@components/service';
import { Button } from 'joyent-ui-toolkit';
import { Loader, ErrorMessage } from '@components/messaging';
import { processInstancesMetrics } from '@state/selectors';
import get from 'lodash.get';

View File

@ -1,6 +1,6 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { compose, graphql } from 'react-apollo';
import { compose } from 'react-apollo';
import { connect } from 'react-redux';
import styled from 'styled-components';
import forceArray from 'force-array';

View File

@ -172,11 +172,12 @@ const getMetrics = query => {
return Promise.resolve(metrics);
};
const getInstanceMetrics = ({ id }) => query => getMetrics(
const getInstanceMetrics = ({ id }) => query =>
getMetrics(
Object.assign({}, query, {
instanceId: id
})
);
);
const updateInstance = async query => {
await delay(0.5);
@ -184,7 +185,10 @@ const updateInstance = async query => {
const instanceIndex = findIndex(instances, ['id', query.id]);
const original = cleanQuery(instances[instanceIndex]);
instances[instanceIndex] = Object.assign(instances[instanceIndex], cleanQuery(query));
instances[instanceIndex] = Object.assign(
instances[instanceIndex],
cleanQuery(query)
);
emit('instance-updated', diff(original, instances[instanceIndex], 'name'));
@ -454,7 +458,7 @@ const getServiceInstances = async (query, { id }) => {
};
const getBranchInstances = async (query, instanceIds) =>
map(instanceIds, (id) => getInstance({ id }));
map(instanceIds, id => getInstance({ id }));
const getServiceBranches = async (query, { branches }) => {
await delay(0.1);