Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
e3f13f68
Commit
e3f13f68
authored
Mar 01, 2017
by
Leigh B Stoller
Browse files
UI tweaks; do not show empty tables, link to profile version when jus
one version in the list.
parent
928b0163
Changes
2
Hide whitespace changes
Inline
Side-by-side
www/aptui/js/list-images.js
View file @
e3f13f68
...
...
@@ -75,6 +75,8 @@ $(function ()
});
var
TableInit
=
function
(
tablename
)
{
$
(
'
#
'
+
name
+
'
#
'
+
tablename
).
removeClass
(
"
hidden
"
);
var
table
=
$
(
'
#
'
+
name
+
'
#
'
+
tablename
)
.
tablesorter
({
...
...
@@ -164,9 +166,16 @@ $(function ()
return
false
;
});
};
TableInit
(
'
images-table-no-profiles
'
);
TableInit
(
'
images-table-one-profile
'
);
TableInit
(
'
images-table-multi-profile
'
);
// Only init/show tables that have something in them.
if
(
$
(
'
#images-table-no-profiles tbody
'
).
children
().
length
)
{
TableInit
(
'
images-table-no-profiles
'
);
}
if
(
$
(
'
#images-table-one-profile tbody
'
).
children
().
length
)
{
TableInit
(
'
images-table-one-profile
'
);
}
if
(
$
(
'
#images-table-multi-profile tbody
'
).
children
().
length
)
{
TableInit
(
'
images-table-multi-profile
'
);
}
// This activates the popover subsystem.
$
(
'
#
'
+
name
+
'
[data-toggle="popover"]
'
).
popover
({
...
...
www/aptui/template/image-list.html
View file @
e3f13f68
...
...
@@ -31,7 +31,7 @@
</h5>
</div>
<div
class=
'panel-body panel-body-dashboard'
>
<table
class=
'tablesorter'
id=
'images-table-no-profiles'
>
<table
class=
'tablesorter
hidden
'
id=
'images-table-no-profiles'
>
<caption>
<center>
Images not used by any of your profiles
<a
href=
'#'
class=
'btn btn-xs'
...
...
@@ -93,7 +93,7 @@
<
%
});
%
>
</tbody>
</table>
<table
class=
'tablesorter'
id=
'images-table-one-profile'
>
<table
class=
'tablesorter
hidden
'
id=
'images-table-one-profile'
>
<caption>
<center>
Images used by only a single profile
<a
href=
'#'
class=
'btn btn-xs'
...
...
@@ -163,13 +163,21 @@
href=
"show-profile.php?uuid=<%- version.using[0].uuid %>"
>
<
%
-
version.using
[0].
name
%
>
</a>
(
<
%
-
version.using
[0].
versions.length
%
>
versions)
<
%
if
(version.using[0].versions.length =
=
1)
{
%
>
(Version
<a
target=
"_blank"
href=
"show-profile.php?uuid=<%- version.using[0].versions[0].uuid %>"
>
<
%
-
version.using
[0].
versions
[0].
version
%
>
</a>
)
<
%
}
else
{
%
>
(
<
%
-
version.using
[0].
versions.length
%
>
versions)
<
%
}
%
>
</tr>
<
%
});
%
>
<
%
});
%
>
</tbody>
</table>
<table
class=
'tablesorter'
id=
'images-table-multi-profile'
>
<table
class=
'tablesorter
hidden
'
id=
'images-table-multi-profile'
>
<caption>
<center>
Images used by more then one profile
<a
href=
'#'
class=
'btn btn-xs'
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment