New plugin grid
This commit is contained in:
parent
d6721ea40f
commit
b1853824ea
|
@ -9,9 +9,9 @@ var locPlugin2 = ActiveBuild.UiPlugin.extend({
|
|||
|
||||
register: function() {
|
||||
var self = this;
|
||||
var query = ActiveBuild.registerQuery('phploc-lines', -1, {num_builds: 10, key: 'phploc-structure'})
|
||||
var query = ActiveBuild.registerQuery('phploc-structure', -1, {num_builds: 10, key: 'phploc-structure'})
|
||||
|
||||
$(window).on('phploc-lines', function(data) {
|
||||
$(window).on('phploc-structure', function(data) {
|
||||
self.onUpdate(data);
|
||||
});
|
||||
|
||||
|
@ -24,8 +24,8 @@ var locPlugin2 = ActiveBuild.UiPlugin.extend({
|
|||
|
||||
render: function() {
|
||||
var self = this;
|
||||
var container = $('<div id="phploc-lines" style="width: 100%; height: 300px"></div>');
|
||||
container.append('<canvas id="phploc-lines-chart" style="width: 100%; height: 300px"></canvas>');
|
||||
var container = $('<div id="phploc-structure" style="width: 100%; height: 300px"></div>');
|
||||
container.append('<canvas id="phploc-structure-chart" style="width: 100%; height: 300px"></canvas>');
|
||||
|
||||
$(document).on('shown.bs.tab', function () {
|
||||
$('#build-lines-chart').hide();
|
||||
|
@ -92,7 +92,7 @@ var locPlugin2 = ActiveBuild.UiPlugin.extend({
|
|||
if ($('#information').hasClass('active') && self.chartData && self.lastData) {
|
||||
$('#build-lines-chart').show();
|
||||
|
||||
var ctx = $("#phploc-lines-chart").get(0).getContext("2d");
|
||||
var ctx = $("#phploc-structure-chart").get(0).getContext("2d");
|
||||
var phpLocChart = new Chart(ctx);
|
||||
|
||||
phpLocChart.Line(self.chartData, {
|
||||
|
|
Loading…
Reference in a new issue