mirror of
https://gitee.com/dromara/Jpom.git
synced 2024-12-02 03:48:05 +08:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
063bf4143e
@ -1,5 +1,13 @@
|
||||
# 🚀 版本日志
|
||||
|
||||
## 2.11.5.2
|
||||
|
||||
### 🐣 新增功能
|
||||
|
||||
1. 【all】升级 tomcat、yaml 版本(感谢@佳驰)
|
||||
|
||||
------
|
||||
|
||||
## 2.11.5.1-beta (2024-04-30)
|
||||
|
||||
### 🐣 新增功能
|
||||
|
@ -8,6 +8,7 @@
|
||||
* See the Mulan PSL v2 for more details.
|
||||
*/
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* @author bwcx_jzy
|
||||
@ -17,4 +18,9 @@ public class TestVersion {
|
||||
public static void main(String[] args) {
|
||||
System.out.println(StrUtil.compareVersion("2.4.3", "2.4.2"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
System.out.println(StrUtil.compareVersion("2.11.5", "2.11.5.1"));
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* Copyright (c) 2019 Of Him Code Technology Studio
|
||||
* Jpom is licensed under Mulan PSL v2.
|
||||
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||
* You may obtain a copy of Mulan PSL v2 at:
|
||||
* http://license.coscl.org.cn/MulanPSL2
|
||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||
* See the Mulan PSL v2 for more details.
|
||||
*/
|
||||
package org.dromara.jpom;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
|
@ -29,6 +29,44 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>tomcat-embed-core</artifactId>
|
||||
<groupId>org.apache.tomcat.embed</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>tomcat-embed-el</artifactId>
|
||||
<groupId>org.apache.tomcat.embed</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>tomcat-embed-websocket</artifactId>
|
||||
<groupId>org.apache.tomcat.embed</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>snakeyaml</artifactId>
|
||||
<groupId>org.yaml</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>snakeyaml</artifactId>
|
||||
<groupId>org.yaml</groupId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>tomcat-embed-core</artifactId>
|
||||
<groupId>org.apache.tomcat.embed</groupId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>tomcat-embed-el</artifactId>
|
||||
<groupId>org.apache.tomcat.embed</groupId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>tomcat-embed-websocket</artifactId>
|
||||
<groupId>org.apache.tomcat.embed</groupId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
@ -76,6 +76,12 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>snakeyaml</artifactId>
|
||||
<groupId>org.yaml</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* Copyright (c) 2019 Of Him Code Technology Studio
|
||||
* Jpom is licensed under Mulan PSL v2.
|
||||
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||
* You may obtain a copy of Mulan PSL v2 at:
|
||||
* http://license.coscl.org.cn/MulanPSL2
|
||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||
* See the Mulan PSL v2 for more details.
|
||||
*/
|
||||
package org.dromara.jpom.socket.handler;
|
||||
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
|
26
pom.xml
26
pom.xml
@ -54,6 +54,8 @@
|
||||
<jna-version>5.14.0</jna-version>
|
||||
<mwiede.jsch-version>0.2.16</mwiede.jsch-version>
|
||||
<oshi.version>6.4.12</oshi.version>
|
||||
<tomcat.version>9.0.86</tomcat.version>
|
||||
<yaml.version>2.2</yaml.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
@ -105,6 +107,30 @@
|
||||
<artifactId>jsch</artifactId>
|
||||
<version>${mwiede.jsch-version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>snakeyaml</artifactId>
|
||||
<groupId>org.yaml</groupId>
|
||||
<version>${yaml.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>tomcat-embed-core</artifactId>
|
||||
<groupId>org.apache.tomcat.embed</groupId>
|
||||
<version>${tomcat.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>tomcat-embed-el</artifactId>
|
||||
<groupId>org.apache.tomcat.embed</groupId>
|
||||
<version>${tomcat.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>tomcat-embed-websocket</artifactId>
|
||||
<groupId>org.apache.tomcat.embed</groupId>
|
||||
<version>${tomcat.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<build>
|
||||
|
@ -13,12 +13,16 @@ import build from './pages/build'
|
||||
import certificate from './pages/certificate'
|
||||
import dispatch from './pages/dispatch'
|
||||
import docker from './pages/docker'
|
||||
import fileManager from './pages/file-manager'
|
||||
import monitor from './pages/monitor'
|
||||
export default {
|
||||
pages: {
|
||||
404: page404,
|
||||
build,
|
||||
certificate,
|
||||
dispatch,
|
||||
docker
|
||||
docker,
|
||||
fileManager,
|
||||
monitor
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,7 @@
|
||||
import list from './list'
|
||||
import releaseFile from './releaseFile'
|
||||
|
||||
export default {
|
||||
list,
|
||||
releaseFile
|
||||
}
|
@ -0,0 +1,167 @@
|
||||
export default {
|
||||
c: {
|
||||
aliasCode: 'Alias Code',
|
||||
uploadFile: 'Upload File',
|
||||
fileName: 'File Name:',
|
||||
unknown: 'Unknown',
|
||||
global: 'Global',
|
||||
selectFile: 'Select File',
|
||||
retentionDays: 'Retention Days',
|
||||
fileSaveDays: 'File Save Days, Default 3650 Days',
|
||||
fileShare: 'File Share',
|
||||
currentWorkspace: 'Current Workspace',
|
||||
fileType:
|
||||
'Used to distinguish whether files are of the same type, and can be downloaded and managed for the same type',
|
||||
enterAliasCode: 'Please Enter Alias Code',
|
||||
randomGenerate: 'Randomly Generate',
|
||||
fileDescription: 'File Description',
|
||||
enterFileDescription: 'Please Enter File Description',
|
||||
downloadAddress: 'Download Address',
|
||||
copyByClick: 'Click to Copy',
|
||||
immediateDownload: 'Immediate Download',
|
||||
cancel: 'Cancel',
|
||||
systemPrompt: 'System Prompt',
|
||||
confirm: 'Confirm',
|
||||
pleaseSelectFile: 'Please Select a File to Use',
|
||||
aliasCode_1: 'Alias Code',
|
||||
uploadFile_1: 'Upload File',
|
||||
fileName_1: 'File Name:',
|
||||
unknown_1: 'Unknown',
|
||||
global_1: 'Global',
|
||||
selectFile_1: 'Select File',
|
||||
retentionDays_1: 'Retention Days',
|
||||
fileSaveDays_1: 'File Save Days, Default 3650 Days',
|
||||
fileShare_1: 'File Share',
|
||||
currentWorkspace_1: 'Current Workspace',
|
||||
fileType_1:
|
||||
'Used to distinguish whether files are of the same type, and can be downloaded and managed for the same type',
|
||||
enterAliasCode_1: 'Please Enter Alias Code',
|
||||
randomGenerate_1: 'Random Generate',
|
||||
fileDescription_1: 'File Description',
|
||||
enterFileDescription_1: 'Please Enter File Description',
|
||||
downloadAddress_1: 'Download Address',
|
||||
copyByClick_1: 'Click to Copy',
|
||||
immediateDownload_1: 'Immediate Download',
|
||||
cancel_1: 'Cancel',
|
||||
systemPrompt_1: 'System Prompt',
|
||||
confirm_1: 'Confirm',
|
||||
pleaseSelectFile_1: 'Please Select a File to Use'
|
||||
},
|
||||
p: {
|
||||
fileName: 'File Name',
|
||||
suffix: 'Suffix, Precise Search',
|
||||
fileId: 'File ID, Precise Search',
|
||||
quickBackToFirstPage: 'Hold Ctrl or Alt/Option and click the button to quickly return to the first page',
|
||||
search: 'Search',
|
||||
remoteDownload: 'Remote Download',
|
||||
batchDelete: 'Batch Delete',
|
||||
fileInfo: 'File Info',
|
||||
fileDescription: 'File Description:',
|
||||
downloadStatus: 'Download Status:',
|
||||
statusDescription: 'Status Description:',
|
||||
exist: 'Exist',
|
||||
lost: 'Lost',
|
||||
workspace: 'Workspace',
|
||||
download: 'Download',
|
||||
release: 'Release',
|
||||
delete: 'Delete',
|
||||
usageTime: 'Usage Time',
|
||||
modifyFile: 'Modify File',
|
||||
remoteDownloadFile: 'Remote Download File',
|
||||
remoteDownloadUrl: 'Remote Download URL',
|
||||
remoteDownloadAddress: 'Remote Download Address',
|
||||
resumableDownload: 'Resumable/Chunked Download',
|
||||
resetDownloadToken:
|
||||
'Reset Download Token Information. After resetting, the previous download token will be invalid',
|
||||
reset: 'Reset',
|
||||
resumableSingleFileDownload: 'Resumable/Chunked Single File Download',
|
||||
resumableAliasDownload: 'Resumable/Chunked Alias Download',
|
||||
warmPrompt: 'Warm Prompt',
|
||||
customSortField: 'Supports custom sorting fields: sort',
|
||||
sortDesc: 'Description is sorted in ascending order based on creation time',
|
||||
supportedFields: 'Supported fields can be viewed through the interface response',
|
||||
commonFields: 'Common fields include: createTimeMillis, modifyTimeMillis',
|
||||
releaseFile: 'Release File',
|
||||
confirm: 'Confirm',
|
||||
fileMD5: 'File MD5',
|
||||
name: 'Name',
|
||||
size: 'Size',
|
||||
contentSuffix: 'Suffix',
|
||||
shared: 'Shared',
|
||||
source: 'Source',
|
||||
expireDays: 'Expire Days',
|
||||
fileStatus: 'File Status',
|
||||
creator: 'Creator',
|
||||
modifier: 'Modifier',
|
||||
creationTime: 'Creation Time',
|
||||
modificationTime: 'Modification Time',
|
||||
operation: 'Operation',
|
||||
pleaseEnterFileName: 'Please Enter File Name',
|
||||
pleaseEnterRemoteAddress: 'Please Enter Remote Address',
|
||||
pleaseSelectFile: 'Please Select a File',
|
||||
fileAlreadyExists: 'The current file already exists',
|
||||
isShared: 'Is Shared:',
|
||||
yes: 'Yes',
|
||||
no: 'No',
|
||||
reallyDeleteCurrentFile: 'Are you sure you want to delete the current file?',
|
||||
noDataSelected: 'No data selected',
|
||||
reallyDeleteTheseFiles: 'Are you sure you want to delete these files?',
|
||||
fileName_1: 'File Name',
|
||||
suffix_1: 'Suffix, Precise Search',
|
||||
fileId_1: 'File ID, Precise Search',
|
||||
quickBackToFirstPage_1: 'Hold Ctrl or Alt/Option Key to Quickly Return to the First Page',
|
||||
search_1: 'Search',
|
||||
remoteDownload_1: 'Remote Download',
|
||||
batchDelete_1: 'Batch Delete',
|
||||
fileInfo_1: 'File Info',
|
||||
fileDescription_1: 'File Description:',
|
||||
downloadStatus_1: 'Download Status:',
|
||||
statusDescription_1: 'Status Description:',
|
||||
exist_1: 'Exist',
|
||||
lost_1: 'Lost',
|
||||
workspace_1: 'Workspace',
|
||||
download_1: 'Download',
|
||||
release_1: 'Release',
|
||||
delete_1: 'Delete',
|
||||
usageTime_1: 'Usage Time',
|
||||
modifyFile_1: 'Modify File',
|
||||
remoteDownloadFile_1: 'Remote Download File',
|
||||
remoteDownloadUrl_1: 'Remote Download URL',
|
||||
remoteDownloadAddress_1: 'Remote Download Address',
|
||||
resumableDownload_1: 'Resumable/Chunked Download',
|
||||
resetDownloadToken_1: 'Reset Download Token Information, Previous Download Tokens Will Be Invalidated',
|
||||
reset_1: 'Reset',
|
||||
resumableSingleFileDownload_1: 'Resumable/Chunked Single File Download',
|
||||
resumableAliasDownload_1: 'Resumable/Chunked Alias Download',
|
||||
warmPrompt_1: 'Warm Prompt',
|
||||
customSortField_1: 'Supports Custom Sorting Fields: sort',
|
||||
sortDesc_1: 'The First One Is Sorted Ascending Based on Creation Time',
|
||||
supportedFields_1: 'Supported Fields Can Be Viewed Through the Returned Interface',
|
||||
commonFields_1: 'Common Fields Include: createTimeMillis, modifyTimeMillis',
|
||||
releaseFile_1: 'Release File',
|
||||
confirm_1: 'Confirm',
|
||||
fileMD5_6: 'File MD5',
|
||||
name_1: 'Name',
|
||||
size_1: 'Size',
|
||||
contentSuffix_1: 'Suffix',
|
||||
shared_1: 'Shared',
|
||||
source_1: 'Source',
|
||||
expireDays_1: 'Expiration Days',
|
||||
fileStatus_1: 'File Status',
|
||||
creator_1: 'Creator',
|
||||
modifier_1: 'Modifier',
|
||||
creationTime_1: 'Creation Time',
|
||||
modificationTime_1: 'Modification Time',
|
||||
operation_1: 'Operation',
|
||||
pleaseEnterFileName_1: 'Please Enter File Name',
|
||||
pleaseEnterRemoteAddress_1: 'Please Enter Remote Address',
|
||||
pleaseSelectFile_1: 'Please Select a File',
|
||||
fileAlreadyExists_1: 'The Current File Already Exists',
|
||||
isShared_1: 'Is Shared:',
|
||||
yes_1: 'Yes',
|
||||
no_1: 'No',
|
||||
reallyDeleteCurrentFile_1: 'Are You Sure You Want to Delete the Current File?',
|
||||
noDataSelected_1: 'No Data Selected',
|
||||
reallyDeleteTheseFiles_1: 'Are You Sure You Want to Delete These Files?'
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
export default {
|
||||
c: {
|
||||
content: 'Before uploading'
|
||||
},
|
||||
p: {
|
||||
taskName: 'Task name',
|
||||
taskNamePlaceholder: 'Please enter the task name',
|
||||
publishMode: 'Publishing method',
|
||||
node: 'Node',
|
||||
fileNameAfterPublish:
|
||||
'The filename after publishing is: FileID.Suffix, not the real name of the file (can be modified freely using the post-upload script)',
|
||||
ssh: 'Publishing SSH',
|
||||
sshPlaceholder: 'Please select SSH',
|
||||
publishNode: 'Publishing node',
|
||||
nodePlaceholder: 'Please select a node',
|
||||
publishDir: 'Publishing directory',
|
||||
authDirConfig:
|
||||
'Authorization directory configuration is required (authorization is required for normal use of publishing). The authorization directory is mainly used to determine which directories can be published to',
|
||||
authDir: 'Configuration directory',
|
||||
firstLevelDir: 'Please select the first-level directory for publishing',
|
||||
secondLevelDir: 'Please enter the second-level directory for publishing',
|
||||
executeScript: 'Execution script',
|
||||
scriptVariable: 'Supports variable references: ${TASK_ID}, ${FILE_ID}, ${FILE_NAME}, ${FILE_EXT_NAME}',
|
||||
workspaceEnvVariable:
|
||||
'You can reference workspace environment variables. Variable placeholder: ${xxxx}, where xxxx is the variable name',
|
||||
renameFile:
|
||||
'It is recommended to rename the file in the post-upload script. The default for SSH upload is: ${FILE_ID}.${FILE_EXT_NAME}',
|
||||
preUploadScript: 'Script to be executed before file upload (non-blocking command)',
|
||||
postUploadScript: 'Script to be executed after successful file upload (non-blocking command)',
|
||||
execute: 'Execute',
|
||||
afterUpload: 'After uploading',
|
||||
afterUploadExecute: 'Execute after uploading',
|
||||
authDirSetting: 'Configure the authorization directory',
|
||||
taskNameInput: 'Please enter the file task name',
|
||||
publishModeSelect: 'Please select the publishing method',
|
||||
publishDirSelect: 'Please select the first-level directory for publishing and enter the second-level directory',
|
||||
sshSelect: 'Please select the publishing SSH'
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
import fileStorage from './fileStorage'
|
||||
import releaseTask from './release-task'
|
||||
import staticFileStorage from './staticFileStorage'
|
||||
|
||||
export default {
|
||||
fileStorage,
|
||||
releaseTask,
|
||||
staticFileStorage
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
export default {
|
||||
c: {
|
||||
taskName: 'Please enter the task name'
|
||||
},
|
||||
p: {
|
||||
taskName: 'Task name',
|
||||
publishMethod: 'Publishing method',
|
||||
node: 'Node',
|
||||
publishDir: 'Publishing directory',
|
||||
status: 'Status',
|
||||
unknown: 'Unknown',
|
||||
executionLog: 'Execution log',
|
||||
executionScript: 'Execution script',
|
||||
beforeUpload: 'Before upload',
|
||||
afterUpload: 'After upload'
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
import details from './details'
|
||||
import list from './list'
|
||||
|
||||
export default {
|
||||
details,
|
||||
list
|
||||
}
|
@ -0,0 +1,114 @@
|
||||
export default {
|
||||
c: {
|
||||
taskName: 'Task Name',
|
||||
status: 'Status',
|
||||
unknown: 'Unknown',
|
||||
cancel: 'Cancel',
|
||||
publishDir: 'Publish Directory',
|
||||
fileId: 'File ID',
|
||||
systemPrompt: 'System Prompt',
|
||||
confirm: 'Confirm',
|
||||
fileNotExist: 'File does not exist',
|
||||
taskName_1: 'Task Name',
|
||||
status_1: 'Status',
|
||||
unknown_1: 'Unknown',
|
||||
cancel_1: 'Cancel',
|
||||
publishDir_1: 'Publish Directory',
|
||||
fileId_1: 'File ID',
|
||||
systemPrompt_1: 'System Prompt',
|
||||
confirm_1: 'Confirm',
|
||||
fileNotExist_1: 'File does not exist'
|
||||
},
|
||||
p: {
|
||||
publishType: 'Publish Type',
|
||||
fastReturnFirstPage: 'Press Ctrl or Alt/Option and click the button to quickly return to the first page',
|
||||
search: 'Search',
|
||||
staticFile: 'Static File',
|
||||
fileCenter: 'File Center',
|
||||
view: 'View',
|
||||
rebuild: 'Rebuild',
|
||||
delete: 'Delete',
|
||||
taskDetail: 'Task Detail',
|
||||
publishFile: 'Publish File',
|
||||
pleaseInputTaskName: 'Please enter the task name',
|
||||
publishWay: 'Publish Method',
|
||||
node: 'Node',
|
||||
publishSsh: 'Publish SSH',
|
||||
pleaseSelectSsh: 'Please select SSH',
|
||||
publishNode: 'Publish Node',
|
||||
pleaseSelectNode: 'Please select a node',
|
||||
pleaseInputPublishDir: 'Please enter the publish directory',
|
||||
fileIdInput: 'File ID',
|
||||
pleaseInputPublishFileId: 'Please enter the file ID to publish',
|
||||
executeScript: 'Execute Script',
|
||||
beforeUpload: 'Before Upload',
|
||||
beforeUploadScript: 'Script to be executed before file upload (non-blocking command)',
|
||||
afterUpload: 'After Upload',
|
||||
afterUploadScript: 'Script to be executed after successful file upload (non-blocking command)',
|
||||
viewFile: 'View File',
|
||||
fileName: 'File Name',
|
||||
fileSize: 'File Size',
|
||||
expireTime: 'Expiration Time',
|
||||
fileShare: 'File Share',
|
||||
global: 'Global',
|
||||
workspace: 'Workspace',
|
||||
fileDescription: 'File Description',
|
||||
taskName: 'Task Name',
|
||||
distributeType: 'Distribute Type',
|
||||
fileSource: 'File Source',
|
||||
statusDescription: 'Status Description',
|
||||
executor: 'Executor',
|
||||
taskTime: 'Task Time',
|
||||
taskUpdateTime: 'Task Update Time',
|
||||
operation: 'Operation',
|
||||
pleaseInputFileTaskName: 'Please enter the file task name',
|
||||
pleaseSelectPublishSsh: 'Please select the publish SSH',
|
||||
reallyDeleteRecord: 'Are you sure you want to delete this execution record?',
|
||||
reallyCancelTask: 'Are you sure you want to cancel the current publish task?',
|
||||
publishType_1: 'Publish Type',
|
||||
fastReturnFirstPage_1: 'Click the button with Ctrl or Alt/Option key held down to quickly return to the first page',
|
||||
search_1: 'Search',
|
||||
staticFile_1: 'Static File',
|
||||
fileCenter_1: 'File Center',
|
||||
view_1: 'View',
|
||||
rebuild_1: 'Rebuild',
|
||||
delete_1: 'Delete',
|
||||
taskDetail_1: 'Task Detail',
|
||||
publishFile_1: 'Publish File',
|
||||
pleaseInputTaskName_1: 'Please enter the task name',
|
||||
publishWay_1: 'Publish Method',
|
||||
node_1: 'Node',
|
||||
publishSsh_1: 'Publish SSH',
|
||||
pleaseSelectSsh_1: 'Please select SSH',
|
||||
publishNode_1: 'Publish Node',
|
||||
pleaseSelectNode_1: 'Please select node',
|
||||
pleaseInputPublishDir_1: 'Please enter the publish directory',
|
||||
fileIdInput_1: 'File ID',
|
||||
pleaseInputPublishFileId_1: 'Please enter the file ID for publishing',
|
||||
executeScript_1: 'Execute Script',
|
||||
beforeUpload_1: 'Before Upload',
|
||||
beforeUploadScript_1: 'Script to be executed before file upload (non-blocking command)',
|
||||
afterUpload_1: 'After Upload',
|
||||
afterUploadScript_1: 'Script to be executed after successful file upload (non-blocking command)',
|
||||
viewFile_1: 'View File',
|
||||
fileName_1: 'File Name',
|
||||
fileSize_1: 'File Size',
|
||||
expireTime_1: 'Expiration Time',
|
||||
fileShare_1: 'File Share',
|
||||
global_1: 'Global',
|
||||
workspace_1: 'Workspace',
|
||||
fileDescription_1: 'File Description',
|
||||
taskName_1: 'Task Name',
|
||||
distributeType_1: 'Distribution Type',
|
||||
fileSource_1: 'File Source',
|
||||
statusDescription_1: 'Status Description',
|
||||
executor_1: 'Executor',
|
||||
taskTime_1: 'Task Time',
|
||||
taskUpdateTime_1: 'Task Update Time',
|
||||
operation_1: 'Operation',
|
||||
pleaseInputFileTaskName_1: 'Please enter the file task name',
|
||||
pleaseSelectPublishSsh_1: 'Please select the publish SSH',
|
||||
reallyDeleteRecord_1: 'Are you sure you want to delete this execution record?',
|
||||
reallyCancelTask_1: 'Are you sure you want to cancel the current publish task?'
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
import list from './list'
|
||||
|
||||
export default {
|
||||
list
|
||||
}
|
@ -0,0 +1,126 @@
|
||||
export default {
|
||||
c: {
|
||||
content1: 'Unknown',
|
||||
fileName: 'File Name',
|
||||
downloadAddress: 'Download Address',
|
||||
copyTip: 'Click to Copy',
|
||||
downloadNow: 'Download Now',
|
||||
systemPrompt: 'System Prompt',
|
||||
confirm: 'Confirm',
|
||||
cancel: 'Cancel',
|
||||
pleaseSelectFile: 'Please Select a File to Use'
|
||||
},
|
||||
p: {
|
||||
fileName: 'File Name',
|
||||
suffixSearch: 'Suffix, Precise Search',
|
||||
fileIdSearch: 'File ID, Precise Search',
|
||||
quickBackToFirstPage: 'Hold Ctrl or Alt/Option and click the button to quickly return to the first page',
|
||||
search: 'Search',
|
||||
scan: 'Scan',
|
||||
batchDelete: 'Batch Delete',
|
||||
configDirectory: 'Configure Directory',
|
||||
fileInfo: 'File Info',
|
||||
fileId: 'File ID:',
|
||||
fileNameLabel: 'File Name:',
|
||||
fileDescriptionLabel: 'File Description:',
|
||||
exist: 'Exists',
|
||||
missing: 'Missing',
|
||||
file: 'File',
|
||||
folder: 'Folder',
|
||||
download: 'Download',
|
||||
publish: 'Publish',
|
||||
deleteFile: 'Delete File',
|
||||
modifyFile: 'Modify File',
|
||||
fileDescription: 'File Description',
|
||||
pleaseEnterFileDescription: 'Please Enter File Description',
|
||||
chunkedDownload: 'Chunked/Segmented Download',
|
||||
resetDownloadToken: 'Reset Download Token Information, which will invalidate previous download tokens',
|
||||
reset: 'Reset',
|
||||
chunkedSingleFileDownload: 'Chunked/Segmented Single File Download',
|
||||
chunkedAliasDownload: 'Chunked/Segmented Alias Download',
|
||||
warmPrompt: 'Warm Prompt',
|
||||
customSortField: 'Supports custom sorting fields: sort',
|
||||
descSortAscFirst: 'Description sorted by creation time in ascending order first',
|
||||
supportedFields: 'Supported fields can be viewed through the interface return',
|
||||
commonFields: 'Common fields include: createTimeMillis, modifyTimeMillis',
|
||||
publishFile: 'Publish File',
|
||||
configAuthDirectory: 'Configure Authorization Directory',
|
||||
name: 'Name',
|
||||
desc: 'Description',
|
||||
path: 'Path',
|
||||
size: 'Size',
|
||||
suffix: 'Suffix',
|
||||
type: 'Type',
|
||||
fileStatus: 'File Status',
|
||||
fileModifyTime: 'File Modification Time',
|
||||
operation: 'Operation',
|
||||
pleaseEnterFileName: 'Please Enter File Name',
|
||||
pleaseEnterRemoteAddress: 'Please Enter Remote Address',
|
||||
confirmDeleteFile: 'Are you sure you want to delete the current file?',
|
||||
noDataSelected: 'No data selected',
|
||||
confirmDeleteFiles: 'Are you sure you want to delete these files?'
|
||||
},
|
||||
enUS: {
|
||||
c: {
|
||||
content1: 'Unknown',
|
||||
fileName: 'File Name',
|
||||
downloadAddress: 'Download Address',
|
||||
copyTip: 'Click to Copy',
|
||||
downloadNow: 'Download Now',
|
||||
systemPrompt: 'System Prompt',
|
||||
confirm: 'Confirm',
|
||||
cancel: 'Cancel',
|
||||
pleaseSelectFile: 'Please Select a File to Use'
|
||||
},
|
||||
p: {
|
||||
fileName: 'File Name',
|
||||
suffixSearch: 'Suffix, Precise Search',
|
||||
fileIdSearch: 'File ID, Precise Search',
|
||||
quickBackToFirstPage: 'Hold Ctrl or Alt/Option and click the button to quickly return to the first page',
|
||||
search: 'Search',
|
||||
scan: 'Scan',
|
||||
batchDelete: 'Batch Delete',
|
||||
configDirectory: 'Configure Directory',
|
||||
fileInfo: 'File Info',
|
||||
fileId: 'File ID:',
|
||||
fileNameLabel: 'File Name:',
|
||||
fileDescriptionLabel: 'File Description:',
|
||||
exist: 'Exists',
|
||||
missing: 'Missing',
|
||||
file: 'File',
|
||||
folder: 'Folder',
|
||||
download: 'Download',
|
||||
publish: 'Publish',
|
||||
deleteFile: 'Delete File',
|
||||
modifyFile: 'Modify File',
|
||||
fileDescription: 'File Description',
|
||||
pleaseEnterFileDescription: 'Please Enter File Description',
|
||||
chunkedDownload: 'Chunked/Split Download',
|
||||
resetDownloadToken: 'Reset Download Token Information. Previous Download Tokens Will Be Invalidated After Reset',
|
||||
reset: 'Reset',
|
||||
chunkedSingleFileDownload: 'Chunked/Split Single File Download',
|
||||
chunkedAliasDownload: 'Chunked/Split Alias Download',
|
||||
warmPrompt: 'Warm Prompt',
|
||||
customSortField: 'Supports Custom Sorting Field: sort',
|
||||
descSortAscFirst: 'Description Sorted Ascending by Creation Time First',
|
||||
supportedFields: 'Supported Fields Can Be Viewed Through the API Response',
|
||||
commonFields: 'Common Fields Include: createTimeMillis, modifyTimeMillis',
|
||||
publishFile: 'Publish File',
|
||||
configAuthDirectory: 'Configure Authorization Directory',
|
||||
name: 'Name',
|
||||
desc: 'Description',
|
||||
path: 'Path',
|
||||
size: 'Size',
|
||||
suffix: 'Suffix',
|
||||
type: 'Type',
|
||||
fileStatus: 'File Status',
|
||||
fileModifyTime: 'File Modification Time',
|
||||
operation: 'Operation',
|
||||
pleaseEnterFileName: 'Please Enter File Name',
|
||||
pleaseEnterRemoteAddress: 'Please Enter Remote Address',
|
||||
confirmDeleteFile: 'Are You Sure You Want to Delete This File?',
|
||||
noDataSelected: 'No Data Selected',
|
||||
confirmDeleteFiles: 'Are You Sure You Want to Delete These Files?'
|
||||
}
|
||||
}
|
||||
}
|
9
web-vue/src/i18n/locales/en_US/pages/monitor/index.ts
Normal file
9
web-vue/src/i18n/locales/en_US/pages/monitor/index.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import list from './list.ts'
|
||||
import log from './log.ts'
|
||||
import operateLog from './operate-log.ts'
|
||||
|
||||
export default {
|
||||
list,
|
||||
log,
|
||||
operateLog
|
||||
}
|
106
web-vue/src/i18n/locales/en_US/pages/monitor/list.ts
Normal file
106
web-vue/src/i18n/locales/en_US/pages/monitor/list.ts
Normal file
@ -0,0 +1,106 @@
|
||||
export default {
|
||||
c: {
|
||||
monitorName: 'Monitor Name',
|
||||
openStatus: 'Open Status',
|
||||
open: 'Open',
|
||||
close: 'Close',
|
||||
autoRestart: 'Auto Restart',
|
||||
yes: 'Yes',
|
||||
no: 'No',
|
||||
alarmStatus: 'Alarm Status',
|
||||
alarming: 'Alarming',
|
||||
notAlarming: 'Not Alarming',
|
||||
on: 'On',
|
||||
off: 'Off',
|
||||
monitorPeriod: 'Monitor Period',
|
||||
monitorName_1: 'Monitor Name',
|
||||
openStatus_1: 'Open Status',
|
||||
open_1: 'Open',
|
||||
close_1: 'Close',
|
||||
autoRestart_1: 'Auto Restart',
|
||||
yes_1: 'Yes',
|
||||
no_1: 'No',
|
||||
alarmStatus_1: 'Alarm Status',
|
||||
alarming_1: 'Alarming',
|
||||
notAlarming_1: 'Not Alarming',
|
||||
on_1: 'On',
|
||||
off_1: 'Off',
|
||||
monitorPeriod_1: 'Monitor Period'
|
||||
},
|
||||
p: {
|
||||
clickBackToFirstPage: 'Hold Ctrl or Alt/Option key to click the button to quickly return to the first page',
|
||||
search: 'Search',
|
||||
add: 'Add',
|
||||
edit: 'Edit',
|
||||
delete: 'Delete',
|
||||
editMonitor: 'Edit Monitor',
|
||||
cronExpr:
|
||||
'If you need to automatically execute at a scheduled time, fill in the cron expression. The second level is not enabled by default. You need to modify the configuration file: [system.timerMatchSecond])',
|
||||
monitorItem: 'Monitor Item',
|
||||
selectMonitorItem: 'Select the item to monitor. file type items cannot be monitored',
|
||||
leftBracket: '【',
|
||||
rightBracket: '】',
|
||||
contactPerson: 'Contact Person',
|
||||
contactPersonNote:
|
||||
'If the alarm contact person here cannot be selected, it means that the administrator has not set the email here. You can set it in the user profile in the drop-down menu in the upper right corner.',
|
||||
pending: 'Pending',
|
||||
selected: 'Selected',
|
||||
noEmailConfigured: 'If it cannot be selected, it means that the corresponding user has not configured an email',
|
||||
alarmRequest: 'Alarm Request When Occurred',
|
||||
alarmParams:
|
||||
'The input parameters are: monitorId, monitorName, nodeId, nodeName, projectId, projectName, title, content, runStatus',
|
||||
running: 'A value of true indicates that the project is currently running',
|
||||
abnormalRecovery: 'Abnormal Recovery',
|
||||
notRunning: 'Indicates that the project is not currently running',
|
||||
abnormal: 'An abnormality occurred',
|
||||
receiveAlarmMsg: 'Receive alarm messages, optional, GET request',
|
||||
name: 'Name',
|
||||
modifier: 'Modifier',
|
||||
modifiedTime: 'Modified Time',
|
||||
operation: 'Operation',
|
||||
pleaseEnterMonitorName: 'Please enter the monitor name',
|
||||
unknown: 'Unknown',
|
||||
pleaseSelectContactOrWebhook: 'Please select a contact person for the alarm or fill in the webhook',
|
||||
systemPrompt: 'System Prompt',
|
||||
reallyDeleteMonitor: 'Really delete the monitor?',
|
||||
confirm: 'Confirm',
|
||||
cancel: 'Cancel',
|
||||
clickBackToFirstPage_1: 'Hold Ctrl or Alt/Option key to click the button to quickly return to the first page',
|
||||
search_1: 'Search',
|
||||
add_1: 'Add',
|
||||
edit_1: 'Edit',
|
||||
delete_1: 'Delete',
|
||||
editMonitor_1: 'Edit Monitor',
|
||||
cronExpr_1:
|
||||
'If you need to automatically execute at a scheduled time, fill in the cron expression. The second level is not enabled by default. You need to modify the configuration file: [system.timerMatchSecond])',
|
||||
monitorItem_1: 'Monitor Item',
|
||||
selectMonitorItem_1: 'Select the item to monitor. File type items cannot be monitored',
|
||||
leftBracket_1: '【',
|
||||
rightBracket_1: '】',
|
||||
contactPerson_1: 'Contact Person',
|
||||
contactPersonNote_1:
|
||||
'If the alarm contact person here cannot be selected, it means that the administrator has not set the email address here. You can set it in the user information in the drop-down menu in the upper right corner.',
|
||||
pending_1: 'Pending',
|
||||
selected_1: 'Selected',
|
||||
noEmailConfigured_1: 'If it cannot be selected, it means that the corresponding user has not configured the email',
|
||||
alarmRequest_1: 'Alarm Request',
|
||||
alarmParams_1:
|
||||
'The incoming parameters are: monitorId, monitorName, nodeId, nodeName, projectId, projectName, title, content, runStatus',
|
||||
running_1: 'A value of true indicates that the project is currently running',
|
||||
abnormalRecovery_1: 'Abnormal Recovery',
|
||||
notRunning_1: 'Indicates that the project is not currently running',
|
||||
abnormal_1: 'An exception occurred',
|
||||
receiveAlarmMsg_1: 'Receive alarm messages, optional, GET request',
|
||||
name_1: 'Name',
|
||||
modifier_1: 'Modifier',
|
||||
modifiedTime_1: 'Modified Time',
|
||||
operation_1: 'Operation',
|
||||
pleaseEnterMonitorName_1: 'Please enter the monitor name',
|
||||
unknown_1: 'Unknown',
|
||||
pleaseSelectContactOrWebhook_1: 'Please select a contact person for the alarm or fill in the webhook',
|
||||
systemPrompt_1: 'System Prompt',
|
||||
reallyDeleteMonitor_1: 'Really delete the monitor?',
|
||||
confirm_1: 'Confirm',
|
||||
cancel_1: 'Cancel'
|
||||
}
|
||||
}
|
28
web-vue/src/i18n/locales/en_US/pages/monitor/log.ts
Normal file
28
web-vue/src/i18n/locales/en_US/pages/monitor/log.ts
Normal file
@ -0,0 +1,28 @@
|
||||
export default {
|
||||
c: {
|
||||
alarmStatus: 'Alarm status',
|
||||
normal: 'Normal',
|
||||
abnormal: 'Abnormal',
|
||||
notificationStatus: 'Notification status',
|
||||
success: 'Success',
|
||||
failure: 'Failure'
|
||||
},
|
||||
p: {
|
||||
pleaseSelectNode: 'Please select a node',
|
||||
quickReturnToFirstPage: 'Hold Ctrl or Alt/Option key and click the button to quickly return to the first page',
|
||||
search: 'Search',
|
||||
unknown: 'Unknown',
|
||||
details: 'Details',
|
||||
detailInfo: 'Detailed information',
|
||||
alarmTitle: 'Alarm title',
|
||||
nodeName: 'Node name',
|
||||
projectId: 'Project ID',
|
||||
alarmMethod: 'Alarm method',
|
||||
alarmTime: 'Alarm time',
|
||||
operation: 'Operation',
|
||||
title: 'Title',
|
||||
content: 'Content',
|
||||
notificationTarget: 'Notification target',
|
||||
notificationAbnormal: 'Notification abnormal'
|
||||
}
|
||||
}
|
37
web-vue/src/i18n/locales/en_US/pages/monitor/operate-log.ts
Normal file
37
web-vue/src/i18n/locales/en_US/pages/monitor/operate-log.ts
Normal file
@ -0,0 +1,37 @@
|
||||
export default {
|
||||
c: {
|
||||
monitorName: 'Monitor Name',
|
||||
status: 'Status',
|
||||
on: 'On',
|
||||
off: 'Off'
|
||||
},
|
||||
p: {
|
||||
quickReturn: 'Click the button while holding Ctrl or Alt/Option to quickly return to the first page',
|
||||
search: 'Search',
|
||||
add: 'Add',
|
||||
edit: 'Edit',
|
||||
delete: 'Delete',
|
||||
editMonitor: 'Edit Monitor',
|
||||
open: 'On',
|
||||
close: 'Off',
|
||||
monitorUser: 'Monitor User',
|
||||
monitorFunction: 'Monitor Function',
|
||||
monitorOperation: 'Monitor Operation',
|
||||
alarmContact: 'Alarm Contact',
|
||||
noEmailSet:
|
||||
'If the alarm contact cannot be selected here, it means that the administrator has not set an email address. You can set it in the user profile in the drop-down menu in the upper right corner.',
|
||||
name: 'Name',
|
||||
modifier: 'Modifier',
|
||||
modifiedTime: 'Modified Time',
|
||||
operation: 'Operation',
|
||||
pleaseInputMonitorName: 'Please enter the monitor name',
|
||||
pleaseSelectMonitorUser: 'Please select the monitor user',
|
||||
pleaseSelectMonitorOperation: 'Please select the monitor operation',
|
||||
pleaseSelectMonitorFunction: 'Please select the monitor function',
|
||||
pleaseSelectAlarmContact: 'Please select the alarm contact',
|
||||
systemPrompt: 'System Prompt',
|
||||
confirmDelete: 'Are you sure you want to delete the operation monitor?',
|
||||
confirm: 'Confirm',
|
||||
cancel: 'Cancel'
|
||||
}
|
||||
}
|
@ -13,12 +13,16 @@ import build from './pages/build'
|
||||
import certificate from './pages/certificate'
|
||||
import dispatch from './pages/dispatch'
|
||||
import docker from './pages/docker'
|
||||
import fileManager from './pages/file-manager'
|
||||
import monitor from './pages/monitor'
|
||||
export default {
|
||||
pages: {
|
||||
404: page404,
|
||||
build,
|
||||
certificate,
|
||||
dispatch,
|
||||
docker
|
||||
docker,
|
||||
fileManager,
|
||||
monitor
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,7 @@
|
||||
import list from './list'
|
||||
import releaseFile from './releaseFile'
|
||||
|
||||
export default {
|
||||
list,
|
||||
releaseFile
|
||||
}
|
@ -0,0 +1,85 @@
|
||||
export default {
|
||||
c: {
|
||||
aliasCode: '别名码',
|
||||
uploadFile: '上传文件',
|
||||
fileName: '文件名:',
|
||||
unknown: '未知',
|
||||
global: '全局',
|
||||
selectFile: '选择文件',
|
||||
retentionDays: '保留天数',
|
||||
fileSaveDays: '文件保存天数,默认 3650 天',
|
||||
fileShare: '文件共享',
|
||||
currentWorkspace: '当前工作空间',
|
||||
fileType: '用于区别文件是否为同一类型,可以针对同类型进行下载管理',
|
||||
enterAliasCode: '请输入别名码',
|
||||
randomGenerate: '随机生成',
|
||||
fileDescription: '文件描述',
|
||||
enterFileDescription: '请输入文件描述',
|
||||
downloadAddress: '下载地址',
|
||||
copyByClick: '点击可以复制',
|
||||
immediateDownload: '立即下载',
|
||||
cancel: '取消',
|
||||
systemPrompt: '系统提示',
|
||||
confirm: '确认',
|
||||
pleaseSelectFile: '请选择要使用的文件'
|
||||
},
|
||||
p: {
|
||||
fileName: '文件名称',
|
||||
suffix: '后缀,精准搜索',
|
||||
fileId: '文件id,精准搜索',
|
||||
quickBackToFirstPage: '按住 Ctr 或者 Alt/Option 键点击按钮快速回到第一页',
|
||||
search: '搜索',
|
||||
remoteDownload: '远程下载',
|
||||
batchDelete: '批量删除',
|
||||
fileInfo: '文件信息',
|
||||
fileDescription: '文件描述:',
|
||||
downloadStatus: '下载状态:',
|
||||
statusDescription: '状态描述:',
|
||||
exist: '存在',
|
||||
lost: '丢失',
|
||||
workspace: '工作空间',
|
||||
download: '下载',
|
||||
release: '发布',
|
||||
delete: '删除',
|
||||
usageTime: '用时',
|
||||
modifyFile: '修改文件',
|
||||
remoteDownloadFile: '远程下载文件',
|
||||
remoteDownloadUrl: '远程下载URL',
|
||||
remoteDownloadAddress: '远程下载地址',
|
||||
resumableDownload: '断点/分片下载',
|
||||
resetDownloadToken: '重置下载 token 信息,重置后之前的下载 token 将失效',
|
||||
reset: '重置',
|
||||
resumableSingleFileDownload: '断点/分片单文件下载',
|
||||
resumableAliasDownload: '断点/分片别名下载',
|
||||
warmPrompt: '温馨提示',
|
||||
customSortField: '支持自定义排序字段:sort',
|
||||
sortDesc: '描述根据创建时间升序第一个',
|
||||
supportedFields: '支持的字段可以通过接口返回的查看',
|
||||
commonFields: '通用的字段有:createTimeMillis、modifyTimeMillis',
|
||||
releaseFile: '发布文件',
|
||||
confirm: '确定',
|
||||
fileMD5: '文件MD5',
|
||||
name: '名称',
|
||||
size: '大小',
|
||||
contentSuffix: '后缀',
|
||||
shared: '共享',
|
||||
source: '来源',
|
||||
expireDays: '过期天数',
|
||||
fileStatus: '文件状态',
|
||||
creator: '创建人',
|
||||
modifier: '修改人',
|
||||
creationTime: '创建时间',
|
||||
modificationTime: '修改时间',
|
||||
operation: '操作',
|
||||
pleaseEnterFileName: '请输入文件名称',
|
||||
pleaseEnterRemoteAddress: '请输入远程地址',
|
||||
pleaseSelectFile: '请选择文件',
|
||||
fileAlreadyExists: '当前文件已经存在啦',
|
||||
isShared: '是否共享:',
|
||||
yes: '是',
|
||||
no: '否',
|
||||
reallyDeleteCurrentFile: '真的要删除当前文件么?',
|
||||
noDataSelected: '没有选择任何数据',
|
||||
reallyDeleteTheseFiles: '真的要删除这些文件么?'
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
export default {
|
||||
c: {
|
||||
content: '上传前'
|
||||
},
|
||||
p: {
|
||||
taskName: '任务名',
|
||||
taskNamePlaceholder: '请输入任务名',
|
||||
publishMode: '发布方式',
|
||||
node: '节点',
|
||||
fileNameAfterPublish: '发布后的文件名是:文件ID.后缀,并非文件真实名称 (可以使用上传后脚本随意修改)',
|
||||
ssh: '发布的SSH',
|
||||
sshPlaceholder: '请选择SSH',
|
||||
publishNode: '发布的节点',
|
||||
nodePlaceholder: '请选择节点',
|
||||
publishDir: '发布目录',
|
||||
authDirConfig: '需要配置授权目录(授权才能正常使用发布),授权目录主要是用于确定可以发布到哪些目录中',
|
||||
authDir: '配置目录',
|
||||
firstLevelDir: '请选择发布的一级目录',
|
||||
secondLevelDir: '请填写发布的二级目录',
|
||||
executeScript: '执行脚本',
|
||||
scriptVariable: '支持变量引用:${TASK_ID}、${FILE_ID}、${FILE_NAME}、${FILE_EXT_NAME}',
|
||||
workspaceEnvVariable: '可以引用工作空间的环境变量 变量占位符 ${xxxx} xxxx 为变量名称',
|
||||
renameFile: '建议在上传后的脚本中对文件进行自定义更名,SSH 上传默认为:${FILE_ID}.${FILE_EXT_NAME}',
|
||||
preUploadScript: '文件上传前需要执行的脚本(非阻塞命令)',
|
||||
postUploadScript: '文件上传成功后需要执行的脚本(非阻塞命令)',
|
||||
execute: '执行',
|
||||
afterUpload: '上传后',
|
||||
afterUploadExecute: '上传后执行',
|
||||
authDirSetting: '配置授权目录',
|
||||
taskNameInput: '请输入文件任务名',
|
||||
publishModeSelect: '请选择发布方式',
|
||||
publishDirSelect: '请选择发布的一级目录和填写二级目录',
|
||||
sshSelect: '请选择发布的SSH'
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
import fileStorage from './fileStorage'
|
||||
import releaseTask from './release-task'
|
||||
import staticFileStorage from './staticFileStorage'
|
||||
|
||||
export default {
|
||||
fileStorage,
|
||||
releaseTask,
|
||||
staticFileStorage
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
export default {
|
||||
c: {
|
||||
taskName: '请输入任务名'
|
||||
},
|
||||
p: {
|
||||
taskName: '任务名',
|
||||
publishMethod: '发布方式',
|
||||
node: '节点',
|
||||
publishDir: '发布目录',
|
||||
status: '状态',
|
||||
unknown: '未知',
|
||||
executionLog: '执行日志',
|
||||
executionScript: '执行脚本',
|
||||
beforeUpload: '上传前',
|
||||
afterUpload: '上传后'
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
import details from './details'
|
||||
import list from './list'
|
||||
|
||||
export default {
|
||||
details,
|
||||
list
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
export default {
|
||||
c: {
|
||||
taskName: '任务名',
|
||||
status: '状态',
|
||||
unknown: '未知',
|
||||
cancel: '取消',
|
||||
publishDir: '发布目录',
|
||||
fileId: '文件ID',
|
||||
systemPrompt: '系统提示',
|
||||
confirm: '确认',
|
||||
fileNotExist: '文件不存在啦'
|
||||
},
|
||||
p: {
|
||||
publishType: '发布类型',
|
||||
fastReturnFirstPage: '按住 Ctr 或者 Alt/Option 键点击按钮快速回到第一页',
|
||||
search: '搜索',
|
||||
staticFile: '静态文件',
|
||||
fileCenter: '文件中心',
|
||||
view: '查看',
|
||||
rebuild: '重建',
|
||||
delete: '删除',
|
||||
taskDetail: '任务详情',
|
||||
publishFile: '发布文件',
|
||||
pleaseInputTaskName: '请输入任务名',
|
||||
publishWay: '发布方式',
|
||||
node: '节点',
|
||||
publishSsh: '发布的SSH',
|
||||
pleaseSelectSsh: '请选择SSH',
|
||||
publishNode: '发布的节点',
|
||||
pleaseSelectNode: '请选择节点',
|
||||
pleaseInputPublishDir: '请输入发布目录',
|
||||
fileIdInput: '文件id',
|
||||
pleaseInputPublishFileId: '请输入发布的文件id',
|
||||
executeScript: '执行脚本',
|
||||
beforeUpload: '上传前',
|
||||
beforeUploadScript: '文件上传前需要执行的脚本(非阻塞命令)',
|
||||
afterUpload: '上传后',
|
||||
afterUploadScript: '文件上传成功后需要执行的脚本(非阻塞命令)',
|
||||
viewFile: '查看文件',
|
||||
fileName: '文件名',
|
||||
fileSize: '文件大小',
|
||||
expireTime: '过期时间',
|
||||
fileShare: '文件共享',
|
||||
global: '全局',
|
||||
workspace: '工作空间',
|
||||
fileDescription: '文件描述',
|
||||
taskName: '任务名称',
|
||||
distributeType: '分发类型',
|
||||
fileSource: '文件来源',
|
||||
statusDescription: '状态描述',
|
||||
executor: '执行人',
|
||||
taskTime: '任务时间',
|
||||
taskUpdateTime: '任务更新时间',
|
||||
operation: '操作',
|
||||
pleaseInputFileTaskName: '请输入文件任务名',
|
||||
pleaseSelectPublishSsh: '请选择发布的SSH',
|
||||
reallyDeleteRecord: '真的要删除该执行记录吗?',
|
||||
reallyCancelTask: '真的取消当前发布任务吗?'
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
import list from './list'
|
||||
|
||||
export default {
|
||||
list
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
export default {
|
||||
c: {
|
||||
content1: '未知',
|
||||
fileName: '文件名',
|
||||
downloadAddress: '下载地址',
|
||||
copyTip: '点击可以复制',
|
||||
downloadNow: '立即下载',
|
||||
systemPrompt: '系统提示',
|
||||
confirm: '确认',
|
||||
cancel: '取消',
|
||||
pleaseSelectFile: '请选择要使用的文件'
|
||||
},
|
||||
p: {
|
||||
fileName: '文件名称',
|
||||
suffixSearch: '后缀,精准搜索',
|
||||
fileIdSearch: '文件id,精准搜索',
|
||||
quickBackToFirstPage: '按住 Ctr 或者 Alt/Option 键点击按钮快速回到第一页',
|
||||
search: '搜索',
|
||||
scan: '扫描',
|
||||
batchDelete: '批量删除',
|
||||
configDirectory: '配置目录',
|
||||
fileInfo: '文件信息',
|
||||
fileId: '文件ID:',
|
||||
fileNameLabel: '文件名:',
|
||||
fileDescriptionLabel: '文件描述:',
|
||||
exist: '存在',
|
||||
missing: '丢失',
|
||||
file: '文件',
|
||||
folder: '文件夹',
|
||||
download: '下载',
|
||||
publish: '发布',
|
||||
deleteFile: '删除',
|
||||
modifyFile: '修改文件',
|
||||
fileDescription: '文件描述',
|
||||
pleaseEnterFileDescription: '请输入文件描述',
|
||||
chunkedDownload: '断点/分片下载',
|
||||
resetDownloadToken: '重置下载 token 信息,重置后之前的下载 token 将失效',
|
||||
reset: '重置',
|
||||
chunkedSingleFileDownload: '断点/分片单文件下载',
|
||||
chunkedAliasDownload: '断点/分片别名下载',
|
||||
warmPrompt: '温馨提示',
|
||||
customSortField: '支持自定义排序字段:sort',
|
||||
descSortAscFirst: '描述根据创建时间升序第一个',
|
||||
supportedFields: '支持的字段可以通过接口返回的查看',
|
||||
commonFields: '通用的字段有:createTimeMillis、modifyTimeMillis',
|
||||
publishFile: '发布文件',
|
||||
configAuthDirectory: '配置授权目录',
|
||||
name: '名称',
|
||||
desc: '描述',
|
||||
path: '路径',
|
||||
size: '大小',
|
||||
suffix: '后缀',
|
||||
type: '类型',
|
||||
fileStatus: '文件状态',
|
||||
fileModifyTime: '文件修改时间',
|
||||
operation: '操作',
|
||||
pleaseEnterFileName: '请输入文件名称',
|
||||
pleaseEnterRemoteAddress: '请输入远程地址',
|
||||
confirmDeleteFile: '真的要删除当前文件么?',
|
||||
noDataSelected: '没有选择任何数据',
|
||||
confirmDeleteFiles: '真的要删除这些文件么?'
|
||||
}
|
||||
}
|
9
web-vue/src/i18n/locales/zh-CN/pages/monitor/index.ts
Normal file
9
web-vue/src/i18n/locales/zh-CN/pages/monitor/index.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import list from './list.ts'
|
||||
import log from './log.ts'
|
||||
import operateLog from './operate-log.ts'
|
||||
|
||||
export default {
|
||||
list,
|
||||
log,
|
||||
operateLog
|
||||
}
|
56
web-vue/src/i18n/locales/zh-CN/pages/monitor/list.ts
Normal file
56
web-vue/src/i18n/locales/zh-CN/pages/monitor/list.ts
Normal file
@ -0,0 +1,56 @@
|
||||
export default {
|
||||
c: {
|
||||
monitorName: '监控名称',
|
||||
openStatus: '开启状态',
|
||||
open: '开启',
|
||||
close: '关闭',
|
||||
autoRestart: '自动重启',
|
||||
yes: '是',
|
||||
no: '否',
|
||||
alarmStatus: '报警状态',
|
||||
alarming: '报警中',
|
||||
notAlarming: '未报警',
|
||||
on: '开',
|
||||
off: '关',
|
||||
monitorPeriod: '监控周期'
|
||||
},
|
||||
p: {
|
||||
clickBackToFirstPage: '按住 Ctr 或者 Alt/Option 键点击按钮快速回到第一页',
|
||||
search: '搜索',
|
||||
add: '新增',
|
||||
edit: '编辑',
|
||||
delete: '删除',
|
||||
editMonitor: '编辑监控',
|
||||
cronExpr:
|
||||
'如果需要定时自动执行则填写,cron 表达式.默认未开启秒级别,需要去修改配置文件中:[system.timerMatchSecond])',
|
||||
monitorItem: '监控项目',
|
||||
selectMonitorItem: '选择要监控的项目,file 类型项目不可以监控',
|
||||
leftBracket: '【',
|
||||
rightBracket: '】',
|
||||
contactPerson: '联系人',
|
||||
contactPersonNote:
|
||||
'如果这里的报警联系人无法选择,说明这里面的管理员没有设置邮箱,在右上角下拉菜单里面的用户资料里可以设置。',
|
||||
pending: '待选择',
|
||||
selected: '已选择',
|
||||
noEmailConfigured: '如果不可以选择则表示对应的用户没有配置邮箱',
|
||||
alarmRequest: '发生报警时候请求',
|
||||
alarmParams:
|
||||
'传入参数有:monitorId、monitorName、nodeId、nodeName、projectId、projectName、title、content、runStatus',
|
||||
running: '值为 true 表示项目当前为运行中',
|
||||
abnormalRecovery: '异常恢复',
|
||||
notRunning: '表示项目当前未运行',
|
||||
abnormal: '发生异常',
|
||||
receiveAlarmMsg: '接收报警消息,非必填,GET请求',
|
||||
name: '名称',
|
||||
modifier: '修改人',
|
||||
modifiedTime: '修改时间',
|
||||
operation: '操作',
|
||||
pleaseEnterMonitorName: '请输入监控名称',
|
||||
unknown: '未知',
|
||||
pleaseSelectContactOrWebhook: '请选择一位报警联系人或者填写webhook',
|
||||
systemPrompt: '系统提示',
|
||||
reallyDeleteMonitor: '真的要删除监控么?',
|
||||
confirm: '确认',
|
||||
cancel: '取消'
|
||||
}
|
||||
}
|
28
web-vue/src/i18n/locales/zh-CN/pages/monitor/log.ts
Normal file
28
web-vue/src/i18n/locales/zh-CN/pages/monitor/log.ts
Normal file
@ -0,0 +1,28 @@
|
||||
export default {
|
||||
c: {
|
||||
alarmStatus: '报警状态',
|
||||
normal: '正常',
|
||||
abnormal: '异常',
|
||||
notificationStatus: '通知状态',
|
||||
success: '成功',
|
||||
failure: '失败'
|
||||
},
|
||||
p: {
|
||||
pleaseSelectNode: '请选择节点',
|
||||
quickReturnToFirstPage: '按住 Ctr 或者 Alt/Option 键点击按钮快速回到第一页',
|
||||
search: '搜索',
|
||||
unknown: '未知',
|
||||
details: '详情',
|
||||
detailInfo: '详情信息',
|
||||
alarmTitle: '报警标题',
|
||||
nodeName: '节点名称',
|
||||
projectId: '项目 ID',
|
||||
alarmMethod: '报警方式',
|
||||
alarmTime: '报警时间',
|
||||
operation: '操作',
|
||||
title: '标题',
|
||||
content: '内容',
|
||||
notificationTarget: '通知对象',
|
||||
notificationAbnormal: '通知异常'
|
||||
}
|
||||
}
|
37
web-vue/src/i18n/locales/zh-CN/pages/monitor/operate-log.ts
Normal file
37
web-vue/src/i18n/locales/zh-CN/pages/monitor/operate-log.ts
Normal file
@ -0,0 +1,37 @@
|
||||
export default {
|
||||
c: {
|
||||
monitorName: '监控名称',
|
||||
status: '开启状态',
|
||||
on: '开启',
|
||||
off: '关闭'
|
||||
},
|
||||
p: {
|
||||
quickReturn: '按住 Ctr 或者 Alt/Option 键点击按钮快速回到第一页',
|
||||
search: '搜索',
|
||||
add: '新增',
|
||||
edit: '编辑',
|
||||
delete: '删除',
|
||||
editMonitor: '编辑监控',
|
||||
open: '开',
|
||||
close: '关',
|
||||
monitorUser: '监控用户',
|
||||
monitorFunction: '监控功能',
|
||||
monitorOperation: '监控操作',
|
||||
alarmContact: '报警联系人',
|
||||
noEmailSet:
|
||||
'如果这里的报警联系人无法选择,说明这里面的管理员没有设置邮箱,在右上角下拉菜单里面的用户资料里可以设置。',
|
||||
name: '名称',
|
||||
modifier: '修改人',
|
||||
modifiedTime: '修改时间',
|
||||
operation: '操作',
|
||||
pleaseInputMonitorName: '请输入监控名称',
|
||||
pleaseSelectMonitorUser: '请选择监控用户',
|
||||
pleaseSelectMonitorOperation: '请选择监控操作',
|
||||
pleaseSelectMonitorFunction: '请选择监控的功能',
|
||||
pleaseSelectAlarmContact: '请选择报警联系人',
|
||||
systemPrompt: '系统提示',
|
||||
confirmDelete: '真的要删除操作监控么?',
|
||||
confirm: '确认',
|
||||
cancel: '取消'
|
||||
}
|
||||
}
|
@ -24,40 +24,40 @@
|
||||
<a-space>
|
||||
<a-input
|
||||
v-model:value="listQuery['%name%']"
|
||||
placeholder="文件名称"
|
||||
:placeholder="$tl('p.fileName')"
|
||||
class="search-input-item"
|
||||
@press-enter="loadData"
|
||||
/>
|
||||
<a-input
|
||||
v-model:value="listQuery['%aliasCode%']"
|
||||
placeholder="别名码"
|
||||
:placeholder="$tl('c.aliasCode')"
|
||||
class="search-input-item"
|
||||
@press-enter="loadData"
|
||||
/>
|
||||
<a-input
|
||||
v-model:value="listQuery['extName']"
|
||||
placeholder="后缀,精准搜索"
|
||||
:placeholder="$tl('p.suffix')"
|
||||
class="search-input-item"
|
||||
@press-enter="loadData"
|
||||
/>
|
||||
<a-input
|
||||
v-model:value="listQuery['id']"
|
||||
placeholder="文件id,精准搜索"
|
||||
:placeholder="$tl('p.fileId')"
|
||||
class="search-input-item"
|
||||
@press-enter="loadData"
|
||||
/>
|
||||
<a-tooltip title="按住 Ctr 或者 Alt/Option 键点击按钮快速回到第一页">
|
||||
<a-button type="primary" :loading="loading" @click="loadData">搜索</a-button>
|
||||
<a-tooltip :title="$tl('p.quickBackToFirstPage')">
|
||||
<a-button type="primary" :loading="loading" @click="loadData">{{ $tl('p.search') }}</a-button>
|
||||
</a-tooltip>
|
||||
<a-button type="primary" @click="handleUpload">上传文件</a-button>
|
||||
<a-button type="primary" @click="handleRemoteDownload">远程下载</a-button>
|
||||
<a-button type="primary" @click="handleUpload">{{ $tl('c.uploadFile') }}</a-button>
|
||||
<a-button type="primary" @click="handleRemoteDownload">{{ $tl('p.remoteDownload') }}</a-button>
|
||||
<a-button
|
||||
type="primary"
|
||||
danger
|
||||
:disabled="!tableSelections || tableSelections.length <= 0"
|
||||
@click="handleBatchDelete"
|
||||
>
|
||||
批量删除
|
||||
{{ $tl('p.batchDelete') }}
|
||||
</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
@ -74,12 +74,14 @@
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'name'">
|
||||
<a-popover title="文件信息">
|
||||
<a-popover :title="$tl('p.fileInfo')">
|
||||
<template #content>
|
||||
<p>文件名:{{ text }}</p>
|
||||
<p>文件描述:{{ record.description }}</p>
|
||||
<p v-if="record.status !== undefined">下载状态:{{ statusMap[record.status] || '未知' }}</p>
|
||||
<p v-if="record.progressDesc">状态描述:{{ record.progressDesc }}</p>
|
||||
<p>{{ $tl('c.fileName') }}{{ text }}</p>
|
||||
<p>{{ $tl('p.fileDescription') }}{{ record.description }}</p>
|
||||
<p v-if="record.status !== undefined">
|
||||
{{ $tl('p.downloadStatus') }}{{ statusMap[record.status] || $tl('c.unknown') }}
|
||||
</p>
|
||||
<p v-if="record.progressDesc">{{ $tl('p.statusDescription') }}{{ record.progressDesc }}</p>
|
||||
</template>
|
||||
<!-- {{ text }} -->
|
||||
<a-button type="link" style="padding: 0" size="small" @click="handleEdit(record)">{{ text }}</a-button>
|
||||
@ -92,29 +94,31 @@
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'source'">
|
||||
<a-tooltip placement="topLeft" :title="`${sourceMap[text] || '未知'}`">
|
||||
<span>{{ sourceMap[text] || '未知' }}</span>
|
||||
<a-tooltip placement="topLeft" :title="sourceMap[text] || $tl('c.unknown')">
|
||||
<span>{{ sourceMap[text] || $tl('c.unknown') }}</span>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.dataIndex === 'exists'">
|
||||
<a-tag v-if="text" color="green">存在</a-tag>
|
||||
<a-tag v-else color="red">丢失</a-tag>
|
||||
<a-tag v-if="text" color="green">{{ $tl('p.exist') }}</a-tag>
|
||||
<a-tag v-else color="red">{{ $tl('p.lost') }}</a-tag>
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'workspaceId'">
|
||||
<a-tag v-if="text === 'GLOBAL'">全局</a-tag>
|
||||
<a-tag v-else>工作空间</a-tag>
|
||||
<a-tag v-if="text === 'GLOBAL'">{{ $tl('c.global') }}</a-tag>
|
||||
<a-tag v-else>{{ $tl('p.workspace') }}</a-tag>
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'operation'">
|
||||
<a-space>
|
||||
<!-- <a-button type="primary" size="small" @click="handleEdit(record)">编辑</a-button> -->
|
||||
<a-button size="small" :disabled="!record.exists" type="primary" @click="handleDownloadUrl(record)"
|
||||
>下载</a-button
|
||||
>
|
||||
<a-button size="small" :disabled="!record.exists" type="primary" @click="handleReleaseFile(record)"
|
||||
>发布</a-button
|
||||
>
|
||||
<a-button type="primary" danger size="small" @click="handleDelete(record)">删除</a-button>
|
||||
<a-button size="small" :disabled="!record.exists" type="primary" @click="handleDownloadUrl(record)">{{
|
||||
$tl('p.download')
|
||||
}}</a-button>
|
||||
<a-button size="small" :disabled="!record.exists" type="primary" @click="handleReleaseFile(record)">{{
|
||||
$tl('p.release')
|
||||
}}</a-button>
|
||||
<a-button type="primary" danger size="small" @click="handleDelete(record)">{{
|
||||
$tl('p.delete')
|
||||
}}</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
</template>
|
||||
@ -127,17 +131,19 @@
|
||||
:closable="!uploading"
|
||||
:footer="uploading ? null : undefined"
|
||||
:keyboard="false"
|
||||
:title="`上传文件`"
|
||||
:title="`${$tl('c.uploadFile')}`"
|
||||
:mask-closable="false"
|
||||
@ok="handleUploadOk"
|
||||
>
|
||||
<a-form ref="form" :rules="rules" :model="temp" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
|
||||
<a-form-item label="选择文件" name="file">
|
||||
<a-form-item :label="$tl('c.selectFile')" name="file">
|
||||
<a-progress v-if="percentage" :percent="percentage">
|
||||
<template #format="percent">
|
||||
{{ percent }}%
|
||||
<template v-if="percentageInfo.total"> ({{ renderSize(percentageInfo.total) }}) </template>
|
||||
<template v-if="percentageInfo.duration"> 用时:{{ formatDuration(percentageInfo.duration) }} </template>
|
||||
<template v-if="percentageInfo.duration">
|
||||
{{ $tl('p.usageTime') }}:{{ formatDuration(percentageInfo.duration) }}
|
||||
</template>
|
||||
</template>
|
||||
</a-progress>
|
||||
|
||||
@ -159,28 +165,28 @@
|
||||
"
|
||||
>
|
||||
<LoadingOutlined v-if="percentage" />
|
||||
<a-button v-else type="primary"><UploadOutlined />选择文件</a-button>
|
||||
<a-button v-else type="primary"><UploadOutlined />{{ $tl('c.selectFile') }}</a-button>
|
||||
</a-upload>
|
||||
</a-form-item>
|
||||
<a-form-item label="保留天数" name="keepDay">
|
||||
<a-form-item :label="$tl('c.retentionDays')" name="keepDay">
|
||||
<a-input-number
|
||||
v-model:value="temp.keepDay"
|
||||
:min="1"
|
||||
style="width: 100%"
|
||||
placeholder="文件保存天数,默认 3650 天"
|
||||
:placeholder="$tl('c.fileSaveDays')"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="文件共享" name="global">
|
||||
<a-form-item :label="$tl('c.fileShare')" name="global">
|
||||
<a-radio-group v-model:value="temp.global">
|
||||
<a-radio :value="true"> 全局 </a-radio>
|
||||
<a-radio :value="false"> 当前工作空间 </a-radio>
|
||||
<a-radio :value="true"> {{ $tl('c.global') }} </a-radio>
|
||||
<a-radio :value="false"> {{ $tl('c.currentWorkspace') }} </a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
<a-form-item label="别名码" name="aliasCode" help="用于区别文件是否为同一类型,可以针对同类型进行下载管理">
|
||||
<a-form-item :label="$tl('c.aliasCode')" name="aliasCode" :help="$tl('c.fileType')">
|
||||
<a-input-search
|
||||
v-model:value="temp.aliasCode"
|
||||
:max-length="50"
|
||||
placeholder="请输入别名码"
|
||||
:placeholder="$tl('c.enterAliasCode')"
|
||||
@search="
|
||||
() => {
|
||||
temp = { ...temp, aliasCode: randomStr(6) }
|
||||
@ -188,12 +194,12 @@
|
||||
"
|
||||
>
|
||||
<template #enterButton>
|
||||
<a-button type="primary"> 随机生成 </a-button>
|
||||
<a-button type="primary"> {{ $tl('c.randomGenerate') }} </a-button>
|
||||
</template>
|
||||
</a-input-search>
|
||||
</a-form-item>
|
||||
<a-form-item label="文件描述" name="description">
|
||||
<a-textarea v-model:value="temp.description" placeholder="请输入文件描述" />
|
||||
<a-form-item :label="$tl('c.fileDescription')" name="description">
|
||||
<a-textarea v-model:value="temp.description" :placeholder="$tl('c.enterFileDescription')" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-modal>
|
||||
@ -202,7 +208,7 @@
|
||||
v-model:open="editVisible"
|
||||
destroy-on-close
|
||||
:confirm-loading="confirmLoading"
|
||||
:title="`修改文件`"
|
||||
:title="`${$tl('p.modifyFile')}`"
|
||||
:mask-closable="false"
|
||||
@ok="handleEditOk"
|
||||
>
|
||||
@ -210,25 +216,25 @@
|
||||
<a-form-item label="文件名" name="name">
|
||||
<a-input v-model:value="temp.name" placeholder="文件名" />
|
||||
</a-form-item>
|
||||
<a-form-item label="保留天数" name="keepDay">
|
||||
<a-form-item :label="$tl('c.retentionDays')" name="keepDay">
|
||||
<a-input-number
|
||||
v-model:value="temp.keepDay"
|
||||
:min="1"
|
||||
style="width: 100%"
|
||||
placeholder="文件保存天数,默认 3650 天"
|
||||
:placeholder="$tl('c.fileSaveDays')"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="文件共享" name="global">
|
||||
<a-form-item :label="$tl('c.fileShare')" name="global">
|
||||
<a-radio-group v-model:value="temp.global">
|
||||
<a-radio :value="true"> 全局 </a-radio>
|
||||
<a-radio :value="false"> 当前工作空间 </a-radio>
|
||||
<a-radio :value="true"> {{ $tl('c.global') }} </a-radio>
|
||||
<a-radio :value="false"> {{ $tl('c.currentWorkspace') }} </a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
<a-form-item label="别名码" name="aliasCode" help="用于区别文件是否为同一类型,可以针对同类型进行下载管理">
|
||||
<a-form-item :label="$tl('c.aliasCode')" name="aliasCode" :help="$tl('c.fileType')">
|
||||
<a-input-search
|
||||
v-model:value="temp.aliasCode"
|
||||
:max-length="50"
|
||||
placeholder="请输入别名码"
|
||||
:placeholder="$tl('c.enterAliasCode')"
|
||||
@search="
|
||||
() => {
|
||||
temp = { ...temp, aliasCode: randomStr(6) }
|
||||
@ -236,12 +242,12 @@
|
||||
"
|
||||
>
|
||||
<template #enterButton>
|
||||
<a-button type="primary"> 随机生成 </a-button>
|
||||
<a-button type="primary"> {{ $tl('c.randomGenerate') }} </a-button>
|
||||
</template>
|
||||
</a-input-search>
|
||||
</a-form-item>
|
||||
<a-form-item label="文件描述" name="description">
|
||||
<a-textarea v-model:value="temp.description" placeholder="请输入文件描述" />
|
||||
<a-form-item :label="$tl('c.fileDescription')" name="description">
|
||||
<a-textarea v-model:value="temp.description" :placeholder="$tl('c.enterFileDescription')" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-modal>
|
||||
@ -249,34 +255,34 @@
|
||||
<a-modal
|
||||
v-model:open="uploadRemoteFileVisible"
|
||||
destroy-on-close
|
||||
title="远程下载文件"
|
||||
:title="$tl('p.remoteDownloadFile')"
|
||||
:mask-closable="false"
|
||||
:confirm-loading="confirmLoading"
|
||||
@ok="handleRemoteUpload"
|
||||
>
|
||||
<a-form ref="remoteForm" :model="temp" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }" :rules="rules">
|
||||
<a-form-item label="远程下载URL" name="url">
|
||||
<a-input v-model:value="temp.url" placeholder="远程下载地址" />
|
||||
<a-form-item :label="$tl('p.remoteDownloadUrl')" name="url">
|
||||
<a-input v-model:value="temp.url" :placeholder="$tl('p.remoteDownloadAddress')" />
|
||||
</a-form-item>
|
||||
<a-form-item label="保留天数" name="keepDay">
|
||||
<a-form-item :label="$tl('c.retentionDays')" name="keepDay">
|
||||
<a-input-number
|
||||
v-model:value="temp.keepDay"
|
||||
:min="1"
|
||||
style="width: 100%"
|
||||
placeholder="文件保存天数,默认 3650 天"
|
||||
:placeholder="$tl('c.fileSaveDays')"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="文件共享" name="global">
|
||||
<a-form-item :label="$tl('c.fileShare')" name="global">
|
||||
<a-radio-group v-model:value="temp.global">
|
||||
<a-radio :value="true"> 全局 </a-radio>
|
||||
<a-radio :value="false"> 当前工作空间 </a-radio>
|
||||
<a-radio :value="true"> {{ $tl('c.global') }} </a-radio>
|
||||
<a-radio :value="false"> {{ $tl('c.currentWorkspace') }} </a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
<a-form-item label="别名码" name="aliasCode" help="用于区别文件是否为同一类型,可以针对同类型进行下载管理">
|
||||
<a-form-item :label="$tl('c.aliasCode')" name="aliasCode" :help="$tl('c.fileType')">
|
||||
<a-input-search
|
||||
v-model:value="temp.aliasCode"
|
||||
:max-length="50"
|
||||
placeholder="请输入别名码"
|
||||
:placeholder="$tl('c.enterAliasCode')"
|
||||
@search="
|
||||
() => {
|
||||
temp = { ...temp, aliasCode: randomStr(6) }
|
||||
@ -284,12 +290,12 @@
|
||||
"
|
||||
>
|
||||
<template #enterButton>
|
||||
<a-button type="primary"> 随机生成 </a-button>
|
||||
<a-button type="primary"> {{ $tl('c.randomGenerate') }} </a-button>
|
||||
</template>
|
||||
</a-input-search>
|
||||
</a-form-item>
|
||||
<a-form-item label="文件描述" name="description">
|
||||
<a-textarea v-model:value="temp.description" placeholder="请输入文件描述" />
|
||||
<a-form-item :label="$tl('c.fileDescription')" name="description">
|
||||
<a-textarea v-model:value="temp.description" :placeholder="$tl('c.enterFileDescription')" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-modal>
|
||||
@ -297,7 +303,7 @@
|
||||
<a-modal
|
||||
v-model:open="triggerVisible"
|
||||
destroy-on-close
|
||||
title="断点/分片下载"
|
||||
:title="$tl('p.resumableDownload')"
|
||||
width="50%"
|
||||
:footer="null"
|
||||
:mask-closable="false"
|
||||
@ -305,13 +311,13 @@
|
||||
<a-form ref="editTriggerForm" :model="temp" :label-col="{ span: 6 }" :wrapper-col="{ span: 16 }">
|
||||
<a-tabs default-active-key="1">
|
||||
<template #rightExtra>
|
||||
<a-tooltip title="重置下载 token 信息,重置后之前的下载 token 将失效">
|
||||
<a-button type="primary" size="small" @click="resetTrigger">重置</a-button>
|
||||
<a-tooltip :title="$tl('p.resetDownloadToken')">
|
||||
<a-button type="primary" size="small" @click="resetTrigger">{{ $tl('p.reset') }}</a-button>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<a-tab-pane key="1" tab="断点/分片单文件下载">
|
||||
<a-tab-pane key="1" :tab="$tl('p.resumableSingleFileDownload')">
|
||||
<a-space direction="vertical" style="width: 100%">
|
||||
<a-alert type="info" :message="`下载地址(点击可以复制)`">
|
||||
<a-alert type="info" :message="`${$tl('c.downloadAddress')}(${$tl('c.copyByClick')})`">
|
||||
<template #description>
|
||||
<a-typography-paragraph :copyable="{ tooltip: false, text: temp.triggerDownloadUrl }">
|
||||
<a-tag>GET</a-tag>
|
||||
@ -320,26 +326,26 @@
|
||||
</template>
|
||||
</a-alert>
|
||||
<a :href="temp.triggerDownloadUrl" target="_blank">
|
||||
<a-button size="small" type="primary"><DownloadOutlined />立即下载</a-button>
|
||||
<a-button size="small" type="primary"><DownloadOutlined />{{ $tl('c.immediateDownload') }}</a-button>
|
||||
</a>
|
||||
</a-space>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane v-if="temp.triggerAliasDownloadUrl" tab="断点/分片别名下载">
|
||||
<a-tab-pane v-if="temp.triggerAliasDownloadUrl" :tab="$tl('p.resumableAliasDownload')">
|
||||
<a-space direction="vertical" style="width: 100%">
|
||||
<a-alert message="温馨提示" type="warning">
|
||||
<a-alert :message="$tl('p.warmPrompt')" type="warning">
|
||||
<template #description>
|
||||
<ul>
|
||||
<li>
|
||||
支持自定义排序字段:sort=createTimeMillis:desc
|
||||
{{ $tl('p.customSortField') }}=createTimeMillis:desc
|
||||
|
||||
<p>描述根据创建时间升序第一个</p>
|
||||
<p>{{ $tl('p.sortDesc') }}</p>
|
||||
</li>
|
||||
<li>支持的字段可以通过接口返回的查看</li>
|
||||
<li>通用的字段有:createTimeMillis、modifyTimeMillis</li>
|
||||
<li>{{ $tl('p.supportedFields') }}</li>
|
||||
<li>{{ $tl('p.commonFields') }}</li>
|
||||
</ul>
|
||||
</template>
|
||||
</a-alert>
|
||||
<a-alert type="info" :message="`下载地址(点击可以复制)`">
|
||||
<a-alert type="info" :message="`${$tl('c.downloadAddress')}(${$tl('c.copyByClick')})`">
|
||||
<template #description>
|
||||
<a-typography-paragraph :copyable="{ tooltip: false, text: temp.triggerAliasDownloadUrl }">
|
||||
<a-tag>GET</a-tag>
|
||||
@ -348,7 +354,7 @@
|
||||
</template>
|
||||
</a-alert>
|
||||
<a :href="temp.triggerAliasDownloadUrl" target="_blank">
|
||||
<a-button size="small" type="primary"><DownloadOutlined />立即下载</a-button>
|
||||
<a-button size="small" type="primary"><DownloadOutlined />{{ $tl('c.immediateDownload') }}</a-button>
|
||||
</a>
|
||||
</a-space>
|
||||
</a-tab-pane>
|
||||
@ -360,7 +366,7 @@
|
||||
v-model:open="releaseFileVisible"
|
||||
destroy-on-close
|
||||
:confirm-loading="confirmLoading"
|
||||
title="发布文件"
|
||||
:title="$tl('p.releaseFile')"
|
||||
width="60%"
|
||||
:mask-closable="false"
|
||||
@ok="releaseFileOk()"
|
||||
@ -391,9 +397,9 @@
|
||||
}
|
||||
"
|
||||
>
|
||||
取消
|
||||
{{ $tl('c.cancel') }}
|
||||
</a-button>
|
||||
<a-button type="primary" @click="handerConfirm"> 确定 </a-button>
|
||||
<a-button type="primary" @click="handerConfirm"> {{ $tl('p.confirm') }} </a-button>
|
||||
</a-space>
|
||||
</div>
|
||||
</div>
|
||||
@ -447,26 +453,26 @@ export default {
|
||||
list: [],
|
||||
columns: [
|
||||
{
|
||||
title: '文件MD5',
|
||||
title: this.$tl('p.fileMD5'),
|
||||
dataIndex: 'id',
|
||||
ellipsis: true,
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '名称',
|
||||
title: this.$tl('p.name'),
|
||||
dataIndex: 'name',
|
||||
ellipsis: true,
|
||||
width: 150
|
||||
},
|
||||
{
|
||||
title: '别名码',
|
||||
title: this.$tl('c.aliasCode'),
|
||||
dataIndex: 'aliasCode',
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
tooltip: true
|
||||
},
|
||||
{
|
||||
title: '大小',
|
||||
title: this.$tl('p.size'),
|
||||
dataIndex: 'size',
|
||||
sorter: true,
|
||||
ellipsis: true,
|
||||
@ -474,28 +480,28 @@ export default {
|
||||
width: '100px'
|
||||
},
|
||||
{
|
||||
title: '后缀',
|
||||
title: this.$tl('p.contentSuffix'),
|
||||
dataIndex: 'extName',
|
||||
ellipsis: true,
|
||||
tooltip: true,
|
||||
width: '80px'
|
||||
},
|
||||
{
|
||||
title: '共享',
|
||||
title: this.$tl('p.shared'),
|
||||
dataIndex: 'workspaceId',
|
||||
ellipsis: true,
|
||||
|
||||
width: '90px'
|
||||
},
|
||||
{
|
||||
title: '来源',
|
||||
title: this.$tl('p.source'),
|
||||
dataIndex: 'source',
|
||||
ellipsis: true,
|
||||
|
||||
width: '80px'
|
||||
},
|
||||
{
|
||||
title: '过期天数',
|
||||
title: this.$tl('p.expireDays'),
|
||||
dataIndex: 'validUntil',
|
||||
sorter: true,
|
||||
customRender: ({ text }) => {
|
||||
@ -507,42 +513,42 @@ export default {
|
||||
width: '100px'
|
||||
},
|
||||
{
|
||||
title: '文件状态',
|
||||
title: this.$tl('p.fileStatus'),
|
||||
dataIndex: 'exists',
|
||||
ellipsis: true,
|
||||
|
||||
width: '80px'
|
||||
},
|
||||
{
|
||||
title: '创建人',
|
||||
title: this.$tl('p.creator'),
|
||||
dataIndex: 'createUser',
|
||||
ellipsis: true,
|
||||
tooltip: true,
|
||||
width: '120px'
|
||||
},
|
||||
{
|
||||
title: '修改人',
|
||||
title: this.$tl('p.modifier'),
|
||||
dataIndex: 'modifyUser',
|
||||
ellipsis: true,
|
||||
tooltip: true,
|
||||
width: '120px'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
title: this.$tl('p.creationTime'),
|
||||
dataIndex: 'createTimeMillis',
|
||||
sorter: true,
|
||||
customRender: ({ text }) => parseTime(text),
|
||||
width: '170px'
|
||||
},
|
||||
{
|
||||
title: '修改时间',
|
||||
title: this.$tl('p.modificationTime'),
|
||||
dataIndex: 'modifyTimeMillis',
|
||||
sorter: true,
|
||||
customRender: ({ text }) => parseTime(text),
|
||||
width: '170px'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: this.$tl('p.operation'),
|
||||
dataIndex: 'operation',
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
@ -552,8 +558,8 @@ export default {
|
||||
}
|
||||
],
|
||||
rules: {
|
||||
name: [{ required: true, message: '请输入文件名称', trigger: 'blur' }],
|
||||
url: [{ required: true, message: '请输入远程地址', trigger: 'blur' }]
|
||||
name: [{ required: true, message: this.$tl('p.pleaseEnterFileName'), trigger: 'blur' }],
|
||||
url: [{ required: true, message: this.$tl('p.pleaseEnterRemoteAddress'), trigger: 'blur' }]
|
||||
},
|
||||
|
||||
temp: {},
|
||||
@ -591,6 +597,9 @@ export default {
|
||||
this.loadData()
|
||||
},
|
||||
methods: {
|
||||
$tl(key, ...args) {
|
||||
return this.$t(`pages.fileManager.fileStorage.list.${key}`, ...args)
|
||||
},
|
||||
randomStr,
|
||||
CHANGE_PAGE,
|
||||
renderSize,
|
||||
@ -622,7 +631,7 @@ export default {
|
||||
// 判断文件
|
||||
if (this.fileList.length === 0) {
|
||||
$notification.success({
|
||||
message: '请选择文件'
|
||||
message: this.$tl('p.pleaseSelectFile')
|
||||
})
|
||||
return false
|
||||
}
|
||||
@ -650,7 +659,7 @@ export default {
|
||||
if (res.data) {
|
||||
//
|
||||
$notification.warning({
|
||||
message: `当前文件已经存在啦,文件名:${res.data.name} ,是否共享:${res.data.workspaceId === 'GLOBAL' ? '是' : '否'}`
|
||||
message: `${this.$tl('p.fileAlreadyExists')},${this.$tl('c.fileName')}${res.data.name} ,${this.$tl('p.isShared')}${res.data.workspaceId === 'GLOBAL' ? this.$tl('p.yes') : this.$tl('p.no')}`
|
||||
})
|
||||
//
|
||||
this.uploading = false
|
||||
@ -754,11 +763,11 @@ export default {
|
||||
// 删除文件
|
||||
handleDelete(record) {
|
||||
$confirm({
|
||||
title: '系统提示',
|
||||
title: this.$tl('c.systemPrompt'),
|
||||
zIndex: 1009,
|
||||
content: '真的要删除当前文件么?' + record.name,
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
content: this.$tl('p.reallyDeleteCurrentFile') + record.name,
|
||||
okText: this.$tl('c.confirm'),
|
||||
cancelText: this.$tl('c.cancel'),
|
||||
onOk: () => {
|
||||
return delFile({
|
||||
id: record.id
|
||||
@ -777,16 +786,16 @@ export default {
|
||||
handleBatchDelete() {
|
||||
if (!this.tableSelections || this.tableSelections.length <= 0) {
|
||||
$notification.error({
|
||||
message: '没有选择任何数据'
|
||||
message: this.$tl('p.noDataSelected')
|
||||
})
|
||||
return
|
||||
}
|
||||
$confirm({
|
||||
title: '系统提示',
|
||||
title: this.$tl('c.systemPrompt'),
|
||||
zIndex: 1009,
|
||||
content: '真的要删除这些文件么?',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
content: this.$tl('p.reallyDeleteTheseFiles'),
|
||||
okText: this.$tl('c.confirm'),
|
||||
cancelText: this.$tl('c.cancel'),
|
||||
onOk: () => {
|
||||
return delFile({ ids: this.tableSelections.join(',') }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
@ -900,7 +909,7 @@ export default {
|
||||
handerConfirm() {
|
||||
if (!this.tableSelections.length) {
|
||||
$notification.warning({
|
||||
message: '请选择要使用的文件'
|
||||
message: this.$tl('c.pleaseSelectFile')
|
||||
})
|
||||
return
|
||||
}
|
||||
@ -909,7 +918,7 @@ export default {
|
||||
})
|
||||
if (!selectData.length) {
|
||||
$notification.warning({
|
||||
message: '请选择要使用的文件'
|
||||
message: this.$tl('c.pleaseSelectFile')
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -7,23 +7,21 @@
|
||||
:label-col="{ span: 4 }"
|
||||
:wrapper-col="{ span: 20 }"
|
||||
>
|
||||
<a-form-item label="任务名" name="name">
|
||||
<a-input v-model:value="temp.name" placeholder="请输入任务名" :max-length="50" />
|
||||
<a-form-item :label="$tl('p.taskName')" name="name">
|
||||
<a-input v-model:value="temp.name" :placeholder="$tl('p.taskNamePlaceholder')" :max-length="50" />
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="发布方式" name="taskType">
|
||||
<a-form-item :label="$tl('p.publishMode')" name="taskType">
|
||||
<a-radio-group v-model:value="temp.taskType" @change="taskTypeChange">
|
||||
<a-radio :value="0"> SSH </a-radio>
|
||||
<a-radio :value="1"> 节点 </a-radio>
|
||||
<a-radio :value="1"> {{ $tl('p.node') }} </a-radio>
|
||||
</a-radio-group>
|
||||
<template #help>
|
||||
<template v-if="temp.taskType === 0"
|
||||
>发布后的文件名是:文件ID.后缀,并非文件真实名称 (可以使用上传后脚本随意修改)
|
||||
</template>
|
||||
<template v-if="temp.taskType === 0">{{ $tl('p.fileNameAfterPublish') }} </template>
|
||||
</template>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item v-if="temp.taskType === 0" name="taskDataIds" label="发布的SSH">
|
||||
<a-form-item v-if="temp.taskType === 0" name="taskDataIds" :label="$tl('p.ssh')">
|
||||
<a-row>
|
||||
<a-col :span="22">
|
||||
<a-select
|
||||
@ -40,7 +38,7 @@
|
||||
}
|
||||
"
|
||||
mode="multiple"
|
||||
placeholder="请选择SSH"
|
||||
:placeholder="$tl('p.sshPlaceholder')"
|
||||
>
|
||||
<a-select-option v-for="ssh in sshList" :key="ssh.id">
|
||||
<a-tooltip :title="ssh.name"> {{ ssh.name }}</a-tooltip>
|
||||
@ -52,7 +50,7 @@
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-item>
|
||||
<a-form-item v-else-if="temp.taskType === 1" name="taskDataIds" label="发布的节点">
|
||||
<a-form-item v-else-if="temp.taskType === 1" name="taskDataIds" :label="$tl('p.publishNode')">
|
||||
<a-row>
|
||||
<a-col :span="22">
|
||||
<a-select
|
||||
@ -69,7 +67,7 @@
|
||||
}
|
||||
"
|
||||
mode="multiple"
|
||||
placeholder="请选择节点"
|
||||
:placeholder="$tl('p.nodePlaceholder')"
|
||||
>
|
||||
<a-select-option v-for="ssh in nodeList" :key="ssh.id">
|
||||
<a-tooltip :title="ssh.name"> {{ ssh.name }}</a-tooltip>
|
||||
@ -82,9 +80,9 @@
|
||||
</a-row>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item name="releasePathParent" label="发布目录">
|
||||
<a-form-item name="releasePathParent" :label="$tl('p.publishDir')">
|
||||
<template #help>
|
||||
<a-tooltip title="需要配置授权目录(授权才能正常使用发布),授权目录主要是用于确定可以发布到哪些目录中"
|
||||
<a-tooltip :title="$tl('p.authDirConfig')"
|
||||
><a-button
|
||||
size="small"
|
||||
type="link"
|
||||
@ -94,7 +92,7 @@
|
||||
}
|
||||
"
|
||||
>
|
||||
<InfoCircleOutlined />配置目录
|
||||
<InfoCircleOutlined />{{ $tl('p.authDir') }}
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
@ -104,7 +102,7 @@
|
||||
show-search
|
||||
allow-clear
|
||||
style="width: 30%"
|
||||
placeholder="请选择发布的一级目录"
|
||||
:placeholder="$tl('p.firstLevelDir')"
|
||||
>
|
||||
<a-select-option v-for="item in accessList" :key="item">
|
||||
<a-tooltip :title="item">{{ item }}</a-tooltip>
|
||||
@ -114,32 +112,36 @@
|
||||
</template>
|
||||
</a-select>
|
||||
<a-form-item-rest>
|
||||
<a-input v-model:value="temp.releasePathSecondary" style="width: 70%" placeholder="请填写发布的二级目录" />
|
||||
<a-input
|
||||
v-model:value="temp.releasePathSecondary"
|
||||
style="width: 70%"
|
||||
:placeholder="$tl('p.secondLevelDir')"
|
||||
/>
|
||||
</a-form-item-rest>
|
||||
</a-input-group>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item name="releaseBeforeCommand">
|
||||
<template #label>
|
||||
执行脚本
|
||||
{{ $tl('p.executeScript') }}
|
||||
<a-tooltip>
|
||||
<template #title>
|
||||
<ul>
|
||||
<li>支持变量引用:${TASK_ID}、${FILE_ID}、${FILE_NAME}、${FILE_EXT_NAME}</li>
|
||||
<li>可以引用工作空间的环境变量 变量占位符 ${xxxx} xxxx 为变量名称</li>
|
||||
<li>建议在上传后的脚本中对文件进行自定义更名,SSH 上传默认为:${FILE_ID}.${FILE_EXT_NAME}</li>
|
||||
<li>{{ $tl('p.scriptVariable') }}</li>
|
||||
<li>{{ $tl('p.workspaceEnvVariable') }}</li>
|
||||
<li>{{ $tl('p.renameFile') }}</li>
|
||||
</ul>
|
||||
</template>
|
||||
<QuestionCircleOutlined />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<template #help>
|
||||
<div v-if="scriptTabKey === 'before'">文件上传前需要执行的脚本(非阻塞命令)</div>
|
||||
<div v-else-if="scriptTabKey === 'after'">文件上传成功后需要执行的脚本(非阻塞命令)</div>
|
||||
<div v-if="scriptTabKey === 'before'">{{ $tl('p.preUploadScript') }}</div>
|
||||
<div v-else-if="scriptTabKey === 'after'">{{ $tl('p.postUploadScript') }}</div>
|
||||
</template>
|
||||
<a-form-item-rest>
|
||||
<a-tabs v-model:activeKey="scriptTabKey" tab-position="right" type="card">
|
||||
<a-tab-pane key="before" tab="上传前">
|
||||
<a-tab-pane key="before" :tab="$tl('c.content')">
|
||||
<code-editor
|
||||
v-model:content="temp.beforeScript"
|
||||
height="40vh"
|
||||
@ -149,11 +151,14 @@
|
||||
}"
|
||||
>
|
||||
<template #tool_before>
|
||||
<a-tag><b>上传前</b>执行</a-tag>
|
||||
<a-tag
|
||||
><b>{{ $tl('c.content') }}</b
|
||||
>{{ $tl('p.execute') }}</a-tag
|
||||
>
|
||||
</template>
|
||||
</code-editor>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="after" tab="上传后">
|
||||
<a-tab-pane key="after" :tab="$tl('p.afterUpload')">
|
||||
<code-editor
|
||||
v-model:content="temp.afterScript"
|
||||
height="40vh"
|
||||
@ -162,7 +167,9 @@
|
||||
mode: 'shell'
|
||||
}"
|
||||
>
|
||||
<template #tool_before> <a-tag>上传后执行</a-tag></template>
|
||||
<template #tool_before>
|
||||
<a-tag>{{ $tl('p.afterUploadExecute') }}</a-tag></template
|
||||
>
|
||||
</code-editor>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
@ -173,7 +180,7 @@
|
||||
<a-modal
|
||||
v-model:value="configDir"
|
||||
destroy-on-close
|
||||
:title="`配置授权目录`"
|
||||
:title="`${$tl('p.authDirSetting')}`"
|
||||
:footer="null"
|
||||
:mask-closable="false"
|
||||
@cancel="
|
||||
@ -211,16 +218,16 @@ export default {
|
||||
return {
|
||||
temp: {},
|
||||
releaseFileRules: {
|
||||
name: [{ required: true, message: '请输入文件任务名', trigger: 'blur' }],
|
||||
taskType: [{ required: true, message: '请选择发布方式', trigger: 'blur' }],
|
||||
name: [{ required: true, message: this.$tl('p.taskNameInput'), trigger: 'blur' }],
|
||||
taskType: [{ required: true, message: this.$tl('p.publishModeSelect'), trigger: 'blur' }],
|
||||
releasePath: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择发布的一级目录和填写二级目录',
|
||||
message: this.$tl('p.publishDirSelect'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
taskDataIds: [{ required: true, message: '请选择发布的SSH', trigger: 'blur' }]
|
||||
taskDataIds: [{ required: true, message: this.$tl('p.sshSelect'), trigger: 'blur' }]
|
||||
},
|
||||
sshList: [],
|
||||
accessList: [],
|
||||
@ -235,6 +242,9 @@ export default {
|
||||
this.loadAccesList()
|
||||
},
|
||||
methods: {
|
||||
$tl(key, ...args) {
|
||||
return this.$t(`pages.fileManager.fileStorage.releaseFile.${key}`, ...args)
|
||||
},
|
||||
taskTypeChange() {
|
||||
const value = this.temp.taskType
|
||||
this.temp = { ...this.temp, taskDataIds: undefined }
|
||||
|
@ -1,25 +1,29 @@
|
||||
<template>
|
||||
<div>
|
||||
<a-form :model="temp" :label-col="{ span: 2 }" :wrapper-col="{ span: 20 }">
|
||||
<a-form-item label="任务名" name="name">
|
||||
<a-input placeholder="请输入任务名" :disabled="true" :value="temp.taskData && temp.taskData.name" />
|
||||
<a-form-item :label="$tl('p.taskName')" name="name">
|
||||
<a-input :placeholder="$tl('c.taskName')" :disabled="true" :value="temp.taskData && temp.taskData.name" />
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="发布方式" name="taskType">
|
||||
<a-form-item :label="$tl('p.publishMethod')" name="taskType">
|
||||
<a-radio-group :value="temp.taskData && temp.taskData.taskType" :disabled="true">
|
||||
<a-radio :value="0"> SSH </a-radio>
|
||||
<a-radio :value="1"> 节点 </a-radio>
|
||||
<a-radio :value="1"> {{ $tl('p.node') }} </a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item name="releasePath" label="发布目录">
|
||||
<a-input placeholder="请输入任务名" :disabled="true" :value="temp.taskData && temp.taskData.releasePath" />
|
||||
<a-form-item name="releasePath" :label="$tl('p.publishDir')">
|
||||
<a-input
|
||||
:placeholder="$tl('c.taskName')"
|
||||
:disabled="true"
|
||||
:value="temp.taskData && temp.taskData.releasePath"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item name="releasePath" label="状态" :help="temp.taskData && temp.taskData.statusMsg">
|
||||
{{ statusMap[temp.taskData && temp.taskData.status] || '未知' }}
|
||||
<a-form-item name="releasePath" :label="$tl('p.status')" :help="temp.taskData && temp.taskData.statusMsg">
|
||||
{{ statusMap[temp.taskData && temp.taskData.status] || $tl('p.unknown') }}
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="执行日志">
|
||||
<a-form-item :label="$tl('p.executionLog')">
|
||||
<a-tabs :active-key="activeKey" @change="tabCallback">
|
||||
<a-tab-pane v-for="item in temp.taskList" :key="item.id">
|
||||
<template #tab>
|
||||
@ -50,9 +54,9 @@
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-form-item>
|
||||
<a-form-item label="执行脚本" name="releaseBeforeCommand">
|
||||
<a-form-item :label="$tl('p.executionScript')" name="releaseBeforeCommand">
|
||||
<a-tabs tab-position="right">
|
||||
<a-tab-pane key="before" tab="上传前">
|
||||
<a-tab-pane key="before" :tab="$tl('p.beforeUpload')">
|
||||
<code-editor
|
||||
height="40vh"
|
||||
:content="temp.taskData && temp.taskData.beforeScript"
|
||||
@ -62,7 +66,7 @@
|
||||
}"
|
||||
></code-editor>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="after" tab="上传后">
|
||||
<a-tab-pane key="after" :tab="$tl('p.afterUpload')">
|
||||
<code-editor
|
||||
height="40vh"
|
||||
:content="temp.taskData && temp.taskData.afterScript"
|
||||
@ -119,6 +123,9 @@ export default {
|
||||
this.loadData()
|
||||
},
|
||||
methods: {
|
||||
$tl(key, ...args) {
|
||||
return this.$t(`pages.fileManager.releaseTask.details.${key}`, ...args)
|
||||
},
|
||||
// 加载日志内容
|
||||
loadData() {
|
||||
this.activeKey = this.temp.id || ''
|
||||
|
@ -21,7 +21,7 @@
|
||||
<a-space wrap class="search-box">
|
||||
<a-input
|
||||
v-model:value="listQuery['%name%']"
|
||||
placeholder="任务名"
|
||||
:placeholder="$tl('c.taskName')"
|
||||
class="search-input-item"
|
||||
@press-enter="loadData"
|
||||
/>
|
||||
@ -39,7 +39,7 @@
|
||||
}
|
||||
"
|
||||
allow-clear
|
||||
placeholder="状态"
|
||||
:placeholder="$tl('c.status')"
|
||||
class="search-input-item"
|
||||
>
|
||||
<a-select-option v-for="(val, key) in statusMap" :key="key">{{ val }}</a-select-option>
|
||||
@ -58,13 +58,13 @@
|
||||
}
|
||||
"
|
||||
allow-clear
|
||||
placeholder="发布类型"
|
||||
:placeholder="$tl('p.publishType')"
|
||||
class="search-input-item"
|
||||
>
|
||||
<a-select-option v-for="(val, key) in taskTypeMap" :key="key">{{ val }}</a-select-option>
|
||||
</a-select>
|
||||
<a-tooltip title="按住 Ctr 或者 Alt/Option 键点击按钮快速回到第一页">
|
||||
<a-button type="primary" :loading="loading" @click="loadData">搜索</a-button>
|
||||
<a-tooltip :title="$tl('p.fastReturnFirstPage')">
|
||||
<a-button type="primary" :loading="loading" @click="loadData">{{ $tl('p.search') }}</a-button>
|
||||
</a-tooltip>
|
||||
</a-space>
|
||||
</template>
|
||||
@ -84,34 +84,34 @@
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.dataIndex === 'status'">
|
||||
<a-tag v-if="text === 2" color="green">{{ statusMap[text] || '未知' }}</a-tag>
|
||||
<a-tag v-else-if="text === 0 || text === 1" color="orange">{{ statusMap[text] || '未知' }}</a-tag>
|
||||
<a-tag v-if="text === 2" color="green">{{ statusMap[text] || $tl('c.unknown') }}</a-tag>
|
||||
<a-tag v-else-if="text === 0 || text === 1" color="orange">{{ statusMap[text] || $tl('c.unknown') }}</a-tag>
|
||||
<a-tag v-else-if="text === 4" color="blue">
|
||||
{{ statusMap[text] || '未知' }}
|
||||
{{ statusMap[text] || $tl('c.unknown') }}
|
||||
</a-tag>
|
||||
<a-tag v-else-if="text === 3" color="red">{{ statusMap[text] || '未知' }}</a-tag>
|
||||
<a-tag v-else>{{ statusMap[text] || '未知' }}</a-tag>
|
||||
<a-tag v-else-if="text === 3" color="red">{{ statusMap[text] || $tl('c.unknown') }}</a-tag>
|
||||
<a-tag v-else>{{ statusMap[text] || $tl('c.unknown') }}</a-tag>
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'taskType'">
|
||||
<span>{{ taskTypeMap[text] || '未知' }}</span>
|
||||
<span>{{ taskTypeMap[text] || $tl('c.unknown') }}</span>
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'fileType'">
|
||||
<span v-if="text == 2">静态文件</span>
|
||||
<span v-else>文件中心</span>
|
||||
<span v-if="text == 2">{{ $tl('p.staticFile') }}</span>
|
||||
<span v-else>{{ $tl('p.fileCenter') }}</span>
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.dataIndex === 'operation'">
|
||||
<a-space>
|
||||
<a-button type="primary" size="small" @click="handleView(record)">查看</a-button>
|
||||
<a-button type="primary" size="small" @click="handleView(record)">{{ $tl('p.view') }}</a-button>
|
||||
|
||||
<a-button type="primary" size="small" @click="handleRetask(record)">重建</a-button>
|
||||
<a-button type="primary" size="small" @click="handleRetask(record)">{{ $tl('p.rebuild') }}</a-button>
|
||||
<a-button
|
||||
type="primary"
|
||||
danger
|
||||
size="small"
|
||||
:disabled="!(record.status === 0 || record.status === 1)"
|
||||
@click="handleCancelTask(record)"
|
||||
>取消</a-button
|
||||
>{{ $tl('c.cancel') }}</a-button
|
||||
>
|
||||
<a-button
|
||||
type="primary"
|
||||
@ -119,7 +119,7 @@
|
||||
size="small"
|
||||
:disabled="record.status === 0 || record.status === 1"
|
||||
@click="handleDelete(record)"
|
||||
>删除</a-button
|
||||
>{{ $tl('p.delete') }}</a-button
|
||||
>
|
||||
</a-space>
|
||||
</template>
|
||||
@ -127,7 +127,7 @@
|
||||
</a-table>
|
||||
<!-- 任务详情 -->
|
||||
<a-drawer
|
||||
title="任务详情"
|
||||
:title="$tl('p.taskDetail')"
|
||||
placement="right"
|
||||
:width="'80vw'"
|
||||
:open="detailsVisible"
|
||||
@ -144,7 +144,7 @@
|
||||
v-model:open="releaseFileVisible"
|
||||
destroy-on-close
|
||||
:confirm-loading="confirmLoading"
|
||||
title="发布文件"
|
||||
:title="$tl('p.publishFile')"
|
||||
width="60%"
|
||||
:mask-closable="false"
|
||||
@ok="handleReCrateTask"
|
||||
@ -156,18 +156,18 @@
|
||||
:label-col="{ span: 4 }"
|
||||
:wrapper-col="{ span: 20 }"
|
||||
>
|
||||
<a-form-item label="任务名" name="name">
|
||||
<a-input v-model:value="temp.name" placeholder="请输入任务名" :max-length="50" />
|
||||
<a-form-item :label="$tl('c.taskName')" name="name">
|
||||
<a-input v-model:value="temp.name" :placeholder="$tl('p.pleaseInputTaskName')" :max-length="50" />
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="发布方式" name="taskType">
|
||||
<a-form-item :label="$tl('p.publishWay')" name="taskType">
|
||||
<a-radio-group v-model:value="temp.taskType" :disabled="true">
|
||||
<a-radio :value="0"> SSH </a-radio>
|
||||
<a-radio :value="1"> 节点 </a-radio>
|
||||
<a-radio :value="1"> {{ $tl('p.node') }} </a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item v-if="temp.taskType === 0" name="taskDataIds" label="发布的SSH">
|
||||
<a-form-item v-if="temp.taskType === 0" name="taskDataIds" :label="$tl('p.publishSsh')">
|
||||
<a-row>
|
||||
<a-col :span="22">
|
||||
<a-select
|
||||
@ -184,7 +184,7 @@
|
||||
}
|
||||
"
|
||||
mode="multiple"
|
||||
placeholder="请选择SSH"
|
||||
:placeholder="$tl('p.pleaseSelectSsh')"
|
||||
>
|
||||
<a-select-option v-for="ssh in sshList" :key="ssh.id">
|
||||
<a-tooltip :title="ssh.name"> {{ ssh.name }}</a-tooltip>
|
||||
@ -196,7 +196,7 @@
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-item>
|
||||
<a-form-item v-else-if="temp.taskType === 1" name="taskDataIds" label="发布的节点">
|
||||
<a-form-item v-else-if="temp.taskType === 1" name="taskDataIds" :label="$tl('p.publishNode')">
|
||||
<a-row>
|
||||
<a-col :span="22">
|
||||
<a-select
|
||||
@ -213,7 +213,7 @@
|
||||
}
|
||||
"
|
||||
mode="multiple"
|
||||
placeholder="请选择节点"
|
||||
:placeholder="$tl('p.pleaseSelectNode')"
|
||||
>
|
||||
<a-select-option v-for="ssh in nodeList" :key="ssh.id">
|
||||
<a-tooltip :title="ssh.name"> {{ ssh.name }}</a-tooltip>
|
||||
@ -226,18 +226,18 @@
|
||||
</a-row>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item name="releasePathParent" label="发布目录">
|
||||
<a-input v-model:value="temp.releasePath" placeholder="请输入发布目录" :disabled="true" />
|
||||
<a-form-item name="releasePathParent" :label="$tl('c.publishDir')">
|
||||
<a-input v-model:value="temp.releasePath" :placeholder="$tl('p.pleaseInputPublishDir')" :disabled="true" />
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item name="releasePathParent" label="文件id">
|
||||
<a-input v-model:value="temp.fileId" placeholder="请输入发布的文件id" />
|
||||
<a-form-item name="releasePathParent" :label="$tl('p.fileIdInput')">
|
||||
<a-input v-model:value="temp.fileId" :placeholder="$tl('p.pleaseInputPublishFileId')" />
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="执行脚本" name="releaseBeforeCommand">
|
||||
<a-form-item :label="$tl('p.executeScript')" name="releaseBeforeCommand">
|
||||
<a-form-item-rest>
|
||||
<a-tabs tab-position="right">
|
||||
<a-tab-pane key="before" tab="上传前">
|
||||
<a-tab-pane key="before" :tab="$tl('p.beforeUpload')">
|
||||
<code-editor
|
||||
v-model:content="temp.beforeScript"
|
||||
height="40vh"
|
||||
@ -246,9 +246,9 @@
|
||||
}"
|
||||
></code-editor>
|
||||
|
||||
<div style="margin-top: 10px">文件上传前需要执行的脚本(非阻塞命令)</div>
|
||||
<div style="margin-top: 10px">{{ $tl('p.beforeUploadScript') }}</div>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="after" tab="上传后">
|
||||
<a-tab-pane key="after" :tab="$tl('p.afterUpload')">
|
||||
<code-editor
|
||||
v-model:content="temp.afterScript"
|
||||
height="40vh"
|
||||
@ -257,7 +257,7 @@
|
||||
}"
|
||||
></code-editor>
|
||||
|
||||
<div style="margin-top: 10px">文件上传成功后需要执行的脚本(非阻塞命令)</div>
|
||||
<div style="margin-top: 10px">{{ $tl('p.afterUploadScript') }}</div>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-form-item-rest>
|
||||
@ -265,24 +265,30 @@
|
||||
</a-form>
|
||||
</a-modal>
|
||||
<!-- 查看文件 -->
|
||||
<a-modal v-model:open="viewFileVisible" destroy-on-close :title="`查看文件`" :footer="null" :mask-closable="false">
|
||||
<a-modal
|
||||
v-model:open="viewFileVisible"
|
||||
destroy-on-close
|
||||
:title="`${$tl('p.viewFile')}`"
|
||||
:footer="null"
|
||||
:mask-closable="false"
|
||||
>
|
||||
<a-form :model="temp" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
|
||||
<a-form-item label="文件名" name="name">
|
||||
<a-form-item :label="$tl('p.fileName')" name="name">
|
||||
{{ temp.name }}
|
||||
</a-form-item>
|
||||
<a-form-item label="文件ID" name="name">
|
||||
<a-form-item :label="$tl('c.fileId')" name="name">
|
||||
{{ temp.id }}
|
||||
</a-form-item>
|
||||
<a-form-item label="文件大小" name="size">
|
||||
<a-form-item :label="$tl('p.fileSize')" name="size">
|
||||
{{ renderSize(temp.size) }}
|
||||
</a-form-item>
|
||||
<a-form-item v-if="temp.validUntil" label="过期时间" name="validUntil">
|
||||
<a-form-item v-if="temp.validUntil" :label="$tl('p.expireTime')" name="validUntil">
|
||||
{{ parseTime(temp.validUntil) }}
|
||||
</a-form-item>
|
||||
<a-form-item v-if="temp.workspaceId" label="文件共享" name="global">
|
||||
{{ temp.workspaceId === 'GLOBAL' ? '全局' : '工作空间' }}
|
||||
<a-form-item v-if="temp.workspaceId" :label="$tl('p.fileShare')" name="global">
|
||||
{{ temp.workspaceId === 'GLOBAL' ? $tl('p.global') : $tl('p.workspace') }}
|
||||
</a-form-item>
|
||||
<a-form-item label="文件描述" name="description">
|
||||
<a-form-item :label="$tl('p.fileDescription')" name="description">
|
||||
{{ temp.description }}
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
@ -324,59 +330,59 @@ export default {
|
||||
confirmLoading: false,
|
||||
columns: [
|
||||
{
|
||||
title: '任务名称',
|
||||
title: this.$tl('p.taskName'),
|
||||
dataIndex: 'name',
|
||||
ellipsis: true,
|
||||
width: 150,
|
||||
tooltip: true
|
||||
},
|
||||
{
|
||||
title: '分发类型',
|
||||
title: this.$tl('p.distributeType'),
|
||||
dataIndex: 'taskType',
|
||||
width: '100px',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '文件来源',
|
||||
title: this.$tl('p.fileSource'),
|
||||
dataIndex: 'fileType',
|
||||
width: '100px',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
title: this.$tl('c.status'),
|
||||
dataIndex: 'status',
|
||||
width: '100px',
|
||||
ellipsis: true
|
||||
},
|
||||
|
||||
{
|
||||
title: '状态描述',
|
||||
title: this.$tl('p.statusDescription'),
|
||||
dataIndex: 'statusMsg',
|
||||
ellipsis: true,
|
||||
width: 200,
|
||||
tooltip: true
|
||||
},
|
||||
{
|
||||
title: '文件ID',
|
||||
title: this.$tl('c.fileId'),
|
||||
dataIndex: 'fileId',
|
||||
ellipsis: true,
|
||||
width: 150
|
||||
},
|
||||
{
|
||||
title: '发布目录',
|
||||
title: this.$tl('c.publishDir'),
|
||||
dataIndex: 'releasePath',
|
||||
width: '100px',
|
||||
ellipsis: true,
|
||||
tooltip: true
|
||||
},
|
||||
{
|
||||
title: '执行人',
|
||||
title: this.$tl('p.executor'),
|
||||
dataIndex: 'modifyUser',
|
||||
width: '120px',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '任务时间',
|
||||
title: this.$tl('p.taskTime'),
|
||||
dataIndex: 'createTimeMillis',
|
||||
sorter: true,
|
||||
ellipsis: true,
|
||||
@ -384,7 +390,7 @@ export default {
|
||||
width: '170px'
|
||||
},
|
||||
{
|
||||
title: '任务更新时间',
|
||||
title: this.$tl('p.taskUpdateTime'),
|
||||
dataIndex: 'modifyTimeMillis',
|
||||
sorter: true,
|
||||
ellipsis: true,
|
||||
@ -393,7 +399,7 @@ export default {
|
||||
},
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
title: this.$tl('p.operation'),
|
||||
dataIndex: 'operation',
|
||||
align: 'center',
|
||||
|
||||
@ -405,9 +411,9 @@ export default {
|
||||
nodeList: [],
|
||||
releaseFileVisible: false,
|
||||
releaseFileRules: {
|
||||
name: [{ required: true, message: '请输入文件任务名', trigger: 'blur' }],
|
||||
name: [{ required: true, message: this.$tl('p.pleaseInputFileTaskName'), trigger: 'blur' }],
|
||||
|
||||
taskDataIds: [{ required: true, message: '请选择发布的SSH', trigger: 'blur' }]
|
||||
taskDataIds: [{ required: true, message: this.$tl('p.pleaseSelectPublishSsh'), trigger: 'blur' }]
|
||||
},
|
||||
viewFileVisible: false
|
||||
}
|
||||
@ -421,6 +427,9 @@ export default {
|
||||
this.loadData()
|
||||
},
|
||||
methods: {
|
||||
$tl(key, ...args) {
|
||||
return this.$t(`pages.fileManager.releaseTask.list.${key}`, ...args)
|
||||
},
|
||||
CHANGE_PAGE,
|
||||
renderSize,
|
||||
parseTime,
|
||||
@ -445,11 +454,11 @@ export default {
|
||||
// 删除命令
|
||||
handleDelete(row) {
|
||||
$confirm({
|
||||
title: '系统提示',
|
||||
title: this.$tl('c.systemPrompt'),
|
||||
zIndex: 1009,
|
||||
content: '真的要删除该执行记录吗?',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
content: this.$tl('p.reallyDeleteRecord'),
|
||||
okText: this.$tl('c.confirm'),
|
||||
cancelText: this.$tl('c.cancel'),
|
||||
onOk: () => {
|
||||
return deleteReleaseTask({
|
||||
id: row.id
|
||||
@ -538,11 +547,11 @@ export default {
|
||||
// 取消
|
||||
handleCancelTask(record) {
|
||||
$confirm({
|
||||
title: '系统提示',
|
||||
title: this.$tl('c.systemPrompt'),
|
||||
zIndex: 1009,
|
||||
content: '真的取消当前发布任务吗?',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
content: this.$tl('p.reallyCancelTask'),
|
||||
okText: this.$tl('c.confirm'),
|
||||
cancelText: this.$tl('c.cancel'),
|
||||
oonOk: () => {
|
||||
return cancelReleaseTask({ id: record.id }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
@ -568,7 +577,7 @@ export default {
|
||||
this.viewFileVisible = true
|
||||
} else {
|
||||
$notification.warning({
|
||||
message: '文件不存在啦'
|
||||
message: this.$tl('c.fileNotExist')
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -583,7 +592,7 @@ export default {
|
||||
this.viewFileVisible = true
|
||||
} else {
|
||||
$notification.warning({
|
||||
message: '文件不存在啦'
|
||||
message: this.$tl('c.fileNotExist')
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -24,28 +24,28 @@
|
||||
<a-space>
|
||||
<a-input
|
||||
v-model:value="listQuery['%name%']"
|
||||
placeholder="文件名称"
|
||||
:placeholder="$tl('p.fileName')"
|
||||
class="search-input-item"
|
||||
@press-enter="loadData"
|
||||
/>
|
||||
|
||||
<a-input
|
||||
v-model:value="listQuery['extName']"
|
||||
placeholder="后缀,精准搜索"
|
||||
:placeholder="$tl('p.suffixSearch')"
|
||||
class="search-input-item"
|
||||
@press-enter="loadData"
|
||||
/>
|
||||
<a-input
|
||||
v-model:value="listQuery['id']"
|
||||
placeholder="文件id,精准搜索"
|
||||
:placeholder="$tl('p.fileIdSearch')"
|
||||
class="search-input-item"
|
||||
@press-enter="loadData"
|
||||
/>
|
||||
<a-tooltip title="按住 Ctr 或者 Alt/Option 键点击按钮快速回到第一页">
|
||||
<a-button type="primary" :loading="loading" @click="loadData">搜索</a-button>
|
||||
<a-tooltip :title="$tl('p.quickBackToFirstPage')">
|
||||
<a-button type="primary" :loading="loading" @click="loadData">{{ $tl('p.search') }}</a-button>
|
||||
</a-tooltip>
|
||||
<!-- <a-button type="primary" @click="handleUpload">上传文件</a-button> -->
|
||||
<a-button type="primary" @click="reScanner">扫描</a-button>
|
||||
<a-button type="primary" @click="reScanner">{{ $tl('p.scan') }}</a-button>
|
||||
|
||||
<a-button
|
||||
type="primary"
|
||||
@ -53,7 +53,7 @@
|
||||
:disabled="!tableSelections || tableSelections.length <= 0"
|
||||
@click="handleBatchDelete"
|
||||
>
|
||||
批量删除
|
||||
{{ $tl('p.batchDelete') }}
|
||||
</a-button>
|
||||
<a-button
|
||||
size="small"
|
||||
@ -64,7 +64,7 @@
|
||||
}
|
||||
"
|
||||
>
|
||||
<InfoCircleOutlined /> 配置目录
|
||||
<InfoCircleOutlined /> {{ $tl('p.configDirectory') }}
|
||||
</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
@ -81,11 +81,11 @@
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'name'">
|
||||
<a-popover title="文件信息">
|
||||
<a-popover :title="$tl('p.fileInfo')">
|
||||
<template #content>
|
||||
<p>文件ID:{{ record.id }}</p>
|
||||
<p>文件名:{{ text }}</p>
|
||||
<p>文件描述:{{ record.description }}</p>
|
||||
<p>{{ $tl('p.fileId') }}{{ record.id }}</p>
|
||||
<p>{{ $tl('p.fileNameLabel') }}{{ text }}</p>
|
||||
<p>{{ $tl('p.fileDescriptionLabel') }}{{ record.description }}</p>
|
||||
</template>
|
||||
<!-- {{ text }} -->
|
||||
<a-button type="link" style="padding: 0" size="small" @click="handleEdit(record)">{{ text }}</a-button>
|
||||
@ -98,19 +98,19 @@
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'source'">
|
||||
<a-tooltip placement="topLeft" :title="`${sourceMap[text] || '未知'}`">
|
||||
<span>{{ sourceMap[text] || '未知' }}</span>
|
||||
<a-tooltip placement="topLeft" :title="`${sourceMap[text] || $tl('c.content1')}`">
|
||||
<span>{{ sourceMap[text] || $tl('c.content1') }}</span>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.dataIndex === 'status'">
|
||||
<a-tag v-if="text === 1" color="green">存在</a-tag>
|
||||
<a-tag v-else color="red">丢失</a-tag>
|
||||
<a-tag v-if="text === 1" color="green">{{ $tl('p.exist') }}</a-tag>
|
||||
<a-tag v-else color="red">{{ $tl('p.missing') }}</a-tag>
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.dataIndex === 'type'">
|
||||
<a-tag v-if="text === 1">文件</a-tag>
|
||||
<a-tag v-else>文件夹</a-tag>
|
||||
<a-tag v-if="text === 1">{{ $tl('p.file') }}</a-tag>
|
||||
<a-tag v-else>{{ $tl('p.folder') }}</a-tag>
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.dataIndex === 'operation'">
|
||||
@ -122,16 +122,18 @@
|
||||
type="primary"
|
||||
@click="handleDownloadUrl(record)"
|
||||
>
|
||||
下载</a-button
|
||||
{{ $tl('p.download') }}</a-button
|
||||
>
|
||||
<a-button
|
||||
size="small"
|
||||
:disabled="!(record.status === 1 && record.type === 1)"
|
||||
type="primary"
|
||||
@click="handleReleaseFile(record)"
|
||||
>发布</a-button
|
||||
>{{ $tl('p.publish') }}</a-button
|
||||
>
|
||||
<a-button type="primary" danger size="small" @click="handleDelete(record)">删除</a-button>
|
||||
<a-button type="primary" danger size="small" @click="handleDelete(record)">{{
|
||||
$tl('p.deleteFile')
|
||||
}}</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
</template>
|
||||
@ -141,18 +143,18 @@
|
||||
<a-modal
|
||||
v-model:open="editVisible"
|
||||
destroy-on-close
|
||||
:title="`修改文件`"
|
||||
:title="`${$tl('p.modifyFile')}`"
|
||||
:confirm-loading="confirmLoading"
|
||||
:mask-closable="false"
|
||||
@ok="handleEditOk"
|
||||
>
|
||||
<a-form ref="editForm" :rules="rules" :model="temp" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
|
||||
<a-form-item label="文件名" name="name">
|
||||
<a-input v-model:value="temp.name" placeholder="文件名" :disabled="true" />
|
||||
<a-form-item :label="$tl('c.fileName')" name="name">
|
||||
<a-input v-model:value="temp.name" :placeholder="$tl('c.fileName')" :disabled="true" />
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="文件描述" name="description">
|
||||
<a-textarea v-model:value="temp.description" placeholder="请输入文件描述" />
|
||||
<a-form-item :label="$tl('p.fileDescription')" name="description">
|
||||
<a-textarea v-model:value="temp.description" :placeholder="$tl('p.pleaseEnterFileDescription')" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-modal>
|
||||
@ -161,7 +163,7 @@
|
||||
<a-modal
|
||||
v-model:open="triggerVisible"
|
||||
destroy-on-close
|
||||
title="断点/分片下载"
|
||||
:title="$tl('p.chunkedDownload')"
|
||||
width="50%"
|
||||
:footer="null"
|
||||
:mask-closable="false"
|
||||
@ -169,13 +171,13 @@
|
||||
<a-form ref="editTriggerForm" :model="temp" :label-col="{ span: 6 }" :wrapper-col="{ span: 16 }">
|
||||
<a-tabs default-active-key="1">
|
||||
<template #rightExtra>
|
||||
<a-tooltip title="重置下载 token 信息,重置后之前的下载 token 将失效">
|
||||
<a-button type="primary" size="small" @click="resetTrigger">重置</a-button>
|
||||
<a-tooltip :title="$tl('p.resetDownloadToken')">
|
||||
<a-button type="primary" size="small" @click="resetTrigger">{{ $tl('p.reset') }}</a-button>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<a-tab-pane key="1" tab="断点/分片单文件下载">
|
||||
<a-tab-pane key="1" :tab="$tl('p.chunkedSingleFileDownload')">
|
||||
<a-space direction="vertical" style="width: 100%">
|
||||
<a-alert type="info" :message="`下载地址(点击可以复制)`">
|
||||
<a-alert type="info" :message="`${$tl('c.downloadAddress')}(${$tl('c.copyTip')})`">
|
||||
<template #description>
|
||||
<a-typography-paragraph :copyable="{ text: temp.triggerDownloadUrl }">
|
||||
<a-tag>GET</a-tag>
|
||||
@ -184,26 +186,26 @@
|
||||
</template>
|
||||
</a-alert>
|
||||
<a :href="temp.triggerDownloadUrl" target="_blank">
|
||||
<a-button size="small" type="primary"><DownloadOutlined />立即下载</a-button>
|
||||
<a-button size="small" type="primary"><DownloadOutlined />{{ $tl('c.downloadNow') }}</a-button>
|
||||
</a>
|
||||
</a-space>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane v-if="temp.triggerAliasDownloadUrl" tab="断点/分片别名下载">
|
||||
<a-tab-pane v-if="temp.triggerAliasDownloadUrl" :tab="$tl('p.chunkedAliasDownload')">
|
||||
<a-space direction="vertical" style="width: 100%">
|
||||
<a-alert message="温馨提示" type="warning">
|
||||
<a-alert :message="$tl('p.warmPrompt')" type="warning">
|
||||
<template #description>
|
||||
<ul>
|
||||
<li>
|
||||
支持自定义排序字段:sort=createTimeMillis:desc
|
||||
{{ $tl('p.customSortField') }}=createTimeMillis:desc
|
||||
|
||||
<p>描述根据创建时间升序第一个</p>
|
||||
<p>{{ $tl('p.descSortAscFirst') }}</p>
|
||||
</li>
|
||||
<li>支持的字段可以通过接口返回的查看</li>
|
||||
<li>通用的字段有:createTimeMillis、modifyTimeMillis</li>
|
||||
<li>{{ $tl('p.supportedFields') }}</li>
|
||||
<li>{{ $tl('p.commonFields') }}</li>
|
||||
</ul>
|
||||
</template>
|
||||
</a-alert>
|
||||
<a-alert type="info" :message="`下载地址(点击可以复制)`">
|
||||
<a-alert type="info" :message="`${$tl('c.downloadAddress')}(${$tl('c.copyTip')})`">
|
||||
<template #description>
|
||||
<a-typography-paragraph :copyable="{ text: temp.triggerAliasDownloadUrl }">
|
||||
<a-tag>GET</a-tag>
|
||||
@ -212,7 +214,7 @@
|
||||
</template>
|
||||
</a-alert>
|
||||
<a :href="temp.triggerAliasDownloadUrl" target="_blank">
|
||||
<a-button size="small" type="primary"><DownloadOutlined />立即下载</a-button>
|
||||
<a-button size="small" type="primary"><DownloadOutlined />{{ $tl('c.downloadNow') }}</a-button>
|
||||
</a>
|
||||
</a-space>
|
||||
</a-tab-pane>
|
||||
@ -223,7 +225,7 @@
|
||||
<a-modal
|
||||
v-model:open="releaseFileVisible"
|
||||
destroy-on-close
|
||||
title="发布文件"
|
||||
:title="$tl('p.publishFile')"
|
||||
width="50%"
|
||||
:mask-closable="false"
|
||||
:confirm-loading="confirmLoading"
|
||||
@ -237,7 +239,7 @@
|
||||
<a-modal
|
||||
v-model:open="configDir"
|
||||
destroy-on-close
|
||||
:title="`配置授权目录`"
|
||||
:title="`${$tl('p.configAuthDirectory')}`"
|
||||
:footer="null"
|
||||
width="50vw"
|
||||
:mask-closable="false"
|
||||
@ -296,27 +298,27 @@ export default {
|
||||
list: [],
|
||||
columns: [
|
||||
{
|
||||
title: '名称',
|
||||
title: this.$tl('p.name'),
|
||||
dataIndex: 'name',
|
||||
ellipsis: true,
|
||||
width: 150
|
||||
},
|
||||
{
|
||||
title: '描述',
|
||||
title: this.$tl('p.desc'),
|
||||
dataIndex: 'description',
|
||||
ellipsis: true,
|
||||
width: 150,
|
||||
tooltip: true
|
||||
},
|
||||
{
|
||||
title: '路径',
|
||||
title: this.$tl('p.path'),
|
||||
dataIndex: 'absolutePath',
|
||||
ellipsis: true,
|
||||
width: 150,
|
||||
tooltip: true
|
||||
},
|
||||
{
|
||||
title: '大小',
|
||||
title: this.$tl('p.size'),
|
||||
dataIndex: 'size',
|
||||
sorter: true,
|
||||
ellipsis: true,
|
||||
@ -324,7 +326,7 @@ export default {
|
||||
width: '100px'
|
||||
},
|
||||
{
|
||||
title: '后缀',
|
||||
title: this.$tl('p.suffix'),
|
||||
dataIndex: 'extName',
|
||||
ellipsis: true,
|
||||
|
||||
@ -332,14 +334,14 @@ export default {
|
||||
width: '80px'
|
||||
},
|
||||
{
|
||||
title: '类型',
|
||||
title: this.$tl('p.type'),
|
||||
dataIndex: 'type',
|
||||
ellipsis: true,
|
||||
|
||||
width: '80px'
|
||||
},
|
||||
{
|
||||
title: '文件状态',
|
||||
title: this.$tl('p.fileStatus'),
|
||||
dataIndex: 'status',
|
||||
ellipsis: true,
|
||||
|
||||
@ -347,7 +349,7 @@ export default {
|
||||
},
|
||||
|
||||
{
|
||||
title: '文件修改时间',
|
||||
title: this.$tl('p.fileModifyTime'),
|
||||
dataIndex: 'lastModified',
|
||||
sorter: true,
|
||||
customRender: ({ text }) => parseTime(text),
|
||||
@ -355,7 +357,7 @@ export default {
|
||||
},
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
title: this.$tl('p.operation'),
|
||||
dataIndex: 'operation',
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
@ -365,8 +367,8 @@ export default {
|
||||
}
|
||||
],
|
||||
rules: {
|
||||
name: [{ required: true, message: '请输入文件名称', trigger: 'blur' }],
|
||||
url: [{ required: true, message: '请输入远程地址', trigger: 'blur' }]
|
||||
name: [{ required: true, message: this.$tl('p.pleaseEnterFileName'), trigger: 'blur' }],
|
||||
url: [{ required: true, message: this.$tl('p.pleaseEnterRemoteAddress'), trigger: 'blur' }]
|
||||
},
|
||||
|
||||
temp: {},
|
||||
@ -402,6 +404,9 @@ export default {
|
||||
this.loadData()
|
||||
},
|
||||
methods: {
|
||||
$tl(key, ...args) {
|
||||
return this.$t(`pages.fileManager.staticFileStorage.list.${key}`, ...args)
|
||||
},
|
||||
randomStr,
|
||||
CHANGE_PAGE,
|
||||
renderSize,
|
||||
@ -454,11 +459,11 @@ export default {
|
||||
// 删除文件
|
||||
handleDelete(record) {
|
||||
$confirm({
|
||||
title: '系统提示',
|
||||
title: this.$tl('c.systemPrompt'),
|
||||
zIndex: 1009,
|
||||
content: '真的要删除当前文件么?' + record.name,
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
content: this.$tl('p.confirmDeleteFile') + record.name,
|
||||
okText: this.$tl('c.confirm'),
|
||||
cancelText: this.$tl('c.cancel'),
|
||||
onOk: () => {
|
||||
return delFile({
|
||||
id: record.id,
|
||||
@ -478,16 +483,16 @@ export default {
|
||||
handleBatchDelete() {
|
||||
if (!this.tableSelections || this.tableSelections.length <= 0) {
|
||||
$notification.warning({
|
||||
message: '没有选择任何数据'
|
||||
message: this.$tl('p.noDataSelected')
|
||||
})
|
||||
return
|
||||
}
|
||||
$confirm({
|
||||
title: '系统提示',
|
||||
title: this.$tl('c.systemPrompt'),
|
||||
zIndex: 1009,
|
||||
content: '真的要删除这些文件么?',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
content: this.$tl('p.confirmDeleteFiles'),
|
||||
okText: this.$tl('c.confirm'),
|
||||
cancelText: this.$tl('c.cancel'),
|
||||
onOk: () => {
|
||||
return delFile({
|
||||
ids: this.tableSelections.join(','),
|
||||
@ -575,7 +580,7 @@ export default {
|
||||
handerConfirm() {
|
||||
if (!this.tableSelections.length) {
|
||||
$notification.warning({
|
||||
message: '请选择要使用的文件'
|
||||
message: this.$tl('c.pleaseSelectFile')
|
||||
})
|
||||
return
|
||||
}
|
||||
@ -584,7 +589,7 @@ export default {
|
||||
})
|
||||
if (!selectData.length) {
|
||||
$notification.warning({
|
||||
message: '请选择要使用的文件'
|
||||
message: this.$tl('c.pleaseSelectFile')
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -16,26 +16,41 @@
|
||||
<a-space wrap class="search-box">
|
||||
<a-input
|
||||
v-model:value="listQuery['%name%']"
|
||||
placeholder="监控名称"
|
||||
:placeholder="$tl('c.monitorName')"
|
||||
class="search-input-item"
|
||||
@press-enter="loadData"
|
||||
/>
|
||||
<a-select v-model:value="listQuery.status" allow-clear placeholder="开启状态" class="search-input-item">
|
||||
<a-select-option :value="1">开启</a-select-option>
|
||||
<a-select-option :value="0">关闭</a-select-option>
|
||||
<a-select
|
||||
v-model:value="listQuery.status"
|
||||
allow-clear
|
||||
:placeholder="$tl('c.openStatus')"
|
||||
class="search-input-item"
|
||||
>
|
||||
<a-select-option :value="1">{{ $tl('c.open') }}</a-select-option>
|
||||
<a-select-option :value="0">{{ $tl('c.close') }}</a-select-option>
|
||||
</a-select>
|
||||
<a-select v-model:value="listQuery.autoRestart" allow-clear placeholder="自动重启" class="search-input-item">
|
||||
<a-select-option :value="1">是</a-select-option>
|
||||
<a-select-option :value="0">否</a-select-option>
|
||||
<a-select
|
||||
v-model:value="listQuery.autoRestart"
|
||||
allow-clear
|
||||
:placeholder="$tl('c.autoRestart')"
|
||||
class="search-input-item"
|
||||
>
|
||||
<a-select-option :value="1">{{ $tl('c.yes') }}</a-select-option>
|
||||
<a-select-option :value="0">{{ $tl('c.no') }}</a-select-option>
|
||||
</a-select>
|
||||
<a-select v-model:value="listQuery.alarm" allow-clear placeholder="报警状态" class="search-input-item">
|
||||
<a-select-option :value="1">报警中</a-select-option>
|
||||
<a-select-option :value="0">未报警</a-select-option>
|
||||
<a-select
|
||||
v-model:value="listQuery.alarm"
|
||||
allow-clear
|
||||
:placeholder="$tl('c.alarmStatus')"
|
||||
class="search-input-item"
|
||||
>
|
||||
<a-select-option :value="1">{{ $tl('c.alarming') }}</a-select-option>
|
||||
<a-select-option :value="0">{{ $tl('c.notAlarming') }}</a-select-option>
|
||||
</a-select>
|
||||
<a-tooltip title="按住 Ctr 或者 Alt/Option 键点击按钮快速回到第一页">
|
||||
<a-button type="primary" :loading="loading" @click="loadData">搜索</a-button>
|
||||
<a-tooltip :title="$tl('p.clickBackToFirstPage')">
|
||||
<a-button type="primary" :loading="loading" @click="loadData">{{ $tl('p.search') }}</a-button>
|
||||
</a-tooltip>
|
||||
<a-button type="primary" @click="handleAdd">新增</a-button>
|
||||
<a-button type="primary" @click="handleAdd">{{ $tl('p.add') }}</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
<template #bodyCell="{ column, text, record }">
|
||||
@ -45,19 +60,37 @@
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'status'">
|
||||
<a-switch size="small" :checked="text" disabled checked-children="开启" un-checked-children="关闭" />
|
||||
<a-switch
|
||||
size="small"
|
||||
:checked="text"
|
||||
disabled
|
||||
:checked-children="$tl('c.open')"
|
||||
:un-checked-children="$tl('c.close')"
|
||||
/>
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'autoRestart'">
|
||||
<a-switch size="small" :checked="text" disabled checked-children="是" un-checked-children="否" />
|
||||
<a-switch
|
||||
size="small"
|
||||
:checked="text"
|
||||
disabled
|
||||
:checked-children="$tl('c.yes')"
|
||||
:un-checked-children="$tl('c.no')"
|
||||
/>
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'alarm'">
|
||||
<a-switch size="small" :checked="text" disabled checked-children="报警中" un-checked-children="未报警" />
|
||||
<a-switch
|
||||
size="small"
|
||||
:checked="text"
|
||||
disabled
|
||||
:checked-children="$tl('c.alarming')"
|
||||
:un-checked-children="$tl('c.notAlarming')"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.dataIndex === 'operation'">
|
||||
<a-space>
|
||||
<a-button type="primary" size="small" @click="handleEdit(record)">编辑</a-button>
|
||||
<a-button type="primary" danger size="small" @click="handleDelete(record)">删除</a-button>
|
||||
<a-button type="primary" size="small" @click="handleEdit(record)">{{ $tl('p.edit') }}</a-button>
|
||||
<a-button type="primary" danger size="small" @click="handleDelete(record)">{{ $tl('p.delete') }}</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
</template>
|
||||
@ -68,22 +101,30 @@
|
||||
destroy-on-close
|
||||
:confirm-loading="confirmLoading"
|
||||
width="60%"
|
||||
title="编辑监控"
|
||||
:title="$tl('p.editMonitor')"
|
||||
:mask-closable="false"
|
||||
@ok="handleEditMonitorOk"
|
||||
>
|
||||
<a-form ref="editMonitorForm" :rules="rules" :model="temp" :label-col="{ span: 4 }" :wrapper-col="{ span: 18 }">
|
||||
<a-form-item label="监控名称" name="name">
|
||||
<a-input v-model:value="temp.name" :max-length="50" placeholder="监控名称" />
|
||||
<a-form-item :label="$tl('c.monitorName')" name="name">
|
||||
<a-input v-model:value="temp.name" :max-length="50" :placeholder="$tl('c.monitorName')" />
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="开启状态" name="status">
|
||||
<a-form-item :label="$tl('c.openStatus')" name="status">
|
||||
<a-space size="large">
|
||||
<a-switch v-model:checked="temp.status" checked-children="开" un-checked-children="关" />
|
||||
<a-switch
|
||||
v-model:checked="temp.status"
|
||||
:checked-children="$tl('c.on')"
|
||||
:un-checked-children="$tl('c.off')"
|
||||
/>
|
||||
<div>
|
||||
自动重启:
|
||||
{{ $tl('c.autoRestart') }}:
|
||||
<a-form-item-rest>
|
||||
<a-switch v-model:checked="temp.autoRestart" checked-children="开" un-checked-children="关" />
|
||||
<a-switch
|
||||
v-model:checked="temp.autoRestart"
|
||||
:checked-children="$tl('c.on')"
|
||||
:un-checked-children="$tl('c.off')"
|
||||
/>
|
||||
</a-form-item-rest>
|
||||
</div>
|
||||
</a-space>
|
||||
@ -102,21 +143,17 @@
|
||||
</a-radio-group>
|
||||
</a-form-item> -->
|
||||
|
||||
<a-form-item label="监控周期" name="execCron">
|
||||
<a-auto-complete
|
||||
v-model:value="temp.execCron"
|
||||
placeholder="如果需要定时自动执行则填写,cron 表达式.默认未开启秒级别,需要去修改配置文件中:[system.timerMatchSecond])"
|
||||
:options="CRON_DATA_SOURCE"
|
||||
>
|
||||
<a-form-item :label="$tl('c.monitorPeriod')" name="execCron">
|
||||
<a-auto-complete v-model:value="temp.execCron" :placeholder="$tl('p.cronExpr')" :options="CRON_DATA_SOURCE">
|
||||
<template #option="item"> {{ item.title }} {{ item.value }} </template>
|
||||
</a-auto-complete>
|
||||
</a-form-item>
|
||||
<a-form-item label="监控项目" name="projects">
|
||||
<a-form-item :label="$tl('p.monitorItem')" name="projects">
|
||||
<a-select
|
||||
v-model:value="projectKeys"
|
||||
option-label-prop="label"
|
||||
mode="multiple"
|
||||
placeholder="选择要监控的项目,file 类型项目不可以监控"
|
||||
:placeholder="$tl('p.selectMonitorItem')"
|
||||
show-search
|
||||
:filter-option="
|
||||
(input, option) => {
|
||||
@ -140,7 +177,7 @@
|
||||
:label="`${project.name} - ${project.runMode}`"
|
||||
:disabled="!noFileModes.includes(project.runMode)"
|
||||
>
|
||||
【{{ project.nodeName }}】{{ project.name }} -
|
||||
{{ $tl('p.leftBracket') }}{{ project.nodeName }}{{ $tl('p.rightBracket') }}{{ project.name }} -
|
||||
{{ project.runMode }}
|
||||
</a-select-option>
|
||||
</a-select-opt-group>
|
||||
@ -149,17 +186,15 @@
|
||||
<a-form-item name="notifyUser" class="jpom-notify">
|
||||
<template #label>
|
||||
<a-tooltip>
|
||||
联系人
|
||||
<template #title>
|
||||
如果这里的报警联系人无法选择,说明这里面的管理员没有设置邮箱,在右上角下拉菜单里面的用户资料里可以设置。
|
||||
</template>
|
||||
{{ $tl('p.contactPerson') }}
|
||||
<template #title> {{ $tl('p.contactPersonNote') }} </template>
|
||||
<QuestionCircleOutlined v-show="!temp.id" />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<a-transfer
|
||||
:data-source="userList"
|
||||
:lazy="false"
|
||||
:titles="['待选择', '已选择']"
|
||||
:titles="[$tl('p.pending'), $tl('p.selected')]"
|
||||
show-search
|
||||
:list-style="{
|
||||
width: '18vw'
|
||||
@ -170,7 +205,7 @@
|
||||
>
|
||||
<template #render="item">
|
||||
<template v-if="item.disabled">
|
||||
<a-tooltip title="如果不可以选择则表示对应的用户没有配置邮箱">
|
||||
<a-tooltip :title="$tl('p.noEmailConfigured')">
|
||||
<WarningTwoTone />
|
||||
{{ item.name }}
|
||||
</a-tooltip>
|
||||
@ -185,17 +220,19 @@
|
||||
WebHooks
|
||||
<template #title>
|
||||
<ul>
|
||||
<li>发生报警时候请求</li>
|
||||
<li>{{ $tl('p.alarmRequest') }}</li>
|
||||
<li>{{ $tl('p.alarmParams') }}</li>
|
||||
<li>
|
||||
传入参数有:monitorId、monitorName、nodeId、nodeName、projectId、projectName、title、content、runStatus
|
||||
runStatus {{ $tl('p.running') }}({{ $tl('p.abnormalRecovery') }}),false {{ $tl('p.notRunning') }}({{
|
||||
$tl('p.abnormal')
|
||||
}})
|
||||
</li>
|
||||
<li>runStatus 值为 true 表示项目当前为运行中(异常恢复),false 表示项目当前未运行(发生异常)</li>
|
||||
</ul>
|
||||
</template>
|
||||
<QuestionCircleOutlined v-show="!temp.id" />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<a-input v-model:value="temp.webhook" placeholder="接收报警消息,非必填,GET请求" />
|
||||
<a-input v-model:value="temp.webhook" :placeholder="$tl('p.receiveAlarmMsg')" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-modal>
|
||||
@ -236,38 +273,38 @@ export default {
|
||||
editMonitorVisible: false,
|
||||
columns: [
|
||||
{
|
||||
title: '名称',
|
||||
title: this.$tl('p.name'),
|
||||
dataIndex: 'name',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '监控周期',
|
||||
title: this.$tl('c.monitorPeriod'),
|
||||
dataIndex: 'execCron',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '开启状态',
|
||||
title: this.$tl('c.openStatus'),
|
||||
dataIndex: 'status',
|
||||
ellipsis: true,
|
||||
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '自动重启',
|
||||
title: this.$tl('c.autoRestart'),
|
||||
dataIndex: 'autoRestart',
|
||||
ellipsis: true,
|
||||
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '报警状态',
|
||||
title: this.$tl('c.alarmStatus'),
|
||||
dataIndex: 'alarm',
|
||||
ellipsis: true,
|
||||
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '修改人',
|
||||
title: this.$tl('p.modifier'),
|
||||
dataIndex: 'modifyUser',
|
||||
ellipsis: true,
|
||||
align: 'center',
|
||||
@ -275,7 +312,7 @@ export default {
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '修改时间',
|
||||
title: this.$tl('p.modifiedTime'),
|
||||
dataIndex: 'modifyTimeMillis',
|
||||
sorter: true,
|
||||
customRender: ({ text }) => {
|
||||
@ -287,7 +324,7 @@ export default {
|
||||
width: 180
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: this.$tl('p.operation'),
|
||||
dataIndex: 'operation',
|
||||
ellipsis: true,
|
||||
fixed: 'right',
|
||||
@ -298,7 +335,7 @@ export default {
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入监控名称',
|
||||
message: this.$tl('p.pleaseEnterMonitorName'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
@ -316,6 +353,9 @@ export default {
|
||||
this.loadData()
|
||||
},
|
||||
methods: {
|
||||
$tl(key, ...args) {
|
||||
return this.$t(`pages..monitor.list.${key}`, ...args)
|
||||
},
|
||||
// 加载数据
|
||||
loadData(pointerEvent) {
|
||||
this.loading = true
|
||||
@ -356,7 +396,7 @@ export default {
|
||||
|
||||
this.nodeProjectList = res.data.map((item) => {
|
||||
let nodeInfo = res1.data.filter((nodeItem) => nodeItem.id === item.nodeId)
|
||||
item.nodeName = nodeInfo.length > 0 ? nodeInfo[0].name : '未知'
|
||||
item.nodeName = nodeInfo.length > 0 ? nodeInfo[0].name : this.$tl('p.unknown')
|
||||
return item
|
||||
})
|
||||
this.nodeProjectGroupList = itemGroupBy(this.nodeProjectList, 'nodeId', 'node', 'projects')
|
||||
@ -437,7 +477,7 @@ export default {
|
||||
|
||||
if (targetKeysTemp.length <= 0 && !this.temp.webhook) {
|
||||
$notification.warn({
|
||||
message: '请选择一位报警联系人或者填写webhook'
|
||||
message: this.$tl('p.pleaseSelectContactOrWebhook')
|
||||
})
|
||||
return false
|
||||
}
|
||||
@ -470,11 +510,11 @@ export default {
|
||||
// 删除
|
||||
handleDelete(record) {
|
||||
$confirm({
|
||||
title: '系统提示',
|
||||
title: this.$tl('p.systemPrompt'),
|
||||
zIndex: 1009,
|
||||
content: '真的要删除监控么?',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
content: this.$tl('p.reallyDeleteMonitor'),
|
||||
okText: this.$tl('p.confirm'),
|
||||
cancelText: this.$tl('p.cancel'),
|
||||
onOk: () => {
|
||||
return deleteMonitor(record.id).then((res) => {
|
||||
if (res.code === 200) {
|
||||
|
@ -14,20 +14,35 @@
|
||||
>
|
||||
<template #title>
|
||||
<a-space wrap class="search-box">
|
||||
<a-select v-model:value="listQuery.nodeId" allow-clear placeholder="请选择节点" class="search-input-item">
|
||||
<a-select
|
||||
v-model:value="listQuery.nodeId"
|
||||
allow-clear
|
||||
:placeholder="$tl('p.pleaseSelectNode')"
|
||||
class="search-input-item"
|
||||
>
|
||||
<a-select-option v-for="(nodeName, key) in nodeMap" :key="key">{{ nodeName }}</a-select-option>
|
||||
</a-select>
|
||||
<a-select v-model:value="listQuery.status" allow-clear placeholder="报警状态" class="search-input-item">
|
||||
<a-select-option :value="1">正常</a-select-option>
|
||||
<a-select-option :value="0">异常</a-select-option>
|
||||
<a-select
|
||||
v-model:value="listQuery.status"
|
||||
allow-clear
|
||||
:placeholder="$tl('c.alarmStatus')"
|
||||
class="search-input-item"
|
||||
>
|
||||
<a-select-option :value="1">{{ $tl('c.normal') }}</a-select-option>
|
||||
<a-select-option :value="0">{{ $tl('c.abnormal') }}</a-select-option>
|
||||
</a-select>
|
||||
<a-select v-model:value="listQuery.notifyStatus" allow-clear placeholder="通知状态" class="search-input-item">
|
||||
<a-select-option :value="1">成功</a-select-option>
|
||||
<a-select-option :value="0">失败</a-select-option>
|
||||
<a-select
|
||||
v-model:value="listQuery.notifyStatus"
|
||||
allow-clear
|
||||
:placeholder="$tl('c.notificationStatus')"
|
||||
class="search-input-item"
|
||||
>
|
||||
<a-select-option :value="1">{{ $tl('c.success') }}</a-select-option>
|
||||
<a-select-option :value="0">{{ $tl('c.failure') }}</a-select-option>
|
||||
</a-select>
|
||||
<a-range-picker :show-time="{ format: 'HH:mm:ss' }" format="YYYY-MM-DD HH:mm:ss" @change="onchangeTime" />
|
||||
<a-tooltip title="按住 Ctr 或者 Alt/Option 键点击按钮快速回到第一页">
|
||||
<a-button :loading="loading" type="primary" @click="loadData">搜索</a-button>
|
||||
<a-tooltip :title="$tl('p.quickReturnToFirstPage')">
|
||||
<a-button :loading="loading" type="primary" @click="loadData">{{ $tl('p.search') }}</a-button>
|
||||
</a-tooltip>
|
||||
</a-space>
|
||||
</template>
|
||||
@ -43,21 +58,21 @@
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'status'">
|
||||
<span>{{ text ? '正常' : '异常' }}</span>
|
||||
<span>{{ text ? $tl('c.normal') : $tl('c.abnormal') }}</span>
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'notifyStyle'">
|
||||
{{ notifyStyle[text] || '未知' }}
|
||||
{{ notifyStyle[text] || $tl('p.unknown') }}
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'notifyStatus'">
|
||||
<span>{{ text ? '成功' : '失败' }}</span>
|
||||
<span>{{ text ? $tl('c.success') : $tl('c.failure') }}</span>
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'operation'">
|
||||
<a-button size="small" type="primary" @click="handleDetail(record)">详情</a-button>
|
||||
<a-button size="small" type="primary" @click="handleDetail(record)">{{ $tl('p.details') }}</a-button>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
<!-- 详情区 -->
|
||||
<a-modal v-model:open="detailVisible" destroy-on-close width="600px" title="详情信息" :footer="null">
|
||||
<a-modal v-model:open="detailVisible" destroy-on-close width="600px" :title="$tl('p.detailInfo')" :footer="null">
|
||||
<a-list item-layout="horizontal" :data-source="detailData">
|
||||
<template #renderItem="{ item }">
|
||||
<a-list-item>
|
||||
@ -91,40 +106,40 @@ export default {
|
||||
detailData: [],
|
||||
columns: [
|
||||
{
|
||||
title: '报警标题',
|
||||
title: this.$tl('p.alarmTitle'),
|
||||
dataIndex: 'title',
|
||||
ellipsis: true,
|
||||
tooltip: true
|
||||
},
|
||||
{
|
||||
title: '节点名称',
|
||||
title: this.$tl('p.nodeName'),
|
||||
dataIndex: 'nodeId',
|
||||
width: 100,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '项目 ID',
|
||||
title: this.$tl('p.projectId'),
|
||||
dataIndex: 'projectId',
|
||||
width: 100,
|
||||
ellipsis: true,
|
||||
tooltip: true
|
||||
},
|
||||
{
|
||||
title: '报警状态',
|
||||
title: this.$tl('c.alarmStatus'),
|
||||
dataIndex: 'status',
|
||||
width: 100,
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '报警方式',
|
||||
title: this.$tl('p.alarmMethod'),
|
||||
dataIndex: 'notifyStyle',
|
||||
width: 100,
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '报警时间',
|
||||
title: this.$tl('p.alarmTime'),
|
||||
dataIndex: 'createTime',
|
||||
customRender: ({ text }) => {
|
||||
return parseTime(text)
|
||||
@ -132,13 +147,13 @@ export default {
|
||||
width: '170px'
|
||||
},
|
||||
{
|
||||
title: '通知状态',
|
||||
title: this.$tl('c.notificationStatus'),
|
||||
dataIndex: 'notifyStatus',
|
||||
width: 100,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: this.$tl('p.operation'),
|
||||
dataIndex: 'operation',
|
||||
align: 'center',
|
||||
fixed: 'right',
|
||||
@ -159,6 +174,9 @@ export default {
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
$tl(key, ...args) {
|
||||
return this.$t(`pages..monitor.log.${key}`, ...args)
|
||||
},
|
||||
// 加载 node
|
||||
loadNodeList(fn) {
|
||||
getNodeListAll().then((res) => {
|
||||
@ -202,15 +220,15 @@ export default {
|
||||
this.detailData = []
|
||||
this.detailVisible = true
|
||||
this.temp = Object.assign({}, record)
|
||||
this.detailData.push({ title: '标题', description: this.temp.title })
|
||||
this.detailData.push({ title: '内容', description: this.temp.content })
|
||||
this.detailData.push({ title: this.$tl('p.title'), description: this.temp.title })
|
||||
this.detailData.push({ title: this.$tl('p.content'), description: this.temp.content })
|
||||
this.detailData.push({
|
||||
title: '通知对象',
|
||||
title: this.$tl('p.notificationTarget'),
|
||||
description: this.temp.notifyObject
|
||||
})
|
||||
if (!this.temp.notifyStatus) {
|
||||
this.detailData.push({
|
||||
title: '通知异常',
|
||||
title: this.$tl('p.notificationAbnormal'),
|
||||
description: this.temp.notifyError
|
||||
})
|
||||
}
|
||||
|
@ -16,18 +16,23 @@
|
||||
<a-space wrap class="search-box">
|
||||
<a-input
|
||||
v-model:value="listQuery['%name%']"
|
||||
placeholder="监控名称"
|
||||
:placeholder="$tl('c.monitorName')"
|
||||
class="search-input-item"
|
||||
@press-enter="loadData"
|
||||
/>
|
||||
<a-select v-model:value="listQuery.status" allow-clear placeholder="开启状态" class="search-input-item">
|
||||
<a-select-option :value="1">开启</a-select-option>
|
||||
<a-select-option :value="0">关闭</a-select-option>
|
||||
<a-select
|
||||
v-model:value="listQuery.status"
|
||||
allow-clear
|
||||
:placeholder="$tl('c.status')"
|
||||
class="search-input-item"
|
||||
>
|
||||
<a-select-option :value="1">{{ $tl('c.on') }}</a-select-option>
|
||||
<a-select-option :value="0">{{ $tl('c.off') }}</a-select-option>
|
||||
</a-select>
|
||||
<a-tooltip title="按住 Ctr 或者 Alt/Option 键点击按钮快速回到第一页">
|
||||
<a-button type="primary" :loading="loading" @click="loadData">搜索</a-button>
|
||||
<a-tooltip :title="$tl('p.quickReturn')">
|
||||
<a-button type="primary" :loading="loading" @click="loadData">{{ $tl('p.search') }}</a-button>
|
||||
</a-tooltip>
|
||||
<a-button type="primary" @click="handleAdd">新增</a-button>
|
||||
<a-button type="primary" @click="handleAdd">{{ $tl('p.add') }}</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
<template #bodyCell="{ column, text, record }">
|
||||
@ -37,13 +42,13 @@
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'status'">
|
||||
<a-switch size="small" :checked="text" checked-children="开启" un-checked-children="关闭" />
|
||||
<a-switch size="small" :checked="text" :checked-children="$tl('c.on')" :un-checked-children="$tl('c.off')" />
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.dataIndex === 'operation'">
|
||||
<a-space>
|
||||
<a-button size="small" type="primary" @click="handleEdit(record)">编辑</a-button>
|
||||
<a-button size="small" type="primary" danger @click="handleDelete(record)">删除</a-button>
|
||||
<a-button size="small" type="primary" @click="handleEdit(record)">{{ $tl('p.edit') }}</a-button>
|
||||
<a-button size="small" type="primary" danger @click="handleDelete(record)">{{ $tl('p.delete') }}</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
</template>
|
||||
@ -54,18 +59,22 @@
|
||||
destroy-on-close
|
||||
:confirm-loading="confirmLoading"
|
||||
width="50vw"
|
||||
title="编辑监控"
|
||||
:title="$tl('p.editMonitor')"
|
||||
:mask-closable="false"
|
||||
@ok="handleEditOperateMonitorOk"
|
||||
>
|
||||
<a-form ref="editMonitorForm" :rules="rules" :model="temp" :label-col="{ span: 5 }" :wrapper-col="{ span: 17 }">
|
||||
<a-form-item label="监控名称" name="name">
|
||||
<a-input v-model:value="temp.name" :max-length="50" placeholder="监控名称" />
|
||||
<a-form-item :label="$tl('c.monitorName')" name="name">
|
||||
<a-input v-model:value="temp.name" :max-length="50" :placeholder="$tl('c.monitorName')" />
|
||||
</a-form-item>
|
||||
<a-form-item label="开启状态" name="status">
|
||||
<a-switch v-model:checked="temp.start" checked-children="开" un-checked-children="关" />
|
||||
<a-form-item :label="$tl('c.status')" name="status">
|
||||
<a-switch
|
||||
v-model:checked="temp.start"
|
||||
:checked-children="$tl('p.open')"
|
||||
:un-checked-children="$tl('p.close')"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="监控用户" name="monitorUser">
|
||||
<a-form-item :label="$tl('p.monitorUser')" name="monitorUser">
|
||||
<a-transfer
|
||||
:data-source="monitorUserList"
|
||||
:lazy="false"
|
||||
@ -76,7 +85,7 @@
|
||||
@change="handleMonitorUserChange"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="监控功能" name="monitorOpt">
|
||||
<a-form-item :label="$tl('p.monitorFunction')" name="monitorOpt">
|
||||
<a-transfer
|
||||
:data-source="classFeature"
|
||||
:lazy="false"
|
||||
@ -87,7 +96,7 @@
|
||||
@change="handleClassFeatureChange"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="监控操作" name="monitorOpt">
|
||||
<a-form-item :label="$tl('p.monitorOperation')" name="monitorOpt">
|
||||
<a-transfer
|
||||
:data-source="methodFeature"
|
||||
:lazy="false"
|
||||
@ -101,10 +110,8 @@
|
||||
<a-form-item name="notifyUser" class="jpom-monitor-notify">
|
||||
<template #label>
|
||||
<a-tooltip>
|
||||
报警联系人
|
||||
<template #title>
|
||||
如果这里的报警联系人无法选择,说明这里面的管理员没有设置邮箱,在右上角下拉菜单里面的用户资料里可以设置。
|
||||
</template>
|
||||
{{ $tl('p.alarmContact') }}
|
||||
<template #title> {{ $tl('p.noEmailSet') }} </template>
|
||||
<QuestionCircleOutlined v-show="!temp.id" />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
@ -152,19 +159,19 @@ export default {
|
||||
editOperateMonitorVisible: false,
|
||||
columns: [
|
||||
{
|
||||
title: '名称',
|
||||
title: this.$tl('p.name'),
|
||||
dataIndex: 'name'
|
||||
},
|
||||
{
|
||||
title: '开启状态',
|
||||
title: this.$tl('c.status'),
|
||||
dataIndex: 'status'
|
||||
},
|
||||
{
|
||||
title: '修改人',
|
||||
title: this.$tl('p.modifier'),
|
||||
dataIndex: 'modifyUser'
|
||||
},
|
||||
{
|
||||
title: '修改时间',
|
||||
title: this.$tl('p.modifiedTime'),
|
||||
dataIndex: 'modifyTimeMillis',
|
||||
sorter: true,
|
||||
customRender: ({ text }) => {
|
||||
@ -176,7 +183,7 @@ export default {
|
||||
width: 180
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: this.$tl('p.operation'),
|
||||
dataIndex: 'operation',
|
||||
align: 'center',
|
||||
fixed: 'right',
|
||||
@ -187,7 +194,7 @@ export default {
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入监控名称',
|
||||
message: this.$tl('p.pleaseInputMonitorName'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
@ -206,6 +213,9 @@ export default {
|
||||
this.loadOptTypeData()
|
||||
},
|
||||
methods: {
|
||||
$tl(key, ...args) {
|
||||
return this.$t(`pages..monitor.operateLog.${key}`, ...args)
|
||||
},
|
||||
// 加载数据
|
||||
loadData(pointerEvent) {
|
||||
this.loading = true
|
||||
@ -302,25 +312,25 @@ export default {
|
||||
this.$refs['editMonitorForm'].validate().then(() => {
|
||||
if (this.monitorUserKeys.length === 0) {
|
||||
$notification.error({
|
||||
message: '请选择监控用户'
|
||||
message: this.$tl('p.pleaseSelectMonitorUser')
|
||||
})
|
||||
return false
|
||||
}
|
||||
if (this.methodFeatureKeys.length === 0) {
|
||||
$notification.error({
|
||||
message: '请选择监控操作'
|
||||
message: this.$tl('p.pleaseSelectMonitorOperation')
|
||||
})
|
||||
return false
|
||||
}
|
||||
if (this.classFeatureKeys.length === 0) {
|
||||
$notification.error({
|
||||
message: '请选择监控的功能'
|
||||
message: this.$tl('p.pleaseSelectMonitorFunction')
|
||||
})
|
||||
return false
|
||||
}
|
||||
if (this.notifyUserKeys.length === 0) {
|
||||
$notification.error({
|
||||
message: '请选择报警联系人'
|
||||
message: this.$tl('p.pleaseSelectAlarmContact')
|
||||
})
|
||||
return false
|
||||
}
|
||||
@ -351,11 +361,11 @@ export default {
|
||||
// 删除
|
||||
handleDelete(record) {
|
||||
$confirm({
|
||||
title: '系统提示',
|
||||
title: this.$tl('p.systemPrompt'),
|
||||
zIndex: 1009,
|
||||
content: '真的要删除操作监控么?',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
content: this.$tl('p.confirmDelete'),
|
||||
okText: this.$tl('p.confirm'),
|
||||
cancelText: this.$tl('p.cancel'),
|
||||
onOk: () => {
|
||||
return deleteMonitorOperate(record.id).then((res) => {
|
||||
if (res.code === 200) {
|
||||
|
@ -26,7 +26,7 @@ import postcss from 'postcss'
|
||||
export default defineConfig(({ mode }: ConfigEnv) => {
|
||||
// 加载环境配置
|
||||
const env: Record<string, string> = loadEnv(mode, __dirname, 'JPOM')
|
||||
const { JPOM_PROXY_HOST: HOST, JPOM_BASE_URL, JPOM_PORT }: Record<string, string> = env
|
||||
const { JPOM_PROXY_HOST: HOST = '', JPOM_BASE_URL = '', JPOM_PORT = '' }: Record<string, string> = env
|
||||
console.log(env, `当前为${mode}环境`)
|
||||
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user