Skip to content
This repository was archived by the owner on Oct 16, 2025. It is now read-only.

Commit 9d88e6a

Browse files
committed
Refine colladmin links
1 parent c5bef75 commit 9d88e6a

7 files changed

Lines changed: 141 additions & 13 deletions

File tree

src-colladmin/lambda_function.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,10 @@ def template_parameters(path, myparams)
228228
mode,
229229
objlist
230230
).objects
231+
elsif path == '/web/storeObjectNodes.html'
232+
ark = CGI.unescape(myparams.fetch("ark",""))
233+
map['ARK'] = ark
234+
map['OBJNODES'] = ObjectNodes.new(@config, ark).nodes
231235
end
232236
map
233237
end

src-colladmin/lib/storage_nodes.rb

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,4 +289,41 @@ def normalize(s)
289289
s.strip.to_i
290290
end
291291

292+
end
293+
294+
class ObjectNodes < MerrittQuery
295+
def initialize(config, ark)
296+
super(config)
297+
@nodes = []
298+
run_query(
299+
%{
300+
select
301+
inio.role,
302+
n.number,
303+
n.description
304+
from
305+
inv_objects o
306+
inner join inv_nodes_inv_objects inio
307+
on o.id = inio.inv_object_id
308+
inner join inv_nodes n
309+
on inio.inv_node_id = n.id
310+
where
311+
o.ark = ?
312+
order by
313+
role,
314+
number
315+
},
316+
[ark]
317+
).each do |r|
318+
@nodes.push({
319+
role: r[0],
320+
number: r[1],
321+
name: r[2]
322+
})
323+
end
324+
end
325+
326+
def nodes
327+
@nodes
328+
end
292329
end

