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 2023/04/04 16:57:44 UTC

[incubator-streampark] branch style created (now 4a9797bc7)

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

benjobs pushed a change to branch style
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git


      at 4a9797bc7 [Improve] antd-tag style improvement

This branch includes the following new commits:

     new 4a9797bc7 [Improve] antd-tag style improvement

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-streampark] 01/01: [Improve] antd-tag style improvement

Posted by be...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

benjobs pushed a commit to branch style
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git

commit 4a9797bc70397b65b39f3f16ae43d63f6a3bbad0
Author: benjobs <be...@apache.org>
AuthorDate: Wed Apr 5 00:57:23 2023 +0800

    [Improve] antd-tag style improvement
---
 .../src/design/ant/index.less                      | 12 +++---
 .../flink/app/components/AppDetail/DetailTab.vue   | 50 +++++++++++-----------
 .../components/AppView/StopApplicationModal.vue    |  2 +-
 .../src/views/flink/app/components/State.less      | 14 ------
 .../src/views/flink/app/components/State.tsx       | 10 ++---
 .../src/views/flink/app/data/detail.data.ts        |  2 +-
 .../src/views/system/user/user.data.ts             |  1 -
 7 files changed, 38 insertions(+), 53 deletions(-)

diff --git a/streampark-console/streampark-console-webapp/src/design/ant/index.less b/streampark-console/streampark-console-webapp/src/design/ant/index.less
index b6b95a0b6..653d30497 100644
--- a/streampark-console/streampark-console-webapp/src/design/ant/index.less
+++ b/streampark-console/streampark-console-webapp/src/design/ant/index.less
@@ -83,9 +83,11 @@ span.anticon:not(.app-iconify) {
   }
 }
 
