You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampark.apache.org by be...@apache.org on 2024/02/27 09:32:46 UTC
(incubator-streampark) 01/01: [Improve] docker|email settings improvement
This is an automated email from the ASF dual-hosted git repository.
benjobs pushed a commit to branch settings
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git
commit de1daf7be7268930de6428ecdc593171caf60248
Author: benjobs <be...@gmail.com>
AuthorDate: Tue Feb 27 17:32:32 2024 +0800
[Improve] docker|email settings improvement
---
.../src/main/resources/db/data-h2.sql | 2 +-
.../src/assets/icons/edit.svg | 2 +-
.../src/assets/icons/nginx.svg | 1 +
.../src/assets/icons/save.svg | 1 +
.../src/assets/icons/settings.svg | 3 +-
.../src/assets/icons/settings2.svg | 1 +
.../src/views/setting/System/SettingList.vue | 34 ++++++++++++----------
7 files changed, 24 insertions(+), 20 deletions(-)
diff --git a/streampark-console/streampark-console-service/src/main/resources/db/data-h2.sql b/streampark-console/streampark-console-service/src/main/resources/db/data-h2.sql
index 2067af7da..1e9c4bf8a 100644
--- a/streampark-console/streampark-console-service/src/main/resources/db/data-h2.sql
+++ b/streampark-console/streampark-console-service/src/main/resources/db/data-h2.sql
@@ -240,7 +240,7 @@ insert into `t_setting` values (11, 'docker.register.address', null, 'Docker Reg
insert into `t_setting` values (12, 'docker.register.user', null, 'Docker Register User', 'Docker container service authentication username', 1);
insert into `t_setting` values (13, 'docker.register.password', null, 'Docker Register Password', 'Docker container service authentication password', 1);
insert into `t_setting` values (14, 'docker.register.namespace', null, 'Namespace for docker image used in docker building env and target image register', 'Docker namespace', 1);
-insert into `t_setting` values (15, 'ingress.mode.default', null, 'Automatically generate an nginx-based ingress by passing in a domain name', 'Ingress domain address', 1);
+insert into `t_setting` values (15, 'ingress.mode.default', null, 'Ingress domain address', 'Automatically generate an nginx-based ingress by passing in a domain name', 1);
-- ----------------------------
-- Records of t_user
diff --git a/streampark-console/streampark-console-webapp/src/assets/icons/edit.svg b/streampark-console/streampark-console-webapp/src/assets/icons/edit.svg
index 2a71bf093..1a12b53ee 100644
--- a/streampark-console/streampark-console-webapp/src/assets/icons/edit.svg
+++ b/streampark-console/streampark-console-webapp/src/assets/icons/edit.svg
@@ -1 +1 @@
-<svg t="1620578438157" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2776" width="200" height="200"><path d="M595.344218 147.059903L124.550908 617.923026a130.060986 130.060986 0 0 0-33.486806 57.19984l-74.629734 265.288109-15.638036 55.850128a21.967717 21.967717 0 0 0 5.585013 21.339403 22.223697 22.223697 0 0 0 21.479028 5.585013l55.850129-15.638036c164.315731-46.309065 234.058579-65.85661 265.451005-74.629734a128.804358 128.804358 0 0 0 56. [...]
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1709024206856" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4211" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M975.292814 48.762787c-65.054118-65.01705-170.864362-65.01705-235.918479 0L71.003511 717.133611c-0.315077 0.315077-0.500416 0.70429-0.778425 1.0379-0.389213 0. [...]
\ No newline at end of file
diff --git a/streampark-console/streampark-console-webapp/src/assets/icons/nginx.svg b/streampark-console/streampark-console-webapp/src/assets/icons/nginx.svg
new file mode 100644
index 000000000..edea410d8
--- /dev/null
+++ b/streampark-console/streampark-console-webapp/src/assets/icons/nginx.svg
@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1709024889720" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2632" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M77.483 512.683V275.797c-0.342-8.533 4.096-16.384 11.946-20.138L498.347 19.456c7.509-4.437 15.701-5.461 22.869-1.024L931.84 255.659c7.168 4.096 11.264 11.946 1 [...]
diff --git a/streampark-console/streampark-console-webapp/src/assets/icons/save.svg b/streampark-console/streampark-console-webapp/src/assets/icons/save.svg
new file mode 100644
index 000000000..e68d48a10
--- /dev/null
+++ b/streampark-console/streampark-console-webapp/src/assets/icons/save.svg
@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1709024733288" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1610" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M426.666667 128h-149.333334v234.453333c0 12.074667 9.450667 21.546667 21.205334 21.546667h298.922666c11.626667 0 21.205333-9.6 21.205334-21.546667V128h-64v149. [...]
diff --git a/streampark-console/streampark-console-webapp/src/assets/icons/settings.svg b/streampark-console/streampark-console-webapp/src/assets/icons/settings.svg
index e9c5f4b7e..aad0880e4 100644
--- a/streampark-console/streampark-console-webapp/src/assets/icons/settings.svg
+++ b/streampark-console/streampark-console-webapp/src/assets/icons/settings.svg
@@ -4,6 +4,5 @@
xmlns="http://www.w3.org/2000/svg" p-id="2563" xmlns:xlink="http://www.w3.org/1999/xlink"
width="200" height="200">
<path
- d="M361.088 149.482667c0-59.093333 48.384-106.816 107.626667-106.816h86.570666c59.349333 0 107.626667 47.637333 107.626667 106.816v29.162666a368.213333 368.213333 0 0 1 67.050667 37.098667l25.429333-14.464c51.328-29.226667 117.013333-11.882667 146.752 38.869333l43.306667 73.898667c29.994667 51.2 12.16 116.693333-39.616 146.133333l-22.528 12.821334a361.6 361.6 0 0 1 0 77.994666l22.528 12.8c51.754667 29.44 69.610667 94.933333 39.594666 146.154667l-43.306666 73.898667c-29.717333 50.7733 [...]
- p-id="2564"></path>
+ d="M361.088 149.482667c0-59.093333 48.384-106.816 107.626667-106.816h86.570666c59.349333 0 107.626667 47.637333 107.626667 106.816v29.162666a368.213333 368.213333 0 0 1 67.050667 37.098667l25.429333-14.464c51.328-29.226667 117.013333-11.882667 146.752 38.869333l43.306667 73.898667c29.994667 51.2 12.16 116.693333-39.616 146.133333l-22.528 12.821334a361.6 361.6 0 0 1 0 77.994666l22.528 12.8c51.754667 29.44 69.610667 94.933333 39.594666 146.154667l-43.306666 73.898667c-29.717333 50.7733 [...]
</svg>
diff --git a/streampark-console/streampark-console-webapp/src/assets/icons/settings2.svg b/streampark-console/streampark-console-webapp/src/assets/icons/settings2.svg
new file mode 100644
index 000000000..762a6ac3b
--- /dev/null
+++ b/streampark-console/streampark-console-webapp/src/assets/icons/settings2.svg
@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1709025744880" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5453" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M972.497609 405.74732l-98.044936-19.647386c-4.927846-14.175557-10.751664-27.935127-17.183463-41.246711l55.550264-83.325396c16.927471-25.375207 13.567576-59.198 [...]
diff --git a/streampark-console/streampark-console-webapp/src/views/setting/System/SettingList.vue b/streampark-console/streampark-console-webapp/src/views/setting/System/SettingList.vue
index ea621b183..24b70f133 100644
--- a/streampark-console/streampark-console-webapp/src/views/setting/System/SettingList.vue
+++ b/streampark-console/streampark-console-webapp/src/views/setting/System/SettingList.vue
@@ -29,21 +29,13 @@
import { useI18n } from '/@/hooks/web/useI18n';
const AvatarMap = {
- 'streampark.maven.settings': 'settings',
+ 'streampark.maven.settings': 'settings2',
'streampark.maven.central.repository': 'maven',
'streampark.maven.auth.user': 'user',
'streampark.maven.auth.password': 'mvnpass',
'docker.register.address': 'docker',
- 'docker.register.namespace': 'namespace',
- 'docker.register.user': 'auth',
- 'docker.register.password': 'password',
- 'alert.email.host': 'host',
- 'alert.email.port': 'port',
'alert.email.from': 'mail',
- 'alert.email.userName': 'user',
- 'alert.email.password': 'keys',
- 'alert.email.ssl': 'ssl',
- 'ingress.mode.default': 'settings',
+ 'ingress.mode.default': 'nginx',
};
const ListItem = List.Item;
@@ -68,10 +60,16 @@
}
/* edit input */
function handleEdit(record: SystemSetting) {
- if (!record.editable) {
- record.submitting = true;
+ if (record.settingKey.startsWith('docker.register')) {
+ alert('docker...');
+ } else if (record.settingKey.startsWith('alert.email')) {
+ alert('email...');
+ } else {
+ if (!record.editable) {
+ record.submitting = true;
+ }
+ record.editable = !record.editable;
}
- record.editable = !record.editable;
}
/* edit commit */
async function handleSubmit(record: SystemSetting) {
@@ -89,7 +87,7 @@
<template>
<List>
<template v-for="item in data" :key="item.settingKey">
- <ListItem>
+ <ListItem v-if="AvatarMap[item.settingKey]">
<ListItemMeta :title="item.settingName" :description="item.description" style="width: 50%">
<template #avatar>
<div class="avatar">
@@ -127,10 +125,14 @@
<template #actions>
<div v-if="item.type === 1" v-auth="'setting:update'">
<a v-if="!item.submitting" @click="handleEdit(item)">
- {{ t('common.edit') }}
+ <a-button type="primary" shape="circle">
+ <SvgIcon name="edit" />
+ </a-button>
</a>
<a v-else @click="handleSubmit(item)">
- {{ t('common.submitText') }}
+ <a-button type="primary" shape="circle">
+ <SvgIcon name="save" />
+ </a-button>
</a>
</div>
</template>