mirror of
https://github.com/smartyellow/status.git
synced 2025-01-18 05:27:58 +00:00
esfix
This commit is contained in:
parent
e11645932d
commit
9b4b71d25f
@ -21,7 +21,7 @@ const defaultEndpoint = {
|
||||
{ type: 'httpstatus',
|
||||
truth: 'true',
|
||||
operator: 'equal',
|
||||
string: '200'
|
||||
string: '200',
|
||||
},
|
||||
],
|
||||
};
|
||||
@ -29,7 +29,7 @@ const defaultReq = {
|
||||
type: 'httpstatus',
|
||||
truth: 'true',
|
||||
operator: 'equal',
|
||||
string: ''
|
||||
string: '',
|
||||
};
|
||||
const defaultHeader = {
|
||||
name: '',
|
||||
@ -110,6 +110,7 @@ function removeEndpoint(i) {
|
||||
/>
|
||||
<button on:click={() => {
|
||||
endpoint.headers.splice(iHeader, 1);
|
||||
// eslint-disable-next-line no-self-assign
|
||||
endpoint = endpoint;
|
||||
}}>
|
||||
×
|
||||
@ -123,7 +124,7 @@ function removeEndpoint(i) {
|
||||
{/if}
|
||||
|
||||
<div>
|
||||
<button on:click={() => endpoint.headers = [...endpoint.headers, defaultHeader]}>
|
||||
<button on:click={() => endpoint.headers = [ ...endpoint.headers, defaultHeader ]}>
|
||||
{translate('add request header', language)}
|
||||
</button>
|
||||
</div>
|
||||
@ -161,7 +162,7 @@ function removeEndpoint(i) {
|
||||
inline
|
||||
labels={{
|
||||
on: translate('is', language),
|
||||
off: translate('isn\'t', language)
|
||||
off: translate('isn\'t', language),
|
||||
}}
|
||||
bind:value={req.truth}
|
||||
on:change={changeValue}
|
||||
@ -196,6 +197,7 @@ function removeEndpoint(i) {
|
||||
/>
|
||||
<button on:click={() => {
|
||||
endpoint.requirements.splice(iReq, 1);
|
||||
// eslint-disable-next-line no-self-assign
|
||||
endpoint = endpoint;
|
||||
}}>
|
||||
×
|
||||
@ -209,7 +211,7 @@ function removeEndpoint(i) {
|
||||
{/if}
|
||||
|
||||
<div>
|
||||
<button on:click={() => endpoint.requirements = [...endpoint.requirements, defaultReq]}>
|
||||
<button on:click={() => endpoint.requirements = [ ...endpoint.requirements, defaultReq ]}>
|
||||
{translate('add requirement', language)}
|
||||
</button>
|
||||
</div>
|
||||
|
@ -28,7 +28,7 @@ const severity = {
|
||||
name: 'no impact',
|
||||
class: 'l4',
|
||||
},
|
||||
}
|
||||
};
|
||||
const dispatch = createEventDispatcher();
|
||||
const service = value; // for clarity
|
||||
let outages = [];
|
||||
|
@ -17,7 +17,7 @@
|
||||
let hasData = false;
|
||||
|
||||
function tileProps(service) {
|
||||
let props = {
|
||||
const props = {
|
||||
title: service.name.en,
|
||||
subtitle: service.cluster,
|
||||
date: service.lastBeat?.date ? new Date(service.lastBeat.date) : undefined,
|
||||
@ -87,7 +87,9 @@
|
||||
|
||||
settings.subscribe(s => {
|
||||
size = (s.cols || 4) * (s.rows || 3);
|
||||
if (hasData) organiseGrid();
|
||||
if (hasData) {
|
||||
organiseGrid();
|
||||
}
|
||||
});
|
||||
|
||||
return () => clearInterval(clockInterval);
|
||||
|
@ -14,13 +14,13 @@
|
||||
}) : '';
|
||||
|
||||
onMount(() => {
|
||||
if (since) {
|
||||
function updateDuration() {
|
||||
formattedDuration = formatDuration(
|
||||
new Date().getTime() - since.getTime()
|
||||
);
|
||||
}
|
||||
function updateDuration() {
|
||||
formattedDuration = formatDuration(
|
||||
new Date().getTime() - since.getTime()
|
||||
);
|
||||
}
|
||||
|
||||
if (since) {
|
||||
updateDuration();
|
||||
const interval = setInterval(updateDuration, 100);
|
||||
return () => clearInterval(interval);
|
||||
|
@ -5,7 +5,9 @@
|
||||
|
||||
onMount(() => {
|
||||
let url = window.location.href;
|
||||
if (!url.endsWith('/')) url += '/';
|
||||
if (!url.endsWith('/')) {
|
||||
url += '/';
|
||||
}
|
||||
url += 'status/dashboard';
|
||||
|
||||
window.open(url, '_blank').focus();
|
||||
|
@ -3,7 +3,6 @@
|
||||
const { makeId } = require('core/makeid');
|
||||
|
||||
const decoder = new TextDecoder('utf-8');
|
||||
let uws;
|
||||
let downIdsBefore = [];
|
||||
let downIdsAfter = [];
|
||||
|
||||
@ -16,7 +15,7 @@ const mapService = (s, beat) => ({
|
||||
});
|
||||
|
||||
async function createDashboardSocket(server) {
|
||||
uws = server.ws({
|
||||
server.ws({
|
||||
route: '/status/dashboard/socket',
|
||||
onOpen: async ws => {
|
||||
async function sendStatuses() {
|
||||
|
Loading…
Reference in New Issue
Block a user