diff --git a/ui/src/alerts/apis/index.js b/ui/src/alerts/apis/index.js index bf8082b85..5f314638d 100644 --- a/ui/src/alerts/apis/index.js +++ b/ui/src/alerts/apis/index.js @@ -1,19 +1,9 @@ -export function getAlerts() { - const alerts = [ - { - name: "High CPU", - time: "12:00:01", - value: "90%", - host: "prod-influx-data-1", - severity: "high", - }, - { - name: "Reavers", - time: "12:00:02", - value: "9000", - host: "Firefly", - severity: "ohgodohgod", - }, - ]; - return alerts; +import {proxy} from 'utils/queryUrlGenerator'; + +export function getAlerts(proxyLink) { + return proxy({ + source: proxyLink, + query: "select host, value, name, time, level from alerts", + db: "chronograf", + }); } diff --git a/ui/src/alerts/components/AlertsTable.js b/ui/src/alerts/components/AlertsTable.js index ce616969c..467dc239f 100644 --- a/ui/src/alerts/components/AlertsTable.js +++ b/ui/src/alerts/components/AlertsTable.js @@ -9,7 +9,7 @@ const AlertsTable = React.createClass({ time: PropTypes.string, value: PropTypes.string, host: PropTypes.string, - severity: PropTypes.string, + level: PropTypes.string, })), source: PropTypes.shape({ id: PropTypes.string.isRequired, @@ -73,19 +73,19 @@ const AlertsTable = React.createClass({