Skip to content

Metrics views for CloudStack UI#1038

Merged
asfgit merged 8 commits into
apache:masterfrom
shapeblue:metrics-master
Nov 19, 2015
Merged

Metrics views for CloudStack UI#1038
asfgit merged 8 commits into
apache:masterfrom
shapeblue:metrics-master

Conversation

@yadvr

@yadvr yadvr commented Nov 5, 2015

Copy link
Copy Markdown
Member

@yadvr

yadvr commented Nov 5, 2015

Copy link
Copy Markdown
Member Author

@DaanHoogland

Copy link
Copy Markdown
Contributor

@bhaisaab the sprites seem not to have changed. Should the sprite.png be in this change?

@milamberspace

Copy link
Copy Markdown
Contributor

selection_172
@DaanHoogland see the capture

@yadvr

yadvr commented Nov 6, 2015

Copy link
Copy Markdown
Member Author

@DaanHoogland yes, the metrics view brings in new state icons that can be used in other places;
orange for alert, migrate etc. yellow for allocated, in transition etc. See metrics.js for state string to icon translations.

@DaanHoogland

Copy link
Copy Markdown
Contributor

thanks guys, missed that. Should I do anything more then just run with this change? an option some where? I am not seeing the metrix bottun in the zone view.

@yadvr

yadvr commented Nov 6, 2015

Copy link
Copy Markdown
Member Author

@DaanHoogland this is an admin only feature, just do a clean install and you should see this logged in as an admin

@DaanHoogland

Copy link
Copy Markdown
Contributor

@bhaisaab haven't got it working yet. I am trying as admin.

@yadvr

yadvr commented Nov 7, 2015

Copy link
Copy Markdown
Member Author

@DaanHoogland I build the branch today from scratch, it seems to be working for me; see the screenshot:

screenshot from 2015-11-07 12-58-34

@yadvr

yadvr commented Nov 7, 2015

Copy link
Copy Markdown
Member Author

@wido I've included instance count on the host view page now
@NuxRo the container width has been increased by 200px now, no more horizontal scrolls and more wider space in general for all UI, and logos has 'cloudmonkey' now - booyah!

screenshot from 2015-11-07 16-56-33

@NuxRo

NuxRo commented Nov 7, 2015

Copy link
Copy Markdown
Contributor

yeah baby!

@DaanHoogland

Copy link
Copy Markdown
Contributor

@bhaisaab trying anew and still don't get the metrics button. I destroyed the vm on which the test cloud is running, checked out the pr 1038 as bracnh compiled and started it. I started Safari (not my default browser), deleted all history and opened the page.
screen shot 2015-11-08 at 11 05 09

I investigated the page source to see if I can recognise code from the pr in there and 'label.metrics' can be found.

screen shot 2015-11-08 at 11 26 34

@DaanHoogland

Copy link
Copy Markdown
Contributor

The ui does not contain the metric button even hidden:
screen shot 2015-11-08 at 11 19 04

I am sure I need some extra tweeking or an extra commit not in the PR.

@yadvr

yadvr commented Nov 8, 2015

Copy link
Copy Markdown
Member Author

@DaanHoogland thanks for taking time to review this, on my system I'm still able to get the metrics button on Chrome/Firefox/Safari. Can you simply take the shapeblue:metrics-master repo/branch which is where the PR is created form, there is no hidden or missing commit. In the html source (of index.jsp being rendered) can you find metrics.js and metricsView.js included somewhere? Can you confirm if you're building and running mgmt server with mvn or testing using an rpm? It might be an environment issue, or browser caching issue or that your test branch is missing commits from the PR (something went wrong with applying the PR?)

See, I'm able to see the metrics button/views and note that UI is wider than before:
screen shot 2015-11-08 at 8 03 52 pm

screen shot 2015-11-08 at 8 05 27 pm

screen shot 2015-11-08 at 8 06 46 pm

Another place you can check is to go see if you see a viewMetrics codeblock in instances.js (or system.js, or storage.js) in scripts/, like this: (this code is like an API for rendering the metrics button, navigation, setting up view etc)

screen shot 2015-11-08 at 8 08 07 pm

Also, is anyone else able to reproduce the issue Daan is facing? cc @wido @wilderrodrigues @abhinandanprateek @NuxRo and others?

@yadvr yadvr force-pushed the metrics-master branch 2 times, most recently from 53084c4 to 403f60f Compare November 8, 2015 15:40
@DaanHoogland

Copy link
Copy Markdown
Contributor

@bhaisaab I saw you added four new commits, so I'll restart the test in a minute.
I am running in a bubble which does a jetty run from mvn. (mvn -pl :cloud-client-ui jetty:run)
view page source does show metrics.js and metricsView.js!
I have tried chrome and safari with cleared cache and firefox with private browser window. As the pge source from the browser shows the scripts and the labels, I don't think it is a caching issue.

@yadvr

yadvr commented Nov 8, 2015

Copy link
Copy Markdown
Member Author

