diff --git a/src/pkg/p2p/preheat/provider/client/http_client.go b/src/pkg/p2p/preheat/provider/client/http_client.go index 4f346a72e7a..0c367286f77 100644 --- a/src/pkg/p2p/preheat/provider/client/http_client.go +++ b/src/pkg/p2p/preheat/provider/client/http_client.go @@ -84,7 +84,7 @@ func NewHTTPClient(insecure bool) *HTTPClient { // Get content from the url func (hc *HTTPClient) Get(url string, cred *auth.Credential, parmas map[string]string, options map[string]string) ([]byte, error) { bytes, err := hc.get(url, cred, parmas, options) - logMsg := fmt.Sprintf("Get %s with cred=%v, params=%v, options=%v", url, cred, parmas, options) + logMsg := fmt.Sprintf("Get %s with params=%v, options=%v", url, parmas, options) if err != nil { log.Errorf("%s: %s", logMsg, err) } else { diff --git a/src/pkg/p2p/preheat/provider/dragonfly.go b/src/pkg/p2p/preheat/provider/dragonfly.go index 32b3b6bc11e..524d76ebc20 100644 --- a/src/pkg/p2p/preheat/provider/dragonfly.go +++ b/src/pkg/p2p/preheat/provider/dragonfly.go @@ -162,7 +162,7 @@ func (dd *DragonflyDriver) Self() *Metadata { ID: "dragonfly", Name: "Dragonfly", Icon: "https://raw.githubusercontent.com/dragonflyoss/Dragonfly2/master/docs/images/logo/dragonfly-linear.png", - Version: "2.1.57", + Version: "2.1.59", Source: "https://github.com/dragonflyoss/Dragonfly2", Maintainers: []string{"chlins.zhang@gmail.com", "gaius.qi@gmail.com"}, } diff --git a/src/portal/src/app/base/left-side-nav/distribution/distribution-setup-modal/distribution-setup-modal.component.ts b/src/portal/src/app/base/left-side-nav/distribution/distribution-setup-modal/distribution-setup-modal.component.ts index cfd9fbaf42f..ba72e99c68d 100644 --- a/src/portal/src/app/base/left-side-nav/distribution/distribution-setup-modal/distribution-setup-modal.component.ts +++ b/src/portal/src/app/base/left-side-nav/distribution/distribution-setup-modal/distribution-setup-modal.component.ts @@ -432,6 +432,11 @@ export class DistributionSetupModalComponent implements OnInit, OnDestroy { this.checkBtnState = ClrLoadingState.LOADING; const instance: Instance = clone(this.model); instance.id = 0; + if (instance.auth_mode !== AuthMode.NONE) { + instance.auth_info = this.authData; + } else { + delete instance.auth_info; + } this.distributionService .PingInstances({ instance: this.handleInstance(instance), diff --git a/src/server/v2.0/handler/preheat.go b/src/server/v2.0/handler/preheat.go index 1ceaca1f00a..414d145a36c 100644 --- a/src/server/v2.0/handler/preheat.go +++ b/src/server/v2.0/handler/preheat.go @@ -565,6 +565,7 @@ func convertParamInstanceToModelInstance(model *models.Instance) (*instanceModel return &instanceModel.Instance{ AuthData: string(authData), + AuthInfo: model.AuthInfo, AuthMode: model.AuthMode, Default: model.Default, Description: model.Description, diff --git a/src/server/v2.0/handler/preheat_test.go b/src/server/v2.0/handler/preheat_test.go index 902e1acb18e..a94239baad4 100644 --- a/src/server/v2.0/handler/preheat_test.go +++ b/src/server/v2.0/handler/preheat_test.go @@ -39,7 +39,7 @@ func Test_convertProvidersToFrontend(t *testing.T) { {"", backend, []*models.Metadata{ - {ID: "dragonfly", Icon: "https://raw.githubusercontent.com/dragonflyoss/Dragonfly2/master/docs/images/logo/dragonfly-linear.png", Maintainers: []string{"chlins.zhang@gmail.com", "gaius.qi@gmail.com"}, Name: "Dragonfly", Source: "https://github.com/dragonflyoss/Dragonfly2", Version: "2.1.57"}, + {ID: "dragonfly", Icon: "https://raw.githubusercontent.com/dragonflyoss/Dragonfly2/master/docs/images/logo/dragonfly-linear.png", Maintainers: []string{"chlins.zhang@gmail.com", "gaius.qi@gmail.com"}, Name: "Dragonfly", Source: "https://github.com/dragonflyoss/Dragonfly2", Version: "2.1.59"}, {Icon: "https://github.com/uber/kraken/blob/master/assets/kraken-logo-color.svg", ID: "kraken", Maintainers: []string{"mmpei/peimingming@corp.netease.com"}, Name: "Kraken", Source: "https://github.com/uber/kraken", Version: "0.1.3"}, }, }, @@ -288,6 +288,7 @@ func Test_convertParamInstanceToModelInstance(t *testing.T) { Endpoint: "https://example.com", AuthMode: "none", AuthData: `{"name":"harbor"}`, + AuthInfo: map[string]string{"name": "harbor"}, Status: "Unknown", Default: true, Insecure: true,