Skip to content
Permalink
Browse files
[JENKINS-32340] Enable disabled dependencies
  • Loading branch information
fbelzunc committed Apr 6, 2016
1 parent 4515625 commit 28335690e0b2535cdd76cc778ffdc45a5c4f67ac
@@ -565,7 +565,7 @@ public boolean hasLicensesXml() {
// make sure dependencies exist
for (Dependency d : dependencies) {
PluginWrapper dependency = parent.getPlugin(d.shortName);
if (dependency == null) {
if (dependency == null || !dependency.isActive()) {
missingDependencies.add(d.toString());
} else {
if (dependency.isActive()) {
@@ -173,6 +173,12 @@ Behaviour.specify("#filter-box", '_table', 0, function(e) {

function setEnableWidgetStates() {
for (var i = 0; i < pluginTRs.length; i++) {
var pluginMetadata = pluginTRs[i].jenkinsPluginMetadata;
if (pluginTRs[i].hasClassName('has-dependants-but-disabled')) {
if (pluginMetadata.enableInput.checked) {
pluginTRs[i].removeClassName('has-dependants-but-disabled');
}
}
markAllDependantsDisabled(pluginTRs[i]);
markHasDisabledDependencies(pluginTRs[i]);
}
@@ -68,7 +68,7 @@ THE SOFTWARE.
<th width="1">${%Uninstall}</th>
</tr>
<j:forEach var="p" items="${app.pluginManager.plugins}">
<tr class="plugin ${p.hasDependants()?'has-dependants':''} ${p.isDeleted()?'deleted':''}" data-plugin-id="${p.shortName}" data-plugin-name="${p.displayName}">
<tr class="plugin ${p.hasDependants()?'has-dependants':''} ${(p.hasDependants() &amp;&amp; !p.enabled)?'has-dependants-but-disabled':''} ${p.isDeleted()?'deleted':''}" data-plugin-id="${p.shortName}" data-plugin-name="${p.displayName}">
<j:set var="state" value="${p.enabled?'true':null}"/>
<td class="center pane enable" data="${state}">
<input type="checkbox" checked="${state}" onclick="flip(event)"
@@ -1349,6 +1349,12 @@ TABLE.fingerprint-in-build TD {
opacity: 0.2;
}

#plugins tr.has-dependants-but-disabled .enable input {
pointer-events: auto;
opacity: 1.0;
visibility: visible;
}

#plugins tr.has-disabled-dependency .enable input {
opacity: 0.4;
}

0 comments on commit 2833569

Please sign in to comment.