mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-28 20:15:22 +00:00
Display a warning in the Installed tab if the admin is about to disable or uninstall a detached plugin (#4098)
* Display a warning in the Installed tab if the admin is about to disable or uninstall a detached plugin. * @since Co-Authored-By: Oleg Nenashev <o.v.nenashev@gmail.com>
This commit is contained in:
1 parent
d37bcb54d9
commit
2bfded176c
4 files changed
+27
-1
No files matched your search
@@ -84,6 +84,7 @@ import static hudson.PluginWrapper.PluginDisableStatus.ERROR_DISABLING;
|
||||
import static hudson.PluginWrapper.PluginDisableStatus.NOT_DISABLED_DEPENDANTS;
|
||||
import static hudson.PluginWrapper.PluginDisableStatus.NO_SUCH_PLUGIN;
|
||||
import static java.util.logging.Level.WARNING;
|
||||
import jenkins.plugins.DetachedPluginsUtil;
|
||||
import static org.apache.commons.io.FilenameUtils.getBaseName;
|
||||
|
||||
/**
|
||||
@@ -999,6 +1000,15 @@ public class PluginWrapper implements Comparable<PluginWrapper>, ModelObject {
|
||||
return !archive.exists();
|
||||
}
|
||||
|
||||
/**
|
||||
* Same as {@link DetachedPluginsUtil#isDetachedPlugin}.
|
||||
* @since TODO
|
||||
*/
|
||||
@Exported
|
||||
public boolean isDetached() {
|
||||
return DetachedPluginsUtil.isDetachedPlugin(shortName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sort by short name.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user