Revision 67

View differences:

hci/trunk/eneraptor-web-app/web-app/css/style.css
360 360
	margin:5px;
361 361
	font-family:monospace;	
362 362
}
363

  
364
#legendHolder .legendColorBox {
365
	width: 18px;
366
}
367

  
368
#legendHolder .legendLabel {
369
	font-size:12px !important;
370
}
371

  
363 372
/*********************
364 373
	Icons
365 374
*********************/
......
367 376
	padding-left:19px;
368 377
	text-decoration:none;
369 378
	height:20px;
370
	font-size:12x;
379
	font-size:12px;
371 380
	margin:0 3px;
372 381
	display:inline-block;
373 382
	line-height:20px;
hci/trunk/eneraptor-web-app/grails-app/controllers/com/eneraptor/hci/StatisticsController.groovy
107 107
		List data = new ArrayList()
108 108
		data = graphDataService.getGraphData(graphToShow)
109 109
		
110
		[data:data]
110
		[data: "{label: '" + graphToShow.name + "', data: " + data.toString() + " }"]
111 111
		
112 112
	}
113 113
	
......
593 593
				List datas = new ArrayList()
594 594
				
595 595
				chGrph.graphs.each {
596
					datas << graphDataService.getGraphData(it)
596
					datas << "{label: '" + it.name + "', data: " + graphDataService.getGraphData(it).toString() + "}"
597 597
				}
598 598
				
599 599
				return [data: datas]
hci/trunk/eneraptor-web-app/grails-app/controllers/com/eneraptor/hci/ConfigController.groovy
11 11
	
12 12
	def hci = {
13 13
		
14
		/*
15
		 * DISK USAGE - ONLY IF ENERAPTOR HCI IS SUPERUSER
16
		 */ 
17
		def totalSpace = 0
18
		def freeSpace = 0
19
		def percent = 0
20
		/*
21
		def db_sql = new Sql(dataSource)
22
		
23
		def single = db_sql.firstRow("show data_directory")
24
		def loca = single.data_directory
25
		def partition = new File(loca)
26
		totalSpace = partition.getTotalSpace()
27
		freeSpace  = partition.getFreeSpace()
28
		
29
		totalSpace = (int)((totalSpace/1024)/1024)
30
		freeSpace = (int)((freeSpace/1024)/1024)
31
		
32
		percent = 100 - ((int) ((freeSpace/totalSpace)*100))
33
		
34
		*/
35
		
36 14
		def allDevices = HardwareSet.get(session.hwSet.id).devices
37 15
		
38
		[conf: InternalConfig, devices: allDevices, totalSpace: totalSpace, freeSpace: freeSpace, percent: percent]		
16
		[conf: InternalConfig, devices: allDevices]		
39 17
	}
40 18
	
41 19
	def addDevice = {
hci/trunk/eneraptor-web-app/grails-app/views/statistics/showGraph.gsp
14 14
			var options = {
15 15
				lines: { show: true },
16 16
				points: { show: true },
17
				xaxis: { mode: "time", timeformat: "%y/%m/%d %H:%M" }
17
				xaxis: { mode: "time", timeformat: "%y/%m/%d %H:%M" },
18
				legend: { container: '#legendHolder' }
18 19
			};
19 20
		</g:javascript>
20 21
		<div class="chart">
21 22
			<flot:plot id="placeholder" style="width: 900px; height: 300px; padding:5px;" data="data" options="options" />
22 23
		</div>
24
		<br />
25
		<p>Legend:</p>
26
		<div id="legendHolder" name="legendHolder"></div>
27
		
23 28
	</erptr:box>
24 29

  
25 30
</body>
hci/trunk/eneraptor-web-app/grails-app/views/statistics/showCombGraph.gsp
15 15
				lines: { show: true },
16 16
				points: { show: true },
17 17
				xaxis: { mode: "time", timeformat: "%y/%m/%d %H:%M" },
18
				legend: {
19
				    container: $('legendContainer')
20
				}
18
				legend: { container: '#legendHolder' }
21 19
			};
22 20
		</g:javascript>
23 21
		<div class="chart">
......
25 23
		</div>
26 24
		<br />
27 25
		<p>Legend:</p>
28
		<div id="legendContainer" name="legendContainer"></div>
26
		<div id="legendHolder" name="legendHolder"></div>
27
		
29 28
	</erptr:box>
30 29

  
31 30
</body>
hci/trunk/eneraptor-web-app/grails-app/views/config/database.gsp
6 6
</head>
7 7

  
8 8
<body>
9

  
10
		<!-- DISK USAGE - ONLY IF ENERAPTOR HCI IS SUPERUSER	
11
			<p style="float: left;">Disk usage: &nbsp;&nbsp;&nbsp;</p>
12
			<div style="float:left;">
13
				<div style="width: 100px;border:1px solid grey;">
14
					<div style="width:${percent}px;background:grey;">
15
						&nbsp;
16
					</div>
17
				</div>
18
			</div>
19
			<span> &nbsp;&nbsp;&nbsp; ${percent}% (free space ${(int)freeSpace} MB) </span>
20
			<g:if test="${percent >= 95}">
21
					<i style="color:red;">&nbsp;&nbsp;&nbsp;Warning: disk is almost full. You should erase some old log entries.</i>
22
			</g:if>
23
		-->
24 9
	
25 10
	<erptr:box title="Database information">
26 11
	

Also available in: Unified diff