You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/07/22 08:45:45 UTC

[GitHub] [cloudstack] weizhouapache opened a new pull request #5233: ui bug fix: scalevm is disabled when vm is Stopped

weizhouapache opened a new pull request #5233:
URL: https://github.com/apache/cloudstack/pull/5233


   ### Description
   
   This PR fixes the issue on ui that scalevm button is disabled when vm is stopped.
   
   <!--- Describe your changes in DETAIL - And how has behaviour functionally changed. -->
   
   <!-- For new features, provide link to FS, dev ML discussion etc. -->
   <!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
   
   <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
   <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
   <!-- Fixes: # -->
   
   <!--- ********************************************************************************* -->
   <!--- NOTE: AUTOMATATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
   <!--- PLEASE PUT AN 'X' in only **ONE** box -->
   <!--- ********************************************************************************* -->
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [X] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [ ] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [X] Major
   - [ ] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   prior this fix
   
   ![image](https://user-images.githubusercontent.com/57355700/126612092-0b367d1d-1a91-4ca3-a5aa-94a38b242dd2.png)
   
   
   with this fix
   
   ![image](https://user-images.githubusercontent.com/57355700/126612288-9f04e3ef-d839-41b3-84c8-579ce43f0e0c.png)
   
   
   ### How Has This Been Tested?
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to -->
   <!-- see how your change affects other areas of the code, etc. -->
   
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] shwstppr commented on pull request #5233: ui bug fix: scalevm is disabled when vm is Stopped

Posted by GitBox <gi...@apache.org>.
shwstppr commented on pull request #5233:
URL: https://github.com/apache/cloudstack/pull/5233#issuecomment-884845707


   @blueorangutan ui


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #5233: ui bug fix: scalevm is disabled when vm is Stopped

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5233:
URL: https://github.com/apache/cloudstack/pull/5233#issuecomment-884807620


   @shwstppr a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez merged pull request #5233: ui bug fix: scalevm is disabled when vm is Stopped

Posted by GitBox <gi...@apache.org>.
nvazquez merged pull request #5233:
URL: https://github.com/apache/cloudstack/pull/5233


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan removed a comment on pull request #5233: ui bug fix: scalevm is disabled when vm is Stopped

Posted by GitBox <gi...@apache.org>.
blueorangutan removed a comment on pull request #5233:
URL: https://github.com/apache/cloudstack/pull/5233#issuecomment-884810085






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] shwstppr commented on a change in pull request #5233: ui bug fix: scalevm is disabled when vm is Stopped

Posted by GitBox <gi...@apache.org>.
shwstppr commented on a change in pull request #5233:
URL: https://github.com/apache/cloudstack/pull/5233#discussion_r674672211



##########
File path: ui/src/config/section/compute.js
##########
@@ -299,7 +299,7 @@ export default {
           docHelp: 'adminguide/virtual_machines.html#how-to-dynamically-scale-cpu-and-ram',
           dataView: true,
           show: (record) => { return ['Stopped'].includes(record.state) || (['Running'].includes(record.state) && record.hypervisor !== 'KVM' && record.hypervisor !== 'LXC') },
-          disabled: (record) => { return !record.isdynamicallyscalable },
+          disabled: (record) => { return !record.isdynamicallyscalable && record.state !== 'Stopped' },

Review comment:
       Anyway, I'm fine with original change as well




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] shwstppr commented on pull request #5233: ui bug fix: scalevm is disabled when vm is Stopped

Posted by GitBox <gi...@apache.org>.
shwstppr commented on pull request #5233:
URL: https://github.com/apache/cloudstack/pull/5233#issuecomment-884807331


   @blueorangutan ui


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] shwstppr removed a comment on pull request #5233: ui bug fix: scalevm is disabled when vm is Stopped

Posted by GitBox <gi...@apache.org>.
shwstppr removed a comment on pull request #5233:
URL: https://github.com/apache/cloudstack/pull/5233#issuecomment-884807331


   @blueorangutan ui


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] shwstppr commented on a change in pull request #5233: ui bug fix: scalevm is disabled when vm is Stopped

Posted by GitBox <gi...@apache.org>.
shwstppr commented on a change in pull request #5233:
URL: https://github.com/apache/cloudstack/pull/5233#discussion_r674660272



##########
File path: ui/src/config/section/compute.js
##########
@@ -299,7 +299,7 @@ export default {
           docHelp: 'adminguide/virtual_machines.html#how-to-dynamically-scale-cpu-and-ram',
           dataView: true,
           show: (record) => { return ['Stopped'].includes(record.state) || (['Running'].includes(record.state) && record.hypervisor !== 'KVM' && record.hypervisor !== 'LXC') },
-          disabled: (record) => { return !record.isdynamicallyscalable },
+          disabled: (record) => { return !record.isdynamicallyscalable && record.state !== 'Stopped' },

Review comment:
       Why not `disabled: (record) => { return record.state === 'Running' && !record.isdynamicallyscalable }`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] shwstppr commented on a change in pull request #5233: ui bug fix: scalevm is disabled when vm is Stopped

Posted by GitBox <gi...@apache.org>.
shwstppr commented on a change in pull request #5233:
URL: https://github.com/apache/cloudstack/pull/5233#discussion_r674660272



