This is an automated email from the ASF dual-hosted git repository.

songjian pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new 6e6407c  [Fix][UI Next][V1.0.0-Alpha] Home white screen bug (#9161)
6e6407c is described below

commit 6e6407cb18eff6fd0e1ef33e1a7c1b782e44a067
Author: Devosend <[email protected]>
AuthorDate: Thu Mar 24 18:14:03 2022 +0800

    [Fix][UI Next][V1.0.0-Alpha] Home white screen bug (#9161)
    
    * fix timezone label bug
    
    * modify default timezone
    
    * support filter for timimg modal
---
 .../layouts/content/components/timezone/index.tsx  |  6 +--
 dolphinscheduler-ui-next/src/utils/timezone.ts     | 49 ++++++++++++++++++----
 .../src/views/login/use-login.ts                   |  4 +-
 .../definition/components/timing-modal.tsx         |  1 +
 4 files changed, 47 insertions(+), 13 deletions(-)

diff --git 
a/dolphinscheduler-ui-next/src/layouts/content/components/timezone/index.tsx 
b/dolphinscheduler-ui-next/src/layouts/content/components/timezone/index.tsx
index 4d6c060..7935974 100644
--- a/dolphinscheduler-ui-next/src/layouts/content/components/timezone/index.tsx
+++ b/dolphinscheduler-ui-next/src/layouts/content/components/timezone/index.tsx
@@ -36,11 +36,11 @@ const Timezone = defineComponent({
     const { t } = useI18n()
     const reload: any = inject('reload')
     const timezoneStore = useTimezoneStore()
-    const chooseVal = ref(
+    const currentTime =
       props.timezoneOptions.filter(
         (item: { value: string }) => item.value === timezoneStore.getTimezone
-      )[0].label
-    )
+      )[0] || {}
+    const chooseVal = ref(currentTime.label)
 
     const currentTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone
     const options = [
diff --git a/dolphinscheduler-ui-next/src/utils/timezone.ts 
b/dolphinscheduler-ui-next/src/utils/timezone.ts
index 508b3ee..245f98c 100644
--- a/dolphinscheduler-ui-next/src/utils/timezone.ts
+++ b/dolphinscheduler-ui-next/src/utils/timezone.ts
@@ -400,7 +400,6 @@ export const timezoneList = [
   'Chile/EasterIsland',
   'Cuba',
   'EET',
-  'EST',
   'EST5EDT',
   'Egypt',
   'Eire',
@@ -505,11 +504,8 @@ export const timezoneList = [
   'GB',
   'GB-Eire',
   'GMT',
-  'GMT+0',
-  'GMT-0',
   'GMT0',
   'Greenwich',
-  'HST',
   'Hongkong',
   'Iceland',
   'Indian/Antananarivo',
@@ -530,7 +526,6 @@ export const timezoneList = [
   'Kwajalein',
   'Libya',
   'MET',
-  'MST',
   'MST7MDT',
   'Mexico/BajaNorte',
   'Mexico/BajaSur',
@@ -585,9 +580,21 @@ export const timezoneList = [
   'Pacific/Yap',
   'Poland',
   'Portugal',
-  'ROC',
   'ROK',
   'Singapore',
+  'SystemV/AST4',
+  'SystemV/AST4ADT',
+  'SystemV/CST6',
+  'SystemV/CST6CDT',
+  'SystemV/EST5',
+  'SystemV/EST5EDT',
+  'SystemV/HST10',
+  'SystemV/MST7',
+  'SystemV/MST7MDT',
+  'SystemV/PST8',
+  'SystemV/PST8PDT',
+  'SystemV/YST9',
+  'SystemV/YST9YDT',
   'Turkey',
   'UCT',
   'US/Alaska',
@@ -607,5 +614,33 @@ export const timezoneList = [
   'Universal',
   'W-SU',
   'WET',
-  'Zulu'
+  'Zulu',
+  'EST',
+  'HST',
+  'MST',
+  'ACT',
+  'AET',
+  'AGT',
+  'ART',
+  'AST',
+  'BET',
+  'BST',
+  'CAT',
+  'CNT',
+  'CST',
+  'CTT',
+  'EAT',
+  'ECT',
+  'IET',
+  'IST',
+  'JST',
+  'MIT',
+  'NET',
+  'NST',
+  'PLT',
+  'PNT',
+  'PRT',
+  'PST',
+  'SST',
+  'VST'
 ]
diff --git a/dolphinscheduler-ui-next/src/views/login/use-login.ts 
b/dolphinscheduler-ui-next/src/views/login/use-login.ts
index 6647ec1..6fd2080 100644
--- a/dolphinscheduler-ui-next/src/views/login/use-login.ts
+++ b/dolphinscheduler-ui-next/src/views/login/use-login.ts
@@ -40,9 +40,7 @@ export function useLogin(state: any) {
         const userInfoRes: UserInfoRes = await getUserInfo()
         await userStore.setUserInfo(userInfoRes)
 
-        const timezone = userInfoRes.timeZone
-          ? userInfoRes.timeZone
-          : Intl.DateTimeFormat().resolvedOptions().timeZone
+        const timezone = userInfoRes.timeZone ? userInfoRes.timeZone : 'UTC'
         await timezoneStore.setTimezone(timezone)
 
         const path = routeStore.lastRoute
diff --git 
a/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/timing-modal.tsx
 
b/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/timing-modal.tsx
index b04f282..d0bb4a8 100644
--- 
a/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/timing-modal.tsx
+++ 
b/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/timing-modal.tsx
@@ -305,6 +305,7 @@ export default defineComponent({
             <NSelect
               v-model:value={this.timingForm.timezoneId}
               options={this.timezoneOptions()}
+              filterable
             />
           </NFormItem>
           <NFormItem label=' ' showFeedback={false}>

Reply via email to