You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/01/20 06:53:31 UTC
[GitHub] [dolphinscheduler] zhoulijuanmiao opened a new pull request #8133: [Feature][UI Next] Security User Manage
zhoulijuanmiao opened a new pull request #8133:
URL: https://github.com/apache/dolphinscheduler/pull/8133
#7894
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] codecov-commenter commented on pull request #8133: [Feature][UI Next] Security User Manage
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #8133:
URL: https://github.com/apache/dolphinscheduler/pull/8133#issuecomment-1017593723
# [Codecov](https://codecov.io/gh/apache/dolphinscheduler/pull/8133?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#8133](https://codecov.io/gh/apache/dolphinscheduler/pull/8133?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ca0905c) into [dev](https://codecov.io/gh/apache/dolphinscheduler/commit/a87ddca98c225c980326d0a2f93fad812898ea02?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a87ddca) will **increase** coverage by `0.01%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dolphinscheduler/pull/8133/graphs/tree.svg?width=650&height=150&src=pr&token=bv9iXXRLi9&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dolphinscheduler/pull/8133?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## dev #8133 +/- ##
============================================
+ Coverage 41.43% 41.44% +0.01%
+ Complexity 3735 3734 -1
============================================
Files 637 637
Lines 27141 27141
Branches 3089 3089
============================================
+ Hits 11246 11249 +3
+ Misses 14811 14804 -7
- Partials 1084 1088 +4
```
| [Impacted Files](https://codecov.io/gh/apache/dolphinscheduler/pull/8133?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...e/dolphinscheduler/remote/NettyRemotingClient.java](https://codecov.io/gh/apache/dolphinscheduler/pull/8133/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1yZW1vdGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvcmVtb3RlL05ldHR5UmVtb3RpbmdDbGllbnQuamF2YQ==) | `50.70% <0.00%> (-2.82%)` | :arrow_down: |
| [...inscheduler/common/task/sqoop/SqoopParameters.java](https://codecov.io/gh/apache/dolphinscheduler/pull/8133/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvY29tbW9uL3Rhc2svc3Fvb3AvU3Fvb3BQYXJhbWV0ZXJzLmphdmE=) | `74.00% <0.00%> (-2.00%)` | :arrow_down: |
| [...r/plugin/registry/zookeeper/ZookeeperRegistry.java](https://codecov.io/gh/apache/dolphinscheduler/pull/8133/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1yZWdpc3RyeS9kb2xwaGluc2NoZWR1bGVyLXJlZ2lzdHJ5LXBsdWdpbnMvZG9scGhpbnNjaGVkdWxlci1yZWdpc3RyeS16b29rZWVwZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvcGx1Z2luL3JlZ2lzdHJ5L3pvb2tlZXBlci9ab29rZWVwZXJSZWdpc3RyeS5qYXZh) | `55.35% <0.00%> (+7.14%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dolphinscheduler/pull/8133?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dolphinscheduler/pull/8133?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [a87ddca...ca0905c](https://codecov.io/gh/apache/dolphinscheduler/pull/8133?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] sonarcloud[bot] commented on pull request #8133: [Feature][UI Next] Security User Manage
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #8133:
URL: https://github.com/apache/dolphinscheduler/pull/8133#issuecomment-1017602451
Kudos, SonarCloud Quality Gate passed! ![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=BUG)
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=VULNERABILITY)
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=SECURITY_HOTSPOT)
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=CODE_SMELL)
[![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=8133&metric=coverage&view=list) No Coverage information
[![100.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/20plus-16px.png '100.0%')](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=8133&metric=new_duplicated_lines_density&view=list) [100.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=8133&metric=new_duplicated_lines_density&view=list)
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] songjianet commented on a change in pull request #8133: [Feature][UI Next] Security User Manage
Posted by GitBox <gi...@apache.org>.
songjianet commented on a change in pull request #8133:
URL: https://github.com/apache/dolphinscheduler/pull/8133#discussion_r788425245
##########
File path: dolphinscheduler-ui-next/src/views/security/user-manage/components/use-modal.tsx
##########
@@ -0,0 +1,236 @@
+import { ref, watch, computed } from 'vue'
+import { useI18n } from 'vue-i18n'
+import { useMessage } from 'naive-ui'
+import { queryTenantList } from '@/service/modules/tenants'
+import { queryList } from '@/service/modules/queues'
+import {
+ createUser,
+ updateUser,
+ delUserById,
+ verifyUserName
+} from '@/service/modules/users'
+export type Mode = 'add' | 'edit' | 'delete'
+
+export function useModal() {
+ const message = useMessage()
+ const { t } = useI18n()
+ const show = ref(false)
+ const mode = ref<Mode>('add')
+ const user = ref()
+ const formRef = ref()
+ const formValues = ref({
+ userName: '',
+ userPassword: '',
+ tenantId: 0,
+ email: '',
+ queue: '',
+ phone: '',
+ state: 1
+ })
+ const tenants = ref<any[]>([])
+ const queues = ref<any[]>([])
+ const optionsLoading = ref(false)
+ const confirmLoading = ref(false)
+
+ const formRules = computed(() => {
+ return {
+ userName: {
+ required: true,
+ message: t('security.user.username_rule_msg'),
+ trigger: 'blur'
+ },
+ userPassword: {
+ required: mode.value === 'add',
+ validator(rule: any, value?: string) {
+ if (mode.value !== 'add' && !value) {
+ return true
+ }
+ const msg = t('security.user.user_password_rule_msg')
+ if (
+ !value ||
+ !/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$/.test(value)
+ ) {
+ return new Error(msg)
+ }
+ return true
+ },
+ trigger: ['blur', 'input']
+ },
+ tenantId: {
+ required: true,
+ validator(rule: any, value?: number) {
+ const msg = t('security.user.tenant_id_rule_msg')
+ if (typeof value === 'number') {
+ return true
+ }
+ return new Error(msg)
+ },
+ trigger: 'blur'
+ },
+ email: {
+ required: true,
+ validator(rule: any, value?: string) {
+ const msg = t('security.user.email_rule_msg')
+ if (
+ !value ||
+ !/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(
Review comment:
Regular can be put in utils/regex.
##########
File path: dolphinscheduler-ui-next/src/views/security/user-manage/index.tsx
##########
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { defineComponent, provide } from 'vue'
+import {
+ NCard,
+ NButton,
+ NInputGroup,
+ NInput,
+ NIcon,
+ NSpace,
+ NGrid,
+ NGridItem,
+ NDataTable,
+ NPagination,
+ NSkeleton
+} from 'naive-ui'
+import { useI18n } from 'vue-i18n'
+import { SearchOutlined } from '@vicons/antd'
+import { useTable } from './use-table'
+import UserModal from './components/user-modal'
+import { useModal, Mode } from './components/use-modal'
+
+const UsersManage = defineComponent({
+ name: 'user-manage',
+ setup() {
+ const { t } = useI18n()
+ const modalState = useModal()
+ const tableState = useTable({
+ onEdit: (u) => {
+ modalState.onEditUser(u)
+ },
+ onDelete: (u) => {
+ modalState.onDeleteUser(u)
+ }
+ })
+ const onSuccess = (mode: Mode) => {
+ if (mode === 'add') {
+ tableState.resetPage()
+ } else {
+ tableState.getUserList()
+ }
+ }
+
+ provide('modal-state', modalState)
+
+ return {
+ t,
+ onAddUser: modalState.onAddUser,
+ onSuccess,
+ ...tableState
+ }
+ },
+ render() {
+ const { t, onSearchValOk, onSearchValClear, userListLoading } = this
+ return (
+ <>
+ <NGrid cols={1} yGap={16}>
+ <NGridItem>
+ <NCard>
+ <NSpace justify='space-between'>
+ <NButton onClick={this.onAddUser} type='primary'>
+ {t('security.user.create_user')}
+ </NButton>
+ <NInputGroup>
+ <NInput
+ v-model:value={this.searchInputVal}
+ clearable
+ onClear={onSearchValClear}
+ onKeyup={(e) => {
+ if (e.key === 'Enter') {
+ onSearchValOk()
+ }
Review comment:
e.key === 'Enter' && onSearchValOk()
##########
File path: dolphinscheduler-ui-next/src/views/security/user-manage/components/user-modal.tsx
##########
@@ -0,0 +1,117 @@
+import { defineComponent, inject } from 'vue'
Review comment:
inject is deprecated.
##########
File path: dolphinscheduler-ui-next/src/views/security/user-manage/components/use-modal.tsx
##########
@@ -0,0 +1,236 @@
+import { ref, watch, computed } from 'vue'
+import { useI18n } from 'vue-i18n'
+import { useMessage } from 'naive-ui'
+import { queryTenantList } from '@/service/modules/tenants'
+import { queryList } from '@/service/modules/queues'
+import {
+ createUser,
+ updateUser,
+ delUserById,
+ verifyUserName
+} from '@/service/modules/users'
+export type Mode = 'add' | 'edit' | 'delete'
+
+export function useModal() {
+ const message = useMessage()
+ const { t } = useI18n()
+ const show = ref(false)
+ const mode = ref<Mode>('add')
+ const user = ref()
+ const formRef = ref()
+ const formValues = ref({
+ userName: '',
+ userPassword: '',
+ tenantId: 0,
+ email: '',
+ queue: '',
+ phone: '',
+ state: 1
+ })
+ const tenants = ref<any[]>([])
+ const queues = ref<any[]>([])
+ const optionsLoading = ref(false)
+ const confirmLoading = ref(false)
+
+ const formRules = computed(() => {
+ return {
+ userName: {
+ required: true,
+ message: t('security.user.username_rule_msg'),
+ trigger: 'blur'
+ },
+ userPassword: {
+ required: mode.value === 'add',
+ validator(rule: any, value?: string) {
+ if (mode.value !== 'add' && !value) {
+ return true
+ }
+ const msg = t('security.user.user_password_rule_msg')
+ if (
+ !value ||
+ !/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$/.test(value)
+ ) {
+ return new Error(msg)
+ }
+ return true
+ },
+ trigger: ['blur', 'input']
+ },
+ tenantId: {
+ required: true,
+ validator(rule: any, value?: number) {
+ const msg = t('security.user.tenant_id_rule_msg')
+ if (typeof value === 'number') {
+ return true
+ }
+ return new Error(msg)
+ },
+ trigger: 'blur'
+ },
+ email: {
+ required: true,
+ validator(rule: any, value?: string) {
+ const msg = t('security.user.email_rule_msg')
+ if (
+ !value ||
+ !/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(
+ value
+ )
+ ) {
+ return new Error(msg)
+ }
+ return true
+ },
+ trigger: ['blur', 'input']
+ },
+ phone: {
+ validator(rule: any, value?: string) {
+ const msg = t('security.user.phone_rule_msg')
+ if (value && !/^1\d{10}$/.test(value)) {
Review comment:
Regular can be put in utils/regex.
##########
File path: dolphinscheduler-ui-next/src/views/security/user-manage/index.tsx
##########
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { defineComponent, provide } from 'vue'
Review comment:
provide is deprecated.
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] codecov-commenter edited a comment on pull request #8133: [Feature][UI Next] Security User Manage
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #8133:
URL: https://github.com/apache/dolphinscheduler/pull/8133#issuecomment-1017593723
# [Codecov](https://codecov.io/gh/apache/dolphinscheduler/pull/8133?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#8133](https://codecov.io/gh/apache/dolphinscheduler/pull/8133?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f27c9be) into [dev](https://codecov.io/gh/apache/dolphinscheduler/commit/a87ddca98c225c980326d0a2f93fad812898ea02?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a87ddca) will **decrease** coverage by `0.03%`.
> The diff coverage is `n/a`.
> :exclamation: Current head f27c9be differs from pull request most recent head ca0905c. Consider uploading reports for the commit ca0905c to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/dolphinscheduler/pull/8133/graphs/tree.svg?width=650&height=150&src=pr&token=bv9iXXRLi9&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dolphinscheduler/pull/8133?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## dev #8133 +/- ##
============================================
- Coverage 41.43% 41.39% -0.04%
+ Complexity 3735 3731 -4
============================================
Files 637 637
Lines 27141 27141
Branches 3089 3089
============================================
- Hits 11246 11236 -10
- Misses 14811 14822 +11
+ Partials 1084 1083 -1
```
| [Impacted Files](https://codecov.io/gh/apache/dolphinscheduler/pull/8133?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...he/dolphinscheduler/common/enums/SqoopJobType.java](https://codecov.io/gh/apache/dolphinscheduler/pull/8133/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvY29tbW9uL2VudW1zL1Nxb29wSm9iVHlwZS5qYXZh) | `0.00% <0.00%> (-88.89%)` | :arrow_down: |
| [...inscheduler/common/task/sqoop/SqoopParameters.java](https://codecov.io/gh/apache/dolphinscheduler/pull/8133/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvY29tbW9uL3Rhc2svc3Fvb3AvU3Fvb3BQYXJhbWV0ZXJzLmphdmE=) | `74.00% <0.00%> (-2.00%)` | :arrow_down: |
| [...e/dolphinscheduler/remote/NettyRemotingClient.java](https://codecov.io/gh/apache/dolphinscheduler/pull/8133/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1yZW1vdGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvcmVtb3RlL05ldHR5UmVtb3RpbmdDbGllbnQuamF2YQ==) | `52.81% <0.00%> (-0.71%)` | :arrow_down: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dolphinscheduler/pull/8133?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dolphinscheduler/pull/8133?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [a87ddca...ca0905c](https://codecov.io/gh/apache/dolphinscheduler/pull/8133?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] zhoulijuanmiao commented on pull request #8133: [Feature][UI Next] Security User Manage
Posted by GitBox <gi...@apache.org>.
zhoulijuanmiao commented on pull request #8133:
URL: https://github.com/apache/dolphinscheduler/pull/8133#issuecomment-1018145683
> All files need to write license.
resolved
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] labbomb commented on a change in pull request #8133: [Feature][UI Next] Security User Manage
Posted by GitBox <gi...@apache.org>.
labbomb commented on a change in pull request #8133:
URL: https://github.com/apache/dolphinscheduler/pull/8133#discussion_r788463198
##########
File path: dolphinscheduler-ui-next/src/views/security/user-manage/components/use-modal.tsx
##########
@@ -0,0 +1,236 @@
+import { ref, watch, computed } from 'vue'
+import { useI18n } from 'vue-i18n'
+import { useMessage } from 'naive-ui'
+import { queryTenantList } from '@/service/modules/tenants'
+import { queryList } from '@/service/modules/queues'
+import {
+ createUser,
+ updateUser,
+ delUserById,
+ verifyUserName
+} from '@/service/modules/users'
+export type Mode = 'add' | 'edit' | 'delete'
+
+export function useModal() {
+ const message = useMessage()
+ const { t } = useI18n()
+ const show = ref(false)
+ const mode = ref<Mode>('add')
+ const user = ref()
+ const formRef = ref()
+ const formValues = ref({
Review comment:
please use reactive
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] songjianet commented on a change in pull request #8133: [Feature][UI Next] Security User Manage
Posted by GitBox <gi...@apache.org>.
songjianet commented on a change in pull request #8133:
URL: https://github.com/apache/dolphinscheduler/pull/8133#discussion_r788449313
##########
File path: dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts
##########
@@ -26,7 +26,9 @@ const login = {
const modal = {
cancel: '取消',
- confirm: '确定'
+ confirm: '确定',
+ save_error_msg: '保存失败,请重试',
Review comment:
This message information should not be presented in the modal. This is a business function, and the meaning of the button in the place where the pop-up window is used will be different.
##########
File path: dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts
##########
@@ -26,7 +26,9 @@ const login = {
const modal = {
cancel: '取消',
- confirm: '确定'
+ confirm: '确定',
+ save_error_msg: '保存失败,请重试',
+ delete_error_msg: '删除失败,请重试',
Review comment:
This message information should not be presented in the modal. This is a business function, and the meaning of the button in the place where the pop-up window is used will be different.
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] sonarcloud[bot] commented on pull request #8133: [Feature][UI Next] Security User Manage
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #8133:
URL: https://github.com/apache/dolphinscheduler/pull/8133#issuecomment-1018157769
Kudos, SonarCloud Quality Gate passed! ![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=BUG)
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=VULNERABILITY)
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=SECURITY_HOTSPOT)
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=CODE_SMELL)
[![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=8133&metric=coverage&view=list) No Coverage information
[![100.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/20plus-16px.png '100.0%')](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=8133&metric=new_duplicated_lines_density&view=list) [100.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=8133&metric=new_duplicated_lines_density&view=list)
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] songjianet commented on pull request #8133: [Feature][UI Next] Security User Manage
Posted by GitBox <gi...@apache.org>.
songjianet commented on pull request #8133:
URL: https://github.com/apache/dolphinscheduler/pull/8133#issuecomment-1017211605
All files need to write license.
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] sonarcloud[bot] removed a comment on pull request #8133: [Feature][UI Next] Security User Manage
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #8133:
URL: https://github.com/apache/dolphinscheduler/pull/8133#issuecomment-1017602451
Kudos, SonarCloud Quality Gate passed! ![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=BUG)
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=VULNERABILITY)
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=SECURITY_HOTSPOT)
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8133&resolved=false&types=CODE_SMELL)
[![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=8133&metric=coverage&view=list) No Coverage information
[![100.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/20plus-16px.png '100.0%')](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=8133&metric=new_duplicated_lines_density&view=list) [100.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=8133&metric=new_duplicated_lines_density&view=list)
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] songjianet commented on pull request #8133: [Feature][UI Next] Security User Manage
Posted by GitBox <gi...@apache.org>.
songjianet commented on pull request #8133:
URL: https://github.com/apache/dolphinscheduler/pull/8133#issuecomment-1017191487
PTAL @labbomb , thanks.
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] songjianet commented on pull request #8133: [Feature][UI Next] Security User Manage
Posted by GitBox <gi...@apache.org>.
songjianet commented on pull request #8133:
URL: https://github.com/apache/dolphinscheduler/pull/8133#issuecomment-1017213782
Multi-language you only do Chinese support, no English support.
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] zhoulijuanmiao closed pull request #8133: [Feature][UI Next] Security User Manage
Posted by GitBox <gi...@apache.org>.
zhoulijuanmiao closed pull request #8133:
URL: https://github.com/apache/dolphinscheduler/pull/8133
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] songjianet commented on a change in pull request #8133: [Feature][UI Next] Security User Manage
Posted by GitBox <gi...@apache.org>.
songjianet commented on a change in pull request #8133:
URL: https://github.com/apache/dolphinscheduler/pull/8133#discussion_r788446987
##########
File path: dolphinscheduler-ui-next/src/views/security/user-manage/components/use-modal.tsx
##########
@@ -0,0 +1,236 @@
+import { ref, watch, computed } from 'vue'
+import { useI18n } from 'vue-i18n'
+import { useMessage } from 'naive-ui'
+import { queryTenantList } from '@/service/modules/tenants'
+import { queryList } from '@/service/modules/queues'
+import {
+ createUser,
+ updateUser,
+ delUserById,
+ verifyUserName
+} from '@/service/modules/users'
+export type Mode = 'add' | 'edit' | 'delete'
+
+export function useModal() {
+ const message = useMessage()
+ const { t } = useI18n()
+ const show = ref(false)
+ const mode = ref<Mode>('add')
+ const user = ref()
+ const formRef = ref()
+ const formValues = ref({
+ userName: '',
+ userPassword: '',
+ tenantId: 0,
+ email: '',
+ queue: '',
+ phone: '',
+ state: 1
+ })
+ const tenants = ref<any[]>([])
+ const queues = ref<any[]>([])
+ const optionsLoading = ref(false)
+ const confirmLoading = ref(false)
+
+ const formRules = computed(() => {
+ return {
+ userName: {
+ required: true,
+ message: t('security.user.username_rule_msg'),
+ trigger: 'blur'
+ },
+ userPassword: {
+ required: mode.value === 'add',
+ validator(rule: any, value?: string) {
+ if (mode.value !== 'add' && !value) {
+ return true
+ }
+ const msg = t('security.user.user_password_rule_msg')
+ if (
+ !value ||
+ !/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$/.test(value)
Review comment:
Regular can be put in utils/regex.
##########
File path: dolphinscheduler-ui-next/src/views/security/user-manage/components/use-modal.tsx
##########
@@ -0,0 +1,236 @@
+import { ref, watch, computed } from 'vue'
Review comment:
If there is no file returned by dom, you do not need to use tsx, it is recommended to change it to ts.
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] lenboo merged pull request #8133: [Feature][UI Next] Security User Manage
Posted by GitBox <gi...@apache.org>.
lenboo merged pull request #8133:
URL: https://github.com/apache/dolphinscheduler/pull/8133
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org