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

jinsongzhou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/amoro.git


The following commit(s) were added to refs/heads/master by this push:
     new 28cd1253d [Improvement] set engines to prompt the lowest version of 
node and format code (#3017)
28cd1253d is described below

commit 28cd1253d40e1283d1b4fbbc8dde74e2143bc4d1
Author: chouchouji <[email protected]>
AuthorDate: Wed Jul 10 19:51:56 2024 +0800

    [Improvement] set engines to prompt the lowest version of node and format 
code (#3017)
    
    * [Improvement] format code
    
    * chore: set engines
    
    * docs: update node version
---
 amoro-ams/amoro-ams-dashboard/README.md            |  2 +-
 amoro-ams/amoro-ams-dashboard/package.json         |  3 +++
 amoro-ams/amoro-ams-dashboard/pom.xml              |  2 +-
 amoro-ams/amoro-ams-dashboard/src/App.vue          |  2 +-
 .../amoro-ams-dashboard/src/components/Topbar.vue  | 25 +++++++++++----------
 .../src/views/optimize/components/ScaleOut.vue     | 12 +++++-----
 .../src/views/resource/components/GroupModal.vue   |  8 +++----
 .../src/views/terminal/index.vue                   | 26 +++++++++++-----------
 8 files changed, 42 insertions(+), 38 deletions(-)

diff --git a/amoro-ams/amoro-ams-dashboard/README.md 
b/amoro-ams/amoro-ams-dashboard/README.md
index 90ead6ef2..eb01e6ed5 100644
--- a/amoro-ams/amoro-ams-dashboard/README.md
+++ b/amoro-ams/amoro-ams-dashboard/README.md
@@ -20,7 +20,7 @@ This is the Dashboard frontend for Amoro Management Service 
(AMS).
 
 ## Requirements
 
-- node >= `16.x`
+- node >= `18.18.0`
 - pnpm
 
 ## Installing Dependencies
diff --git a/amoro-ams/amoro-ams-dashboard/package.json 
b/amoro-ams/amoro-ams-dashboard/package.json
index b5c5c5098..f8a530e5c 100644
--- a/amoro-ams/amoro-ams-dashboard/package.json
+++ b/amoro-ams/amoro-ams-dashboard/package.json
@@ -42,6 +42,9 @@
     "vite-plugin-svg-icons": "^2.0.1",
     "vue-tsc": "^2.0.21"
   },
+  "engines": {
+    "node": ">=18.18.0"
+  },
   "config": {
     "commitizen": {
       "path": "./node_modules/cz-conventional-changelog"
diff --git a/amoro-ams/amoro-ams-dashboard/pom.xml 
b/amoro-ams/amoro-ams-dashboard/pom.xml
index 9f25ee67e..1a5e2fb20 100644
--- a/amoro-ams/amoro-ams-dashboard/pom.xml
+++ b/amoro-ams/amoro-ams-dashboard/pom.xml
@@ -32,7 +32,7 @@
     <url>https://amoro.apache.org</url>
 
     <properties>
-        <node.version>v18.0.0</node.version>
+        <node.version>v18.18.0</node.version>
         <pnpm.version>8.15.5</pnpm.version>
         <maven-frontend-plugin.version>1.12.0</maven-frontend-plugin.version>
     </properties>
diff --git a/amoro-ams/amoro-ams-dashboard/src/App.vue 
b/amoro-ams/amoro-ams-dashboard/src/App.vue
index 4b0194fc5..9e06b4e2c 100644
--- a/amoro-ams/amoro-ams-dashboard/src/App.vue
+++ b/amoro-ams/amoro-ams-dashboard/src/App.vue
@@ -22,7 +22,7 @@ import enUS from 'ant-design-vue/es/locale/en_US'
 import dayjs from 'dayjs'
 import { watch } from 'vue'
 import { useI18n } from 'vue-i18n'
-import 'dayjs/locale/zh-cn';
+import 'dayjs/locale/zh-cn'
 
 const { locale } = useI18n()
 dayjs.locale('en')
diff --git a/amoro-ams/amoro-ams-dashboard/src/components/Topbar.vue 
b/amoro-ams/amoro-ams-dashboard/src/components/Topbar.vue
index dacdfd89f..3e24f1a66 100644
--- a/amoro-ams/amoro-ams-dashboard/src/components/Topbar.vue
+++ b/amoro-ams/amoro-ams-dashboard/src/components/Topbar.vue
@@ -22,10 +22,10 @@ import { Modal } from 'ant-design-vue'
 import { useI18n } from 'vue-i18n'
 import { useRouter } from 'vue-router'
 
+import { DownOutlined, LogoutOutlined, QuestionCircleOutlined, 
TranslationOutlined } from '@ant-design/icons-vue'
 import useStore from '@/store'
 import { getVersionInfo } from '@/services/global.service'
 import loginService from '@/services/login.service'
-import { DownOutlined, QuestionCircleOutlined, LogoutOutlined, 
TranslationOutlined } from '@ant-design/icons-vue'
 
 interface IVersion {
   version: string
@@ -41,7 +41,7 @@ const { t, locale } = useI18n()
 const router = useRouter()
 const store = useStore()
 
-const getVersion = async () => {
+async function getVersion() {
   const res = await getVersionInfo()
   if (res) {
     verInfo.version = res.version
@@ -49,11 +49,11 @@ const getVersion = async () => {
   }
 }
 
-const goLoginPage = () => {
+function goLoginPage() {
   router.push({ path: '/login' })
 }
 
-const handleLogout = async () => {
+async function handleLogout() {
   Modal.confirm({
     title: t('logoutModalTitle'),
     onOk: async () => {
@@ -72,14 +72,15 @@ const handleLogout = async () => {
   })
 }
 
-const goDocs = () => {
+function goDocs() {
   window.open('https://amoro.apache.org/docs/latest/')
 }
 
-const setLocale = () => {
-  if(locale.value === 'zh') {
+function setLocale() {
+  if (locale.value === 'zh') {
     locale.value = 'en'
-  } else {
+  }
+  else {
     locale.value = 'zh'
   }
 }
@@ -96,17 +97,17 @@ onMounted(() => {
       <span class="g-mr-8">{{ `${$t('commitTime')}:  ${verInfo.commitTime}` 
}}</span>
     </div>
     <a-dropdown>
-      <span>{{ store.userInfo.userName}} <DownOutlined /></span>
+      <span>{{ store.userInfo.userName }} <DownOutlined /></span>
       <template #overlay>
         <a-menu>
           <a-menu-item key="userGuide" @click="goDocs">
-            <question-circle-outlined /> {{ $t('userGuide') }}
+            <QuestionCircleOutlined /> {{ $t('userGuide') }}
           </a-menu-item>
           <a-menu-item key="locale" @click="setLocale">
-            <translation-outlined /> {{ locale === 'zh' ? '切换至英文' : 'Switch To 
Chinese' }}
+            <TranslationOutlined /> {{ locale === 'zh' ? '切换至英文' : 'Switch To 
Chinese' }}
           </a-menu-item>
           <a-menu-item key="logout" @click="handleLogout">
-            <logout-outlined /> {{ $t('logout') }}
+            <LogoutOutlined /> {{ $t('logout') }}
           </a-menu-item>
         </a-menu>
       </template>
diff --git 
a/amoro-ams/amoro-ams-dashboard/src/views/optimize/components/ScaleOut.vue 
b/amoro-ams/amoro-ams-dashboard/src/views/optimize/components/ScaleOut.vue
index f9a1c9360..4badbde3e 100644
--- a/amoro-ams/amoro-ams-dashboard/src/views/optimize/components/ScaleOut.vue
+++ b/amoro-ams/amoro-ams-dashboard/src/views/optimize/components/ScaleOut.vue
@@ -85,12 +85,12 @@ onMounted(() => {
 </script>
 
 <template>
-  <AModal 
-    :open="props.visible" 
-    :title="$t('scaleOut')" 
-    :confirm-loading="confirmLoading" 
-    :closable="false" 
-    @ok="handleOk" 
+  <AModal
+    :open="props.visible"
+    :title="$t('scaleOut')"
+    :confirm-loading="confirmLoading"
+    :closable="false"
+    @ok="handleOk"
     @cancel="handleCancel"
   >
     <a-form ref="formRef" :model="formState" class="label-120">
diff --git 
a/amoro-ams/amoro-ams-dashboard/src/views/resource/components/GroupModal.vue 
b/amoro-ams/amoro-ams-dashboard/src/views/resource/components/GroupModal.vue
index 12469f316..386a3f8cc 100644
--- a/amoro-ams/amoro-ams-dashboard/src/views/resource/components/GroupModal.vue
+++ b/amoro-ams/amoro-ams-dashboard/src/views/resource/components/GroupModal.vue
@@ -109,12 +109,12 @@ onMounted(() => {
 
 <template>
   <AModal
-    :open="true" 
-    :title="edit ? $t('editgroup') : $t('addgroup')" 
+    :open="true"
+    :title="edit ? $t('editgroup') : $t('addgroup')"
     :confirm-loading="confirmLoading"
     :closable="false"
-    class="group-modal" 
-    @ok="handleOk" 
+    class="group-modal"
+    @ok="handleOk"
     @cancel="handleCancel"
   >
     <a-form ref="formRef" :model="formState" class="label-120">
diff --git a/amoro-ams/amoro-ams-dashboard/src/views/terminal/index.vue 
b/amoro-ams/amoro-ams-dashboard/src/views/terminal/index.vue
index 4b8af9845..39cd3ffe1 100644
--- a/amoro-ams/amoro-ams-dashboard/src/views/terminal/index.vue
+++ b/amoro-ams/amoro-ams-dashboard/src/views/terminal/index.vue
@@ -417,19 +417,19 @@ export default defineComponent({
       </div>
 
       <div v-if="runStatus" class="run-status" :style="{ background: 
bgcMap[runStatus] }">
-          <template v-if="runStatus === 'Running' || runStatus === 
'Canceling'">
-            <loading-outlined style="color: #1890ff" />
-          </template>
-          <template v-if="runStatus === 'Canceled' || runStatus === 'Failed'">
-            <close-circle-outlined style="color: #ff4d4f" />
-          </template>
-          <template v-if="runStatus === 'Finished'">
-            <check-circle-outlined style="color: #52c41a" />
-          </template>
-          <template v-if="runStatus === 'Created'">
-            <close-circle-outlined style="color:#333" />
-          </template>
-          <span class="g-ml-12">{{ $t(runStatus) }}</span>
+        <template v-if="runStatus === 'Running' || runStatus === 'Canceling'">
+          <loading-outlined style="color: #1890ff" />
+        </template>
+        <template v-if="runStatus === 'Canceled' || runStatus === 'Failed'">
+          <close-circle-outlined style="color: #ff4d4f" />
+        </template>
+        <template v-if="runStatus === 'Finished'">
+          <check-circle-outlined style="color: #52c41a" />
+        </template>
+        <template v-if="runStatus === 'Created'">
+          <close-circle-outlined style="color:#333" />
+        </template>
+        <span class="g-ml-12">{{ $t(runStatus) }}</span>
       </div>
 
       <!-- sql result -->

Reply via email to