mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 00:45:44 +01:00
First step to make name and namespace editable in migration
This commit is contained in:
@@ -19,6 +19,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
@@ -65,8 +66,13 @@ class MigrationWizardServlet extends HttpServlet {
|
||||
protected void doPost(HttpServletRequest req, HttpServletResponse resp) {
|
||||
resp.setStatus(200);
|
||||
|
||||
req.getParameterMap().forEach(
|
||||
(name, strategy) -> migrationStrategyDao.set(name, MigrationStrategy.valueOf(strategy[0]))
|
||||
Arrays.stream(req.getParameterValues("ids")).forEach(
|
||||
id -> {
|
||||
String strategy = req.getParameter("strategy-" + id);
|
||||
String namespace = req.getParameter("namespace-" + id);
|
||||
String name = req.getParameter("name-" + id);
|
||||
migrationStrategyDao.set(id, MigrationStrategy.valueOf(strategy), namespace, name);
|
||||
}
|
||||
);
|
||||
|
||||
MustacheFactory mf = new DefaultMustacheFactory();
|
||||
|
||||
Reference in New Issue
Block a user