From d91c6009256f2128dfa0e9fdc4c9564aa99505f7 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sun, 31 Dec 2023 13:27:06 +0000 Subject: [PATCH] pipeline fix --- exampleYmlFiles/docker-compose-latest-lite-security.yml | 2 +- exampleYmlFiles/docker-compose-latest-lite.yml | 2 +- exampleYmlFiles/docker-compose-latest-security.yml | 2 +- exampleYmlFiles/docker-compose-latest.yml | 2 +- .../software/SPDF/controller/web/GeneralWebController.java | 7 +++++++ 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/exampleYmlFiles/docker-compose-latest-lite-security.yml b/exampleYmlFiles/docker-compose-latest-lite-security.yml index cb82fdb0..607931c5 100644 --- a/exampleYmlFiles/docker-compose-latest-lite-security.yml +++ b/exampleYmlFiles/docker-compose-latest-lite-security.yml @@ -6,7 +6,7 @@ services: deploy: resources: limits: - memory: 1G + memory: 2G healthcheck: test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/info/status | grep -q 'UP' && curl -fL http://localhost:8080/ | grep -q 'Please sign in'"] interval: 5s diff --git a/exampleYmlFiles/docker-compose-latest-lite.yml b/exampleYmlFiles/docker-compose-latest-lite.yml index 920ae8d8..a1d7cac0 100644 --- a/exampleYmlFiles/docker-compose-latest-lite.yml +++ b/exampleYmlFiles/docker-compose-latest-lite.yml @@ -6,7 +6,7 @@ services: deploy: resources: limits: - memory: 1G + memory: 2G healthcheck: test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/info/status | grep -q 'UP' && curl -fL http://localhost:8080/ | grep -qv 'Please sign in'"] interval: 5s diff --git a/exampleYmlFiles/docker-compose-latest-security.yml b/exampleYmlFiles/docker-compose-latest-security.yml index a480c27d..8e5fb29b 100644 --- a/exampleYmlFiles/docker-compose-latest-security.yml +++ b/exampleYmlFiles/docker-compose-latest-security.yml @@ -6,7 +6,7 @@ services: deploy: resources: limits: - memory: 1G + memory: 4G healthcheck: test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/info/status | grep -q 'UP' && curl -fL http://localhost:8080/ | grep -q 'Please sign in'"] interval: 5s diff --git a/exampleYmlFiles/docker-compose-latest.yml b/exampleYmlFiles/docker-compose-latest.yml index 21fff579..22ea3074 100644 --- a/exampleYmlFiles/docker-compose-latest.yml +++ b/exampleYmlFiles/docker-compose-latest.yml @@ -6,7 +6,7 @@ services: deploy: resources: limits: - memory: 1G + memory: 4G healthcheck: test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/info/status | grep -q 'UP' && curl -fL http://localhost:8080/ | grep -qv 'Please sign in'"] interval: 5s diff --git a/src/main/java/stirling/software/SPDF/controller/web/GeneralWebController.java b/src/main/java/stirling/software/SPDF/controller/web/GeneralWebController.java index b670a129..073e5b64 100644 --- a/src/main/java/stirling/software/SPDF/controller/web/GeneralWebController.java +++ b/src/main/java/stirling/software/SPDF/controller/web/GeneralWebController.java @@ -60,7 +60,14 @@ public class GeneralWebController { Map jsonContent = new ObjectMapper().readValue(config, new TypeReference>(){}); String name = (String) jsonContent.get("name"); + if(name == null || name.length() < 1) { + String filename = jsonFiles.get(pipelineConfigs.indexOf(config)).getFileName().toString(); + name = filename.substring(0, filename.lastIndexOf('.')); + } Map configWithName = new HashMap<>(); + System.out.println("json" + config); + + System.out.println("name" + name); configWithName.put("json", config); configWithName.put("name", name); pipelineConfigsWithNames.add(configWithName);