Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
KubePi
Commits
a911f2d9
Commit
a911f2d9
authored
3 years ago
by
ssongliu
Browse files
Options
Download
Email Patches
Plain Diff
fix(label): 标签修改、集群成员创建样式优化
parent
23ae578a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
web/dashboard/src/utils/permission.js
+1
-1
web/dashboard/src/utils/permission.js
web/kubepi/src/business/cluster-management/detail/members/index.vue
+6
-6
.../src/business/cluster-management/detail/members/index.vue
web/kubepi/src/business/cluster-management/detail/roles/cluster/index.vue
+1
-1
...usiness/cluster-management/detail/roles/cluster/index.vue
web/kubepi/src/business/cluster-management/detail/roles/namespace/index.vue
+1
-1
...iness/cluster-management/detail/roles/namespace/index.vue
with
9 additions
and
9 deletions
+9
-9
web/dashboard/src/utils/permission.js
+
1
-
1
View file @
a911f2d9
...
@@ -7,7 +7,7 @@ export const checkPermissions = function (p) {
...
@@ -7,7 +7,7 @@ export const checkPermissions = function (p) {
return
true
return
true
}
}
for
(
const
clusterRole
of
userClusterRoles
)
{
for
(
const
clusterRole
of
userClusterRoles
)
{
const
scope
=
clusterRole
.
metadata
.
labels
[
"
kube
operator.io
/role-type
"
]
const
scope
=
clusterRole
.
metadata
.
labels
[
"
kube
pi.org
/role-type
"
]
if
(
clusterRole
.
rules
.
length
>
0
)
{
if
(
clusterRole
.
rules
.
length
>
0
)
{
for
(
const
rule
of
clusterRole
.
rules
)
{
for
(
const
rule
of
clusterRole
.
rules
)
{
if
(((
scope
===
p
.
scope
||
scope
===
'
cluster
'
)
&&
rule
.
apiGroups
.
includes
(
"
*
"
))
||
rule
.
apiGroups
.
includes
(
p
.
apiGroup
))
{
if
(((
scope
===
p
.
scope
||
scope
===
'
cluster
'
)
&&
rule
.
apiGroups
.
includes
(
"
*
"
))
||
rule
.
apiGroups
.
includes
(
p
.
apiGroup
))
{
...
...
This diff is collapsed.
Click to expand it.
web/kubepi/src/business/cluster-management/detail/members/index.vue
+
6
-
6
View file @
a911f2d9
...
@@ -28,13 +28,13 @@
...
@@ -28,13 +28,13 @@
:title=
"$t('commons.button.'+operation)+$t('business.cluster.member')"
:title=
"$t('commons.button.'+operation)+$t('business.cluster.member')"
:visible.sync=
"formDialogOpened"
:visible.sync=
"formDialogOpened"
z-index=
"10"
z-index=
"10"
width=
"
6
0%"
width=
"
7
0%"
center
>
center
>
<el-form
v-loading=
"isSubmitGoing"
element-loading-spinner=
"el-icon-loading"
<el-form
v-loading=
"isSubmitGoing"
element-loading-spinner=
"el-icon-loading"
element-loading-background=
"rgba(0, 0, 0, 0.8)"
:model=
"memberForm"
label-position=
"left"
element-loading-background=
"rgba(0, 0, 0, 0.8)"
:model=
"memberForm"
label-position=
"left"
label-width=
"144px"
>
label-width=
"144px"
>
<el-form-item
:label=
"$t('business.user.user')+$t('commons.table.name')"
>
<el-form-item
:label=
"$t('business.user.user')+$t('commons.table.name')"
>
<el-select
v-model=
"memberForm.userName"
style=
"width: 8
0
%"
:disabled=
"operation==='edit'"
>
<el-select
v-model=
"memberForm.userName"
style=
"width: 8
5
%"
:disabled=
"operation==='edit'"
>
<el-option
v-for=
"(item, index) in getUserOptions"
:key=
"index"
:value=
"item.name"
>
<el-option
v-for=
"(item, index) in getUserOptions"
:key=
"index"
:value=
"item.name"
>
{{ item.name }}
{{ item.name }}
</el-option>
</el-option>
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
</el-form-item>
</el-form-item>
<div
v-if=
"memberForm.roleType==='custom'"
>
<div
v-if=
"memberForm.roleType==='custom'"
>
<el-form-item>
<el-form-item>
<el-select
v-model=
"memberForm.customClusterRoles"
multiple
style=
"width: 8
0
%"
>
<el-select
v-model=
"memberForm.customClusterRoles"
multiple
style=
"width: 8
5
%"
>
<el-option
<el-option
v-for=
"(item,index) in getClusterRolesOptions"
v-for=
"(item,index) in getClusterRolesOptions"
:key=
"index"
:key=
"index"
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
<el-form-item
:label=
"$t('business.cluster.namespace')+$t('business.cluster.role')"
>
<el-form-item
:label=
"$t('business.cluster.namespace')+$t('business.cluster.role')"
>
<el-button
@
click=
"onNamespaceRoleCreate"
><i
class=
"el-icon-plus "
></i></el-button>
<el-button
@
click=
"onNamespaceRoleCreate"
><i
class=
"el-icon-plus "
></i></el-button>
<table
border=
"1"
cellspacing=
"0"
style=
"width: 8
0
%"
>
<table
border=
"1"
cellspacing=
"0"
style=
"width: 8
5
%"
>
<thead
style=
"background-color: #1d3e4d"
>
<thead
style=
"background-color: #1d3e4d"
>
<tr>
<tr>
<th
style=
"width: 45%"
>
{{ $t('business.cluster.namespace') }}
</th>
<th
style=
"width: 45%"
>
{{ $t('business.cluster.namespace') }}
</th>
...
@@ -216,10 +216,10 @@ export default {
...
@@ -216,10 +216,10 @@ export default {
listClusterRoles
()
{
listClusterRoles
()
{
listClusterRoles
(
this
.
name
).
then
(
data
=>
{
listClusterRoles
(
this
.
name
).
then
(
data
=>
{
this
.
clusterRolesOptions
=
data
.
data
.
filter
((
r
)
=>
{
this
.
clusterRolesOptions
=
data
.
data
.
filter
((
r
)
=>
{
return
r
.
metadata
[
"
labels
"
][
"
kube
operator.io
/role-type
"
]
===
"
cluster
"
return
r
.
metadata
[
"
labels
"
][
"
kube
pi.org
/role-type
"
]
===
"
cluster
"
})
})
this
.
namespaceRoleOptions
=
data
.
data
.
filter
((
r
)
=>
{
this
.
namespaceRoleOptions
=
data
.
data
.
filter
((
r
)
=>
{
return
r
.
metadata
[
"
labels
"
][
"
kube
operator.io
/role-type
"
]
===
"
namespace
"
return
r
.
metadata
[
"
labels
"
][
"
kube
pi.org
/role-type
"
]
===
"
namespace
"
})
})
})
})
},
},
...
...
This diff is collapsed.
Click to expand it.
web/kubepi/src/business/cluster-management/detail/roles/cluster/index.vue
+
1
-
1
View file @
a911f2d9
...
@@ -327,7 +327,7 @@ export default {
...
@@ -327,7 +327,7 @@ export default {
"
description
"
:
this
.
clusterRoleForm
.
description
"
description
"
:
this
.
clusterRoleForm
.
description
},
},
labels
:
{
labels
:
{
"
kube
operator.io
/role-type
"
:
"
cluster
"
,
"
kube
pi.org
/role-type
"
:
"
cluster
"
,
}
}
},
},
rules
:
[]
rules
:
[]
...
...
This diff is collapsed.
Click to expand it.
web/kubepi/src/business/cluster-management/detail/roles/namespace/index.vue
+
1
-
1
View file @
a911f2d9
...
@@ -315,7 +315,7 @@ export default {
...
@@ -315,7 +315,7 @@ export default {
metadata
:
{
metadata
:
{
name
:
this
.
clusterRoleForm
.
name
,
name
:
this
.
clusterRoleForm
.
name
,
labels
:
{
labels
:
{
"
kube
operator.io
/role-type
"
:
"
namespace
"
,
"
kube
pi.org
/role-type
"
:
"
namespace
"
,
}
}
},
},
rules
:
[]
rules
:
[]
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment