Skip to content

Commit

Permalink
fix: 云原生应用与普通应用一致展示模块信息
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 6204
  • Loading branch information
leafage-collb committed Apr 18, 2024
1 parent ce0a866 commit ccff5ba
Showing 1 changed file with 10 additions and 38 deletions.
48 changes: 10 additions & 38 deletions webfe/package_vue/src/views/dev-center/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,9 @@
</template>
</bk-table-column>
<bk-table-column type="expand" width="0">
<!-- v-if="appItem.application.config_info.engine_enabled && appItem.application.type !== 'cloud_native'" -->
<template slot-scope="props">
<bk-table
v-if="props.row.application.config_info.engine_enabled && props.row.application.type !== 'cloud_native'"
v-if="props.row.application.config_info.engine_enabled"
:data="props.row.application.modules"
:outer-border="false"
size="small"
Expand Down Expand Up @@ -294,10 +293,7 @@
</template>
</bk-table-column>
</bk-table>
<div
class="add-module-cls"
v-if="props.row.application.type !== 'cloud_native'"
>
<div class="add-module-cls">
<bk-button
v-if="props.row.creation_allowed"
style="margin-left: -13px;"
Expand Down Expand Up @@ -342,7 +338,7 @@
<bk-table-column :label="$t('模块数量')" :width="135">
<template slot-scope="{ row, $index }">
<span
v-if="row.application.config_info.engine_enabled && row.application.type !== 'cloud_native'"
v-if="row.application.config_info.engine_enabled"
:class="['module-name', { 'off-shelf': !row.application.is_active }]"
@click.stop="handleExpandRow(row)"
> {{ $t('') }}&nbsp; {{ row.application.modules.length }} &nbsp;{{ $t('个模块') }}
Expand Down Expand Up @@ -692,37 +688,13 @@ export default {
},
deploy(item, subModule) {
if (item.application.type === 'cloud_native') {
this.toDeploy(item.application);
} else {
this.$router.push({
name: 'appDeploy',
params: {
id: item.application.code,
moduleId: subModule.name,
},
});
}
},
async toDeploy(recordItem) {
const url = `${BACKEND_URL}/api/bkapps/applications/${recordItem.code}/`;
try {
const res = await this.$http.get(url);
this.type = res.application.type;
this.$router.push({
name: this.type === 'cloud_native' ? 'cloudAppDeploy' : 'appDeploy',
params: {
id: recordItem.code,
},
});
} catch (e) {
this.$paasMessage({
limit: 1,
theme: 'error',
message: e.message,
});
}
this.$router.push({
name: item.application.type === 'cloud_native' ? 'cloudAppDeployManageStag' : 'appDeploy',
params: {
id: item.application.code,
moduleId: subModule.name,
},
});
},
toPage(appItem) {
Expand Down

0 comments on commit ccff5ba

Please sign in to comment.