@DaanHoogland thanks, the new commits are nothing but some squashed commits (found minor issues with sorting logic and another view/model issue). If this still does not work for you, share with me your OS/browser/java/maven versions. After you pull back, do a mvn clean install -pl client and then, mvn -pl client jetty:run.

@DaanHoogland

Copy link
Copy Markdown
Contributor

@bhaisaab I did a complete new checkout and I think the build process must have left something in the way. from a new working directory it works and looks good. I also ran the Schuberg Philis regression tests and your code passed with no errors. I will rerun those and publish here when you call for a merge.

@yadvr

yadvr commented Nov 9, 2015

Copy link
Copy Markdown
Member Author

@DaanHoogland thanks, we can merge this once master is unfrozen and 4.6 branch is cut.

@remibergsma

Copy link
Copy Markdown
Contributor

Nice logo @bhaisaab :-)
screen shot 2015-11-10 at 16 54 01

Deployed this to our employee cloud to give it a test drive.

@remibergsma

Copy link
Copy Markdown
Contributor

I've run this for some time and it is really cool, thanks @bhaisaab LGTM

If you consider back porting this to 4.5.3, then I think we should also include it in 4.6.1, shouldn't we? Ping @karuturi.

In that case, can you make a PR against the 4.6 branch so we can merge it there and then fwd-merge it to master (so it will be in 4.7 and onwards as well).

@DaanHoogland

Copy link
Copy Markdown
Contributor

@remibergsma this is a very cool feature. why do you suggest it be put in 4.6?

@remibergsma

Copy link
Copy Markdown
Contributor

@DaanHoogland Because @bhaisaab wants it in 4.5.3. Otherwise people will upgrade from 4.5.3 to say 4.6.2 and lose a feature.

@DaanHoogland

Copy link
Copy Markdown
Contributor

hm, this is breaking our policy hard. I have some things of Wei's laying around....

@NuxRo

NuxRo commented Nov 17, 2015

Copy link
Copy Markdown
Contributor

Right, so what now?
Can't we just postpone this till 6.7 and perhaps provide some easy patches in the meanwhile for whoever wants to use in 4.5 and 4.6?

Sent from the Delta quadrant using Borg technology!

Nux!
www.nux.ro

----- Original Message -----

