diff --git a/src/src/main/java/com/my/graphiteDigesterBg/diframe/DiTestcaseManager.java b/src/src/main/java/com/my/graphiteDigesterBg/diframe/DiTestcaseManager.java index 2baffe8..64ec644 100644 --- a/src/src/main/java/com/my/graphiteDigesterBg/diframe/DiTestcaseManager.java +++ b/src/src/main/java/com/my/graphiteDigesterBg/diframe/DiTestcaseManager.java @@ -5,6 +5,7 @@ import org.slf4j.LoggerFactory; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -14,12 +15,25 @@ public class DiTestcaseManager { // device private final DiDevice device; // testcase classes - private final Map testcasees; + private final Map testcases; // constructor public DiTestcaseManager(DiDevice device) { this.device = device; - this.testcasees = new HashMap<>(); + this.testcases = new HashMap<>(); + } + + // list + public List> list() { + var list = new ArrayList>(); + for ( var entry : this.testcases.entrySet() ) { + var info = new HashMap(); + info.put("name", entry.getKey()); + info.put("title", entry.getValue().title); + info.put("description", entry.getValue().description); + list.add(info); + } + return list; } // setup @@ -37,7 +51,7 @@ public class DiTestcaseManager { info.title = testcaseAnnotation.title(); info.description = testcaseAnnotation.description(); info.clazz = testClass; - this.testcasees.put(testcaseAnnotation.name(), info); + this.testcases.put(testcaseAnnotation.name(), info); LOG.info("(Testcase) {} => {}", testcaseAnnotation.name(), testClass.getName()); } } @@ -47,7 +61,7 @@ public class DiTestcaseManager { // execute testcase by name public void execute( String name ) { - var info = this.testcasees.get(name); + var info = this.testcases.get(name); if ( info == null ) { throw new RuntimeException("Testcase not found: " + name); } diff --git a/src/web/src/pages/main/Page.vue b/src/web/src/pages/main/Page.vue index c478e7a..bb0328e 100644 --- a/src/web/src/pages/main/Page.vue +++ b/src/web/src/pages/main/Page.vue @@ -32,6 +32,7 @@ +
@@ -68,9 +69,9 @@ import ContentHistory from './contents/History.vue' import ContentTaskStepManagement from './contents/TaskStepManagement.vue' import ContentAcidManagement from './contents/AcidManagement.vue' import ContentTest from './contents/Test.vue' +import ContentTask from './contents/Task.vue' import ApiClient from '@/utils/ApiClient'; import Loading from '@/components/Loading.vue' -import Common from '@/utils/Common.js' /** @var {AppStore} */ const appStore = useAppStore(); /** @var {Ref} */ @@ -83,6 +84,7 @@ const contents = [ {key:'acid', title: '酸液管理',icon:'experiment'}, {key:'user', title: '用户管理',icon:'user'}, {key:'test', title: '功能测试',icon:'issues-close'}, + {key:'task', title: '任务状态',icon:'code'}, ]; /** @var {Loading} */ const loadingModal = ref(null); diff --git a/src/web/src/pages/main/contents/Task.vue b/src/web/src/pages/main/contents/Task.vue new file mode 100644 index 0000000..7c62615 --- /dev/null +++ b/src/web/src/pages/main/contents/Task.vue @@ -0,0 +1,78 @@ + + \ No newline at end of file diff --git a/src/web/src/pages/main/contents/Test.vue b/src/web/src/pages/main/contents/Test.vue index 56612c3..9d6eb51 100644 --- a/src/web/src/pages/main/contents/Test.vue +++ b/src/web/src/pages/main/contents/Test.vue @@ -1,33 +1,87 @@ \ No newline at end of file diff --git a/src/web/src/pages/main/contents/TestActuatorExecute.vue b/src/web/src/pages/main/contents/TestActuatorExecute.vue new file mode 100644 index 0000000..afeae8e --- /dev/null +++ b/src/web/src/pages/main/contents/TestActuatorExecute.vue @@ -0,0 +1,44 @@ + + \ No newline at end of file