From 76c9ba6170c666f70bdf13ebd7babdfa54f3f36f Mon Sep 17 00:00:00 2001 From: LiuGuoHua Date: Tue, 6 Feb 2024 09:59:01 +0800 Subject: [PATCH 01/13] Add new features to the Kanban view --- .../jobhistory/dao/JobHistoryMapper.java | 6 ++ .../jobhistory/dao/JobStatisticsMapper.java | 33 ++++++++ .../jobhistory/entity/JobStatistics.java | 76 +++++++++++++++++++ .../mapper/common/JobStatisticsMapper.xml | 53 +++++++++++++ .../mapper/mysql/JobHistoryMapper.xml | 10 +++ .../mapper/postgresql/JobHistoryMapper.xml | 10 +++ .../service/JobHistoryQueryService.java | 2 + .../service/JobStatisticsQueryService.java | 30 ++++++++ .../impl/JobHistoryQueryServiceImpl.scala | 3 + .../impl/JobStatisticsQueryServiceImpl.scala | 50 ++++++++++++ 10 files changed, 273 insertions(+) create mode 100644 linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/dao/JobStatisticsMapper.java create mode 100644 linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/entity/JobStatistics.java create mode 100644 linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/common/JobStatisticsMapper.xml create mode 100644 linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/JobStatisticsQueryService.java create mode 100644 linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobStatisticsQueryServiceImpl.scala diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/dao/JobHistoryMapper.java b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/dao/JobHistoryMapper.java index 300d00b989..83e30aaec7 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/dao/JobHistoryMapper.java +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/dao/JobHistoryMapper.java @@ -130,4 +130,10 @@ List selectFailoverJobHistory( @Param("statusList") List statusList, @Param("startTimestamp") Long startTimestamp, @Param("limit") Integer limit); + + List taskDurationTopN( + @Param("startDate") Date startDate, + @Param("endDate") Date endDate, + @Param("umUser") String username, + @Param("engineType") String engineType); } diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/dao/JobStatisticsMapper.java b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/dao/JobStatisticsMapper.java new file mode 100644 index 0000000000..5e1d7a6b7e --- /dev/null +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/dao/JobStatisticsMapper.java @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.linkis.jobhistory.dao; + +import org.apache.linkis.jobhistory.entity.JobStatistics; + +import org.apache.ibatis.annotations.Param; + +import java.util.Date; + +public interface JobStatisticsMapper { + + JobStatistics taskExecutionStatistics( + @Param("startDate") Date startDate, @Param("endDate") Date endDate); + + JobStatistics engineExecutionStatistics( + @Param("startDate") Date startDate, @Param("endDate") Date endDate); +} diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/entity/JobStatistics.java b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/entity/JobStatistics.java new file mode 100644 index 0000000000..23621708f5 --- /dev/null +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/entity/JobStatistics.java @@ -0,0 +1,76 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.linkis.jobhistory.entity; + +public class JobStatistics { + + private Long id; + + private Integer sumCount; + + private Integer succeedCount; + + private Integer failedCount; + + private Integer cancelledCount; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Integer getSumCount() { + return sumCount; + } + + public void setSumCount(Integer sumCount) { + this.sumCount = sumCount; + } + + public Integer getSucceedCount() { + return succeedCount; + } + + public void setSucceedCount(Integer succeedCount) { + this.succeedCount = succeedCount; + } + + public Integer getFailedCount() { + return failedCount; + } + + public void setFailedCount(Integer failedCount) { + this.failedCount = failedCount; + } + + public Integer getCancelledCount() { + return cancelledCount; + } + + public void setCancelledCount(Integer cancelledCount) { + this.cancelledCount = cancelledCount; + } + + @Override + public String toString() { + return "JobHistory{" + "id=" + id + '}'; + } +} diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/common/JobStatisticsMapper.xml b/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/common/JobStatisticsMapper.xml new file mode 100644 index 0000000000..b4b2a8ff3e --- /dev/null +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/common/JobStatisticsMapper.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/mysql/JobHistoryMapper.xml b/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/mysql/JobHistoryMapper.xml index a5b769f2d3..2751ea790d 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/mysql/JobHistoryMapper.xml +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/mysql/JobHistoryMapper.xml @@ -252,4 +252,14 @@ + + diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/postgresql/JobHistoryMapper.xml b/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/postgresql/JobHistoryMapper.xml index f7e75dea0e..8430134a31 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/postgresql/JobHistoryMapper.xml +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/postgresql/JobHistoryMapper.xml @@ -251,4 +251,14 @@ LIMIT #{limit} + + diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/JobHistoryQueryService.java b/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/JobHistoryQueryService.java index b8731554d4..c8b5a6c617 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/JobHistoryQueryService.java +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/JobHistoryQueryService.java @@ -53,4 +53,6 @@ public interface JobHistoryQueryService { void changeObserveInfoById(JobHistory jobHistory); void clearUndoneTasksByEntranceInstance(EntranceInstanceConfRequest request, Sender sender); + + List taskDurationTopN(Date sDate, Date eDate , String username,String engineType); } diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/JobStatisticsQueryService.java b/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/JobStatisticsQueryService.java new file mode 100644 index 0000000000..e6119ed651 --- /dev/null +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/JobStatisticsQueryService.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.linkis.jobhistory.service; + +import org.apache.linkis.jobhistory.entity.JobStatistics; + +import java.util.Date; + + +public interface JobStatisticsQueryService { + + JobStatistics taskExecutionStatistics(Date startDate, Date endDate); + + JobStatistics engineExecutionStatistics(Date startDate, Date endDate); +} diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobHistoryQueryServiceImpl.scala b/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobHistoryQueryServiceImpl.scala index 5c49be89b7..0f16350941 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobHistoryQueryServiceImpl.scala +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobHistoryQueryServiceImpl.scala @@ -486,4 +486,7 @@ class JobHistoryQueryServiceImpl extends JobHistoryQueryService with Logging { } } + override def taskDurationTopN(sDate: Date, eDate: Date, username: String, engineType: String): util.List[JobHistory] = { + jobHistoryMapper.taskDurationTopN(sDate, eDate, username, engineType) + } } diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobStatisticsQueryServiceImpl.scala b/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobStatisticsQueryServiceImpl.scala new file mode 100644 index 0000000000..bcb1d8763e --- /dev/null +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobStatisticsQueryServiceImpl.scala @@ -0,0 +1,50 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.linkis.jobhistory.service.impl + +import org.apache.linkis.common.utils.Logging +import org.apache.linkis.jobhistory.dao.JobStatisticsMapper +import org.apache.linkis.jobhistory.entity.JobStatistics +import org.apache.linkis.jobhistory.service.JobStatisticsQueryService + +import org.springframework.beans.factory.annotation.Autowired +import org.springframework.stereotype.Service + +import java.util.Date + +@Service +class JobStatisticsQueryServiceImpl extends JobStatisticsQueryService with Logging { + + @Autowired + private var jobStatisticsMapper: JobStatisticsMapper = _ + + override def taskExecutionStatistics(sDate: Date, eDate: Date): JobStatistics = { + val count = { + jobStatisticsMapper.taskExecutionStatistics(sDate, eDate) + } + count + } + + override def engineExecutionStatistics(sDate: Date, eDate: Date): JobStatistics = { + val count = { + jobStatisticsMapper.engineExecutionStatistics(sDate, eDate) + } + count + } + +} From d479f5a6dedacbcce2280909ce1b7cdfc9ffc115 Mon Sep 17 00:00:00 2001 From: LiuGuoHua Date: Tue, 6 Feb 2024 10:33:19 +0800 Subject: [PATCH 02/13] Add new features to the Kanban view --- .../restful/api/QueryRestfulApi.java | 75 +++++++++++++++ .../restful/api/StatisticsRestfulApi.java | 96 +++++++++++++++++++ 2 files changed, 171 insertions(+) create mode 100644 linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/StatisticsRestfulApi.java diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/QueryRestfulApi.java b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/QueryRestfulApi.java index a18da3a042..5266a489a1 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/QueryRestfulApi.java +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/QueryRestfulApi.java @@ -412,4 +412,79 @@ public Message listundone( return Message.ok().data(JobRequestConstants.TOTAL_PAGE(), total); } + + /** Method list should not contain subjob, which may cause performance problems. */ + @ApiOperation(value = "listDurationTop", notes = "listDurationTop", response = Message.class) + @ApiImplicitParams({ + @ApiImplicitParam(name = "startDate", dataType = "long", example = "1658937600001"), + @ApiImplicitParam(name = "endDate", dataType = "long", example = "1658937600000"), + @ApiImplicitParam(name = "executeApplicationName", dataType = "String"), + @ApiImplicitParam(name = "creator", required = false, dataType = "String", value = "creator"), + @ApiImplicitParam(name = "pageNow", required = false, dataType = "Integer", value = "page now"), + @ApiImplicitParam(name = "pageSize", dataType = "Integer"), + }) + @RequestMapping(path = "/listDurationTop", method = RequestMethod.GET) + public Message listTop( + HttpServletRequest req, + @RequestParam(value = "startDate", required = false) Long startDate, + @RequestParam(value = "endDate", required = false) Long endDate, + @RequestParam(value = "executeApplicationName", required = false) + String executeApplicationName, + @RequestParam(value = "creator", required = false) String creator, + @RequestParam(value = "pageNow", required = false) Integer pageNow, + @RequestParam(value = "pageSize", required = false) Integer pageSize) + throws QueryException { + if (StringUtils.isEmpty(pageNow)) { + pageNow = 1; + } + if (StringUtils.isEmpty(pageSize)) { + pageSize = 20; + } + if (StringUtils.isEmpty(creator)) { + creator = null; + } else { + if (!QueryUtils.checkNameValid(creator)) { + return Message.error("Invalid creator : " + creator); + } + } + if (!StringUtils.isEmpty(executeApplicationName)) { + if (!QueryUtils.checkNameValid(executeApplicationName)) { + return Message.error("Invalid applicationName : " + executeApplicationName); + } + } else { + executeApplicationName = null; + } + + if (endDate == null) { + endDate = System.currentTimeMillis(); + } + if (startDate == null) { + startDate = 0L; + } + + Date sDate = new Date(startDate); + Date eDate = new Date(endDate); + if (sDate.getTime() == eDate.getTime()) { + Calendar calendar = Calendar.getInstance(); + calendar.setTimeInMillis(endDate); + calendar.add(Calendar.DAY_OF_MONTH, 1); + eDate = new Date(calendar.getTime().getTime()); // todo check + } + List queryTasks = null; + PageHelper.startPage(pageNow, pageSize); + try { + queryTasks = + jobHistoryQueryService.taskDurationTopN(sDate, eDate, creator, executeApplicationName); + } finally { + PageHelper.clearPage(); + } + + List vos = new ArrayList<>(); + for (JobHistory jobHistory : queryTasks) { + QueryUtils.exchangeExecutionCode(jobHistory); + QueryTaskVO taskVO = TaskConversions.jobHistory2TaskVO(jobHistory, null); + vos.add(taskVO); + } + return Message.ok().data(TaskConstant.TASKS, vos); + } } diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/StatisticsRestfulApi.java b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/StatisticsRestfulApi.java new file mode 100644 index 0000000000..cd35d06097 --- /dev/null +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/StatisticsRestfulApi.java @@ -0,0 +1,96 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.linkis.jobhistory.restful.api; + +import org.apache.linkis.governance.common.entity.job.QueryException; +import org.apache.linkis.jobhistory.entity.JobStatistics; +import org.apache.linkis.jobhistory.service.JobStatisticsQueryService; +import org.apache.linkis.server.Message; +import org.apache.linkis.server.security.SecurityFilter; + +import org.apache.commons.lang3.time.DateUtils; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletRequest; + +import java.io.IOException; +import java.util.Calendar; +import java.util.Date; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@Api(tags = "query api") +@RestController +@RequestMapping(path = "/jobhistory/jobstatistics") +public class StatisticsRestfulApi { + + private Logger log = LoggerFactory.getLogger(this.getClass()); + + @Autowired private JobStatisticsQueryService jobStatisticsQueryService; + + @ApiOperation(value = "count", notes = "count", response = Message.class) + @ApiImplicitParams({ + @ApiImplicitParam(name = "startDate", dataType = "long"), + @ApiImplicitParam(name = "endDate", required = false, dataType = "long", value = "end date"), + }) + /** Method list should not contain subjob, which may cause performance problems. */ + @RequestMapping(path = "/count", method = RequestMethod.GET) + public Message count( + HttpServletRequest req, + @RequestParam(value = "startDate", required = false) Long startDate, + @RequestParam(value = "endDate", required = false) Long endDate) + throws QueryException { + if (endDate == null) { + endDate = System.currentTimeMillis(); + } + if (startDate == null) { + startDate = 0L; + } + Date sDate = new Date(startDate); + Date eDate = new Date(endDate); + if (startDate == 0L) { + sDate = DateUtils.addDays(eDate, -1); + } + if (sDate.getTime() == eDate.getTime()) { + Calendar instance = Calendar.getInstance(); + instance.setTimeInMillis(endDate); + instance.add(Calendar.DAY_OF_MONTH, 1); + eDate = new Date(instance.getTime().getTime()); + } + JobStatistics jobStatistics = jobStatisticsQueryService.taskExecutionStatistics(sDate, eDate); + JobStatistics engineStatistics = + jobStatisticsQueryService.engineExecutionStatistics(sDate, eDate); + + return Message.ok() + .data("sumCount", jobStatistics.getSumCount()) + .data("succeedCount", jobStatistics.getSucceedCount()) + .data("failedCount", jobStatistics.getFailedCount()) + .data("cancelledCount", jobStatistics.getCancelledCount()) + .data("countEngine", engineStatistics.getSumCount()) + .data("countEngineSucceed", engineStatistics.getSucceedCount()) + .data("countEngineFailed", engineStatistics.getFailedCount()) + .data("countEngineShutting", engineStatistics.getCancelledCount()); + } +} From 6dbd78f1fdc6854d27c3d119515c31850b3b18ce Mon Sep 17 00:00:00 2001 From: LiuGuoHua Date: Tue, 6 Feb 2024 15:55:32 +0800 Subject: [PATCH 03/13] Add query parameters to the interface --- .../jobhistory/dao/JobStatisticsMapper.java | 10 +- .../restful/api/QueryRestfulApi.java | 2 +- .../restful/api/StatisticsRestfulApi.java | 163 +++++++++++++----- .../mapper/common/JobStatisticsMapper.xml | 12 +- .../service/JobStatisticsQueryService.java | 4 +- .../impl/JobStatisticsQueryServiceImpl.scala | 18 +- 6 files changed, 149 insertions(+), 60 deletions(-) diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/dao/JobStatisticsMapper.java b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/dao/JobStatisticsMapper.java index 5e1d7a6b7e..836376bb84 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/dao/JobStatisticsMapper.java +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/dao/JobStatisticsMapper.java @@ -26,8 +26,14 @@ public interface JobStatisticsMapper { JobStatistics taskExecutionStatistics( - @Param("startDate") Date startDate, @Param("endDate") Date endDate); + @Param("startDate") Date startDate, + @Param("endDate") Date endDate, + @Param("umUser") String username, + @Param("engineType") String engineType); JobStatistics engineExecutionStatistics( - @Param("startDate") Date startDate, @Param("endDate") Date endDate); + @Param("startDate") Date startDate, + @Param("endDate") Date endDate, + @Param("umUser") String username, + @Param("engineType") String engineType); } diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/QueryRestfulApi.java b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/QueryRestfulApi.java index 5266a489a1..302f9f0368 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/QueryRestfulApi.java +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/QueryRestfulApi.java @@ -424,7 +424,7 @@ public Message listundone( @ApiImplicitParam(name = "pageSize", dataType = "Integer"), }) @RequestMapping(path = "/listDurationTop", method = RequestMethod.GET) - public Message listTop( + public Message listDurationTop( HttpServletRequest req, @RequestParam(value = "startDate", required = false) Long startDate, @RequestParam(value = "endDate", required = false) Long endDate, diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/StatisticsRestfulApi.java b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/StatisticsRestfulApi.java index cd35d06097..17849b0712 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/StatisticsRestfulApi.java +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/StatisticsRestfulApi.java @@ -20,12 +20,13 @@ import org.apache.linkis.governance.common.entity.job.QueryException; import org.apache.linkis.jobhistory.entity.JobStatistics; import org.apache.linkis.jobhistory.service.JobStatisticsQueryService; +import org.apache.linkis.jobhistory.util.QueryUtils; import org.apache.linkis.server.Message; -import org.apache.linkis.server.security.SecurityFilter; import org.apache.commons.lang3.time.DateUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; @@ -41,56 +42,128 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -@Api(tags = "query api") +@Api(tags = "jobstatistics api") @RestController @RequestMapping(path = "/jobhistory/jobstatistics") public class StatisticsRestfulApi { - private Logger log = LoggerFactory.getLogger(this.getClass()); + private Logger log = LoggerFactory.getLogger(this.getClass()); - @Autowired private JobStatisticsQueryService jobStatisticsQueryService; + @Autowired private JobStatisticsQueryService jobStatisticsQueryService; - @ApiOperation(value = "count", notes = "count", response = Message.class) - @ApiImplicitParams({ - @ApiImplicitParam(name = "startDate", dataType = "long"), - @ApiImplicitParam(name = "endDate", required = false, dataType = "long", value = "end date"), - }) - /** Method list should not contain subjob, which may cause performance problems. */ - @RequestMapping(path = "/count", method = RequestMethod.GET) - public Message count( - HttpServletRequest req, - @RequestParam(value = "startDate", required = false) Long startDate, - @RequestParam(value = "endDate", required = false) Long endDate) - throws QueryException { - if (endDate == null) { - endDate = System.currentTimeMillis(); - } - if (startDate == null) { - startDate = 0L; - } - Date sDate = new Date(startDate); - Date eDate = new Date(endDate); - if (startDate == 0L) { - sDate = DateUtils.addDays(eDate, -1); - } - if (sDate.getTime() == eDate.getTime()) { - Calendar instance = Calendar.getInstance(); - instance.setTimeInMillis(endDate); - instance.add(Calendar.DAY_OF_MONTH, 1); - eDate = new Date(instance.getTime().getTime()); + @ApiOperation(value = "taskCount", notes = "taskCount", response = Message.class) + @ApiImplicitParams({ + @ApiImplicitParam(name = "startDate", dataType = "long"), + @ApiImplicitParam(name = "endDate", required = false, dataType = "long", value = "end date"), + @ApiImplicitParam(name = "executeApplicationName", dataType = "String"), + @ApiImplicitParam(name = "creator", required = false, dataType = "String", value = "creator"), + }) + @RequestMapping(path = "/taskCount", method = RequestMethod.GET) + public Message taskCount( + HttpServletRequest req, + @RequestParam(value = "startDate", required = false) Long startDate, + @RequestParam(value = "endDate", required = false) Long endDate, + @RequestParam(value = "executeApplicationName", required = false) + String executeApplicationName, + @RequestParam(value = "creator", required = false) String creator) + throws IOException, QueryException { + if (endDate == null) { + endDate = System.currentTimeMillis(); + } + if (startDate == null) { + startDate = 0L; + } + Date sDate = new Date(startDate); + Date eDate = new Date(endDate); + if (startDate == 0L) { + sDate = DateUtils.addDays(eDate, -1); + } + if (sDate.getTime() == eDate.getTime()) { + Calendar instance = Calendar.getInstance(); + instance.setTimeInMillis(endDate); + instance.add(Calendar.DAY_OF_MONTH, 1); + eDate = new Date(instance.getTime().getTime()); + } + if (StringUtils.isEmpty(creator)) { + creator = null; + } else { + if (!QueryUtils.checkNameValid(creator)) { + return Message.error("Invalid creator : " + creator); + } + } + if (!StringUtils.isEmpty(executeApplicationName)) { + if (!QueryUtils.checkNameValid(executeApplicationName)) { + return Message.error("Invalid applicationName : " + executeApplicationName); + } + } else { + executeApplicationName = null; + } + JobStatistics jobStatistics = + jobStatisticsQueryService.taskExecutionStatistics( + sDate, eDate, creator, executeApplicationName); + + return Message.ok() + .data("sumCount", jobStatistics.getSumCount()) + .data("succeedCount", jobStatistics.getSucceedCount()) + .data("failedCount", jobStatistics.getFailedCount()) + .data("cancelledCount", jobStatistics.getCancelledCount()); } - JobStatistics jobStatistics = jobStatisticsQueryService.taskExecutionStatistics(sDate, eDate); - JobStatistics engineStatistics = - jobStatisticsQueryService.engineExecutionStatistics(sDate, eDate); - return Message.ok() - .data("sumCount", jobStatistics.getSumCount()) - .data("succeedCount", jobStatistics.getSucceedCount()) - .data("failedCount", jobStatistics.getFailedCount()) - .data("cancelledCount", jobStatistics.getCancelledCount()) - .data("countEngine", engineStatistics.getSumCount()) - .data("countEngineSucceed", engineStatistics.getSucceedCount()) - .data("countEngineFailed", engineStatistics.getFailedCount()) - .data("countEngineShutting", engineStatistics.getCancelledCount()); - } + @ApiOperation(value = "engineCount", notes = "engineCount", response = Message.class) + @ApiImplicitParams({ + @ApiImplicitParam(name = "startDate", dataType = "long"), + @ApiImplicitParam(name = "endDate", required = false, dataType = "long", value = "end date"), + @ApiImplicitParam(name = "executeApplicationName", dataType = "String"), + @ApiImplicitParam(name = "creator", required = false, dataType = "String", value = "creator"), + }) + @RequestMapping(path = "/engineCount", method = RequestMethod.GET) + public Message engineCount( + HttpServletRequest req, + @RequestParam(value = "startDate", required = false) Long startDate, + @RequestParam(value = "endDate", required = false) Long endDate, + @RequestParam(value = "executeApplicationName", required = false) + String executeApplicationName, + @RequestParam(value = "creator", required = false) String creator) + throws IOException, QueryException { + if (endDate == null) { + endDate = System.currentTimeMillis(); + } + if (startDate == null) { + startDate = 0L; + } + Date sDate = new Date(startDate); + Date eDate = new Date(endDate); + if (startDate == 0L) { + sDate = DateUtils.addDays(eDate, -1); + } + if (sDate.getTime() == eDate.getTime()) { + Calendar instance = Calendar.getInstance(); + instance.setTimeInMillis(endDate); + instance.add(Calendar.DAY_OF_MONTH, 1); + eDate = new Date(instance.getTime().getTime()); + } + if (StringUtils.isEmpty(creator)) { + creator = null; + } else { + if (!QueryUtils.checkNameValid(creator)) { + return Message.error("Invalid creator : " + creator); + } + } + if (!StringUtils.isEmpty(executeApplicationName)) { + if (!QueryUtils.checkNameValid(executeApplicationName)) { + return Message.error("Invalid applicationName : " + executeApplicationName); + } + } else { + executeApplicationName = null; + } + JobStatistics jobStatistics = + jobStatisticsQueryService.engineExecutionStatistics( + sDate, eDate, creator, executeApplicationName); + + return Message.ok() + .data("countEngine", jobStatistics.getSumCount()) + .data("countEngineSucceed", jobStatistics.getSucceedCount()) + .data("countEngineFailed", jobStatistics.getFailedCount()) + .data("countEngineShutting", jobStatistics.getCancelledCount()); + } } diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/common/JobStatisticsMapper.xml b/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/common/JobStatisticsMapper.xml index b4b2a8ff3e..4d6620951e 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/common/JobStatisticsMapper.xml +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/common/JobStatisticsMapper.xml @@ -31,9 +31,9 @@ - diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/mysql/JobHistoryMapper.xml b/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/mysql/JobHistoryMapper.xml index 2751ea790d..6644f6b54b 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/mysql/JobHistoryMapper.xml +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/mysql/JobHistoryMapper.xml @@ -64,7 +64,7 @@ - SELECT * FROM linkis_ps_job_history_group_history id = #{id} @@ -170,11 +170,11 @@ SELECT a.* FROM linkis_ps_job_history_group_history a WHERE ( - a.instances = '' - OR a.instances IS NULL - OR a.instances NOT IN #{key} - OR EXISTS ( - SELECT 1 FROM - ( - - SELECT #{key} AS instances, #{val} AS registryTime - - ) b - WHERE a.instances = b.instances AND a.created_time FROM_UNIXTIME(b.registryTime/1000) - ) + a.instances = '' + OR a.instances IS NULL + OR a.instances NOT IN #{key} + OR EXISTS ( + SELECT 1 FROM + ( + + SELECT #{key} AS instances, #{val} AS registryTime + + ) b + WHERE a.instances = b.instances AND a.created_time FROM_UNIXTIME(b.registryTime/1000) + ) ) AND status IN #{status} @@ -259,7 +259,35 @@ and engine_type = #{engineType} and created_time >= #{startDate} AND created_time #{endDate} - ORDER BY FROM_UNIXTIME(TIMEDIFF(cast(updated_time as datetime), cast(created_time as datetime))) / 3600 desc + ORDER BY FROM_UNIXTIME(TIMEDIFF(cast(updated_time as datetime), cast(created_time as datetime))) desc + + + + + diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/mysql/JobStatisticsMapper.xml b/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/mysql/JobStatisticsMapper.xml new file mode 100644 index 0000000000..0a3cda9384 --- /dev/null +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/mysql/JobStatisticsMapper.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/postgresql/JobHistoryMapper.xml b/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/postgresql/JobHistoryMapper.xml index 8430134a31..444d729217 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/postgresql/JobHistoryMapper.xml +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/postgresql/JobHistoryMapper.xml @@ -172,11 +172,11 @@ SELECT a.* FROM linkis_ps_job_history_group_history a WHERE ( - a.instances = '' - OR a.instances IS NULL - OR a.instances NOT IN #{key} - OR EXISTS ( - SELECT 1 FROM - ( - - SELECT #{key} AS instances, #{val} AS registryTime - - ) b - WHERE a.instances = b.instances AND a.created_time FROM_UNIXTIME(b.registryTime/1000) - ) + a.instances = '' + OR a.instances IS NULL + OR a.instances NOT IN #{key} + OR EXISTS ( + SELECT 1 FROM + ( + + SELECT #{key} AS instances, #{val} AS registryTime + + ) b + WHERE a.instances = b.instances AND a.created_time FROM_UNIXTIME(b.registryTime/1000) + ) ) AND status IN #{status} @@ -259,6 +259,35 @@ and engine_type = #{engineType} and created_time >= #{startDate} AND created_time #{endDate} - ORDER BY EXTRACT(EPOCH FROM AGE(cast(updated_time as timestamp), cast(created_time as timestamp))) / 3600 desc + ORDER BY EXTRACT(EPOCH FROM AGE(cast(updated_time as timestamp), cast(created_time as timestamp))) desc + + + + + + diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/postgresql/JobStatisticsMapper.xml b/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/postgresql/JobStatisticsMapper.xml new file mode 100644 index 0000000000..7071139701 --- /dev/null +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/postgresql/JobStatisticsMapper.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/JobHistoryQueryService.java b/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/JobHistoryQueryService.java index c8b5a6c617..335ea7cdee 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/JobHistoryQueryService.java +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/JobHistoryQueryService.java @@ -5,16 +5,16 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ - + package org.apache.linkis.jobhistory.service; import org.apache.linkis.governance.common.entity.job.JobRequest; @@ -54,5 +54,5 @@ public interface JobHistoryQueryService { void clearUndoneTasksByEntranceInstance(EntranceInstanceConfRequest request, Sender sender); - List taskDurationTopN(Date sDate, Date eDate , String username,String engineType); + List taskDurationTopN(Date sDate, Date eDate, String username, String creator, String engineType); } diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/JobStatisticsQueryService.java b/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/JobStatisticsQueryService.java index 432e5e27ab..5d11b623ad 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/JobStatisticsQueryService.java +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/JobStatisticsQueryService.java @@ -5,16 +5,16 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ - + package org.apache.linkis.jobhistory.service; import org.apache.linkis.jobhistory.entity.JobStatistics; @@ -24,7 +24,7 @@ public interface JobStatisticsQueryService { - JobStatistics taskExecutionStatistics(Date startDate, Date endDate, String username,String engineType); + JobStatistics taskExecutionStatistics(Date startDate, Date endDate, String username, String creator, String engineType); - JobStatistics engineExecutionStatistics(Date startDate, Date endDate, String username,String engineType); + JobStatistics engineExecutionStatistics(Date startDate, Date endDate, String username, String creator, String engineType); } diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobHistoryQueryServiceImpl.scala b/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobHistoryQueryServiceImpl.scala index 0f16350941..0bdaace660 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobHistoryQueryServiceImpl.scala +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobHistoryQueryServiceImpl.scala @@ -486,7 +486,42 @@ class JobHistoryQueryServiceImpl extends JobHistoryQueryService with Logging { } } - override def taskDurationTopN(sDate: Date, eDate: Date, username: String, engineType: String): util.List[JobHistory] = { - jobHistoryMapper.taskDurationTopN(sDate, eDate, username, engineType) + override def taskDurationTopN(sDate: Date, eDate: Date, username: String, creator: String, engineType: String): util.List[JobHistory] = { + val result = if (StringUtils.isBlank(creator)) { + jobHistoryMapper.taskDurationTopN( + sDate, + eDate, + username, + engineType + ) + } else if (StringUtils.isBlank(username)) { + val fakeLabel = new UserCreatorLabel + jobHistoryMapper.taskDurationTopNWithCreatorOnly( + username, + fakeLabel.getLabelKey, + creator, + sDate, + eDate, + engineType + ) + } else { + val fakeLabel = new UserCreatorLabel + fakeLabel.setUser(username) + fakeLabel.setCreator(creator) + val userCreator = fakeLabel.getStringValue + Utils.tryCatch(fakeLabel.valueCheck(userCreator)) { t => + logger.info("input user or creator is not correct", t) + throw t + } + jobHistoryMapper.taskDurationTopNWithUserCreator( + username, + fakeLabel.getLabelKey, + userCreator, + sDate, + eDate, + engineType + ) + } + result } } diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobStatisticsQueryServiceImpl.scala b/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobStatisticsQueryServiceImpl.scala index 2182d830f6..a3bca1dd1a 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobStatisticsQueryServiceImpl.scala +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobStatisticsQueryServiceImpl.scala @@ -17,11 +17,12 @@ package org.apache.linkis.jobhistory.service.impl -import org.apache.linkis.common.utils.Logging +import org.apache.commons.lang3.StringUtils +import org.apache.linkis.common.utils.{Logging, Utils} import org.apache.linkis.jobhistory.dao.JobStatisticsMapper import org.apache.linkis.jobhistory.entity.JobStatistics import org.apache.linkis.jobhistory.service.JobStatisticsQueryService - +import org.apache.linkis.manager.label.entity.engine.UserCreatorLabel import org.springframework.beans.factory.annotation.Autowired import org.springframework.stereotype.Service @@ -37,24 +38,80 @@ class JobStatisticsQueryServiceImpl extends JobStatisticsQueryService with Loggi sDate: Date, eDate: Date, username: String, + creator: String, engineType: String ): JobStatistics = { - val count = { - jobStatisticsMapper.taskExecutionStatistics(sDate, eDate, username, engineType) + val result = if (StringUtils.isBlank(creator)) { + jobStatisticsMapper.taskExecutionStatistics( + username, + sDate, + eDate, + engineType + ) + } else if (StringUtils.isBlank(username)) { + val fakeLabel = new UserCreatorLabel + jobStatisticsMapper.taskExecutionStatisticsWithCreatorOnly( + username, + fakeLabel.getLabelKey, + creator, + sDate, + eDate, + engineType + ) + } else { + val fakeLabel = new UserCreatorLabel + fakeLabel.setUser(username) + fakeLabel.setCreator(creator) + val userCreator = fakeLabel.getStringValue + Utils.tryCatch(fakeLabel.valueCheck(userCreator)) { t => + logger.info("input user or creator is not correct", t) + throw t + } + jobStatisticsMapper.taskExecutionStatisticsWithUserCreator( + username, + fakeLabel.getLabelKey, + userCreator, + sDate, + eDate, + engineType + ) } - count + result } override def engineExecutionStatistics( sDate: Date, eDate: Date, username: String, + creator: String, engineType: String ): JobStatistics = { - val count = { - jobStatisticsMapper.engineExecutionStatistics(sDate, eDate, username, engineType) + val result = if (StringUtils.isBlank(username) || StringUtils.isBlank(creator)) { + jobStatisticsMapper.engineExecutionStatistics( + username, + creator, + sDate, + eDate, + engineType + ) + } else { + val fakeLabel = new UserCreatorLabel + fakeLabel.setUser(username) + fakeLabel.setCreator(creator) + val userCreator = fakeLabel.getStringValue + Utils.tryCatch(fakeLabel.valueCheck(userCreator)) { t => + logger.info("input user or creator is not correct", t) + throw t + } + jobStatisticsMapper.engineExecutionStatisticsWithUserCreator( + username, + userCreator, + sDate, + eDate, + engineType + ) } - count + result } } diff --git a/linkis-web/src/apps/linkis/i18n/common/en.json b/linkis-web/src/apps/linkis/i18n/common/en.json index 780b780ddc..ce5c0da805 100644 --- a/linkis-web/src/apps/linkis/i18n/common/en.json +++ b/linkis-web/src/apps/linkis/i18n/common/en.json @@ -90,6 +90,9 @@ "tenant": "Tenant", "inputTenant": "Please Input Tenant", "globalSettings": "GlobalSettings", + "taskOverTimeTop": "TaskDuration-TOP", + "taskTotalNum": "TaskTotalNum", + "engineTotalNum":"engineTotalNum", "resultSet": { "prefixText": "Because your result set is large, for a better experience, ", "linkText": "View result set", @@ -107,7 +110,7 @@ "resourceManagement": { "resourceUsage": "Resource usage", "applicationList": "Applications" - }, + }, "time": { "second": "Second", "minute": "Minute", diff --git a/linkis-web/src/apps/linkis/i18n/common/zh.json b/linkis-web/src/apps/linkis/i18n/common/zh.json index 7656845c6c..e02d32754a 100644 --- a/linkis-web/src/apps/linkis/i18n/common/zh.json +++ b/linkis-web/src/apps/linkis/i18n/common/zh.json @@ -90,6 +90,9 @@ "tenant": "租户标签", "inputTenant": "请输入租户标签", "globalSettings": "全局设置", + "taskOverTimeTop": "任务耗时-TOP", + "taskTotalNum": "任务总数", + "engineTotalNum":"引擎总数", "resultSet": { "prefixText": "因为您的结果集较大,为了更好的体验,", "linkText": "点击查看结果集", diff --git a/linkis-web/src/apps/linkis/module/statisticsDashboard/index.vue b/linkis-web/src/apps/linkis/module/statisticsDashboard/index.vue index 1605927294..848ba130a8 100644 --- a/linkis-web/src/apps/linkis/module/statisticsDashboard/index.vue +++ b/linkis-web/src/apps/linkis/module/statisticsDashboard/index.vue @@ -47,6 +47,14 @@ style="width: 120px" /> + + + SELECT COUNT(1) sumcount, COUNT(case WHEN status ='Succeed' then 1 END) succeedcount, COUNT(case WHEN status ='Failed' then 1 END) failedcount, diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/postgresql/JobStatisticsMapper.xml b/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/postgresql/JobStatisticsMapper.xml index 7071139701..9666543a11 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/postgresql/JobStatisticsMapper.xml +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/resources/mapper/postgresql/JobStatisticsMapper.xml @@ -21,14 +21,6 @@ - - - - - - - - From ba8062e0f0226bd7dc44e1410b9a5af6d72df38f Mon Sep 17 00:00:00 2001 From: LiuGuoHua Date: Thu, 22 Feb 2024 09:18:19 +0800 Subject: [PATCH 08/13] =?UTF-8?q?1.=20=E8=B0=83=E6=95=B4=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/apps/linkis/module/statisticsDashboard/index.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linkis-web/src/apps/linkis/module/statisticsDashboard/index.vue b/linkis-web/src/apps/linkis/module/statisticsDashboard/index.vue index bb489dabd3..74c0c2618d 100644 --- a/linkis-web/src/apps/linkis/module/statisticsDashboard/index.vue +++ b/linkis-web/src/apps/linkis/module/statisticsDashboard/index.vue @@ -35,7 +35,7 @@ placement="bottom-start" format="yyyy-MM-dd" :placeholder="$t('message.linkis.formItems.date.placeholder')" - style="width: 160px" + style="width: 175px" :editable="false" /> @@ -64,12 +64,12 @@ From ce77f460e308895d4c50e16c40f63fa953fd273d Mon Sep 17 00:00:00 2001 From: LiuGuoHua Date: Thu, 22 Feb 2024 09:35:49 +0800 Subject: [PATCH 09/13] 1. formatted code --- .../jobhistory/dao/JobHistoryMapper.java | 34 +-- .../jobhistory/dao/JobStatisticsMapper.java | 52 ++-- .../restful/api/QueryRestfulApi.java | 39 +-- .../restful/api/StatisticsRestfulApi.java | 271 +++++++++--------- .../impl/JobHistoryQueryServiceImpl.scala | 16 +- .../impl/JobStatisticsQueryServiceImpl.scala | 43 ++- 6 files changed, 231 insertions(+), 224 deletions(-) diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/dao/JobHistoryMapper.java b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/dao/JobHistoryMapper.java index a229163946..c01720a5f3 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/dao/JobHistoryMapper.java +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/dao/JobHistoryMapper.java @@ -132,22 +132,24 @@ List selectFailoverJobHistory( @Param("limit") Integer limit); List taskDurationTopN( - @Param("startDate") Date startDate, - @Param("endDate") Date endDate, - @Param("umUser") String username, - @Param("engineType") String engineType); + @Param("startDate") Date startDate, + @Param("endDate") Date endDate, + @Param("umUser") String username, + @Param("engineType") String engineType); + List taskDurationTopNWithUserCreator( - @Param("umUser") String username, - @Param("userCreatorKey") String userCreatorKey, - @Param("userCreatorValue") String userCreator, - @Param("startDate") Date startDate, - @Param("endDate") Date endDate, - @Param("engineType") String engineType); + @Param("umUser") String username, + @Param("userCreatorKey") String userCreatorKey, + @Param("userCreatorValue") String userCreator, + @Param("startDate") Date startDate, + @Param("endDate") Date endDate, + @Param("engineType") String engineType); + List taskDurationTopNWithCreatorOnly( - @Param("umUser") String username, - @Param("userCreatorKey") String userCreatorKey, - @Param("creator") String userCreator, - @Param("startDate") Date startDate, - @Param("endDate") Date endDate, - @Param("engineType") String engineType); + @Param("umUser") String username, + @Param("userCreatorKey") String userCreatorKey, + @Param("creator") String userCreator, + @Param("startDate") Date startDate, + @Param("endDate") Date endDate, + @Param("engineType") String engineType); } diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/dao/JobStatisticsMapper.java b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/dao/JobStatisticsMapper.java index 2016caca3b..9c0ee86d9e 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/dao/JobStatisticsMapper.java +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/dao/JobStatisticsMapper.java @@ -26,38 +26,38 @@ public interface JobStatisticsMapper { JobStatistics taskExecutionStatistics( - @Param("umUser") String username, - @Param("startDate") Date startDate, - @Param("endDate") Date endDate, - @Param("engineType") String engineType); + @Param("umUser") String username, + @Param("startDate") Date startDate, + @Param("endDate") Date endDate, + @Param("engineType") String engineType); JobStatistics taskExecutionStatisticsWithUserCreator( - @Param("umUser") String username, - @Param("userCreatorKey") String userCreatorKey, - @Param("userCreatorValue") String userCreator, - @Param("startDate") Date startDate, - @Param("endDate") Date endDate, - @Param("engineType") String engineType); + @Param("umUser") String username, + @Param("userCreatorKey") String userCreatorKey, + @Param("userCreatorValue") String userCreator, + @Param("startDate") Date startDate, + @Param("endDate") Date endDate, + @Param("engineType") String engineType); JobStatistics taskExecutionStatisticsWithCreatorOnly( - @Param("umUser") String username, - @Param("userCreatorKey") String userCreatorKey, - @Param("creator") String userCreator, - @Param("startDate") Date startDate, - @Param("endDate") Date endDate, - @Param("engineType") String engineType); + @Param("umUser") String username, + @Param("userCreatorKey") String userCreatorKey, + @Param("creator") String userCreator, + @Param("startDate") Date startDate, + @Param("endDate") Date endDate, + @Param("engineType") String engineType); JobStatistics engineExecutionStatisticsWithUserCreator( - @Param("umUser") String username, - @Param("userCreatorValue") String userCreator, - @Param("startDate") Date startDate, - @Param("endDate") Date endDate, - @Param("engineType") String engineType); + @Param("umUser") String username, + @Param("userCreatorValue") String userCreator, + @Param("startDate") Date startDate, + @Param("endDate") Date endDate, + @Param("engineType") String engineType); JobStatistics engineExecutionStatistics( - @Param("umUser") String username, - @Param("creator") String userCreator, - @Param("startDate") Date startDate, - @Param("endDate") Date endDate, - @Param("engineType") String engineType); + @Param("umUser") String username, + @Param("creator") String userCreator, + @Param("startDate") Date startDate, + @Param("endDate") Date endDate, + @Param("engineType") String engineType); } diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/QueryRestfulApi.java b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/QueryRestfulApi.java index 1a73734b98..0ae72b84b3 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/QueryRestfulApi.java +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/QueryRestfulApi.java @@ -416,26 +416,30 @@ public Message listundone( /** Method list should not contain subjob, which may cause performance problems. */ @ApiOperation(value = "listDurationTop", notes = "listDurationTop", response = Message.class) @ApiImplicitParams({ - @ApiImplicitParam(name = "startDate", dataType = "long", example = "1658937600001"), - @ApiImplicitParam(name = "endDate", dataType = "long", example = "1658937600000"), - @ApiImplicitParam(name = "executeApplicationName", dataType = "String"), - @ApiImplicitParam(name = "creator", required = false, dataType = "String", value = "creator"), - @ApiImplicitParam(name = "proxyUser", required = false, dataType = "String", value = "proxyUser"), - @ApiImplicitParam(name = "pageNow", required = false, dataType = "Integer", value = "page now"), - @ApiImplicitParam(name = "pageSize", dataType = "Integer"), + @ApiImplicitParam(name = "startDate", dataType = "long", example = "1658937600001"), + @ApiImplicitParam(name = "endDate", dataType = "long", example = "1658937600000"), + @ApiImplicitParam(name = "executeApplicationName", dataType = "String"), + @ApiImplicitParam(name = "creator", required = false, dataType = "String", value = "creator"), + @ApiImplicitParam( + name = "proxyUser", + required = false, + dataType = "String", + value = "proxyUser"), + @ApiImplicitParam(name = "pageNow", required = false, dataType = "Integer", value = "page now"), + @ApiImplicitParam(name = "pageSize", dataType = "Integer"), }) @RequestMapping(path = "/listDurationTop", method = RequestMethod.GET) public Message listDurationTop( - HttpServletRequest req, - @RequestParam(value = "startDate", required = false) Long startDate, - @RequestParam(value = "endDate", required = false) Long endDate, - @RequestParam(value = "executeApplicationName", required = false) + HttpServletRequest req, + @RequestParam(value = "startDate", required = false) Long startDate, + @RequestParam(value = "endDate", required = false) Long endDate, + @RequestParam(value = "executeApplicationName", required = false) String executeApplicationName, - @RequestParam(value = "creator", required = false) String creator, - @RequestParam(value = "proxyUser", required = false) String proxyUser, - @RequestParam(value = "pageNow", required = false) Integer pageNow, - @RequestParam(value = "pageSize", required = false) Integer pageSize) - throws QueryException { + @RequestParam(value = "creator", required = false) String creator, + @RequestParam(value = "proxyUser", required = false) String proxyUser, + @RequestParam(value = "pageNow", required = false) Integer pageNow, + @RequestParam(value = "pageSize", required = false) Integer pageSize) + throws QueryException { if (StringUtils.isEmpty(pageNow)) { pageNow = 1; } @@ -483,7 +487,8 @@ public Message listDurationTop( PageHelper.startPage(pageNow, pageSize); try { queryTasks = - jobHistoryQueryService.taskDurationTopN(sDate, eDate, proxyUser, creator, executeApplicationName); + jobHistoryQueryService.taskDurationTopN( + sDate, eDate, proxyUser, creator, executeApplicationName); } finally { PageHelper.clearPage(); } diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/StatisticsRestfulApi.java b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/StatisticsRestfulApi.java index bb73edee5d..23a12c2b94 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/StatisticsRestfulApi.java +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/StatisticsRestfulApi.java @@ -47,142 +47,149 @@ @RequestMapping(path = "/jobhistory/jobstatistics") public class StatisticsRestfulApi { - private Logger log = LoggerFactory.getLogger(this.getClass()); + private Logger log = LoggerFactory.getLogger(this.getClass()); - @Autowired - private JobStatisticsQueryService jobStatisticsQueryService; + @Autowired private JobStatisticsQueryService jobStatisticsQueryService; - @ApiOperation(value = "taskCount", notes = "taskCount", response = Message.class) - @ApiImplicitParams({ - @ApiImplicitParam(name = "startDate", dataType = "long"), - @ApiImplicitParam(name = "endDate", required = false, dataType = "long", value = "end date"), - @ApiImplicitParam(name = "executeApplicationName", dataType = "String"), - @ApiImplicitParam(name = "creator", required = false, dataType = "String", value = "creator"), - @ApiImplicitParam(name = "proxyUser", required = false, dataType = "String", value = "proxyUser"), - }) - @RequestMapping(path = "/taskCount", method = RequestMethod.GET) - public Message taskCount( - HttpServletRequest req, - @RequestParam(value = "startDate", required = false) Long startDate, - @RequestParam(value = "endDate", required = false) Long endDate, - @RequestParam(value = "executeApplicationName", required = false) - String executeApplicationName, - @RequestParam(value = "creator", required = false) String creator, - @RequestParam(value = "proxyUser", required = false) String proxyUser) - throws IOException, QueryException { - if (endDate == null) { - endDate = System.currentTimeMillis(); - } - if (startDate == null) { - startDate = 0L; - } - Date sDate = new Date(startDate); - Date eDate = new Date(endDate); - if (startDate == 0L) { - sDate = DateUtils.addDays(eDate, -1); - } - if (sDate.getTime() == eDate.getTime()) { - Calendar instance = Calendar.getInstance(); - instance.setTimeInMillis(endDate); - instance.add(Calendar.DAY_OF_MONTH, 1); - eDate = new Date(instance.getTime().getTime()); - } - if (StringUtils.isEmpty(proxyUser)) { - proxyUser = null; - } else { - if (!QueryUtils.checkNameValid(proxyUser)) { - return Message.error("Invalid proxyUser : " + proxyUser); - } - } - if (StringUtils.isEmpty(creator)) { - creator = null; - } else { - if (!QueryUtils.checkNameValid(creator)) { - return Message.error("Invalid creator : " + creator); - } - } - if (!StringUtils.isEmpty(executeApplicationName)) { - if (!QueryUtils.checkNameValid(executeApplicationName)) { - return Message.error("Invalid applicationName : " + executeApplicationName); - } - } else { - executeApplicationName = null; - } - JobStatistics jobStatistics = - jobStatisticsQueryService.taskExecutionStatistics( - sDate, eDate, proxyUser, creator, executeApplicationName); - - return Message.ok() - .data("sumCount", jobStatistics.getSumCount()) - .data("succeedCount", jobStatistics.getSucceedCount()) - .data("failedCount", jobStatistics.getFailedCount()) - .data("cancelledCount", jobStatistics.getCancelledCount()); + @ApiOperation(value = "taskCount", notes = "taskCount", response = Message.class) + @ApiImplicitParams({ + @ApiImplicitParam(name = "startDate", dataType = "long"), + @ApiImplicitParam(name = "endDate", required = false, dataType = "long", value = "end date"), + @ApiImplicitParam(name = "executeApplicationName", dataType = "String"), + @ApiImplicitParam(name = "creator", required = false, dataType = "String", value = "creator"), + @ApiImplicitParam( + name = "proxyUser", + required = false, + dataType = "String", + value = "proxyUser"), + }) + @RequestMapping(path = "/taskCount", method = RequestMethod.GET) + public Message taskCount( + HttpServletRequest req, + @RequestParam(value = "startDate", required = false) Long startDate, + @RequestParam(value = "endDate", required = false) Long endDate, + @RequestParam(value = "executeApplicationName", required = false) + String executeApplicationName, + @RequestParam(value = "creator", required = false) String creator, + @RequestParam(value = "proxyUser", required = false) String proxyUser) + throws IOException, QueryException { + if (endDate == null) { + endDate = System.currentTimeMillis(); + } + if (startDate == null) { + startDate = 0L; + } + Date sDate = new Date(startDate); + Date eDate = new Date(endDate); + if (startDate == 0L) { + sDate = DateUtils.addDays(eDate, -1); + } + if (sDate.getTime() == eDate.getTime()) { + Calendar instance = Calendar.getInstance(); + instance.setTimeInMillis(endDate); + instance.add(Calendar.DAY_OF_MONTH, 1); + eDate = new Date(instance.getTime().getTime()); + } + if (StringUtils.isEmpty(proxyUser)) { + proxyUser = null; + } else { + if (!QueryUtils.checkNameValid(proxyUser)) { + return Message.error("Invalid proxyUser : " + proxyUser); + } + } + if (StringUtils.isEmpty(creator)) { + creator = null; + } else { + if (!QueryUtils.checkNameValid(creator)) { + return Message.error("Invalid creator : " + creator); + } + } + if (!StringUtils.isEmpty(executeApplicationName)) { + if (!QueryUtils.checkNameValid(executeApplicationName)) { + return Message.error("Invalid applicationName : " + executeApplicationName); + } + } else { + executeApplicationName = null; } + JobStatistics jobStatistics = + jobStatisticsQueryService.taskExecutionStatistics( + sDate, eDate, proxyUser, creator, executeApplicationName); - @ApiOperation(value = "engineCount", notes = "engineCount", response = Message.class) - @ApiImplicitParams({ - @ApiImplicitParam(name = "startDate", dataType = "long"), - @ApiImplicitParam(name = "endDate", required = false, dataType = "long", value = "end date"), - @ApiImplicitParam(name = "executeApplicationName", dataType = "String"), - @ApiImplicitParam(name = "creator", required = false, dataType = "String", value = "creator"), - @ApiImplicitParam(name = "proxyUser", required = false, dataType = "String", value = "proxyUser"), - }) - @RequestMapping(path = "/engineCount", method = RequestMethod.GET) - public Message engineCount( - HttpServletRequest req, - @RequestParam(value = "startDate", required = false) Long startDate, - @RequestParam(value = "endDate", required = false) Long endDate, - @RequestParam(value = "executeApplicationName", required = false) - String executeApplicationName, - @RequestParam(value = "creator", required = false) String creator, - @RequestParam(value = "proxyUser", required = false) String proxyUser) - throws IOException, QueryException { - if (endDate == null) { - endDate = System.currentTimeMillis(); - } - if (startDate == null) { - startDate = 0L; - } - Date sDate = new Date(startDate); - Date eDate = new Date(endDate); - if (startDate == 0L) { - sDate = DateUtils.addDays(eDate, -1); - } - if (sDate.getTime() == eDate.getTime()) { - Calendar instance = Calendar.getInstance(); - instance.setTimeInMillis(endDate); - instance.add(Calendar.DAY_OF_MONTH, 1); - eDate = new Date(instance.getTime().getTime()); - } - if (StringUtils.isEmpty(proxyUser)) { - proxyUser = null; - } else { - if (!QueryUtils.checkNameValid(proxyUser)) { - return Message.error("Invalid proxyUser : " + proxyUser); - } - } - if (StringUtils.isEmpty(creator)) { - creator = null; - } else { - if (!QueryUtils.checkNameValid(creator)) { - return Message.error("Invalid creator : " + creator); - } - } - if (!StringUtils.isEmpty(executeApplicationName)) { - if (!QueryUtils.checkNameValid(executeApplicationName)) { - return Message.error("Invalid applicationName : " + executeApplicationName); - } - } else { - executeApplicationName = null; - } - JobStatistics jobStatistics = - jobStatisticsQueryService.engineExecutionStatistics( - sDate, eDate, proxyUser, creator, executeApplicationName); + return Message.ok() + .data("sumCount", jobStatistics.getSumCount()) + .data("succeedCount", jobStatistics.getSucceedCount()) + .data("failedCount", jobStatistics.getFailedCount()) + .data("cancelledCount", jobStatistics.getCancelledCount()); + } - return Message.ok() - .data("countEngine", jobStatistics.getSumCount()) - .data("countEngineSucceed", jobStatistics.getSucceedCount()) - .data("countEngineFailed", jobStatistics.getFailedCount()) - .data("countEngineShutting", jobStatistics.getCancelledCount()); + @ApiOperation(value = "engineCount", notes = "engineCount", response = Message.class) + @ApiImplicitParams({ + @ApiImplicitParam(name = "startDate", dataType = "long"), + @ApiImplicitParam(name = "endDate", required = false, dataType = "long", value = "end date"), + @ApiImplicitParam(name = "executeApplicationName", dataType = "String"), + @ApiImplicitParam(name = "creator", required = false, dataType = "String", value = "creator"), + @ApiImplicitParam( + name = "proxyUser", + required = false, + dataType = "String", + value = "proxyUser"), + }) + @RequestMapping(path = "/engineCount", method = RequestMethod.GET) + public Message engineCount( + HttpServletRequest req, + @RequestParam(value = "startDate", required = false) Long startDate, + @RequestParam(value = "endDate", required = false) Long endDate, + @RequestParam(value = "executeApplicationName", required = false) + String executeApplicationName, + @RequestParam(value = "creator", required = false) String creator, + @RequestParam(value = "proxyUser", required = false) String proxyUser) + throws IOException, QueryException { + if (endDate == null) { + endDate = System.currentTimeMillis(); } + if (startDate == null) { + startDate = 0L; + } + Date sDate = new Date(startDate); + Date eDate = new Date(endDate); + if (startDate == 0L) { + sDate = DateUtils.addDays(eDate, -1); + } + if (sDate.getTime() == eDate.getTime()) { + Calendar instance = Calendar.getInstance(); + instance.setTimeInMillis(endDate); + instance.add(Calendar.DAY_OF_MONTH, 1); + eDate = new Date(instance.getTime().getTime()); + } + if (StringUtils.isEmpty(proxyUser)) { + proxyUser = null; + } else { + if (!QueryUtils.checkNameValid(proxyUser)) { + return Message.error("Invalid proxyUser : " + proxyUser); + } + } + if (StringUtils.isEmpty(creator)) { + creator = null; + } else { + if (!QueryUtils.checkNameValid(creator)) { + return Message.error("Invalid creator : " + creator); + } + } + if (!StringUtils.isEmpty(executeApplicationName)) { + if (!QueryUtils.checkNameValid(executeApplicationName)) { + return Message.error("Invalid applicationName : " + executeApplicationName); + } + } else { + executeApplicationName = null; + } + JobStatistics jobStatistics = + jobStatisticsQueryService.engineExecutionStatistics( + sDate, eDate, proxyUser, creator, executeApplicationName); + + return Message.ok() + .data("countEngine", jobStatistics.getSumCount()) + .data("countEngineSucceed", jobStatistics.getSucceedCount()) + .data("countEngineFailed", jobStatistics.getFailedCount()) + .data("countEngineShutting", jobStatistics.getCancelledCount()); + } } diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobHistoryQueryServiceImpl.scala b/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobHistoryQueryServiceImpl.scala index 0bdaace660..84b73d6a23 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobHistoryQueryServiceImpl.scala +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobHistoryQueryServiceImpl.scala @@ -486,14 +486,15 @@ class JobHistoryQueryServiceImpl extends JobHistoryQueryService with Logging { } } - override def taskDurationTopN(sDate: Date, eDate: Date, username: String, creator: String, engineType: String): util.List[JobHistory] = { + override def taskDurationTopN( + sDate: Date, + eDate: Date, + username: String, + creator: String, + engineType: String + ): util.List[JobHistory] = { val result = if (StringUtils.isBlank(creator)) { - jobHistoryMapper.taskDurationTopN( - sDate, - eDate, - username, - engineType - ) + jobHistoryMapper.taskDurationTopN(sDate, eDate, username, engineType) } else if (StringUtils.isBlank(username)) { val fakeLabel = new UserCreatorLabel jobHistoryMapper.taskDurationTopNWithCreatorOnly( @@ -524,4 +525,5 @@ class JobHistoryQueryServiceImpl extends JobHistoryQueryService with Logging { } result } + } diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobStatisticsQueryServiceImpl.scala b/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobStatisticsQueryServiceImpl.scala index a3bca1dd1a..27b8173d05 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobStatisticsQueryServiceImpl.scala +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobStatisticsQueryServiceImpl.scala @@ -17,12 +17,14 @@ package org.apache.linkis.jobhistory.service.impl -import org.apache.commons.lang3.StringUtils import org.apache.linkis.common.utils.{Logging, Utils} import org.apache.linkis.jobhistory.dao.JobStatisticsMapper import org.apache.linkis.jobhistory.entity.JobStatistics import org.apache.linkis.jobhistory.service.JobStatisticsQueryService import org.apache.linkis.manager.label.entity.engine.UserCreatorLabel + +import org.apache.commons.lang3.StringUtils + import org.springframework.beans.factory.annotation.Autowired import org.springframework.stereotype.Service @@ -35,19 +37,14 @@ class JobStatisticsQueryServiceImpl extends JobStatisticsQueryService with Loggi private var jobStatisticsMapper: JobStatisticsMapper = _ override def taskExecutionStatistics( - sDate: Date, - eDate: Date, - username: String, - creator: String, - engineType: String - ): JobStatistics = { + sDate: Date, + eDate: Date, + username: String, + creator: String, + engineType: String + ): JobStatistics = { val result = if (StringUtils.isBlank(creator)) { - jobStatisticsMapper.taskExecutionStatistics( - username, - sDate, - eDate, - engineType - ) + jobStatisticsMapper.taskExecutionStatistics(username, sDate, eDate, engineType) } else if (StringUtils.isBlank(username)) { val fakeLabel = new UserCreatorLabel jobStatisticsMapper.taskExecutionStatisticsWithCreatorOnly( @@ -80,20 +77,14 @@ class JobStatisticsQueryServiceImpl extends JobStatisticsQueryService with Loggi } override def engineExecutionStatistics( - sDate: Date, - eDate: Date, - username: String, - creator: String, - engineType: String - ): JobStatistics = { + sDate: Date, + eDate: Date, + username: String, + creator: String, + engineType: String + ): JobStatistics = { val result = if (StringUtils.isBlank(username) || StringUtils.isBlank(creator)) { - jobStatisticsMapper.engineExecutionStatistics( - username, - creator, - sDate, - eDate, - engineType - ) + jobStatisticsMapper.engineExecutionStatistics(username, creator, sDate, eDate, engineType) } else { val fakeLabel = new UserCreatorLabel fakeLabel.setUser(username) From 6b771bb0ceaf72b77f89edf66bcc3bc063bfffc1 Mon Sep 17 00:00:00 2001 From: LiuGuoHua Date: Thu, 22 Feb 2024 16:05:25 +0800 Subject: [PATCH 10/13] 1. fix error name --- linkis-web/src/apps/linkis/module/statisticsDashboard/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linkis-web/src/apps/linkis/module/statisticsDashboard/index.vue b/linkis-web/src/apps/linkis/module/statisticsDashboard/index.vue index 74c0c2618d..16f2c09a6e 100644 --- a/linkis-web/src/apps/linkis/module/statisticsDashboard/index.vue +++ b/linkis-web/src/apps/linkis/module/statisticsDashboard/index.vue @@ -126,7 +126,7 @@ import mixin from '@/common/service/mixin' import api from '@/common/service/api' var echarts = require('echarts') export default { - name: 'GlobalHistory', + name: 'StatisticsDashboard', components: { historyTable: table.historyTable, }, From 146248233990dd60f67cacabfbe9adde88dff1b1 Mon Sep 17 00:00:00 2001 From: LiuGuoHua Date: Thu, 22 Feb 2024 16:56:04 +0800 Subject: [PATCH 11/13] 1. formatted code --- linkis-web/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/linkis-web/package.json b/linkis-web/package.json index 8d5f297815..517bbc0b4c 100644 --- a/linkis-web/package.json +++ b/linkis-web/package.json @@ -82,3 +82,4 @@ "postcss": "8.4.31" } } + From c5bb2936887cdf28ca240bd51fcbb0f19970b34c Mon Sep 17 00:00:00 2001 From: LiuGuoHua <129264181+sjgllgh@users.noreply.github.com> Date: Thu, 22 Feb 2024 17:36:34 +0800 Subject: [PATCH 12/13] fotmatted code --- linkis-web/package.json | 163 ++++++++++++++++++++-------------------- 1 file changed, 81 insertions(+), 82 deletions(-) diff --git a/linkis-web/package.json b/linkis-web/package.json index 517bbc0b4c..fbc9566ec7 100644 --- a/linkis-web/package.json +++ b/linkis-web/package.json @@ -1,85 +1,84 @@ { - "name": "linkis", - "version": "1.5.0", - "private": true, - "scripts": { - "serve": "vue-cli-service serve", - "build": "vue-cli-service build", - "lint": "vue-cli-service lint --no-fix", - "fix": "eslint --ext .js,.vue src --fix", - "precommit": "lint-staged", - "preinstall": "npm install --package-lock-only --ignore-scripts && npx npm-force-resolutions" - }, - "husky": { - "hooks": { - "postcommit": "git update-index --again", - "pre-commit": "lint-staged" + "name": "linkis", + "version": "1.5.0", + "private": true, + "scripts": { + "serve": "vue-cli-service serve", + "build": "vue-cli-service build", + "lint": "vue-cli-service lint --no-fix", + "fix": "eslint --ext .js,.vue src --fix", + "precommit": "lint-staged", + "preinstall": "npm install --package-lock-only --ignore-scripts && npx npm-force-resolutions" + }, + "husky": { + "hooks": { + "postcommit": "git update-index --again", + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "src/**/*.{js,vue}": [ + "vue-cli-service lint --no-fix" + ] + }, + "dependencies": { + "@form-create/iview": "2.5.27", + "axios": "1.6.0", + "babel-polyfill": "6.26.0", + "core-js": "3.27.2", + "dexie": "3.2.3", + "dt-sql-parser": "3.0.5", + "eslint": "7.21.0", + "eslint-plugin-vue": "9.6.0", + "highlight.js": "10.7.0", + "iview": "3.5.4", + "jsencrypt": "3.2.1", + "lodash": "4.17.21", + "md5": "2.3.0", + "mitt": "1.2.0", + "moment": "2.29.4", + "monaco-editor": "0.30.1", + "object-to-formdata": "4.2.2", + "path-browserify": "1.0.1", + "postcss": "8.4.31", + "qs": "6.11.0", + "reconnecting-websocket": "4.4.0", + "sql-formatter": "2.3.3", + "svgo": "3.0.2", + "v-jsoneditor": "1.4.5", + "vue": "2.6.12", + "vue-i18n": "8.22.1", + "vue-router": "3.4.8", + "vuedraggable": "2.24.3", + "vuescroll": "4.16.1", + "worker-loader": "3.0.8", + "echarts": "^5.1.1" + }, + "devDependencies": { + "@intlify/vue-i18n-loader": "1.0.0", + "@vue/cli-plugin-babel": "5.0.8", + "@vue/cli-plugin-eslint": "5.0.8", + "@vue/cli-service": "5.0.8", + "@vue/eslint-config-standard": "4.0.0", + "archiver": "3.1.1", + "autoprefixer": "10.4.14", + "babel-eslint": "10.1.0", + "copy-webpack-plugin": "9.1.0", + "csp-html-webpack-plugin": "5.1.0", + "filemanager-webpack-plugin": "7.0.0", + "husky": "1.3.1", + "lint-staged": "13.1.1", + "material-design-icons": "3.0.1", + "monaco-editor-webpack-plugin": "6.0.0", + "node-sass": "8.0.0", + "npm-force-resolutions": "0.0.10", + "sass-loader": "10.4.1", + "svg-sprite-loader": "6.0.0", + "vue-cli-plugin-mockjs": "0.1.3", + "vue-template-compiler": "2.6.12", + "webpack-virtual-modules": "0.3.2" + }, + "resolutions": { + "postcss": "8.4.31" } - }, - "lint-staged": { - "src/**/*.{js,vue}": [ - "vue-cli-service lint --no-fix" - ] - }, - "dependencies": { - "@form-create/iview": "2.5.27", - "axios": "1.6.0", - "babel-polyfill": "6.26.0", - "core-js": "3.27.2", - "dexie": "3.2.3", - "dt-sql-parser": "3.0.5", - "eslint": "7.21.0", - "eslint-plugin-vue": "9.6.0", - "highlight.js": "10.7.0", - "iview": "3.5.4", - "jsencrypt": "3.2.1", - "lodash": "4.17.21", - "md5": "2.3.0", - "mitt": "1.2.0", - "moment": "2.29.4", - "monaco-editor": "0.30.1", - "object-to-formdata": "4.2.2", - "path-browserify": "1.0.1", - "postcss": "8.4.31", - "qs": "6.11.0", - "reconnecting-websocket": "4.4.0", - "sql-formatter": "2.3.3", - "svgo": "3.0.2", - "v-jsoneditor": "1.4.5", - "vue": "2.6.12", - "vue-i18n": "8.22.1", - "vue-router": "3.4.8", - "vuedraggable": "2.24.3", - "vuescroll": "4.16.1", - "worker-loader": "3.0.8", - "echarts": "^5.1.1" - }, - "devDependencies": { - "@intlify/vue-i18n-loader": "1.0.0", - "@vue/cli-plugin-babel": "5.0.8", - "@vue/cli-plugin-eslint": "5.0.8", - "@vue/cli-service": "5.0.8", - "@vue/eslint-config-standard": "4.0.0", - "archiver": "3.1.1", - "autoprefixer": "10.4.14", - "babel-eslint": "10.1.0", - "copy-webpack-plugin": "9.1.0", - "csp-html-webpack-plugin": "5.1.0", - "filemanager-webpack-plugin": "7.0.0", - "husky": "1.3.1", - "lint-staged": "13.1.1", - "material-design-icons": "3.0.1", - "monaco-editor-webpack-plugin": "6.0.0", - "node-sass": "8.0.0", - "npm-force-resolutions": "0.0.10", - "sass-loader": "10.4.1", - "svg-sprite-loader": "6.0.0", - "vue-cli-plugin-mockjs": "0.1.3", - "vue-template-compiler": "2.6.12", - "webpack-virtual-modules": "0.3.2" - }, - "resolutions": { - "postcss": "8.4.31" - } } - From 64f836439c14375abe5466e1c5374547b01e0bd9 Mon Sep 17 00:00:00 2001 From: LiuGuoHua <129264181+sjgllgh@users.noreply.github.com> Date: Thu, 22 Feb 2024 17:45:29 +0800 Subject: [PATCH 13/13] matted code --- .../src/apps/linkis/i18n/common/zh.json | 1370 ++++++++--------- 1 file changed, 685 insertions(+), 685 deletions(-) diff --git a/linkis-web/src/apps/linkis/i18n/common/zh.json b/linkis-web/src/apps/linkis/i18n/common/zh.json index e02d32754a..50f6d2ecf0 100644 --- a/linkis-web/src/apps/linkis/i18n/common/zh.json +++ b/linkis-web/src/apps/linkis/i18n/common/zh.json @@ -1,700 +1,700 @@ { "message": { - "linkis": { - "refresh": "刷新", - "placeholderZip": "请输入工作空间python包路径(只支持zip)!", - "emptyString": "空字符串", - "addAppType": "新增应用类型", - "editContents": "编辑目录", - "ConfirmEdit": "完成编辑", - "serviceRegistryCenter": "服务注册中心", - "addParameterConfig": "新增参数配置", - "addEngineType": "新增引擎类型", - "editDescriptionEngineConfig": "编辑引擎配置", - "name": "名称", - "order": "顺序", - "description": "描述", - "noDescription": "暂无描述", - "addTags": "添加标签", - "find": "查询", - "initiator": "创建者", - "inputOwnerHint": "请输入创建者", - "jumpPage": "请在跳转页面查看……", - "editedSuccess": "修改成功", - "errorCode": "错误码", - "errorDescription": "错误描述", - "notLog": "未获取到日志!", - "unfold": "展开", - "fold": "收起", - "addVariable": "新增变量", - "defaultValue": "默认值", - "noDefaultValue": "无默认值", - "stop": "停止", - "tip": "提示", - "serverTip": "无结果集(resultLocation:null)", - "stopEngineTip": "请问确认要停止当前引擎?", - "log": "任务日志", - "detail": "任务详情", - "result": "任务结果", - "engineLog": "引擎日志", - "startUp": "启动", - "tagEdit": "编辑", - "tipForKill": "将要停止此ECM实例 【{instance}】上的空闲引擎", - "killAll": "停止空闲引擎", - "allEngine": "包含多用户引擎?", - "killFinishedInfo": "预计停止{killEngineNum}个引擎, 将释放 ECM {cores}cores,{memory}G 资源", - "noDataTextBeforeSearch": "请输入执行代码进行查询", - "noDataTextAfterSearch": "暂无数据", - "yes": "是", - "no": "否", - "keyTip": "不能为空", - "rename": "重命名", - "resources": "资源", - "instanceNum": "实例数", - "instanceName": "实例名称", - "reset": "重置", - "clearSearch": "清空", - "showOperations": "显示操作", - "hide": "隐藏操作", - "resetAll": "全部重置", - "remove": "移除", - "submit": "确定", - "search": "搜索", - "save": "保存", - "edit": "编辑", - "cancel": "取消", - "create": "新建", - "noDataText": "暂无数据", - "jobId": "任务ID", - "userName": "用户名", - "password": "密码", - "unselect": "请选择", - "noselection": "请先选择", - "searchName": "请输入用户名搜索", - "generalView": "切换普通视图", - "showAdvancedSearch": "高级筛选", - "hideAdvancedSearch": "隐藏高级筛选", - "manageView": "切换管理员视图", - "back": "返回", - "download": "下载日志", - "confirmText": "确认下载该日志", - "prev": "上一步", - "complete": "完成", - "close": "关闭", - "udfName": "UDF名称", - "udfType": "UDF类型", - "nextPage": "下一页", - "previousPage": "上一页", - "all": "全部", - "common": "通用", - "tenant": "租户标签", - "inputTenant": "请输入租户标签", - "globalSettings": "全局设置", - "taskOverTimeTop": "任务耗时-TOP", - "taskTotalNum": "任务总数", - "engineTotalNum":"引擎总数", - "resultSet": { - "prefixText": "因为您的结果集较大,为了更好的体验,", - "linkText": "点击查看结果集", - "largeResultTips": "前端只展示5000条数据" - }, - "needPre": "需要先选择分类和输入用户名", - "warning": { - "api": "接口请求中,请稍候!", - "data": "数据请求中,请稍候!", - "waiting": "请等待接口返回!", - "biLoading": "正在和Visualis系统通讯,请稍候!", - "comingSoon": "尚未开源,敬请期待!" - }, - "resourceManagement": { - "resourceUsage": "资源使用情况", - "applicationList": "应用列表" - }, - "time": { - "second": "秒", - "minute": "分钟", - "hour": "小时", - "day": "天" - }, - "tableColumns": { - "instanceName": "实例名称", - "initiator": "启动者", - "engineInstance": "引擎实例", - "engineType": "引擎类型", - "serveType": "服务类型", - "appType": "应用类型", - "taskID": "任务ID", - "fileName": "来源", - "executionCode": "查询语句", - "status": "状态", - "costTime": "已耗时", - "label": "标签", - "engineVersion": "引擎版本", - "engineVersionCannotBeNull": "引擎版本不能为空", - "addEngineRules": "应用名称不能有特殊符号和空格", - "usedResources": "已用资源", - "lockedResource": "上锁资源", - "maximumAvailableResources": "最大可用资源", - "minimumAvailableResources": "最小可用资源", - "startTime": "启动时间", - "executeApplicationName": "引擎", - "requestApplicationName": "应用", - "user": "用户", - "createdTime": "创建时间", - "updateTime": "更新时间", - "failedReason": "关键信息", - "control": { - "title": "操作", - "label": "查看" - }, - "queenRemain": "队列剩余资源", - "queueUsed": "队列已用资源", - "queueTop": "队列上限资源", - "engineRemain": "引擎剩余资源", - "engineUsed": "引擎已用资源", - "engineTop": "引擎上限资源", - "versioTips": "如果没有对应的版本,请确认是否已安装对应的版本引擎物料", - "applicationRole": "应用方" - }, - "logLoading": "日志请求中,请稍后", - "title": "Linkis管理台", - "info": "{num} 条新消息", - "hint": "请在跳转页面查看……", - "sideNavList": { - "news": { - "name": "最新动态", - "children": { - "daily": "运营日报" - } - }, - "function": { - "name": "常用功能", - "children": { - "globalHistory": "全局历史", - "resource": "资源管理", - "resourceEngineConnList": "历史引擎", - "setting": "参数配置", - "dateReport": "全局变量", - "globalValiable": "常见问题", - "ECMManage": "ECM管理", - "microserviceManage": "微服务管理", - "udfFunctionTitle": "UDF函数", - "udfFunctionManage": "UDF管理", - "functionManagement": "函数管理", - "dataSourceManage": "数据源管理", - "userResourceManagement": "用户资源管理", - "tenantTagManagement": "租户标签管理", - "ipListManagement": "白名单管理", - "acrossClusterRule": "跨集群规则管理", - "errorCode": "错误码管理", - "gatewayAuthToken": "令牌管理", - "rmExternalResourceProvider": "扩展资源管理", - "udfManager": "用户管理", - "udfTree": "UDF分类", - "datasourceAccess": "数据源权限", - "datasourceEnv": "数据源环境", - "datasourceType": "数据源分类", - "datasourceTypeKey": "数据源配置项", - "EnginePluginManagement": "引擎物料管理", - "basedataManagement": "基础数据管理", - "codeQuery": "代码检索", - "engineConfigurationTemplate": "引擎配置模板", - "EngineConnList": "引擎列表", - "opsTool": "运维工具", - "userConfig": "用户配置", - "configManagement": "配置项管理", - "statisticsDashboard": "统计看板" - } - } - }, - "modal": { - "modalTitle": "提示信息", - "modalDelete": "确认是否删除[{name}]项?", - "modalDeleteRecord": "确认是否删除该记录?", - "modalDeleteTask": "确认是否停止当前选择任务?", - "modalDeleteInstance": "确认是否停止当前选择实例?", - "modalDeleteSuccess": "删除成功", - "modalDeleteFail": "删除失败" - }, - "formItems": { - "id": { - "placeholder": "请输入ID搜索" - }, - "date": { - "label": "起始时间", - "placeholder": "请选择起始日期" - }, - "instance": { - "label": "Entrance 实例", - "placeholder": "请输入实例" - }, - "creator": { - "label": "应用", - "placeholder": "请输入应用搜索" - }, - "engine": { - "label": "引擎" - }, - "status": { - "label": "状态" - }, - "appType": "应用类型", - "engineType": "引擎类型" - }, - "columns": { - "taskID": "任务ID", - "fileName": "脚本名称", - "executionCode": "查询语句", - "status": "状态", - "costTime": "已耗时", - "executeApplicationName": "执行引擎", - "requestApplicationName": "创建者", - "progress": "进度", - "createdTime": "创建时间", - "updatedTime": "最后更新时间", - "control": { - "title": "操作", - "label": "查看" - }, - "moduleName": "模块名称", - "totalResource": "总资源", - "usedResource": "已用资源", - "initializingResource": "初始化中资源", - "memory": "内存", - "engineInstance": "引擎实例", - "applicationName": "应用名称", - "usedTime": "开始时间", - "engineStatus": "状态", - "username": "用户名" - }, - "shortcuts": { - "week": "最近一周", - "month": "最近一个月", - "threeMonths": "最近三个月" - }, - "statusType": { - "all": "全部", - "inited": "排队中", - "running": "运行", - "succeed": "成功", - "cancelled": "取消", - "failed": "失败", - "scheduled": "资源申请中", - "timeout": "超时", - "retry": "重试", - "unknown": "未知" - }, - "engineTypes": { - "all": "全部" - }, - "header": "资源管理器", - "tabs": { - "first": "用户会话", - "second": "用户资源", - "third": "服务器资源" - }, - "noLimit": "无限制", - "core": "核", - "row": { - "applicationName": "应用名称", - "usedTime": "开始时间", - "engineStatus": "状态", - "engineInstance": "引擎实例", - "queueName": "队列名称", - "user": "用户", - "cpu": "已用的服务器CPU资源", - "memory": "已用的服务器内存资源", - "queueCpu": "已用的Yarn队列CPU资源", - "queueMemory": "已用的Yarn队列内存资源" - }, - "setting": { - "global": "全局", - "globalSetting": "通用设置", - "hide": "隐藏", - "show": "显示", - "advancedSetting": "高级设置", - "dataDev": "数据开发", - "maxLimit": "(资源模板指定上限值为{limit})" - }, - "globalValiable": "全局变量", - "rules": { - "first": { - "required": "变量 {text} 的key为空", - "lengthLimit": "长度应为 1 至 128 个字符", - "letterTypeLimit": "仅支持以字母开头,且不得存在空格和中文", - "placeholder": "请输入变量名" - }, - "second": { - "required": "变量 {text} 的value为空", - "lengthLimit": "长度应为 1 至 128 个字符", - "placeholder": "请输入变量值" - } - }, - "addArgs": "增加参数", - "emptyDataText": "暂无全局变量数据", - "sameName": "存在同名key", - "error": { - "validate": "有验证项未通过,请检查后再试!" - }, - "success": { - "update": "全局变量更新成功!" - }, - "searchAppType": "请输入应用类型", - "resetTip": "是否确认重置该资源?", - "resetAllTip": "是否重置全部用户资源(该操作只会清理用户资源记录,不清理已经产生的资源)", - "viewlog": "查看日志", - "datasource": { - "pleaseInput": "请输入", - "pleaseUpload": "请上传", - "datasourceSrc": "数据源", - "connectTest": "测试连接", - "sourceName": "数据源名称", - "sourceDec": "数据源描述", - "sourceType": "数据源类型", - "creator": "创建人", - "create": "新增数据源", - "exports": "批量导出数据源", - "imports": "批量导入数据源", - "overdue": "过期", - "versionList": "版本列表", - "dataSourceName": "数据源名称", - "dataSourceType": "数据源类型", - "createSystem": "创建系统", - "dataSourceEnv": "可用集群", - "status": "状态", - "permissions": "权限", - "label": "标签", - "version": "版本", - "desc": "描述", - "action": "操作", - "createUser": "创建人", - "createTime": "创建时间", - "versionDec": "版本描述", - "watch": "查看", - "rollback": "回滚", - "publish": "发布", - "initVersion": "初始化版本", - "updateVersion": "版本更新", - "published": "已发布", - "unpublish": "未发布", - "cannotPublish": "不可发布", - "used": "可用", - "commentValue": "从版本 {text} 回滚" - }, - "tenantTagManagement": { - "userName": "用户名", - "appName": "应用名", - "tenantTag": "租户标签", - "search": "搜索", - "clear": "清空", - "create": "新增", - "userCreator": "用户-应用", - "createUser": "创建人", - "createTime": "创建时间", - "desc": "业务来源", - "inputUser": "请输入用户名", - "inputApp": "请输入应用名", - "inputTenant": "请输入租户标签", - "inputDesc": "请输入业务来源", - "inputCreateUser": "请输入创建者", - "yourTagMapping": "您的标签映射", - "notEmpty": "不能为空", - "maxLen": "长度不能超过100", - "contentError": "仅限英文、数字、星号和下划线", - "contentError1": "仅限英文、数字和下划线", - "contentError2": "仅限英文、数字、下划线和横线", - "check": "检查", - "OK": "确定", - "Cancel": "取消", - "action": "操作", - "edit": "编辑", - "delete": "删除", - "userIsExisted": "用户标签已存在", - "addSuccessful": "添加成功", - "confirmDel": "确认删除", - "isConfirmDel": "确定要删除这条数据吗({name})" - }, - "ipListManagement": { - "userName": "用户名", - "appName": "应用名", - "ipList": "IP列表", - "search": "搜索", - "clear": "清空", - "create": "新增", - "userCreator": "用户-应用", - "createUser": "创建人", - "createTime": "创建时间", - "desc": "业务来源", - "inputUser": "请输入用户名", - "inputApp": "请输入应用名", - "inputIpList": "请输入IP列表", - "inputDesc": "请输入业务来源", - "inputCreateUser": "请输入创建者", - "yourTagMapping": "您的标签映射", - "notEmpty": "不能为空", - "maxLen": "长度不能超过100", - "contentError": "仅限英文、数字、星号和下划线", - "contentError1": "仅限英文、数字和下划线", - "contentError2": "仅限英文、数字、下划线和横线", - "ipContentError": "请输入正确格式的IP地址(多个IP地址通过,分隔)", - "check": "检查", - "OK": "确定", - "Cancel": "取消", - "action": "操作", - "edit": "编辑", - "delete": "删除", - "userIsExisted": "用户标签已存在", - "addSuccessful": "添加成功", - "confirmDel": "确认删除", - "isConfirmDel": "确定要删除这条数据吗({name})", - "cluster": "集群标签", - "inputCluster": "请输入集群标签", - "rules": "规则", - "startTime": "开始时间", - "endTime": "结束时间", - "CPUThreshold": "CPU阈值(核)", - "MemoryThreshold": "内存阈值(G)", - "CPUPercentageThreshold": "CPU百分比阈值", - "MemoryPercentageThreshold": "内存百分比阈值", - "view": "查看", - "errorJson": "请输入格式正确且不为空的JSON", - "deleteSuccess": "删除成功", - "createRules": "新建", - "editRules": "编辑", - "viewRules": "查看规则", - "yes": "是", - "no": "否", - "isValid": "是否生效", - "engineType": "引擎类型", - "key": "配置Key", - "inputKey": "请输入Key", - "name": "配置名称", - "description": "配置描述", - "defaultValue": "默认值", - "validType": "校验类型", - "validRange": "校验范围", - "dataType": "边界值类型", - "category": "分类", - "treeName": "目录名称", - "none": "无", - "regex": "正则校验", - "numInterval": "数值校验", - "oft": "选择校验", - "enName": "配置名称(英文)", - "enDescription": "配置描述(英文)", - "enTreeName": "目录名称(英文)", - "noZH": "不允许输入中文", - "customLen": "长度不能超过{length}", - "timeError": "时间格式应为XX:XX,请输入正确的时间", - "thresholdError": "请输入0-10000的整数", - "percentageThresholdError": "请输入0-1的数字", - "enable": "启用", - "disable": "停用", - "confirmEnable": "确认是否启用[{name}]该规则?", - "confirmDisable": "确认是否停用[{name}]该规则?", - "enableSuccessfully": "启用成功", - "disableSuccessfully": "停用成功", - "templateRequired": "是否必填" - }, - "basedataManagement": { - "add": "新增", - "addUDFAdmin": "新增UDF管理员", - "remove": "删除", - "edit": "编辑", - "searchLabel": "模糊搜索:", - "searchPlaceholder": "请输入搜索内容", - "search": "搜索", - "action": "操作", - "categoryMaxLength": "分类名长度不能超过100", - "modal": { - "confirm": "确定", + "linkis": { + "refresh": "刷新", + "placeholderZip": "请输入工作空间python包路径(只支持zip)!", + "emptyString": "空字符串", + "addAppType": "新增应用类型", + "editContents": "编辑目录", + "ConfirmEdit": "完成编辑", + "serviceRegistryCenter": "服务注册中心", + "addParameterConfig": "新增参数配置", + "addEngineType": "新增引擎类型", + "editDescriptionEngineConfig": "编辑引擎配置", + "name": "名称", + "order": "顺序", + "description": "描述", + "noDescription": "暂无描述", + "addTags": "添加标签", + "find": "查询", + "initiator": "创建者", + "inputOwnerHint": "请输入创建者", + "jumpPage": "请在跳转页面查看……", + "editedSuccess": "修改成功", + "errorCode": "错误码", + "errorDescription": "错误描述", + "notLog": "未获取到日志!", + "unfold": "展开", + "fold": "收起", + "addVariable": "新增变量", + "defaultValue": "默认值", + "noDefaultValue": "无默认值", + "stop": "停止", + "tip": "提示", + "serverTip": "无结果集(resultLocation:null)", + "stopEngineTip": "请问确认要停止当前引擎?", + "log": "任务日志", + "detail": "任务详情", + "result": "任务结果", + "engineLog": "引擎日志", + "startUp": "启动", + "tagEdit": "编辑", + "tipForKill": "将要停止此ECM实例 【{instance}】上的空闲引擎", + "killAll": "停止空闲引擎", + "allEngine": "包含多用户引擎?", + "killFinishedInfo": "预计停止{killEngineNum}个引擎, 将释放 ECM {cores}cores,{memory}G 资源", + "noDataTextBeforeSearch": "请输入执行代码进行查询", + "noDataTextAfterSearch": "暂无数据", + "yes": "是", + "no": "否", + "keyTip": "不能为空", + "rename": "重命名", + "resources": "资源", + "instanceNum": "实例数", + "instanceName": "实例名称", + "reset": "重置", + "clearSearch": "清空", + "showOperations": "显示操作", + "hide": "隐藏操作", + "resetAll": "全部重置", + "remove": "移除", + "submit": "确定", + "search": "搜索", + "save": "保存", + "edit": "编辑", "cancel": "取消", + "create": "新建", + "noDataText": "暂无数据", + "jobId": "任务ID", + "userName": "用户名", + "password": "密码", + "unselect": "请选择", + "noselection": "请先选择", + "searchName": "请输入用户名搜索", + "generalView": "切换普通视图", + "showAdvancedSearch": "高级筛选", + "hideAdvancedSearch": "隐藏高级筛选", + "manageView": "切换管理员视图", + "back": "返回", + "download": "下载日志", + "confirmText": "确认下载该日志", + "prev": "上一步", + "complete": "完成", + "close": "关闭", + "udfName": "UDF名称", + "udfType": "UDF类型", + "nextPage": "下一页", + "previousPage": "上一页", + "all": "全部", + "common": "通用", + "tenant": "租户标签", + "inputTenant": "请输入租户标签", + "globalSettings": "全局设置", + "taskOverTimeTop": "任务耗时-TOP", + "taskTotalNum": "任务总数", + "engineTotalNum":"引擎总数", + "resultSet": { + "prefixText": "因为您的结果集较大,为了更好的体验,", + "linkText": "点击查看结果集", + "largeResultTips": "前端只展示5000条数据" + }, + "needPre": "需要先选择分类和输入用户名", + "warning": { + "api": "接口请求中,请稍候!", + "data": "数据请求中,请稍候!", + "waiting": "请等待接口返回!", + "biLoading": "正在和Visualis系统通讯,请稍候!", + "comingSoon": "尚未开源,敬请期待!" + }, + "resourceManagement": { + "resourceUsage": "资源使用情况", + "applicationList": "应用列表" + }, + "time": { + "second": "秒", + "minute": "分钟", + "hour": "小时", + "day": "天" + }, + "tableColumns": { + "instanceName": "实例名称", + "initiator": "启动者", + "engineInstance": "引擎实例", + "engineType": "引擎类型", + "serveType": "服务类型", + "appType": "应用类型", + "taskID": "任务ID", + "fileName": "来源", + "executionCode": "查询语句", + "status": "状态", + "costTime": "已耗时", + "label": "标签", + "engineVersion": "引擎版本", + "engineVersionCannotBeNull": "引擎版本不能为空", + "addEngineRules": "应用名称不能有特殊符号和空格", + "usedResources": "已用资源", + "lockedResource": "上锁资源", + "maximumAvailableResources": "最大可用资源", + "minimumAvailableResources": "最小可用资源", + "startTime": "启动时间", + "executeApplicationName": "引擎", + "requestApplicationName": "应用", + "user": "用户", + "createdTime": "创建时间", + "updateTime": "更新时间", + "failedReason": "关键信息", + "control": { + "title": "操作", + "label": "查看" + }, + "queenRemain": "队列剩余资源", + "queueUsed": "队列已用资源", + "queueTop": "队列上限资源", + "engineRemain": "引擎剩余资源", + "engineUsed": "引擎已用资源", + "engineTop": "引擎上限资源", + "versioTips": "如果没有对应的版本,请确认是否已安装对应的版本引擎物料", + "applicationRole": "应用方" + }, + "logLoading": "日志请求中,请稍后", + "title": "Linkis管理台", + "info": "{num} 条新消息", + "hint": "请在跳转页面查看……", + "sideNavList": { + "news": { + "name": "最新动态", + "children": { + "daily": "运营日报" + } + }, + "function": { + "name": "常用功能", + "children": { + "globalHistory": "全局历史", + "resource": "资源管理", + "resourceEngineConnList": "历史引擎", + "setting": "参数配置", + "dateReport": "全局变量", + "globalValiable": "常见问题", + "ECMManage": "ECM管理", + "microserviceManage": "微服务管理", + "udfFunctionTitle": "UDF函数", + "udfFunctionManage": "UDF管理", + "functionManagement": "函数管理", + "dataSourceManage": "数据源管理", + "userResourceManagement": "用户资源管理", + "tenantTagManagement": "租户标签管理", + "ipListManagement": "白名单管理", + "acrossClusterRule": "跨集群规则管理", + "errorCode": "错误码管理", + "gatewayAuthToken": "令牌管理", + "rmExternalResourceProvider": "扩展资源管理", + "udfManager": "用户管理", + "udfTree": "UDF分类", + "datasourceAccess": "数据源权限", + "datasourceEnv": "数据源环境", + "datasourceType": "数据源分类", + "datasourceTypeKey": "数据源配置项", + "EnginePluginManagement": "引擎物料管理", + "basedataManagement": "基础数据管理", + "codeQuery": "代码检索", + "engineConfigurationTemplate": "引擎配置模板", + "EngineConnList": "引擎列表", + "opsTool": "运维工具", + "userConfig": "用户配置", + "configManagement": "配置项管理", + "statisticsDashboard": "统计看板" + } + } + }, + "modal": { "modalTitle": "提示信息", - "modalFormat": "确定删除 {0} 这条记录?", - "modalDelete1": "确认是否删除[{name}]该记录?", - "modalDelete": "确认是否删除[{name}]该记录?", + "modalDelete": "确认是否删除[{name}]项?", + "modalDeleteRecord": "确认是否删除该记录?", + "modalDeleteTask": "确认是否停止当前选择任务?", + "modalDeleteInstance": "确认是否停止当前选择实例?", "modalDeleteSuccess": "删除成功", - "modalDeleteFail": "删除失败", - "modalAddSuccess": "添加成功", - "modalAddFail": "添加失败", - "modalEditSuccess": "编辑成功", - "modalEditFail": "编辑失败" + "modalDeleteFail": "删除失败" }, - "gatewayAuthToken": { - "tokenName": "名称", - "legalUsers": "用户", - "legalHosts": "主机", - "elapseDay": "有效天数", - "permanentlyValid": "永久有效", - "businessOwner": "所属者", - "createTime": "创建时间", - "updateTime": "更新时间", - "updateBy": "更新人", - "searchPlaceholder": "令牌名称/用户/主机", - "info": "有效天数: -1 表示永久", - "legalUsersInfo": "*允许所有用户;多用户使用,隔开,例如:user1,user2", - "legalUsersValidate": { - "empty": "请填写用户", - "format": "格式不正确,使用*或使用,分割,例如:user1,user2" + "formItems": { + "id": { + "placeholder": "请输入ID搜索" + }, + "date": { + "label": "起始时间", + "placeholder": "请选择起始日期" + }, + "instance": { + "label": "Entrance 实例", + "placeholder": "请输入实例" + }, + "creator": { + "label": "应用", + "placeholder": "请输入应用搜索" + }, + "engine": { + "label": "引擎" + }, + "status": { + "label": "状态" + }, + "appType": "应用类型", + "engineType": "引擎类型" }, - "legalHostsInfo": "*允许所有主机;多主机使用,隔开,例如:host1,host2", - "legalHostsInfoValidate": { - "empty": "请填写主机" + "columns": { + "taskID": "任务ID", + "fileName": "脚本名称", + "executionCode": "查询语句", + "status": "状态", + "costTime": "已耗时", + "executeApplicationName": "执行引擎", + "requestApplicationName": "创建者", + "progress": "进度", + "createdTime": "创建时间", + "updatedTime": "最后更新时间", + "control": { + "title": "操作", + "label": "查看" + }, + "moduleName": "模块名称", + "totalResource": "总资源", + "usedResource": "已用资源", + "initializingResource": "初始化中资源", + "memory": "内存", + "engineInstance": "引擎实例", + "applicationName": "应用名称", + "usedTime": "开始时间", + "engineStatus": "状态", + "username": "用户名" }, - "elapseDayValidate": { - "format": "格式不正确,使用*或使用,分割,例如:host1,host2", - "empty": "请填写有效天数", - "GT0": "有效天数必须大于0" - } - }, - "errorCode": { - "errorCode": "错误代码", - "errorDesc": "错误描述", - "errorRegex": "错误正则", - "searchPlaceholder": "代码/描述/正则" - }, - "rmExternalResourceProvider": { - "resourceType": "资源类型", - "name": "名称", - "labels": "标签", - "config": "配置信息", - "searchPlaceholder": "名称/标签/配置" - }, - "udfManager": { - "userName": "用户名", - "searchPlaceholder": "用户名", - "userNameValidate": { - "size": "用户名长度不能超过20个字符", - "empty": "请输入用户名" - } - }, - "udfTree": { - "name": "名称", - "category": "分类", - "userName": "用户名", - "description": "描述", - "parent": "父级", - "createTime": "创建时间", - "updateTime": "更新时间", - "searchPlaceholder": "名称/分类/描述/用户名", - "parentInfo": "父级分类,Root为根目录" - }, - "datasourceEnv": { - "envName": "环境名称", - "envDesc": "环境描述", - "name": "数据源名称", - "datasourceType": "数据源类型", - "keytab": "kerboros认证", - "parameter": "参数", - "createTime": "创建时间", - "createUser": "创建者", - "updateTime": "更新时间", - "modifyUser": "更新者", - "searchPlaceholder": "环境名称/环境描述/参数" - }, - "engineConfigurationTemplate": { - "engineLabelId": "引擎类型ID", - "advanced": "是否优先", - "defaultValue": "默认值", - "description": "描述", + "shortcuts": { + "week": "最近一周", + "month": "最近一个月", + "threeMonths": "最近三个月" + }, + "statusType": { + "all": "全部", + "inited": "排队中", + "running": "运行", + "succeed": "成功", + "cancelled": "取消", + "failed": "失败", + "scheduled": "资源申请中", + "timeout": "超时", + "retry": "重试", + "unknown": "未知" + }, + "engineTypes": { + "all": "全部" + }, + "header": "资源管理器", + "tabs": { + "first": "用户会话", + "second": "用户资源", + "third": "服务器资源" + }, + "noLimit": "无限制", + "core": "核", + "row": { + "applicationName": "应用名称", + "usedTime": "开始时间", + "engineStatus": "状态", + "engineInstance": "引擎实例", + "queueName": "队列名称", + "user": "用户", + "cpu": "已用的服务器CPU资源", + "memory": "已用的服务器内存资源", + "queueCpu": "已用的Yarn队列CPU资源", + "queueMemory": "已用的Yarn队列内存资源" + }, + "setting": { + "global": "全局", + "globalSetting": "通用设置", + "hide": "隐藏", + "show": "显示", + "advancedSetting": "高级设置", + "dataDev": "数据开发", + "maxLimit": "(资源模板指定上限值为{limit})" + }, + "globalValiable": "全局变量", + "rules": { + "first": { + "required": "变量 {text} 的key为空", + "lengthLimit": "长度应为 1 至 128 个字符", + "letterTypeLimit": "仅支持以字母开头,且不得存在空格和中文", + "placeholder": "请输入变量名" + }, + "second": { + "required": "变量 {text} 的value为空", + "lengthLimit": "长度应为 1 至 128 个字符", + "placeholder": "请输入变量值" + } + }, + "addArgs": "增加参数", + "emptyDataText": "暂无全局变量数据", + "sameName": "存在同名key", + "error": { + "validate": "有验证项未通过,请检查后再试!" + }, + "success": { + "update": "全局变量更新成功!" + }, + "searchAppType": "请输入应用类型", + "resetTip": "是否确认重置该资源?", + "resetAllTip": "是否重置全部用户资源(该操作只会清理用户资源记录,不清理已经产生的资源)", + "viewlog": "查看日志", + "datasource": { + "pleaseInput": "请输入", + "pleaseUpload": "请上传", + "datasourceSrc": "数据源", + "connectTest": "测试连接", + "sourceName": "数据源名称", + "sourceDec": "数据源描述", + "sourceType": "数据源类型", + "creator": "创建人", + "create": "新增数据源", + "exports": "批量导出数据源", + "imports": "批量导入数据源", + "overdue": "过期", + "versionList": "版本列表", + "dataSourceName": "数据源名称", + "dataSourceType": "数据源类型", + "createSystem": "创建系统", + "dataSourceEnv": "可用集群", + "status": "状态", + "permissions": "权限", + "label": "标签", + "version": "版本", + "desc": "描述", + "action": "操作", + "createUser": "创建人", + "createTime": "创建时间", + "versionDec": "版本描述", + "watch": "查看", + "rollback": "回滚", + "publish": "发布", + "initVersion": "初始化版本", + "updateVersion": "版本更新", + "published": "已发布", + "unpublish": "未发布", + "cannotPublish": "不可发布", + "used": "可用", + "commentValue": "从版本 {text} 回滚" + }, + "tenantTagManagement": { + "userName": "用户名", + "appName": "应用名", + "tenantTag": "租户标签", + "search": "搜索", + "clear": "清空", + "create": "新增", + "userCreator": "用户-应用", + "createUser": "创建人", + "createTime": "创建时间", + "desc": "业务来源", + "inputUser": "请输入用户名", + "inputApp": "请输入应用名", + "inputTenant": "请输入租户标签", + "inputDesc": "请输入业务来源", + "inputCreateUser": "请输入创建者", + "yourTagMapping": "您的标签映射", + "notEmpty": "不能为空", + "maxLen": "长度不能超过100", + "contentError": "仅限英文、数字、星号和下划线", + "contentError1": "仅限英文、数字和下划线", + "contentError2": "仅限英文、数字、下划线和横线", + "check": "检查", + "OK": "确定", + "Cancel": "取消", + "action": "操作", + "edit": "编辑", + "delete": "删除", + "userIsExisted": "用户标签已存在", + "addSuccessful": "添加成功", + "confirmDel": "确认删除", + "isConfirmDel": "确定要删除这条数据吗({name})" + }, + "ipListManagement": { + "userName": "用户名", + "appName": "应用名", + "ipList": "IP列表", + "search": "搜索", + "clear": "清空", + "create": "新增", + "userCreator": "用户-应用", + "createUser": "创建人", + "createTime": "创建时间", + "desc": "业务来源", + "inputUser": "请输入用户名", + "inputApp": "请输入应用名", + "inputIpList": "请输入IP列表", + "inputDesc": "请输入业务来源", + "inputCreateUser": "请输入创建者", + "yourTagMapping": "您的标签映射", + "notEmpty": "不能为空", + "maxLen": "长度不能超过100", + "contentError": "仅限英文、数字、星号和下划线", + "contentError1": "仅限英文、数字和下划线", + "contentError2": "仅限英文、数字、下划线和横线", + "ipContentError": "请输入正确格式的IP地址(多个IP地址通过,分隔)", + "check": "检查", + "OK": "确定", + "Cancel": "取消", + "action": "操作", + "edit": "编辑", + "delete": "删除", + "userIsExisted": "用户标签已存在", + "addSuccessful": "添加成功", + "confirmDel": "确认删除", + "isConfirmDel": "确定要删除这条数据吗({name})", + "cluster": "集群标签", + "inputCluster": "请输入集群标签", + "rules": "规则", + "startTime": "开始时间", + "endTime": "结束时间", + "CPUThreshold": "CPU阈值(核)", + "MemoryThreshold": "内存阈值(G)", + "CPUPercentageThreshold": "CPU百分比阈值", + "MemoryPercentageThreshold": "内存百分比阈值", + "view": "查看", + "errorJson": "请输入格式正确且不为空的JSON", + "deleteSuccess": "删除成功", + "createRules": "新建", + "editRules": "编辑", + "viewRules": "查看规则", + "yes": "是", + "no": "否", + "isValid": "是否生效", + "engineType": "引擎类型", + "key": "配置Key", + "inputKey": "请输入Key", + "name": "配置名称", + "description": "配置描述", + "defaultValue": "默认值", + "validType": "校验类型", + "validRange": "校验范围", + "dataType": "边界值类型", + "category": "分类", + "treeName": "目录名称", + "none": "无", + "regex": "正则校验", + "numInterval": "数值校验", + "oft": "选择校验", + "enName": "配置名称(英文)", + "enDescription": "配置描述(英文)", + "enTreeName": "目录名称(英文)", + "noZH": "不允许输入中文", + "customLen": "长度不能超过{length}", + "timeError": "时间格式应为XX:XX,请输入正确的时间", + "thresholdError": "请输入0-10000的整数", + "percentageThresholdError": "请输入0-1的数字", + "enable": "启用", + "disable": "停用", + "confirmEnable": "确认是否启用[{name}]该规则?", + "confirmDisable": "确认是否停用[{name}]该规则?", + "enableSuccessfully": "启用成功", + "disableSuccessfully": "停用成功", + "templateRequired": "是否必填" + }, + "basedataManagement": { + "add": "新增", + "addUDFAdmin": "新增UDF管理员", + "remove": "删除", + "edit": "编辑", + "searchLabel": "模糊搜索:", + "searchPlaceholder": "请输入搜索内容", + "search": "搜索", + "action": "操作", + "categoryMaxLength": "分类名长度不能超过100", + "modal":{ + "confirm": "确定", + "cancel": "取消", + "modalTitle": "提示信息", + "modalFormat": "确定删除 {0} 这条记录?", + "modalDelete1": "确认是否删除[{name}]该记录?", + "modalDelete": "确认是否删除[{name}]该记录?", + "modalDeleteSuccess": "删除成功", + "modalDeleteFail": "删除失败", + "modalAddSuccess": "添加成功", + "modalAddFail": "添加失败", + "modalEditSuccess": "编辑成功", + "modalEditFail": "编辑失败" + }, + "gatewayAuthToken": { + "tokenName": "名称", + "legalUsers": "用户", + "legalHosts": "主机", + "elapseDay": "有效天数", + "permanentlyValid": "永久有效", + "businessOwner": "所属者", + "createTime":"创建时间", + "updateTime": "更新时间", + "updateBy": "更新人", + "searchPlaceholder": "令牌名称/用户/主机", + "info":"有效天数: -1 表示永久", + "legalUsersInfo": "*允许所有用户;多用户使用,隔开,例如:user1,user2", + "legalUsersValidate": { + "empty": "请填写用户", + "format": "格式不正确,使用*或使用,分割,例如:user1,user2" + }, + "legalHostsInfo": "*允许所有主机;多主机使用,隔开,例如:host1,host2", + "legalHostsInfoValidate": { + "empty": "请填写主机" + }, + "elapseDayValidate": { + "format": "格式不正确,使用*或使用,分割,例如:host1,host2", + "empty": "请填写有效天数", + "GT0": "有效天数必须大于0" + } + }, + "errorCode": { + "errorCode": "错误代码", + "errorDesc": "错误描述", + "errorRegex": "错误正则", + "searchPlaceholder": "代码/描述/正则" + }, + "rmExternalResourceProvider": { + "resourceType": "资源类型", + "name": "名称", + "labels": "标签", + "config": "配置信息", + "searchPlaceholder": "名称/标签/配置" + }, + "udfManager": { + "userName": "用户名", + "searchPlaceholder": "用户名", + "userNameValidate": { + "size": "用户名长度不能超过20个字符", + "empty": "请输入用户名" + } + }, + "udfTree": { + "name": "名称", + "category": "分类", + "userName": "用户名", + "description": "描述", + "parent": "父级", + "createTime": "创建时间", + "updateTime": "更新时间", + "searchPlaceholder": "名称/分类/描述/用户名", + "parentInfo": "父级分类,Root为根目录" + }, + "datasourceEnv": { + "envName": "环境名称", + "envDesc": "环境描述", + "name": "数据源名称", + "datasourceType": "数据源类型", + "keytab": "kerboros认证", + "parameter": "参数", + "createTime": "创建时间", + "createUser": "创建者", + "updateTime": "更新时间", + "modifyUser": "更新者", + "searchPlaceholder": "环境名称/环境描述/参数" + }, + "engineConfigurationTemplate": { + "engineLabelId": "引擎类型ID", + "advanced": "是否优先", + "defaultValue": "默认值", + "description": "描述", + "engineConnType": "引擎类型", + "key": "键值", + "level": "等级", + "name": "名称", + "treeName": "树名称", + "validateRange": "验证范围", + "validateType": "验证类型", + "hidden": "隐藏", + "id": "ID", + "engineLabelList": "引擎类型列表", + "yes": "是", + "no": "否", + "delSuccess": "删除成功", + "delFail": "删除失败", + "edit": "编辑" + }, + "datasourceType": { + "name": "名称", + "description": "描述", + "option": "选项", + "classifier": "分类", + "icon": "图标", + "layers": "层级", + "searchPlaceholder": "名称/描述/分类", + "layersValidate": { + "range": "最小为0" + } + }, + "datasourceTypeKey": { + "key": "键名", + "dataSourceType": "数据源类型", + "name": "名称", + "nameEn": "名称(英文)", + "valueType": "值类型", + "defaultValue": "默认值", + "scope": "范围", + "require": "必要字段", + "description": "描述", + "descriptionEn": "描述(英文)", + "valueRegex": "值校验规则", + "createTime": "创建时间", + "updateTime": "更新时间", + "searchPlaceholder": "名称", + "searchName": "名称", + "searchType": "类型", + "all": "全部" + } + }, + "EnginePluginManagement": { "engineConnType": "引擎类型", - "key": "键值", - "level": "等级", - "name": "名称", - "treeName": "树名称", - "validateRange": "验证范围", - "validateType": "验证类型", - "hidden": "隐藏", - "id": "ID", - "engineLabelList": "引擎类型列表", - "yes": "是", - "no": "否", - "delSuccess": "删除成功", - "delFail": "删除失败", - "edit": "编辑" - }, - "datasourceType": { - "name": "名称", - "description": "描述", - "option": "选项", - "classifier": "分类", - "icon": "图标", - "layers": "层级", - "searchPlaceholder": "名称/描述/分类", - "layersValidate": { - "range": "最小为0" - } - }, - "datasourceTypeKey": { - "key": "键名", - "dataSourceType": "数据源类型", - "name": "名称", - "nameEn": "名称(英文)", - "valueType": "值类型", - "defaultValue": "默认值", - "scope": "范围", - "require": "必要字段", - "description": "描述", - "descriptionEn": "描述(英文)", - "valueRegex": "值校验规则", + "engineConnVersion": "引擎版本", + "create": "新增引擎插件", + "fileName": "文件名称", + "fileSize": "文件大小", + "lastModified": "文件更新时间", + "bmlResourceId": "物料资源Id", + "bmlResourceVersion": "物料资源版本", + "lastUpdateTime": "更新时间", "createTime": "创建时间", - "updateTime": "更新时间", - "searchPlaceholder": "名称", - "searchName": "名称", - "searchType": "类型", - "all": "全部" - } - }, - "EnginePluginManagement": { - "engineConnType": "引擎类型", - "engineConnVersion": "引擎版本", - "create": "新增引擎插件", - "fileName": "文件名称", - "fileSize": "文件大小", - "lastModified": "文件更新时间", - "bmlResourceId": "物料资源Id", - "bmlResourceVersion": "物料资源版本", - "lastUpdateTime": "更新时间", - "createTime": "创建时间", - "Reset": "重置", - "delete": "删除已选物料的版本", - "update": "更新引擎插件", - "updateFileOnly": "更新", - "resourceVersion": "引擎物料bml版本", - "user": "所属人", - "deleteCurrentbml": "删除", - "versionList": "版本列表", - "rollback": "回滚", - "action": "操作" - }, - "codeQuery": { - "executionCode": "执行代码", - "dateRange": "时间范围", - "engineType": "引擎类型", - "placeholder": { - "executionCode": "请输入执行代码", + "Reset": "重置", + "delete": "删除已选物料的版本", + "update": "更新引擎插件", + "updateFileOnly": "更新", + "resourceVersion": "引擎物料bml版本", + "user": "所属人", + "deleteCurrentbml": "删除", + "versionList": "版本列表", + "rollback": "回滚", + "action": "操作" + }, + "codeQuery": { + "executionCode": "执行代码", "dateRange": "时间范围", - "status": "状态" + "engineType": "引擎类型", + "placeholder": { + "executionCode": "请输入执行代码", + "dateRange": "时间范围", + "status": "状态" + }, + "inputCode": "请输入执行代码", + "id": "任务ID", + "code": "代码", + "check": "查看", + "search": "搜索", + "clear": "清空", + "status": "状态", + "submitUser": "提交用户", + "createdTime": "创建时间", + "searchRange": "仅可查询T-1的历史代码" }, - "inputCode": "请输入执行代码", - "id": "任务ID", - "code": "代码", - "check": "查看", - "search": "搜索", - "clear": "清空", - "status": "状态", - "submitUser": "提交用户", - "createdTime": "创建时间", - "searchRange": "仅可查询T-1的历史代码" - }, - "userConfig": { - "keyName": "配置项名称", - "defaultValue": "配置项默认值", - "configVKey": "配置项", - "configValue": "配置值", - "configValuePro": "请输入配置值", - "versionInputPro": "请输入引擎版本" - } + "userConfig": { + "keyName": "配置项名称", + "defaultValue": "配置项默认值", + "configVKey": "配置项", + "configValue": "配置值", + "configValuePro": "请输入配置值", + "versionInputPro": "请输入引擎版本" + } } } }