mirror of https://github.com/Lissy93/dashy.git
🔀 Merge pull request #1048 from m42e/healthcheck-fix-errors
Fix HealthChecks linting errors
This commit is contained in:
commit
adf56fa334
|
@ -1,14 +1,15 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="health-checks-wrapper" v-if="crons">
|
<div class="health-checks-wrapper" v-if="crons">
|
||||||
<template
|
<template
|
||||||
v-for="cron in crons" :key="cron.id"
|
v-for="cron in crons"
|
||||||
>
|
>
|
||||||
<div class="status">
|
<div class="status" v-bind:key="cron.id + 'status'">
|
||||||
<p :class="cron.status">{{ cron.status | formatStatus }}</p>
|
<p :class="cron.status">{{ cron.status | formatStatus }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="info"
|
class="info"
|
||||||
v-tooltip="pingTimeTooltip(cron)"
|
v-tooltip="pingTimeTooltip(cron)"
|
||||||
|
v-bind:key="cron.id + 'info'"
|
||||||
>
|
>
|
||||||
<p class="cron-name">{{ cron.name }}</p>
|
<p class="cron-name">{{ cron.name }}</p>
|
||||||
<p class="cron-desc">{{ cron.desc }}</p>
|
<p class="cron-desc">{{ cron.desc }}</p>
|
||||||
|
@ -37,7 +38,7 @@ export default {
|
||||||
if (status === 'down') symbol = '✘';
|
if (status === 'down') symbol = '✘';
|
||||||
if (status === 'new') symbol = '❖';
|
if (status === 'new') symbol = '❖';
|
||||||
if (status === 'paused') symbol = '⏸';
|
if (status === 'paused') symbol = '⏸';
|
||||||
if (status === 'running') symbol = '▶'
|
if (status === 'running') symbol = '▶';
|
||||||
return `${symbol} ${capitalize(status)}`;
|
return `${symbol} ${capitalize(status)}`;
|
||||||
},
|
},
|
||||||
formatDate(timestamp) {
|
formatDate(timestamp) {
|
||||||
|
@ -54,7 +55,7 @@ export default {
|
||||||
if (!this.options.apiKey) {
|
if (!this.options.apiKey) {
|
||||||
this.error('An API key is required, please see the docs for more info');
|
this.error('An API key is required, please see the docs for more info');
|
||||||
}
|
}
|
||||||
if (typeof(this.options.apiKey) === "string") {
|
if (typeof this.options.apiKey === 'string') {
|
||||||
return [this.options.apiKey];
|
return [this.options.apiKey];
|
||||||
}
|
}
|
||||||
return this.options.apiKey;
|
return this.options.apiKey;
|
||||||
|
@ -71,7 +72,7 @@ export default {
|
||||||
(response) => { this.processData(response, results); },
|
(response) => { this.processData(response, results); },
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
results.sort((a,b) => (a.name > b.name) ? 1 : ((b.name > a.name) ? -1 : 0));
|
results.sort((a, b) => ((a.name > b.name) ? 1 : -1));
|
||||||
this.crons = results;
|
this.crons = results;
|
||||||
},
|
},
|
||||||
/* Assign data variables to the returned data */
|
/* Assign data variables to the returned data */
|
||||||
|
|
Loading…
Reference in New Issue