style: lint

This commit is contained in:
Sérgio Ramos 2017-10-13 21:02:58 +01:00 committed by Sérgio Ramos
parent dccfd35525
commit c15d7ae020
9 changed files with 28 additions and 34 deletions

View File

@ -35,9 +35,9 @@ module.exports.start = uuid => request('startMachine', uuid);
module.exports.startFromSnapshot = ctx => module.exports.startFromSnapshot = ctx =>
request('startMachineFromSnapshot', ctx); request('startMachineFromSnapshot', ctx);
module.exports.reboot = ctx => request('rebootMachine', ctx); module.exports.reboot = ctx => request('rebootMachine', ctx);
(module.exports.resize = ({ id, package }) => module.exports.resize = ({ id, ...rest }) =>
request.fetch(`/:login/machines/${id}?action=resize?package=${package}`)), request.fetch(`/:login/machines/${id}?action=resize?package=${rest.package}`);
(module.exports.rename = ctx => request('', ctx)); module.exports.rename = ctx => request('', ctx);
module.exports.destroy = ctx => request('deleteMachine', ctx); module.exports.destroy = ctx => request('deleteMachine', ctx);
module.exports.audit = ({ id }) => request('machineAudit', id); module.exports.audit = ({ id }) => request('machineAudit', id);

View File

