fix: align tool module handling with dap-was naming
All checks were successful
Deploy to OCIWP / deploy (push) Successful in 1m55s

This commit is contained in:
jade
2026-08-05 13:44:35 +09:00
parent ae8cc38bcf
commit 3a86a8e0c7
9 changed files with 242 additions and 563 deletions

View File

@@ -35,9 +35,9 @@ public class ScaffoldingController {
public String scaffoldPod(@RequestBody Map<String, String> req) {
try {
String moduleName = req.getOrDefault("moduleName", "dap-was-oth");
if (!moduleName.startsWith("dap-tool-")) moduleName = "dap-tool-" + moduleName;
if (!moduleName.startsWith("dap-was-")) moduleName = "dap-was-" + moduleName;
String port = req.getOrDefault("port", "8085");
String shortName = moduleName.replace("dap-tool-", "").replace("-", "");
String shortName = moduleName.replace("dap-was-", "").replace("-", "");
String author = req.get("author");
if (author == null || author.trim().isEmpty()) author = System.getProperty("user.name");
String date = req.get("date");
@@ -94,15 +94,15 @@ public class ScaffoldingController {
if (sourceDir == null) sourceDir = System.getProperty("user.dir");
File dir = new File(sourceDir);
File[] files = dir.listFiles(f -> f.isDirectory() && f.getName().startsWith("dap-tool-") && !f.getName().equals("dap-was-lib"));
File[] files = dir.listFiles(f -> f.isDirectory() && f.getName().startsWith("dap-was-") && !f.getName().equals("dap-was-lib"));
if (files == null || files.length == 0) {
return List.of("dap-was-oth", "dap-tool-hr", "dap-was-sms");
return List.of("dap-was-oth", "dap-was-hr", "dap-was-sms");
}
return Arrays.stream(files).map(File::getName).sorted().collect(Collectors.toList());
} catch (Exception e) {
return List.of("dap-was-oth", "dap-tool-hr", "dap-was-sms");
return List.of("dap-was-oth", "dap-was-hr", "dap-was-sms");
}
}
}

View File

@@ -488,9 +488,9 @@
<div class="col-md-6">
<label class="form-label">Target Module</label>
<select class="form-select" name="moduleName" id="targetModuleSelect" required>
<option value="dap-tool-oth">dap-tool-oth</option>
<option value="dap-tool-hr">dap-tool-hr</option>
<option value="dap-tool-sms">dap-tool-sms</option>
<option value="dap-was-oth">dap-was-oth</option>
<option value="dap-was-hr">dap-was-hr</option>
<option value="dap-was-sms">dap-was-sms</option>
</select>
<div class="input-hint">Destination Pod directory.</div>
</div>
@@ -665,7 +665,7 @@
.then(modules => {
const select = document.getElementById('targetModuleSelect');
if (modules && modules.length > 0) {
select.innerHTML = modules.map(m => `<option value="${m}" ${m === 'dap-tool-oth' ? 'selected' : ''}>${m}</option>`).join('');
select.innerHTML = modules.map(m => `<option value="${m}" ${m === 'dap-was-oth' ? 'selected' : ''}>${m}</option>`).join('');
}
})
.catch(err => console.error('Failed to load modules:', err));