Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ui/src/components/view/ImageDeployInstanceButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</template>

<script>
import { api } from '@/api'
import { getAPI } from '@/api'
import ResourceIcon from '@/components/view/ResourceIcon'

export default {
Expand Down Expand Up @@ -100,7 +100,7 @@ export default {
this.itemCount = 0
this.fetchLoading = true
this.zones = []
api(this.imageApi, params).then(json => {
getAPI(this.imageApi, params).then(json => {
const imageResponse = json?.[this.imageApi.toLowerCase() + 'response']?.[this.$route.meta.name] || []
this.zones = imageResponse.map(i => ({
id: i.zoneid,
Expand All @@ -122,7 +122,7 @@ export default {
}
const zoneids = this.zones.map(z => z.id)
this.loading = true
api('listZones', { showicon: true, ids: zoneids.join(',') }).then(json => {
getAPI('listZones', { showicon: true, ids: zoneids.join(',') }).then(json => {
this.zones = json.listzonesresponse.zone || []
}).finally(() => {
this.loading = false
Expand Down
4 changes: 2 additions & 2 deletions ui/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import {
import { VueAxios } from './utils/request'
import directives from './utils/directives'
import Cookies from 'js-cookie'
import { api } from '@/api'
import { getAPI } from '@/api'
import { applyCustomGuiTheme } from './utils/guiTheme'

vueApp.use(VueAxios, router)
Expand Down Expand Up @@ -106,7 +106,7 @@ fetch('config.json?ts=' + Date.now())
let domainid = null

if (userid !== undefined && Cookies.get('sessionkey')) {
await api('listUsers', { userid: userid }).then(response => {
await getAPI('listUsers', { userid: userid }).then(response => {
accountid = response.listusersresponse.user[0].accountid
domainid = response.listusersresponse.user[0].domainid
})
Expand Down
4 changes: 2 additions & 2 deletions ui/src/utils/guiTheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// under the License.

import { vueProps } from '@/vue-app'
import { api } from '@/api'
import { getAPI } from '@/api'

export async function applyCustomGuiTheme (accountid, domainid) {
await fetch('config.json').then(response => response.json()).then(config => {
Expand Down Expand Up @@ -45,7 +45,7 @@ export async function applyCustomGuiTheme (accountid, domainid) {
}

async function fetchGuiTheme (params) {
return await api('listGuiThemes', params).then(response => {
return await getAPI('listGuiThemes', params).then(response => {
if (response.listguithemesresponse.guiThemes) {
return response.listguithemesresponse.guiThemes[0]
}
Expand Down
6 changes: 3 additions & 3 deletions ui/src/views/compute/KubernetesAddNodes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@

<script>
import { ref, reactive, toRaw } from 'vue'
import { api } from '@/api'
import { getAPI, postAPI } from '@/api'
import TooltipLabel from '@/components/widgets/TooltipLabel'

export default {
Expand Down Expand Up @@ -112,7 +112,7 @@ export default {
callListVms (accountId, domainId) {
return new Promise((resolve) => {
this.volumes = []
api('listVirtualMachines', {
getAPI('listVirtualMachines', {
accountId: accountId,
domainId: domainId,
details: 'min',
Expand Down Expand Up @@ -172,7 +172,7 @@ export default {
},
addNodesToKubernetesCluster (params) {
return new Promise((resolve, reject) => {
api('addNodesToKubernetesCluster', params).then(json => {
postAPI('addNodesToKubernetesCluster', params).then(json => {
const jobId = json.addnodestokubernetesclusterresponse.jobid
return resolve(jobId)
}).catch(error => {
Expand Down
4 changes: 2 additions & 2 deletions ui/src/views/compute/KubernetesRemoveNodes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

<script>
import { ref, reactive, toRaw } from 'vue'
import { api } from '@/api'
import { postAPI } from '@/api'
import TooltipLabel from '@/components/widgets/TooltipLabel'

export default {
Expand Down Expand Up @@ -137,7 +137,7 @@ export default {
},
removeNodesFromKubernetesCluster (params) {
return new Promise((resolve, reject) => {
api('removeNodesFromKubernetesCluster', params).then(json => {
postAPI('removeNodesFromKubernetesCluster', params).then(json => {
const jobId = json.removenodesfromkubernetesclusterresponse.jobid
return resolve(jobId)
}).catch(error => {
Expand Down
Loading