| |
@@ -108,6 +108,7 @@
|
| |
</div>
|
| |
</a>
|
| |
</div>
|
| |
+ <div id="monitoring_feedback"></div>
|
| |
{% else %}
|
| |
<button title="Monitoring status" class="btn btn-sm btn-outline-primary disabled"
|
| |
id="monitoring-button">
|
| |
@@ -123,7 +124,7 @@
|
| |
<h6>Orphaned:</h6>
|
| |
<div class="btn-group">
|
| |
<a href="#" title="Adopt this orphaned package"
|
| |
- class="btn btn-sm btn-outline-primary"
|
| |
+ class="btn btn-sm btn-outline-primary disabled"
|
| |
id="take-orphan-button">
|
| |
<i id="take-orphan-icon" class="fa fa-fw fa-hand-paper-o"></i>
|
| |
Take
|
| |
@@ -246,6 +247,7 @@
|
| |
|
| |
{% if g.authenticated %}
|
| |
$(".monitoring-menu a").click(function(){
|
| |
+ $("#monitoring_feedback").attr('class', '');
|
| |
var selectedValue = $(this).attr('id');
|
| |
var _status = "no-monitoring";
|
| |
if (selectedValue === "monitoring_option_button") {
|
| |
@@ -263,6 +265,7 @@
|
| |
dataType: 'json',
|
| |
success: function(res) {
|
| |
set_up_monitoring(res.monitoring)
|
| |
+ $("#monitoring_feedback").attr("class", "fa fa-fw fa-check")
|
| |
},
|
| |
error: function() {
|
| |
alert('Unable to change the monitoring status!');
|
| |
@@ -341,8 +344,8 @@
|
| |
type: 'GET',
|
| |
dataType: 'json',
|
| |
success: function(res) {
|
| |
+ var _btn = $("#take-orphan-button");
|
| |
if (!res.active){
|
| |
- var _btn = $("#take-orphan-button");
|
| |
_btn.off("click");
|
| |
_btn.click(function(){
|
| |
window.open(
|
| |
@@ -351,6 +354,8 @@
|
| |
});
|
| |
_btn.prop( "title", "Package retired - Open a releng ticket to adopt it" );
|
| |
_btn.html("Retired");
|
| |
+ } else {
|
| |
+ _btn.removeClass('disabled');
|
| |
}
|
| |
}
|
| |
});
|
| |
Each commit can be reviewed separately.