Skip to content

Commit

Permalink
fix: 处理部分删除功能icon,修复服务密钥,版本管理,服务管理部分bug (#2572)
Browse files Browse the repository at this point in the history
* fix: 修复选择载入脚本无效问题

* upd: 修改代码语法格式

* fix: 处理部分删除功能icon问题

* fix: 修复服务密钥-hover灰色删除字段时未提示

* fix: 修复版本管理删除版本时前端提示删除成功

* fix: 修复服务管理无法修改服务属性中的服务描述
  • Loading branch information
Yuikill committed Sep 18, 2023
1 parent 7ea47f8 commit 4c5b913
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 12 deletions.
14 changes: 13 additions & 1 deletion bcs-services/bcs-bscp/ui/src/views/space/credentials/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@
title: '确定删除此密钥',
subTitle: '删除密钥后,使用此密钥的应用将无法正常使用 SDK/API 拉取配置,且密钥无法恢复',
confirmText: '删除',
infoType: 'warning',
onConfirm: async () => {
await deleteCredential(spaceId.value, credential.id)
if (credentialList.value.length === 1 && pagination.value.current > 1) {
Expand All @@ -202,6 +201,18 @@
},
} as any)
}
// 删除配置项提示文字
const deleteTooltip = (isShowTooltip: boolean) => {
if (isShowTooltip) {
return {
content: '已启用,不能删除',
placement: 'top'
}
}
return {
disabled:true
}
}
// 更改每页条数
const handlePageLimitChange = (val: number) => {
Expand Down Expand Up @@ -297,6 +308,7 @@
text
theme="primary"
:disabled="row.spec.enable"
v-bk-tooltips="deleteTooltip(row.spec.enable)"
@click="handleDelete(row)">
删除
</bk-button>
Expand Down
1 change: 0 additions & 1 deletion bcs-services/bcs-bscp/ui/src/views/space/groups/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@
const handleDeleteGroup = (group: IGroupItem) => {
InfoBox({
title: `确认是否删除分组【${group.name}?】`,
infoType: "danger",
headerAlign: "center" as const,
footerAlign: "center" as const,
onConfirm: async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { ref, watch, onMounted } from 'vue'
import { useRouter } from 'vue-router'
import { InfoBox } from 'bkui-vue'
import { InfoBox, Message } from 'bkui-vue'
import { Plus, Search } from 'bkui-vue/lib/icon'
import { storeToRefs } from 'pinia'
import { useGlobalStore } from '../../../../store/global'
Expand Down Expand Up @@ -97,14 +97,17 @@
InfoBox({
title: `确认是否删除脚本【${script.hook.spec.name}?】`,
subTitle: `${script.confirm_delete ? '当前脚本有被服务未命名版本引用,删除后,未命名版本里的引用将会被删除,是否确认删除?' : ''}`,
infoType: "warning",
headerAlign: "center" as const,
footerAlign: "center" as const,
onConfirm: async () => {
await deleteScript(spaceId.value, script.hook.id)
if (scriptsData.value.length === 1 && pagination.value.current > 1) {
pagination.value.current = pagination.value.current - 1
}
Message({
theme: 'success',
message: '删除版本成功',
});
getScripts()
},
} as any)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@
const handleDeletePkg = async(pkgId: number, name: string) => {
InfoBox({
title: `确认是否删除模板套餐【${name}】?`,
infoType: "danger",
headerAlign: "center" as const,
footerAlign: "center" as const,
onConfirm: async () => {
Expand Down Expand Up @@ -264,7 +263,6 @@
const handleDel = (config: IConfigTableItem) => {
InfoBox({
title: `确认是否删除配置项【${config.name}】?`,
infoType: "danger",
headerAlign: "center" as const,
footerAlign: "center" as const,
onConfirm: async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
if (props.service.permissions.delete) {
InfoBox({
title: `确认是否删除服务 ${props.service.spec.name}?`,
infoType: "danger",
headerAlign: "center" as const,
footerAlign: "center" as const,
onConfirm: async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
service: IAppItem
}>()
const emits = defineEmits(['update:show'])
const emits = defineEmits(['update:show','editMemo'])
const isMemoEdit = ref(false)
const formData = ref({
Expand Down Expand Up @@ -91,6 +91,7 @@
memo: formData.value.memo
}
await updateApp({ id, biz_id, data })
emits('editMemo', formData.value.memo)
isMemoEdit.value = false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
</bk-loading>
</div>
<CreateService v-model:show="isCreateServiceOpen" @reload="loadAppList" />
<EditService v-model:show="isEditServiceOpen" :service="editingService" />
<EditService v-model:show="isEditServiceOpen" :service="editingService" @editMemo="editingService.spec.memo = $event"/>
</div>
</template>
<style lang="scss" scoped>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,12 @@
InfoBox({
title: `未能删除【${space.spec.name}】`,
subTitle: '请先确认删除此空间下所有配置项',
infoType: 'warning',
dialogType: 'confirm',
confirmText: '我知道了',
} as any)
} else {
InfoBox({
title: `确认删除【${space.spec.name}】`,
infoType: 'warning',
extCls: 'delete-space-infobox',
onConfirm: async () => {
await deleteTemplateSpace(spaceId.value, space.id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
InfoBox({
title: `确定删除变量[${variable.spec.name}]?`,
confirmText: '删除',
infoType: 'warning',
onConfirm: async () => {
await deleteVariable(spaceId.value, variable.id)
if (list.value.length === 1 && pagination.value.current > 1) {
Expand Down

0 comments on commit 4c5b913

Please sign in to comment.