This is an automated email from the ASF dual-hosted git repository. benjobs pushed a commit to branch project in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git
commit 5809936e1066d37a76a8ea58ace8a131544dd654 Author: benjobs <[email protected]> AuthorDate: Sat Sep 16 12:01:12 2023 +0800 [Improve] project page improvement --- .../src/assets/icons/http.svg | 2 +- .../src/assets/icons/{http.svg => net.svg} | 0 .../src/assets/icons/ssh.svg | 1 + .../src/locales/lang/en/flink/project.ts | 2 ++ .../src/locales/lang/zh-CN/flink/project.ts | 2 ++ .../components/AppView/StopApplicationModal.vue | 2 +- .../flink/project/components/RepositoryGroup.tsx | 30 ++++++++++++++++++---- 7 files changed, 32 insertions(+), 7 deletions(-) diff --git a/streampark-console/streampark-console-webapp/src/assets/icons/http.svg b/streampark-console/streampark-console-webapp/src/assets/icons/http.svg index 0eb64e475..f49cbd71c 100644 --- a/streampark-console/streampark-console-webapp/src/assets/icons/http.svg +++ b/streampark-console/streampark-console-webapp/src/assets/icons/http.svg @@ -1 +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="1615703629730" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5964" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M684.672 591.189333c3.157333-26.154667 5.546667-52.266667 5.546667-79.189333s-2.389333-53.077333-5.546667-79.189333 [...] +<?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="1694830808867" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9591" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M918.016 489.984l0-41.984-86.016 0 0 41.984 86.016 0zM918.016 384q25.984 0 45.013333 18.986667t18.986667 45.013333l0 41.984q0 25.984-18.986667 45.013333t-45.01 [...] \ No newline at end of file diff --git a/streampark-console/streampark-console-webapp/src/assets/icons/http.svg b/streampark-console/streampark-console-webapp/src/assets/icons/net.svg similarity index 100% copy from streampark-console/streampark-console-webapp/src/assets/icons/http.svg copy to streampark-console/streampark-console-webapp/src/assets/icons/net.svg diff --git a/streampark-console/streampark-console-webapp/src/assets/icons/ssh.svg b/streampark-console/streampark-console-webapp/src/assets/icons/ssh.svg new file mode 100644 index 000000000..1e024d1c9 --- /dev/null +++ b/streampark-console/streampark-console-webapp/src/assets/icons/ssh.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="1694830905072" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="22900" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M192 384c-25.6 0-42.666667 21.333333-42.666667 42.666667v74.666666c0 21.333333 17.066667 42.666667 42.666667 42.666667H298.666667v32H149.333333V640h170.666667 [...] \ No newline at end of file diff --git a/streampark-console/streampark-console-webapp/src/locales/lang/en/flink/project.ts b/streampark-console/streampark-console-webapp/src/locales/lang/en/flink/project.ts index 88fb824ee..4f569def3 100644 --- a/streampark-console/streampark-console-webapp/src/locales/lang/en/flink/project.ts +++ b/streampark-console/streampark-console-webapp/src/locales/lang/en/flink/project.ts @@ -81,5 +81,7 @@ export default { updateProject: 'Update Project', deleteProject: 'Delete Project', deleteProjectMessage: 'Are you sure delete this project ?', + httpsCredential: 'Use Git or checkout with SVN using the web URL.', + sshCredential: 'Use a password-protected SSH key.', }, }; diff --git a/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/project.ts b/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/project.ts index 8c85a2987..572e153d3 100644 --- a/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/project.ts +++ b/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/project.ts @@ -78,5 +78,7 @@ export default { updateProject: '更新项目', deleteProject: '删除项目', deleteProjectMessage: '确定删除项目?', + httpsCredential: '通过WebURL方式进行Git连接', + sshCredential: '使用受密码保护的SSH密钥进行Git连接', }, }; diff --git a/streampark-console/streampark-console-webapp/src/views/flink/app/components/AppView/StopApplicationModal.vue b/streampark-console/streampark-console-webapp/src/views/flink/app/components/AppView/StopApplicationModal.vue index bdecd2b4e..457cf22e4 100644 --- a/streampark-console/streampark-console-webapp/src/views/flink/app/components/AppView/StopApplicationModal.vue +++ b/streampark-console/streampark-console-webapp/src/views/flink/app/components/AppView/StopApplicationModal.vue @@ -79,7 +79,7 @@ afterItem: () => h( 'span', - { class: 'conf-switch' }, + { class: 'tip-info' }, 'Note: native format savepoint is supported since flink 1.15', ), ifShow: ({ values }) => !!values.stopSavePointed, diff --git a/streampark-console/streampark-console-webapp/src/views/flink/project/components/RepositoryGroup.tsx b/streampark-console/streampark-console-webapp/src/views/flink/project/components/RepositoryGroup.tsx index 8bef222ef..5f317752f 100644 --- a/streampark-console/streampark-console-webapp/src/views/flink/project/components/RepositoryGroup.tsx +++ b/streampark-console/streampark-console-webapp/src/views/flink/project/components/RepositoryGroup.tsx @@ -14,15 +14,16 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { defineComponent } from 'vue'; +import { defineComponent, h } from 'vue'; import type { PropType } from 'vue'; -import { Form, Input, Select } from 'ant-design-vue'; +import { Form, Input, Select, Tag } from 'ant-design-vue'; export interface RepositoryProps { gitCredential: string | number; url: string; } import { useI18n } from '/@/hooks/web/useI18n'; import { GitCredentialEnum } from '/@/enums/projectEnum'; +import { SvgIcon } from '/@/components/Icon'; export default defineComponent({ name: 'RepositoryUrl', props: { @@ -45,8 +46,14 @@ export default defineComponent({ }; const options = [ - { label: 'http/https', value: GitCredentialEnum.HTTPS }, - { label: 'ssh', value: GitCredentialEnum.SSH }, + { + label: h('div', {}, [h(SvgIcon, { name: 'http', color: '#108ee9', size: '30' }, '')]), + value: GitCredentialEnum.HTTPS, + }, + { + label: h('div', {}, [h(SvgIcon, { name: 'ssh', color: '#108ee9', size: '30' }, '')]), + value: GitCredentialEnum.SSH, + }, ]; return () => { @@ -55,7 +62,7 @@ export default defineComponent({ <Input.Group compact class="!flex custom-input-group"> <Select name="gitCredential" - style="width: 120px" + style="width: 80px" placeholder={t('flink.project.form.gitCredentialPlaceholder')} value={props.value?.gitCredential} onChange={(e: any) => handleProtocolChange(e)} @@ -70,6 +77,19 @@ export default defineComponent({ onInput={(e: any) => handleUrlChange(e.target.value)} /> </Input.Group> + <p class="conf-desc mt-10px"> + <span class="note-info"> + <Tag color="#2db7f5" class="tag-note"> + {t('flink.app.noteInfo.note')} + </Tag> + {props.value?.gitCredential === 1 && ( + <span>{t('flink.project.operationTips.httpsCredential')}</span> + )} + {props.value?.gitCredential === 2 && ( + <span>{t('flink.project.operationTips.sshCredential')}</span> + )} + </span> + </p> </div> ); };
