diff --git a/frontend/src/components/StdDataDisplay/StdTable.vue b/frontend/src/components/StdDataDisplay/StdTable.vue index f7611d4e..1d64e96b 100644 --- a/frontend/src/components/StdDataDisplay/StdTable.vue +++ b/frontend/src/components/StdDataDisplay/StdTable.vue @@ -525,7 +525,7 @@ function initSortable() { :okText="$gettext('OK')" :title="$gettext('Are you sure you want to delete?')" @confirm="destroy(record[rowKey])"> - Delete + {{ $gettext('Delete') }} diff --git a/frontend/src/views/dashboard/DashBoard.vue b/frontend/src/views/dashboard/DashBoard.vue index c535270f..e2487c20 100644 --- a/frontend/src/views/dashboard/DashBoard.vue +++ b/frontend/src/views/dashboard/DashBoard.vue @@ -164,7 +164,7 @@ function wsOnMessage(m: { data: any }) {

{{ $gettext('CPU:') + ' ' }} - {{ cpu_info[0]?.modelName }} + {{ cpu_info[0]?.modelName || 'core' }} {{ (cpu_info[0]?.mhz / 1000).toFixed(2) + 'GHz' }} * {{ cpu_info.length }}

@@ -303,10 +303,6 @@ function wsOnMessage(m: { data: any }) { } } -.os-platform { - text-transform: capitalize; -} - .load-avg-describe { @media (max-width: 1600px) and (min-width: 1200px) { display: none; diff --git a/frontend/src/views/domain/DomainEdit.vue b/frontend/src/views/domain/DomainEdit.vue index 6d9fe629..564a7ddb 100644 --- a/frontend/src/views/domain/DomainEdit.vue +++ b/frontend/src/views/domain/DomainEdit.vue @@ -25,7 +25,7 @@ watch(route, () => { const update = ref(0) const ngx_config = reactive({ - filename: '', + name: '', upstreams: [], servers: [] }) diff --git a/frontend/src/views/domain/cert/Cert.vue b/frontend/src/views/domain/cert/Cert.vue index d32c51cd..f559432d 100644 --- a/frontend/src/views/domain/cert/Cert.vue +++ b/frontend/src/views/domain/cert/Cert.vue @@ -7,7 +7,7 @@ import ChangeCert from '@/views/domain/cert/ChangeCert.vue' const {$gettext} = useGettext() -const props = defineProps(['directivesMap', 'current_server_directives', 'enabled', 'cert_info']) +const props = defineProps(['config_name', 'directivesMap', 'current_server_directives', 'enabled', 'cert_info']) const emit = defineEmits(['callback', 'update:enabled']) @@ -38,6 +38,7 @@ const enabled = computed({ import {useGettext} from 'vue3-gettext' -import {computed, h, nextTick, onMounted, ref, VNode, watch} from 'vue' +import {computed, nextTick, ref, watch} from 'vue' import {message} from 'ant-design-vue' import domain from '@/api/domain' import websocket from '@/lib/websocket' @@ -8,7 +8,7 @@ import Template from '@/views/template/Template.vue' const {$gettext, interpolate} = useGettext() -const props = defineProps(['directivesMap', 'current_server_directives', 'enabled']) +const props = defineProps(['config_name', 'directivesMap', 'current_server_directives', 'enabled']) const emit = defineEmits(['changeEnabled', 'callback', 'update:enabled']) @@ -50,7 +50,7 @@ function job() { }) } }).then(() => { - issue_cert(name.value, callback) + issue_cert(props.config_name, name.value, callback) }) } @@ -61,13 +61,13 @@ function callback(ssl_certificate: string, ssl_certificate_key: string) { function change_auto_cert(r: boolean) { if (r) { - domain.add_auto_cert(name.value).then(() => { + domain.add_auto_cert(props.config_name).then(() => { message.success(interpolate($gettext('Auto-renewal enabled for %{name}'), {name: name.value})) }).catch(e => { message.error(e.message ?? interpolate($gettext('Enable auto-renewal failed for %{name}'), {name: name.value})) }) } else { - domain.remove_auto_cert(name.value).then(() => { + domain.remove_auto_cert(props.config_name).then(() => { message.success(interpolate($gettext('Auto-renewal disabled for %{name}'), {name: name.value})) }).catch(e => { message.error(e.message ?? interpolate($gettext('Disable auto-renewal failed for %{name}'), {name: name.value})) @@ -86,7 +86,7 @@ function log(msg: string) { (logContainer.value as any as Element).scroll({top: 320, left: 0, behavior: 'smooth'}) } -const issue_cert = async (server_name: string, callback: Function) => { +const issue_cert = async (config_name: string, server_name: string, callback: Function) => { progressStatus.value = 'active' modalClosable.value = false modalVisible.value = true @@ -95,7 +95,7 @@ const issue_cert = async (server_name: string, callback: Function) => { log($gettext('Getting the certificate, please wait...')) - const ws = websocket('/api/cert/issue', false) + const ws = websocket(`/api/domain/${config_name}/cert`, false) ws.onopen = () => { ws.send(JSON.stringify({ diff --git a/frontend/src/views/domain/ngx_conf/NgxConfigEditor.vue b/frontend/src/views/domain/ngx_conf/NgxConfigEditor.vue index 1447162e..ef950c8c 100644 --- a/frontend/src/views/domain/ngx_conf/NgxConfigEditor.vue +++ b/frontend/src/views/domain/ngx_conf/NgxConfigEditor.vue @@ -168,6 +168,7 @@ watch(current_server_index, () => {