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

CHE-3883: fix creating a custom stack #4224

Merged
merged 8 commits into from
Mar 1, 2017
Merged

CHE-3883: fix creating a custom stack #4224

merged 8 commits into from
Mar 1, 2017

Conversation

akurinnoy
Copy link
Contributor

@akurinnoy akurinnoy commented Feb 24, 2017

What does this PR do?

This PR fixes some problems faced by user when they creating a custom stack.

  • fixed bug which allowed to apply to machine a nonunique name
  • added ability to edit machine's source
  • added ability to delete the machine with ws-agent activated
  • added label to mark the dev machine in runtime

Label for dev machine:
dev-machine-label

Popups on removal the dev machine:

  1. User can select another machine for ws-agent to activate
    remove-dev-machine-1
  2. The only machine in stack
    remove-dev-machine-2

Machine details without background and more compact
machine-details-space

What issues does this PR fix or reference?

#3819
#3883
codenvy/codenvy#1578

Changelog

[UD] fixed bugs when modifying machine definitions for custom stacks.
[UD] machine details uses available space more efficiently

Release Notes

n/a

Docs PR

@codenvy-ci
Copy link

@slemeur slemeur added this to the 5.4.0 milestone Feb 27, 2017
@slemeur slemeur added the kind/bug Outline of a bug - must adhere to the bug report template. label Feb 27, 2017
@codenvy-ci
Copy link

Build # 2058 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/2058/ to view the results.

@bmicklea bmicklea self-requested a review February 28, 2017 15:27
@slemeur slemeur self-requested a review February 28, 2017 15:31
@slemeur
Copy link
Contributor

slemeur commented Feb 28, 2017

@akurinnoy could you please prepare missing pieces to complete the review?

Oleksii Kurinnyi added 5 commits February 28, 2017 18:07
- allow user to rename any machine
- fix checking for machine name uniqueness

Signed-off-by: Oleksii Kurinnyi <okurinnyi@codenvy.com>
Signed-off-by: Oleksii Kurinnyi <okurinnyi@codenvy.com>
Signed-off-by: Oleksii Kurinnyi <okurinnyi@codenvy.com>
Signed-off-by: Oleksii Kurinnyi <okurinnyi@codenvy.com>
- add ability to delete the dev machine
- add label to mark the dev machine
- fix karma tests
- add protractro tests

Signed-off-by: Oleksii Kurinnyi <okurinnyi@codenvy.com>
Signed-off-by: Oleksii Kurinnyi <okurinnyi@codenvy.com>
@akurinnoy
Copy link
Contributor Author

@slemeur done
@ashumilova @benoitf @olexii4 please review

@akurinnoy akurinnoy changed the title [WIP] CHE-3883: fix creating a custom stack CHE-3883: fix creating a custom stack Feb 28, 2017
@codenvy-ci
Copy link

