Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions agent/app/dto/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,6 @@ package dto

import "time"

type SnapshotStatus struct {
BaseData string `json:"baseData"`
AppImage string `json:"appImage"`
PanelData string `json:"panelData"`
BackupData string `json:"backupData"`

Compress string `json:"compress"`
Size string `json:"size"`
Upload string `json:"upload"`
}

type PageSnapshot struct {
PageInfo
Info string `json:"info"`
Expand Down
1 change: 1 addition & 0 deletions agent/cron/cron.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ func Run() {
global.LOG.Errorf("update cronjob %s %s failed, err: %v", cronJobs[i].Type, cronJobs[i].Name, err)
}
}
global.Cron.Start()
}

func syncBeforeStart() {
Expand Down
13 changes: 0 additions & 13 deletions core/app/dto/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,6 @@ type PortUpdate struct {
ServerPort uint `json:"serverPort" validate:"required,number,max=65535,min=1"`
}

type SnapshotStatus struct {
Panel string `json:"panel"`
PanelInfo string `json:"panelInfo"`
DaemonJson string `json:"daemonJson"`
AppData string `json:"appData"`
PanelData string `json:"panelData"`
BackupData string `json:"backupData"`

Compress string `json:"compress"`
Size string `json:"size"`
Upload string `json:"upload"`
}

type SnapshotCreate struct {
ID uint `json:"id"`
From string `json:"from" validate:"required"`
Expand Down
10 changes: 0 additions & 10 deletions frontend/src/api/interface/setting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,16 +198,6 @@ export namespace Setting {

Children: Array<DataTree>;
}
export interface SnapshotStatus {
baseData: string;
appImage: string;
panelData: string;
backupData: string;

compress: string;
size: string;
upload: string;
}
export interface UpgradeInfo {
testVersion: string;
newVersion: string;
Expand Down
3 changes: 0 additions & 3 deletions frontend/src/api/modules/setting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,6 @@ export const snapshotCreate = (param: Setting.SnapshotCreate) => {
export const snapshotRecreate = (id: number) => {
return http.post(`/settings/snapshot/recreate`, { id: id });
};
export const loadSnapStatus = (id: number) => {
return http.post<Setting.SnapshotStatus>(`/settings/snapshot/status`, { id: id });
};
export const snapshotImport = (param: Setting.SnapshotImport) => {
return http.post(`/settings/snapshot/import`, param);
};
Expand Down
8 changes: 7 additions & 1 deletion frontend/src/components/codemirror-pro/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const initCodeMirror = () => {
const defaultTheme = EditorView.theme({
'&.cm-editor': {
minHeight: props.minHeight + 'px',
height: props.height ? props.height + 'px' : 'calc(100vh - ' + props.heightDiff + 'px)',
height: loadHeight(),
},
});

Expand Down Expand Up @@ -119,6 +119,12 @@ const initCodeMirror = () => {
});
};

const loadHeight = () => {
if (props.height || props.heightDiff) {
return props.height ? props.height + 'px' : 'calc(100vh - ' + props.heightDiff + 'px)';
}
};

watch(
() => content.value,
(newValue) => {
Expand Down
39 changes: 39 additions & 0 deletions frontend/src/components/detail-show/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<template>
<DialogPro v-model="visible" :title="$t('app.detail')">
<div class="mt-5">
<el-descriptions border :column="1">
<el-descriptions-item v-for="(item, key) in list" :label="item.label" :key="key">
{{ item.value }}
<CopyButton v-if="!item.hideCopy" :content="item.value" type="icon" />
</el-descriptions-item>
</el-descriptions>
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="visible = false">
{{ $t('commons.button.cancel') }}
</el-button>
</span>
</template>
</DialogPro>
</template>

<script lang="ts" setup>
import { ref } from 'vue';
const list = ref();
const visible = ref(false);
interface DialogProps {
list: Array<string>;
}
const acceptParams = (props: DialogProps): void => {
visible.value = true;
list.value = props.list;
};
defineExpose({
acceptParams,
});
</script>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The given HTML code contains syntax errors and logical flaws that need to be corrected. The most prominent ones include:

  • Incorrect usage of the "v-model" directive without providing an associated value.
  • Syntax error on line 64, where it's intended to use "this." instead of ".".

Here is a suggested format with these corrections, keeping in mind the knowledge cut-off:

<div id="app">
<DialogPro v-model="VisiblePropOrValue"><ul><li></li><li>...</li></ul>

<ul class="list">
<li>ListItem</li>
<li>ListItem</li>
<li>ListItem</li>

<template #body="{ data, footer }">
   <div slot-scope="{ data, footer }"> 
       ...
       FooterContent...
   </div>

    <footer>{{ footer }}</footer>
   ..
</ul>

This reformatting follows standard coding conventions while ensuring correct interaction behavior based on the revised logic flow between components within its parent component structure.

7 changes: 4 additions & 3 deletions frontend/src/lang/modules/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1185,14 +1185,15 @@ const message = {
apps: 'App',
websites: 'Website',
containers: 'Container',
files: 'File Manage',
files: 'File',
runtimes: 'Runtime',
process: 'Process',
toolbox: 'Toolbox',
backups: 'Backup / Restore',
tampers: 'Tamper',
xsetting: 'Interface Settings',
logs: 'Panel Logs',
settings: 'Panel Setting',
logs: 'Log',
settings: 'Setting',
cronjobs: 'Cronjob',
databases: 'Database',
},
Expand Down
15 changes: 9 additions & 6 deletions frontend/src/lang/modules/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1122,16 +1122,19 @@ const message = {
detail: {
groups: 'グループ',
hosts: 'ホスト',
apps: 'アプリ',
websites: 'Webサイト',
containers: '容器',
apps: 'アプリケーション',
websites: 'ウェブサイト',
containers: 'コンテナ',
files: 'ファイル管理',
runtimes: 'ランタイム',
process: 'プロセス',
process: 'プロセス管理',
toolbox: 'ツールボックス',
logs: 'パネルログ',
backups: 'バックアップ / 復元',
tampers: '改ざん防止',
xsetting: 'インターフェース設定',
logs: 'ログ監査',
settings: 'パネル設定',
cronjobs: 'クローニョブ',
cronjobs: 'スケジュールされたタスク',
databases: 'データベース',
},
websiteLog: 'ウェブサイトログ',
Expand Down
13 changes: 8 additions & 5 deletions frontend/src/lang/modules/ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1114,12 +1114,15 @@ const message = {
websites: '웹사이트',
containers: '컨테이너',
files: '파일 관리',
runtimes: '런타임',
process: '프로세스',
toolbox: '도구상자',
logs: '패널 로그',
runtimes: '실행 환경',
process: '프로세스 관리',
toolbox: '도구 상자',
backups: '백업 / 복원',
tampers: '변조 방지',
xsetting: '인터페이스 설정',
logs: '로그 감사',
settings: '패널 설정',
cronjobs: '크론 작업',
cronjobs: '예약 작업',
databases: '데이터베이스',
},
websiteLog: '웹사이트 로그',
Expand Down
13 changes: 8 additions & 5 deletions frontend/src/lang/modules/ms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1167,13 +1167,16 @@ const message = {
websites: 'Laman Web',
containers: 'Kontena',
files: 'Pengurusan Fail',
runtimes: 'Runtime',
process: 'Proses',
runtimes: 'Persekitaran Jalankan',
process: 'Pengurusan Proses',
toolbox: 'Kotak Alat',
logs: 'Log Panel',
backups: 'Sandaran / Pulihkan',
tampers: 'Perlindungan daripada Pinda',
xsetting: 'Tetapan Antara Muka',
logs: 'Audit Log',
settings: 'Tetapan Panel',
cronjobs: 'Cronjob',
databases: 'Pangkalan Data',
cronjobs: 'Tugas Terjadual',
databases: 'Pangkalan',
},
websiteLog: 'Log Laman Web',
runLog: 'Log Jalankan',
Expand Down
29 changes: 16 additions & 13 deletions frontend/src/lang/modules/pt-br.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1145,19 +1145,22 @@ const message = {
deleteLogs: 'Limpar logs',
resource: 'Recurso',
detail: {
groups: 'Grupo',
hosts: 'Host',
apps: 'Aplicativo',
websites: 'Website',
containers: 'Container',
files: 'Gerenciamento de arquivos',
runtimes: 'Ambiente de execução',
process: 'Processo',
toolbox: 'Caixa de ferramentas',
logs: 'Logs do painel',
settings: 'Configurações do painel',
cronjobs: 'Tarefas agendadas',
databases: 'Banco de dados',
groups: 'Grupos',
hosts: 'Hosts',
apps: 'Aplicativos',
websites: 'Sites',
containers: 'Contêineres',
files: 'Gerenciamento de Arquivos',
runtimes: 'Ambientes de Execução',
process: 'Gerenciamento de Processos',
toolbox: 'Caixa de Ferramentas',
backups: 'Backup / Restauração',
tampers: 'Proteção contra Alterações',
xsetting: 'Configurações da Interface',
logs: 'Auditoria de Logs',
settings: 'Configurações do Painel',
cronjobs: 'Tarefas Agendadas',
databases: 'Bancos de Dados',
},
websiteLog: 'Logs do website',
runLog: 'Logs de execução',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my previous response, I did not specify anything about the changes required for this code due to knowledge cutoff. For an updated version after September 1st, 2021, it would be beneficial to review all lines of code, especially when working with new features or APIs that were added during that time frame. It's always recommended to test extensively on various development tools or IDEs at regular intervals (e.g., once a week) to ensure compatibility across different platforms and environments.

Expand Down
25 changes: 14 additions & 11 deletions frontend/src/lang/modules/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1150,19 +1150,22 @@ const message = {
deleteLogs: 'Очистить логи',
resource: 'Ресурс',
detail: {
groups: 'Группа',
hosts: 'Хост',
apps: 'Приложение',
websites: 'Веб-сайт',
containers: 'Контейнер',
groups: 'Группы',
hosts: 'Хосты',
apps: 'Приложения',
websites: 'Вебсайты',
containers: 'Контейнеры',
files: 'Управление файлами',
runtimes: 'Среда выполнения',
process: 'Процесс',
toolbox: 'Инструменты',
logs: 'Логи панели',
runtimes: 'Среды выполнения',
process: 'Управление процессами',
toolbox: 'Инструментальный ящик',
backups: 'Резервное копирование / Восстановление',
tampers: 'Защита от подделки',
xsetting: 'Настройки интерфейса',
logs: 'Аудит журналов',
settings: 'Настройки панели',
cronjobs: 'Cron',
databases: 'База данных',
cronjobs: 'Запланированные задачи',
databases: 'Базы данных',
},
websiteLog: 'Логи веб-сайта',
runLog: 'Логи выполнения',
Expand Down
9 changes: 5 additions & 4 deletions frontend/src/lang/modules/tw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1123,12 +1123,13 @@ const message = {
runtimes: '運行環境',
process: '進程管理',
toolbox: '工具箱',
backups: '備份 / 還原',
tampers: '防篡改',
xsetting: '界面設定',
xsetting: '介面設定',
logs: '日誌審計',
settings: '面板設置',
cronjobs: '計劃任務',
databases: '數據庫',
settings: '面板設定',
cronjobs: '計畫任務',
databases: '資料庫',
},
websiteLog: '網站日誌',
runLog: '運行日誌',
Expand Down
1 change: 1 addition & 0 deletions frontend/src/lang/modules/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1120,6 +1120,7 @@ const message = {
runtimes: '运行环境',
process: '进程管理',
toolbox: '工具箱',
backups: '备份 / 恢复',
tampers: '防篡改',
xsetting: '界面设置',
logs: '日志审计',
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/views/cronjob/operate/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,8 @@
v-model="dialogData.rowData!.script"
placeholder="#Define or paste the content of your shell file here"
mode="javascript"
:heightDiff="400"
:heightDiff="0"
:min-height="200"
/>
<el-input
v-if="dialogData.rowData!.scriptMode=== 'select'"
Expand Down
Loading
Loading