src-colladmin/web/storeCollNodes.html

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,18 @@ <h2>Collection Ingest Processing Status</h2>
5151
<div class="indent">
5252
<label for="ingest-status">Current Status: </label>
5353
<output id="ingest-status">{{ingest_paused}}</output>
54-
<input type="button" name="pause" value="Pause Ingest {{#NOT_DOCKER}}🚧{{/NOT_DOCKER}}" disabled />
55-
<input type="button" name="unpause" value="Unpause Ingest {{#NOT_DOCKER}}🚧{{/NOT_DOCKER}}" disabled/>
54+
<input
55+
type="button"
56+
name="pause"
57+
value="Pause Ingest {{#NOT_DOCKER}}🚧{{/NOT_DOCKER}}"
58+
onclick="javascript:document.location='https://cdluc3.github.io/mrt-doc/diagrams/store-admin-pause-ing-for-coll'"
59+
/>
60+
<input
61+
type="button"
62+
name="unpause"
63+
value="Unpause Ingest {{#NOT_DOCKER}}🚧{{/NOT_DOCKER}}"
64+
onclick="javascript:document.location='https://cdluc3.github.io/mrt-doc/diagrams/store-admin-pause-ing-for-coll'"
65+
/>
5666
</div>
5767
<h2>Storage Nodes for Collection</h2>
5868
<p>Primary Node (from Collection Profile): {{PRIMARY_NODE}}</p>
@@ -77,10 +87,23 @@ <h2>Storage Nodes for Collection</h2>
7787
<td>{{count}}</td>
7888
<td>{{percent}}</td>
7989
<td>
80-
<button title="Trigger the re-audit of all objects in the collection.">Re-Audit {{#NOT_DOCKER}}🚧{{/NOT_DOCKER}}</button>
81-
<button disabled="{{primary}}" title="Delete all objects in the collection from this SECONDARY node.">Delete Coll from Node {{#NOT_DOCKER}}🚧{{/NOT_DOCKER}}</button>
82-
<button disabled="true" title="Make this storage node the primary node for a collection. The node must be ONLINE (not nearline) and replication must be 100% complete. The collection profile must have this node marked as primary.">Make Primary {{#NOT_DOCKER}}🚧{{/NOT_DOCKER}}</button>
83-
<button disabled="true" title="Temporarily redirect UI traffic to this SECONDAY node. The node must be ONLINE (not nearline) and replication must be 100% complete.">Make UI Primary {{#NOT_DOCKER}}🚧{{/NOT_DOCKER}}</button>
90+
<button
91+
title="Trigger the re-audit of all objects in the collection."
92+
onclick="javascript:document.location='https://cdluc3.github.io/mrt-doc/diagrams/store-admin-force-audit'"
93+
>Re-Audit {{#NOT_DOCKER}}🚧{{/NOT_DOCKER}}</button>
94+
<button
95+
zzdisabled="{{primary}}"
96+
title="Delete all objects in the collection from this SECONDARY node."
97+
onclick="javascript:document.location='https://cdluc3.github.io/mrt-doc/diagrams/store-admin-del-node'"
98+
>Delete Coll from Node {{#NOT_DOCKER}}🚧{{/NOT_DOCKER}}</button>
99+
<button
100+
title="Make this storage node the primary node for a collection. The node must be ONLINE (not nearline) and replication must be 100% complete. The collection profile must have this node marked as primary."
101+
onclick="javascript:document.location='https://cdluc3.github.io/mrt-doc/diagrams/store-admin-change-primary-node'"
102+
>Make Primary {{#NOT_DOCKER}}🚧{{/NOT_DOCKER}}</button>
103+
<button
104+
title="Temporarily redirect UI traffic to this SECONDAY node. The node must be ONLINE (not nearline) and replication must be 100% complete."
105+
onclick="javascript:document.location='https://cdluc3.github.io/mrt-doc/diagrams/store-admin-reroute-ui'"
106+
>Make UI Primary {{#NOT_DOCKER}}🚧{{/NOT_DOCKER}}</button>
84107
</td>
85108
</tr>
86109
{{/NODES}}
@@ -98,7 +121,9 @@ <h2>Add Secondary Storage Node for this collection</h2>
98121
{{/NODES}}
99122
</select>
100123
<div>
101-
<button disabled="true">Add Storage Node to this Collection {{#NOT_DOCKER}}🚧{{/NOT_DOCKER}}</button>
124+
<button
125+
onclick="javascript:document.location='https://cdluc3.github.io/mrt-doc/diagrams/store-admin-add-node'"
126+
>Add Storage Node to this Collection {{#NOT_DOCKER}}🚧{{/NOT_DOCKER}}</button>
102127
</div>
103128
</div>
104129
</div>

src-colladmin/web/storeNodeDeletes.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
<h1>Review Storage Node Deletes</h1>
1717
<p><a href="{{ADMINTOOL_HOME}}">Admin Tool Home</a> / <a href="{{COLLADMIN_ADMIN}}">CollAdmin Tool Home</a></p>
1818
<p>TODO: Need to figure out how specific deletes could be approved/rejected/partially processed.</p>
19+
<p>
20+
<button
21+
onclick="javascript:document.location='https://cdluc3.github.io/mrt-doc/diagrams/store-admin-del-node-keys'"
22+
>Delete Key (will appear in listing) {{#NOT_DOCKER}}🚧{{/NOT_DOCKER}}</button>
23+
</p>
1924
<div>
2025
<table class="sortable results">
2126
<thead>

src-colladmin/web/storeNodes.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,13 @@ <h1>Manage Storage Nodes</h1>
3636
<td></td>
3737
<td></td>
3838
<td>
39-
<button title="" disabled>Queue Scan {{#NOT_DOCKER}}🚧{{/NOT_DOCKER}}</button>
40-
<button title="" onclick="javascript:document.location='storeNodeDeletes.html'">Review Deletes {{#NOT_DOCKER}}🚧{{/NOT_DOCKER}}</button>
39+
<button title=""
40+
onclick="javascript:document.location='https://cdluc3.github.io/mrt-doc/diagrams/store-admin-scan-node'"
41+
>Queue Scan {{#NOT_DOCKER}}🚧{{/NOT_DOCKER}}</button>
42+
<button
43+
title=""
44+
onclick="javascript:document.location='storeNodeDeletes.html'"
45+
>Review Deletes {{#NOT_DOCKER}}🚧{{/NOT_DOCKER}}</button>
4146
</td>
4247
</tr>
4348
{{/NODES}}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<html>
2+
<head>
3+
<meta charset="utf-8"/>
4+
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
5+
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"></script>
6+
<link rel="stylesheet" type="text/css" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/smoothness/jquery-ui.css"></link>
7+
<link rel="stylesheet" type="text/css" href="api-table.css"/>
8+
<script type="text/javascript" src="coll-lambda.base.js"></script>
9+
<script type="text/javascript" src="api-table.js"></script>
10+
<script type="text/javascript" src="properties.js"></script>
11+
<script src="sorttable.js" type="text/javascript"></script>
12+
<link rel="icon" href="favicon.ico" type="image/x-icon" />
13+
</head>
14+
<body>
15+
<div class="form-body">
16+
<h1>Manage Object Storage Nodes for {{ARK}}</h1>
17+
<p><a href="{{ADMINTOOL_HOME}}">Admin Tool Home</a> / <a href="{{COLLADMIN_ADMIN}}">CollAdmin Tool Home</a></p>
18+
<table class="sortable results">
19+
<thead>
20+
<tr>
21+
<th>Role</th>
22+
<th>Node Num</th>
23+
<th>Node Name</th>
24+
<th>Actions</th>
25+
</tr>
26+
</thead>
27+
<tbody>
28+
{{#OBJNODES}}
29+
<tr>
30+
<th>{{role}}</th>
31+
<td>{{number}}</td>
32+
<td>{{name}}</td>
33+
<td>
34+
<button title=""
35+
onclick="javascript:document.location='https://cdluc3.github.io/mrt-doc/diagrams/store-admin-del-node-keys'"
36+
>Delete Object from Node {{#NOT_DOCKER}}🚧{{/NOT_DOCKER}}</button>
37+
</td>
38+
</tr>
39+
{{/OBJNODES}}
40+
</tbody>
41+
</table>
42+
</div>
43+
</body>
44+
</html>

src-colladmin/web/storeObjects.html

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,18 @@ <h2>Objects</h2>
5959
<td>{{title}}</td>
6060
<td>{{created}}</td>
6161
<td>
62-
<button title="" disabled>Delete Object {{#NOT_DOCKER}}🚧{{/NOT_DOCKER}}</button>
63-
<button title="" disabled>Trigger Replication {{#NOT_DOCKER}}🚧{{/NOT_DOCKER}}</button>
64-
<button title="" disabled>Re-audit {{#NOT_DOCKER}}🚧{{/NOT_DOCKER}}</button>
65-
<button title="">Object Nodes {{#NOT_DOCKER}}🚧{{/NOT_DOCKER}}</button>
62+
<button title=""
63+
onclick="javascript:document.location='https://cdluc3.github.io/mrt-doc/diagrams/store-admin-del-node-obj'"
64+
>Delete Object {{#NOT_DOCKER}}🚧{{/NOT_DOCKER}}</button>
65+
<button title=""
66+
onclick="javascript:document.location='https://cdluc3.github.io/mrt-doc/diagrams/store-admin-force-replic'"
67+
>Trigger Replication {{#NOT_DOCKER}}🚧{{/NOT_DOCKER}}</button>
68+
<button title=""
69+
onclick="javascript:document.location='https://cdluc3.github.io/mrt-doc/diagrams/store-admin-force-audit'"
70+
>Re-audit {{#NOT_DOCKER}}🚧{{/NOT_DOCKER}}</button>
71+
<button title=""
72+
onclick="javascript:document.location='storeObjectNodes.html?ark={{ark}}'"
73+
>Object Nodes {{#NOT_DOCKER}}🚧{{/NOT_DOCKER}}</button>
6674
</td>
6775
</tr>
6876
{{/OBJS}}

0 commit comments

Comments
 (0)