##########
File path: ui/src/config/section/compute.js
##########
@@ -299,7 +299,7 @@ export default {
           docHelp: 'adminguide/virtual_machines.html#how-to-dynamically-scale-cpu-and-ram',
           dataView: true,
           show: (record) => { return ['Stopped'].includes(record.state) || (['Running'].includes(record.state) && record.hypervisor !== 'KVM' && record.hypervisor !== 'LXC') },
-          disabled: (record) => { return !record.isdynamicallyscalable },
+          disabled: (record) => { return !record.isdynamicallyscalable && record.state !== 'Stopped' },

Review comment:
       Maybe
   `disabled: (record) => { return record.state === 'Running' && !record.isdynamicallyscalable }`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #5233: ui bug fix: scalevm is disabled when vm is Stopped

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5233:
URL: https://github.com/apache/cloudstack/pull/5233#issuecomment-884846042


   @shwstppr a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] shwstppr commented on a change in pull request #5233: ui bug fix: scalevm is disabled when vm is Stopped

Posted by GitBox <gi...@apache.org>.
shwstppr commented on a change in pull request #5233:
URL: https://github.com/apache/cloudstack/pull/5233#discussion_r674671873



##########
File path: ui/src/config/section/compute.js
##########
@@ -299,7 +299,7 @@ export default {
           docHelp: 'adminguide/virtual_machines.html#how-to-dynamically-scale-cpu-and-ram',
           dataView: true,
           show: (record) => { return ['Stopped'].includes(record.state) || (['Running'].includes(record.state) && record.hypervisor !== 'KVM' && record.hypervisor !== 'LXC') },
-          disabled: (record) => { return !record.isdynamicallyscalable },
+          disabled: (record) => { return !record.isdynamicallyscalable && record.state !== 'Stopped' },

Review comment:
       @ravening In this case yes. My point was to check VM's state first and isdynamicallyscalable later as that is relevant only for running VMs.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] weizhouapache commented on pull request #5233: ui bug fix: scalevm is disabled when vm is Stopped

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on pull request #5233:
URL: https://github.com/apache/cloudstack/pull/5233#issuecomment-884893717


   > LGTM
   > 
   > Before changes (Scale VM disabled for a stopped VM):
   > ![Screenshot from 2021-07-22 17-15-36](https://user-images.githubusercontent.com/153340/126634312-263f5dc0-e18f-42f3-a1fd-8e8a5a46307d.png)
   > 
   > After changes (Scale VM enabled for a stopped VM):
   > ![Screenshot from 2021-07-22 17-16-11](https://user-images.githubusercontent.com/153340/126634335-51a1749d-188d-4f95-bcdd-8f7ff0b7d9d1.png)
   
   good, thanks for testing @shwstppr 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #5233: ui bug fix: scalevm is disabled when vm is Stopped

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5233:
URL: https://github.com/apache/cloudstack/pull/5233#issuecomment-884810085


   UI build: :heavy_check_mark:
   Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/5233 (SL-JID-408)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #5233: ui bug fix: scalevm is disabled when vm is Stopped

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5233:
URL: https://github.com/apache/cloudstack/pull/5233#issuecomment-884848129


   UI build: :heavy_check_mark:
   Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/5233 (SL-JID-409)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] weizhouapache commented on a change in pull request #5233: ui bug fix: scalevm is disabled when vm is Stopped

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on a change in pull request #5233:
URL: https://github.com/apache/cloudstack/pull/5233#discussion_r674715615



##########
File path: ui/src/config/section/compute.js
##########
@@ -299,7 +299,7 @@ export default {
           docHelp: 'adminguide/virtual_machines.html#how-to-dynamically-scale-cpu-and-ram',
           dataView: true,
           show: (record) => { return ['Stopped'].includes(record.state) || (['Running'].includes(record.state) && record.hypervisor !== 'KVM' && record.hypervisor !== 'LXC') },
-          disabled: (record) => { return !record.isdynamicallyscalable },
+          disabled: (record) => { return !record.isdynamicallyscalable && record.state !== 'Stopped' },

Review comment:
       updated. thanks @shwstppr @ravening 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] ravening commented on a change in pull request #5233: ui bug fix: scalevm is disabled when vm is Stopped

Posted by GitBox <gi...@apache.org>.
ravening commented on a change in pull request #5233:
URL: https://github.com/apache/cloudstack/pull/5233#discussion_r674665625



##########
File path: ui/src/config/section/compute.js
##########
@@ -299,7 +299,7 @@ export default {
           docHelp: 'adminguide/virtual_machines.html#how-to-dynamically-scale-cpu-and-ram',
           dataView: true,
           show: (record) => { return ['Stopped'].includes(record.state) || (['Running'].includes(record.state) && record.hypervisor !== 'KVM' && record.hypervisor !== 'LXC') },
-          disabled: (record) => { return !record.isdynamicallyscalable },
+          disabled: (record) => { return !record.isdynamicallyscalable && record.state !== 'Stopped' },

Review comment:
       > Maybe
   > `disabled: (record) => { return record.state === 'Running' && !record.isdynamicallyscalable }`
   
   but isnt `record.state !== 'Stopped'` and `record.state === 'Running' ` are same?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org