Add git clone option for opening existing workspace (#14828)

* added git option to dialog

* Add validation for cloning workspace and hide radio buttons for project

* add test

* cleanup
This commit is contained in:
Kim Santiago
2021-03-26 15:30:29 -07:00
committed by GitHub
parent bbee4a1f38
commit ca19f08582
4 changed files with 215 additions and 51 deletions

View File

@@ -53,12 +53,19 @@ export const WorkspaceFileAlreadyExistsError = (file: string): string => { retur
//Open Existing Dialog
export const OpenExistingDialogTitle = localize('dataworkspace.openExistingDialogTitle', "Open existing");
export const FileNotExistError = (fileType: string, filePath: string): string => { return localize('dataworkspace.fileNotExistError', "The selected {0} file '{1}' does not exist or is not a file.", fileType, filePath); };
export const CloneParentDirectoryNotExistError = (location: string): string => { return localize('dataworkspace.cloneParentDirectoryNotExistError', "The selected clone path '{0}' does not exist or is not a directory.", location); };
export const Project = localize('dataworkspace.project', "Project");
export const Workspace = localize('dataworkspace.workspace', "Workspace");
export const LocationSelectorTitle = localize('dataworkspace.locationSelectorTitle', "Location");
export const ProjectFilePlaceholder = localize('dataworkspace.projectFilePlaceholder', "Select project (.sqlproj) file");
export const WorkspacePlaceholder = localize('dataworkspace.workspacePlaceholder', "Select workspace ({0}) file", WorkspaceFileExtension);
export const ProjectAlreadyOpened = (path: string): string => { return localize('dataworkspace.projectAlreadyOpened', "Project '{0}' is already opened.", path); };
export const Local = localize('dataworksapce.local', 'Local');
export const RemoteGitRepo = localize('dataworkspace.remoteGitRepo', "Remote git repository");
export const GitRepoUrlTitle = localize('dataworkspace.gitRepoUrlTitle', "Git repository URL");
export const GitRepoUrlPlaceholder = localize('dataworkspace.gitRepoUrlPlaceholder', "Enter remote git repository URL");
export const LocalClonePathTitle = localize('dataworkspace.localClonePathTitle', "Local clone path");
export const LocalClonePathPlaceholder = localize('dataworkspace.localClonePathPlaceholder', "Select location to clone repository locally");
// Workspace settings for saving new projects
export const ProjectConfigurationKey = 'projects';

View File

@@ -52,5 +52,6 @@ export enum TelemetryActions {
NewProjectDialogLaunched = 'NewProjectDialogLaunched',
OpeningWorkspace = 'OpeningWorkspace',
OpenExistingDialogLaunched = 'OpenExistingDialogLaunched',
NewProjectDialogCompleted = 'NewProjectDialogCompleted'
NewProjectDialogCompleted = 'NewProjectDialogCompleted',
GitClone = 'GitClone'
}