Merge pull request #2 from Saibamen/import-export

Separate import and export. Fix ESLint
pull/382/head
Ponkhy 3 years ago committed by GitHub
commit db9e97d859
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -120,7 +120,6 @@ export default {
enableDefaultNotificationDescription: "For hver ny overvåger aktiveres denne underretning som standard. Du kan stadig deaktivere underretningen separat for hver skærm.", enableDefaultNotificationDescription: "For hver ny overvåger aktiveres denne underretning som standard. Du kan stadig deaktivere underretningen separat for hver skærm.",
"Default enabled": "Standard aktiveret", "Default enabled": "Standard aktiveret",
"Also apply to existing monitors": "Anvend også på eksisterende overvågere", "Also apply to existing monitors": "Anvend også på eksisterende overvågere",
"Import/Export Backup": " Importér/Eksportér sikkerhedskopi",
Export: "Eksport", Export: "Eksport",
Import: "Import", Import: "Import",
backupDescription: "Du kan sikkerhedskopiere alle Overvågere og alle underretninger til en JSON-fil.", backupDescription: "Du kan sikkerhedskopiere alle Overvågere og alle underretninger til en JSON-fil.",

@ -113,7 +113,6 @@ export default {
"Create your admin account": "Erstelle dein Admin Konto", "Create your admin account": "Erstelle dein Admin Konto",
"Repeat Password": "Wiederhole das Passwort", "Repeat Password": "Wiederhole das Passwort",
"Resource Record Type": "Resource Record Type", "Resource Record Type": "Resource Record Type",
"Import/Export Backup": "Import/Export Backup",
"Export": "Export", "Export": "Export",
"Import": "Import", "Import": "Import",
respTime: "Antw. Zeit (ms)", respTime: "Antw. Zeit (ms)",
@ -132,7 +131,7 @@ export default {
importHandleDescription: "Wähle 'Vorhandene überspringen' aus, wenn jeder Monitor oder Benachrichtigung mit demselben Namen übersprungen werden soll. 'Überschreiben' löscht jeden vorhandenen Monitor sowie Benachrichtigungen.", importHandleDescription: "Wähle 'Vorhandene überspringen' aus, wenn jeder Monitor oder Benachrichtigung mit demselben Namen übersprungen werden soll. 'Überschreiben' löscht jeden vorhandenen Monitor sowie Benachrichtigungen.",
"Skip existing": "Vorhandene überspringen", "Skip existing": "Vorhandene überspringen",
"Overwrite": "Überschreiben", "Overwrite": "Überschreiben",
"Import Options": "Import Optionen", "Options": "Optionen",
confirmImportMsg: "Möchtest du das Backup wirklich importieren? Bitte stelle sicher, dass die richtige Import Option ausgewählt ist.", confirmImportMsg: "Möchtest du das Backup wirklich importieren? Bitte stelle sicher, dass die richtige Import Option ausgewählt ist.",
"Keep both": "Beide behalten", "Keep both": "Beide behalten",
twoFAVerifyLabel: "Bitte trage deinen Token ein um zu verifizieren das 2FA funktioniert", twoFAVerifyLabel: "Bitte trage deinen Token ein um zu verifizieren das 2FA funktioniert",

@ -117,7 +117,8 @@ export default {
"Last Result": "Last Result", "Last Result": "Last Result",
"Create your admin account": "Create your admin account", "Create your admin account": "Create your admin account",
"Repeat Password": "Repeat Password", "Repeat Password": "Repeat Password",
"Import/Export Backup": "Import/Export Backup", "Import Backup": "Import Backup",
"Export Backup": "Export Backup",
Export: "Export", Export: "Export",
Import: "Import", Import: "Import",
respTime: "Resp. Time (ms)", respTime: "Resp. Time (ms)",
@ -137,7 +138,7 @@ export default {
"Clear all statistics": "Clear all Statistics", "Clear all statistics": "Clear all Statistics",
"Skip existing": "Skip existing", "Skip existing": "Skip existing",
"Overwrite": "Overwrite", "Overwrite": "Overwrite",
"Import Options": "Import Options", "Options": "Options",
"Keep both": "Keep both", "Keep both": "Keep both",
"Verify Token": "Verify Token", "Verify Token": "Verify Token",
"Setup 2FA": "Setup 2FA", "Setup 2FA": "Setup 2FA",
@ -149,5 +150,4 @@ export default {
Inactive: "Inactive", Inactive: "Inactive",
Token: "Token", Token: "Token",
"Show URI": "Show URI", "Show URI": "Show URI",
"Clear all statistics": "Clear all Statistics"
} }

@ -120,7 +120,6 @@ export default {
enableDefaultNotificationDescription: "For every new monitor this notification will be enabled by default. You can still disable the notification separately for each monitor.", enableDefaultNotificationDescription: "For every new monitor this notification will be enabled by default. You can still disable the notification separately for each monitor.",
"Default enabled": "Default enabled", "Default enabled": "Default enabled",
"Also apply to existing monitors": "Also apply to existing monitors", "Also apply to existing monitors": "Also apply to existing monitors",
"Import/Export Backup": "Import/Export Backup",
Export: "Export", Export: "Export",
Import: "Import", Import: "Import",
backupDescription: "You can backup all monitors and all notifications into a JSON file.", backupDescription: "You can backup all monitors and all notifications into a JSON file.",

@ -113,7 +113,6 @@ export default {
clearEventsMsg: "Kas soovid seire kõik sündmused kustutada?", clearEventsMsg: "Kas soovid seire kõik sündmused kustutada?",
clearHeartbeatsMsg: "Kas soovid seire kõik tuksed kustutada?", clearHeartbeatsMsg: "Kas soovid seire kõik tuksed kustutada?",
confirmClearStatisticsMsg: "Kas soovid KÕIK statistika kustutada?", confirmClearStatisticsMsg: "Kas soovid KÕIK statistika kustutada?",
"Import/Export Backup": "Impordi/Ekspordi varukoopia",
Export: "Eksport", Export: "Eksport",
Import: "Import", Import: "Import",
"Default enabled": "Kasuta vaikimisi", "Default enabled": "Kasuta vaikimisi",

@ -120,7 +120,6 @@ export default {
enableDefaultNotificationDescription: "For every new monitor this notification will be enabled by default. You can still disable the notification separately for each monitor.", enableDefaultNotificationDescription: "For every new monitor this notification will be enabled by default. You can still disable the notification separately for each monitor.",
"Default enabled": "Default enabled", "Default enabled": "Default enabled",
"Also apply to existing monitors": "Also apply to existing monitors", "Also apply to existing monitors": "Also apply to existing monitors",
"Import/Export Backup": "Import/Export Backup",
Export: "Export", Export: "Export",
Import: "Import", Import: "Import",
backupDescription: "You can backup all monitors and all notifications into a JSON file.", backupDescription: "You can backup all monitors and all notifications into a JSON file.",

@ -118,7 +118,6 @@ export default {
Heartbeats: "Controlli", Heartbeats: "Controlli",
"Auto Get": "Auto Get", "Auto Get": "Auto Get",
enableDefaultNotificationDescription: "For every new monitor this notification will be enabled by default. You can still disable the notification separately for each monitor.", enableDefaultNotificationDescription: "For every new monitor this notification will be enabled by default. You can still disable the notification separately for each monitor.",
"Import/Export Backup": "Import/Export Backup",
Export: "Export", Export: "Export",
Import: "Import", Import: "Import",
"Default enabled": "Default enabled", "Default enabled": "Default enabled",

@ -120,7 +120,6 @@ export default {
enableDefaultNotificationDescription: "For every new monitor this notification will be enabled by default. You can still disable the notification separately for each monitor.", enableDefaultNotificationDescription: "For every new monitor this notification will be enabled by default. You can still disable the notification separately for each monitor.",
"Default enabled": "Default enabled", "Default enabled": "Default enabled",
"Also apply to existing monitors": "Also apply to existing monitors", "Also apply to existing monitors": "Also apply to existing monitors",
"Import/Export Backup": "Import/Export Backup",
Export: "Export", Export: "Export",
Import: "Import", Import: "Import",
backupDescription: "You can backup all monitors and all notifications into a JSON file.", backupDescription: "You can backup all monitors and all notifications into a JSON file.",

@ -120,7 +120,6 @@ export default {
enableDefaultNotificationDescription: "For every new monitor this notification will be enabled by default. You can still disable the notification separately for each monitor.", enableDefaultNotificationDescription: "For every new monitor this notification will be enabled by default. You can still disable the notification separately for each monitor.",
"Default enabled": "Default enabled", "Default enabled": "Default enabled",
"Also apply to existing monitors": "Also apply to existing monitors", "Also apply to existing monitors": "Also apply to existing monitors",
"Import/Export Backup": "Import/Export Backup",
Export: "Export", Export: "Export",
Import: "Import", Import: "Import",
backupDescription: "You can backup all monitors and all notifications into a JSON file.", backupDescription: "You can backup all monitors and all notifications into a JSON file.",

@ -120,7 +120,6 @@ export default {
enableDefaultNotificationDescription: "For every new monitor this notification will be enabled by default. You can still disable the notification separately for each monitor.", enableDefaultNotificationDescription: "For every new monitor this notification will be enabled by default. You can still disable the notification separately for each monitor.",
"Default enabled": "Default enabled", "Default enabled": "Default enabled",
"Also apply to existing monitors": "Also apply to existing monitors", "Also apply to existing monitors": "Also apply to existing monitors",
"Import/Export Backup": "Import/Export Backup",
Export: "Export", Export: "Export",
Import: "Import", Import: "Import",
backupDescription: "You can backup all monitors and all notifications into a JSON file.", backupDescription: "You can backup all monitors and all notifications into a JSON file.",

@ -120,7 +120,6 @@ export default {
enableDefaultNotificationDescription: "For every new monitor this notification will be enabled by default. You can still disable the notification separately for each monitor.", enableDefaultNotificationDescription: "For every new monitor this notification will be enabled by default. You can still disable the notification separately for each monitor.",
"Default enabled": "Default enabled", "Default enabled": "Default enabled",
"Also apply to existing monitors": "Also apply to existing monitors", "Also apply to existing monitors": "Also apply to existing monitors",
"Import/Export Backup": "Import/Export Backup",
Export: "Export", Export: "Export",
Import: "Import", Import: "Import",
backupDescription: "You can backup all monitors and all notifications into a JSON file.", backupDescription: "You can backup all monitors and all notifications into a JSON file.",

@ -120,7 +120,6 @@ export default {
enableDefaultNotificationDescription: "For every new monitor this notification will be enabled by default. You can still disable the notification separately for each monitor.", enableDefaultNotificationDescription: "For every new monitor this notification will be enabled by default. You can still disable the notification separately for each monitor.",
"Default enabled": "Default enabled", "Default enabled": "Default enabled",
"Also apply to existing monitors": "Also apply to existing monitors", "Also apply to existing monitors": "Also apply to existing monitors",
"Import/Export Backup": "Import/Export Backup",
Export: "Export", Export: "Export",
Import: "Import", Import: "Import",
backupDescription: "You can backup all monitors and all notifications into a JSON file.", backupDescription: "You can backup all monitors and all notifications into a JSON file.",

@ -120,7 +120,6 @@ export default {
enableDefaultNotificationDescription: "For every new monitor this notification will be enabled by default. You can still disable the notification separately for each monitor.", enableDefaultNotificationDescription: "For every new monitor this notification will be enabled by default. You can still disable the notification separately for each monitor.",
"Default enabled": "Default enabled", "Default enabled": "Default enabled",
"Also apply to existing monitors": "Also apply to existing monitors", "Also apply to existing monitors": "Also apply to existing monitors",
"Import/Export Backup": "Import/Export Backup",
Export: "Export", Export: "Export",
Import: "Import", Import: "Import",
backupDescription: "You can backup all monitors and all notifications into a JSON file.", backupDescription: "You can backup all monitors and all notifications into a JSON file.",

@ -120,7 +120,6 @@ export default {
enableDefaultNotificationDescription: "For every new monitor this notification will be enabled by default. You can still disable the notification separately for each monitor.", enableDefaultNotificationDescription: "For every new monitor this notification will be enabled by default. You can still disable the notification separately for each monitor.",
"Default enabled": "Default enabled", "Default enabled": "Default enabled",
"Also apply to existing monitors": "Also apply to existing monitors", "Also apply to existing monitors": "Also apply to existing monitors",
"Import/Export Backup": "Import/Export Backup",
Export: "Export", Export: "Export",
Import: "Import", Import: "Import",
backupDescription: "You can backup all monitors and all notifications into a JSON file.", backupDescription: "You can backup all monitors and all notifications into a JSON file.",

@ -120,7 +120,6 @@ export default {
enableDefaultNotificationDescription: "For every new monitor this notification will be enabled by default. You can still disable the notification separately for each monitor.", enableDefaultNotificationDescription: "For every new monitor this notification will be enabled by default. You can still disable the notification separately for each monitor.",
"Default enabled": "Default enabled", "Default enabled": "Default enabled",
"Also apply to existing monitors": "Also apply to existing monitors", "Also apply to existing monitors": "Also apply to existing monitors",
"Import/Export Backup": "Import/Export Backup",
Export: "Export", Export: "Export",
Import: "Import", Import: "Import",
backupDescription: "You can backup all monitors and all notifications into a JSON file.", backupDescription: "You can backup all monitors and all notifications into a JSON file.",

@ -120,7 +120,6 @@ export default {
enableDefaultNotificationDescription: "新的监控项将默认启用,你也可以在每个监控项中分别设置", enableDefaultNotificationDescription: "新的监控项将默认启用,你也可以在每个监控项中分别设置",
"Default enabled": "默认开启", "Default enabled": "默认开启",
"Also apply to existing monitors": "应用到所有监控项", "Also apply to existing monitors": "应用到所有监控项",
"Import/Export Backup": "导入/导出备份",
Export: "导出", Export: "导出",
Import: "导入", Import: "导入",
backupDescription: "你可以将所有的监控项和消息通知备份到一个 JSON 文件中", backupDescription: "你可以将所有的监控项和消息通知备份到一个 JSON 文件中",

@ -120,7 +120,6 @@ export default {
enableDefaultNotificationDescription: "新增監測器時這個通知會預設啟用,當然每個監測器亦可分別控制開關。", enableDefaultNotificationDescription: "新增監測器時這個通知會預設啟用,當然每個監測器亦可分別控制開關。",
"Default enabled": "預設通知", "Default enabled": "預設通知",
"Also apply to existing monitors": "同時取用至目前所有監測器", "Also apply to existing monitors": "同時取用至目前所有監測器",
"Import/Export Backup": "匯入/匯出 備份",
Export: "匯出", Export: "匯出",
Import: "匯入", Import: "匯入",
backupDescription: "您可以備份所有監測器及所有通知。", backupDescription: "您可以備份所有監測器及所有通知。",

@ -128,46 +128,54 @@
<button class="btn btn-primary me-2" type="button" @click="$refs.TwoFADialog.show()">{{ $t("2FA Settings") }}</button> <button class="btn btn-primary me-2" type="button" @click="$refs.TwoFADialog.show()">{{ $t("2FA Settings") }}</button>
</div> </div>
<h2 class="mt-5 mb-2">{{ $t("Import/Export Backup") }}</h2> <h2 class="mt-5 mb-2">{{ $t("Export Backup") }}</h2>
<p> <p>
{{ $t("backupDescription") }} <br /> {{ $t("backupDescription") }} <br />
({{ $t("backupDescription2") }}) <br /> ({{ $t("backupDescription2") }}) <br />
</p> </p>
<div class="input-group mb-2"> <div class="d-flex mb-2 justify-content-center">
<button class="btn btn-outline-primary" @click="downloadBackup">{{ $t("Export") }}</button> <button class="btn btn-primary" @click="downloadBackup">{{ $t("Export") }}</button>
<button type="button" class="btn btn-outline-primary" :disabled="processing" @click="confirmImport">
<div v-if="processing" class="spinner-border spinner-border-sm me-1"></div>
{{ $t("Import") }}
</button>
<input id="importBackup" type="file" class="form-control" accept="application/json">
</div> </div>
<label class="form-label">{{ $t("Import Options") }}:</label> <p><strong>{{ $t("backupDescription3") }}</strong></p>
<h2 class="mt-5 mb-2">{{ $t("Import Backup") }}</h2>
<label class="form-label">{{ $t("Options") }}:</label>
<br> <br>
<div class="form-check form-check-inline"> <div class="form-check form-check-inline">
<input v-model="importHandle" class="form-check-input" type="radio" name="radioImportHandle" id="radioKeep" value="keep"> <input id="radioKeep" v-model="importHandle" class="form-check-input" type="radio" name="radioImportHandle" value="keep">
<label class="form-check-label" for="radioKeep">{{ $t("Keep both") }}</label> <label class="form-check-label" for="radioKeep">{{ $t("Keep both") }}</label>
</div> </div>
<div class="form-check form-check-inline"> <div class="form-check form-check-inline">
<input v-model="importHandle" class="form-check-input" type="radio" name="radioImportHandle" id="radioSkip" value="skip"> <input id="radioSkip" v-model="importHandle" class="form-check-input" type="radio" name="radioImportHandle" value="skip">
<label class="form-check-label" for="radioSkip">{{ $t("Skip existing") }}</label> <label class="form-check-label" for="radioSkip">{{ $t("Skip existing") }}</label>
</div> </div>
<div class="form-check form-check-inline"> <div class="form-check form-check-inline">
<input v-model="importHandle" class="form-check-input" type="radio" name="radioImportHandle" id="radioOverwrite" value="overwrite"> <input id="radioOverwrite" v-model="importHandle" class="form-check-input" type="radio" name="radioImportHandle" value="overwrite">
<label class="form-check-label" for="radioOverwrite">{{ $t("Overwrite") }}</label> <label class="form-check-label" for="radioOverwrite">{{ $t("Overwrite") }}</label>
</div> </div>
<div class="form-text mb-2"> <div class="form-text mb-2">
{{ $t("importHandleDescription") }} {{ $t("importHandleDescription") }}
</div> </div>
<div class="mb-2">
<input id="importBackup" type="file" class="form-control" accept="application/json">
</div>
<div class="input-group mb-2 justify-content-end">
<button type="button" class="btn btn-outline-primary" :disabled="processing" @click="confirmImport">
<div v-if="processing" class="spinner-border spinner-border-sm me-1"></div>
{{ $t("Import") }}
</button>
</div>
<div v-if="importAlert" class="alert alert-danger mt-3" style="padding: 6px 16px;"> <div v-if="importAlert" class="alert alert-danger mt-3" style="padding: 6px 16px;">
{{ importAlert }} {{ importAlert }}
</div> </div>
<p><strong>{{ $t("backupDescription3") }}</strong></p>
<h2 class="mt-5 mb-2">{{ $t("Advanced") }}</h2> <h2 class="mt-5 mb-2">{{ $t("Advanced") }}</h2>
<div class="mb-3"> <div class="mb-3">

Loading…
Cancel
Save