diff --git a/ui/src/api/system/license.ts b/ui/src/api/system/license.ts new file mode 100644 index 000000000..16e5acdf6 --- /dev/null +++ b/ui/src/api/system/license.ts @@ -0,0 +1,24 @@ +import { Result } from '@/request/Result' +import { get, post, del, put } from '@/request/index' +import { type Ref } from 'vue' + +const prefix = '/license' + +/** + * 获得license信息 + */ +const getLicense: (loading?: Ref) => Promise> = (loading) => { + return get(`${prefix}/profile`, undefined, loading) +} +/** + * 更新license信息 + * @param 参数 license_file:file + */ +const putLicense: (data: any, loading?: Ref) => Promise> = (data, loading) => { + return put(`${prefix}/profile`, data, undefined, loading) +} + +export default { + getLicense, + putLicense +} diff --git a/ui/src/layout/layout-header/avatar/AboutDialog.vue b/ui/src/layout/layout-header/avatar/AboutDialog.vue index b4700e5f2..482d633e2 100644 --- a/ui/src/layout/layout-header/avatar/AboutDialog.vue +++ b/ui/src/layout/layout-header/avatar/AboutDialog.vue @@ -6,7 +6,7 @@ >
@@ -16,20 +16,21 @@
{{ $t('layout.about.expiredTime') }} - + + + + + + +
{{ $t('layout.about.edition.label') }} {{ - user.showXpack() - ? $t('layout.about.edition.professional') - : $t('layout.about.edition.community') - }} + user.showXpack() + ? $t('layout.about.edition.professional') + : $t('layout.about.edition.community') + }}
{{ $t('layout.about.version') }} {{ $t('layout.about.update') }} License{{ $t('layout.about.update') }} License +
@@ -64,12 +66,13 @@