You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@streampark.apache.org by GitBox <gi...@apache.org> on 2022/10/17 13:48:51 UTC

[GitHub] [incubator-streampark] wangsizhu0504 opened a new pull request, #1859: [improve] Adjust the directory structure, new login page, change

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

   <!--
   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/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 #xxx <!-- REMOVE this line if no issue to close -->
   
   <!--(For example: This pull request proposed to add checkstyle plugin).-->
   
   ## Brief change log
   
   <!--*(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.
   
   *(or)*
   
   This change is already covered by existing tests, such as *(please describe tests)*.
   
   *(or)*
   
   This change added tests and can be verified as follows:
   
   <!--*(example:)*
   - *Added integration tests for end-to-end.*
   - *Added *Test to verify the change.*
   - *Manually verified the change by testing locally.* -->
   
   ## Does this pull request potentially affect one of the following parts
    - Dependencies (does it add or upgrade a dependency): (yes / 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] wangsizhu0504 commented on a diff in pull request #1859: [improve] Adjust the directory structure, new login page, fix team page

Posted by GitBox <gi...@apache.org>.
wangsizhu0504 commented on code in PR #1859:
URL: https://github.com/apache/incubator-streampark/pull/1859#discussion_r998079918


##########
streampark-console/streampark-console-newui/src/views/base/login/LoginForm.vue:
##########
@@ -144,24 +135,90 @@
   //onKeyStroke('Enter', handleLogin);
 
   const getShow = computed(() => unref(getLoginState) === LoginStateEnum.LOGIN);
-
+  async function createTeamModal(): Promise<void> {
+    // let teamId = '';
+    // const teamList: Array<Recordable> = await getTeamList({});
+    // console.log('teamList', teamList);
+    // const { createConfirm, createMessage } = useMessage();
+    // createConfirm({
+    //   iconType: 'warning',
+    //   title: () => {
+    //     return (
+    //       <div>
+    //         <Icon icon="ant-design:setting-outlined" />
+    //         <span>Select Team</span>
+    //       </div>
+    //     );
+    //   },
+    //   content: () => {
+    //     return (
+    //       <div>
+    //         <Icon icon="ant-design:setting-outlined" />
+    //         <Select value={teamId} onChange={(value: string) => (teamId = value)}>
+    //           {teamList.map((team: Recordable) => {
+    //             return <Select.Option value={team.id}>{team.teamName}</Select.Option>;
+    //           })}
+    //         </Select>
+    //       </div>
+    //     );
+    //   },
+    //   onOk: () => {
+    //     if (!teamId) {
+    //       createMessage.warning('please select a team');
+    //       return Promise.reject();
+    //     }
+    //     this.setTeamId(teamId);
+    //     return Promise.resolve();
+    //   },
+    // });
+  }
   async function handleLogin() {
-    const data = await validForm();
-    if (!data) return;
+    const loginFormValue = await validForm();
+    if (!loginFormValue) return;
     try {
       loading.value = true;
-      const userInfo = await userStore.login({
-        password: data.password,
-        username: data.account,
-        mode: 'none', //不要默认的错误提示
-      });
-
-      userInfo &&
-        notification.success({
-          message: t('sys.login.loginSuccessTitle'),
-          description: `${t('sys.login.loginSuccessDesc')}: ${userInfo.nickName}`,
-          duration: 3,
-        });
+      const { createMessage } = useMessage();
+      // const { t } = useI18n();
+      try {
+        const { data } = await loginApi(
+          {
+            password: loginFormValue.password,
+            username: loginFormValue.account,
+          },
+          'none',
+        );
+
+        const { code } = data;
+        if (code != null && code != undefined) {
+          if (code == 0 || code == 1) {
+            const message =
+              'SignIn failed,' +
+              (code === 0 ? ' authentication error' : ' current User is locked.');
+            createMessage.error(message);

Review Comment:
   4444



-- 
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 merged pull request #1859: [improve] Adjust the directory structure, new login page, fix team page

Posted by GitBox <gi...@apache.org>.
wolfboys merged PR #1859:
URL: https://github.com/apache/incubator-streampark/pull/1859


-- 
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