Merge pull request #12665 from chlins/fix/preheat-list-providers-under-project

fix(preheat): provider more info about p2p provider instance
This commit is contained in:
Steven Zou 2020-08-06 16:57:21 +08:00 committed by GitHub
commit f7bb6dd233
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -1898,3 +1898,7 @@ definitions:
type: integer
provider:
type: string
enabled:
type: boolean
default:
type: boolean

View File

@ -719,6 +719,8 @@ func (api *preheatAPI) ListProvidersUnderProject(ctx context.Context, params ope
providers = append(providers, &models.ProviderUnderProject{
ID: instance.ID,
Provider: fmt.Sprintf("%s %s-%s", instance.Vendor, instance.Name, instance.Endpoint),
Default: instance.Default,
Enabled: instance.Enabled,
})
}