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

Show profile repo info in the profile picker.

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