Skip to content

Commit

Permalink
If storage items have the same name show them as one
Browse files Browse the repository at this point in the history
This PR fixes #2329.

Signed-off-by: Denis Golovin dgolovin@redhat.com
  • Loading branch information
dgolovin committed Feb 2, 2022
1 parent 152d58d commit d6a4ef5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/odo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,8 @@ export class OdoImpl implements Odo {

public async _getStorageNames(component: OpenShiftObject): Promise<OpenShiftObject[]> {
const result: cliInstance.CliExitData = await this.execute(Command.listStorageNames(), component.contextPath ? component.contextPath.fsPath : Platform.getUserHomePath());
return this.loadItems<Storage>(result).map<OpenShiftObject>((value) => new OpenShiftStorage(component, value.metadata.name, value.spec.path));
const storageList = this.loadItems<Storage>(result).map<OpenShiftObject>((value) => new OpenShiftStorage(component, value.metadata.name, value.spec.path));
return [...new Map(storageList.map(storage=>[storage.label, storage])).values()];
}

public async getServiceOperators(): Promise<ServiceOperatorShortInfo[]> {
Expand Down

0 comments on commit d6a4ef5

Please sign in to comment.