This repository has been archived by the owner on Nov 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #360 from eclipse-che4z/sync-def-profile
Store workspace sync profiles and show it on vscode status bar
- Loading branch information
Showing
17 changed files
with
583 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
packages/explorer-for-endevor/src/commands/addServiceAndLocation.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* © 2023 Broadcom Inc and/or its subsidiaries; All rights reserved | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Broadcom, Inc. - initial API and implementation | ||
*/ | ||
|
||
import { EndevorServiceName } from '../settings/_doc/Settings'; | ||
import { Action } from '../store/_doc/Actions'; | ||
import { | ||
EndevorId, | ||
EndevorLocationName, | ||
EndevorServiceDescriptions, | ||
ExistingEndevorServiceDescriptions, | ||
ValidEndevorConnection, | ||
ValidEndevorSearchLocationDescriptions, | ||
} from '../store/_doc/v2/Store'; | ||
import { addNewSearchLocation } from './location/addNewSearchLocation'; | ||
import { addNewServiceCommand } from './service/addNewService'; | ||
|
||
export const addServiceAndLocationCommand = async ( | ||
dispatch: (action: Action) => Promise<void>, | ||
serviceConfigurations: { | ||
getAllServiceNames: () => ReadonlyArray<EndevorServiceName>; | ||
getValidServiceDescriptions: () => Promise<ExistingEndevorServiceDescriptions>; | ||
}, | ||
configurations: { | ||
getConnectionDetails: ( | ||
id: EndevorId | ||
) => Promise<ValidEndevorConnection | undefined>; | ||
getServiceDescriptionsBySearchLocationId: ( | ||
searchLocationId: EndevorId | ||
) => Promise<EndevorServiceDescriptions>; | ||
getSearchLocationNames: () => ReadonlyArray<EndevorLocationName>; | ||
getValidSearchLocationDescriptionsForService: ( | ||
serviceId: EndevorId | ||
) => ValidEndevorSearchLocationDescriptions; | ||
getValidUsedServiceDescriptions: () => Promise<ExistingEndevorServiceDescriptions>; | ||
} | ||
) => { | ||
const serviceId = await addNewServiceCommand(dispatch, serviceConfigurations); | ||
if (serviceId) { | ||
await addNewSearchLocation(dispatch, configurations)(serviceId); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.