You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sirona.apache.org by ol...@apache.org on 2014/08/06 14:27:44 UTC
svn commit: r1616205 - in
/incubator/sirona/trunk/server/reporting/reporting-ui/src/main/webapp:
index.html js/app/controllers/controllers.js partials/jvm.html
Author: olamy
Date: Wed Aug 6 12:27:44 2014
New Revision: 1616205
URL: http://svn.apache.org/r1616205
Log:
cleanup display
Modified:
incubator/sirona/trunk/server/reporting/reporting-ui/src/main/webapp/index.html
incubator/sirona/trunk/server/reporting/reporting-ui/src/main/webapp/js/app/controllers/controllers.js
incubator/sirona/trunk/server/reporting/reporting-ui/src/main/webapp/partials/jvm.html
Modified: incubator/sirona/trunk/server/reporting/reporting-ui/src/main/webapp/index.html
URL: http://svn.apache.org/viewvc/incubator/sirona/trunk/server/reporting/reporting-ui/src/main/webapp/index.html?rev=1616205&r1=1616204&r2=1616205&view=diff
==============================================================================
--- incubator/sirona/trunk/server/reporting/reporting-ui/src/main/webapp/index.html (original)
+++ incubator/sirona/trunk/server/reporting/reporting-ui/src/main/webapp/index.html Wed Aug 6 12:27:44 2014
@@ -73,7 +73,7 @@
</nav>
- <div id="page-wrapper" ng-view>
+ <div id="page-wrapper" class="container-fluid" ng-view>
Foo
</div>
Modified: incubator/sirona/trunk/server/reporting/reporting-ui/src/main/webapp/js/app/controllers/controllers.js
URL: http://svn.apache.org/viewvc/incubator/sirona/trunk/server/reporting/reporting-ui/src/main/webapp/js/app/controllers/controllers.js?rev=1616205&r1=1616204&r2=1616205&view=diff
==============================================================================
--- incubator/sirona/trunk/server/reporting/reporting-ui/src/main/webapp/js/app/controllers/controllers.js (original)
+++ incubator/sirona/trunk/server/reporting/reporting-ui/src/main/webapp/js/app/controllers/controllers.js Wed Aug 6 12:27:44 2014
@@ -38,15 +38,19 @@ define(['angular','services','morris'],
var now = new Date();
- //var cpuResults = jvmCpu.query({start:yesterday.getTime(),end:now.getTime()});
-
jvmCpu.query({start:yesterday.getTime(),end:now.getTime()} ).$promise.then(function(cpuResults){
+ var morrisDatas=toMorrisFormat(cpuResults.data);
Morris.Line({
element: 'cpu',
- data: toMorrisFormat(cpuResults.data),
+ data: morrisDatas,
xkey: 'x',
- ykeys: ['a'],
- labels: [cpuResults.label]
+ ykeys: 'y',
+ labels: [cpuResults.label],
+ xLabelFormat:function(ret){
+ return new Date(morrisDatas[ret.x].x).toString();
+ },
+ parseTime: false,
+ hideHover: 'auto'
});
});
@@ -77,11 +81,12 @@ define(['angular','services','morris'],
}
var values = [];
angular.forEach(reportResult, function(key,value) {
- this.push({x:value,a: key});
+ this.push({x:value,y: key});
}, values);
- console.log("size:"+values.length+':'+values[0].x);
- console.log("size:"+values.length+':'+values[1].x);
+ console.log("size:"+values.length+':'+values[0].x+","+values[0].y);
+ console.log("size:"+values.length+':'+values[1].x+","+values[1].y);
+ console.log("size:"+values.length+':'+values[10].x+","+values[10].y);
return values;
}
Modified: incubator/sirona/trunk/server/reporting/reporting-ui/src/main/webapp/partials/jvm.html
URL: http://svn.apache.org/viewvc/incubator/sirona/trunk/server/reporting/reporting-ui/src/main/webapp/partials/jvm.html?rev=1616205&r1=1616204&r2=1616205&view=diff
==============================================================================
--- incubator/sirona/trunk/server/reporting/reporting-ui/src/main/webapp/partials/jvm.html (original)
+++ incubator/sirona/trunk/server/reporting/reporting-ui/src/main/webapp/partials/jvm.html Wed Aug 6 12:27:44 2014
@@ -14,4 +14,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<div id="cpu"></div>
\ No newline at end of file
+<div class="row">
+ <div class="col-lg-3">
+ <div id="cpu"></div>
+ </div>
+</div>
\ No newline at end of file