-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
337 additions
and
275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
var format_usage_stats_thermal_pressure = function(colNumber, row){ | ||
var col = $('td:eq('+colNumber+')', row), | ||
colvar = col.text(); | ||
colvar = colvar == 'Heavy' ? '<span class="label label-danger">Heavy</span>' : | ||
colvar = colvar == 'Moderate' ? '<span class="label label-warning">Moderate</span>' : | ||
(colvar === 'Nominal' ? '<span class="label label-success">Nominal</span>' : | ||
colvar = colvar) | ||
col.html(colvar) | ||
} | ||
|
||
var format_usage_stats_byte_rate = function(colNumber, row){ | ||
var col = $('td:eq('+colNumber+')', row), | ||
colvar = col.text(); | ||
if (colvar > 0){ | ||
col.text(fileSize(parseFloat(colvar), 2)+'/s') | ||
} else { | ||
col.text("") | ||
} | ||
} | ||
|
||
var format_usage_stats_byte_size = function(colNumber, row){ | ||
var col = $('td:eq('+colNumber+')', row), | ||
colvar = col.text(); | ||
if (colvar > 0){ | ||
col.text(fileSize(parseFloat(colvar), 2)) | ||
} else { | ||
col.text("") | ||
} | ||
} | ||
|
||
var format_usage_stats_rate = function(colNumber, row){ | ||
var col = $('td:eq('+colNumber+')', row), | ||
colvar = col.text(); | ||
if (colvar > 0){ | ||
col.text(parseFloat(colvar).toFixed(2)+'/s') | ||
} else { | ||
col.text("") | ||
} | ||
} | ||
|
||
var format_usage_stats_watts = function(colNumber, row){ | ||
var col = $('td:eq('+colNumber+')', row), | ||
colvar = col.text(); | ||
if (colvar > 0){ | ||
col.text(parseFloat(colvar).toFixed(2)+' Watts') | ||
} else { | ||
col.text("") | ||
} | ||
} | ||
|
||
var format_usage_stats_mhz = function(colNumber, row){ | ||
var col = $('td:eq('+colNumber+')', row), | ||
colvar = col.text(); | ||
if (colvar > 0){ | ||
col.text(((parseFloat(colvar)/1000000).toFixed(2))+'Mhz') | ||
} else { | ||
col.text("") | ||
} | ||
} | ||
|
||
var format_usage_stats_ghz = function(colNumber, row){ | ||
var col = $('td:eq('+colNumber+')', row), | ||
colvar = col.text(); | ||
if (colvar > 0){ | ||
col.text(((parseFloat(colvar)/1000000000).toFixed(2))+'Ghz') | ||
} else { | ||
col.text("") | ||
} | ||
} | ||
|
||
var format_usage_stats_ratio = function(colNumber, row){ | ||
var col = $('td:eq('+colNumber+')', row), | ||
colvar = col.text(); | ||
if (colvar > 0){ | ||
col.text((parseFloat(colvar*100)).toFixed(2)+'%') | ||
} else { | ||
col.text("") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Capsule\Manager as Capsule; | ||
|
||
class UsageStatsProcesses extends Migration | ||
{ | ||
private $tableName = 'usage_stats'; | ||
|
||
public function up() | ||
{ | ||
$capsule = new Capsule(); | ||
$capsule::schema()->table($this->tableName, function (Blueprint $table) { | ||
$table->mediumText('processes')->nullable(); | ||
$table->string('cpu_idle')->nullable(); | ||
$table->string('cpu_sys')->nullable(); | ||
$table->string('cpu_user')->nullable(); | ||
$table->string('load_avg')->nullable(); | ||
}); | ||
} | ||
|
||
public function down() | ||
{ | ||
$capsule = new Capsule(); | ||
$capsule::schema()->table($this->tableName, function (Blueprint $table) { | ||
$table->dropColumn('processes'); | ||
$table->dropColumn('cpu_idle'); | ||
$table->dropColumn('cpu_sys'); | ||
$table->dropColumn('cpu_user'); | ||
$table->dropColumn('load_avg'); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
<div id="processes"></div> | ||
<h2 data-i18n="usage_stats.processes"></h2> | ||
|
||
<div id="processes-msg" data-i18n="listing.loading" class="col-lg-12 text-center"></div> | ||
|
||
<!--All the brains of this tab are a part of the usage_stats_tab--> |
Oops, something went wrong.