mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-23 23:04:04 +00:00
Match lint settings
This commit is contained in:
parent
9143b73f84
commit
348c5ec995
2 changed files with 4 additions and 4 deletions
|
@ -142,12 +142,13 @@ router.get("/api/status-page/monitor-list", cache("5 minutes"), async (_request,
|
||||||
const publicGroupList = [];
|
const publicGroupList = [];
|
||||||
let list = await R.find("group", " public = 1 ORDER BY weight ");
|
let list = await R.find("group", " public = 1 ORDER BY weight ");
|
||||||
for (let groupBean of list) {
|
for (let groupBean of list) {
|
||||||
let monitor_info = await groupBean.toPublicJSON()
|
let monitorGroup = await groupBean.toPublicJSON()
|
||||||
monitor_info.monitorList = await Promise.all(monitor_info.monitorList.map( async (monitor)=>{
|
monitorGroup.monitorList = await Promise.all(monitorGroup.monitorList.map( async (monitor)=>{
|
||||||
|
// Includes tags as an array in response, allows for tags to be displayed on public status page
|
||||||
let tags = await R.getAll("SELECT mt.monitor_id,mt.value, tag.name, tag.color FROM monitor_tag mt JOIN tag ON mt.tag_id = tag.id WHERE mt.monitor_id = ?", [monitor.id]);
|
let tags = await R.getAll("SELECT mt.monitor_id,mt.value, tag.name, tag.color FROM monitor_tag mt JOIN tag ON mt.tag_id = tag.id WHERE mt.monitor_id = ?", [monitor.id]);
|
||||||
return {...monitor,tags: tags}
|
return {...monitor,tags: tags}
|
||||||
}))
|
}))
|
||||||
publicGroupList.push(monitor_info);
|
publicGroupList.push(monitorGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
response.json(publicGroupList);
|
response.json(publicGroupList);
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
|
|
||||||
<Uptime :monitor="monitor.element" type="24" :pill="true" />
|
<Uptime :monitor="monitor.element" type="24" :pill="true" />
|
||||||
{{ monitor.element.name }}
|
{{ monitor.element.name }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="tags">
|
<div class="tags">
|
||||||
<Tag v-for="tag in monitor.element.tags" :key="tag" :item="tag" :size="'sm'" />
|
<Tag v-for="tag in monitor.element.tags" :key="tag" :item="tag" :size="'sm'" />
|
||||||
|
|
Loading…
Reference in a new issue