Skip to content

Commit

Permalink
UI interface changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dhinesh88 committed Nov 12, 2020
1 parent b67471a commit 6fd2ed1
Show file tree
Hide file tree
Showing 10 changed files with 248 additions and 197 deletions.
129 changes: 62 additions & 67 deletions dashboards/isp-country-analytics/isp_country_analytics.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dashboards/isp-country-analytics/pkg.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: ISP Country Analytics

version: 0.0.2
version: 0.0.3

author: trisul

Expand Down
2 changes: 1 addition & 1 deletion dashboards/isp-country-analytics/template.haml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
.tab-pane.active#country_overview_0{data-use-width:1}
.row
.col-xs-12.toppers_table_div
.panel.panel-primary
.panel.panel-primary.add_download_btn
.panel-heading
%h3
%i.fa.fa-table.fa-fw
Expand Down
4 changes: 1 addition & 3 deletions dashboards/peering-analytics-drilldown/app.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
.toppers_table_div,.donut_chart_div,.traffic_chart_div,.sankey_chart_div
.donut_chart_div,.traffic_chart_div,.sankey_chart_div
{
border:2px solid #eee;
box-shadow: 1px 1px #eee;
min-height: 300px;
}
.ui_data{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ class ISPDrilldownMapping{
async redraw_all(meter_name){
let idx = Object.keys(this.meters).findIndex(k=>k==meter_name);
await this.draw_toppers_table(meter_name,idx);
this.draw_donut_chart(meter_name,idx);
await this.draw_traffic_chart(meter_name,idx);
this.draw_donut_chart(meter_name,idx);
this.draw_sankey_chart(meter_name,idx);
}

Expand All @@ -178,7 +178,7 @@ class ISPDrilldownMapping{

var table = this.dom.find(`#peering_drilldown_${idx}`).find(".toppers_table").find("table");
table.attr("id",`table_${idx}`);
this.dom.find(`#peering_drilldown_${idx}`).find(".toppers_table").removeClass('animated-background');
this.dom.find(`#peering_drilldown_${idx}`).find(".toppers_table_div").find('.animated-background').remove();
table.addClass('table table-hover table-sysdata');
table.find("thead").append("<tr><th>Router</th><th>Interface</th><th sort='volume' barspark='auto'>Volume </th>></tr>");
let cgtoppers = this.toppers_data.slice(0,this.maxitems);
Expand Down Expand Up @@ -269,7 +269,7 @@ class ISPDrilldownMapping{
}
async draw_donut_chart(meter_name,idx){
this.donut_div_id = `peering_drilldown_${idx}_donut`;
this.dom.find(`#peering_drilldown_${idx}`).find(".donut_chart").removeClass('animated-background');
this.dom.find(`#peering_drilldown_${idx}`).find(".donut_chart_div").find('.animated-background').remove();
this.dom.find(`#peering_drilldown_${idx}`).find(".donut_chart").append($("<div>",{id:this.donut_div_id}));
let cgtoppers = this.toppers_data.slice(0,this.maxitems);
var values = [];
Expand Down Expand Up @@ -319,16 +319,20 @@ class ISPDrilldownMapping{
}
}
this.traf_chart_id = `peering_drilldown_${idx}_traffic_chart`
this.dom.find(`#peering_drilldown_${idx}`).find(`.interfaces_traffic_chart`).attr("id",this.traf_chart_id);
this.dom.find(`#peering_drilldown_${idx}`).find(`.traffic_chart`).attr("id",this.traf_chart_id);
let ref_model = [this.parent_cgguid,this.keyt.key,this.meters[meter_name],"Total"];
var model_data = {cgguid:this.crosskey_interface,
meter:this.meters[meter_name],
key:keys.join(","),
from_date:this.form.find("#from_date").val(),
to_date:this.form.find("#to_date").val(),
valid_input:1,
ref_model:ref_model
ref_model:ref_model,
show_title:false,
legend_position:"bottom"
};
this.dom.find(`#peering_drilldown_${idx}`).find(`.traffic_chart_div`).find(".animated-background").remove();

if(keys.length==0){
$('#'+this.traf_chart_id).html("no data found");
return
Expand All @@ -347,7 +351,7 @@ class ISPDrilldownMapping{

this.sankey_div_id = `peering_drilldown_${midx}_sankey`;
this.dom.find(`#peering_drilldown_${midx}`).find(".interfaces_sankey_chart").append($("<div>",{id:this.sankey_div_id}));

this.dom.find(`#peering_drilldown_${midx}`).find('.sankey_chart_div').find(".animated-background").remove();
// Get Bytes Toppers
let tdata = this.toppers_data.slice(0,30);
let keylookup = {};
Expand Down Expand Up @@ -508,7 +512,7 @@ class ISPDrilldownMapping{
}
this.description = description;
description = `${description} <i class='fa fa-clock-o fa-fw'></i> ${h_fmtduration(this.tmint.to.tv_sec- this.tmint.from.tv_sec)}`
$('.show_description').html(description)
$('.target').html(description)
}

};
Expand Down
2 changes: 1 addition & 1 deletion dashboards/peering-analytics-drilldown/pkg.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Peering Analytics Drilldown

version: 1.0.21
version: 1.0.22

author: trisul

Expand Down
Loading

0 comments on commit 6fd2ed1

Please sign in to comment.