mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
feat(site-editor): added alert if nginx is not running #425
This commit is contained in:
parent
3d58c016c8
commit
c2c3147b78
35 changed files with 93 additions and 53 deletions
|
@ -4,9 +4,12 @@ import { ReloadOutlined } from '@ant-design/icons-vue'
|
||||||
import ngx from '@/api/ngx'
|
import ngx from '@/api/ngx'
|
||||||
import { logLevel } from '@/views/config/constants'
|
import { logLevel } from '@/views/config/constants'
|
||||||
import { NginxStatus } from '@/constants'
|
import { NginxStatus } from '@/constants'
|
||||||
|
import { useGlobalStore } from '@/pinia/moudule/global'
|
||||||
|
|
||||||
const status = ref(0)
|
const global = useGlobalStore()
|
||||||
async function get_status() {
|
const { nginxStatus: status } = storeToRefs(global)
|
||||||
|
|
||||||
|
async function getStatus() {
|
||||||
const r = await ngx.status()
|
const r = await ngx.status()
|
||||||
if (r?.running === true)
|
if (r?.running === true)
|
||||||
status.value = NginxStatus.Running
|
status.value = NginxStatus.Running
|
||||||
|
@ -16,7 +19,7 @@ async function get_status() {
|
||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
|
||||||
function reload_nginx() {
|
function reloadNginx() {
|
||||||
status.value = NginxStatus.Reloading
|
status.value = NginxStatus.Reloading
|
||||||
ngx.reload().then(r => {
|
ngx.reload().then(r => {
|
||||||
if (r.level < logLevel.Warn)
|
if (r.level < logLevel.Warn)
|
||||||
|
@ -27,14 +30,14 @@ function reload_nginx() {
|
||||||
message.error(r.message)
|
message.error(r.message)
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
message.error(`${$gettext('Server error')} ${e?.message}`)
|
message.error(`${$gettext('Server error')} ${e?.message}`)
|
||||||
}).finally(() => get_status())
|
}).finally(() => getStatus())
|
||||||
}
|
}
|
||||||
|
|
||||||
async function restart_nginx() {
|
async function restartNginx() {
|
||||||
status.value = NginxStatus.Restarting
|
status.value = NginxStatus.Restarting
|
||||||
await ngx.restart()
|
await ngx.restart()
|
||||||
|
|
||||||
get_status().then(r => {
|
getStatus().then(r => {
|
||||||
if (r.level < logLevel.Warn)
|
if (r.level < logLevel.Warn)
|
||||||
message.success($gettext('Nginx restarted successfully'))
|
message.success($gettext('Nginx restarted successfully'))
|
||||||
else if (r.level === logLevel.Warn)
|
else if (r.level === logLevel.Warn)
|
||||||
|
@ -50,7 +53,7 @@ const visible = ref(false)
|
||||||
|
|
||||||
watch(visible, v => {
|
watch(visible, v => {
|
||||||
if (v)
|
if (v)
|
||||||
get_status()
|
getStatus()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -58,7 +61,7 @@ watch(visible, v => {
|
||||||
<APopover
|
<APopover
|
||||||
v-model:open="visible"
|
v-model:open="visible"
|
||||||
placement="bottomRight"
|
placement="bottomRight"
|
||||||
@confirm="reload_nginx"
|
@confirm="reloadNginx"
|
||||||
>
|
>
|
||||||
<template #content>
|
<template #content>
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
|
@ -88,14 +91,14 @@ watch(visible, v => {
|
||||||
<AButton
|
<AButton
|
||||||
size="small"
|
size="small"
|
||||||
type="link"
|
type="link"
|
||||||
@click="restart_nginx"
|
@click="restartNginx"
|
||||||
>
|
>
|
||||||
{{ $gettext('Restart') }}
|
{{ $gettext('Restart') }}
|
||||||
</AButton>
|
</AButton>
|
||||||
<AButton
|
<AButton
|
||||||
size="small"
|
size="small"
|
||||||
type="link"
|
type="link"
|
||||||
@click="reload_nginx"
|
@click="reloadNginx"
|
||||||
>
|
>
|
||||||
{{ $gettext('Reload') }}
|
{{ $gettext('Reload') }}
|
||||||
</AButton>
|
</AButton>
|
||||||
|
|
12
app/src/pinia/moudule/global.ts
Normal file
12
app/src/pinia/moudule/global.ts
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
import { defineStore } from 'pinia'
|
||||||
|
import type { NginxStatus } from '@/constants'
|
||||||
|
|
||||||
|
export const useGlobalStore = defineStore('global', () => {
|
||||||
|
const nginxStatus:
|
||||||
|
Ref<NginxStatus.Reloading | NginxStatus.Restarting | NginxStatus.Running | NginxStatus.Stopped>
|
||||||
|
= ref(0)
|
||||||
|
|
||||||
|
return {
|
||||||
|
nginxStatus,
|
||||||
|
}
|
||||||
|
})
|
|
@ -41,25 +41,25 @@ export const routes: RouteRecordRaw[] = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'domain',
|
path: 'sites',
|
||||||
name: 'Manage Sites',
|
name: 'Manage Sites',
|
||||||
component: () => import('@/layouts/BaseRouterView.vue'),
|
component: () => import('@/layouts/BaseRouterView.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
name: () => $gettext('Manage Sites'),
|
name: () => $gettext('Manage Sites'),
|
||||||
icon: CloudOutlined,
|
icon: CloudOutlined,
|
||||||
},
|
},
|
||||||
redirect: '/domain/list',
|
redirect: '/sites/list',
|
||||||
children: [{
|
children: [{
|
||||||
path: 'list',
|
path: 'list',
|
||||||
name: 'Sites List',
|
name: 'Sites List',
|
||||||
component: () => import('@/views/domain/DomainList.vue'),
|
component: () => import('@/views/site/SiteList.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
name: () => $gettext('Sites List'),
|
name: () => $gettext('Sites List'),
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
path: 'add',
|
path: 'add',
|
||||||
name: 'Add Site',
|
name: 'Add Site',
|
||||||
component: () => import('@/views/domain/DomainAdd.vue'),
|
component: () => import('@/views/site/SiteAdd.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
name: () => $gettext('Add Site'),
|
name: () => $gettext('Add Site'),
|
||||||
lastRouteName: 'Sites List',
|
lastRouteName: 'Sites List',
|
||||||
|
@ -67,7 +67,7 @@ export const routes: RouteRecordRaw[] = [
|
||||||
}, {
|
}, {
|
||||||
path: ':name',
|
path: ':name',
|
||||||
name: 'Edit Site',
|
name: 'Edit Site',
|
||||||
component: () => import('@/views/domain/DomainEdit.vue'),
|
component: () => import('@/views/site/SiteEdit.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
name: () => $gettext('Edit Site'),
|
name: () => $gettext('Edit Site'),
|
||||||
hiddenInSidebar: true,
|
hiddenInSidebar: true,
|
||||||
|
@ -183,7 +183,7 @@ export const routes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
path: 'terminal',
|
path: 'terminal',
|
||||||
name: 'Terminal',
|
name: 'Terminal',
|
||||||
component: () => import('@/views/pty/Terminal.vue'),
|
component: () => import('@/views/terminal/Terminal.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
name: () => $gettext('Terminal'),
|
name: () => $gettext('Terminal'),
|
||||||
icon: CodeOutlined,
|
icon: CodeOutlined,
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
import type { Ref } from 'vue'
|
import type { Ref } from 'vue'
|
||||||
import { message } from 'ant-design-vue'
|
import { message } from 'ant-design-vue'
|
||||||
import { AutoCertState } from '@/constants'
|
import { AutoCertState } from '@/constants'
|
||||||
import CertInfo from '@/views/domain/cert/CertInfo.vue'
|
import CertInfo from '@/views/site/cert/CertInfo.vue'
|
||||||
import AutoCertStepOne from '@/views/domain/cert/components/AutoCertStepOne.vue'
|
import AutoCertStepOne from '@/views/site/cert/components/AutoCertStepOne.vue'
|
||||||
import CodeEditor from '@/components/CodeEditor/CodeEditor.vue'
|
import CodeEditor from '@/components/CodeEditor/CodeEditor.vue'
|
||||||
import type { Cert } from '@/api/cert'
|
import type { Cert } from '@/api/cert'
|
||||||
import cert from '@/api/cert'
|
import cert from '@/api/cert'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { message } from 'ant-design-vue'
|
import { message } from 'ant-design-vue'
|
||||||
import ObtainCertLive from '@/views/domain/cert/components/ObtainCertLive.vue'
|
import ObtainCertLive from '@/views/site/cert/components/ObtainCertLive.vue'
|
||||||
import type { AutoCertOptions } from '@/api/auto_cert'
|
import type { AutoCertOptions } from '@/api/auto_cert'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { Ref } from 'vue'
|
import type { Ref } from 'vue'
|
||||||
import { message } from 'ant-design-vue'
|
import { message } from 'ant-design-vue'
|
||||||
import ObtainCertLive from '@/views/domain/cert/components/ObtainCertLive.vue'
|
import ObtainCertLive from '@/views/site/cert/components/ObtainCertLive.vue'
|
||||||
import type { AutoCertOptions } from '@/api/auto_cert'
|
import type { AutoCertOptions } from '@/api/auto_cert'
|
||||||
import AutoCertStepOne from '@/views/domain/cert/components/AutoCertStepOne.vue'
|
import AutoCertStepOne from '@/views/site/cert/components/AutoCertStepOne.vue'
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
issued: [void]
|
issued: [void]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { message } from 'ant-design-vue'
|
import { message } from 'ant-design-vue'
|
||||||
import DirectiveEditor from '@/views/domain/ngx_conf/directive/DirectiveEditor.vue'
|
import DirectiveEditor from '@/views/site/ngx_conf/directive/DirectiveEditor.vue'
|
||||||
import LocationEditor from '@/views/domain/ngx_conf/LocationEditor.vue'
|
import LocationEditor from '@/views/site/ngx_conf/LocationEditor.vue'
|
||||||
import NgxConfigEditor from '@/views/domain/ngx_conf/NgxConfigEditor.vue'
|
import NgxConfigEditor from '@/views/site/ngx_conf/NgxConfigEditor.vue'
|
||||||
import domain from '@/api/domain'
|
import domain from '@/api/domain'
|
||||||
import type { NgxConfig } from '@/api/ngx'
|
import type { NgxConfig } from '@/api/ngx'
|
||||||
import ngx from '@/api/ngx'
|
import ngx from '@/api/ngx'
|
||||||
|
@ -51,7 +51,7 @@ async function save() {
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
function goto_modify() {
|
function goto_modify() {
|
||||||
router.push(`/domain/${ngx_config.name}`)
|
router.push(`/sites/${ngx_config.name}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
function create_another() {
|
function create_another() {
|
|
@ -3,13 +3,13 @@ import { message } from 'ant-design-vue'
|
||||||
import FooterToolBar from '@/components/FooterToolbar/FooterToolBar.vue'
|
import FooterToolBar from '@/components/FooterToolbar/FooterToolBar.vue'
|
||||||
import CodeEditor from '@/components/CodeEditor/CodeEditor.vue'
|
import CodeEditor from '@/components/CodeEditor/CodeEditor.vue'
|
||||||
|
|
||||||
import NgxConfigEditor from '@/views/domain/ngx_conf/NgxConfigEditor.vue'
|
import NgxConfigEditor from '@/views/site/ngx_conf/NgxConfigEditor.vue'
|
||||||
import type { Site } from '@/api/domain'
|
import type { Site } from '@/api/domain'
|
||||||
import domain from '@/api/domain'
|
import domain from '@/api/domain'
|
||||||
import type { NgxConfig } from '@/api/ngx'
|
import type { NgxConfig } from '@/api/ngx'
|
||||||
import ngx from '@/api/ngx'
|
import ngx from '@/api/ngx'
|
||||||
import config from '@/api/config'
|
import config from '@/api/config'
|
||||||
import RightSettings from '@/views/domain/components/RightSettings.vue'
|
import RightSettings from '@/views/site/components/RightSettings.vue'
|
||||||
import type { CertificateInfo } from '@/api/cert'
|
import type { CertificateInfo } from '@/api/cert'
|
||||||
import type { ChatComplicationMessage } from '@/api/openai'
|
import type { ChatComplicationMessage } from '@/api/openai'
|
||||||
import type { CheckedType } from '@/types'
|
import type { CheckedType } from '@/types'
|
||||||
|
@ -137,7 +137,7 @@ const save = async () => {
|
||||||
}).then(r => {
|
}).then(r => {
|
||||||
handle_response(r)
|
handle_response(r)
|
||||||
router.push({
|
router.push({
|
||||||
path: `/domain/${filename.value}`,
|
path: `/sites/${filename.value}`,
|
||||||
query: route.query,
|
query: route.query,
|
||||||
})
|
})
|
||||||
message.success($gettext('Saved successfully'))
|
message.success($gettext('Saved successfully'))
|
||||||
|
@ -249,7 +249,7 @@ provide('data', data)
|
||||||
|
|
||||||
<FooterToolBar>
|
<FooterToolBar>
|
||||||
<ASpace>
|
<ASpace>
|
||||||
<AButton @click="$router.push('/domain/list')">
|
<AButton @click="$router.push('/sites/list')">
|
||||||
{{ $gettext('Back') }}
|
{{ $gettext('Back') }}
|
||||||
</AButton>
|
</AButton>
|
||||||
<AButton
|
<AButton
|
|
@ -5,7 +5,7 @@ import type { customRender } from '@/components/StdDesign/StdDataDisplay/StdTabl
|
||||||
import { datetime } from '@/components/StdDesign/StdDataDisplay/StdTableTransformer'
|
import { datetime } from '@/components/StdDesign/StdDataDisplay/StdTableTransformer'
|
||||||
import domain from '@/api/domain'
|
import domain from '@/api/domain'
|
||||||
import { input } from '@/components/StdDesign/StdDataEntry'
|
import { input } from '@/components/StdDesign/StdDataEntry'
|
||||||
import SiteDuplicate from '@/views/domain/components/SiteDuplicate.vue'
|
import SiteDuplicate from '@/views/site/components/SiteDuplicate.vue'
|
||||||
import InspectConfig from '@/views/config/InspectConfig.vue'
|
import InspectConfig from '@/views/config/InspectConfig.vue'
|
||||||
import type { Column, JSXElements } from '@/components/StdDesign/types'
|
import type { Column, JSXElements } from '@/components/StdDesign/types'
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ watch(route, () => {
|
||||||
disable-delete
|
disable-delete
|
||||||
disable-view
|
disable-view
|
||||||
@click-edit="r => $router.push({
|
@click-edit="r => $router.push({
|
||||||
path: `/domain/${r}`,
|
path: `/sites/${r}`,
|
||||||
})"
|
})"
|
||||||
>
|
>
|
||||||
<template #actions="{ record }">
|
<template #actions="{ record }">
|
|
@ -1,7 +1,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import CertInfo from '@/views/domain/cert/CertInfo.vue'
|
import CertInfo from '@/views/site/cert/CertInfo.vue'
|
||||||
import IssueCert from '@/views/domain/cert/IssueCert.vue'
|
import IssueCert from '@/views/site/cert/IssueCert.vue'
|
||||||
import ChangeCert from '@/views/domain/cert/components/ChangeCert/ChangeCert.vue'
|
import ChangeCert from '@/views/site/cert/components/ChangeCert/ChangeCert.vue'
|
||||||
import type { Cert, CertificateInfo } from '@/api/cert'
|
import type { Cert, CertificateInfo } from '@/api/cert'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import ObtainCert from '@/views/domain/cert/components/ObtainCert.vue'
|
import ObtainCert from '@/views/site/cert/components/ObtainCert.vue'
|
||||||
import type { NgxDirective } from '@/api/ngx'
|
import type { NgxDirective } from '@/api/ngx'
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
|
@ -1,7 +1,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { $gettext } from '../../../../gettext'
|
import { $gettext } from '../../../../gettext'
|
||||||
import type { AutoCertOptions } from '@/api/auto_cert'
|
import type { AutoCertOptions } from '@/api/auto_cert'
|
||||||
import DNSChallenge from '@/views/domain/cert/components/DNSChallenge.vue'
|
import DNSChallenge from '@/views/site/cert/components/DNSChallenge.vue'
|
||||||
import ACMEUserSelector from '@/views/certificate/ACMEUserSelector.vue'
|
import ACMEUserSelector from '@/views/certificate/ACMEUserSelector.vue'
|
||||||
import { PrivateKeyTypeList } from '@/constants'
|
import { PrivateKeyTypeList } from '@/constants'
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
import { Modal, message } from 'ant-design-vue'
|
import { Modal, message } from 'ant-design-vue'
|
||||||
import type { ComputedRef, Ref } from 'vue'
|
import type { ComputedRef, Ref } from 'vue'
|
||||||
import domain from '@/api/domain'
|
import domain from '@/api/domain'
|
||||||
import AutoCertStepOne from '@/views/domain/cert/components/AutoCertStepOne.vue'
|
import AutoCertStepOne from '@/views/site/cert/components/AutoCertStepOne.vue'
|
||||||
import type { NgxConfig, NgxDirective } from '@/api/ngx'
|
import type { NgxConfig, NgxDirective } from '@/api/ngx'
|
||||||
import type { AutoCertOptions } from '@/api/auto_cert'
|
import type { AutoCertOptions } from '@/api/auto_cert'
|
||||||
import ObtainCertLive from '@/views/domain/cert/components/ObtainCertLive.vue'
|
import ObtainCertLive from '@/views/site/cert/components/ObtainCertLive.vue'
|
||||||
import type { CertificateResult } from '@/api/cert'
|
import type { CertificateResult } from '@/api/cert'
|
||||||
import type { PrivateKeyType } from '@/constants'
|
import type { PrivateKeyType } from '@/constants'
|
||||||
|
|
|
@ -5,7 +5,7 @@ import type { Site } from '@/api/domain'
|
||||||
import domain from '@/api/domain'
|
import domain from '@/api/domain'
|
||||||
import ChatGPT from '@/components/ChatGPT/ChatGPT.vue'
|
import ChatGPT from '@/components/ChatGPT/ChatGPT.vue'
|
||||||
import { formatDateTime } from '@/lib/helper'
|
import { formatDateTime } from '@/lib/helper'
|
||||||
import Deploy from '@/views/domain/components/Deploy.vue'
|
import Deploy from '@/views/site/components/Deploy.vue'
|
||||||
import { useSettingsStore } from '@/pinia'
|
import { useSettingsStore } from '@/pinia'
|
||||||
import type { ChatComplicationMessage } from '@/api/openai'
|
import type { ChatComplicationMessage } from '@/api/openai'
|
||||||
import type { CheckedType } from '@/types'
|
import type { CheckedType } from '@/types'
|
21
app/src/views/site/ngx_conf/NginxStatusAlert.vue
Normal file
21
app/src/views/site/ngx_conf/NginxStatusAlert.vue
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { useGlobalStore } from '@/pinia/moudule/global'
|
||||||
|
import { NginxStatus } from '@/constants'
|
||||||
|
|
||||||
|
const global = useGlobalStore()
|
||||||
|
const { nginxStatus: status } = storeToRefs(global)
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<AAlert
|
||||||
|
v-if="status !== NginxStatus.Running"
|
||||||
|
class="mb-4"
|
||||||
|
type="warning"
|
||||||
|
show-icon
|
||||||
|
:message="$gettext('Nginx is not running')"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
|
||||||
|
</style>
|
|
@ -5,9 +5,10 @@ import CodeEditor from '@/components/CodeEditor/CodeEditor.vue'
|
||||||
import template from '@/api/template'
|
import template from '@/api/template'
|
||||||
import type { NgxConfig, NgxDirective } from '@/api/ngx'
|
import type { NgxConfig, NgxDirective } from '@/api/ngx'
|
||||||
import type { CertificateInfo } from '@/api/cert'
|
import type { CertificateInfo } from '@/api/cert'
|
||||||
import NgxServer from '@/views/domain/ngx_conf/NgxServer.vue'
|
import NgxServer from '@/views/site/ngx_conf/NgxServer.vue'
|
||||||
import NgxUpstream from '@/views/domain/ngx_conf/NgxUpstream.vue'
|
import NgxUpstream from '@/views/site/ngx_conf/NgxUpstream.vue'
|
||||||
import type { CheckedType } from '@/types'
|
import type { CheckedType } from '@/types'
|
||||||
|
import NginxStatusAlert from '@/views/site/ngx_conf/NginxStatusAlert.vue'
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
autoCert?: boolean
|
autoCert?: boolean
|
||||||
|
@ -175,6 +176,9 @@ const activeKey = ref(['3'])
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<ContextHolder />
|
<ContextHolder />
|
||||||
|
|
||||||
|
<NginxStatusAlert />
|
||||||
|
|
||||||
<AFormItem
|
<AFormItem
|
||||||
v-if="!support_ssl && context === 'http'"
|
v-if="!support_ssl && context === 'http'"
|
||||||
:label="$gettext('Enable TLS')"
|
:label="$gettext('Enable TLS')"
|
|
@ -1,11 +1,11 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { MoreOutlined, PlusOutlined } from '@ant-design/icons-vue'
|
import { MoreOutlined, PlusOutlined } from '@ant-design/icons-vue'
|
||||||
import { Modal } from 'ant-design-vue'
|
import { Modal } from 'ant-design-vue'
|
||||||
import LogEntry from '@/views/domain/ngx_conf/LogEntry.vue'
|
import LogEntry from '@/views/site/ngx_conf/LogEntry.vue'
|
||||||
import ConfigTemplate from '@/views/domain/ngx_conf/config_template/ConfigTemplate.vue'
|
import ConfigTemplate from '@/views/site/ngx_conf/config_template/ConfigTemplate.vue'
|
||||||
import LocationEditor from '@/views/domain/ngx_conf/LocationEditor.vue'
|
import LocationEditor from '@/views/site/ngx_conf/LocationEditor.vue'
|
||||||
import Cert from '@/views/domain/cert/Cert.vue'
|
import Cert from '@/views/site/cert/Cert.vue'
|
||||||
import DirectiveEditor from '@/views/domain/ngx_conf/directive/DirectiveEditor.vue'
|
import DirectiveEditor from '@/views/site/ngx_conf/directive/DirectiveEditor.vue'
|
||||||
import type { NgxConfig, NgxDirective } from '@/api/ngx'
|
import type { NgxConfig, NgxDirective } from '@/api/ngx'
|
||||||
import type { CertificateInfo } from '@/api/cert'
|
import type { CertificateInfo } from '@/api/cert'
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { MoreOutlined, PlusOutlined } from '@ant-design/icons-vue'
|
||||||
import { Modal } from 'ant-design-vue'
|
import { Modal } from 'ant-design-vue'
|
||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
import type { NgxConfig, NgxDirective } from '@/api/ngx'
|
import type { NgxConfig, NgxDirective } from '@/api/ngx'
|
||||||
import DirectiveEditor from '@/views/domain/ngx_conf/directive/DirectiveEditor.vue'
|
import DirectiveEditor from '@/views/site/ngx_conf/directive/DirectiveEditor.vue'
|
||||||
import type { UpstreamStatus } from '@/api/upstream'
|
import type { UpstreamStatus } from '@/api/upstream'
|
||||||
import upstream from '@/api/upstream'
|
import upstream from '@/api/upstream'
|
||||||
|
|
|
@ -5,10 +5,10 @@ import type { Template } from '@/api/template'
|
||||||
import template from '@/api/template'
|
import template from '@/api/template'
|
||||||
import { useSettingsStore } from '@/pinia'
|
import { useSettingsStore } from '@/pinia'
|
||||||
|
|
||||||
import DirectiveEditor from '@/views/domain/ngx_conf/directive/DirectiveEditor.vue'
|
import DirectiveEditor from '@/views/site/ngx_conf/directive/DirectiveEditor.vue'
|
||||||
import LocationEditor from '@/views/domain/ngx_conf/LocationEditor.vue'
|
import LocationEditor from '@/views/site/ngx_conf/LocationEditor.vue'
|
||||||
import CodeEditor from '@/components/CodeEditor/CodeEditor.vue'
|
import CodeEditor from '@/components/CodeEditor/CodeEditor.vue'
|
||||||
import TemplateForm from '@/views/domain/ngx_conf/config_template/TemplateForm.vue'
|
import TemplateForm from '@/views/site/ngx_conf/config_template/TemplateForm.vue'
|
||||||
import type { NgxConfig } from '@/api/ngx'
|
import type { NgxConfig } from '@/api/ngx'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import TemplateFormItem from '@/views/domain/ngx_conf/config_template/TemplateFormItem.vue'
|
import TemplateFormItem from '@/views/site/ngx_conf/config_template/TemplateFormItem.vue'
|
||||||
import type { Variable } from '@/api/template'
|
import type { Variable } from '@/api/template'
|
||||||
|
|
||||||
const data = defineModel<Record<string, Variable>>({
|
const data = defineModel<Record<string, Variable>>({
|
|
@ -2,7 +2,7 @@
|
||||||
import Draggable from 'vuedraggable'
|
import Draggable from 'vuedraggable'
|
||||||
import type { ComputedRef } from 'vue'
|
import type { ComputedRef } from 'vue'
|
||||||
import DirectiveAdd from './DirectiveAdd.vue'
|
import DirectiveAdd from './DirectiveAdd.vue'
|
||||||
import DirectiveEditorItem from '@/views/domain/ngx_conf/directive/DirectiveEditorItem.vue'
|
import DirectiveEditorItem from '@/views/site/ngx_conf/directive/DirectiveEditorItem.vue'
|
||||||
import type { NgxDirective } from '@/api/ngx'
|
import type { NgxDirective } from '@/api/ngx'
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
|
@ -4,7 +4,7 @@ import type { Ref } from 'vue'
|
||||||
import FooterToolBar from '@/components/FooterToolbar/FooterToolBar.vue'
|
import FooterToolBar from '@/components/FooterToolbar/FooterToolBar.vue'
|
||||||
import CodeEditor from '@/components/CodeEditor/CodeEditor.vue'
|
import CodeEditor from '@/components/CodeEditor/CodeEditor.vue'
|
||||||
|
|
||||||
import NgxConfigEditor from '@/views/domain/ngx_conf/NgxConfigEditor.vue'
|
import NgxConfigEditor from '@/views/site/ngx_conf/NgxConfigEditor.vue'
|
||||||
import type { NgxConfig } from '@/api/ngx'
|
import type { NgxConfig } from '@/api/ngx'
|
||||||
import ngx from '@/api/ngx'
|
import ngx from '@/api/ngx'
|
||||||
import config from '@/api/config'
|
import config from '@/api/config'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue