Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Tweak how machine view renders hidden/faded/highlighted services. #625

Merged
merged 1 commit into from Oct 23, 2014

Conversation

kadams54
Copy link
Contributor

The specs for how hide/highlight should work in machine view:

Show/hide

  • Machine view is a literal translation of hardware so we can't be so clear cut.
  • Hiding a service just de-prioritises the service.
  • The hidden service is not populated in the machine column.
  • The hidden services is de-prioritised in the container column. They sit at the bottom of their respective containers and stack up horizontally, the name of the service is not shown but can be found out via a tooltip which should appear from hovering over the charm icon.
  • The machine and containers never get hidden with show/hide.

Highlight/unhighlight

  • Highlighting a service changes the machine column to only show machines which include the highlighted service. This allows users to use it as a filtering tool.

@kadams54
Copy link
Contributor Author

QA

With the as flag:

  1. Deploy a medium-to-large bundle.
  2. Switch to the added services sidebar.
  3. Verify that the show/highlight toggles work as described above, for machine view.

@jujugui
Copy link
Contributor

jujugui commented Oct 21, 2014

Test FAILed.
Refer to this link for build results: http://ci.jujugui.org:8080/job/juju-gui/2111/

@frankban
Copy link
Member

Some QA issues:
With make devel I deployed the mongodb:cluster bundle.
This bundle includes a central service (mongos) connected to four other
services.

Service hide:
From the service view, hiding the leafs works, but hiding mongos just hides
its relations, while the service block is still shown.
Hiding multiple services at the same time generates weird results, but perhaps
this is due to the crossover interactions not being implemented.

Service relations:
As above, everything seems to work well except for when multiple relations
are highlighted, in which case it seems only the last one is taken into
consideration. When deactivating the highlight also the behavior does not
seem to be what expected.

Machine hide:
Hiding services works very well in the machine view's top level machines
column. Hiding all the services correctly hides all the units in the columns.
The container columns is more troublesome: the units are not hidden (and this
appears to be by spec) but also the unit name is still displayed and it
seems a newline is added between the unit icon and the unit name.

Machine relations:
This seems to work very well.

@return {Array} A list of the service names of unrelated services.
*/
findUnrelatedServices: function(db) {
var relationData = utils.getRelationDataForService(db, this),
Copy link
Member

Choose a reason for hiding this comment

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

Since this is a calculated value, please define it in its own var.

@frankban
Copy link
Member

Code looks good with some changes.
Thanks Kyle!

@jujugui
Copy link
Contributor

jujugui commented Oct 22, 2014

Test FAILed.
Refer to this link for build results: http://ci.jujugui.org:8080/job/juju-gui/2114/

@kadams54 kadams54 changed the title WIP: Hide/highlight tweaks Tweak how machine view renders hidden/faded/highlighted services. Oct 22, 2014
@kadams54 kadams54 force-pushed the hide-highlight-tweaks branch 2 times, most recently from a8c4c89 to a6d2fb1 Compare October 22, 2014 21:20
@jujugui
Copy link
Contributor

jujugui commented Oct 22, 2014

Test PASSed.
Refer to this link for build results: http://ci.jujugui.org:8080/job/juju-gui/2116/

@@ -303,6 +303,31 @@ YUI.add('juju-models', function(Y) {
},

/**
Returns a list of the deployed services that are not related
Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't this also return services which are on the canvas but not deployed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, though I consider those deployed as well, just not committed. I'll clarify.

@jujugui
Copy link
Contributor

jujugui commented Oct 22, 2014

Test PASSed.
Refer to this link for build results: http://ci.jujugui.org:8080/job/juju-gui/2117/

@jujugui
Copy link
Contributor

jujugui commented Oct 23, 2014

Test PASSed.
Refer to this link for build results: http://ci.jujugui.org:8080/job/juju-gui/2118/

{id: 'haproxy', name: 'haproxy'}
]);
var relations = [
{far: {service: 'wordpress'}}
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm curious about this method and it's support of peer relations. Have you tested/experimented with that? Maybe there should also be a peer relation here to make sure it works as intended.

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've verified that peer and subordinate relations use the same data structure, so this test should be sufficient.

@jujugui
Copy link
Contributor

jujugui commented Oct 23, 2014

Test PASSed.
Refer to this link for build results: http://ci.jujugui.org:8080/job/juju-gui/2122/

@hatched
Copy link
Contributor

hatched commented Oct 23, 2014

👍 Thanks for checking on that relationship syntax

@kadams54
Copy link
Contributor Author

Woo hoo! :shipit:

@jujugui
Copy link
Contributor

jujugui commented Oct 23, 2014

Status: merge request accepted. Url: http://ci.jujugui.org:8080/job/juju-gui-merge

jujugui added a commit that referenced this pull request Oct 23, 2014
Tweak how machine view renders hidden/faded/highlighted services.

The specs for how hide/highlight should work in machine view:

## Show/hide

* Machine view is a literal translation of hardware so we can't be so clear cut.
* Hiding a service just de-prioritises the service.
* The hidden service is not populated in the machine column.
* The hidden services is de-prioritised in the container column. They sit at the bottom of their respective containers and stack up horizontally, the name of the service is not shown but can be found out via a tooltip which should appear from hovering over the charm icon.
* The machine and containers never get hidden with show/hide.

## Highlight/unhighlight

* Highlighting a service changes the machine column to only show machines which include the highlighted service. This allows users to use it as a filtering tool.
@jujugui jujugui merged commit 8a96bae into juju:develop Oct 23, 2014
@kadams54 kadams54 deleted the hide-highlight-tweaks branch October 24, 2014 13:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants