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
28 changes: 27 additions & 1 deletion ui/src/views/infra/network/providers/ProviderItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ export default {
currentAction: {},
page: 1,
pageSize: 10,
itemCount: 0
itemCount: 0,
pluginEnabled: false
}
},
provide () {
Expand Down Expand Up @@ -139,6 +140,19 @@ export default {
this.provider.lists.map(this.fetchOptions)
}
},
async fetchConfiguration (configName) {
const params = {
name: configName
}
getAPI('listConfigurations', params).then(json => {
if (json.listconfigurationsresponse.configuration !== null) {
const config = json.listconfigurationsresponse.configuration[0]
if (config && config.name === params.name) {
this.pluginEnabled = config.value
}
}
})
},
async fetchOptions (args) {
if (!args || Object.keys(args).length === 0) {
return
Expand Down Expand Up @@ -185,6 +199,18 @@ export default {
}

try {
const providers = ['tungsten', 'nsx', 'netris']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this list be retrieved?

Copy link
Contributor Author

@Pearl1594 Pearl1594 Aug 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean from the backend? I don't believe so that we have a way (API) to identify external network providers.
I mean, we can get the list of all network service providers, but not what needs a global setting to be enabled to actually use it.

const apiLower = args.api.toLowerCase()

for (const provider of providers) {
if (apiLower.includes(provider)) {
await this.fetchConfiguration(`${provider}.plugin.enable`)
if (!this.pluginEnabled) {
this.listData[args.title].loading = false
return
}
}
}
const listResult = await this.executeApi(args.api, params)
this.listData[args.title].data = listResult.data
this.listData[args.title].itemCount = listResult.itemCount
Expand Down
Loading