Skip to content

Commit

Permalink
dim link to node manager at port 8000
Browse files Browse the repository at this point in the history
  • Loading branch information
M-Wicenec committed Jun 3, 2021
1 parent f69d75c commit 1026b8b
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 28 deletions.
10 changes: 5 additions & 5 deletions daliuge-engine/dlg/manager/web/dim.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<!-- custom bootstrap navbar -->
<nav class="navbar fixed-top navbar-expand-lg navbar-dark" style="background-color: #004085;">
<!-- Navbar content -->
<a href="/" class="navbar-brand" href="#" disabled>
<a href="/" class="navbar-brand inactiveLink" href="#" disabled>
<object data="/static/icons/liu.svg" type="image/svg+xml" width="30" height="30" class="d-inline-block align-top" alt="LiuIcon"></object>
<img src="/static/icons/translate_green.png" width="30" height="30" class="d-inline-block align-top" alt="">
<span>{{dmType}}</span>
Expand Down Expand Up @@ -96,20 +96,20 @@ <h4>Nodes</h4>
}

// Animated filling of DropManagers and Nodes table
function fillTable(selector, data, href_function) {
function fillTable(selector, data, href_function, nodeHref) {
data.sort();
var rows = d3.select(selector).selectAll('tr').data(data);
var newRow = rows.enter().append('tr');
var nodeName = data[0];
var nodeName = String;
newRow.style('opacity', 0.0).transition().delay(0).duration(500).style('opacity',1.0);
newRow.append('td').classed('id', true)
.append('a').attr("href", "http://"+nodeName+":8000").attr("target","_blank").text(String);
.append('a').attr("href", nodeHref).attr("target","_blank").text(String);
newRow.append('td').classed('details', true)
.append('a').attr('href', href_function)
.append('span').classed('fa fa-share', true);
}
if( !selectedNode ) {
fillTable('#nodesTable tbody', nodes, function(n) { return '?node=' + n; });
fillTable('#nodesTable tbody', nodes, function(n) { return '?node=' + n; }, function(n){return "http://"+n+":8000"});
}

// Listeners for the two session-related buttons
Expand Down
45 changes: 24 additions & 21 deletions daliuge-engine/dlg/manager/web/dm.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<!-- custom bootstrap navbar -->
<nav class="navbar fixed-top navbar-expand-lg navbar-dark" style="background-color: #004085;">
<!-- Navbar content -->
<a href="/" class="navbar-brand" href="#" disabled>
<a href="/" class="navbar-brand inactiveLink" href="#" disabled>
<object data="/static/icons/liu.svg" type="image/svg+xml" width="30" height="30" class="d-inline-block align-top" alt="LiuIcon"></object>
<img src="/static/icons/translate_green.png" width="30" height="30" class="d-inline-block align-top" alt="">
<span>{{dmType}}</span>
Expand All @@ -36,27 +36,30 @@
</ul>
</div>
</nav>
<div id="dimContentWrapper" class="container">
<div id="sessions">
<h2>Sessions</h2>
<table id="sessionsTable" class="table table-striped">
<thead>
<tr>
<th>Session ID</th>
<th>State</th>
<th># Drops</th>
<th>Details</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<button id="addSessionBtn" type="button" class="btn btn-secondary"><span class="fa fa-plus"></span> Add Session</button>
<button id="refreshListBtn" type="button" class="btn btn-secondary"><span class="fa fa-refresh"></span> Refresh</button>
<button id="resetBtn" type="button" class="btn btn-secondary"><span class="fa fa-power-off"></span> Reset</button>
<div id="graphNameWrapper">
<span id="graphName"> </span>
</div>
<div id="dimContentWrapper" class="container">
<div id="sessions">
<h2>Sessions</h2>
<table id="sessionsTable" class="table table-striped">
<thead>
<tr>
<th>Session ID</th>
<th>State</th>
<th># Drops</th>
<th>Details</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<button id="addSessionBtn" type="button" class="btn btn-secondary"><span class="fa fa-plus"></span> Add Session</button>
<button id="refreshListBtn" type="button" class="btn btn-secondary"><span class="fa fa-refresh"></span> Refresh</button>
<button id="resetBtn" type="button" class="btn btn-secondary"><span class="fa fa-power-off"></span> Reset</button>
</div>
</div>
</div>

<script type="text/javascript">

Expand Down
8 changes: 6 additions & 2 deletions daliuge-engine/dlg/manager/web/static/css/dm.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ margin-bottom:100px;

.navbar-brand span{
margin-left: 10px;
text-decoration: underline;
}

.navbar-nav.navbar-center {
Expand Down Expand Up @@ -74,4 +73,9 @@ color:rgba(0,35,73,1);

.btn.btn.btn-secondary:hover{
background-color: rgba(0,35,73,1);
}
}

.inactiveLink {
pointer-events: none;
cursor: default;
}

0 comments on commit 1026b8b

Please sign in to comment.