diff --git a/.vscode/settings.json b/.vscode/settings.json index d9986436..a6cdf116 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,5 +2,6 @@ "editor.codeActionsOnSave": { "source.fixAll.eslint": true }, - "editor.defaultFormatter": null + "editor.defaultFormatter": null, + "eslint.validate": ["javascript"] } diff --git a/frontend/src/API.js b/frontend/src/API.js index 608a6188..640bc10f 100644 --- a/frontend/src/API.js +++ b/frontend/src/API.js @@ -387,11 +387,15 @@ class Api { await axios.all([ all ]); } - async getDowntimes ({ serviceId, start, end, skip, count, subStatus }) { + async downtimes ({ serviceId, start, end, skip, count, subStatus }) { return axios.get('api/downtimes', { params: { service_id: serviceId, start, end, skip, count, sub_status: subStatus } }).then((response) => response.data); } + + async downtime (id) { + return axios.get(`api/downtimes/${id}`).then((response) => response.data); + } } const api = new Api(); export default api; diff --git a/frontend/src/components/Dashboard/DashboardDowntimes.vue b/frontend/src/components/Dashboard/DashboardDowntimes.vue index 08ce6efa..c75cebc9 100644 --- a/frontend/src/components/Dashboard/DashboardDowntimes.vue +++ b/frontend/src/components/Dashboard/DashboardDowntimes.vue @@ -1,46 +1,49 @@