diff --git a/pkg/instances/instances.go b/pkg/instances/instances.go index 45a415b..41d0f66 100644 --- a/pkg/instances/instances.go +++ b/pkg/instances/instances.go @@ -319,6 +319,7 @@ func (i *instances) GetControlPlaneStatus() []StatusOutput { // GetMetadata returns the result from the /v1.0/metadata endpoint func (i *instances) GetMetadata(scope string, id string) MetadataOutput { url := "" + secondaryUrl := "" if i.kubeClient != nil { resp, err := i.kubeClient.AppsV1().Deployments(scope).List((meta_v1.ListOptions{})) if err != nil || len(resp.Items) == 0 { @@ -339,7 +340,8 @@ func (i *instances) GetMetadata(scope string, id string) MetadataOutput { if len(pods.Items) > 0 { p := pods.Items[0] - url = fmt.Sprintf("http://%v:%v/v1.0/metadata", p.Status.PodIP, 3500) + url = fmt.Sprintf("http://%v:%v/v1.0/metadata", p.Status.PodIP, 3501) + secondaryUrl = fmt.Sprintf("http://%v:%v/v1.0/metadata", p.Status.PodIP, 3500) } } } @@ -351,9 +353,13 @@ func (i *instances) GetMetadata(scope string, id string) MetadataOutput { } if url != "" { resp, err := http.Get(url) - if err != nil { + if err != nil && secondaryUrl != "" { log.Println(err) - return MetadataOutput{} + resp, err = http.Get(secondaryUrl) + if err != nil { + log.Println(err) + return MetadataOutput{} + } } defer resp.Body.Close() diff --git a/web/package-lock.json b/web/package-lock.json index 2180b79..7a105bf 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -7460,12 +7460,6 @@ "ms": "^2.0.0" } }, - "husky": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/husky/-/husky-7.0.2.tgz", - "integrity": "sha512-8yKEWNX4z2YsofXAMT7KvA1g8p+GxtB1ffV8XtpAEGuXNAbCV5wdNKH+qTpw8SM9fh4aMPDR+yQuKfgnreyZlg==", - "dev": true - }, "iconv-corefoundation": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/iconv-corefoundation/-/iconv-corefoundation-1.1.6.tgz", diff --git a/web/package.json b/web/package.json index 7e3da05..cd641b7 100644 --- a/web/package.json +++ b/web/package.json @@ -55,7 +55,6 @@ "electron-builder": "^22.11.7", "fs-extra": "^10.0.0", "git-describe": "^4.1.0", - "husky": "^7.0.2", "jasmine-core": "^3.9.0", "jasmine-spec-reporter": "^7.0.0", "karma": "~6.3.4", @@ -71,11 +70,5 @@ }, "build": { "appId": "com.daprio.dapr-dashboard" - }, - "sideEffects": false, - "husky": { - "hooks": { - "pre-push": "ng lint" - } } }