eslint src --fix

pull/10616/head
Hunter Trujillo 2017-04-28 16:42:32 -06:00
parent 4cbcc77fff
commit ac25691a50
5 changed files with 7 additions and 4 deletions

View File

@ -76,7 +76,7 @@ export const KapacitorRulePage = React.createClass({
.catch(() => { .catch(() => {
addFlashMessage({ addFlashMessage({
type: 'error', type: 'error',
text: "We couldn't find a configured Kapacitor for this source", text: 'We couldn\'t find a configured Kapacitor for this source',
}) })
}) })
}) })

View File

@ -6,6 +6,8 @@ import {
} from 'src/shared/apis' } from 'src/shared/apis'
import {publishNotification} from './notifications' import {publishNotification} from './notifications'
import {HTTP_NOT_FOUND} from 'src/shared/constants'
export const loadSources = sources => ({ export const loadSources = sources => ({
type: 'LOAD_SOURCES', type: 'LOAD_SOURCES',
payload: { payload: {
@ -51,7 +53,7 @@ export const removeAndLoadSources = source => async dispatch => {
} catch (err) { } catch (err) {
// A 404 means that either a concurrent write occurred or the source // A 404 means that either a concurrent write occurred or the source
// passed to this action creator doesn't exist (or is undefined) // passed to this action creator doesn't exist (or is undefined)
if (err.status !== 404) { if (err.status !== HTTP_NOT_FOUND) {
// eslint-disable-line no-magic-numbers // eslint-disable-line no-magic-numbers
throw err throw err
} }

View File

@ -390,6 +390,7 @@ export const REVERT_STATE_DELAY = 1500 // ms
export const HTTP_UNAUTHORIZED = 401 export const HTTP_UNAUTHORIZED = 401
export const HTTP_FORBIDDEN = 403 export const HTTP_FORBIDDEN = 403
export const HTTP_NOT_FOUND = 404
export const AUTOREFRESH_DEFAULT = 15000 // in milliseconds export const AUTOREFRESH_DEFAULT = 15000 // in milliseconds

View File

@ -2,7 +2,7 @@
// There are some tradeoffs between using localStorage vs. using on-disk files via electron. // There are some tradeoffs between using localStorage vs. using on-disk files via electron.
// localStorage was chosen, for now, to simplify use of this app outside of electron. // localStorage was chosen, for now, to simplify use of this app outside of electron.
export default function makeAppStorage(localStorage) { export default function makeAppStorage(localStorage) {
return store => { return () => {
// eslint-disable-line no-unused-vars // eslint-disable-line no-unused-vars
return next => { return next => {
return action => { return action => {

View File

@ -22,7 +22,7 @@ export const SourceForm = React.createClass({
name: this.sourceName.value, name: this.sourceName.value,
username: this.sourceUsername.value, username: this.sourceUsername.value,
password: this.sourcePassword.value, password: this.sourcePassword.value,
default: this.sourceDefault.checked, 'default': this.sourceDefault.checked,
telegraf: this.sourceTelegraf.value, telegraf: this.sourceTelegraf.value,
insecureSkipVerify: this.sourceInsecureSkipVerify insecureSkipVerify: this.sourceInsecureSkipVerify
? this.sourceInsecureSkipVerify.checked ? this.sourceInsecureSkipVerify.checked