mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-21 13:40:27 +08:00
Merge branch 'master' into 1.23.X-merge-to-2.X.X-2
# Conflicts: # package.json
This commit is contained in:
@@ -144,6 +144,30 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Remote Browser -->
|
||||
<div v-if="monitor.type === 'real-browser'" class="my-3">
|
||||
<!-- Toggle -->
|
||||
<div class="my-3 form-check">
|
||||
<input id="toggle" v-model="remoteBrowsersToggle" class="form-check-input" type="checkbox">
|
||||
<label class="form-check-label" for="toggle">
|
||||
{{ $t("useRemoteBrowser") }}
|
||||
</label>
|
||||
<div class="form-text">
|
||||
{{ $t("remoteBrowserToggle") }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="remoteBrowsersToggle">
|
||||
<label for="remote-browser" class="form-label">{{ $t("Remote Browser") }}</label>
|
||||
<ActionSelect
|
||||
v-model="monitor.remote_browser"
|
||||
:options="remoteBrowsersOptions"
|
||||
icon="plus"
|
||||
:action="() => $refs.remoteBrowserDialog.show()"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Json Query -->
|
||||
<div v-if="monitor.type === 'json-query'" class="my-3">
|
||||
<label for="jsonPath" class="form-label">{{ $t("Json Query") }}</label>
|
||||
@@ -838,6 +862,7 @@
|
||||
<DockerHostDialog ref="dockerHostDialog" @added="addedDockerHost" />
|
||||
<ProxyDialog ref="proxyDialog" @added="addedProxy" />
|
||||
<CreateGroupDialog ref="createGroupDialog" @added="addedDraftGroup" />
|
||||
<RemoteBrowserDialog ref="remoteBrowserDialog" @added="addedRemoteBrowser" />
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
@@ -850,6 +875,7 @@ import CopyableInput from "../components/CopyableInput.vue";
|
||||
import CreateGroupDialog from "../components/CreateGroupDialog.vue";
|
||||
import NotificationDialog from "../components/NotificationDialog.vue";
|
||||
import DockerHostDialog from "../components/DockerHostDialog.vue";
|
||||
import RemoteBrowserDialog from "../components/RemoteBrowserDialog.vue";
|
||||
import ProxyDialog from "../components/ProxyDialog.vue";
|
||||
import TagsManager from "../components/TagsManager.vue";
|
||||
import { genSecret, isDev, MAX_INTERVAL_SECOND, MIN_INTERVAL_SECOND } from "../util.ts";
|
||||
@@ -898,6 +924,7 @@ const monitorDefaults = {
|
||||
kafkaProducerSsl: false,
|
||||
kafkaProducerAllowAutoTopicCreation: false,
|
||||
gamedigGivenPortOnly: true,
|
||||
remote_browser: null
|
||||
};
|
||||
|
||||
export default {
|
||||
@@ -909,6 +936,7 @@ export default {
|
||||
CreateGroupDialog,
|
||||
NotificationDialog,
|
||||
DockerHostDialog,
|
||||
RemoteBrowserDialog,
|
||||
TagsManager,
|
||||
VueMultiselect,
|
||||
},
|
||||
@@ -936,6 +964,7 @@ export default {
|
||||
"mongodb": "mongodb://username:password@host:port/database",
|
||||
},
|
||||
draftGroupName: null,
|
||||
remoteBrowsersEnabled: false,
|
||||
};
|
||||
},
|
||||
|
||||
@@ -959,7 +988,31 @@ export default {
|
||||
}
|
||||
return this.$t(name);
|
||||
},
|
||||
|
||||
remoteBrowsersOptions() {
|
||||
return this.$root.remoteBrowserList.map(browser => {
|
||||
return {
|
||||
label: browser.name,
|
||||
value: browser.id,
|
||||
};
|
||||
});
|
||||
},
|
||||
remoteBrowsersToggle: {
|
||||
get() {
|
||||
return this.remoteBrowsersEnabled || this.monitor.remote_browser != null;
|
||||
},
|
||||
set(value) {
|
||||
if (value) {
|
||||
this.remoteBrowsersEnabled = true;
|
||||
if (this.monitor.remote_browser == null && this.$root.remoteBrowserList.length > 0) {
|
||||
// set a default remote browser if there is one. Otherwise, the user will have to select one manually.
|
||||
this.monitor.remote_browser = this.$root.remoteBrowserList[0].id;
|
||||
}
|
||||
} else {
|
||||
this.remoteBrowsersEnabled = false;
|
||||
this.monitor.remote_browser = null;
|
||||
}
|
||||
}
|
||||
},
|
||||
isAdd() {
|
||||
return this.$route.path === "/add";
|
||||
},
|
||||
|
Reference in New Issue
Block a user