feat: 跳转天翼云容器

develop
时启龙 2024-09-02 11:12:53 +08:00
parent 8afcee943a
commit cca73a0672
49 changed files with 679 additions and 293 deletions

View File

@ -22,7 +22,7 @@
<script> <script>
/* global $ */ /* global $ */
import { modifyInstance, getTKERegions } from 'views/tce/services/tke.js' import { modifyInstance, getTKERegions } from 'views/resource/ctstack/services/tke.js'
export default { export default {
props: { props: {
addData: { addData: {
@ -57,7 +57,6 @@ export default {
getRegionList() { getRegionList() {
this.regions = [] this.regions = []
getTKERegions({ getTKERegions({
tenantUuid: this.platformObject.tceTenantUuid,
vendorId: this.vendorId vendorId: this.vendorId
}).then(data => { }).then(data => {
if (data.success) { if (data.success) {

View File

@ -20,8 +20,8 @@
<script> <script>
/* global $ */ /* global $ */
import { floatIpPorts } from 'views/tce/services/floatips.js' import { floatIpPorts } from 'views/resource/ctstack/services/floatips.js'
import { getVm } from 'views/tce/services/vms.js' import { getVm } from 'views/resource/ctstack/services/vm.js'
export default { export default {
props: { props: {
addData: { addData: {

View File

@ -37,9 +37,9 @@
<script> <script>
/* global $ */ /* global $ */
import bind from './bind.vue' import bind from './bind.vue'
import { getClusterList } from 'views/tce/services/tke.js' import { getClusterList } from 'views/resource/ctstack/services/tke.js'
import { removeFloatIp, detailFloatIp } from 'views/tce/services/floatips.js' import { removeFloatIp, detailFloatIp } from 'views/resource/ctstack/services/floatips.js'
import { getRegion } from 'views/tce/services/regions.js' import { getRegion } from 'views/resource/ctstack/services/regions.js'
import service from './service/index.vue' import service from './service/index.vue'
import modifyCluster from './modifyCluster.vue' import modifyCluster from './modifyCluster.vue'
import deleteCluster from './deleteCluster.vue' import deleteCluster from './deleteCluster.vue'
@ -169,13 +169,13 @@ export default {
}, },
methods: { methods: {
onmessage(data) { onmessage(data) {
const arr = ['tke.modify.cluster', 'tke.delete.instance', 'tke.add.instance', 'tce.sync', 'tce.cluster', 'tke.create.cluster', 'tke.delete.cluster'] const arr = ['tke.modify.cluster', 'tke.delete.instance', 'tke.add.instance', 'ctstack.sync', 'ctstack.cluster', 'tke.create.cluster', 'tke.delete.cluster']
if (arr.includes(data.operate)) { if (arr.includes(data.operate)) {
this.getClusterData() this.getClusterData()
} }
}, },
addCluster() { addCluster() {
this.$router.push({ name: 'tceCreateCluster', query: { vendorId: this.platformObject.vendorId } }) this.$router.push({ name: 'ctstackCreateCluster', query: { vendorId: this.platformObject.vendorId } })
}, },
handleCellClick(data) { handleCellClick(data) {
this.clusterInfo = data this.clusterInfo = data
@ -262,24 +262,22 @@ export default {
params: JSON.stringify([ params: JSON.stringify([
{ {
param: { param: {
vendorId: this.platformObject.vendorId, vendorId: this.platformObject.vendorId
tenantUuid: this.platformObject.tecTenantUuid,
regionId: this.platformObject.tceRegionId
}, },
sign: 'EQ' sign: 'EQ'
} }
]) ])
} }
getClusterList(params).then(data => { getClusterList(params)
.then(data => {
if (data.success) { if (data.success) {
this.loading = false
this.clusterTableData = data.data.rows this.clusterTableData = data.data.rows
this.total = data.data.total this.total = data.data.total
} }
}) })
}, .finally(() => {
createCluster() { this.loading = false
this.$router.push({ name: 'tceClusterAdd', params: { id: this.platformObject.vendorId } }) })
}, },
// //
getDetail(row) { getDetail(row) {

View File

@ -16,7 +16,7 @@
</template> </template>
<script> <script>
import { conditionSubnet } from 'views/tce/services/subnets.js' import { conditionSubnet } from 'views/resource/ctstack/services/subnet.js'
export default { export default {
props: { props: {
dialog: { dialog: {

View File

@ -87,7 +87,7 @@
</template> </template>
<script> <script>
import { ref, computed } from 'vue' import { ref, computed } from 'vue'
import { getSubnet } from 'views/tce/services/subnets.js' import { getSubnet } from 'views/resource/ctstack/services/subnet.js'
import HostDialog from './hostDialog.vue' import HostDialog from './hostDialog.vue'
import DiskDialog from './diskDialog.vue' import DiskDialog from './diskDialog.vue'
import AssignIp from './AssignIpItem.vue' import AssignIp from './AssignIpItem.vue'

View File

@ -3,8 +3,8 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<cb-form-item label="地域:"> <cb-form-item label="地域:">
<el-select v-model="region" @change="changeRegion"> <el-select v-model="addData.region" @change="changeRegion">
<el-option v-for="(item, index) in platformObject.tceRegionList" :label="item.name" :value="item.regionId" :key="index"></el-option> <el-option v-for="item in regionList" :key="item.id" :label="item.name" :value="item.code"></el-option>
</el-select> </el-select>
</cb-form-item> </cb-form-item>
</el-col> </el-col>
@ -25,15 +25,6 @@
</cb-form-item> </cb-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :span="12">
<cb-form-item label="容器集群地域:" prop="regionId" validate="required" required-message="">
<el-select v-model="addData.regionId" @change="region">
<el-option v-for="(item, index) in regionList" :label="item.regionName" :value="item.alias" :key="index"></el-option>
</el-select>
</cb-form-item>
</el-col>
</el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<cb-form-item label="集群网络:" prop="vpcId" validate="required" required-message=""> <cb-form-item label="集群网络:" prop="vpcId" validate="required" required-message="">
@ -175,9 +166,9 @@
</template> </template>
<script> <script>
import { getDescribeVersions, getTKERegions, createCluterImages, checkCIDR } from 'views/tce/services/tke.js' import { getDescribeVersions, getTKERegions, createCluterImages, checkCIDR } from 'views/resource/ctstack/services/tke.js'
import { getVpc } from 'views/tce/services/vpcs.js' import { getVpc } from 'views/resource/ctstack/services/vpcs.js'
import { getSubnet } from 'views/tce/services/subnets.js' import { getSubnet } from 'views/resource/ctstack/services/subnet.js'
const subnetColumns = [ const subnetColumns = [
{ {
@ -255,7 +246,6 @@ export default {
getKubernetesList() { getKubernetesList() {
this.kubernetesList = [] this.kubernetesList = []
getDescribeVersions({ getDescribeVersions({
tenantUuid: this.platformObject.tceTenantUuid,
regionId: this.region regionId: this.region
}).then(data => { }).then(data => {
if (data.success) { if (data.success) {
@ -348,7 +338,6 @@ export default {
this.CIDRIndex++ this.CIDRIndex++
const index = this.CIDRIndex const index = this.CIDRIndex
params.region = this.addData.regionId params.region = this.addData.regionId
params.tenantUuid = this.platformObject.tceTenantUuid
this.addData.checkLoading = true this.addData.checkLoading = true
checkCIDR(params).then(data => { checkCIDR(params).then(data => {
this.addData.checkLoading = false this.addData.checkLoading = false
@ -374,7 +363,6 @@ export default {
getImages() { getImages() {
this.systemList = [] this.systemList = []
createCluterImages({ createCluterImages({
tenantUuid: this.platformObject.tceTenantUuid,
vendorId: this.vendorId, vendorId: this.vendorId,
regionId: this.region regionId: this.region
}).then(data => { }).then(data => {
@ -437,14 +425,9 @@ export default {
this.addData.selectionSubnet = [] this.addData.selectionSubnet = []
}, },
getRegionList() { getRegionList() {
this.regionList = [] getRegion({ vendorId: this.vendorId }).then(data => {
getTKERegions({
tenantUuid: this.platformObject.tceTenantUuid,
vendorId: this.vendorId,
regionId: this.region
}).then(data => {
if (data.success) { if (data.success) {
this.regionList = data.data.regionInstanceSet this.regionList = data.data
} }
}) })
}, },
@ -467,13 +450,16 @@ export default {
sign: 'EQ' sign: 'EQ'
} }
]) ])
}).then(data => { })
.then(data => {
if (data.success) { if (data.success) {
this.loading = false
this.subnetList = data.data.rows this.subnetList = data.data.rows
this.initClick() this.initClick()
} }
}) })
.finally(() => {
this.loading = false
})
}, },
initClick() { initClick() {
this.subnetList.forEach((item, index) => { this.subnetList.forEach((item, index) => {
@ -493,14 +479,13 @@ export default {
}) })
}, },
changeRegion() { changeRegion() {
this.getRegionList()
this.getImages() this.getImages()
this.getKubernetesList() this.getKubernetesList()
} }
}, },
created() { created() {
this.handleOne(1) this.handleOne(1)
// this.getRegionList() this.getRegionList()
this.getVpc() this.getVpc()
// this.getImages() // this.getImages()
// this.getKubernetesList() // this.getKubernetesList()

View File

@ -30,8 +30,8 @@
</template> </template>
<script> <script>
import { getCategoriesByCode } from 'views/tce/services/cloud.js' import { getCategoriesByCode } from 'views/resource/ctstack/services/cloud.js'
import { queryAvailable } from 'views/tce/services/cbs.js' import { queryAvailable } from 'views/resource/ctstack/services/cbs.js'
export default { export default {
props: { props: {
diskDialog: { diskDialog: {
@ -68,11 +68,11 @@ export default {
vendorId, vendorId,
regionId, regionId,
diskChargeType: 'POSTPAID_BY_HOUR', diskChargeType: 'POSTPAID_BY_HOUR',
zones: [zoneId], zones: [zoneId]
tenantUuid: this.platformObject.tceTenantUuid }).finally(() => {
this.loading = false
}) })
if (!res.success) { if (!res.success) {
this.loading = false
return return
} }
const map = {} const map = {}
@ -80,7 +80,7 @@ export default {
const { diskType } = item const { diskType } = item
map[diskType] = item map[diskType] = item
}) })
const result = await getCategoriesByCode('tce.standard.volume') const result = await getCategoriesByCode('ctstack.standard.volume')
console.log(result) console.log(result)
this.diskTypeList = result.data.map(item => { this.diskTypeList = result.data.map(item => {
const { available, maxDiskSize, minDiskSize, stepSize } = map[item.code] const { available, maxDiskSize, minDiskSize, stepSize } = map[item.code]

View File

@ -122,8 +122,8 @@
</template> </template>
<script> <script>
import { getGroup } from 'views/tce/services/sgroups.js' import { getGroup } from 'views/resource/ctstack/services/sgroups.js'
import { getKey } from 'views/tce/services/keypairs.js' import { getKey } from 'views/resource/ctstack/services/keypairs.js'
import { computed } from 'vue' import { computed } from 'vue'
const mountList = [ const mountList = [
{ name: '/var/lib/docker', value: '/var/lib/docker' }, { name: '/var/lib/docker', value: '/var/lib/docker' },

View File

@ -25,8 +25,8 @@
</template> </template>
<script> <script>
import { getFlavor, getFlavorType } from 'views/tce/services/flavors.js' import { getFlavor, getFlavorType } from 'views/resource/ctstack/services/flavors.js'
import { getDictChildrenTree } from 'views/tce/services/dictionaries.js' import { getDictChildrenTree } from 'views/resource/ctstack/services/dictionaries.js'
const searchConfigs = [ const searchConfigs = [
{ {

View File

@ -44,7 +44,7 @@ import clusterItem from './clusterItem.vue'
import typeItem from './typeItem.vue' import typeItem from './typeItem.vue'
import infoItem from './infoItem.vue' import infoItem from './infoItem.vue'
import hostConfigItem from './hostConfigItem.vue' import hostConfigItem from './hostConfigItem.vue'
import { createCluter } from 'views/tce/services/tke.js' import { createCluter } from 'views/resource/ctstack/services/tke.js'
import { instanceParams } from './data' import { instanceParams } from './data'
export default { export default {

View File

@ -67,11 +67,11 @@
</template> </template>
<script> <script>
import { getTKERegions } from 'views/tce/services/tke.js' import { getTKERegions } from 'views/resource/ctstack/services/tke.js'
import { getZone } from 'views/tce/services/regions.js' import { getZone } from 'views/resource/ctstack/services/regions.js'
import { getVpc } from 'views/tce/services/vpcs.js' import { getVpc } from 'views/resource/ctstack/services/vpcs.js'
import { getSubnet } from 'views/tce/services/subnets.js' import { getSubnet } from 'views/resource/ctstack/services/subnet.js'
import { getFlavor } from 'views/tce/services/flavors.js' import { getFlavor } from 'views/resource/ctstack/services/flavors.js'
import hostDialog from './hostDialog.vue' import hostDialog from './hostDialog.vue'
import diskDialog from './diskDialog.vue' import diskDialog from './diskDialog.vue'
import publicIpDialog from './publicIpDialog.vue' import publicIpDialog from './publicIpDialog.vue'

View File

@ -22,7 +22,7 @@
<script> <script>
/* global $ */ /* global $ */
import { getInstanceList, deleteCluster } from 'views/tce/services/tke.js' import { getInstanceList, deleteCluster } from 'views/resource/ctstack/services/tke.js'
const instanceColumns = [ const instanceColumns = [
{ {
label: '节点ID', label: '节点ID',
@ -94,13 +94,16 @@ export default {
rows: 9999999, rows: 9999999,
params: JSON.stringify([{ param: { vendorId: this.vendorId, clusterId: this.clusterInfo.clusterId }, sign: 'EQ' }]) params: JSON.stringify([{ param: { vendorId: this.vendorId, clusterId: this.clusterInfo.clusterId }, sign: 'EQ' }])
} }
getInstanceList(params).then(data => { getInstanceList(params)
.then(data => {
if (data.success) { if (data.success) {
this.loading = false
this.instanceList = data.data.rows this.instanceList = data.data.rows
this.total = data.data.total this.total = data.data.total
} }
}) })
.finally(() => {
this.loading = false
})
} }
}, },
created() {}, created() {},

View File

@ -18,7 +18,7 @@
</template> </template>
<script> <script>
import { addAsByCluster } from 'views/tce/services/as.js' import { addAsByCluster } from 'views/resource/ctstack/services/as.js'
import addConfig from './components/addConfig' import addConfig from './components/addConfig'
import addAs from './components/addAs' import addAs from './components/addAs'
export default { export default {

View File

@ -45,8 +45,8 @@
</template> </template>
<script> <script>
import { getVpc } from 'views/tce/services/vpcs.js' import { getVpc } from 'views/resource/ctstack/services/vpcs.js'
import { getSubnet } from 'views/tce/services/subnets.js' import { getSubnet } from 'views/resource/ctstack/services/subnet.js'
const retryPolicyList = [ const retryPolicyList = [
{ name: '立即重试', value: 'IMMEDIATE_RETRY' }, { name: '立即重试', value: 'IMMEDIATE_RETRY' },
{ name: '间隔递增重试', value: 'INCREMENTAL_INTERVALS' } { name: '间隔递增重试', value: 'INCREMENTAL_INTERVALS' }

View File

@ -135,11 +135,11 @@
</template> </template>
<script> <script>
import { getRegion, getZone } from 'views/tce/services/regions.js' import { getRegion, getZone } from 'views/resource/ctstack/services/regions.js'
import { getGroup } from 'views/tce/services/sgroups.js' import { getGroup } from 'views/resource/ctstack/services/sgroups.js'
import { getKey } from 'views/tce/services/keypairs.js' import { getKey } from 'views/resource/ctstack/services/keypairs.js'
import { conditionImage } from 'views/tce/services/images.js' import { conditionImage } from 'views/resource/ctstack/services/image.js'
import { queryAvailable } from 'views/tce/services/cbs.js' import { queryAvailable } from 'views/resource/ctstack/services/cbs.js'
// import flavor from '../../../components/flavor' // import flavor from '../../../components/flavor'
export default { export default {
// components: { flavor }, // components: { flavor },
@ -227,8 +227,7 @@ export default {
vendorId: this.vendorId, vendorId: this.vendorId,
regionId: this.addData.regionId, regionId: this.addData.regionId,
diskChargeType: 'POSTPAID_BY_HOUR', diskChargeType: 'POSTPAID_BY_HOUR',
zones: [this.addData.zoneId], zones: [this.addData.zoneId]
tenantUuid: this.platformObject.tceTenantUuid
}).then(data => { }).then(data => {
if (data.success) { if (data.success) {
this.diskTypeList = data.data this.diskTypeList = data.data

View File

@ -24,7 +24,7 @@
<script> <script>
/* global $ */ /* global $ */
import { postAddInstance, getExistInstance } from 'views/tce/services/tke.js' import { postAddInstance, getExistInstance } from 'views/resource/ctstack/services/tke.js'
export default { export default {
props: { props: {
addData: { addData: {
@ -69,12 +69,15 @@ export default {
vendorId: this.vendorId, vendorId: this.vendorId,
id: this.clusterInfo.id id: this.clusterInfo.id
} }
getExistInstance(param, this.clusterInfo.id).then(data => { getExistInstance(param, this.clusterInfo.id)
.then(data => {
if (data.success) { if (data.success) {
this.loading = false
this.instanceList = data.data this.instanceList = data.data
} }
}) })
.finally(() => {
this.loading = false
})
}, },
ok() { ok() {
this.$refs.data.validate(async valid => { this.$refs.data.validate(async valid => {

View File

@ -173,9 +173,9 @@
</template> </template>
<script> <script>
import { getGroup } from 'views/tce/services/sgroups.js' import { getGroup } from 'views/resource/ctstack/services/sgroups.js'
import { getKey } from 'views/tce/services/keypairs.js' import { getKey } from 'views/resource/ctstack/services/keypairs.js'
import { queryAvailable } from 'views/tce/services/cbs.js' import { queryAvailable } from 'views/resource/ctstack/services/cbs.js'
import { computed } from 'vue' import { computed } from 'vue'
const mountList = [ const mountList = [
@ -266,8 +266,7 @@ export default {
vendorId: this.vendorId, vendorId: this.vendorId,
diskChargeType: 'POSTPAID_BY_HOUR', diskChargeType: 'POSTPAID_BY_HOUR',
zones: [az], zones: [az],
regionId: this.addData.data.regionId, regionId: this.addData.data.regionId
tenantUuid: this.platformObject.tceTenantUuid
}).then(data => { }).then(data => {
if (data.success) { if (data.success) {
this.diskTypeList = data.data this.diskTypeList = data.data

View File

@ -37,8 +37,8 @@
<script> <script>
import typeItem from './typeItem.vue' import typeItem from './typeItem.vue'
import { getTKERegions, createInstance, getClusterDetail } from 'views/tce/services/tke.js' import { getTKERegions, createInstance, getClusterDetail } from 'views/resource/ctstack/services/tke.js'
import { getVpc } from 'views/tce/services/vpcs.js' import { getVpc } from 'views/resource/ctstack/services/vpcs.js'
import hostConfigItem from './hostConfigItem.vue' import hostConfigItem from './hostConfigItem.vue'
import infoItem from './infoItem.vue' import infoItem from './infoItem.vue'
@ -112,7 +112,6 @@ export default {
methods: { methods: {
async getRegionName(regionId) { async getRegionName(regionId) {
const res = await getTKERegions({ const res = await getTKERegions({
tenantUuid: this.platformObject.tceTenantUuid,
vendorId: this.vendorId vendorId: this.vendorId
}) })
if (res.success) { if (res.success) {
@ -154,7 +153,7 @@ export default {
}, },
goBack() { goBack() {
this.$router.push({ this.$router.push({
name: 'tceContainer' name: 'ctstackContainer'
}) })
}, },
ok() { ok() {
@ -239,7 +238,7 @@ export default {
message: data.message message: data.message
}) })
this.$router.push({ this.$router.push({
name: 'tceContainer' name: 'ctstackContainer'
}) })
} }
}) })

View File

@ -93,8 +93,8 @@
<script> <script>
import SpecList from 'views/platform/components/abcstack/flavor.vue' import SpecList from 'views/platform/components/abcstack/flavor.vue'
import AssignIp from '../../creatCluster/AssignIpItem.vue' import AssignIp from '../../creatCluster/AssignIpItem.vue'
import { getSubnet } from 'views/tce/services/subnets.js' import { getSubnet } from 'views/resource/ctstack/services/subnet.js'
import { getZone } from 'views/tce/services/regions.js' import { getZone } from 'views/resource/ctstack/services/regions.js'
export default { export default {
components: { SpecList, AssignIp }, components: { SpecList, AssignIp },

View File

@ -13,7 +13,7 @@
<script> <script>
/* global $ */ /* global $ */
import { deleteInstance } from 'views/tce/services/tke.js' import { deleteInstance } from 'views/resource/ctstack/services/tke.js'
export default { export default {
props: { props: {
vendorId: { vendorId: {

View File

@ -14,7 +14,7 @@
<script> <script>
/* global $ */ /* global $ */
import { drain } from 'views/tce/services/tke.js' import { drain } from 'views/resource/ctstack/services/tke.js'
export default { export default {
props: { props: {
vendorId: { vendorId: {

View File

@ -27,7 +27,7 @@
<script> <script>
import drainInstance from './drainInstance.vue' import drainInstance from './drainInstance.vue'
import deleteInstance from './deleteInstance.vue' import deleteInstance from './deleteInstance.vue'
import { getInstanceList, operateInstance } from 'views/tce/services/tke.js' import { getInstanceList, operateInstance } from 'views/resource/ctstack/services/tke.js'
import addExistInstance from './addExistInstance.vue' import addExistInstance from './addExistInstance.vue'
const columns = [ const columns = [
@ -219,13 +219,16 @@ export default {
rows: this.params.rows, rows: this.params.rows,
params: JSON.stringify([{ param: { vendorId: this.detail.vendorId, clusterId: this.detail.clusterId }, sign: 'EQ' }]) params: JSON.stringify([{ param: { vendorId: this.detail.vendorId, clusterId: this.detail.clusterId }, sign: 'EQ' }])
} }
getInstanceList(params).then(data => { getInstanceList(params)
.then(data => {
if (data.success) { if (data.success) {
this.loading = false
this.tableData = data.data.rows this.tableData = data.data.rows
this.total = data.data.total this.total = data.data.total
} }
}) })
.finally(() => {
this.loading = false
})
} }
}, },
watch: { watch: {

View File

@ -5,7 +5,7 @@
</template> </template>
<script> <script>
import { getLogList } from 'views/tce/services/tke.js' import { getLogList } from 'views/resource/ctstack/services/tke.js'
const columns = [ const columns = [
{ {
label: 'ID', label: 'ID',
@ -53,13 +53,16 @@ export default {
methods: { methods: {
getList() { getList() {
this.loading = true this.loading = true
getLogList(this.params).then(res => { getLogList(this.params)
this.loading = false .then(res => {
if (res.success) { if (res.success) {
this.data = res.data.rows this.data = res.data.rows
this.total = res.data.total this.total = res.data.total
} }
}) })
.finally(() => {
this.loading = false
})
} }
}, },
watch: { watch: {

View File

@ -20,7 +20,7 @@
<script> <script>
/* global $ */ /* global $ */
import { modifyInstance } from 'views/tce/services/tke.js' import { modifyInstance } from 'views/resource/ctstack/services/tke.js'
export default { export default {
props: { props: {
addData: { addData: {

View File

@ -10,7 +10,7 @@
</template> </template>
<script> <script>
import { getTKERegions } from 'views/tce/services/tke.js' import { getTKERegions } from 'views/resource/ctstack/services/tke.js'
const columns = [ const columns = [
{ {
label: '名称', label: '名称',
@ -45,7 +45,6 @@ export default {
}, },
getData() { getData() {
getTKERegions({ getTKERegions({
tenantUuid: this.platformObject.tceTenantUuid,
vendorId: this.detail.vendorId vendorId: this.detail.vendorId
}).then(data => { }).then(data => {
if (data.success) { if (data.success) {

View File

@ -9,7 +9,7 @@
</template> </template>
<script> <script>
import { getsecrectList } from 'views/tce/services/tke.js' import { getsecrectList } from 'views/resource/ctstack/services/tke.js'
const columns = [ const columns = [
{ {
label: '名称', label: '名称',
@ -57,13 +57,16 @@ export default {
rows: this.params.rows, rows: this.params.rows,
params: JSON.stringify([{ param: { vendorId: this.detail.vendorId, clusterId: this.detail.clusterId }, sign: 'EQ' }]) params: JSON.stringify([{ param: { vendorId: this.detail.vendorId, clusterId: this.detail.clusterId }, sign: 'EQ' }])
} }
getsecrectList(params).then(data => { getsecrectList(params)
.then(data => {
if (data.success) { if (data.success) {
this.loading = false
this.tableData = data.data.rows this.tableData = data.data.rows
this.total = data.data.total this.total = data.data.total
} }
}) })
.finally(() => {
this.loading = false
})
} }
}, },
watch: { watch: {

View File

@ -19,7 +19,7 @@
</template> </template>
<script> <script>
import { getServiceList } from 'views/tce/services/tke.js' import { getServiceList } from 'views/resource/ctstack/services/tke.js'
const columns = [ const columns = [
{ {
label: '名称', label: '名称',
@ -67,13 +67,16 @@ export default {
rows: this.params.rows, rows: this.params.rows,
params: JSON.stringify([{ param: { vendorId: this.vendorId, clusterId: this.clusterInfo.clusterId }, sign: 'EQ' }]) params: JSON.stringify([{ param: { vendorId: this.vendorId, clusterId: this.clusterInfo.clusterId }, sign: 'EQ' }])
} }
getServiceList(params).then(data => { getServiceList(params)
.then(data => {
if (data.success) { if (data.success) {
this.loading = false
this.tableData = data.data.rows this.tableData = data.data.rows
this.total = data.data.total this.total = data.data.total
} }
}) })
.finally(() => {
this.loading = false
})
} }
}, },
watch: { watch: {

View File

@ -57,7 +57,8 @@ export default {
this.$refs.data.validate(valid => { this.$refs.data.validate(valid => {
if (valid) { if (valid) {
this.loading = true this.loading = true
createFloatIp(this.addData.data).then(data => { createFloatIp(this.addData.data)
.then(data => {
if (data.success) { if (data.success) {
this.$message({ this.$message({
type: 'success', type: 'success',
@ -66,6 +67,8 @@ export default {
this.addData.dialog = false this.addData.dialog = false
this.$parent.$parent.getData() this.$parent.$parent.getData()
} }
})
.finally(() => {
this.loading = false this.loading = false
}) })
} }

View File

@ -197,11 +197,12 @@ export default {
}, },
getData() { getData() {
this.loading = true this.loading = true
getFloatIp(this.params).then(data => { getFloatIp(this.params)
.then(data => {
if (data.success) { if (data.success) {
this.secretData = data.data.rows this.secretData = data.data.rows
this.total = data.data.total this.total = data.data.total
this.loading = false
this.secretData.forEach(item => { this.secretData.forEach(item => {
if (item.projectVisibility && item.projectVisibility != 'GLOBAL_PROJECT') { if (item.projectVisibility && item.projectVisibility != 'GLOBAL_PROJECT') {
item.disabled = true item.disabled = true
@ -209,6 +210,9 @@ export default {
}) })
} }
}) })
.finally(() => {
this.loading = false
})
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.params.rows = val this.params.rows = val

View File

@ -313,11 +313,12 @@ export default {
}, },
getData() { getData() {
this.loading = true this.loading = true
getVolume(this.params).then(data => { getVolume(this.params)
.then(data => {
if (data.success) { if (data.success) {
this.tableData = data.data.rows this.tableData = data.data.rows
this.total = data.data.total this.total = data.data.total
this.loading = false
this.tableData.forEach(data => { this.tableData.forEach(data => {
if ((data.projectVisibility && data.projectVisibility != 'GLOBAL_PROJECT') || data.tenantId || data.tenantIds || data.tenantName) { if ((data.projectVisibility && data.projectVisibility != 'GLOBAL_PROJECT') || data.tenantId || data.tenantIds || data.tenantName) {
data.disabled = true data.disabled = true
@ -328,6 +329,9 @@ export default {
}) })
} }
}) })
.finally(() => {
this.loading = false
})
}, },
dropdownClick(command) { dropdownClick(command) {
switch (command.index) { switch (command.index) {

View File

@ -269,7 +269,8 @@ export default {
if (valid) { if (valid) {
this.addData.vendorId = this.platformObject.vendorId this.addData.vendorId = this.platformObject.vendorId
this.loading = true this.loading = true
createImage(this.addData).then(data => { createImage(this.addData)
.then(data => {
if (data.success) { if (data.success) {
this.$message({ this.$message({
type: 'success', type: 'success',
@ -278,6 +279,8 @@ export default {
this.getData() this.getData()
this.addDialogVisible = false this.addDialogVisible = false
} }
})
.finally(() => {
this.loading = false this.loading = false
}) })
} else { } else {
@ -287,11 +290,12 @@ export default {
}, },
getData() { getData() {
this.loading = true this.loading = true
getImage(this.params).then(data => { getImage(this.params)
.then(data => {
if (data.success) { if (data.success) {
this.imageData = data.data.rows this.imageData = data.data.rows
this.selectList = [] this.selectList = []
this.loading = false
this.imageData.forEach(data => { this.imageData.forEach(data => {
if ((data.projectVisibility && data.projectVisibility != 'GLOBAL_PROJECT') || data.tenantId || data.tenantIds || data.tenantName) { if ((data.projectVisibility && data.projectVisibility != 'GLOBAL_PROJECT') || data.tenantId || data.tenantIds || data.tenantName) {
data.disabled = true data.disabled = true
@ -300,6 +304,9 @@ export default {
this.total = data.data.total this.total = data.data.total
} }
}) })
.finally(() => {
this.loading = false
})
}, },
handleModify(id) { handleModify(id) {
detailImage(id).then(data => { detailImage(id).then(data => {

View File

@ -369,10 +369,11 @@ export default {
}, },
getData() { getData() {
this.loading = true this.loading = true
getKey(this.params).then(data => { getKey(this.params)
.then(data => {
if (data.success) { if (data.success) {
this.list = data.data.rows this.list = data.data.rows
this.loading = false
this.selectList = [] this.selectList = []
this.total = data.data.total this.total = data.data.total
this.list.forEach(item => { this.list.forEach(item => {
@ -382,6 +383,9 @@ export default {
}) })
} }
}) })
.finally(() => {
this.loading = false
})
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.params.rows = val this.params.rows = val

View File

@ -393,12 +393,13 @@ export default {
}, },
getData() { getData() {
this.loading = true this.loading = true
getGroup(this.params).then(data => { getGroup(this.params)
.then(data => {
if (data.success) { if (data.success) {
this.tableData = data.data.rows this.tableData = data.data.rows
this.total = data.data.total this.total = data.data.total
this.selectList = [] this.selectList = []
this.loading = false
this.refreshId() this.refreshId()
this.tableData.forEach(data => { this.tableData.forEach(data => {
if ((data.projectVisibility && data.projectVisibility != 'GLOBAL_PROJECT') || data.tenantId || data.tenantIds || data.tenantName) { if ((data.projectVisibility && data.projectVisibility != 'GLOBAL_PROJECT') || data.tenantId || data.tenantIds || data.tenantName) {
@ -411,6 +412,9 @@ export default {
}) })
} }
}) })
.finally(() => {
this.loading = false
})
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.params.rows = val this.params.rows = val

View File

@ -60,7 +60,8 @@ export default {
if (data.password) data.password = encrypt(data.password) if (data.password) data.password = encrypt(data.password)
if (data.endPassword) data.endPassword = encrypt(data.endPassword) if (data.endPassword) data.endPassword = encrypt(data.endPassword)
this.loading = true this.loading = true
createVm('create', data).then(data => { createVm('create', data)
.then(data => {
if (data.success) { if (data.success) {
this.$message({ this.$message({
type: 'success', type: 'success',
@ -68,6 +69,8 @@ export default {
}) })
this.goBack() this.goBack()
} }
})
.finally(() => {
this.loading = false this.loading = false
}) })
} }

View File

@ -103,8 +103,7 @@ export default {
rows: 10 rows: 10
}, },
searchData: { searchData: {
name: '', name: ''
tenantUuid: ''
}, },
snapshotList: [], snapshotList: [],
// addData: { // addData: {

View File

@ -198,12 +198,12 @@ export default {
getData() { getData() {
this.refreshId() this.refreshId()
this.loading = true this.loading = true
getFlavor(this.params).then(data => { getFlavor(this.params)
.then(data => {
if (data.success) { if (data.success) {
this.specificationData = data.data.rows this.specificationData = data.data.rows
this.total = data.data.total this.total = data.data.total
this.selectList = [] this.selectList = []
this.loading = false
this.refreshId() this.refreshId()
this.specificationData.forEach(item => { this.specificationData.forEach(item => {
const self = this const self = this
@ -213,6 +213,9 @@ export default {
}) })
} }
}) })
.finally(() => {
this.loading = false
})
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.params.rows = val this.params.rows = val

View File

@ -42,14 +42,15 @@ export default {
this.$refs.data.validate(async valid => { this.$refs.data.validate(async valid => {
if (valid) { if (valid) {
this.loading = true this.loading = true
const data = await modifyVpc(this.addData) const data = await modifyVpc(this.addData).finally(() => {
this.loading = false
})
if (data.success) { if (data.success) {
this.$message({ this.$message({
type: 'success', type: 'success',
message: data.message message: data.message
}) })
this.dialog.visible = false this.dialog.visible = false
this.loading = false
this.$emit('get-data') this.$emit('get-data')
} }
} }

View File

@ -94,7 +94,8 @@ export default {
this.addData.dnsNames = DnsFilter(this.addData.dnsName) this.addData.dnsNames = DnsFilter(this.addData.dnsName)
} }
this.loading = true this.loading = true
createSubnet(this.addData.data).then(data => { createSubnet(this.addData.data)
.then(data => {
if (data.success) { if (data.success) {
this.$message({ this.$message({
type: 'success', type: 'success',
@ -103,6 +104,8 @@ export default {
this.addData.dialog = false this.addData.dialog = false
this.$parent.$parent.getData() this.$parent.$parent.getData()
} }
})
.finally(() => {
this.loading = false this.loading = false
}) })
} }

View File

@ -357,11 +357,11 @@ export default {
}, },
getData() { getData() {
this.loading = true this.loading = true
getVpc(this.params).then(data => { getVpc(this.params)
.then(data => {
if (data.success) { if (data.success) {
this.list = data.data.rows this.list = data.data.rows
this.total = data.data.total this.total = data.data.total
this.loading = false
this.list.forEach(data => { this.list.forEach(data => {
if ((data.projectVisibility && data.projectVisibility != 'GLOBAL_PROJECT') || data.tenantId || data.tenantIds || data.tenantName) { if ((data.projectVisibility && data.projectVisibility != 'GLOBAL_PROJECT') || data.tenantId || data.tenantIds || data.tenantName) {
data.disabled = true data.disabled = true
@ -369,6 +369,9 @@ export default {
}) })
} }
}) })
.finally(() => {
this.loading = false
})
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.params.rows = val this.params.rows = val

View File

@ -13,5 +13,7 @@ export default {
ctstackFloatIp: () => import('views/resource/ctstack/page/floatIp/index.vue'), ctstackFloatIp: () => import('views/resource/ctstack/page/floatIp/index.vue'),
ctstackSnapshot: () => import('views/resource/ctstack/page/snapshot/index.vue'), ctstackSnapshot: () => import('views/resource/ctstack/page/snapshot/index.vue'),
ctstackContainer: () => import('views/resource/ctstack/page/container/index.vue'), ctstackContainer: () => import('views/resource/ctstack/page/container/index.vue'),
ctstackCreateCluster: () => import('views/resource/ctstack/page/container/creatCluster/index.vue') ctstackClusterAdd: () => import('views/resource/ctstack/page/container/addCluster.vue'),
ctstackCreateCluster: () => import('views/resource/ctstack/page/container/creatCluster/index.vue'),
ctstackInstanceAdd: () => import('views/resource/ctstack/page/container/instance/create/index.vue')
} }

View File

@ -0,0 +1,184 @@
import { request } from '@cmp/cmp-element'
import { wrapperParams } from 'utils'
export function getScheduledActionList(params) {
return request.get('/cmp/plugins/ctstack/v1/as/scheduledAction', { params })
}
export function addScheduledAction(params) {
return request.post('/cmp/plugins/ctstack/v1/as/scheduledAction', wrapperParams(params))
}
export function editScheduledAction(params) {
return request.put(`/cmp/plugins/ctstack/v1/as/scheduledAction/${params.id}`, wrapperParams(params))
}
export function delScheduledAction(params) {
return request.delete(`/cmp/plugins/ctstack/v1/as/scheduledAction/${params.id}`, { data: wrapperParams(params) })
}
// 通知列表
export function getNotifyList(params) {
return request.get('/cmp/plugins/ctstack/v1/autoscaling/listNotification', { params })
}
export function delNotify(params) {
return request.delete(`/cmp/plugins/ctstack/v1/autoscaling/deleteNotificationConfiguration/${params.id}`)
}
// 伸缩组列表
export function getTelescopicGroupList(params) {
return request.get('/cmp/plugins/ctstack/v1/autoscalings', { params })
}
// 伸缩组列表 查询用户账户在弹性伸缩中的资源限制
export function getDescribeAccount(params) {
return request.get('/cmp/plugins/ctstack/v1/autoscalings/describeAccount', { params })
}
// 告警策略列表
export function getAlertList(params) {
return request.get('/cmp/plugins/ctstack/v1/as/policies/list', { params })
}
// 添加
export function addAlert(params) {
return request.post('/cmp/plugins/ctstack/v1/as/policies/add', wrapperParams(params))
}
// 修改
export function editAlert(params) {
return request.post(`/cmp/plugins/ctstack/v1/as/policies/update/${params.id}`, wrapperParams(params))
}
// 删除
export function delAlert(params) {
return request.get(`/cmp/plugins/ctstack/v1/as/policies/del/${params.id}`)
}
// 执行
export function runAlert(params) {
return request.get(`/cmp/plugins/ctstack/v1/as/policies/off/${params.id}`)
}
// 伸缩活动列表
export function getActivityList(params) {
return request.get('/cmp/plugins/ctstack/v1/as/activites/list', { params })
}
export function getLifecycleList(params) {
return request.get('/cmp/plugins/ctstack/v1/as/lifecycleHook', { params })
}
export function addLifecycle(params) {
return request.post('/cmp/plugins/ctstack/v1/as/lifecycleHook', wrapperParams(params))
}
export function editLifecycle(params) {
return request.put(`/cmp/plugins/ctstack/v1/as/lifecycleHook/${params.id}`, wrapperParams(params))
}
export function delLifecycle(params) {
return request.delete(`/cmp/plugins/ctstack/v1/as/lifecycleHook/${params.id}`, { data: wrapperParams(params) })
}
// 移除保护
export function setInstancesProtection(params) {
return request.put('/cmp/plugins/ctstack/v1/as/instances/setInstancesProtection', wrapperParams(params))
}
export function getInstancesList(params) {
return request.get('/cmp/plugins/ctstack/v1/as/instances', { params })
}
export function delInstances(id, params) {
return request.post(`/cmp/plugins/ctstack/v1/autoscalings/delCase/${id}`, params)
}
export function addInstances(id, params) {
return request.post(`/cmp/plugins/ctstack/v1/autoscalings/attachInstances/${id}`, wrapperParams(params))
}
export function updateStretchGroup(params) {
return request.put('/cmp/plugins/ctstack/v1/autoscalings/updateStretchGroup', wrapperParams(params))
}
export function createStretchGroup(params) {
return request.post('/cmp/plugins/ctstack/v1/autoscalings/createStretchGroup', wrapperParams(params))
}
export function modifyLoadBalancers(params) {
return request.put('/cmp/plugins/ctstack/v1/autoscalings/modifyLoadBalancers', wrapperParams(params))
}
export function setTelescopicGroupState(params) {
return request.put('/cmp/plugins/ctstack/v1/autoscalings/updateGroupEnableState', wrapperParams(params))
}
export function delTelescopicGroup(params) {
return request.delete('/cmp/plugins/ctstack/v1/autoscalings/removeStretchGroup', { data: wrapperParams(params) })
}
export function getCloudServer(params) {
return request.get('/cmp/plugins/ctstack/v1/vms/getCloudServer', { params })
}
export function getConfiguration(params) {
return request.get('/cmp/plugins/ctstack/v1/as/launchConfiguration', { params })
}
export function createConfiguration(params) {
return request.post('/cmp/plugins/ctstack/v1/as/launchConfiguration/create', wrapperParams(params))
}
export function editConfiguration(params) {
return request.put('/cmp/plugins/ctstack/v1/as/launchConfiguration/update', wrapperParams(params))
}
export function upgradeConfiguration(params) {
return request.post('/cmp/plugins/ctstack/v1/as/launchConfiguration/upgrade', wrapperParams(params))
}
export function delConfiguration(params) {
return request.delete(
'/cmp/plugins/ctstack/v1/as/launchConfiguration',
{ data: wrapperParams(params) },
{
headers: { 'Content-Type': 'multipart/form-data', BsmAjaxHeader: true, options: { noSeri: true } }
}
)
}
// 获取用户组
export function getUserList(params) {
return request.get(`/cmp/plugins/ctstack/v1/autoscaling/listGroups/${params.vendorId}`, { params })
}
// 添加通知
export function addNotify(params) {
return request.post('/cmp/plugins/ctstack/v1/autoscaling/createNotificationConfiguration', wrapperParams(params))
}
// 修改通知
export function editNotify(params) {
return request.put('/cmp/plugins/ctstack/v1/autoscaling/modifyNotificationConfiguration', wrapperParams(params))
}
export function addAsByCluster(params) {
return request.post('/cmp/plugins/ctstack/v1/tke/group/add', wrapperParams(params))
}
const lbsListUrl = '/cmp/plugins/ctstack/v1/lbs'
export function getLbsList(params) {
return request.get(lbsListUrl, {
params
})
}
export function setImage(params) {
return request.post('/cmp/plugins/ctstack/v1/as/launchConfiguration/imageconfig', wrapperParams(params))
}
export function getConfigDetail(params) {
return request.get(`/cmp/plugins/ctstack/v1/as/launchConfiguration/${params.launchConfigurationId}`, { params })
}
export function getFlavorsMulti(params) {
return request.post('/cmp/plugins/ctstack/v1/flavors/multimodel', wrapperParams(params))
}

View File

@ -0,0 +1,31 @@
import { request } from '@cmp/cmp-element'
import { wrapperParams, downloadFile } from 'utils'
export function queryAvailable(params) {
return request.post('/cmp/plugins/ctstack/v1/cbs/policy/disk/queryAvailable', wrapperParams(params))
}
// 获取掩码
export function getQueryMask(params) {
return request.post('/cmp/plugins/ctstack/v1/cbs/policy/disk/denied', wrapperParams(params))
}
// 产品支持特性
export function getSupportFeatures(params) {
return request.post('/cmp/plugins/ctstack/v1/cbs/policy/disk/support', wrapperParams(params))
}
// 修改
export function editCloudDisk(params) {
return request.post('/cmp/plugins/ctstack/v1/cbs/policy/disk/attribute', wrapperParams(params))
}
// 查询用户资源
export function getUserResources(params) {
return request.post('/cmp/plugins/ctstack/v1/cbs/policy/userdisk', wrapperParams(params))
}
// 查询云硬盘配额
export function getCloudDiskQuota(params) {
return request.post('/cmp/plugins/ctstack/v1/cbs/policy/disk/config', wrapperParams(params))
}

View File

@ -0,0 +1,6 @@
import { request } from '@cmp/cmp-element'
import { wrapperParams } from 'utils/index'
export function getCategoriesByCode(serviceCode) {
return request.get(`/cos/v1/cloud/services/${serviceCode}/categories`)
}

View File

@ -0,0 +1,26 @@
import { request } from '@cmp/cmp-element'
import { wrapperParams, downloadFile } from 'utils'
// 字典
const dictUrl = '/sms/v1/dictionaries'
export function getDictChildrenTree(params) {
return request.get(`${dictUrl}/children/tree`, {
params: wrapperParams(params)
})
}
export function getDictionariesTree(params) {
return request.get('/sms/v1/dictionaries/children/tree', {
params
})
}
export function getDictionaries(params) {
return request.get('/sms/v1/dictionaries/children', {
params
})
}
export function getDictChildren(params) {
return request.get(`${dictUrl}/children`, { params })
}

View File

@ -27,3 +27,21 @@ export function removeFlavor(id) {
export function removeFlavors(params) { export function removeFlavors(params) {
return request.delete(url, { data: params }) return request.delete(url, { data: params })
} }
export function getFlavorType(params) {
return request.get(`${url}/type`, {
params
})
}
export function bindFlavor(params) {
return request.post(`${url}/binding`, wrapperParams(params))
}
export function unbindFlavor(params) {
return request.post(`${url}/unbind`, wrapperParams(params))
}
export function getFlavorListZone(id) {
return request.get(`${url}/listZone/${id}`)
}

View File

@ -0,0 +1,27 @@
import { request } from '@cmp/cmp-element'
import { wrapperParams, downloadFile } from 'utils'
const url = '/cmp/plugins/ctstack/v1/keypairs'
export function getKey(params) {
return request.get(url, { params })
}
export function removeKey(id) {
return request.delete(`${url}/${id}`)
}
export function createKey(params) {
return request.post(url, wrapperParams(params))
}
export function detailKey(id) {
return request.get(`${url}/${id}`)
}
export function modifyKey(params) {
return request.put(`${url}/${params.id}`, wrapperParams(params))
}
export function keyBindVm(params) {
return request.patch(`${url}/${params.keypairId}`, wrapperParams(params))
}

View File

@ -0,0 +1,21 @@
import { request } from '@cmp/cmp-element'
import { wrapperParams, downloadFile } from 'utils'
const url = '/cmp/plugins/ctstack/v1/regions'
export function getRegion(params) {
return request.get(url, { params })
}
export function getZone(params) {
return request.get(`${url}/zones`, { params: wrapperParams(params) })
}
export function getAllRegion() {
return request.get('/cmp/plugins/ctstack/v1/regions/distinct')
}
export function getAllZone(params) {
return request.get('/cmp/plugins/ctstack/v1/regions/zones/distinct', {
params: wrapperParams(params)
})
}

View File

@ -0,0 +1,37 @@
import { request } from '@cmp/cmp-element'
import { wrapperParams, downloadFile } from 'utils'
const url = '/cmp/plugins/ctstack/v1/sgroups'
export function getGroup(params) {
return request.get(url, { params })
}
export function removeGroup(id) {
return request.delete(`${url}/${id}`)
}
export function createGroup(params) {
return request.post(url, wrapperParams(params))
}
export function detailGroup(id) {
return request.get(`${url}/${id}`)
}
export function getGroupRule(params) {
return request.get(`${url}/rules`, {
params
})
}
export function createGroupRule(params) {
return request.post(`${url}/rules`, wrapperParams(params))
}
export function removeGroupRule(id) {
return request.delete(`${url}/rules/${id}`)
}
export function getSgroupsTemplateList(params) {
return request.get('/cmp/plugins/ctstack/v1/sgroups/template', { params })
}

View File

@ -1,18 +1,18 @@
import { request } from '@cmp/cmp-element' import { request } from '@cmp/cmp-element'
import { wrapperParams, downloadFile } from 'utils' import { wrapperParams, downloadFile } from 'utils'
const createCluterUrl = '/cmp/plugins/tce/v1/tke' const createCluterUrl = '/cmp/plugins/ctstack/v1/tke'
export function createCluter(params) { export function createCluter(params) {
return request.post(createCluterUrl, wrapperParams(params)) return request.post(createCluterUrl, wrapperParams(params))
} }
const describeVersionsUrl = '/cmp/plugins/tce/v1/tke/describeVersions' const describeVersionsUrl = '/cmp/plugins/ctstack/v1/tke/describeVersions'
export function getDescribeVersions(params) { export function getDescribeVersions(params) {
return request.get(`${describeVersionsUrl}`, { params }) return request.get(`${describeVersionsUrl}`, { params })
} }
// 集群 查询地域 // 集群 查询地域
const regionsUrl = '/cmp/plugins/tce/v1/tke/describe/regions' const regionsUrl = '/cmp/plugins/ctstack/v1/tke/describe/regions'
export function getTKERegions(params) { export function getTKERegions(params) {
return request.get(regionsUrl, { return request.get(regionsUrl, {
params params
@ -20,7 +20,7 @@ export function getTKERegions(params) {
} }
// 集群 创建 查询镜像信息 // 集群 创建 查询镜像信息
const createCluterImagesUrl = '/cmp/plugins/tce/v1/tke/describe/images' const createCluterImagesUrl = '/cmp/plugins/ctstack/v1/tke/describe/images'
export function createCluterImages(params) { export function createCluterImages(params) {
return request.get(createCluterImagesUrl, { return request.get(createCluterImagesUrl, {
params params
@ -28,14 +28,14 @@ export function createCluterImages(params) {
} }
// 集群 创建 校验CIDR // 集群 创建 校验CIDR
const checkCIDRUrl = '/cmp/plugins/tce/v1/tke/check/CIDR' const checkCIDRUrl = '/cmp/plugins/ctstack/v1/tke/check/CIDR'
export function checkCIDR(params) { export function checkCIDR(params) {
return request.get(checkCIDRUrl, { return request.get(checkCIDRUrl, {
params params
}) })
} }
const clusterListUrl = '/cmp/plugins/tce/v1/tke' const clusterListUrl = '/cmp/plugins/ctstack/v1/tke'
// 获取伸缩组 // 获取伸缩组
export function getFlexibleList(params) { export function getFlexibleList(params) {
return request.get(`${clusterListUrl}/group/list`, { return request.get(`${clusterListUrl}/group/list`, {
@ -75,13 +75,13 @@ export function postAddInstance(params) {
} }
// 集群 节点 创建 // 集群 节点 创建
const createInstanceUrl = '/cmp/plugins/tce/v1/tke/instance ' const createInstanceUrl = '/cmp/plugins/ctstack/v1/tke/instance '
export function createInstance(params) { export function createInstance(params) {
return request.post(createInstanceUrl, wrapperParams(params)) return request.post(createInstanceUrl, wrapperParams(params))
} }
// 集群 已存在节点 // 集群 已存在节点
const existInstanceUrl = '/cmp/plugins/tce/v1/tke/exist/instance' const existInstanceUrl = '/cmp/plugins/ctstack/v1/tke/exist/instance'
export function getExistInstance(params, id) { export function getExistInstance(params, id) {
return request.get(`${existInstanceUrl}/${params.vendorId}/${id}`, { return request.get(`${existInstanceUrl}/${params.vendorId}/${id}`, {
params params
@ -89,7 +89,7 @@ export function getExistInstance(params, id) {
} }
// 集群 节点 // 集群 节点
const instanceListUrl = '/cmp/plugins/tce/v1/tke/instance' const instanceListUrl = '/cmp/plugins/ctstack/v1/tke/instance'
export function getInstanceList(params) { export function getInstanceList(params) {
return request.get(instanceListUrl, { return request.get(instanceListUrl, {
@ -105,7 +105,7 @@ export function deleteInstance(params, data) {
} }
// 集群 节点 驱逐 // 集群 节点 驱逐
const drainUrl = '/cmp/plugins/tce/v1/tke/drain' const drainUrl = '/cmp/plugins/ctstack/v1/tke/drain'
export function drain(params) { export function drain(params) {
return request.delete(`${drainUrl}/${params.vendorId}/${params.id}`, { return request.delete(`${drainUrl}/${params.vendorId}/${params.id}`, {
data: { instanceId: params.instanceId } data: { instanceId: params.instanceId }
@ -113,10 +113,10 @@ export function drain(params) {
} }
export function operateInstance(params) { export function operateInstance(params) {
return request.post('/cmp/plugins/tce/v1/tke/block/operation', wrapperParams(params)) return request.post('/cmp/plugins/ctstack/v1/tke/block/operation', wrapperParams(params))
} }
const secrectListUrl = '/cmp/plugins/tce/v1/tke/cluster' const secrectListUrl = '/cmp/plugins/ctstack/v1/tke/cluster'
export function getsecrectList(params) { export function getsecrectList(params) {
return request.get(secrectListUrl, { return request.get(secrectListUrl, {
params params
@ -124,7 +124,7 @@ export function getsecrectList(params) {
} }
// 集群 服务 // 集群 服务
const serviceListUrl = '/cmp/plugins/tce/v1/tke/service' const serviceListUrl = '/cmp/plugins/ctstack/v1/tke/service'
export function getServiceList(params) { export function getServiceList(params) {
return request.get(serviceListUrl, { return request.get(serviceListUrl, {
params params
@ -149,7 +149,7 @@ export function deleteCluster(params, mode) {
// 容器服务 日志列表 // 容器服务 日志列表
export function getLogList(params) { export function getLogList(params) {
return request.get('/cmp/plugins/tce/v1/tke/logCollectorController', { params }) return request.get('/cmp/plugins/ctstack/v1/tke/logCollectorController', { params })
} }
export function getClusterList(params) { export function getClusterList(params) {