From bc164c3ecea795796bd89e164e9c5fcdfa1c514f Mon Sep 17 00:00:00 2001 From: daisyonly <1241945585@qq.com> Date: Tue, 9 Sep 2014 09:48:13 +0800 Subject: [PATCH 1/3] return to the incomplete input when submit script return to the incomplete input when submit script --- .../webapp/script/scriptManager/behavior.js | 4 ++ .../scriptManager/contentVerification.js | 38 +++++++++++++++---- .../script/scriptManager/createScript.js | 7 ++-- .../script/scriptManager/scriptEditor.js | 2 +- .../webapp/script/scriptManager/usePlugin.js | 9 +++++ 5 files changed, 49 insertions(+), 11 deletions(-) diff --git a/Bench4Q-Web/src/main/webapp/script/scriptManager/behavior.js b/Bench4Q-Web/src/main/webapp/script/scriptManager/behavior.js index 13b3950c..9ef1a00e 100644 --- a/Bench4Q-Web/src/main/webapp/script/scriptManager/behavior.js +++ b/Bench4Q-Web/src/main/webapp/script/scriptManager/behavior.js @@ -325,6 +325,10 @@ function Behavior(usePlugin, containerId) { "behavior_usePlugin", "batch")); } + + this.getBehaviorEditorMap = function(){ + return behaviorEditorMap; + } this.getPages = function() { updateBehaviorEditors(); diff --git a/Bench4Q-Web/src/main/webapp/script/scriptManager/contentVerification.js b/Bench4Q-Web/src/main/webapp/script/scriptManager/contentVerification.js index 3f2f7b85..c083fe5e 100644 --- a/Bench4Q-Web/src/main/webapp/script/scriptManager/contentVerification.js +++ b/Bench4Q-Web/src/main/webapp/script/scriptManager/contentVerification.js @@ -16,24 +16,48 @@ $(function() { }); }); -function checkPluginsInput(plugins) { +function checkPluginsInput(plugins, usePlugin) { + for (var i = 0; i < plugins.length; i++){ for (var j = 0; j < plugins[i].parameters.length; j++){ - if (plugins[i].parameters[j].check =="false") - return false; + if (plugins[i].parameters[j].check =="false"){ + $("#tabs").tabs("option", "active", 0 ); + + var usePluginEditorMap = usePlugin.getUsePluginEditorMap(); + $("#pluginEditor").append(usePluginEditorMap.get(plugins[i].id)); + var inputs = $("#"+ plugins[i].parameters[j].key + " input"); + for (var p = 0; p < inputs.length; p++){ + if ($(inputs[p]).val() == ""){ + $(inputs[p]).focus(); + break; + } + } + return false; + } } } return true; } -function checkPagesInput(pages) { +function checkPagesInput(pages, usePlugin) { + for (var i = 0;i < pages.length; i++){ for (var j = 0; j < pages[i].batches.length; j++){ for (var k = 0; k < pages[i].batches[j].behaviors.length; k++){ for (var q = 0; q < pages[i].batches[j].behaviors[k].parameters.length; q++){ - if (pages[i].batches[j].behaviors[k].parameters[q].check == "false"){ - return false; - } + if (pages[i].batches[j].behaviors[k].parameters[q].check =="false"){ + $("#tabs").tabs("option", "active", 1 ); + var behaviorEditorMap = usePlugin.getBehaviorEditorMap(); + $("#behaviorEditor").append(behaviorEditorMap.get(pages[i].batches[j].behaviors[k].id)); + var inputs = $("#"+ pages[i].batches[j].behaviors[k].parameters[q].key + " input"); + for (var p = 0; p < inputs.length; p++){ + if ($(inputs[p]).val() == ""){ + $(inputs[p]).focus(); + break; + } + } + return false; + } } } diff --git a/Bench4Q-Web/src/main/webapp/script/scriptManager/createScript.js b/Bench4Q-Web/src/main/webapp/script/scriptManager/createScript.js index b07a4ca9..4ceefa21 100644 --- a/Bench4Q-Web/src/main/webapp/script/scriptManager/createScript.js +++ b/Bench4Q-Web/src/main/webapp/script/scriptManager/createScript.js @@ -5,11 +5,12 @@ $(function() { $("#submitScript").click(function() { var formData = new FormData(); - var plugins = usePlugin.getPlugins( formData ); + var plugins = usePlugin.getPlugins(formData); var pages = usePlugin.getPages(); - if(checkPluginsInput(plugins) && checkPagesInput(pages)) + if(checkPluginsInput(plugins, usePlugin) && checkPagesInput(pages, usePlugin)) submitScript(pages, plugins, formData); - else + else{ information("Please complete the required parameters."); + } }); }); diff --git a/Bench4Q-Web/src/main/webapp/script/scriptManager/scriptEditor.js b/Bench4Q-Web/src/main/webapp/script/scriptManager/scriptEditor.js index 40e05caf..22c149ef 100644 --- a/Bench4Q-Web/src/main/webapp/script/scriptManager/scriptEditor.js +++ b/Bench4Q-Web/src/main/webapp/script/scriptManager/scriptEditor.js @@ -39,7 +39,7 @@ $(function() { var formData = new FormData(); var plugins = usePlugin.getPlugins(formData); var pages = usePlugin.getPages(); - if(checkPluginsInput(plugins) && checkPagesInput(pages)) + if(checkPluginsInput(plugins, usePlugin) && checkPagesInput(pages, usePlugin)) updateScript(scriptId,pages,plugins,formData); else information("Please complete the required parameters."); diff --git a/Bench4Q-Web/src/main/webapp/script/scriptManager/usePlugin.js b/Bench4Q-Web/src/main/webapp/script/scriptManager/usePlugin.js index 89d37f63..7ca6f3a5 100644 --- a/Bench4Q-Web/src/main/webapp/script/scriptManager/usePlugin.js +++ b/Bench4Q-Web/src/main/webapp/script/scriptManager/usePlugin.js @@ -85,6 +85,11 @@ function UsePlugin(behaviorListContainerId) { }); }); + + this.getUsePluginEditorMap = function() { + return usePluginEditorMap; + } + function getPluginList() { var usePlugin = this; $.post("loadPluginName", {}, function(data) { @@ -197,6 +202,10 @@ function UsePlugin(behaviorListContainerId) { return behavior.getPages(); } + this.getBehaviorEditorMap = function(){ + return behavior.getBehaviorEditorMap(); + } + this.initPluginAndPages = function(scriptObj){ initPluginList(scriptObj.usePlugins); behavior.initBehaviorList(scriptObj.pages); From 836a4102dbbec714ad4175cc64234550b226d298 Mon Sep 17 00:00:00 2001 From: coderfengyun Date: Tue, 9 Sep 2014 10:04:22 +0800 Subject: [PATCH 2/3] add test for ratio take effect add test for ratio take effect --- .../java/org/bench4q/agent/test/Solution.java | 3 ++- .../master/domain/entity/RunningAgentDB.java | 17 ++++++++++++++--- .../schedulscript/WarmUpOverTask.java | 13 ------------- .../unitTest/entity/Test_RunningAgent.java | 19 +++++++++++++++++++ .../agent/scriptrecord/ScheduleModel.java | 10 ++++++++++ 5 files changed, 45 insertions(+), 17 deletions(-) delete mode 100644 Bench4Q-Master/src/main/java/org/bench4q/master/domain/valueobject/schedulscript/WarmUpOverTask.java diff --git a/Bench4Q-Agent/src/test/java/org/bench4q/agent/test/Solution.java b/Bench4Q-Agent/src/test/java/org/bench4q/agent/test/Solution.java index 16010684..0d2110b1 100644 --- a/Bench4Q-Agent/src/test/java/org/bench4q/agent/test/Solution.java +++ b/Bench4Q-Agent/src/test/java/org/bench4q/agent/test/Solution.java @@ -70,6 +70,7 @@ public class Solution { new int[] { 1, 2, 2 })); } + @Test public void test1() { - } + } } \ No newline at end of file diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/entity/RunningAgentDB.java b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/entity/RunningAgentDB.java index dcecbc76..10aab285 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/entity/RunningAgentDB.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/entity/RunningAgentDB.java @@ -183,9 +183,7 @@ public class RunningAgentDB implements RunningAgentInterface { .tryUnmarshal(RunScenarioModel.class, this.getTestPlanScript() .getFilteredScriptCnt()); runScenarioModel.setPoolSize(getLoadInUse()); - ScheduleModel scheduleModel = (ScheduleModel) MarshalHelper - .tryUnmarshal(ScheduleModel.class, this.getTestPlanScript() - .getScheduleContent()); + ScheduleModel scheduleModel = generateScheduleModelWithRatio(); RunScenarioResultModel runScenarioResultModel = this .getAgentMessenger().submitScenrioWithParams(this.getAgent(), this.getAgentRunId(), script2.loadParamFiles(), @@ -197,6 +195,19 @@ public class RunningAgentDB implements RunningAgentInterface { return true; } + private ScheduleModel generateScheduleModelWithRatio() { + ScheduleModel scheduleModel = (ScheduleModel) MarshalHelper + .tryUnmarshal(ScheduleModel.class, this.getTestPlanScript() + .getScheduleContent()); + int totolRequireLoad = this.getTestPlanScript().getRequireLoad(); + if (totolRequireLoad <= 0) { + throw new IllegalArgumentException( + "The require load can't be less than 0!!"); + } + double ratio = (double) this.getLoadInUse() / (double) totolRequireLoad; + return scheduleModel.ratioIntoEffect(ratio); + } + /** * * @return diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/valueobject/schedulscript/WarmUpOverTask.java b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/valueobject/schedulscript/WarmUpOverTask.java deleted file mode 100644 index 1a36552f..00000000 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/valueobject/schedulscript/WarmUpOverTask.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.bench4q.master.domain.valueobject.schedulscript; - -import java.util.TimerTask; - -public class WarmUpOverTask extends TimerTask { - public WarmUpOverTask() { - } - - @Override - public void run() { - System.out.println("warm up over and start to execute!"); - } -} diff --git a/Bench4Q-Master/src/test/java/org/bench4q/master/unitTest/entity/Test_RunningAgent.java b/Bench4Q-Master/src/test/java/org/bench4q/master/unitTest/entity/Test_RunningAgent.java index d0b9608a..04a8da9f 100644 --- a/Bench4Q-Master/src/test/java/org/bench4q/master/unitTest/entity/Test_RunningAgent.java +++ b/Bench4Q-Master/src/test/java/org/bench4q/master/unitTest/entity/Test_RunningAgent.java @@ -3,6 +3,7 @@ package org.bench4q.master.unitTest.entity; import static org.junit.Assert.*; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.UUID; @@ -16,6 +17,7 @@ import org.bench4q.master.domain.valueobject.transaction.TransactionFactory; import org.bench4q.master.domain.valueobject.transaction.impl.ScriptLoadApplication; import org.bench4q.master.unitTest.TestBase_MakeUpTestPlan; import org.bench4q.share.enums.master.TestPlanStatus; +import org.bench4q.share.models.agent.scriptrecord.ScheduleModel; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -144,4 +146,21 @@ public class Test_RunningAgent extends TestBase_MakeUpTestPlan { assertTrue(runningAgentDB.stop()); assertTrue(runningAgentDB.stop()); } + + @Test + public void test_RatioIntoEffectWithRatioHalf() { + ScheduleModel scheduleModel = new ScheduleModel(); + double ratio = 0.5; + scheduleModel.getPoints().addAll( + Arrays.asList(new ScheduleModel.PointModel(0, 0), + new ScheduleModel.PointModel(30, 100))); + ScheduleModel target = scheduleModel.ratioIntoEffect(0.5); + for (int i = 0; i < scheduleModel.getPoints().size(); i++) { + assertEquals(target.getPoints().get(i).getTimeInSecond(), + scheduleModel.getPoints().get(i).getTimeInSecond()); + assertEquals( + (int) (scheduleModel.getPoints().get(i).getLoad() * ratio), + target.getPoints().get(i).getLoad()); + } + } } diff --git a/Bench4Q-Share/src/main/java/org/bench4q/share/models/agent/scriptrecord/ScheduleModel.java b/Bench4Q-Share/src/main/java/org/bench4q/share/models/agent/scriptrecord/ScheduleModel.java index 2b5e6c56..fe68a108 100644 --- a/Bench4Q-Share/src/main/java/org/bench4q/share/models/agent/scriptrecord/ScheduleModel.java +++ b/Bench4Q-Share/src/main/java/org/bench4q/share/models/agent/scriptrecord/ScheduleModel.java @@ -23,6 +23,16 @@ public class ScheduleModel { this.points = new LinkedList(); } + public ScheduleModel ratioIntoEffect(double ratio) { + ScheduleModel result = new ScheduleModel(); + for (PointModel old : this.getPoints()) { + result.getPoints().add( + new PointModel(old.getTimeInSecond(), + (int) (old.getLoad() * ratio))); + } + return result; + } + public long getExecuteRange() { if (this.points.size() == 0) { return 0; From 23709d0a94ba898dad4397371c78929baa691432 Mon Sep 17 00:00:00 2001 From: luqiong <605601787@qq.com> Date: Tue, 9 Sep 2014 10:18:16 +0800 Subject: [PATCH 3/3] remove all overrides remove all overrides --- .../master/domain/entity/RunningAgentDB.java | 2 -- .../master/domain/entity/TestPlanScript.java | 1 - .../master/domain/service/TestPlanEngine.java | 1 - .../transaction/impl/TestPlanLoadApplication.java | 2 -- .../communication/impl/AgentMessengerImpl.java | 8 ++------ .../highavailable/impl/HighAvailablePoolImpl.java | 1 - .../src/test/java/stubs/HighAvailableImpl.java | 13 ------------- .../src/test/java/stubs/Mock_AgentMessenger.java | 14 +++++++------- .../src/test/java/stubs/Mock_MonitorMessenger.java | 6 ------ Bench4Q-Web/src/main/webapp/script.jsp | 1 + 10 files changed, 10 insertions(+), 39 deletions(-) diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/entity/RunningAgentDB.java b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/entity/RunningAgentDB.java index 10aab285..58008f33 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/entity/RunningAgentDB.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/entity/RunningAgentDB.java @@ -163,7 +163,6 @@ public class RunningAgentDB implements RunningAgentInterface { return this.getTestPlanScript(); } - @Override public RunningAgentInterface completeWithRunningScript( RunningScriptInterface runningScript) { this.setTestPlanScript((TestPlanScript) runningScript); @@ -241,7 +240,6 @@ public class RunningAgentDB implements RunningAgentInterface { this.setHasSubstitute(true); } - @Override public TestBriefStatusModel briefAll() { if (this.isStoped()) { return null; diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/entity/TestPlanScript.java b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/entity/TestPlanScript.java index 6749f174..7770f532 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/entity/TestPlanScript.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/entity/TestPlanScript.java @@ -305,7 +305,6 @@ public class TestPlanScript implements RunningScriptInterface { return true; } - @Override @Transient public Date getStartTime() { return this.getTestPlan().getCurrentStartTime(); diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/service/TestPlanEngine.java b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/service/TestPlanEngine.java index f4e00149..6f5d589b 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/service/TestPlanEngine.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/service/TestPlanEngine.java @@ -204,7 +204,6 @@ public class TestPlanEngine implements TaskCompleteCallback, } } - @Override public void executePendingTestPlan() { pickATestPlan(); } diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/valueobject/transaction/impl/TestPlanLoadApplication.java b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/valueobject/transaction/impl/TestPlanLoadApplication.java index 35a6f159..aafcb69c 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/valueobject/transaction/impl/TestPlanLoadApplication.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/valueobject/transaction/impl/TestPlanLoadApplication.java @@ -50,7 +50,6 @@ public class TestPlanLoadApplication implements Transaction { this.getHighAvailableAgentPool().checkAllHeartBeat(); } - @Override public TestPlanStatus execute() throws Exception { synchronized (this.highAvailableAgentPool) { if (!hasEnoughMaxLoad(this.getTestPlan().getRequiredLoad())) { @@ -72,7 +71,6 @@ public class TestPlanLoadApplication implements Transaction { return TestPlanStatus.InRunning; } - @Override public void rollBack() { for (TestPlanScript testPlanScript : this.getTestPlan() .getTestPlanScripts()) { diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/communication/impl/AgentMessengerImpl.java b/Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/communication/impl/AgentMessengerImpl.java index 14bf8eb8..977105d5 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/communication/impl/AgentMessengerImpl.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/communication/impl/AgentMessengerImpl.java @@ -67,7 +67,6 @@ public class AgentMessengerImpl implements AgentMessenger { final int requiredLoad) { return this.executorService .submit(new Callable() { - @Override public RunScenarioResultModel call() throws Exception { return bookTest(agent, requiredLoad); } @@ -105,7 +104,6 @@ public class AgentMessengerImpl implements AgentMessenger { final ScheduleModel scheduleModel, final Date realStartDate) { return this.executorService .submit(new Callable() { - @Override public RunScenarioResultModel call() throws Exception { return submitScenrioWithParams(agent, agentRunId, paramFiles, runScenarioModel, scheduleModel, @@ -139,7 +137,6 @@ public class AgentMessengerImpl implements AgentMessenger { final UUID agentRunId) { return this.executorService .submit(new Callable() { - @Override public RunScenarioResultModel call() throws Exception { return runWithParams(agent, agentRunId); } @@ -175,7 +172,7 @@ public class AgentMessengerImpl implements AgentMessenger { final UUID runId) { return this.executorService .submit(new Callable() { - @Override + public TestBriefStatusModel call() throws Exception { return scriptBriefAll(agent, runId); } @@ -206,7 +203,6 @@ public class AgentMessengerImpl implements AgentMessenger { public Future stopAsync(final Agent agent, final UUID runId) { return this.executorService.submit(new Callable() { - @Override public StopTestModel call() throws Exception { return stop(agent, runId); } @@ -235,7 +231,7 @@ public class AgentMessengerImpl implements AgentMessenger { public Future getStatusAsync(final Agent agent) { return this.executorService.submit(new Callable() { - @Override + public ServerStatusModel call() throws Exception { return getStatus(agent); } diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/highavailable/impl/HighAvailablePoolImpl.java b/Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/highavailable/impl/HighAvailablePoolImpl.java index 6416dd6e..5aa2dd95 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/highavailable/impl/HighAvailablePoolImpl.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/highavailable/impl/HighAvailablePoolImpl.java @@ -337,7 +337,6 @@ public class HighAvailablePoolImpl extends CurrentLoadSubject implements } } - @Override public ServerStatusModel queryAgentStatus(Agent agent) { return this.getAgentMessenger().getStatus(agent); } diff --git a/Bench4Q-Master/src/test/java/stubs/HighAvailableImpl.java b/Bench4Q-Master/src/test/java/stubs/HighAvailableImpl.java index c9210c4d..4ebe41b6 100644 --- a/Bench4Q-Master/src/test/java/stubs/HighAvailableImpl.java +++ b/Bench4Q-Master/src/test/java/stubs/HighAvailableImpl.java @@ -23,12 +23,10 @@ public class HighAvailableImpl implements HighAvailablePool { .put(hostName, Agent.createAgentWithoutId(hostName, 6565, 500)); } - @Override public Map getPool() { return this.pool; } - @Override public Long getMaxAvailableLoad() { Long result = 0L; for (Agent agent : this.pool.values()) { @@ -37,7 +35,6 @@ public class HighAvailableImpl implements HighAvailablePool { return result; } - @Override public int getCurrentAvailableLoad() { int result = 0; for (Agent agent : this.pool.values()) { @@ -46,58 +43,48 @@ public class HighAvailableImpl implements HighAvailablePool { return result; } - @Override public void checkAllHeartBeat() { } - @Override public void checkHeartBeat(Agent agent) { } - @Override public void cleanUpAboutTestPlan( Collection runningScripts) { } - @Override public ServerStatusModel queryAgentStatus(Agent agent) { return null; } - @Override public void add(Agent agent) { // TODO Auto-generated method stub } - @Override public void setObserver(CurrentLoadObserver currentLoadObserver) { // TODO Auto-generated method stub } - @Override public Map getAgentRunBlotters() { // TODO Auto-generated method stub return null; } - @Override public int blotterSize() { // TODO Auto-generated method stub return 0; } - @Override public void remove(Agent agent) { // TODO Auto-generated method stub } - @Override public List applyFor(int load) { // TODO Auto-generated method stub return null; diff --git a/Bench4Q-Master/src/test/java/stubs/Mock_AgentMessenger.java b/Bench4Q-Master/src/test/java/stubs/Mock_AgentMessenger.java index 5d458706..40dc2cd6 100644 --- a/Bench4Q-Master/src/test/java/stubs/Mock_AgentMessenger.java +++ b/Bench4Q-Master/src/test/java/stubs/Mock_AgentMessenger.java @@ -28,12 +28,12 @@ public class Mock_AgentMessenger implements AgentMessenger { private UUID testId = UUID.randomUUID(); - @Override + public RunScenarioResultModel bookTest(Agent agent, int requireLoad) { return new RunScenarioResultModel(this.testId); } - @Override + public RunScenarioResultModel submitScenrioWithParams(Agent agent, UUID agentRunId, List paramFiles, RunScenarioModel runScenarioModel, @@ -41,12 +41,12 @@ public class Mock_AgentMessenger implements AgentMessenger { return new RunScenarioResultModel(this.testId); } - @Override + public RunScenarioResultModel runWithParams(Agent agent, UUID agentRunId) { return new RunScenarioResultModel(this.testId); } - @Override + public TestBriefStatusModel scriptBriefAll(Agent agent, UUID runId) { if (isDead(agent)) { return null; @@ -67,7 +67,7 @@ public class Mock_AgentMessenger implements AgentMessenger { return agent.getCurrentEnumStatus() == AgentStatus.BreakDown; } - @Override + public StopTestModel stop(Agent agent, UUID runId) { // if (runId == this.testId) { // return new StopTestModel(true); @@ -75,7 +75,7 @@ public class Mock_AgentMessenger implements AgentMessenger { return new StopTestModel(true); } - @Override + public ServerStatusModel getStatus(Agent agent) { ServerStatusModel result = new ServerStatusModel(); if (agent.getCurrentEnumStatus() == AgentStatus.InIdle) { @@ -89,7 +89,7 @@ public class Mock_AgentMessenger implements AgentMessenger { return null; } - @Override + public Future getStatusAsync(Agent agent) { return new AsyncResult(getStatus(agent)); } diff --git a/Bench4Q-Master/src/test/java/stubs/Mock_MonitorMessenger.java b/Bench4Q-Master/src/test/java/stubs/Mock_MonitorMessenger.java index 588d3f2e..c1642ebc 100644 --- a/Bench4Q-Master/src/test/java/stubs/Mock_MonitorMessenger.java +++ b/Bench4Q-Master/src/test/java/stubs/Mock_MonitorMessenger.java @@ -14,7 +14,6 @@ import org.springframework.stereotype.Component; @Component public class Mock_MonitorMessenger implements MonitorMessenger { - @Override public MonitorMain monitorModel(String hostName, int port) { MonitorMain result = new MonitorMain(); result.setFinished(false); @@ -27,27 +26,22 @@ public class Mock_MonitorMessenger implements MonitorMessenger { return result; } - @Override public PhysicalDiskModel physicalDisk(String hostName, int port) { return monitorModel(hostName, port).getPhysicalDiskModel(); } - @Override public MemoryModel memory(String hostName, int port) { return monitorModel(hostName, port).getMemoryModel(); } - @Override public ProcessorModel processor(String hostName, int port) { return monitorModel(hostName, port).getProcessorModel(); } - @Override public NetworkInterfaceModel networkInterface(String hostName, int port) { return monitorModel(hostName, port).getNetworkInterfaceModel(); } - @Override public ProcessModel process(String hostName, int port) { return monitorModel(hostName, port).getProcessModel(); } diff --git a/Bench4Q-Web/src/main/webapp/script.jsp b/Bench4Q-Web/src/main/webapp/script.jsp index 00b0f46e..5febc557 100644 --- a/Bench4Q-Web/src/main/webapp/script.jsp +++ b/Bench4Q-Web/src/main/webapp/script.jsp @@ -2,6 +2,7 @@ <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> + <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>