Make the GUI aware of the new Subordinate info. #558
Conversation
After a recent change in juju-core, the subordinate info is available through the mega-watcher for services and units. This branch enables the GUI to fully support this where possible. Also fixed the code so that uses of "subordinate" vs "is_subordinate" are consistent.
QA:
It's not easy to exercize the new juju-core mega-watcher stream, but code includes tests for that, so I don't think QAing that is important right now. Thank you! |
Test PASSed. |
@@ -943,7 +944,8 @@ YUI.add('juju-env-sandbox', function(Y) { | |||
Ports: 'open_ports', | |||
Status: 'agent_state', | |||
StatusInfo: 'agent_state_info', | |||
StatusData: 'agent_state_data' | |||
StatusData: 'agent_state_data', | |||
Subordinate: 'subordinate' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This clearly predates your branch, but do you know why all the keys in this object are capitalized? Everywhere else we use camelCase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because this maps fields in the juju-core stream (capitalized) to internal JS model fields.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, thanks.
Code looks good, though I have a few questions. I am QAing now. |
Sandbox QA notes:
|
QA ec2 notes: On ec2, I observed exactly the same behavior as in sandbox. QA OK, with provisos of possible follow up work. Thanks @frankban! 👍 |
Thanks for the review and QA JC. Yeah the scale up in mv needs to be fixed, but was out of scope for this branch. |
Test PASSed. |
@@ -191,7 +191,11 @@ YUI.add('juju-delta-handlers', function(Y) { | |||
agent_state_data: change.StatusData, | |||
public_address: change.PublicAddress, | |||
private_address: change.PrivateAddress, | |||
open_ports: utils.convertOpenPorts(change.Ports) | |||
open_ports: utils.convertOpenPorts(change.Ports), | |||
// Since less recent versions of juju-core do not include the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add the version of Juju that this will become available?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
👍 with some comments. Thanks for jumping on this fix so fast! |
Test PASSed. |
Thanks for the reviews! |
Retrying, failure seems spurious. |
Status: merge request accepted. Url: http://ci.jujugui.org:8080/job/juju-gui-merge |
Make the GUI aware of the new Subordinate info. After a recent change in juju-core, the subordinate info is available through the mega-watcher for services and units. This branch enables the GUI to fully support this where possible. Also fixed the code so that uses of "subordinate" vs "is_subordinate" are consistent.
After a recent change in juju-core, the subordinate
info is available through the mega-watcher for
services and units. This branch enables the GUI to
fully support this where possible.
Also fixed the code so that uses of "subordinate" vs
"is_subordinate" are consistent.