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