diff --git a/amoro-ams/amoro-ams-dashboard/mock/modules/optimize.js b/amoro-ams/amoro-ams-dashboard/mock/modules/optimize.js index a88afb394d..81207ee18e 100644 --- a/amoro-ams/amoro-ams-dashboard/mock/modules/optimize.js +++ b/amoro-ams/amoro-ams-dashboard/mock/modules/optimize.js @@ -75,11 +75,6 @@ export default [ } }), }, - { - url: '/mock/ams/v1/optimize/optimizerGroups/all/optimizers', - method: 'get', - response: () => ({ "message": "success", "code": 200, "result": { "list": [], "total": 0 } }), - }, { url: '/mock/ams/v1/optimize/optimizerGroups/local/optimizers', method: 'post', @@ -160,6 +155,28 @@ export default [ "result": "The optimizer group has been successfully deleted." }), }, - - + { + url: '/mock/ams/v1/optimize/optimizerGroups/all/optimizers', + method: 'get', + response: () => ({ + "message": "success", + "code": 200, + "result": { + "list": [ + { + "token": "183c4ce4-a006-4d18-b8b3-4f9bee3e7527", + "startTime": 1715862320085, + "touchTime": 1715862530475, + "jobId": null, + "groupName": "local", + "coreNumber": 1, + "memory": 8192, + "jobStatus": "RUNNING", + "container": "localContainer" + } + ], + "total": 1 + } + }), + }, ] diff --git a/amoro-ams/amoro-ams-dashboard/mock/modules/table.js b/amoro-ams/amoro-ams-dashboard/mock/modules/table.js index c58f9eba84..0e94541caf 100644 --- a/amoro-ams/amoro-ams-dashboard/mock/modules/table.js +++ b/amoro-ams/amoro-ams-dashboard/mock/modules/table.js @@ -190,13 +190,134 @@ export default [ }), }, { - url: '/mock/ams/v1/tables/catalogs/test_catalog/dbs/db/tables/user/optimizing-processes', + url: '/mock/ams/v1/tables/catalogs/test_catalog/dbs/db/tables/user/operations', method: 'get', response: () => ({ "message": "success", "code": 200, "result": { "list": [], "total": 0 } }), }, + { + url: '/mock/ams/v1/tables/catalogs/test_catalog/dbs/db/tables/user/partitions/:filter/files', + method: 'get', + response: () => ({ + "message": "success", + "code": 200, + "result": { + "list": [ + { + "commitId": "3015968602476930240", + "fileType": "BASE_FILE", + "commitTime": 1715861982880, + "size": "883.00B", + "partition": "ts_day=2022-07-01", + "specId": 0, + "path": "/tmp/local_iceberg/db/user/data/ts_day=2022-07-01/00042-1-179d061d-6fe9-4945-b6a6-f8c088595412-00001.parquet", + "file": "00042-1-179d061d-6fe9-4945-b6a6-f8c088595412-00001.parquet", + "fileSize": 883, + "operation": null + } + ], + "total": 1 + } + }), + }, + { + url: '/mock/ams/v1/tables/catalogs/test_catalog/dbs/db/tables/user/snapshots/:snapshotId/detail', + method: 'get', + response: () => ({ + "message": "success", + "code": 200, + "result": { + "list": [ + { + "commitId": "3015968602476930240", + "fileType": "BASE_FILE", + "commitTime": 1715861982880, + "size": "883.00B", + "partition": "ts_day=2022-07-01", + "specId": 0, + "path": "/tmp/local_iceberg/db/user/data/ts_day=2022-07-01/00042-1-179d061d-6fe9-4945-b6a6-f8c088595412-00001.parquet", + "file": "00042-1-179d061d-6fe9-4945-b6a6-f8c088595412-00001.parquet", + "fileSize": 883, + "operation": "add" + }, + { + "commitId": "3015968602476930240", + "fileType": "BASE_FILE", + "commitTime": 1715861982880, + "size": "891.00B", + "partition": "ts_day=2022-07-02", + "specId": 0, + "path": "/tmp/local_iceberg/db/user/data/ts_day=2022-07-02/00082-2-179d061d-6fe9-4945-b6a6-f8c088595412-00001.parquet", + "file": "00082-2-179d061d-6fe9-4945-b6a6-f8c088595412-00001.parquet", + "fileSize": 891, + "operation": "add" + } + ], + "total": 2 + } + }), + }, + { + url: '/mock/ams/v1/tables/catalogs/test_catalog/dbs/db/tables/user/optimizing-processes', + method: 'get', + response: () => ({ + "message": "success", + "code": 200, + "result": { + "list": [ + { + "tableId": 1, + "catalogName": "local_iceberg", + "dbName": "db", + "tableName": "user", + "processId": 1715862413340, + "startTime": 1715862413340, + "optimizingType": "MINOR", + "status": "SUCCESS", + "failReason": null, + "duration": 1531, + "successTasks": 2, + "totalTasks": 2, + "runningTasks": 0, + "finishTime": 1715862414871, + "inputFiles": { + "fileCnt": 16, + "totalSize": 14192, + "averageSize": 887 + }, + "outputFiles": { + "fileCnt": 2, + "totalSize": 2064, + "averageSize": 1032 + }, + "summary": { + "input-data-files(rewrite)": "16", + "input-data-size(rewrite)": "13.86KB", + "input-data-records(rewrite)": "24", + "output-data-files": "2", + "output-data-size": "2.02KB", + "output-data-records": "24" + } + } + ], + "total": 1 + } + }), + }, { url: '/mock/ams/v1/tables/catalogs/test_catalog/dbs/db/tables/user/operations', method: 'get', - response: () => ({ "message": "success", "code": 200, "result": { "list": [], "total": 0 } }), + response: () => ({ + "message": "success", + "code": 200, + "result": { + "list": [ + { + "ts": 1715862487163, + "operation": "ALTER TABLE user ADD COLUMNS (age bigint)" + } + ], + "total": 1 + } + }), }, ] diff --git a/amoro-ams/amoro-ams-dashboard/src/language/en.ts b/amoro-ams/amoro-ams-dashboard/src/language/en.ts index 2596f09317..790f57525e 100644 --- a/amoro-ams/amoro-ams-dashboard/src/language/en.ts +++ b/amoro-ams/amoro-ams-dashboard/src/language/en.ts @@ -34,6 +34,7 @@ export default { logout: 'Logout', logoutModalTitle: 'Log out of the ams?', order: 'Order', + token: 'Token', cluster: 'Cluster', database: 'Database | Databases', table: 'Table | Tables', @@ -83,6 +84,7 @@ export default { fileContent: 'File Content', startTime: 'Start Time', finishTime: 'Finish Time', + touchTime: 'Touch Time', duration: 'Duration', optimizeType: 'Optimize Type', parallelism: 'Parallelism', @@ -94,6 +96,7 @@ export default { operationDetails: 'Operation Details', copy: 'Copy', optimizer: 'Optimizer', + optimizerId: 'Optimizer Id', optimizers: 'Optimizers', container: 'Container', status: 'Status', diff --git a/amoro-ams/amoro-ams-dashboard/src/types/common.type.ts b/amoro-ams/amoro-ams-dashboard/src/types/common.type.ts index 33d109073f..adc2a5f568 100644 --- a/amoro-ams/amoro-ams-dashboard/src/types/common.type.ts +++ b/amoro-ams/amoro-ams-dashboard/src/types/common.type.ts @@ -260,6 +260,8 @@ export interface IIOptimizeGroupItem { } export interface IOptimizeResourceTableItem { + touchTime: string; + startTime: string; index: number jobId: number jobStatus: string diff --git a/amoro-ams/amoro-ams-dashboard/src/views/resource/components/List.vue b/amoro-ams/amoro-ams-dashboard/src/views/resource/components/List.vue index 523da332c5..4c7f17a48d 100644 --- a/amoro-ams/amoro-ams-dashboard/src/views/resource/components/List.vue +++ b/amoro-ams/amoro-ams-dashboard/src/views/resource/components/List.vue @@ -1,4 +1,3 @@ -