Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e2d00bb

Browse files
committed
Merge pull request linkerd#443 from BuoyantIO/rmars/wide-dashboard
Add media query to modify dashboard appearance on large screens
2 parents 112ee24 + 844accc commit e2d00bb

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

admin/src/main/resources/io/buoyant/admin/css/dashboard.css

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,3 +205,26 @@ nav ul.navbar-nav {
205205
padding-left: 15px;
206206
margin: 20px 0 30px 0;
207207
}
208+
209+
/*
210+
* For wider screens
211+
*/
212+
213+
@media (min-width: 1400px) {
214+
.navbar-container {
215+
width: 100vw;
216+
}
217+
218+
.dashboard-container {
219+
margin: 0 1.5vw 0;
220+
min-width: 96vw;
221+
}
222+
223+
.row.proc-info, .router, .clients .router-graph {
224+
min-width: 96vw;
225+
}
226+
227+
.router > div {
228+
width: 100%;
229+
}
230+
}

admin/src/main/resources/io/buoyant/admin/js/client_success_graph.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* globals UpdateableChart */
22
/* exported ClientSuccessRateGraph */
33
var ClientSuccessRateGraph = (function() {
4+
var columnGridPadding = 27; // from our css grid setup
45
var neutralLineColor = "#878787"; // greys.neutral
56

67
function createChartLegend(successLineColor) {
@@ -32,7 +33,10 @@ var ClientSuccessRateGraph = (function() {
3233
},
3334
$canvas[0],
3435
function() {
35-
return $chartEl.width();
36+
var containerWidth = $(".router-clients").first().width();
37+
var metricsWidth = $(".metrics-container").first().width();
38+
39+
return containerWidth - metricsWidth - columnGridPadding; // get this to display nicely on wide screens
3640
},
3741
timeseriesParamsFn
3842
);

admin/src/main/resources/io/buoyant/admin/js/combined_client_graph.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/* globals Query, UpdateableChart */
22
/* exported CombinedClientGraph */
33
var CombinedClientGraph = (function() {
4+
var defaultWidth = 1181;
5+
46
function clientToMetric(client) {
57
return {name: client, color: ""}; //TODO: move to clientName only after v2 migration
68
}
@@ -34,7 +36,8 @@ var CombinedClientGraph = (function() {
3436
},
3537
$root[0],
3638
function() {
37-
return 1161;
39+
var containerWidth = $(".router-clients").first().width(); // get this to display nicely on wide screens
40+
return containerWidth || defaultWidth;
3841
},
3942
timeseriesParams
4043
);

0 commit comments

Comments
 (0)