Commit 0d3c0588 authored by Leigh Stoller's avatar Leigh Stoller

Show profile repo info in the profile picker.

parent 70b33413
......@@ -76,6 +76,9 @@ function Do_GetProfile()
'ispprofile' => $ispp,
'isscript' => ($profile->script() ? 1 : 0),
'fromrepo' => ($profile->repourl() ? 1 : 0),
'repohash' => ($profile->repourl() ?
substr($profile->repohash(),0,8)
: ""),
'amdefault' => $amdefault));
}
......
......@@ -1347,6 +1347,13 @@ $(function ()
$('#showtopo_version').html(profile_blob.version);
$('#showtopo_last_updated').html(profile_blob.created);
$('#showtopo_description').html(profile_blob.description);
if (profile_blob.fromrepo) {
$('#showtopo_repohash').html(profile_blob.repohash);
$('.showtopo_repoinfo').removeClass("hidden");
}
else {
$('.showtopo_repoinfo').addClass("hidden");
}
sup.maketopmap('#showtopo_div',
profile_blob.rspec, false, !multisite);
......@@ -1454,6 +1461,9 @@ $(function ()
// Not allowed to copy a repo based profile.
if (profile_blob.fromrepo) {
$('#profile_copy_button').addClass("hidden");
$('#selected_profile_text')
.html(profile_name + " (Repohash: " +
profile_blob.repohash + ")");
}
else {
$('#profile_copy_button').removeClass("hidden");
......@@ -1529,6 +1539,8 @@ $(function ()
$('#repohash').val(hash);
$('#reporef').val(which);
// Pass along.
json.value.repohash = hash;
if (pythonRe.test(source)) {
ConvertScript(source, function(rspec, paramdefs) {
......
......@@ -607,6 +607,14 @@
<div class='col-md-3'>Latest Version:</div>
<div id='showtopo_version' class='col-md-9'></div>
</div>
<div class='clearfix hidden showtopo_repoinfo'>
<div class='col-md-3'>Repo Based?:</div>
<div id='showtopo_repobased' class='col-md-9'>Yes</div>
</div>
<div class='clearfix hidden showtopo_repoinfo'>
<div class='col-md-3'>Repo Hash:</div>
<div id='showtopo_repohash' class='col-md-9'></div>
</div>
<div class='clearfix'>
<div class='col-md-3'>Last Updated:</div>
<div id='showtopo_last_updated' class='col-md-9'></div>
......
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