UI/Layout bug fix

community
Steve L. Nyemba 8 years ago
parent 1629100116
commit 7cf4dfeee5

@ -1,4 +1,4 @@
var MONTHS = { 1: 'Jan', 2: 'Feb', 3: 'Mar', 4: 'Apr', 5: 'May', 6: 'Jun', 7: 'Jul', 8: 'Aug', 9: 'Sep', 10: 'Oct', 11: 'Nov', 12: 'Dec' }
var monitor = {}
monitor.processes = {}
monitor.processes.fetch = function(){
@ -216,8 +216,8 @@ monitor.processes.summary.init = function(logs){
jx.utils.patterns.visitor(rows,function(item){
if (date == null) {
date = new Date(item.year,item.month,item.day)
//date = [item.day,item.month,item.year]
// date = new Date(item.year,item.month-1,item.day,item.hour,item.minute)
date = ([item.day+'-'+MONTHS[item.month]+'-'+item.year,item.hour+':'+item.minute]).join(' ')
}
if (item.status == 'running'){
xr += 1
@ -231,16 +231,20 @@ monitor.processes.summary.init = function(logs){
}
var data = {labels:['Running','Crash','Idle'],datasets:[{data:[xr,xc,xi],backgroundColor:[RUNNING_COLOR,CRASH_COLOR,IDLE_COLOR/**COLORS[11],COLORS[2],COLORS[100]*/]}]}
var context = jx.dom.get.instance('CANVAS')
// jx.dom.set.value('total-running', xr)
// jx.dom.set.value('total-crash', xc)
// jx.dom.set.value('total-idle', xi)
jx.dom.set.value('total-apps', xr + xi + xc)
context.id = 'doughnut'
jx.dom.set.value('total-running', xr)
jx.dom.set.value('total-crash', xc)
jx.dom.set.value('total-idle', xi)
// jx.dom.set.value('total-apps', xr + xi + xc)
jx.dom.set.value('app-summary-date', date)
jx.dom.set.value('summary_chart','')
jx.dom.append('summary_chart', context)
var conf = {}//width:'auto',height:$('#process_summary').height}
$("#doughnut").attr('width', 50)
$("#doughnut").attr('height', 50)
var conf = {}//width:100,height:100}//width:'auto',height:$('#process_summary').height}
conf.type = 'doughnut'
conf.responsive = true

@ -54,17 +54,23 @@
<div id="process_summary" class="simple-gradient shadow grid border-right" style="margin:4px">
<div style="margin:4px; padding:2px; margin-bottom:4px; height:28px">
<div class="bold" style="color:#4682B4">Application Summary By Status</div>
<div id="app-summary-date" class="small"></div>
<div class="small">Latest Lookup <span id="app-summary-date"></span></div>
</div>
<div class="" style="padding:2px; height:200px; margin:4px; margin-top:10px">
<div class="left small width-quarter" style="margin-top:10px">
<div class=" " style="height:100%">
<div class="small left" style="margin-left:2%; margin-top:1%">
<div class="bold">Total Applications that have:</div>
<br>
<div style="margin:0px; margin-left:20px; padding:4px; height:12px"><div class="left width-half"><i class="fa fa-check"></i> Running</div> <span id="total-running" class="right"></span></div>
<div style="margin:0px; margin-left:20px; padding:4px; height:12px"><div class="left width-half"><i class="fa fa-times"></i> Crash</div> <span id="total-crash" class="right"></span></div>
<div style="margin:0px; margin-left:20px; padding:4px; height:12px"><div class="left width-half"><i class="fa fa-ellipsis-h"></i> Idle</div> <span id="total-idle" class="right"></span></div>
</div>
<div class="right width-75" style="height:93%">
<div id="summary_chart"></div>
<div id="summary_chart" class="right width-half"></div>
</div>
<div class="border-top left small" style=""><span id="total-apps" class="default">0</span><span class="">Applications Monitored</span></div>
</div>
<div id="summary_details" class="right"></div>
</div>

Loading…
Cancel
Save