Skip to content
Permalink
Browse files
[JENKINS-32340] Enable disabled dependencies
(cherry picked from commit 2833569)
  • Loading branch information
fbelzunc authored and olivergondza committed May 25, 2016
1 parent 68a88a1 commit 1c416b89edf733962147b2eb45a4ce8824dc454e
@@ -531,7 +531,8 @@ public boolean hasLicensesXml() {
List<String> missingDependencies = new ArrayList<String>();
// make sure dependencies exist
for (Dependency d : dependencies) {
if (parent.getPlugin(d.shortName) == null)
PluginWrapper dependency = parent.getPlugin(d.shortName);
if (dependency == null || !dependency.isActive()) {
missingDependencies.add(d.toString());
}
if (!missingDependencies.isEmpty())
@@ -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 1c416b8

Please sign in to comment.