Skip to content

Commit c581181

Browse files
authored
Remove unsupported params from API calls on the UI (#6686)
1 parent e720b72 commit c581181

28 files changed

+28
-53
lines changed

ui/src/components/header/SamlDomainSwitcher.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export default {
7373
const samlAccounts = []
7474
const getNextPage = () => {
7575
this.loading = true
76-
api('listAndSwitchSamlAccount', { listAll: true, details: 'min', page: page, pageSize: 500 }).then(json => {
76+
api('listAndSwitchSamlAccount', { details: 'min', page: page, pageSize: 500 }).then(json => {
7777
if (json && json.listandswitchsamlaccountresponse && json.listandswitchsamlaccountresponse.samluseraccount) {
7878
samlAccounts.push(...json.listandswitchsamlaccountresponse.samluseraccount)
7979
}

ui/src/components/view/SearchView.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ export default {
449449
},
450450
fetchZones () {
451451
return new Promise((resolve, reject) => {
452-
api('listZones', { listAll: true, showicon: true }).then(json => {
452+
api('listZones', { showicon: true }).then(json => {
453453
const zones = json.listzonesresponse.zone
454454
resolve({
455455
type: 'zoneid',
@@ -475,7 +475,7 @@ export default {
475475
},
476476
fetchPods () {
477477
return new Promise((resolve, reject) => {
478-
api('listPods', { listAll: true }).then(json => {
478+
api('listPods').then(json => {
479479
const pods = json.listpodsresponse.pod
480480
resolve({
481481
type: 'podid',
@@ -488,7 +488,7 @@ export default {
488488
},
489489
fetchClusters () {
490490
return new Promise((resolve, reject) => {
491-
api('listClusters', { listAll: true }).then(json => {
491+
api('listClusters').then(json => {
492492
const clusters = json.listclustersresponse.cluster
493493
resolve({
494494
type: 'clusterid',

ui/src/components/view/SettingsTab.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,7 @@ export default {
142142
methods: {
143143
fetchData (callback) {
144144
this.tabLoading = true
145-
const params = {
146-
[this.scopeKey]: this.resource.id,
147-
listAll: true
148-
}
145+
const params = { [this.scopeKey]: this.resource.id }
149146
if (this.filter) {
150147
params.keyword = this.filter
151148
}

ui/src/config/section/offering.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,6 @@ export default {
247247
icon: 'wifi-outlined',
248248
docHelp: 'adminguide/networking.html#network-offerings',
249249
permission: ['listNetworkOfferings', 'listInfrastructure'],
250-
params: { isrecursive: 'true' },
251250
columns: ['name', 'state', 'guestiptype', 'traffictype', 'networkrate', 'domain', 'zone', 'order'],
252251
details: ['name', 'id', 'displaytext', 'guestiptype', 'traffictype', 'internetprotocol', 'networkrate', 'ispersistent', 'egressdefaultpolicy', 'availability', 'conservemode', 'specifyvlan', 'specifyipranges', 'supportspublicaccess', 'supportsstrechedl2subnet', 'service', 'tags', 'domain', 'zone'],
253252
resourceType: 'NetworkOffering',
@@ -339,7 +338,6 @@ export default {
339338
icon: 'deployment-unit-outlined',
340339
docHelp: 'plugins/nuage-plugin.html?#vpc-offerings',
341340
permission: ['listVPCOfferings', 'listInfrastructure'],
342-
params: { isrecursive: 'true' },
343341
resourceType: 'VpcOffering',
344342
columns: ['name', 'state', 'displaytext', 'domain', 'zone', 'order'],
345343
details: ['name', 'id', 'displaytext', 'internetprotocol', 'distributedvpcrouter', 'tags', 'service', 'domain', 'zone', 'created'],

ui/src/store/modules/user.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ const user = {
214214
})
215215
} else {
216216
const hide = message.loading(i18n.global.t('message.discovering.feature'), 0)
217-
api('listZones', { listall: true }).then(json => {
217+
api('listZones').then(json => {
218218
const zones = json.listzonesresponse.zone || []
219219
commit('SET_ZONES', zones)
220220
}).catch(error => {

ui/src/views/AutogenView.vue

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -876,6 +876,15 @@ export default {
876876
if (this.$showIcon()) {
877877
params.showIcon = true
878878
}
879+
880+
if (['listAnnotations', 'listRoles', 'listZonesMetrics', 'listPods',
881+
'listClustersMetrics', 'listHostsMetrics', 'listStoragePoolsMetrics',
882+
'listImageStores', 'listSystemVms', 'listManagementServers',
883+
'listConfigurations', 'listHypervisorCapabilities',
884+
'listAlerts', 'listNetworkOfferings', 'listVPCOfferings'].includes(this.apiName)) {
885+
delete params.listall
886+
}
887+
879888
api(this.apiName, params).then(json => {
880889
var responseName
881890
var objectName

ui/src/views/compute/DeployVM.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1920,7 +1920,7 @@ export default {
19201920
return new Promise((resolve) => {
19211921
this.loading.zones = true
19221922
const param = this.params.zones
1923-
const args = { listall: true, showicon: true }
1923+
const args = { showicon: true }
19241924
if (zoneId) args.id = zoneId
19251925
api(param.list, args).then(json => {
19261926
const zoneResponse = json.listzonesresponse.zone || []
@@ -1952,7 +1952,7 @@ export default {
19521952
param.loading = true
19531953
param.opts = []
19541954
const options = param.options || {}
1955-
if (!('listall' in options)) {
1955+
if (!('listall' in options) && !['zones', 'pods', 'clusters', 'hosts', 'dynamicScalingVmConfig', 'hypervisors'].includes(name)) {
19561956
options.listall = true
19571957
}
19581958
api(param.list, options).then((response) => {

ui/src/views/compute/EditVM.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ export default {
254254
fetchOsTypes () {
255255
this.osTypes.loading = true
256256
this.osTypes.opts = []
257-
api('listOsTypes', { listAll: true }).then(json => {
257+
api('listOsTypes').then(json => {
258258
this.osTypes.opts = json.listostypesresponse.ostype || []
259259
}).catch(error => {
260260
this.$notifyError(error)

ui/src/views/iam/SSLCertificateTab.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ export default {
152152
methods: {
153153
fetchData () {
154154
const params = {}
155-
params.listAll = true
156155
params.page = this.page
157156
params.pageSize = this.pageSize
158157
params.accountid = this.resource.id

ui/src/views/image/AddKubernetesSupportedVersion.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ export default {
189189
},
190190
fetchZoneData () {
191191
const params = {}
192-
params.listAll = true
193192
params.showicon = true
194193
this.zoneLoading = true
195194
api('listZones', params).then(json => {

0 commit comments

Comments
 (0)