minor fixes (missing commas, spaces, translations)
This commit is contained in:
parent
0d3414c6d6
commit
5fda1f0f59
|
@ -17,7 +17,7 @@ class Maintenance extends BeanModel {
|
||||||
title: this.title,
|
title: this.title,
|
||||||
description: this.description,
|
description: this.description,
|
||||||
start_date: this.start_date,
|
start_date: this.start_date,
|
||||||
end_date: this.end_date
|
end_date: this.end_date,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ class Maintenance extends BeanModel {
|
||||||
title: this.title,
|
title: this.title,
|
||||||
description: this.description,
|
description: this.description,
|
||||||
start_date: this.start_date,
|
start_date: this.start_date,
|
||||||
end_date: this.end_date
|
end_date: this.end_date,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ dayjs.extend(utc);
|
||||||
dayjs.extend(timezone);
|
dayjs.extend(timezone);
|
||||||
const axios = require("axios");
|
const axios = require("axios");
|
||||||
const { Prometheus } = require("../prometheus");
|
const { Prometheus } = require("../prometheus");
|
||||||
const { debug, UP, DOWN, PENDING, MAINTENANCE, flipStatus, TimeLogger} = require("../../src/util");
|
const { debug, UP, DOWN, PENDING, MAINTENANCE, flipStatus, TimeLogger } = require("../../src/util");
|
||||||
const { tcping, ping, dnsResolve, checkCertificate, checkStatusCode, getTotalClientInRoom, setting, errorLog } = require("../util-server");
|
const { tcping, ping, dnsResolve, checkCertificate, checkStatusCode, getTotalClientInRoom, setting, errorLog } = require("../util-server");
|
||||||
const { R } = require("redbean-node");
|
const { R } = require("redbean-node");
|
||||||
const { BeanModel } = require("redbean-node/dist/bean-model");
|
const { BeanModel } = require("redbean-node/dist/bean-model");
|
||||||
|
|
|
@ -5,7 +5,7 @@ const server = require("../server");
|
||||||
const apicache = require("../modules/apicache");
|
const apicache = require("../modules/apicache");
|
||||||
const Monitor = require("../model/monitor");
|
const Monitor = require("../model/monitor");
|
||||||
const dayjs = require("dayjs");
|
const dayjs = require("dayjs");
|
||||||
const { UP, MAINTENANCE, flipStatus, debug} = require("../../src/util");
|
const { UP, MAINTENANCE, flipStatus, debug } = require("../../src/util");
|
||||||
let router = express.Router();
|
let router = express.Router();
|
||||||
|
|
||||||
let cache = apicache.middleware;
|
let cache = apicache.middleware;
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
import HeartbeatBar from "../components/HeartbeatBar.vue";
|
import HeartbeatBar from "../components/HeartbeatBar.vue";
|
||||||
import Uptime from "../components/Uptime.vue";
|
import Uptime from "../components/Uptime.vue";
|
||||||
import Tag from "../components/Tag.vue";
|
import Tag from "../components/Tag.vue";
|
||||||
import {getMaintenanceRelativeURL, getMonitorRelativeURL} from "../util.ts";
|
import {getMaintenanceRelativeURL, getMonitorRelativeURL } from "../util.ts";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
@ -82,7 +82,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
searchText: "",
|
searchText: "",
|
||||||
selectedList: "monitor"
|
selectedList: "monitor",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
@ -7,7 +7,20 @@ export default {
|
||||||
upsideDownModeDescription: "Flip the status upside down. If the service is reachable, it is DOWN.",
|
upsideDownModeDescription: "Flip the status upside down. If the service is reachable, it is DOWN.",
|
||||||
maxRedirectDescription: "Maximum number of redirects to follow. Set to 0 to disable redirects.",
|
maxRedirectDescription: "Maximum number of redirects to follow. Set to 0 to disable redirects.",
|
||||||
acceptedStatusCodesDescription: "Select status codes which are considered as a successful response.",
|
acceptedStatusCodesDescription: "Select status codes which are considered as a successful response.",
|
||||||
|
Maintenance: "Maintenance",
|
||||||
|
"Monitor List": "Monitor List",
|
||||||
|
"Maintenance List": "Maintenance List",
|
||||||
|
"Schedule maintenance": "Schedule maintenance",
|
||||||
|
"Affected Monitors": "Affected Monitors",
|
||||||
|
"Pick Affected Monitors...": "Pick Affected Monitors...",
|
||||||
|
"Start of maintenance": "Start of maintenance",
|
||||||
|
"Expected end of maintenance": "Expected end of maintenance",
|
||||||
|
Start: "Start",
|
||||||
|
End: "End",
|
||||||
affectedMonitorsDescription: "Select monitors that are affected by current maintenance",
|
affectedMonitorsDescription: "Select monitors that are affected by current maintenance",
|
||||||
|
atLeastOneMonitor: "Select at least one affected monitor",
|
||||||
|
maintenanceTitleExample: "Network infrastructure maintenance",
|
||||||
|
maintenanceDescriptionExample: "Example: Network infrastructure maintenance is underway which will affect some of our services.",
|
||||||
passwordNotMatchMsg: "The repeat password does not match.",
|
passwordNotMatchMsg: "The repeat password does not match.",
|
||||||
notificationDescription: "Notifications must be assigned to a monitor to function.",
|
notificationDescription: "Notifications must be assigned to a monitor to function.",
|
||||||
keywordDescription: "Search keyword in plain HTML or JSON response. The search is case-sensitive.",
|
keywordDescription: "Search keyword in plain HTML or JSON response. The search is case-sensitive.",
|
||||||
|
@ -40,7 +53,10 @@ export default {
|
||||||
"Check Update On GitHub": "Check Update On GitHub",
|
"Check Update On GitHub": "Check Update On GitHub",
|
||||||
List: "List",
|
List: "List",
|
||||||
Add: "Add",
|
Add: "Add",
|
||||||
|
"Add Monitor": "Add Monitor",
|
||||||
|
"Add Maintenance": "Add Maintenance",
|
||||||
"Add New Monitor": "Add New Monitor",
|
"Add New Monitor": "Add New Monitor",
|
||||||
|
"Add New Maintenance": "Add New Maintenance",
|
||||||
"Quick Stats": "Quick Stats",
|
"Quick Stats": "Quick Stats",
|
||||||
Up: "Up",
|
Up: "Up",
|
||||||
Down: "Down",
|
Down: "Down",
|
||||||
|
@ -114,6 +130,7 @@ export default {
|
||||||
"Remember me": "Remember me",
|
"Remember me": "Remember me",
|
||||||
Login: "Login",
|
Login: "Login",
|
||||||
"No Monitors, please": "No Monitors, please",
|
"No Monitors, please": "No Monitors, please",
|
||||||
|
"No Maintenance, please": "No Maintenance, please",
|
||||||
"add one": "add one",
|
"add one": "add one",
|
||||||
"Notification Type": "Notification Type",
|
"Notification Type": "Notification Type",
|
||||||
Email: "Email",
|
Email: "Email",
|
||||||
|
|
|
@ -114,16 +114,15 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
titlePlaceholder() {
|
titlePlaceholder() {
|
||||||
return this.$t("Network infrastructure maintenance");
|
return this.$t("maintenanceTitleExample");
|
||||||
},
|
},
|
||||||
|
|
||||||
descriptionPlaceholder() {
|
descriptionPlaceholder() {
|
||||||
return this.$t("Example: Network infrastructure maintenance is underway which will affect some of our services.");
|
return this.$t("maintenanceDescriptionExample");
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
||||||
"$route.fullPath"() {
|
"$route.fullPath"() {
|
||||||
this.init();
|
this.init();
|
||||||
}
|
}
|
||||||
|
@ -137,7 +136,7 @@ export default {
|
||||||
Object.values(this.$root.monitorList).map(monitor => {
|
Object.values(this.$root.monitorList).map(monitor => {
|
||||||
this.affectedMonitorsOptions.push({
|
this.affectedMonitorsOptions.push({
|
||||||
id: monitor.id,
|
id: monitor.id,
|
||||||
name: monitor.name
|
name: monitor.name,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -173,14 +172,13 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
async submit() {
|
async submit() {
|
||||||
this.processing = true;
|
this.processing = true;
|
||||||
|
|
||||||
if (this.affectedMonitors.length === 0) {
|
if (this.affectedMonitors.length === 0) {
|
||||||
toast.error(this.$t("Select at least one affected monitor"));
|
toast.error(this.$t("atLeastOneMonitor"));
|
||||||
return this.processing = false;
|
return this.processing = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
<div v-if="maintenance">
|
<div v-if="maintenance">
|
||||||
<h1> {{ maintenance.title }}</h1>
|
<h1> {{ maintenance.title }}</h1>
|
||||||
<p class="url">
|
<p class="url">
|
||||||
<span>Start: {{ $root.datetimeMaintenance(maintenance.start_date) }}</span>
|
<span>{{$t("Start")}}: {{ $root.datetimeMaintenance(maintenance.start_date) }}</span>
|
||||||
<br>
|
<br>
|
||||||
<span>End: {{ $root.datetimeMaintenance(maintenance.end_date) }}</span>
|
<span>{{$t("End")}}: {{ $root.datetimeMaintenance(maintenance.end_date) }}</span>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="functions" style="margin-top: 10px">
|
<div class="functions" style="margin-top: 10px">
|
||||||
|
|
Loading…
Reference in New Issue