/**
* This class is handling the controller for deleting machines dialog.
*
* @author Ann Shumilova
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

author :)

*/
private isProcessing: boolean = false;
/**
* Machine name which will be configured ad dev-machine
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ad dev-machine - as dev-machine


/**
* Default constructor that is using resource
* @ngInject for Dependency injection
*/
constructor($mdDialog) {
constructor(private $mdDialog: ng.material.IDialogService) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why private here is needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a way to create and initialize a member in one place
see Parameter properties in Classes

let nameRE = new RegExp('^' + name + '$', 'i');
return this.machinesNames.some((_name: string) => {
return nameRE.test(_name);
}) === false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it done because we show names in upercase - we can use old one check and use convert the string to uppercase or lowercase letters in bought cases(when we use machineNames and when we check input name name). But use machineNamesUppercase and nameUppercase. As for me it would be more clear.

WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, will update the PR

Signed-off-by: Oleksii Kurinnyi <okurinnyi@codenvy.com>
Copy link
Contributor

@benoitf benoitf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copyright headers are missing on .js files

Signed-off-by: Oleksii Kurinnyi <okurinnyi@codenvy.com>
@akurinnoy akurinnoy merged commit 4325d38 into master Mar 1, 2017
@codenvy-ci
Copy link

@akurinnoy akurinnoy deleted the CHE-3883 branch March 3, 2017 08:49
@JamesDrummond JamesDrummond mentioned this pull request Mar 8, 2017
9 tasks
@JamesDrummond
Copy link
Contributor

@bmicklea Should have this in release notes? Could be a big deal for some. I am just about to start on docs for it.

@bmicklea
Copy link

yes, @JamesDrummond add release notes please

@slemeur
Copy link
Contributor

slemeur commented Mar 27, 2017

All of these are bug fixes in the workspace's edition screen.

Rule 1: It is not possible to remove workspace's machine when there is only one machine configured in the workspace.
Action: Instead of showing a meaningless error notification, we now display a warning message to the user when he wants to proceed this action.

Rule 2: There must be only one of the workspace's machine with the "ws-agent" active.
Action1: We had a small "dev" tag next to the name of the workspace's machine with the "ws-agent" in order to avoid the user having to unfold all of the workspace's machine to identify which one is having the "ws-agent" activated and used as dev-machine.
Action2: Instead of blocking the user to delete the machine with the "ws-agent", we now ask the user to select which of the other machines must get the "ws-agent" activated.

@JamesDrummond + @bmicklea : I'll handle the release note on that.

JPinkney pushed a commit to JPinkney/che that referenced this pull request Aug 17, 2017
* CHE-3883: fix creating a custom stack

- allow user to rename any machine
- fix checking for machine name uniqueness

Signed-off-by: Oleksii Kurinnyi <okurinnyi@codenvy.com>

* remove obsolete protractor tests

Signed-off-by: Oleksii Kurinnyi <okurinnyi@codenvy.com>

* add protractor tests for stacks

Signed-off-by: Oleksii Kurinnyi <okurinnyi@codenvy.com>

* code clean-up

Signed-off-by: Oleksii Kurinnyi <okurinnyi@codenvy.com>

* CHE-3883: add ability to delete the dev machine

- add ability to delete the dev machine
- add label to mark the dev machine
- fix karma tests
- add protractro tests

Signed-off-by: Oleksii Kurinnyi <okurinnyi@codenvy.com>

* CHE-3819: decrease label container width

Signed-off-by: Oleksii Kurinnyi <okurinnyi@codenvy.com>

* fixes

Signed-off-by: Oleksii Kurinnyi <okurinnyi@codenvy.com>

* add missing copyright headers

Signed-off-by: Oleksii Kurinnyi <okurinnyi@codenvy.com>
skabashnyuk pushed a commit that referenced this pull request Jan 3, 2020
* CHE-3883: fix creating a custom stack

- allow user to rename any machine
- fix checking for machine name uniqueness

Signed-off-by: Oleksii Kurinnyi <okurinnyi@codenvy.com>

* remove obsolete protractor tests

Signed-off-by: Oleksii Kurinnyi <okurinnyi@codenvy.com>

* add protractor tests for stacks

Signed-off-by: Oleksii Kurinnyi <okurinnyi@codenvy.com>

* code clean-up

Signed-off-by: Oleksii Kurinnyi <okurinnyi@codenvy.com>

* CHE-3883: add ability to delete the dev machine

- add ability to delete the dev machine
- add label to mark the dev machine
- fix karma tests
- add protractro tests

Signed-off-by: Oleksii Kurinnyi <okurinnyi@codenvy.com>

* CHE-3819: decrease label container width

Signed-off-by: Oleksii Kurinnyi <okurinnyi@codenvy.com>

* fixes

Signed-off-by: Oleksii Kurinnyi <okurinnyi@codenvy.com>

* add missing copyright headers

Signed-off-by: Oleksii Kurinnyi <okurinnyi@codenvy.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Outline of a bug - must adhere to the bug report template.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants