1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 08:19:15 +08:00
* Fix typos in backend folder

* Fix typos in frontend

* Fix typos in frontend

* Fix Percent typo
This commit is contained in:
mobeicanyue 2024-02-17 22:42:09 +08:00 committed by GitHub
parent 046d8f526b
commit 51d09b7164
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
43 changed files with 103 additions and 103 deletions

View File

@ -181,7 +181,7 @@ func (u *DockerService) UpdateConf(req dto.SettingUpdate) error {
} else { } else {
daemonMap["iptables"] = false daemonMap["iptables"] = false
} }
case "Dirver": case "Driver":
if opts, ok := daemonMap["exec-opts"]; ok { if opts, ok := daemonMap["exec-opts"]; ok {
if optsValue, isArray := opts.([]interface{}); isArray { if optsValue, isArray := opts.([]interface{}); isArray {
for i := 0; i < len(optsValue); i++ { for i := 0; i < len(optsValue); i++ {

View File

@ -97,11 +97,11 @@ func snapAppData(snap snapHelper, targetDir string) {
} }
} }
} }
for _, rumtime := range runtimes { for _, runtime := range runtimes {
for _, existImage := range existImages { for _, existImage := range existImages {
if rumtime.Image == existImage && !duplicateMap[rumtime.Image] { if runtime.Image == existImage && !duplicateMap[runtime.Image] {
imageSaveList = append(imageSaveList, rumtime.Image) imageSaveList = append(imageSaveList, runtime.Image)
duplicateMap[rumtime.Image] = true duplicateMap[runtime.Image] = true
} }
} }
} }

View File

@ -261,8 +261,8 @@ func loadArch() (string, error) {
if std == "armv7l\n" { if std == "armv7l\n" {
return "armv7", nil return "armv7", nil
} }
return "", fmt.Errorf("unsupport such arch: arm-%s", std) return "", fmt.Errorf("unsupported such arch: arm-%s", std)
default: default:
return "", fmt.Errorf("unsupport such arch: %s", runtime.GOARCH) return "", fmt.Errorf("unsupported such arch: %s", runtime.GOARCH)
} }
} }

View File

