minor fixes (missing commas, spaces, translations)

This commit is contained in:
Karel Krýda 2022-01-23 20:33:39 +01:00
parent 0d3414c6d6
commit 5fda1f0f59
7 changed files with 29 additions and 14 deletions

View File

@ -17,7 +17,7 @@ class Maintenance extends BeanModel {
title: this.title,
description: this.description,
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,
description: this.description,
start_date: this.start_date,
end_date: this.end_date
end_date: this.end_date,
};
}
}

View File

@ -6,7 +6,7 @@ dayjs.extend(utc);
dayjs.extend(timezone);
const axios = require("axios");
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 { R } = require("redbean-node");
const { BeanModel } = require("redbean-node/dist/bean-model");

View File

@ -5,7 +5,7 @@ const server = require("../server");
const apicache = require("../modules/apicache");
const Monitor = require("../model/monitor");
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 cache = apicache.middleware;

View File

@ -66,7 +66,7 @@
import HeartbeatBar from "../components/HeartbeatBar.vue";
import Uptime from "../components/Uptime.vue";
import Tag from "../components/Tag.vue";
import {getMaintenanceRelativeURL, getMonitorRelativeURL} from "../util.ts";
import {getMaintenanceRelativeURL, getMonitorRelativeURL } from "../util.ts";
export default {
components: {
@ -82,7 +82,7 @@ export default {
data() {
return {
searchText: "",
selectedList: "monitor"
selectedList: "monitor",
};
},
computed: {

View File

@ -7,7 +7,20 @@ export default {
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.",
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",
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.",
notificationDescription: "Notifications must be assigned to a monitor to function.",
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",
List: "List",
Add: "Add",
"Add Monitor": "Add Monitor",
"Add Maintenance": "Add Maintenance",
"Add New Monitor": "Add New Monitor",
"Add New Maintenance": "Add New Maintenance",
"Quick Stats": "Quick Stats",
Up: "Up",
Down: "Down",
@ -114,6 +130,7 @@ export default {
"Remember me": "Remember me",
Login: "Login",
"No Monitors, please": "No Monitors, please",
"No Maintenance, please": "No Maintenance, please",
"add one": "add one",
"Notification Type": "Notification Type",
Email: "Email",

View File

@ -114,16 +114,15 @@ export default {
},
titlePlaceholder() {
return this.$t("Network infrastructure maintenance");
return this.$t("maintenanceTitleExample");
},
descriptionPlaceholder() {
return this.$t("Example: Network infrastructure maintenance is underway which will affect some of our services.");
return this.$t("maintenanceDescriptionExample");
}
},
watch: {
"$route.fullPath"() {
this.init();
}
@ -137,7 +136,7 @@ export default {
Object.values(this.$root.monitorList).map(monitor => {
this.affectedMonitorsOptions.push({
id: monitor.id,
name: monitor.name
name: monitor.name,
});
});
}
@ -173,14 +172,13 @@ export default {
}
});
}
},
async submit() {
this.processing = true;
if (this.affectedMonitors.length === 0) {
toast.error(this.$t("Select at least one affected monitor"));
toast.error(this.$t("atLeastOneMonitor"));
return this.processing = false;
}

View File

@ -3,9 +3,9 @@
<div v-if="maintenance">
<h1> {{ maintenance.title }}</h1>
<p class="url">
<span>Start: {{ $root.datetimeMaintenance(maintenance.start_date) }}</span>
<span>{{$t("Start")}}: {{ $root.datetimeMaintenance(maintenance.start_date) }}</span>
<br>
<span>End: {{ $root.datetimeMaintenance(maintenance.end_date) }}</span>
<span>{{$t("End")}}: {{ $root.datetimeMaintenance(maintenance.end_date) }}</span>
</p>
<div class="functions" style="margin-top: 10px">