Skip to content

Commit

Permalink
Merge pull request #64 from jpwhite4/ui
Browse files Browse the repository at this point in the history
Minor UI changes to Center Report Portlet
  • Loading branch information
jpwhite4 authored Jul 26, 2019
2 parents d1f7dfc + 5670dec commit 4b11aef
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"configuration/assets.d": "assets.d",
"configuration/modules.d/appkernels.json": "modules.d/appkernels.json",
"configuration/linker.d/appkernels.json": "linker.d/appkernels.json",
"configuration/roles.d/appkernels-center_report_card.json": "roles.d/appkernels-center_report_card.json"
"configuration/roles.d": ""
},
"etc/crond": {
"configuration/cron.conf": "xdmod-appkernels"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
{
"name": "Center Report Card",
"type": "CenterReportCardPortlet",
"region": "left",
"location": {
"row": 0,
"column": 1
},
"config": {
"timeframe": "Year to date"
}
Expand All @@ -17,9 +20,12 @@
{
"name": "Center Report Card",
"type": "CenterReportCardPortlet",
"region": "left",
"location": {
"row": 0,
"column": 1
},
"config": {
"timeframe": "Month to date"
"timeframe": "30 day"
}
}
]
Expand Down
6 changes: 3 additions & 3 deletions html/gui/js/modules/summary/CenterReportCardPortlet.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ XDMoD.Modules.SummaryPortlets.CenterReportCardPortlet = Ext.extend(Ext.ux.Portle
initComponent: function () {
var self = this;

var aspectRatio = 0.8;
var aspectRatio = 11.0 / 17.0;
this.height = this.width * aspectRatio;

var dateRanges = CCR.xdmod.ui.DurationToolbar.getDateRanges();
Expand Down Expand Up @@ -189,7 +189,7 @@ XDMoD.Modules.SummaryPortlets.CenterReportCardPortlet = Ext.extend(Ext.ux.Portle
].join(' ');
};

var height = 20;
var height = 17;

// Make sure that we have at least some runs
if (total > 0) {
Expand Down Expand Up @@ -234,7 +234,7 @@ XDMoD.Modules.SummaryPortlets.CenterReportCardPortlet = Ext.extend(Ext.ux.Portle
if (input.hasOwnProperty(id)) {
var runs = input[id].runs;
var percentage = total > 0 ? Math.round(((runs / total) * 100)) : 0;
var msg = percentage + '% - ( ' + (runs / total) + ' )';
var msg = percentage + '% - (' + runs + ' out of ' + total + ')';

contents.push(
rect(id, input[id].title, msg, percentage, sum, height, input[id].red, input[id].green, input[id].blue)
Expand Down

0 comments on commit 4b11aef

Please sign in to comment.