-.ant-tag {
-  border-radius: 0 !important;
-  font-weight: 700;
-  padding: 0 4px !important;
-  cursor: default;
+.bold-tag {
+  .ant-tag {
+    border-radius: 0 !important;
+    font-weight: 500;
+    padding: 0 4px !important;
+    cursor: default;
+  }
 }
diff --git a/streampark-console/streampark-console-webapp/src/views/flink/app/components/AppDetail/DetailTab.vue b/streampark-console/streampark-console-webapp/src/views/flink/app/components/AppDetail/DetailTab.vue
index b0d15b5c1..57676d1a6 100644
--- a/streampark-console/streampark-console-webapp/src/views/flink/app/components/AppDetail/DetailTab.vue
+++ b/streampark-console/streampark-console-webapp/src/views/flink/app/components/AppDetail/DetailTab.vue
@@ -387,12 +387,12 @@
       >
         <BasicTable @register="registerConfigTable">
           <template #bodyCell="{ column, record }">
-            <template v-if="column.dataIndex == 'format'">
+            <div class="bold-tag" v-if="column.dataIndex == 'format'">
               <Tag color="#2db7f5" v-if="record.format === ConfigTypeEnum.YAML"> yaml </Tag>
               <Tag color="#108ee9" v-if="record.format === ConfigTypeEnum.PROPERTIES">
                 properties
               </Tag>
-            </template>
+            </div>
             <template v-if="column.dataIndex == 'version'">
               <a-button type="primary" shape="circle" size="small" class="mr-10px">
                 {{ record.version }}
@@ -419,13 +419,13 @@
       >
         <BasicTable @register="registerFlinkSqlTable">
           <template #bodyCell="{ column, record }">
-            <template v-if="column.dataIndex == 'candidate'">
+            <div class="bold-tag" v-if="column.dataIndex == 'candidate'">
               <Tag color="#52c41a" v-if="record.candidate === CandidateTypeEnum.NONE"> None </Tag>
               <Tag color="#2db7f5" v-if="record.candidate === CandidateTypeEnum.NEW"> New </Tag>
               <Tag color="#108ee9" v-if="record.candidate === CandidateTypeEnum.HISTORY">
                 History
               </Tag>
-            </template>
+            </div>
             <template v-if="column.dataIndex == 'version'">
               <a-button type="primary" shape="circle" size="small" class="mr-10px">
                 {{ record.version }}
@@ -455,19 +455,17 @@
               <Icon icon="ant-design:clock-circle-outlined" />
               {{ record.triggerTime }}
             </template>
-            <template v-if="column.dataIndex == 'type'">
-              <div class="app_state">
-                <Tag color="#0C7EF2" v-if="record['type'] === SavePointEnum.CHECK_POINT">
-                  {{ t('flink.app.detail.detailTab.check') }}
-                </Tag>
-                <Tag color="#52c41a" v-if="record['type'] === SavePointEnum.SAVE_POINT">
-                  {{ t('flink.app.detail.detailTab.save') }}
-                </Tag>
-              </div>
-            </template>
-            <template v-if="column.dataIndex == 'latest'">
+            <div v-if="column.dataIndex == 'type'">
+              <Tag color="blue" v-if="record['type'] === SavePointEnum.CHECK_POINT">
+                {{ t('flink.app.detail.detailTab.check') }}
+              </Tag>
+              <Tag color="cyan" v-if="record['type'] === SavePointEnum.SAVE_POINT">
+                {{ t('flink.app.detail.detailTab.save') }}
+              </Tag>
+            </div>
+            <div v-if="column.dataIndex == 'latest'">
               <Tag color="green" v-if="record.latest"> Latest </Tag>
-            </template>
+            </div>
             <template v-if="column.dataIndex == 'operation'">
               <TableAction :actions="getSavePointAction(record)" />
             </template>
@@ -500,14 +498,12 @@
         <BasicTable @register="registerLogsTable">
           <template #bodyCell="{ column, record }">
             <template v-if="column.dataIndex == 'optionName'">
-              <Tag color="#52c41a" v-if="record.optionName === OperationEnum.RELEASE">
-                Release
-              </Tag>
-              <Tag color="#2db7f5" v-if="record.optionName === OperationEnum.START"> Start </Tag>
-              <Tag color="#108ee9" v-if="record.optionName === OperationEnum.SAVEPOINT">
+              <Tag color="blue" v-if="record.optionName === OperationEnum.RELEASE"> Release </Tag>
+              <Tag color="green" v-if="record.optionName === OperationEnum.START"> Start </Tag>
+              <Tag color="cyan" v-if="record.optionName === OperationEnum.SAVEPOINT">
                 Savepoint
               </Tag>
-              <Tag color="#0C7EF2" v-if="record.optionName === OperationEnum.CANCEL"> Cancel </Tag>
+              <Tag color="orange" v-if="record.optionName === OperationEnum.CANCEL"> Cancel </Tag>
             </template>
             <template v-if="column.dataIndex == 'yarnAppId'">
               <a-button type="link" @click="handleView(app as any, '')">
@@ -515,17 +511,19 @@
               </a-button>
             </template>
             <template v-if="column.dataIndex == 'jobManagerUrl'">
-              <a-button type="link" :href="record.jobManagerUrl" target="_blank">
+              <a type="link" :href="record.jobManagerUrl" target="_blank">
                 {{ record.jobManagerUrl }}
-              </a-button>
+              </a>
             </template>
             <template v-if="column.dataIndex == 'optionTime'">
               <Icon icon="ant-design:clock-circle-outlined" />
               {{ record.optionTime }}
             </template>
             <template v-if="column.dataIndex == 'success'">
-              <Tag class="start-state" color="#52c41a" v-if="record.success"> SUCCESS </Tag>
-              <Tag class="start-state" color="#f5222d" v-else> FAILED </Tag>
+              <span class="bold-tag">
+                <Tag color="#52c41a" v-if="record.success"> SUCCESS </Tag>
+                <Tag color="#f5222d" v-else> FAILED </Tag>
+              </span>
             </template>
             <template v-if="column.dataIndex == 'operation'">
               <TableAction :actions="getOperationLogAction(record)" />
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 d54cb4019..59bcb1224 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
@@ -71,7 +71,7 @@
       },
       {
         field: 'savePointTimeout',
-        label: 'SavePoint Timeout',
+        label: 'Savepoint Timeout',
         component: 'Select',
         afterItem: () => h('span', { class: 'conf-switch' }, 'savepoint timeout, Unit: second'),
         slot: 'savePointTimeout',
diff --git a/streampark-console/streampark-console-webapp/src/views/flink/app/components/State.less b/streampark-console/streampark-console-webapp/src/views/flink/app/components/State.less
index f55847b44..1ba9175bb 100644
--- a/streampark-console/streampark-console-webapp/src/views/flink/app/components/State.less
+++ b/streampark-console/streampark-console-webapp/src/views/flink/app/components/State.less
@@ -14,20 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-.app_state,
-.task-tag {
-  width: 80px;
-
-  .ant-tag {
-    border-radius: 0;
-    font-weight: 700;
-    text-align: center;
-    padding: 0 4px;
-    margin-right: 0;
-    cursor: default;
-    border: unset;
-  }
-}
 
 .status-processing-deploying {
   animation: deploying-color 800ms ease-out infinite alternate;
diff --git a/streampark-console/streampark-console-webapp/src/views/flink/app/components/State.tsx b/streampark-console/streampark-console-webapp/src/views/flink/app/components/State.tsx
index 202c7986b..2ae6769db 100644
--- a/streampark-console/streampark-console-webapp/src/views/flink/app/components/State.tsx
+++ b/streampark-console/streampark-console-webapp/src/views/flink/app/components/State.tsx
@@ -155,9 +155,9 @@ export default defineComponent({
 
     const renderState = () => {
       if (unref(data).optionState === OptionStateEnum.NONE) {
-        return <div class="app_state">{renderTag(stateMap, unref(data).state)}</div>;
+        return <div class="bold-tag">{renderTag(stateMap, unref(data).state)}</div>;
       } else {
-        return <div class="app_state">{renderTag(optionStateMap, unref(data).optionState)}</div>;
+        return <div class="bold-tag">{renderTag(optionStateMap, unref(data).optionState)}</div>;
       }
     };
     function renderOverview() {
@@ -184,7 +184,7 @@ export default defineComponent({
         )
       ) {
         return (
-          <div class="task-tag">
+          <div class="bold-tag">
             {unref(data).totalTask && (
               <Tooltip title="TOTAL">
                 <Tag color="#102541">{unref(data)?.totalTask}</Tag>
@@ -203,11 +203,11 @@ export default defineComponent({
       }
 
       if (unref(option) === 'release') {
-        return <span class="app_state">{renderTag(releaseStateMap, unref(data).release)}</span>;
+        return <span class="bold-tag">{renderTag(releaseStateMap, unref(data).release)}</span>;
       }
 
       if (unref(option) === 'build') {
-        return <span class="app_state">{renderTag(buildStatusMap, unref(data).buildStatus)}</span>;
+        return <span class="bold-tag">{renderTag(buildStatusMap, unref(data).buildStatus)}</span>;
       }
 
       return <span>{renderOtherOption()}</span>;
diff --git a/streampark-console/streampark-console-webapp/src/views/flink/app/data/detail.data.ts b/streampark-console/streampark-console-webapp/src/views/flink/app/data/detail.data.ts
index 17af2a939..4c19b3225 100644
--- a/streampark-console/streampark-console-webapp/src/views/flink/app/data/detail.data.ts
+++ b/streampark-console/streampark-console-webapp/src/views/flink/app/data/detail.data.ts
@@ -40,7 +40,7 @@ export const getDescSchema = (): DescItem[] => {
       render: (curVal) =>
         h(
           'div',
-          { class: 'app_state' },
+          { class: 'bold-tag' },
           h(Tag, { color: curVal === 1 ? '#545454' : '#0C7EF2', class: 'mr-8px' }, () =>
             curVal === 1 ? 'Custom Code' : 'Flink SQL',
           ),
diff --git a/streampark-console/streampark-console-webapp/src/views/system/user/user.data.ts b/streampark-console/streampark-console-webapp/src/views/system/user/user.data.ts
index eb588b195..c62eb8b70 100644
--- a/streampark-console/streampark-console-webapp/src/views/system/user/user.data.ts
+++ b/streampark-console/streampark-console-webapp/src/views/system/user/user.data.ts
@@ -20,7 +20,6 @@ import { Tag } from 'ant-design-vue';
 import { checkUserName, fetchUserTypes } from '/@/api/system/user';
 import { FormTypeEnum } from '/@/enums/formEnum';
 import { useI18n } from '/@/hooks/web/useI18n';
-import { LoginTypeEnum } from '/@/views/base/login/useLogin';
 const { t } = useI18n();
 // user status enum
 export const enum StatusEnum {