From 4530f37a147f316e0b8af427c3cd10bffe4ed2eb Mon Sep 17 00:00:00 2001 From: sveisvei Date: Wed, 14 Dec 2016 12:50:23 +0100 Subject: [PATCH] fix lint --- frontend/src/component/app.jsx | 12 ++++++------ .../application/application-edit-component.js | 6 +++--- .../client-instance/client-instance-component.js | 6 +++--- .../feature/feature-list-item-component.jsx | 4 +++- .../component/feature/form/strategy-configure.jsx | 7 ++++++- .../src/component/feature/view-edit-container.jsx | 7 +++++-- frontend/src/component/history/history-item-diff.jsx | 1 - .../src/component/history/history-list-component.jsx | 2 +- .../history/history-list-toggle-component.jsx | 6 +++++- frontend/src/component/strategies/list-component.jsx | 12 +++++++----- frontend/src/index.jsx | 6 +++--- 11 files changed, 42 insertions(+), 27 deletions(-) diff --git a/frontend/src/component/app.jsx b/frontend/src/component/app.jsx index 3f5b726e54..c9be520daf 100644 --- a/frontend/src/component/app.jsx +++ b/frontend/src/component/app.jsx @@ -114,9 +114,9 @@ export default class App extends Component { {createListItem('/history', 'Event history', 'history')} {createListItem('/archive', 'Archived toggles', 'archive')} {createListItem('/applications', 'Applications', 'apps')} - {/*createListItem('/metrics', 'Client metrics')*/} - {/*createListItem('/client-strategies', 'Client strategies')*/} - {/*createListItem('/client-instances', 'Client instances')*/} + {/* createListItem('/metrics', 'Client metrics')*/} + {/* createListItem('/client-strategies', 'Client strategies')*/} + {/* createListItem('/client-instances', 'Client instances')*/} @@ -139,9 +139,9 @@ export default class App extends Component { {createListItem('/applications', 'Applications')} - {/*createListItem('/metrics', 'Client metrics')*/} - {/*createListItem('/client-strategies', 'Client strategies')*/} - {/*createListItem('/client-instances', 'Client instances')*/} + {/* createListItem('/metrics', 'Client metrics')*/} + {/* createListItem('/client-strategies', 'Client strategies')*/} + {/* createListItem('/client-instances', 'Client instances')*/} diff --git a/frontend/src/component/application/application-edit-component.js b/frontend/src/component/application/application-edit-component.js index a6b6e95dcf..f024a418a1 100644 --- a/frontend/src/component/application/application-edit-component.js +++ b/frontend/src/component/application/application-edit-component.js @@ -69,7 +69,7 @@ class ClientApplications extends PureComponent {
{seenToggles.map(({ name, description, enabled, notFound }, i) => - notFound ? + (notFound ? @@ -84,7 +84,8 @@ class ClientApplications extends PureComponent { {name} - )} + ) + )} @@ -148,7 +149,6 @@ class ClientApplications extends PureComponent { ); - return (
{appName}} subtitle={description} diff --git a/frontend/src/component/client-instance/client-instance-component.js b/frontend/src/component/client-instance/client-instance-component.js index 83c6772691..bdc070f7be 100644 --- a/frontend/src/component/client-instance/client-instance-component.js +++ b/frontend/src/component/client-instance/client-instance-component.js @@ -22,14 +22,14 @@ class ClientStrategies extends Component { rows={source} selectable={false} > - - + + Instance ID Application name IP Created Last Seen - + ); } diff --git a/frontend/src/component/feature/feature-list-item-component.jsx b/frontend/src/component/feature/feature-list-item-component.jsx index 4273601693..597f8f30bd 100644 --- a/frontend/src/component/feature/feature-list-item-component.jsx +++ b/frontend/src/component/feature/feature-list-item-component.jsx @@ -30,7 +30,9 @@ const Feature = ({
{ isStale ? - : + :
diff --git a/frontend/src/component/feature/form/strategy-configure.jsx b/frontend/src/component/feature/form/strategy-configure.jsx index 5d2aabb283..a9656aca2f 100644 --- a/frontend/src/component/feature/form/strategy-configure.jsx +++ b/frontend/src/component/feature/form/strategy-configure.jsx @@ -154,7 +154,12 @@ class StrategyConfigure extends React.Component { } - + + + diff --git a/frontend/src/component/feature/view-edit-container.jsx b/frontend/src/component/feature/view-edit-container.jsx index 96781327d2..1db6a2bbc0 100644 --- a/frontend/src/component/feature/view-edit-container.jsx +++ b/frontend/src/component/feature/view-edit-container.jsx @@ -66,7 +66,6 @@ const MetricTab = ({ metrics, featureToggle, toggleFeature }) => {
); - }; class EditFeatureToggleWrapper extends React.Component { @@ -144,7 +143,11 @@ class EditFeatureToggleWrapper extends React.Component { return (
-

{featureToggle.name} {featureToggle.enabled ? 'is enabled' : 'is disabled'} Created {(new Date(featureToggle.createdAt)).toLocaleString('nb-NO')}

+

{featureToggle.name} {featureToggle.enabled ? 'is enabled' : 'is disabled'} + + Created {(new Date(featureToggle.createdAt)).toLocaleString('nb-NO')} + +

{featureToggle.description}
this.setState({ activeTab: tabId })} diff --git a/frontend/src/component/history/history-item-diff.jsx b/frontend/src/component/history/history-item-diff.jsx index 73198f683e..78284cb624 100644 --- a/frontend/src/component/history/history-item-diff.jsx +++ b/frontend/src/component/history/history-item-diff.jsx @@ -1,5 +1,4 @@ import React, { PropTypes, PureComponent } from 'react'; -import { Icon } from 'react-mdl'; import style from './history.scss'; diff --git a/frontend/src/component/history/history-list-component.jsx b/frontend/src/component/history/history-list-component.jsx index f3cd3c93cc..a937c8ffa8 100644 --- a/frontend/src/component/history/history-list-component.jsx +++ b/frontend/src/component/history/history-list-component.jsx @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import HistoryItemDiff from './history-item-diff'; import HistoryItemJson from './history-item-json'; -import { Table, TableHeader, Icon } from 'react-mdl'; +import { Table, TableHeader } from 'react-mdl'; import { HeaderTitle, SwitchWithLabel } from '../common'; import style from './history.scss'; diff --git a/frontend/src/component/history/history-list-toggle-component.jsx b/frontend/src/component/history/history-list-toggle-component.jsx index b192f74d57..46580fd22b 100644 --- a/frontend/src/component/history/history-list-toggle-component.jsx +++ b/frontend/src/component/history/history-list-toggle-component.jsx @@ -22,7 +22,11 @@ class HistoryListToggle extends Component { return ( Showing history for toggle: {toggleName}}/> + title={ + Showing history for toggle: + {toggleName} + + }/> ); } } diff --git a/frontend/src/component/strategies/list-component.jsx b/frontend/src/component/strategies/list-component.jsx index e6eaa700a7..7805ba44eb 100644 --- a/frontend/src/component/strategies/list-component.jsx +++ b/frontend/src/component/strategies/list-component.jsx @@ -20,10 +20,13 @@ class StrategiesListComponent extends Component { return (
this.context.router.push('/strategies/create')} title="Add new strategy" />} /> + actions={ + this.context.router.push('/strategies/create')} + title="Add new strategy" />} /> - {strategies.length > 0 ? strategies.map((strategy, i) => { - return ( + {strategies.length > 0 ? strategies.map((strategy, i) => ( @@ -32,8 +35,7 @@ class StrategiesListComponent extends Component { removeStrategy(strategy)} /> - ); - }) : No entries} + )) : No entries}
); diff --git a/frontend/src/index.jsx b/frontend/src/index.jsx index ab90ca0270..fb696b0115 100644 --- a/frontend/src/index.jsx +++ b/frontend/src/index.jsx @@ -41,13 +41,13 @@ ReactDOM.render( - + - + @@ -58,7 +58,7 @@ ReactDOM.render( - + , document.getElementById('app'));