From 9aff8c85bacd991570609319fc440d347b1a0b3a Mon Sep 17 00:00:00 2001 From: ShawHee Date: Thu, 15 Aug 2024 16:55:26 +0800 Subject: [PATCH] add id in external link (#3967) Co-authored-by: ShawHee --- .../streampark/console/core/enums/PlaceholderTypeEnum.java | 2 ++ .../console/core/service/impl/ExternalLinkServiceImpl.java | 1 + .../src/views/setting/extlink/components/Modal.vue | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/enums/PlaceholderTypeEnum.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/enums/PlaceholderTypeEnum.java index 5f453a7082..46d6115270 100644 --- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/enums/PlaceholderTypeEnum.java +++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/enums/PlaceholderTypeEnum.java @@ -20,6 +20,8 @@ /** configFile Type enum */ public enum PlaceholderTypeEnum { + ID("id"), + JOB_ID("job_id"), JOB_NAME("job_name"), diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ExternalLinkServiceImpl.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ExternalLinkServiceImpl.java index d2eae02af1..c1fe57b62f 100644 --- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ExternalLinkServiceImpl.java +++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ExternalLinkServiceImpl.java @@ -85,6 +85,7 @@ public List render(Long appId) { private void renderLinkUrl(ExternalLink link, Application app) { Map placeholderValueMap = new HashMap<>(); + placeholderValueMap.put(PlaceholderTypeEnum.ID.get(), String.valueOf(app.getId())); placeholderValueMap.put(PlaceholderTypeEnum.JOB_ID.get(), app.getJobId()); placeholderValueMap.put(PlaceholderTypeEnum.JOB_NAME.get(), app.getJobName()); placeholderValueMap.put(PlaceholderTypeEnum.YARN_ID.get(), app.getClusterId()); diff --git a/streampark-console/streampark-console-webapp/src/views/setting/extlink/components/Modal.vue b/streampark-console/streampark-console-webapp/src/views/setting/extlink/components/Modal.vue index e2545f8443..b8c4381aa7 100644 --- a/streampark-console/streampark-console-webapp/src/views/setting/extlink/components/Modal.vue +++ b/streampark-console/streampark-console-webapp/src/views/setting/extlink/components/Modal.vue @@ -98,7 +98,7 @@ h( 'span', { class: 'tip-info' }, - 'Supported variables: {job_id}, {yarn_id}, {job_name},Example: https://grafana/flink-monitoring?var-JobId=var-JobId={job_id}', + 'Supported variables: {id}, {job_id}, {yarn_id}, {job_name},Example: https://grafana/flink-monitoring?var-JobId=var-JobId={job_id}', ), rules: [ {