@ -34,20 +34,20 @@ const CreateSnapshot = ({
})(InstanceCreateSnapshot); })(InstanceCreateSnapshot);
const _error = error && const _error = error &&
!instance && !instance &&
!_loading && ( !_loading && (
<Message error> <Message error>
<MessageTitle>Ooops!</MessageTitle> <MessageTitle>Ooops!</MessageTitle>
<MessageDescription> <MessageDescription>
An error occurred while loading your instance An error occurred while loading your instance
</MessageDescription> </MessageDescription>
</Message> </Message>
); );
const _form = !loading && const _form = !loading &&
!_error && ( !_error && (
<CreateSnapshotForm onSubmit={handleSubmit} onCancel={handleCancel} /> <CreateSnapshotForm onSubmit={handleSubmit} onCancel={handleCancel} />
); );
return ( return (
<ViewContainer center={Boolean(_loading)} main> <ViewContainer center={Boolean(_loading)} main>
@ -76,7 +76,7 @@ export default compose(
connect( connect(
null, null,
(dispatch, { history, location, instance, createSnapshot }) => ({ (dispatch, { history, location, instance, createSnapshot }) => ({
handleCancel: () => history.push(location.pathname.split(/\/\~/).shift()), handleCancel: () => history.push(location.pathname.split(/\/~/).shift()),
handleSubmit: ({ name }) => handleSubmit: ({ name }) =>
createSnapshot({ createSnapshot({
variables: { name, id: instance.id } variables: { name, id: instance.id }

View File

@ -17,7 +17,6 @@ import {
import { Resize as InstanceResize } from '@components/instances'; import { Resize as InstanceResize } from '@components/instances';
import ListPackages from '@graphql/list-packages.gql'; import ListPackages from '@graphql/list-packages.gql';
import ListInstances from '@graphql/list-instances.gql';
import GetInstance from '@graphql/get-instance.gql'; import GetInstance from '@graphql/get-instance.gql';
const Resize = ({ match, loading, error, instance, packages }) => { const Resize = ({ match, loading, error, instance, packages }) => {

View File

@ -1,13 +1,9 @@
import React from 'react'; import React from 'react';
import forceArray from 'force-array';
import styled from 'styled-components'; import styled from 'styled-components';
import { Row, Col } from 'react-styled-flexboxgrid'; import { Row, Col } from 'react-styled-flexboxgrid';
import PropTypes from 'prop-types';
import remcalc from 'remcalc'; import remcalc from 'remcalc';
import View from '../layout/view-container'; import View from '../layout/view-container';
import Breadcrumb from './index';
import Item from './item';
const Border = styled.div` const Border = styled.div`
border-bottom: solid ${remcalc(1)} ${props => props.theme.grey}; border-bottom: solid ${remcalc(1)} ${props => props.theme.grey};

View File

@ -1,4 +1,3 @@
import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import styled from 'styled-components'; import styled from 'styled-components';
import remcalc from 'remcalc'; import remcalc from 'remcalc';

View File

@ -7,7 +7,7 @@ import unitcalc from 'unitcalc';
import rndId from 'rnd-id'; import rndId from 'rnd-id';
import is from 'styled-is'; import is from 'styled-is';
import { bottomShadow, border, borderRadius } from '../boxes'; import { border, borderRadius } from '../boxes';
import Baseline from '../baseline'; import Baseline from '../baseline';
import BaseInput from './base/input'; import BaseInput from './base/input';
import typography from '../typography'; import typography from '../typography';

View File

@ -1,7 +1,7 @@
const webpackConfig = require('react-scripts/config/webpack.config.dev.js'); const webpackConfig = require('react-scripts/config/webpack.config.dev.js');
const { defaultHandlers } = require('react-docgen'); const { defaultHandlers } = require('react-docgen');
const dnHandler = require('react-docgen-displayname-handler'); const dnHandler = require('react-docgen-displayname-handler');
const snapguidist = require('snapguidist'); // const snapguidist = require('snapguidist');
const path = require('path'); const path = require('path');
module.exports = { module.exports = {

View File

@ -1,6 +1,6 @@
const http = require('http'); const http = require('http');
const serveStatic = require('serve-static'); const serveStatic = require('serve-static');
const jest = require('jest'); // const jest = require('jest');
const serve = serveStatic('styleguide/'); const serve = serveStatic('styleguide/');
const server = http.createServer((req, res) => { const server = http.createServer((req, res) => {

View File

@ -2934,8 +2934,8 @@ configstore@^3.0.0:
xdg-basedir "^3.0.0" xdg-basedir "^3.0.0"
connect-history-api-fallback@^1.3.0: connect-history-api-fallback@^1.3.0:
version "1.3.0" version "1.4.0"
resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.3.0.tgz#e51d17f8f0ef0db90a64fdb47de3051556e9f169" resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.4.0.tgz#3db24f973f4b923b0e82f619ce0df02411ca623d"
console-browserify@^1.1.0: console-browserify@^1.1.0:
version "1.1.0" version "1.1.0"
@ -4268,8 +4268,8 @@ es-to-primitive@^1.1.1:
is-symbol "^1.0.1" is-symbol "^1.0.1"
es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14: es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14:
version "0.10.31" version "0.10.35"
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.31.tgz#7bb938c95a7f1b9f728092dc09c41edcc398eefe" resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.35.tgz#18ee858ce6a3c45c7d79e91c15fcca9ec568494f"
dependencies: dependencies:
es6-iterator "~2.0.1" es6-iterator "~2.0.1"
es6-symbol "~3.1.1" es6-symbol "~3.1.1"
@ -5829,8 +5829,8 @@ graphql-tools@^1.1.0:
"@types/graphql" "^0.9.0" "@types/graphql" "^0.9.0"
graphql-tools@^2.3.0: graphql-tools@^2.3.0:
version "2.4.0" version "2.5.0"
resolved "https://registry.yarnpkg.com/graphql-tools/-/graphql-tools-2.4.0.tgz#183d7e509e1ebd07d51db05fdeb181e7126f7ecb" resolved "https://registry.yarnpkg.com/graphql-tools/-/graphql-tools-2.5.0.tgz#b072faf8e1d621550598a681c08504bae13b1904"
dependencies: dependencies:
apollo-link "^0.7.0" apollo-link "^0.7.0"
deprecated-decorator "^0.1.6" deprecated-decorator "^0.1.6"
@ -8583,7 +8583,7 @@ moment@2.15.x:
version "2.15.2" version "2.15.2"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.15.2.tgz#1bfdedf6a6e345f322fe956d5df5bd08a8ce84dc" resolved "https://registry.yarnpkg.com/moment/-/moment-2.15.2.tgz#1bfdedf6a6e345f322fe956d5df5bd08a8ce84dc"
moment@2.x.x, moment@^2.10.6, moment@^2.19.0, moment@^2.6.0: moment@2.x.x, moment@^2.10.6, moment@^2.19.0, moment@^2.19.1, moment@^2.6.0:
version "2.19.1" version "2.19.1"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.19.1.tgz#56da1a2d1cbf01d38b7e1afc31c10bcfa1929167" resolved "https://registry.yarnpkg.com/moment/-/moment-2.19.1.tgz#56da1a2d1cbf01d38b7e1afc31c10bcfa1929167"
@ -9881,8 +9881,8 @@ pretty-format@^21.2.1:
ansi-styles "^3.2.0" ansi-styles "^3.2.0"
private@^0.1.6, private@^0.1.7, private@~0.1.5: private@^0.1.6, private@^0.1.7, private@~0.1.5:
version "0.1.7" version "0.1.8"
resolved "https://registry.yarnpkg.com/private/-/private-0.1.7.tgz#68ce5e8a1ef0a23bb570cc28537b5332aba63ef1" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
process-nextick-args@~1.0.6: process-nextick-args@~1.0.6:
version "1.0.7" version "1.0.7"