提交 871abe5f 编写于 作者: K Kohsuke Kawaguchi

this message should only appear when a restart is actually needed to activate a new plugin

上级 82c92332
......@@ -157,21 +157,6 @@ public class UpdateCenter extends AbstractModelObject implements Saveable, OnMas
configure(new UpdateCenterConfiguration());
}
/**
* If any of the executed {@link UpdateCenterJob}s requires a restart
* to take effect, this method returns true.
*
* <p>
* This doesn't necessarily mean the user has scheduled or initiated
* the restart operation.
*
* @see #isRestartScheduled()
*/
@Exported
public boolean isRestartRequiredForCompletion() {
return requiresRestart;
}
public Api getApi() {
return new Api(this);
}
......@@ -399,7 +384,22 @@ public class UpdateCenter extends AbstractModelObject implements Saveable, OnMas
}
response.sendRedirect2(".");
}
/**
* If any of the executed {@link UpdateCenterJob}s requires a restart
* to take effect, this method returns true.
*
* <p>
* This doesn't necessarily mean the user has scheduled or initiated
* the restart operation.
*
* @see #isRestartScheduled()
*/
@Exported
public boolean isRestartRequiredForCompletion() {
return requiresRestart;
}
/**
* Checks if the restart operation is scheduled
* (which means in near future Jenkins will restart by itself)
......
......@@ -149,7 +149,7 @@ THE SOFTWARE.
return String(e.checked)!=e.getAttribute('original');
});
<j:if test="${it.isPluginUploaded()}">
<j:if test="${app.updateCenter.isRestartRequiredForCompletion()}">
e = true;
</j:if>
$('needRestart').style.display = (e!=null?"block":"none");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册