diff --git a/src/jetstream/plugins/desktop/endpoints.go b/src/jetstream/plugins/desktop/endpoints.go index 4de98370f1..b7feb96efa 100644 --- a/src/jetstream/plugins/desktop/endpoints.go +++ b/src/jetstream/plugins/desktop/endpoints.go @@ -42,11 +42,17 @@ func (d *DesktopEndpointStore) FindByAPIEndpoint(endpoint string, encryptionKey } func (d *DesktopEndpointStore) ListByAPIEndpoint(endpoint string, encryptionKey []byte) ([]*interfaces.CNSIRecord, error) { - return d.store.ListByAPIEndpoint(endpoint, encryptionKey) + local, err := ListCloudFoundry() + db, err := d.store.ListByAPIEndpoint(endpoint, encryptionKey) + merged := mergeEndpoints(db, local) + return merged, err } func (d *DesktopEndpointStore) ListByCreator(userGUID string, encryptionKey []byte) ([]*interfaces.CNSIRecord, error) { - return d.store.ListByCreator(userGUID, encryptionKey) + local, err := ListCloudFoundry() + db, err := d.store.ListByCreator(userGUID, encryptionKey) + merged := mergeEndpoints(db, local) + return merged, err } func (d *DesktopEndpointStore) Delete(guid string) error { diff --git a/src/jetstream/plugins/desktop/kubernetes/endpoints.go b/src/jetstream/plugins/desktop/kubernetes/endpoints.go index 5f01a52cfc..3994c77713 100644 --- a/src/jetstream/plugins/desktop/kubernetes/endpoints.go +++ b/src/jetstream/plugins/desktop/kubernetes/endpoints.go @@ -47,11 +47,17 @@ func (d *EndpointStore) FindByAPIEndpoint(endpoint string, encryptionKey []byte) } func (d *EndpointStore) ListByAPIEndpoint(endpoint string, encryptionKey []byte) ([]*interfaces.CNSIRecord, error) { - return d.store.ListByAPIEndpoint(endpoint, encryptionKey) + local, _, err := ListKubernetes() + db, err := d.store.ListByAPIEndpoint(endpoint, encryptionKey) + merged := mergeEndpoints(db, local) + return merged, err } func (d *EndpointStore) ListByCreator(userGUID string, encryptionKey []byte) ([]*interfaces.CNSIRecord, error) { - return d.store.ListByCreator(userGUID, encryptionKey) + local, _, err := ListKubernetes() + db, err := d.store.ListByCreator(userGUID, encryptionKey) + merged := mergeEndpoints(db, local) + return merged, err } func (d *EndpointStore) Delete(guid string) error {