Skip to content
Open
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
10 changes: 5 additions & 5 deletions ui/src/components/view/SearchFilter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

<script>

import { api } from '@/api/index'
import { getAPI } from '@/api/index'

export default {
name: 'SearchFilter',
Expand Down Expand Up @@ -296,7 +296,7 @@ export default {
},
getHypervisor (value) {
return new Promise((resolve) => {
api('listHypervisors').then(json => {
getAPI('listHypervisors').then(json => {
if (json?.listhypervisorsresponse?.hypervisor) {
for (const key in json.listhypervisorsresponse.hypervisor) {
const hypervisor = json.listhypervisorsresponse.hypervisor[key]
Expand All @@ -316,7 +316,7 @@ export default {
if (!this.$isValidUuid(id)) {
return resolve('')
}
api(apiName, { listAll: true, id: id }).then(json => {
getAPI(apiName, { listAll: true, id: id }).then(json => {
const items = json && json[responseKey1] && json[responseKey1][responseKey2]
if (Array.isArray(items) && items.length > 0 && items[0] && items[0][field] !== undefined) {
resolve(items[0][field])
Expand All @@ -337,7 +337,7 @@ export default {
},
getAlertType (type) {
return new Promise((resolve) => {
api('listAlertTypes').then(json => {
getAPI('listAlertTypes').then(json => {
const alertTypes = {}
for (const key in json.listalerttypesresponse.alerttype) {
const alerttype = json.listalerttypesresponse.alerttype[key]
Expand All @@ -351,7 +351,7 @@ export default {
},
getAffinityGroupType (type) {
return new Promise((resolve) => {
api('listAffinityGroupTypes').then(json => {
getAPI('listAffinityGroupTypes').then(json => {
const alertTypes = {}
for (const key in json.listaffinitygrouptypesresponse.affinityGroupType) {
const affinityGroupType = json.listaffinitygrouptypesresponse.affinityGroupType[key]
Expand Down
Loading