diff --git a/.air.toml b/.air.toml index 4889ae4c..0e89e0ef 100644 --- a/.air.toml +++ b/.air.toml @@ -13,9 +13,9 @@ bin = "tmp/main" # Customize binary. full_bin = "APP_ENV=dev APP_USER=air ./tmp/main" # Watch these filename extensions. -include_ext = ["go", "tpl", "tmpl", "html", "conf", "ini", "toml"] +include_ext = ["go", "tpl", "tmpl", "html", "toml"] # Ignore these filename extensions or directories. -exclude_dir = ["assets", "tmp", "vendor", "frontend/node_modules", "upload", "docs", "resources"] +exclude_dir = ["assets", "tmp", "vendor", "frontend/node_modules", "upload", "docs", "resources", "frontend/src"] # Watch these directories if you specified. include_dir = [] # Exclude files. diff --git a/dev.Dockerfile b/dev.Dockerfile index 21cc50c5..565c7dc6 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -11,8 +11,8 @@ RUN set -x \ && adduser --system --disabled-login --ingroup nginx --no-create-home --home /nonexistent --gecos "nginx user" --shell /bin/false --uid 101 nginx \ && apt update && apt install -y wget nginx gcc curl -RUN wget https://go.dev/dl/go1.20.1.linux-arm64.tar.gz && \ - rm -rf /usr/local/go && tar -C /usr/local -xzf go1.20.1.linux-arm64.tar.gz && rm -f go1.20.1.linux-arm64.tar.gz +RUN wget https://go.dev/dl/go1.20.4.linux-arm64.tar.gz && \ + rm -rf /usr/local/go && tar -C /usr/local -xzf go1.20.4.linux-arm64.tar.gz && rm -f go1.20.4.linux-arm64.tar.gz ENV PATH="${PATH}:/usr/local/go/bin" diff --git a/frontend/components.d.ts b/frontend/components.d.ts index ae53a102..54b6cd63 100644 --- a/frontend/components.d.ts +++ b/frontend/components.d.ts @@ -10,6 +10,7 @@ export {} declare module '@vue/runtime-core' { export interface GlobalComponents { AAlert: typeof import('ant-design-vue/es')['Alert'] + AAvatar: typeof import('ant-design-vue/es')['Avatar'] ABadge: typeof import('ant-design-vue/es')['Badge'] ABreadcrumb: typeof import('ant-design-vue/es')['Breadcrumb'] ABreadcrumbItem: typeof import('ant-design-vue/es')['BreadcrumbItem'] @@ -37,6 +38,7 @@ declare module '@vue/runtime-core' { ALayoutSider: typeof import('ant-design-vue/es')['LayoutSider'] AList: typeof import('ant-design-vue/es')['List'] AListItem: typeof import('ant-design-vue/es')['ListItem'] + AListItemMeta: typeof import('ant-design-vue/es')['ListItemMeta'] AMenu: typeof import('ant-design-vue/es')['Menu'] AMenuItem: typeof import('ant-design-vue/es')['MenuItem'] AModal: typeof import('ant-design-vue/es')['Modal'] @@ -64,6 +66,7 @@ declare module '@vue/runtime-core' { ChartRadialBarChart: typeof import('./src/components/Chart/RadialBarChart.vue')['default'] ChatGPTChatGPT: typeof import('./src/components/ChatGPT/ChatGPT.vue')['default'] CodeEditorCodeEditor: typeof import('./src/components/CodeEditor/CodeEditor.vue')['default'] + EnvIndicatorEnvIndicator: typeof import('./src/components/EnvIndicator/EnvIndicator.vue')['default'] FooterToolbarFooterToolBar: typeof import('./src/components/FooterToolbar/FooterToolBar.vue')['default'] LogoLogo: typeof import('./src/components/Logo/Logo.vue')['default'] NginxControlNginxControl: typeof import('./src/components/NginxControl/NginxControl.vue')['default'] diff --git a/frontend/src/api/environment.ts b/frontend/src/api/environment.ts new file mode 100644 index 00000000..0556bc6f --- /dev/null +++ b/frontend/src/api/environment.ts @@ -0,0 +1,5 @@ +import Curd from '@/api/curd' + +const environment = new Curd('/environment') + +export default environment diff --git a/frontend/src/assets/svg/cpu.svg b/frontend/src/assets/svg/cpu.svg new file mode 100644 index 00000000..90c2326b --- /dev/null +++ b/frontend/src/assets/svg/cpu.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/src/assets/svg/memory.svg b/frontend/src/assets/svg/memory.svg new file mode 100644 index 00000000..b6cbf943 --- /dev/null +++ b/frontend/src/assets/svg/memory.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/src/assets/svg/pulse.svg b/frontend/src/assets/svg/pulse.svg new file mode 100644 index 00000000..abfd589a --- /dev/null +++ b/frontend/src/assets/svg/pulse.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/src/components/EnvIndicator/EnvIndicator.vue b/frontend/src/components/EnvIndicator/EnvIndicator.vue new file mode 100644 index 00000000..33490f4e --- /dev/null +++ b/frontend/src/components/EnvIndicator/EnvIndicator.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/frontend/src/components/StdDataDisplay/StdCurd.vue b/frontend/src/components/StdDataDisplay/StdCurd.vue index 9424fc92..4d47361c 100644 --- a/frontend/src/components/StdDataDisplay/StdCurd.vue +++ b/frontend/src/components/StdDataDisplay/StdCurd.vue @@ -86,8 +86,14 @@ function add() { visible.value = true } +function get_list() { + const t: Table = table.value! + t!.get_list() +} + defineExpose({ add, + get_list, data }) @@ -109,8 +115,7 @@ const ok = async () => { props.api!.save(data.id, data).then((r: any) => { message.success($gettext('Save Successfully')) Object.assign(data, r) - const t: Table = table.value! - t!.get_list() + get_list() }).catch((e: any) => { message.error($gettext(e?.message ?? 'Server error'), 5) @@ -144,7 +149,7 @@ const selectedRowKeys = ref([])
{ interface meta { icon: any hiddenInSidebar: boolean + hideChildren: boolean } interface sidebar { @@ -39,7 +41,7 @@ interface sidebar { children: sidebar[] } -const visible = computed(() => { +const visible: ComputedRef = computed(() => { const res: sidebar[] = []; @@ -71,6 +73,9 @@ const visible = computed(() => {