<script setup>
// Copyright 2024 FlexCDN root@flexcdn.cn. All rights reserved. Official site: https://flexcdn.cn .

import ctxRef from "@/utils/ctx_ref.js"
import Context from "./scheduling.js"
import ChildLayout from "@/layouts/ChildLayout.vue";
import OriginSchedulingViewBox from "@/components/server/OriginSchedulingViewBox.vue";
import Menu from "./@menu.vue"
import WarningMessage from "@/components/common/WarningMessage.vue";

const ctx = ctxRef(new Context())

</script>

<template>
	<ChildLayout :ctx="ctx" :has-tab="true">
		<Menu :ctx="ctx" active-tab="scheduling"></Menu>

		<div v-if="!ctx.reverseProxyRef.isOn">
			<WarningMessage class="mt-0">当前网站的源站设置没有开启，可以通过点击 <a :href="'/lb/server/settings/reverseProxy/setting?serverId=' + ctx.serverId">[更多设置]</a> 开启 。</WarningMessage>
		</div>

		<OriginSchedulingViewBox :v-scheduling="ctx.scheduling" :v-params="'type=server&serverId=' + ctx.serverId + '&reverseProxyId=' + ctx.reverseProxyId"></OriginSchedulingViewBox>
	</ChildLayout>
</template>

<style lang="postcss" scoped>
</style>