mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-12 08:25:50 +01:00
list installed plugins in the system administration menu
This commit is contained in:
@@ -32,6 +32,7 @@ class ScalatraBootstrap extends LifeCycle {
|
|||||||
context.mount(new DashboardController, "/*")
|
context.mount(new DashboardController, "/*")
|
||||||
context.mount(new UserManagementController, "/*")
|
context.mount(new UserManagementController, "/*")
|
||||||
context.mount(new SystemSettingsController, "/*")
|
context.mount(new SystemSettingsController, "/*")
|
||||||
|
context.mount(new PluginsController, "/*")
|
||||||
context.mount(new AccountController, "/*")
|
context.mount(new AccountController, "/*")
|
||||||
context.mount(new RepositoryViewerController, "/*")
|
context.mount(new RepositoryViewerController, "/*")
|
||||||
context.mount(new WikiController, "/*")
|
context.mount(new WikiController, "/*")
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package gitbucket.core.controller
|
||||||
|
|
||||||
|
import gitbucket.core.admin.plugins.html
|
||||||
|
import gitbucket.core.plugin.PluginRegistry
|
||||||
|
import gitbucket.core.util.AdminAuthenticator
|
||||||
|
|
||||||
|
class PluginsController extends ControllerBase with AdminAuthenticator {
|
||||||
|
get("/admin/plugins")(adminOnly {
|
||||||
|
html.plugins(PluginRegistry().getPlugins())
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -11,6 +11,9 @@
|
|||||||
<li@if(active=="system"){ class="active"}>
|
<li@if(active=="system"){ class="active"}>
|
||||||
<a href="@path/admin/system">System Settings</a>
|
<a href="@path/admin/system">System Settings</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li@if(active=="plugins"){ class="active"}>
|
||||||
|
<a href="@path/admin/plugins">Plugins</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="@path/console/login.jsp">H2 Console</a>
|
<a href="@path/console/login.jsp">H2 Console</a>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
@(plugins: List[gitbucket.core.plugin.PluginInfo])(implicit context: gitbucket.core.controller.Context)
|
||||||
|
@import context._
|
||||||
|
@import gitbucket.core.view.helpers._
|
||||||
|
@html.main("Plugins"){
|
||||||
|
@admin.html.menu("plugins") {
|
||||||
|
<h1>Installed plugins</h1>
|
||||||
|
<ul>
|
||||||
|
@plugins.map {plugin =>
|
||||||
|
<li><a href="#@plugin.pluginId">@plugin.pluginId:@plugin.version</a></li>
|
||||||
|
}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
@plugins.map {plugin =>
|
||||||
|
<div class="box">
|
||||||
|
<div class="box-header">@plugin.pluginName</div>
|
||||||
|
<div class="box-content">
|
||||||
|
<p><span class="strong">Id: </span>@plugin.pluginId</p>
|
||||||
|
<p><span class="strong">Version: </span>@plugin.version</p>
|
||||||
|
<p><span class="strong">Name: </span>@plugin.pluginName</p>
|
||||||
|
<p class="muted">@plugin.description</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user