@ -23,7 +23,7 @@ func syncApp() {
func syncInstalledApp() { func syncInstalledApp() {
if err := service.NewIAppInstalledService().SyncAll(true); err != nil { if err := service.NewIAppInstalledService().SyncAll(true); err != nil {
global.LOG.Errorf("sync instaled app error: %s", err.Error()) global.LOG.Errorf("sync installed app error: %s", err.Error())
} }
} }

View File

@ -17,13 +17,13 @@ import (
func Init() { func Init() {
if _, err := os.Stat(global.CONF.System.DbPath); err != nil { if _, err := os.Stat(global.CONF.System.DbPath); err != nil {
if err := os.MkdirAll(global.CONF.System.DbPath, os.ModePerm); err != nil { if err := os.MkdirAll(global.CONF.System.DbPath, os.ModePerm); err != nil {
panic(fmt.Errorf("init db dir falied, err: %v", err)) panic(fmt.Errorf("init db dir failed, err: %v", err))
} }
} }
fullPath := global.CONF.System.DbPath + "/" + global.CONF.System.DbFile fullPath := global.CONF.System.DbPath + "/" + global.CONF.System.DbFile
if _, err := os.Stat(fullPath); err != nil { if _, err := os.Stat(fullPath); err != nil {
if _, err := os.Create(fullPath); err != nil { if _, err := os.Create(fullPath); err != nil {
panic(fmt.Errorf("init db file falied, err: %v", err)) panic(fmt.Errorf("init db file failed, err: %v", err))
} }
} }

View File

@ -56,8 +56,8 @@ type MineFormatter struct{}
func (s *MineFormatter) Format(entry *logrus.Entry) ([]byte, error) { func (s *MineFormatter) Format(entry *logrus.Entry) ([]byte, error) {
detailInfo := "" detailInfo := ""
if entry.Caller != nil { if entry.Caller != nil {
funcion := strings.ReplaceAll(entry.Caller.Function, "github.com/1Panel-dev/1Panel/backend/", "") function := strings.ReplaceAll(entry.Caller.Function, "github.com/1Panel-dev/1Panel/backend/", "")
detailInfo = fmt.Sprintf("(%s: %d)", funcion, entry.Caller.Line) detailInfo = fmt.Sprintf("(%s: %d)", function, entry.Caller.Line)
} }
if len(entry.Data) == 0 { if len(entry.Data) == 0 {
msg := fmt.Sprintf("[%s] [%s] %s %s \n", time.Now().Format(TimeFormat), strings.ToUpper(entry.Level.String()), entry.Message, detailInfo) msg := fmt.Sprintf("[%s] [%s] %s %s \n", time.Now().Format(TimeFormat), strings.ToUpper(entry.Level.String()), entry.Message, detailInfo)

View File

@ -141,7 +141,7 @@ func (f *Ufw) Port(port FireInfo, operation string) error {
case "drop": case "drop":
port.Strategy = "deny" port.Strategy = "deny"
default: default:
return fmt.Errorf("unsupport strategy %s", port.Strategy) return fmt.Errorf("unsupported strategy %s", port.Strategy)
} }
if cmd.CheckIllegal(port.Protocol, port.Port) { if cmd.CheckIllegal(port.Protocol, port.Port) {
return buserr.New(constant.ErrCmdIllegal) return buserr.New(constant.ErrCmdIllegal)
@ -168,7 +168,7 @@ func (f *Ufw) RichRules(rule FireInfo, operation string) error {
case "drop": case "drop":
rule.Strategy = "deny" rule.Strategy = "deny"
default: default:
return fmt.Errorf("unsupport strategy %s", rule.Strategy) return fmt.Errorf("unsupported strategy %s", rule.Strategy)
} }
if cmd.CheckIllegal(operation, rule.Protocol, rule.Address, rule.Port) { if cmd.CheckIllegal(operation, rule.Protocol, rule.Address, rule.Port) {

View File

@ -152,7 +152,7 @@ func Dump(dns string, opts ...DumpOption) error {
var columns []string var columns []string
columns, err = lineRows.Columns() columns, err = lineRows.Columns()
if err != nil { if err != nil {
global.LOG.Errorf("get columes falied, err: %v", err) global.LOG.Errorf("get columes failed, err: %v", err)
return err return err
} }
columnTypes, err := lineRows.ColumnTypes() columnTypes, err := lineRows.ColumnTypes()

View File

@ -27,8 +27,8 @@ class RequestHttp {
...config.headers, ...config.headers,
}; };
if (config.url === '/auth/login' || config.url === '/auth/mfalogin') { if (config.url === '/auth/login' || config.url === '/auth/mfalogin') {
let entrace = Base64.encode(globalStore.entrance); let entrance = Base64.encode(globalStore.entrance);
config.headers.EntranceCode = entrace; config.headers.EntranceCode = entrance;
} }
return { return {
...config, ...config,

View File

@ -245,7 +245,7 @@ export namespace Container {
path: string; path: string;
template: number; template: number;
} }
export interface ComposeOpration { export interface ComposeOperation {
name: string; name: string;
operation: string; operation: string;
path: string; path: string;

View File

@ -156,7 +156,7 @@ export const upCompose = (params: Container.ComposeCreate) => {
export const testCompose = (params: Container.ComposeCreate) => { export const testCompose = (params: Container.ComposeCreate) => {
return http.post<boolean>(`/containers/compose/test`, params); return http.post<boolean>(`/containers/compose/test`, params);
}; };
export const composeOperator = (params: Container.ComposeOpration) => { export const composeOperator = (params: Container.ComposeOperation) => {
return http.post(`/containers/compose/operate`, params); return http.post(`/containers/compose/operate`, params);
}; };
export const composeUpdate = (params: Container.ComposeUpdate) => { export const composeUpdate = (params: Container.ComposeUpdate) => {

View File

@ -164,7 +164,7 @@ const getContent = () => {
} }
data.value = res.data; data.value = res.data;
if (res.data.content != '') { if (res.data.content != '') {
if (stopSignals.some((singal) => res.data.content.endsWith(singal))) { if (stopSignals.some((signal) => res.data.content.endsWith(signal))) {
onCloseLog(); onCloseLog();
} }
if (end.value) { if (end.value) {

View File

@ -13,7 +13,7 @@ import { onMounted, ref } from 'vue';
const props = defineProps({ const props = defineProps({
status: { status: {
type: String, type: String,
default: 'runnning', default: 'running',
}, },
}); });
let status = ref('running'); let status = ref('running');

View File

@ -36,9 +36,9 @@
</template> </template>
<div class="panel-MdEditor"> <div class="panel-MdEditor">
<el-alert :closable="false"> <el-alert :closable="false">
<span class="line-heigth">{{ $t('setting.versionHelper') }}</span> <span class="line-height">{{ $t('setting.versionHelper') }}</span>
<li class="line-heigth">{{ $t('setting.versionHelper1') }}</li> <li class="line-height">{{ $t('setting.versionHelper1') }}</li>
<li class="line-heigth">{{ $t('setting.versionHelper2') }}</li> <li class="line-height">{{ $t('setting.versionHelper2') }}</li>
</el-alert> </el-alert>
<div class="default-theme" style="margin-left: 20px"> <div class="default-theme" style="margin-left: 20px">
<h2 class="inline-block">{{ $t('app.version') }}</h2> <h2 class="inline-block">{{ $t('app.version') }}</h2>
@ -161,7 +161,7 @@ onMounted(() => {
text-decoration: none; text-decoration: none;
letter-spacing: 0.5px; letter-spacing: 0.5px;
} }
.line-heigth { .line-height {
line-height: 25px; line-height: 25px;
} }
.panel-MdEditor { .panel-MdEditor {

View File

@ -7,7 +7,7 @@ export enum CompressType {
Xz = 'xz', Xz = 'xz',
} }
export enum CompressExtention { export enum CompressExtension {
zip = '.zip', zip = '.zip',
gz = '.gz', gz = '.gz',
bz2 = '.tar.bz2', bz2 = '.tar.bz2',

View File

@ -1084,7 +1084,7 @@ const message = {
infoDetail: 'File Properties', infoDetail: 'File Properties',
list: 'File List', list: 'File List',
sub: 'Subdirectory', sub: 'Subdirectory',
downlodSuccess: 'Download Success', downloadSuccess: 'Download Success',
theme: 'Theme', theme: 'Theme',
language: 'Language', language: 'Language',
eol: 'End Of Line', eol: 'End Of Line',
@ -1099,7 +1099,7 @@ const message = {
uploadFailed: '[{0}] File Upload file', uploadFailed: '[{0}] File Upload file',
fileUploadStart: 'Uploading [{0}]....', fileUploadStart: 'Uploading [{0}]....',
currentSelect: 'Current Select: ', currentSelect: 'Current Select: ',
unsupportType: 'Unsupported file type', unsupportedType: 'Unsupported file type',
deleteHelper: deleteHelper:
'Are you sure you want to delete the following files? By default, it will enter the recycle bin after deletion', 'Are you sure you want to delete the following files? By default, it will enter the recycle bin after deletion',
fileHeper: 'Note: 1. Search results do not support sorting. 2. Folders cannot be sorted by size.', fileHeper: 'Note: 1. Search results do not support sorting. 2. Folders cannot be sorted by size.',

View File

@ -1032,7 +1032,7 @@ const message = {
root: '根目錄', root: '根目錄',
list: '文件列表', list: '文件列表',
sub: '子目錄', sub: '子目錄',
downlodSuccess: '下載完成', downloadSuccess: '下載完成',
theme: '主題', theme: '主題',
language: '語言', language: '語言',
eol: '行尾符', eol: '行尾符',
@ -1046,7 +1046,7 @@ const message = {
uploadFailed: '{0} 文件上傳失敗', uploadFailed: '{0} 文件上傳失敗',
fileUploadStart: '正在上傳{0}....', fileUploadStart: '正在上傳{0}....',
currentSelect: '當前選中: ', currentSelect: '當前選中: ',
unsupportType: '不支持的文件類型', unsupportedType: '不支持的文件類型',
deleteHelper: '確定刪除所選檔案 預設刪除之後將進入回收站', deleteHelper: '確定刪除所選檔案 預設刪除之後將進入回收站',
fileHeper: '注意1. 搜尋結果不支援排序功能 2. 資料夾無法依大小排序', fileHeper: '注意1. 搜尋結果不支援排序功能 2. 資料夾無法依大小排序',
forceDeleteHelper: '永久刪除檔案不進入回收站直接刪除', forceDeleteHelper: '永久刪除檔案不進入回收站直接刪除',

View File

@ -1033,7 +1033,7 @@ const message = {
root: '根目录', root: '根目录',
list: '文件列表', list: '文件列表',
sub: '子目录', sub: '子目录',
downlodSuccess: '下载完成', downloadSuccess: '下载完成',
theme: '主题', theme: '主题',
language: '语言', language: '语言',
eol: '行尾符', eol: '行尾符',
@ -1047,7 +1047,7 @@ const message = {
uploadFailed: '{0} 文件上传失败', uploadFailed: '{0} 文件上传失败',
fileUploadStart: '正在上传{0}....', fileUploadStart: '正在上传{0}....',
currentSelect: '当前选中: ', currentSelect: '当前选中: ',
unsupportType: '不支持的文件类型', unsupportedType: '不支持的文件类型',
deleteHelper: '确定删除所选文件 默认删除之后将进入回收站', deleteHelper: '确定删除所选文件 默认删除之后将进入回收站',
fileHeper: '注意1. 搜索结果不支持排序功能 2. 文件夹无法按大小排序', fileHeper: '注意1. 搜索结果不支持排序功能 2. 文件夹无法按大小排序',
forceDeleteHelper: '永久删除文件不进入回收站直接删除', forceDeleteHelper: '永久删除文件不进入回收站直接删除',

View File

@ -1,5 +1,5 @@
<template> <template>
<div :class="classObj" class="app-wrapper" v-loading="loading" :element-loading-text="loadinText" fullscreen> <div :class="classObj" class="app-wrapper" v-loading="loading" :element-loading-text="loadingText" fullscreen>
<div v-if="classObj.mobile && classObj.openSidebar" class="drawer-bg" @click="handleClickOutside" /> <div v-if="classObj.mobile && classObj.openSidebar" class="drawer-bg" @click="handleClickOutside" />
<div class="app-sidebar" v-if="!globalStore.isFullScreen"> <div class="app-sidebar" v-if="!globalStore.isFullScreen">
<Sidebar /> <Sidebar />
@ -31,7 +31,7 @@ const globalStore = GlobalStore();
const i18n = useI18n(); const i18n = useI18n();
const loading = ref(false); const loading = ref(false);
const loadinText = ref(); const loadingText = ref();
const themeConfig = computed(() => globalStore.themeConfig); const themeConfig = computed(() => globalStore.themeConfig);
const { switchDark } = useTheme(); const { switchDark } = useTheme();
@ -84,7 +84,7 @@ const updateDarkMode = async (event: MediaQueryListEvent) => {
const loadStatus = async () => { const loadStatus = async () => {
loading.value = globalStore.isLoading; loading.value = globalStore.isLoading;
loadinText.value = globalStore.loadingText; loadingText.value = globalStore.loadingText;
if (loading.value) { if (loading.value) {
timer = setInterval(async () => { timer = setInterval(async () => {
await getSystemAvailable() await getSystemAvailable()

View File

@ -201,9 +201,9 @@ let icons = new Map([
['.pdf', 'p-file-pdf'], ['.pdf', 'p-file-pdf'],
]); ]);
export function getIcon(extention: string): string { export function getIcon(extension: string): string {
if (icons.get(extention) != undefined) { if (icons.get(extension) != undefined) {
const icon = icons.get(extention); const icon = icons.get(extension);
return String(icon); return String(icon);
} else { } else {
return 'p-file-normal'; return 'p-file-normal';

View File

@ -17,7 +17,7 @@
</div> </div>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-button type="primary" link @click="cancelIngore(app.detailID)"> <el-button type="primary" link @click="cancelIgnore(app.detailID)">
{{ $t('app.cancelIgnore') }} {{ $t('app.cancelIgnore') }}
</el-button> </el-button>
</el-col> </el-col>
@ -61,7 +61,7 @@ const getApps = async () => {
} catch (error) {} } catch (error) {}
}; };
const cancelIngore = async (id: number) => { const cancelIgnore = async (id: number) => {
loading.value = true; loading.value = true;
await IgnoreUpgrade({ detailID: id, operate: 'cancel' }) await IgnoreUpgrade({ detailID: id, operate: 'cancel' })
.then(() => { .then(() => {

View File

@ -72,7 +72,7 @@
<el-button @click="sync" type="primary" plain v-if="mode === 'installed' && data != null"> <el-button @click="sync" type="primary" plain v-if="mode === 'installed' && data != null">
{{ $t('app.sync') }} {{ $t('app.sync') }}
</el-button> </el-button>
<el-button @click="openIngore" type="primary" plain v-if="mode === 'upgrade'"> <el-button @click="openIgnore" type="primary" plain v-if="mode === 'upgrade'">
{{ $t('app.showIgnore') }} {{ $t('app.showIgnore') }}
</el-button> </el-button>
</template> </template>
@ -458,7 +458,7 @@ const openOperate = (row: any, op: string) => {
} }
}; };
const openIngore = () => { const openIgnore = () => {
ignoreRef.value.acceptParams(); ignoreRef.value.acceptParams();
}; };

View File

@ -1,7 +1,7 @@
<template> <template>
<div v-loading="loading"> <div v-loading="loading">
<div v-show="isOnDetail"> <div v-show="isOnDetail">
<ComposeDetial @back="backList" ref="composeDetailRef" /> <ComposeDetail @back="backList" ref="composeDetailRef" />
</div> </div>
<el-card v-if="dockerStatus != 'Running'" class="mask-prompt"> <el-card v-if="dockerStatus != 'Running'" class="mask-prompt">
<span>{{ $t('container.serviceUnavailable') }}</span> <span>{{ $t('container.serviceUnavailable') }}</span>
@ -97,7 +97,7 @@ import { reactive, onMounted, ref } from 'vue';
import EditDialog from '@/views/container/compose/edit/index.vue'; import EditDialog from '@/views/container/compose/edit/index.vue';
import CreateDialog from '@/views/container/compose/create/index.vue'; import CreateDialog from '@/views/container/compose/create/index.vue';
import DeleteDialog from '@/views/container/compose/delete/index.vue'; import DeleteDialog from '@/views/container/compose/delete/index.vue';
import ComposeDetial from '@/views/container/compose/detail/index.vue'; import ComposeDetail from '@/views/container/compose/detail/index.vue';
import { loadContainerLog, loadDockerStatus, searchCompose } from '@/api/modules/container'; import { loadContainerLog, loadDockerStatus, searchCompose } from '@/api/modules/container';
import i18n from '@/lang'; import i18n from '@/lang';
import { Container } from '@/api/interface/container'; import { Container } from '@/api/interface/container';

View File

@ -93,7 +93,7 @@
:row-style="{ height: '65px' }" :row-style="{ height: '65px' }"
style="width: 100%" style="width: 100%"
:columns="columns" :columns="columns"
localKey="contanerColumn" localKey="containerColumn"
> >
<el-table-column type="selection" /> <el-table-column type="selection" />
<el-table-column <el-table-column

View File

@ -1,6 +1,6 @@
<template> <template>
<el-drawer <el-drawer
v-model="drawerVisiable" v-model="drawerVisible"
:destroy-on-close="true" :destroy-on-close="true"
@close="handleClose" @close="handleClose"
:close-on-click-modal="false" :close-on-click-modal="false"
@ -58,7 +58,7 @@
ref="logRef" ref="logRef"
:config="logConfig" :config="logConfig"
:default-button="false" :default-button="false"
v-if="logVisiable" v-if="logVisible"
:style="'height: calc(100vh - 370px);min-height: 200px'" :style="'height: calc(100vh - 370px);min-height: 200px'"
/> />
</el-col> </el-col>
@ -66,7 +66,7 @@
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="drawerVisiable = false">{{ $t('commons.button.cancel') }}</el-button> <el-button @click="drawerVisible = false">{{ $t('commons.button.cancel') }}</el-button>
<el-button :disabled="buttonDisabled" type="primary" @click="onSubmit(formRef)"> <el-button :disabled="buttonDisabled" type="primary" @click="onSubmit(formRef)">
{{ $t('commons.button.confirm') }} {{ $t('commons.button.confirm') }}
</el-button> </el-button>
@ -87,10 +87,10 @@ import { ElForm, ElMessage } from 'element-plus';
import { imageBuild } from '@/api/modules/container'; import { imageBuild } from '@/api/modules/container';
import DrawerHeader from '@/components/drawer-header/index.vue'; import DrawerHeader from '@/components/drawer-header/index.vue';
const logVisiable = ref<boolean>(false); const logVisible = ref<boolean>(false);
const extensions = [javascript(), oneDark]; const extensions = [javascript(), oneDark];
const buttonDisabled = ref(false); const buttonDisabled = ref(false);
const drawerVisiable = ref(false); const drawerVisible = ref(false);
const logRef = ref(); const logRef = ref();
const logConfig = reactive({ const logConfig = reactive({
@ -111,8 +111,8 @@ const rules = reactive({
dockerfile: [Rules.requiredInput], dockerfile: [Rules.requiredInput],
}); });
const acceptParams = async () => { const acceptParams = async () => {
logVisiable.value = false; logVisible.value = false;
drawerVisiable.value = true; drawerVisible.value = true;
form.from = 'path'; form.from = 'path';
form.dockerfile = ''; form.dockerfile = '';
form.tagStr = ''; form.tagStr = '';
@ -122,7 +122,7 @@ const acceptParams = async () => {
const emit = defineEmits<{ (e: 'search'): void }>(); const emit = defineEmits<{ (e: 'search'): void }>();
const handleClose = () => { const handleClose = () => {
drawerVisiable.value = false; drawerVisible.value = false;
emit('search'); emit('search');
}; };
@ -145,9 +145,9 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
}; };
const loadLogs = () => { const loadLogs = () => {
logVisiable.value = false; logVisible.value = false;
nextTick(() => { nextTick(() => {
logVisiable.value = true; logVisible.value = true;
nextTick(() => { nextTick(() => {
logRef.value.changeTail(true); logRef.value.changeTail(true);
}); });

View File

@ -18,10 +18,10 @@
</el-form> </el-form>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button :disabeld="loading" @click="loadVisible = false"> <el-button :disabled="loading" @click="loadVisible = false">
{{ $t('commons.button.cancel') }} {{ $t('commons.button.cancel') }}
</el-button> </el-button>
<el-button :disabeld="loading" type="primary" @click="onSubmit(formRef)"> <el-button :disabled="loading" type="primary" @click="onSubmit(formRef)">
{{ $t('commons.button.import') }} {{ $t('commons.button.import') }}
</el-button> </el-button>
</span> </span>

View File

@ -38,7 +38,7 @@
ref="logRef" ref="logRef"
:config="logConfig" :config="logConfig"
:default-button="false" :default-button="false"
v-if="logVisiable" v-if="logVisible"
:style="'height: calc(100vh - 370px);min-height: 200px'" :style="'height: calc(100vh - 370px);min-height: 200px'"
v-model:loading="loading" v-model:loading="loading"
/> />
@ -76,7 +76,7 @@ const form = reactive({
name: '', name: '',
}); });
const logVisiable = ref(false); const logVisible = ref(false);
const loading = ref(false); const loading = ref(false);
const logRef = ref(); const logRef = ref();
@ -95,7 +95,7 @@ const dialogData = ref<DialogProps>({
}); });
const acceptParams = async (params: DialogProps): Promise<void> => { const acceptParams = async (params: DialogProps): Promise<void> => {
logVisiable.value = false; logVisible.value = false;
loading.value = false; loading.value = false;
drawerVisible.value = true; drawerVisible.value = true;
form.tags = params.tags; form.tags = params.tags;
@ -114,7 +114,7 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
formEl.validate(async (valid) => { formEl.validate(async (valid) => {
if (!valid) return; if (!valid) return;
const res = await imagePush(form); const res = await imagePush(form);
logVisiable.value = true; logVisible.value = true;
logConfig.name = res.data; logConfig.name = res.data;
loadLogs(); loadLogs();
MsgSuccess(i18n.global.t('commons.msg.operationSuccess')); MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
@ -122,9 +122,9 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
}; };
const loadLogs = () => { const loadLogs = () => {
logVisiable.value = false; logVisible.value = false;
nextTick(() => { nextTick(() => {
logVisiable.value = true; logVisible.value = true;
nextTick(() => { nextTick(() => {
logRef.value.changeTail(true); logRef.value.changeTail(true);
}); });

View File

@ -35,10 +35,10 @@
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button :disabeld="loading" @click="drawerVisible = false"> <el-button :disabled="loading" @click="drawerVisible = false">
{{ $t('commons.button.cancel') }} {{ $t('commons.button.cancel') }}
</el-button> </el-button>
<el-button :disabeld="loading" type="primary" @click="onSubmit(formRef)"> <el-button :disabled="loading" type="primary" @click="onSubmit(formRef)">
{{ $t('container.export') }} {{ $t('container.export') }}
</el-button> </el-button>
</span> </span>

View File

@ -43,10 +43,10 @@
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button :disabeld="loading" @click="drawerVisible = false"> <el-button :disabled="loading" @click="drawerVisible = false">
{{ $t('commons.button.cancel') }} {{ $t('commons.button.cancel') }}
</el-button> </el-button>
<el-button :disabeld="loading" type="primary" @click="onSubmit(formRef)"> <el-button :disabled="loading" type="primary" @click="onSubmit(formRef)">
{{ $t('commons.button.save') }} {{ $t('commons.button.save') }}
</el-button> </el-button>
</span> </span>

View File

@ -414,7 +414,7 @@ const handleCgroup = async () => {
confirmDialogRefCgroup.value!.acceptParams(params); confirmDialogRefCgroup.value!.acceptParams(params);
}; };
const onSubmitSaveCgroup = () => { const onSubmitSaveCgroup = () => {
save('Dirver', form.cgroupDriver); save('Driver', form.cgroupDriver);
}; };
const save = async (key: string, value: string) => { const save = async (key: string, value: string) => {

View File

@ -2,7 +2,7 @@
<div v-if="statusShow" class="database-status"> <div v-if="statusShow" class="database-status">
<el-form label-position="top"> <el-form label-position="top">
<span class="title">{{ $t('database.baseParam') }}</span> <span class="title">{{ $t('database.baseParam') }}</span>
<el-divider class="devider" /> <el-divider class="divider" />
<el-row class="content"> <el-row class="content">
<el-col :xs="8" :sm="6" :md="6" :lg="6" :xl="6"> <el-col :xs="8" :sm="6" :md="6" :lg="6" :xl="6">
<el-form-item> <el-form-item>
@ -34,7 +34,7 @@
</el-row> </el-row>
<span class="title">{{ $t('database.performanceParam') }}</span> <span class="title">{{ $t('database.performanceParam') }}</span>
<el-divider class="devider" /> <el-divider class="divider" />
<el-row class="content"> <el-row class="content">
<el-col :xs="12" :sm="12" :md="6" :lg="6" :xl="6"> <el-col :xs="12" :sm="12" :md="6" :lg="6" :xl="6">
<el-form-item> <el-form-item>
@ -203,7 +203,7 @@ defineExpose({
<style lang="scss" scoped> <style lang="scss" scoped>
.database-status { .database-status {
.devider { .divider {
display: block; display: block;
height: 1px; height: 1px;
width: 100%; width: 100%;

View File

@ -57,7 +57,7 @@ import { computed, reactive, ref } from 'vue';
import { File } from '@/api/interface/file'; import { File } from '@/api/interface/file';
import { FormInstance, FormRules } from 'element-plus'; import { FormInstance, FormRules } from 'element-plus';
import { Rules } from '@/global/form-rules'; import { Rules } from '@/global/form-rules';
import { CompressExtention, CompressType } from '@/enums/files'; import { CompressExtension, CompressType } from '@/enums/files';
import { CompressFile } from '@/api/modules/files'; import { CompressFile } from '@/api/modules/files';
import FileList from '@/components/file-list/index.vue'; import FileList from '@/components/file-list/index.vue';
import DrawerHeader from '@/components/drawer-header/index.vue'; import DrawerHeader from '@/components/drawer-header/index.vue';
@ -87,7 +87,7 @@ const operate = ref('compress');
const em = defineEmits(['close']); const em = defineEmits(['close']);
const extension = computed(() => { const extension = computed(() => {
return CompressExtention[form.value.type]; return CompressExtension[form.value.type];
}); });
const handleClose = () => { const handleClose = () => {

View File

@ -37,7 +37,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { FormInstance, FormRules } from 'element-plus'; import { FormInstance, FormRules } from 'element-plus';
import { CompressExtention, CompressType } from '@/enums/files'; import { CompressExtension, CompressType } from '@/enums/files';
import { computed, reactive, ref } from 'vue'; import { computed, reactive, ref } from 'vue';
import { DownloadFile } from '@/api/modules/files'; import { DownloadFile } from '@/api/modules/files';
import { File } from '@/api/interface/file'; import { File } from '@/api/interface/file';
@ -76,7 +76,7 @@ let addForm = ref({
}); });
const extension = computed(() => { const extension = computed(() => {
return CompressExtention[addForm.value.type]; return CompressExtension[addForm.value.type];
}); });
const submit = async (formEl: FormInstance | undefined) => { const submit = async (formEl: FormInstance | undefined) => {

View File

@ -541,10 +541,10 @@ const getPaths = (reqPath: string) => {
} }
}; };
const handleCreate = (commnad: string) => { const handleCreate = (command: string) => {
fileCreate.path = req.path; fileCreate.path = req.path;
fileCreate.isDir = false; fileCreate.isDir = false;
if (commnad === 'dir') { if (command === 'dir') {
fileCreate.isDir = true; fileCreate.isDir = true;
} }
createRef.value.acceptParams(fileCreate); createRef.value.acceptParams(fileCreate);

View File

@ -7,7 +7,7 @@
:title="$t('file.downloadProcess')" :title="$t('file.downloadProcess')"
> >
<div v-for="(value, index) in res" :key="index"> <div v-for="(value, index) in res" :key="index">
<span>{{ value['percent'] === 100 ? $t('file.downlodSuccess') : $t('file.downloading') }}</span> <span>{{ value['percent'] === 100 ? $t('file.downloadSuccess') : $t('file.downloading') }}</span>
<MsgInfo :info="value['name']" width="250" /> <MsgInfo :info="value['name']" width="250" />
<el-progress v-if="value['total'] == 0" :percentage="100" :indeterminate="true" :duration="1" /> <el-progress v-if="value['total'] == 0" :percentage="100" :indeterminate="true" :duration="1" />
<el-progress v-else :text-inside="true" :stroke-width="15" :percentage="value['percent']"></el-progress> <el-progress v-else :text-inside="true" :stroke-width="15" :percentage="value['percent']"></el-progress>

View File

@ -46,7 +46,7 @@
> >
<template #tip> <template #tip>
<el-text>{{ uploadHelper }}</el-text> <el-text>{{ uploadHelper }}</el-text>
<el-progress v-if="loading" text-inside :stroke-width="20" :percentage="uploadPrecent"></el-progress> <el-progress v-if="loading" text-inside :stroke-width="20" :percentage="uploadPercent"></el-progress>
</template> </template>
</el-upload> </el-upload>
@ -103,7 +103,7 @@ interface UploadFileProps {
const uploadRef = ref<UploadInstance>(); const uploadRef = ref<UploadInstance>();
const loading = ref(false); const loading = ref(false);
let uploadPrecent = ref(0); let uploadPercent = ref(0);
const open = ref(false); const open = ref(false);
const path = ref(); const path = ref();
let uploadHelper = ref(''); let uploadHelper = ref('');
@ -124,9 +124,9 @@ const uploadType = ref('file');
const tmpFiles = ref<UploadFiles>([]); const tmpFiles = ref<UploadFiles>([]);
const breakFlag = ref(false); const breakFlag = ref(false);
const upload = (commnad: string) => { const upload = (command: string) => {
uploadType.value = commnad; uploadType.value = command;
if (commnad == 'dir') { if (command == 'dir') {
state.uploadEle.webkitdirectory = true; state.uploadEle.webkitdirectory = true;
} else { } else {
state.uploadEle.webkitdirectory = false; state.uploadEle.webkitdirectory = false;
@ -281,11 +281,11 @@ const submit = async () => {
} else { } else {
formData.append('path', path.value + '/' + getPathWithoutFilename(file.name)); formData.append('path', path.value + '/' + getPathWithoutFilename(file.name));
} }
uploadPrecent.value = 0; uploadPercent.value = 0;
await UploadFileData(formData, { await UploadFileData(formData, {
onUploadProgress: (progressEvent) => { onUploadProgress: (progressEvent) => {
const progress = Math.round((progressEvent.loaded / progressEvent.total) * 100); const progress = Math.round((progressEvent.loaded / progressEvent.total) * 100);
uploadPrecent.value = progress; uploadPercent.value = progress;
}, },
timeout: 40000, timeout: 40000,
}); });
@ -317,7 +317,7 @@ const submit = async () => {
const progress = Math.round( const progress = Math.round(
((uploadedChunkCount + progressEvent.loaded / progressEvent.total) * 100) / chunkCount, ((uploadedChunkCount + progressEvent.loaded / progressEvent.total) * 100) / chunkCount,
); );
uploadPrecent.value = progress; uploadPercent.value = progress;
}, },
timeout: TimeoutEnum.T_60S, timeout: TimeoutEnum.T_60S,
}); });
@ -353,7 +353,7 @@ const getPathWithoutFilename = (path: string) => {
const acceptParams = (props: UploadFileProps) => { const acceptParams = (props: UploadFileProps) => {
path.value = props.path; path.value = props.path;
open.value = true; open.value = true;
uploadPrecent.value = 0; uploadPercent.value = 0;
uploadHelper.value = ''; uploadHelper.value = '';
nextTick(() => { nextTick(() => {

View File

@ -11,7 +11,7 @@
<el-col :span="8"> <el-col :span="8">
<div class="search-button"> <div class="search-button">
<el-input <el-input
typpe="number" type="number"
v-model.number="netSearch.processID" v-model.number="netSearch.processID"
clearable clearable
@clear="search()" @clear="search()"

View File

@ -128,7 +128,7 @@ function checkDriveCode(rule: any, value: any, callback: any) {
} }
const emit = defineEmits(['search']); const emit = defineEmits(['search']);
const ondDriveInfo = ref(); const oneDriveInfo = ref();
interface DialogProps { interface DialogProps {
title: string; title: string;
@ -145,7 +145,7 @@ const acceptParams = async (params: DialogProps): Promise<void> => {
title.value = i18n.global.t('commons.button.' + oneDriveData.value.title); title.value = i18n.global.t('commons.button.' + oneDriveData.value.title);
drawerVisible.value = true; drawerVisible.value = true;
const res = await getOneDriveInfo(); const res = await getOneDriveInfo();
ondDriveInfo.value = res.data; oneDriveInfo.value = res.data;
if (!oneDriveData.value.rowData.id) { if (!oneDriveData.value.rowData.id) {
oneDriveData.value.rowData.varsJson = { oneDriveData.value.rowData.varsJson = {
isCN: false, isCN: false,
@ -167,9 +167,9 @@ const changeFrom = () => {
} else { } else {
oneDriveData.value.rowData.varsJson = { oneDriveData.value.rowData.varsJson = {
isCN: false, isCN: false,
client_id: ondDriveInfo.value.client_id, client_id: oneDriveInfo.value.client_id,
client_secret: ondDriveInfo.value.client_secret, client_secret: oneDriveInfo.value.client_secret,
redirect_uri: ondDriveInfo.value.redirect_uri, redirect_uri: oneDriveInfo.value.redirect_uri,
}; };
} }
}; };

View File

@ -1,7 +1,7 @@
<template> <template>
<el-tabs tab-position="left" v-model="tabIndex"> <el-tabs tab-position="left" v-model="tabIndex">
<el-tab-pane :label="$t('website.domainConfig')"> <el-tab-pane :label="$t('website.domainConfig')">
<Doamin :key="id" :id="id" v-if="tabIndex == '0' && id > 0"></Doamin> <Domain :key="id" :id="id" v-if="tabIndex == '0' && id > 0"></Domain>
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="$t('website.sitePath')"> <el-tab-pane :label="$t('website.sitePath')">
<SitePath :id="id" v-if="tabIndex == '1'"></SitePath> <SitePath :id="id" v-if="tabIndex == '1'"></SitePath>
@ -39,7 +39,7 @@
<script lang="ts" setup name="Basic"> <script lang="ts" setup name="Basic">
import { computed, onMounted, ref } from 'vue'; import { computed, onMounted, ref } from 'vue';
import Doamin from './domain/index.vue'; import Domain from './domain/index.vue';
import Default from './default-doc/index.vue'; import Default from './default-doc/index.vue';
import LimitConn from './limit-conn/index.vue'; import LimitConn from './limit-conn/index.vue';
import Other from './other/index.vue'; import Other from './other/index.vue';

View File

@ -96,7 +96,7 @@ const enableUpdate = ref<Website.WafUpdate>({
let add = ref({ let add = ref({
value: '', value: '',
remark: '', remark: '',
enbale: 1, enable: 1,
}); });
let contentArray = ref([]); let contentArray = ref([]);
@ -132,7 +132,7 @@ const openCreate = () => {
let newArray = []; let newArray = [];
newArray[0] = add.value.value; newArray[0] = add.value.value;
newArray[1] = add.value.remark; newArray[1] = add.value.remark;
newArray[2] = add.value.enbale; newArray[2] = add.value.enable;
data.value.push(newArray); data.value.push(newArray);
submit(newArray); submit(newArray);
@ -161,7 +161,7 @@ const submit = async (addArray: string[]) => {
add.value = { add.value = {
value: '', value: '',
remark: '', remark: '',
enbale: 1, enable: 1,
}; };
MsgSuccess(i18n.global.t('commons.msg.updateSuccess')); MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
get(); get();

View File

@ -104,7 +104,7 @@
> >
<el-select v-model="website.appInstallId"> <el-select v-model="website.appInstallId">
<el-option <el-option
v-for="(appInstall, index) in appInstalles" v-for="(appInstall, index) in appInstalls"
:key="index" :key="index"
:label="appInstall.name" :label="appInstall.name"
:value="appInstall.id" :value="appInstall.id"
@ -410,7 +410,7 @@ const open = ref(false);
const loading = ref(false); const loading = ref(false);
const groups = ref<Group.GroupInfo[]>([]); const groups = ref<Group.GroupInfo[]>([]);
const appInstalles = ref<App.AppInstalled[]>([]); const appInstalls = ref<App.AppInstalled[]>([]);
const appReq = reactive({ const appReq = reactive({
type: 'website', type: 'website',
page: 1, page: 1,
@ -442,8 +442,8 @@ const changeType = (type: string) => {
switch (type) { switch (type) {
case 'deployment': case 'deployment':
website.value.appType = 'installed'; website.value.appType = 'installed';
if (appInstalles.value && appInstalles.value.length > 0) { if (appInstalls.value && appInstalls.value.length > 0) {
website.value.appInstallId = appInstalles.value[0].id; website.value.appInstallId = appInstalls.value[0].id;
} }
break; break;
case 'runtime': case 'runtime':
@ -459,7 +459,7 @@ const changeType = (type: string) => {
const searchAppInstalled = () => { const searchAppInstalled = () => {
GetAppInstalled({ type: 'website', unused: true, all: true, page: 1, pageSize: 100 }).then((res) => { GetAppInstalled({ type: 'website', unused: true, all: true, page: 1, pageSize: 100 }).then((res) => {
appInstalles.value = res.data; appInstalls.value = res.data;
if (res.data && res.data.length > 0) { if (res.data && res.data.length > 0) {
website.value.appInstallId = res.data[0].id; website.value.appInstallId = res.data[0].id;
} }