#2229 minor fixes
This commit is contained in:
parent
0001a8e909
commit
9c67e4a43d
2 changed files with 11 additions and 9 deletions
|
@ -119,9 +119,16 @@ public class AdminPluginAction extends FessAdminAction {
|
|||
@Execute
|
||||
public HtmlResponse installplugin() {
|
||||
saveToken();
|
||||
return asHtml(path_AdminPlugin_AdminPluginInstallpluginJsp).renderWith(
|
||||
data -> RenderDataUtil.register(data, "availableArtifactItems", getAllAvailableArtifacts())).useForm(InstallForm.class,
|
||||
op -> op.setup(form -> {}));
|
||||
return asHtml(path_AdminPlugin_AdminPluginInstallpluginJsp).renderWith(data -> {
|
||||
final List<Map<String, String>> result = new ArrayList<>();
|
||||
final Map<String, String> map = new HashMap<>();
|
||||
map.put("id", UPLOAD);
|
||||
map.put("name", "");
|
||||
map.put("version", "");
|
||||
result.add(map);
|
||||
result.addAll(getAllAvailableArtifacts());
|
||||
RenderDataUtil.register(data, "availableArtifactItems", result);
|
||||
}).useForm(InstallForm.class, op -> op.setup(form -> {}));
|
||||
}
|
||||
|
||||
private HtmlResponse asListHtml() {
|
||||
|
@ -132,11 +139,6 @@ public class AdminPluginAction extends FessAdminAction {
|
|||
public static List<Map<String, String>> getAllAvailableArtifacts() {
|
||||
final PluginHelper pluginHelper = ComponentUtil.getPluginHelper();
|
||||
final List<Map<String, String>> result = new ArrayList<>();
|
||||
final Map<String, String> map = new HashMap<>();
|
||||
map.put("id", UPLOAD);
|
||||
map.put("name", "");
|
||||
map.put("version", "");
|
||||
result.add(map);
|
||||
for (final PluginHelper.ArtifactType artifactType : PluginHelper.ArtifactType.values()) {
|
||||
result.addAll(Arrays.stream(pluginHelper.getAvailableArtifacts(artifactType)).map(AdminPluginAction::beanToMap)
|
||||
.collect(Collectors.toList()));
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
<div role="tabpanel" class="tab-pane" id="local">
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-md-2 control-label"><la:message key="labels.plugin_jar_file" /></label>
|
||||
<label for="name" class="col-md-3 control-label"><la:message key="labels.plugin_jar_file" /></label>
|
||||
<div>
|
||||
<input type="file" name="jarFile" />
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue