Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove plugins and editors from workspace creation page #13033

Merged
merged 1 commit into from
Apr 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,6 @@ export class CreateWorkspaceController {
* Hide progress loader if <code>true</code>.
*/
private hideLoader: boolean;

/**
* Plugin registry location if defined.
*/
private pluginRegistry: string;

/**
* Property for displaying or hidding the plugins list.
*/
private displayPlugins: boolean;

/**
* Default constructor that is using resource injection
*/
Expand Down Expand Up @@ -152,8 +141,6 @@ export class CreateWorkspaceController {
this.memoryByMachine = {};
this.forms = new Map();

this.pluginRegistry = this.createWorkspaceSvc.getPluginRegistryLocation();

this.namespaceId = this.namespaceSelectorSvc.getNamespaceId();
this.buildListOfUsedNames().then(() => {
this.workspaceName = this.randomSvc.getRandString({prefix: 'wksp-', list: this.usedNamesList});
Expand All @@ -164,7 +151,6 @@ export class CreateWorkspaceController {
// when stacks selector is rendered
// and default stack is selected
this.hideLoader = false;
this.displayPlugins = false;

// header toolbar
// dropdown button config
Expand Down Expand Up @@ -204,7 +190,6 @@ export class CreateWorkspaceController {

this.stack = this.stackSelectorSvc.getStackById(stackId);
this.workspaceConfig = angular.copy(this.stack.workspaceConfig);
this.displayPlugins = this.isPluginDefined();

if (!this.stack.workspaceConfig || !this.stack.workspaceConfig.defaultEnv) {
this.memoryByMachine = {};
Expand Down Expand Up @@ -409,13 +394,4 @@ export class CreateWorkspaceController {
this.createWorkspaceSvc.redirectToIDE(workspace);
});
}

isPluginDefined(): boolean {
if (this.workspaceConfig && this.workspaceConfig.attributes) {
return this.workspaceConfig.attributes.editor != null || this.workspaceConfig.attributes.plugins != null;
}

return false;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,6 @@
<project-source-selector></project-source-selector>
</che-label-container>

<!-- Plugin selector -->
<che-label-container che-label-name="Plugins"
che-label-description="Choose plugins for your workspace."
ng-if="createWorkspaceController.pluginRegistry && createWorkspaceController.displayPlugins" >
<workspace-plugins workspace-config="createWorkspaceController.workspaceConfig"
plugin-registry-location="createWorkspaceController.pluginRegistry">
</workspace-plugins>
</che-label-container>

<che-label-container>
<che-button-save-flat class="create-workspace-footer-button"
name="saveButton"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,4 @@ export class CreateWorkspaceSvc {
});
});
}

/**
* Returns the location of the plugin registry.
*
* @returns {string} the location of the plugin registry if exists
*/
getPluginRegistryLocation(): string {
return this.cheWorkspace.getWorkspaceSettings() != null ? this.cheWorkspace.getWorkspaceSettings().cheWorkspacePluginRegistryUrl : null;
}
}