Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Commit ae2d1f7

Browse files
authored
Make topology details section scrollable in Heron UI (#3400)
1 parent 909c7a0 commit ae2d1f7

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

heron/tools/ui/resources/static/css/main.css

+3-2
Original file line numberDiff line numberDiff line change
@@ -583,8 +583,7 @@ header {
583583
left: 0; }
584584

585585
.dashboard-wrapper {
586-
/*padding: 30px;*/
587-
padding: 0px 30px 30px 10px;
586+
padding: 0px 10px 20px 10px;
588587
position: relative;
589588
margin: 0px 0px 10px 10px;
590589
background: white;
@@ -2269,6 +2268,7 @@ div#display-navigator {
22692268
padding-bottom: 5px;
22702269
background-color: transparent;
22712270
border-width: 0px;
2271+
outline: none; /* disable outline after clicked on */
22722272
}
22732273

22742274
#display-navigator .navbar-default button.active {
@@ -2280,6 +2280,7 @@ div#topologydetails {
22802280
border-style: solid;
22812281
border-width: 1px;
22822282
border-color: #dddddd;
2283+
overflow-y: scroll;
22832284
}
22842285

22852286
div#topologydetails div.display-info {

heron/tools/ui/resources/templates/topology.html

+14-2
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ <h4 class="space-above">
103103
<!-- Topology details, including stats, counter, and config. -->
104104
<div class="display-stats" id="topologydetails">
105105
<!-- Stats -->
106-
<div class="row">
106+
<div class="col-md-12">
107107
<div class="display-info space-above display-stats" id="topologystats">
108108
<div class="col-md-6">
109109
<div class="container">
@@ -281,12 +281,23 @@ <h4 class="space-above">
281281
}
282282
);
283283

284+
function resizeDetailsSection() {
285+
const minSectionHeight = 350; // Minimal height in pixel.
286+
var windowH = $(window).height();
287+
var planH = $(".plans").height();
288+
var detailsH = Math.max(minSectionHeight, windowH - planH - 222); // Leave 222 pixels for topology info.
289+
290+
d3.selectAll("div#topologydetails").style('height', detailsH + 'px');
291+
}
292+
284293
function render(planController) {
285294
drawLogicalPlan(planController, logicalPlan, "#logical-plan", $("#logical-plan").width(), 400, "{{baseUrl}}",
286295
"{{cluster}}", "{{environ}}", "{{topology}}");
287-
planController.planResized();
288296
drawPhysicalPlan(planController, physicalPlan, packingPlan, "#physical-plan", $("#physical-plan").width(), 400, "{{baseUrl}}", "{{cluster}}",
289297
"{{environ}}", "{{topology}}");
298+
299+
resizeDetailsSection();
300+
290301
planController.planResized();
291302
}
292303

@@ -297,6 +308,7 @@ <h4 class="space-above">
297308
}, 100));
298309
render(planController);
299310
drawStatsTable(planController, "{{baseUrl}}", "{{cluster}}", "{{environ}}", "{{topology}}", physicalPlan, logicalPlan);
311+
300312
planController.planDrawn();
301313
}
302314
};

0 commit comments

Comments
 (0)