diff --git a/ui/src/kapacitor/components/KapacitorRule.js b/ui/src/kapacitor/components/KapacitorRule.js
index f7a2b6076..7d6838318 100644
--- a/ui/src/kapacitor/components/KapacitorRule.js
+++ b/ui/src/kapacitor/components/KapacitorRule.js
@@ -87,9 +87,9 @@ export const KapacitorRule = React.createClass({
createRule(kapacitor, newRule).then(() => {
router.push(`/sources/${source.id}/alert-rules`)
- addFlashMessage({type: 'success', text: `Rule successfully created`})
+ addFlashMessage({type: 'success', text: 'Rule successfully created'})
}).catch(() => {
- addFlashMessage({type: 'error', text: `There was a problem creating the rule`})
+ addFlashMessage({type: 'error', text: 'There was a problem creating the rule'})
})
},
@@ -101,9 +101,9 @@ export const KapacitorRule = React.createClass({
})
editRule(updatedRule).then(() => {
- addFlashMessage({type: 'success', text: `Rule successfully updated!`})
+ addFlashMessage({type: 'success', text: 'Rule successfully updated!'})
}).catch(() => {
- addFlashMessage({type: 'error', text: `There was a problem updating the rule`})
+ addFlashMessage({type: 'error', text: 'There was a problem updating the rule'})
})
},
diff --git a/ui/src/kapacitor/components/KapacitorRulesTable.js b/ui/src/kapacitor/components/KapacitorRulesTable.js
index 8c7d20399..e2f466d79 100644
--- a/ui/src/kapacitor/components/KapacitorRulesTable.js
+++ b/ui/src/kapacitor/components/KapacitorRulesTable.js
@@ -40,7 +40,7 @@ const RuleRow = ({rule, source, onDelete, onChangeRuleStatus}) => {
id={`kapacitor-enabled ${rule.id}`}
className="form-control-static"
type="checkbox"
- defaultChecked={rule.status === "enabled"}
+ defaultChecked={rule.status === 'enabled'}
onClick={() => onChangeRuleStatus(rule)}
/>
diff --git a/ui/src/kapacitor/components/RuleGraph.js b/ui/src/kapacitor/components/RuleGraph.js
index 9c5d4d441..57b5bea08 100644
--- a/ui/src/kapacitor/components/RuleGraph.js
+++ b/ui/src/kapacitor/components/RuleGraph.js
@@ -29,7 +29,7 @@ export const RuleGraph = React.createClass({
const autoRefreshMs = 30000
const queryText = buildInfluxQLQuery({lower}, query)
const queries = [{host: source.links.proxy, text: queryText}]
- const kapacitorLineColors = ["#4ED8A0"]
+ const kapacitorLineColors = ['#4ED8A0']
if (!queryText) {
return (
diff --git a/ui/src/kapacitor/constants/index.js b/ui/src/kapacitor/constants/index.js
index 298206198..95d424c24 100644
--- a/ui/src/kapacitor/constants/index.js
+++ b/ui/src/kapacitor/constants/index.js
@@ -29,14 +29,14 @@ export const ALERTS = ['alerta', 'hipchat', 'opsgenie', 'pagerduty', 'sensu', 's
export const DEFAULT_RULE_ID = 'DEFAULT_RULE_ID'
export const RULE_MESSAGE_TEMPLATES = {
- id: {label: "{{.ID}}", text: "The ID of the alert"},
- name: {label: "{{.Name}}", text: "Measurement name"},
- taskName: {label: "{{.TaskName}}", text: "The name of the task"},
- group: {label: "{{.Group}}", text: "Concatenation of all group-by tags of the form
[key=value,]+
. If no groupBy is performed equal to literal "nil""},
- tags: {label: "{{.Tags}}", text: "Map of tags. Use
{{ index .Tags "key" }}
to get a specific tag value"},
- level: {label: "{{.Level}}", text: "Alert Level, one of:
INFO
WARNING
CRITICAL
"},
- fields: {label: `{{ index .Fields "value" }}`, text: "Map of fields. Use
{{ index .Fields "key" }}
to get a specific field value"},
- time: {label: "{{.Time}}", text: "The time of the point that triggered the event"},
+ id: {label: '{{.ID}}', text: 'The ID of the alert'},
+ name: {label: '{{.Name}}', text: 'Measurement name'},
+ taskName: {label: '{{.TaskName}}', text: 'The name of the task'},
+ group: {label: '{{.Group}}', text: 'Concatenation of all group-by tags of the form
[key=value,]+
. If no groupBy is performed equal to literal "nil"'},
+ tags: {label: '{{.Tags}}', text: 'Map of tags. Use
{{ index .Tags "key" }}
to get a specific tag value'},
+ level: {label: '{{.Level}}', text: 'Alert Level, one of:
INFO
WARNING
CRITICAL
'},
+ fields: {label: '{{ index .Fields "value" }}', text: 'Map of fields. Use
{{ index .Fields "key" }}
to get a specific field value'},
+ time: {label: '{{.Time}}', text: 'The time of the point that triggered the event'},
}
export const DEFAULT_ALERTS = ['http', 'tcp', 'exec']
diff --git a/ui/src/kapacitor/containers/KapacitorRulePage.js b/ui/src/kapacitor/containers/KapacitorRulePage.js
index 141f486e5..0e2d62cad 100644
--- a/ui/src/kapacitor/containers/KapacitorRulePage.js
+++ b/ui/src/kapacitor/containers/KapacitorRulePage.js
@@ -60,9 +60,9 @@ export const KapacitorRulePage = React.createClass({
})
this.setState({enabledAlerts})
}).catch(() => {
- addFlashMessage({type: 'error', text: `There was a problem communicating with Kapacitor`})
+ addFlashMessage({type: 'error', text: 'There was a problem communicating with Kapacitor'})
}).catch(() => {
- addFlashMessage({type: 'error', text: `We couldn't find a configured Kapacitor for this source`})
+ addFlashMessage({type: 'error', text: 'We couldn\'t find a configured Kapacitor for this source'})
})
})
},
diff --git a/ui/src/shared/actions/notifications.js b/ui/src/shared/actions/notifications.js
index b3cfc8738..deab1e28b 100644
--- a/ui/src/shared/actions/notifications.js
+++ b/ui/src/shared/actions/notifications.js
@@ -2,7 +2,7 @@ export function publishNotification(type, message) {
// this validator is purely for development purposes. It might make sense to move this to a middleware.
const validTypes = ['error', 'success', 'warning']
if (!validTypes.includes(type) || message === undefined) {
- console.error("handleNotification must have a valid type and text") // eslint-disable-line no-console
+ console.error('handleNotification must have a valid type and text') // eslint-disable-line no-console
}
return {
diff --git a/ui/src/shared/actions/sources.js b/ui/src/shared/actions/sources.js
index 0711ebb02..942fa6de0 100644
--- a/ui/src/shared/actions/sources.js
+++ b/ui/src/shared/actions/sources.js
@@ -58,7 +58,7 @@ export const removeAndLoadSources = (source) => async (dispatch) => {
const {data: {sources: newSources}} = await getSources()
dispatch(loadSources(newSources))
} catch (err) {
- dispatch(publishNotification("error", "Internal Server Error. Check API Logs"))
+ dispatch(publishNotification('error', 'Internal Server Error. Check API Logs'))
}
}
diff --git a/ui/src/shared/apis/index.js b/ui/src/shared/apis/index.js
index f66da174a..e34b91245 100644
--- a/ui/src/shared/apis/index.js
+++ b/ui/src/shared/apis/index.js
@@ -2,7 +2,7 @@ import AJAX from 'utils/ajax'
export function fetchLayouts() {
return AJAX({
- url: `/chronograf/v1/layouts`,
+ url: '/chronograf/v1/layouts',
method: 'GET',
resource: 'layouts',
})
diff --git a/ui/src/shared/apis/metaQuery.js b/ui/src/shared/apis/metaQuery.js
index fb8424a4f..d6236ecbb 100644
--- a/ui/src/shared/apis/metaQuery.js
+++ b/ui/src/shared/apis/metaQuery.js
@@ -3,7 +3,7 @@ import _ from 'lodash'
import {buildInfluxUrl, proxy} from 'utils/queryUrlGenerator'
export const showDatabases = async (source) => {
- const query = `SHOW DATABASES`
+ const query = 'SHOW DATABASES'
return await proxy({source, query})
}
@@ -52,7 +52,7 @@ export function showTagValues({source, database, retentionPolicy, measurement, t
export function showShards() {
return AJAX({
- url: `/api/int/v1/show-shards`,
+ url: '/api/int/v1/show-shards',
})
}
diff --git a/ui/src/shared/components/AutoRefreshDropdown.js b/ui/src/shared/components/AutoRefreshDropdown.js
index e5b72e699..e430fc124 100644
--- a/ui/src/shared/components/AutoRefreshDropdown.js
+++ b/ui/src/shared/components/AutoRefreshDropdown.js
@@ -49,11 +49,11 @@ const AutoRefreshDropdown = React.createClass({
return (
self.toggleMenu()}>
- 0 ? "refresh" : "pause")}>
+ 0 ? 'refresh' : 'pause')}>
{inputValue}
-
+
- AutoRefresh Interval
{autoRefreshItems.map((item) => {
return (
diff --git a/ui/src/shared/components/CustomTimeRange.js b/ui/src/shared/components/CustomTimeRange.js
index 9da0bdf37..f601b0845 100644
--- a/ui/src/shared/components/CustomTimeRange.js
+++ b/ui/src/shared/components/CustomTimeRange.js
@@ -45,7 +45,7 @@ class CustomTimeRange extends Component {
const {isVisible, onToggle, timeRange: {upper, lower}} = this.props
return (
-
+