You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@streampark.apache.org by "saLeox (via GitHub)" <gi...@apache.org> on 2023/02/15 08:00:03 UTC

[GitHub] [incubator-streampark] saLeox opened a new pull request, #2331: [Feature][Issue-2191][Issue-2215] Support external link

saLeox opened a new pull request, #2331:
URL: https://github.com/apache/incubator-streampark/pull/2331

   <!--
   Thank you for contributing to StreamPark! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   ## Contribution Checklist
   
     - If this is your first time, please read our contributor guidelines: [Submit Code](https://streampark.apache.org/community/submit_guide/submit_code).
   
     - Make sure that the pull request corresponds to a [GITHUB issue](https://github.com/apache/incubator-streampark/issues).
   
     - Name the pull request in the form "[Feature] Title of the pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
   
     - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
   
     - If the PR is unfinished, add `[WIP]` in your PR title, e.g., `[WIP][Feature] Title of the pull request`.
   
   -->
   
   ## What changes were proposed in this pull request
   
   Issue Number: close #2191  #2215 
   
   <!--(For example: This pull request proposed to add checkstyle plugin).-->
   
   ## Brief change log
   There should be a place to hold and display the useful external link (such as Job Metrics / Savepoint root path, etc) for each Flink Job.
   
   This feature will allow user to customise their own external link, display it as a badge inside the Flink Application detail page, and jump to other page after clicking it.
   
   For example, I am using Grafana, the link url format will be fixed in the following way:
   [https://grafana/{template_name}/flink-monitoring?var-JobId=var-JobId={job_id}](https://grafana/%7Btemplate_name%7D/flink-monitoring?var-JobId=var-JobId=%7Bjob_id%7D)
   
   The value of place holder, job_id, can be fetched from existing meta data of Flink Job easily.
   
   <!--*(for example:)*
   - *Add maven-checkstyle-plugin to root pom.xml*
   -->
   
   ## Verifying this change
   
   <!--*(Please pick either of the following options)*-->
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   ## Does this pull request potentially affect one of the following parts
    - Dependencies (does it add or upgrade a dependency): (no)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-streampark] wolfboys commented on a diff in pull request #2331: [Feature][Issue-2191][Issue-2215] Support external link

Posted by "wolfboys (via GitHub)" <gi...@apache.org>.
wolfboys commented on code in PR #2331:
URL: https://github.com/apache/incubator-streampark/pull/2331#discussion_r1117822697


##########
streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/setting.ts:
##########
@@ -179,6 +180,29 @@ export default {
       clusterId: '集群ID',
     },
   },
+  externalLink: {
+    externalLinkSetting: '外部链接',
+    form: {
+      badgeLabel: '徽章标签',
+      badgeLabelPlaceholder: '请输入标签的名称',
+      badgeName: '徽章名字',
+      badgeNamePlaceholder: '请输入徽章名字',
+      badgeNameIsRequired: '徽章名字是必填',
+      badgeColor: '徽章颜色',
+      badgeColorIsRequired: '徽章颜色是必选',
+      linkUrl: '链接',
+      linkUrlPlaceholder: '请输入链接',
+      linkUrlIsRequired: '链接是必填',
+    },
+    operateMessage: {
+      createLinkSuccessful: '成功新建外部链接!',
+      createLinkFailed: '创建外部链接失败!',
+      updateLinkSuccessful: '成功更新外部链接!',
+      updateLinkFailed: '更新外部链接失败!',

Review Comment:
   I suggest change '外边链接' to '扩展链接'



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-streampark] asuiah commented on a diff in pull request #2331: [Feature][Issue-2191][Issue-2215] Support external link

Posted by "asuiah (via GitHub)" <gi...@apache.org>.
asuiah commented on code in PR #2331:
URL: https://github.com/apache/incubator-streampark/pull/2331#discussion_r1117931541


##########
streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/setting.ts:
##########
@@ -179,6 +180,29 @@ export default {
       clusterId: '集群ID',
     },
   },
+  externalLink: {
+    externalLinkSetting: '外部链接',

Review Comment:
   Sure will update for this. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-streampark] saLeox commented on a diff in pull request #2331: [Feature][Issue-2191][Issue-2215] Support external link

Posted by "saLeox (via GitHub)" <gi...@apache.org>.
saLeox commented on code in PR #2331:
URL: https://github.com/apache/incubator-streampark/pull/2331#discussion_r1109338090


##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/entity/ExternalLink.java:
##########
@@ -0,0 +1,52 @@
+/*
+ * 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.streampark.console.core.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+@TableName("t_external_link")
+public class ExternalLink implements Serializable {
+  @TableId(type = IdType.AUTO)
+  private Long id;
+
+  @NotBlank(message = "{required}")
+  private String name;
+
+  @NotBlank(message = "{required}")
+  private String linkUrl;
+
+  @NotBlank(message = "{required}")
+  private String imageUrl;

Review Comment:
   Better to let user maintain the badges on their own,  and we don't need to help persist the any info related to badges.
   
   They can generate badge from third party easily, such as https://shields.io/.



##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/entity/ExternalLink.java:
##########
@@ -0,0 +1,52 @@
+/*
+ * 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.streampark.console.core.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+@TableName("t_external_link")
+public class ExternalLink implements Serializable {
+  @TableId(type = IdType.AUTO)
+  private Long id;
+
+  @NotBlank(message = "{required}")
+  private String name;
+
+  @NotBlank(message = "{required}")
+  private String linkUrl;
+
+  @NotBlank(message = "{required}")
+  private String imageUrl;

Review Comment:
   Better to let user maintain the badges on their own,  and we don't need to help persist the any info related to badges. They can generate badge from third party easily, such as https://shields.io/.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-streampark] wolfboys commented on pull request #2331: [Feature][Issue-2191][Issue-2215] Support external link

Posted by "wolfboys (via GitHub)" <gi...@apache.org>.
wolfboys commented on PR #2331:
URL: https://github.com/apache/incubator-streampark/pull/2331#issuecomment-1431785858

   Thanks for your contribution, it looks good, I'll review it later


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-streampark] wolfboys commented on a diff in pull request #2331: [Feature][Issue-2191][Issue-2215] Support external link

Posted by "wolfboys (via GitHub)" <gi...@apache.org>.
wolfboys commented on code in PR #2331:
URL: https://github.com/apache/incubator-streampark/pull/2331#discussion_r1109171803


##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ExternalLinkServiceImpl.java:
##########
@@ -0,0 +1,124 @@
+/*
+ * 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.streampark.console.core.service.impl;
+
+import org.apache.streampark.common.util.Utils;
+import org.apache.streampark.console.core.entity.Application;
+import org.apache.streampark.console.core.entity.ExternalLink;
+import org.apache.streampark.console.core.enums.PlaceholderType;
+import org.apache.streampark.console.core.mapper.ExternalLinkMapper;
+import org.apache.streampark.console.core.service.ApplicationService;
+import org.apache.streampark.console.core.service.ExternalLinkService;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.PropertyPlaceholderHelper;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+
+@Slf4j
+@Service
+@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
+public class ExternalLinkServiceImpl extends ServiceImpl<ExternalLinkMapper, ExternalLink>
+    implements ExternalLinkService {
+
+  @Autowired private ApplicationService applicationService;
+
+  @Override
+  public void create(ExternalLink externalLink) {
+    if (!this.check(externalLink)) {
+      return;
+    }
+    externalLink.setCreateTime(new Date());
+    externalLink.setModifyTime(new Date());
+    externalLink.setId(null);
+    this.save(externalLink);
+  }
+
+  @Override
+  public void update(ExternalLink externalLink) {
+    if (!this.check(externalLink)) {
+      return;
+    }
+    externalLink.setModifyTime(new Date());
+    baseMapper.updateById(externalLink);
+  }
+
+  @Override
+  public void delete(Long linkId) {
+    baseMapper.deleteById(linkId);
+  }
+
+  @Override
+  public List<ExternalLink> render(Long appId) {
+    Application app = applicationService.getById(appId);
+    Utils.required(app != null, "Application doesn't exist");

Review Comment:
   Utils.notNull(app, msg...)



##########
streampark-console/streampark-console-service/src/main/assembly/script/schema/mysql-schema.sql:
##########
@@ -492,5 +492,17 @@ create table `t_alert_config` (
   index `inx_alert_user` (`user_id`) using btree
 ) engine = innodb default charset = utf8mb4 collate = utf8mb4_general_ci;
 
+-- ----------------------------
+-- Table of t_external_link
+-- ----------------------------
+drop table if exists `t_external_link`;
+CREATE TABLE `t_external_link` (
+  `id` bigint not null auto_increment primary key,
+  `name` varchar(255) collate utf8mb4_general_ci default null,
+  `link_url` varchar(255) collate utf8mb4_general_ci default null,
+  `image_url` varchar(255) collate utf8mb4_general_ci default null,

Review Comment:
   If the image address is base64, the varchar(255) length may be too short



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-streampark] wolfboys commented on a diff in pull request #2331: [Feature][Issue-2191][Issue-2215] Support external link

Posted by "wolfboys (via GitHub)" <gi...@apache.org>.
wolfboys commented on code in PR #2331:
URL: https://github.com/apache/incubator-streampark/pull/2331#discussion_r1109340830


##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/entity/ExternalLink.java:
##########
@@ -0,0 +1,52 @@
+/*
+ * 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.streampark.console.core.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+@TableName("t_external_link")
+public class ExternalLink implements Serializable {
+  @TableId(type = IdType.AUTO)
+  private Long id;
+
+  @NotBlank(message = "{required}")
+  private String name;
+
+  @NotBlank(message = "{required}")
+  private String linkUrl;
+
+  @NotBlank(message = "{required}")
+  private String imageUrl;

Review Comment:
   > Better to let user maintain the badges on their own, and we don't need to help persist the any info related to badges. They can generate badge from third party easily, such as https://shields.io/.
   
   generate badge from third party I think this still has learning costs. We can build several styles and colors for users to choose, and also support user-defined badge colors. The text in the badge must be provided by the user.
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-streampark] wolfboys commented on a diff in pull request #2331: [Feature][Issue-2191][Issue-2215] Support external link

Posted by "wolfboys (via GitHub)" <gi...@apache.org>.
wolfboys commented on code in PR #2331:
URL: https://github.com/apache/incubator-streampark/pull/2331#discussion_r1117823078


##########
streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/setting.ts:
##########
@@ -179,6 +180,29 @@ export default {
       clusterId: '集群ID',
     },
   },
+  externalLink: {
+    externalLinkSetting: '外部链接',

Review Comment:
   how about `扩展链接` ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-streampark] wolfboys commented on a diff in pull request #2331: [Feature][Issue-2191][Issue-2215] Support external link

Posted by "wolfboys (via GitHub)" <gi...@apache.org>.
wolfboys commented on code in PR #2331:
URL: https://github.com/apache/incubator-streampark/pull/2331#discussion_r1109180974


##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/entity/ExternalLink.java:
##########
@@ -0,0 +1,52 @@
+/*
+ * 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.streampark.console.core.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+@TableName("t_external_link")
+public class ExternalLink implements Serializable {
+  @TableId(type = IdType.AUTO)
+  private Long id;
+
+  @NotBlank(message = "{required}")
+  private String name;
+
+  @NotBlank(message = "{required}")
+  private String linkUrl;
+
+  @NotBlank(message = "{required}")
+  private String imageUrl;

Review Comment:
   about the badge, it is too complicated for the user to provide the url address. I think a good way is to implement the style of the badge on the front end, and the user only needs to provide the text to be displayed. what do you think?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-streampark] wolfboys commented on pull request #2331: [Feature][Issue-2191][Issue-2215] Support external link

Posted by "wolfboys (via GitHub)" <gi...@apache.org>.
wolfboys commented on PR #2331:
URL: https://github.com/apache/incubator-streampark/pull/2331#issuecomment-1443661593

   please resolved the conflicts, thx


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-streampark] wolfboys commented on a diff in pull request #2331: [Feature][Issue-2191][Issue-2215] Support external link

Posted by "wolfboys (via GitHub)" <gi...@apache.org>.
wolfboys commented on code in PR #2331:
URL: https://github.com/apache/incubator-streampark/pull/2331#discussion_r1117822697


##########
streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/setting.ts:
##########
@@ -179,6 +180,29 @@ export default {
       clusterId: '集群ID',
     },
   },
+  externalLink: {
+    externalLinkSetting: '外部链接',
+    form: {
+      badgeLabel: '徽章标签',
+      badgeLabelPlaceholder: '请输入标签的名称',
+      badgeName: '徽章名字',
+      badgeNamePlaceholder: '请输入徽章名字',
+      badgeNameIsRequired: '徽章名字是必填',
+      badgeColor: '徽章颜色',
+      badgeColorIsRequired: '徽章颜色是必选',
+      linkUrl: '链接',
+      linkUrlPlaceholder: '请输入链接',
+      linkUrlIsRequired: '链接是必填',
+    },
+    operateMessage: {
+      createLinkSuccessful: '成功新建外部链接!',
+      createLinkFailed: '创建外部链接失败!',
+      updateLinkSuccessful: '成功更新外部链接!',
+      updateLinkFailed: '更新外部链接失败!',

Review Comment:
   I suggest change '外部链接' to '扩展链接'



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-streampark] wolfboys commented on a diff in pull request #2331: [Feature][Issue-2191][Issue-2215] Support external link

Posted by "wolfboys (via GitHub)" <gi...@apache.org>.
wolfboys commented on code in PR #2331:
URL: https://github.com/apache/incubator-streampark/pull/2331#discussion_r1109342927


##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/entity/ExternalLink.java:
##########
@@ -0,0 +1,52 @@
+/*
+ * 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.streampark.console.core.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+@TableName("t_external_link")
+public class ExternalLink implements Serializable {
+  @TableId(type = IdType.AUTO)
+  private Long id;
+
+  @NotBlank(message = "{required}")
+  private String name;
+
+  @NotBlank(message = "{required}")
+  private String linkUrl;
+
+  @NotBlank(message = "{required}")
+  private String imageUrl;

Review Comment:
   > Better to let user maintain the badges on their own, and we don't need to help persist the any info related to badges. They can generate badge from third party easily, such as https://shields.io/.
   
   When introducing any component and service, as long as it is directly facing to the user use, it is necessary to consider the ease of use and the user's cost of use. The simpler the better



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-streampark] saLeox commented on a diff in pull request #2331: [Feature][Issue-2191][Issue-2215] Support external link

Posted by "saLeox (via GitHub)" <gi...@apache.org>.
saLeox commented on code in PR #2331:
URL: https://github.com/apache/incubator-streampark/pull/2331#discussion_r1115217485


##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/entity/ExternalLink.java:
##########
@@ -0,0 +1,52 @@
+/*
+ * 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.streampark.console.core.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+@TableName("t_external_link")
+public class ExternalLink implements Serializable {
+  @TableId(type = IdType.AUTO)
+  private Long id;
+
+  @NotBlank(message = "{required}")
+  private String name;
+
+  @NotBlank(message = "{required}")
+  private String linkUrl;
+
+  @NotBlank(message = "{required}")
+  private String imageUrl;

Review Comment:
   Now we enable user to customise the badge in the similar way as  https://shields.io/.
   Please help review again.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-streampark] saLeox closed pull request #2331: [Feature][Issue-2191][Issue-2215] Support external link

Posted by "saLeox (via GitHub)" <gi...@apache.org>.
saLeox closed pull request #2331: [Feature][Issue-2191][Issue-2215] Support external link
URL: https://github.com/apache/incubator-streampark/pull/2331


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org