From: "Daan Hoogland" notifications@github.com
To: "apache/cloudstack" cloudstack@noreply.github.com
Cc: "NuxRo" nux@li.nux.ro
Sent: Tuesday, 17 November, 2015 16:43:56
Subject: Re: [cloudstack] Metrics views for CloudStack UI (#1038)

hm, this is breaking our policy hard. I have some things of Wei's laying
around....


Reply to this email directly or view it on GitHub:
#1038 (comment)

@yadvr

yadvr commented Nov 19, 2015

Copy link
Copy Markdown
Member Author

Guys can we get some +1s on this, so let's at least merge on master? cc @wilderrodrigues @DaanHoogland @NuxRo @wido @abhinandanprateek and others

@DaanHoogland I'm interested in getting some of the commits related to UI width, sorting of tables etc. on 4.5 (we can remove the metrics view related commits). The reasoning here is that this does not change existing mgmt server core code, nor the schema. It's UI changes that improve existing experience for users.

@NuxRo

NuxRo commented Nov 19, 2015

Copy link
Copy Markdown
Contributor

+1 to merge on master

@wido

wido commented Nov 19, 2015

Copy link
Copy Markdown
Contributor

I would like to give a LGTM, but my JavaScript skills aren't that good.

The small Java changes look good to me.

@abhinandanprateek

Copy link
Copy Markdown
Contributor

+1 have tried the feature and used bits of it in revamped quota UI.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Adds a new method to cloudBrowser that can remove the last panel and link/ref
from the breadcrumb

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Implements sorting for tables across CloudStack UI;
- General alphabetic/string based sorting
- Numeric sorting for columns if data appears numeric
- Special sorting comparator for state columns
- Avoids sorting quick view columns and other specific columns

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Implements following in listView that generates tabular views;
- Collapsible columns in case of multi-header groupable columns
- Implements threshold coloring of cells in table
- Implements option to render a table that is scrollable in both x-y directions
- Support to only display status icon instead of label if compact is set to true
- Fixes quick-view alignment issue on Safari
- If a column was previously sorted, sorts after adding new rows
- If a supercolumn was collapsed, hides cell after adding new rows

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Implements various metrics views based on a listView based widget that has following
properties:
  - vertically and horizontally scrollable with pagination/infinite scrolling
  - sortable columns (client side)
  - groupable/collapsible columns
  - alternate row coloring
  - refresh button to refresh views
  - threshold table cell coloring
  - panel/breadcrumb navigation
  - quick view action column
  - translatable labels
  - sorts after metrics is refreshed, if a column was previously sorted
  - sorts after adding rows on infinite scrolling if a column was pre-sorted
- Metrics views: Zones, Clusters, Hosts, Instances, Storage pools, Volumes
- Resource filtering/navigation: Zones->Clusters->Hosts->Instances->Volumes,
                                 Storage Pool->Volumes

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Add global setting that can be consumed by UI to make its pagesize for list API
calls dynamic with default to 100.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Based on suggestion from Lucian (Nux), this patch increases the UI's container
width by 200px as most modern resolutions on desktop/laptops/workstations are
at least 1400px wide. By increasing the width and adjusting css properties
throughout the UI, we get more space to show information. This also gets
rid of horizontal scrollbar in case of metrics views. This also, fixes the UI
logos to include our mascot 'cloudmonkey'.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This was referenced Nov 19, 2015
@yadvr

yadvr commented Nov 19, 2015

Copy link
Copy Markdown
Member Author

@remibergsma rebased again the branch against latest master, created PRs;
4.6: #1090
4.5: #1091

@karuturi

Copy link
Copy Markdown
Member

Hi @bhaisaab
you should create PRs for (4.5 and 4.6) OR (master). Not for all the branches.
Based on the discussion and votes above I think the decision was to include in master only(4.7). So the PRs for other branches(4.5 and 4.6) are not necessary.

@yadvr

yadvr commented Nov 19, 2015

Copy link
Copy Markdown
Member Author

@karuturi Remi asked for a 4.6 based PR. Given some votes and if we don't have an objections should I go ahead and merge on master?

@remibergsma

Copy link
Copy Markdown
Contributor

@bhaisaab I'm OK with merging this to master now, but that will also mean it will not end up in 4.6. I think @DaanHoogland already said that no new features should go into 4.6 (as we agreed before) so merging to master is fine with me. I like your idea about porting back some of the patches to 4.5 and 4.6 to make the UI wider and such.

I asked for 4.6 version because I thought we wanted to back port all of the metrics thing to 4.5 and then I find it weird to not have it in 4.6. But let's stick to what we said, let's merge it to master and move on.

It is a great feature!

All agree to merge on master and back port only some of the UI tweaks?

@borisroman

Copy link
Copy Markdown
Contributor

@remibergsma Agree.

@yadvr

yadvr commented Nov 19, 2015

Copy link
Copy Markdown
Member Author

@remibergsma alright, merging on master now. If there is no objection, I would like to merge this on 4.5 as whole, if that's not acceptable at least the other useful commits minus the metrics features. Comments?

@asfgit asfgit merged commit aa60995 into apache:master Nov 19, 2015
asfgit pushed a commit that referenced this pull request Nov 19, 2015
Metrics views for CloudStack UIFS: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Metrics+Views+for+CloudStack+UI
JIRA: https://issues.apache.org/jira/browse/CLOUDSTACK-9020

* pr/1038:
  CLOUDSTACK-9020: Increase UI container width by 200px
  CLOUDSTACK-9020: add ipaddress in instances view
  CLOUDSTACK-9020: Make UI pagesize configurable
  CLOUDSTACK-9020: Metrics views for CloudStack UI
  CLOUDSTACK-9020: Implement collapsible columns and threshold colorings
  CLOUDSTACK-9020: Implement sorting for tables
  CLOUDSTACK-9020: Method to remove last panel from the breadcrumb
  CLOUDSTACK-9020: Add new status icons and css rules

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
@serverchief

Copy link
Copy Markdown
Contributor

+1, please merge

On 11/18/15 11:03 PM, Rohit Yadav wrote:

Guys can we get some +1s on this, so let's at least merge on master? cc
@wilderrodrigues https://github.com/wilderrodrigues @DaanHoogland
https://github.com/DaanHoogland @NuxRo https://github.com/NuxRo
@wido https://github.com/wido @abhinandanprateek
https://github.com/abhinandanprateek and others

@DaanHoogland https://github.com/DaanHoogland I'm interested in
getting some of the commits related to UI width, sorting of tables etc.
on 4.5 (we can remove the metrics view related commits). The reasoning
here is that this does not change existing mgmt server core code, nor
the schema. It's UI changes that improve existing experience for users.


Reply to this email directly or view it on GitHub
#1038 (comment).

@serverchief

Copy link
Copy Markdown
Contributor

The metrics UI is not really a major feature in my opinion. We are not changing the core and any apis.

All we are doing is re-presenting already presented data in UI in slightly different and much better manner.

I've tried it extensively in fairly large environments on back ported 4.5, i can attest it works as expected.

It would certainly help the project and new folks trying out ACS. I'm supporting the back port into 4.6 - as i'd consider this UI enhancement and not new major feature..

asfgit pushed a commit that referenced this pull request Nov 20, 2015
[4.5] Metrics viewFrom #1038, for 4.5 branch

* pr/1091:
  CLOUDSTACK-9020: Metrics UI fixes
  CLOUDSTACK-9020: Increase UI container width by 200px
  CLOUDSTACK-9020: add ipaddress in instances view
  CLOUDSTACK-9020: add instances count in host view, ip address in instances view
  CLOUDSTACK-9020: Metrics views for CloudStack UI

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.