Commit 8c38cb50 authored by Leigh Stoller's avatar Leigh Stoller

Update "other" image listing for the Cloudlab portal by using the

imageserver database to collect images across all of the clusters.
parent 024fbc85
......@@ -131,6 +131,24 @@ class Aggregate
return Aggregate::Lookup($urn);
}
#
# Lookup using the short auth name (emulab.net).
#
function LookupByDomain($domain) {
if (! preg_match("/^[-\w\.]+$/", $domain)) {
return null;
}
$query_result =
DBQueryWarn("select urn from apt_aggregates ".
"where urn like 'urn:publicid:IDN+${domain}+%'");
if (!$query_result || !mysql_num_rows($query_result)) {
return null;
}
$row = mysql_fetch_array($query_result);
$urn = $row['urn'];
return Aggregate::Lookup($urn);
}
#
# Generate the free nodes URL from the web url.
......
This diff is collapsed.
......@@ -11,6 +11,7 @@ $(function ()
// Image data
var images = JSON.parse(_.unescape($('#images-json')[0].textContent));
console.info("images", images);
// Generate the main template.
var html = mainTemplate({
......@@ -70,8 +71,6 @@ $(function ()
widgetOptions: {
// include child row content while filtering, if true
filter_childRows : true,
// include all columns in the search.
filter_anyMatch : true,
// search from beginning
filter_startsWith : false,
// Set this option to false for case sensitive search
......
......@@ -411,8 +411,6 @@ $(function ()
widgets: ["zebra", "filter"],
widgetOptions: {
// include all columns in the search.
filter_anyMatch : true,
// search from beginning
filter_startsWith : false,
// Set this option to false for case sensitive search
......
......@@ -400,11 +400,9 @@ echo " <li class='divider'></li>
<li><a href='create-dataset.php'>Create Dataset</a></li>
<li><a href='user-dashboard.php#datasets'>
My Datasets</a></li>
<li><a href='list-images.php'>My Disk Images</a></li>";
if ($ISEMULAB || $ISPNET) {
echo "<li><a href='images.php'>Other Disk Images</a></li>";
}
echo "</ul>
<li><a href='list-images.php'>My Disk Images</a></li>
<li><a href='images.php'>Other Disk Images</a></li>
</ul>
</li>
";
}
......
......@@ -34,7 +34,8 @@
</div>
<div class='panel-body panel-body-dashboard'>
<div>
<input class='form-control search' type='search' data-column='all'
<input class='form-control search' type='search'
data-column='0,1,3'
id='classic-images-search' placeholder='Search'>
</div>
<div class="table-responsive">
......
......@@ -69,7 +69,8 @@
</span></a>
</div>
<div>
<input class='form-control search' type='search' data-column='all'
<input class='form-control search' type='search'
data-column='0,1,2,4'
id='images-search' placeholder='Search'>
</div>
<div class="table-responsive">
......@@ -90,7 +91,7 @@
<% var project_re = /project/; %>
<% _.each(images, function(value, index) { %>
<tr>
<% if (isadmin) { %>
<% if (isadmin && _.has(value, "url")) { %>
<td><a href="<%- value.url %>"><%= value.imagename %></a></td>
<% } else { %>
<td><%= value.imagename %></td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment