This commit is contained in:
boccioli_m
2015-06-15 10:08:28 +02:00
parent c5fd8beb7d
commit 33f7560921

View File

@@ -69,7 +69,7 @@ public class TestingList extends Panel {
Object ret = eval("ret");
boolean status = (boolean) eval("status");
Object deviceName = eval("DEVICE");
String sStatus = (status == true) ? "Success" : "Failure";
String sStatus = (status == true) ? TestStatus.SUCCESS.toString() : TestStatus.FAILURE.toString();
if (ret != "" ) {
@@ -83,7 +83,7 @@ public class TestingList extends Panel {
}
else{ // ret empty means that either the test script does not have variable ret, or that the script could not be started at all
ret = "Could not start test script";
sStatus = "Failure";
sStatus = TestStatus.FAILURE.toString();
String[] dsDeviceName = testingList.getTestInProgress();
//SwingUtils.showException(getComponent(), ex );
//SwingUtils.showMessage(getComponent(), "", ex.toString() + deviceName[0]);
@@ -98,7 +98,7 @@ public class TestingList extends Panel {
}
} catch (Exception ex) {
String ret = "Could not start test script";
String sStatus = "Failure";
String sStatus = TestStatus.FAILURE.toString();
String[] dsDeviceName = testingList.getTestInProgress();
//SwingUtils.showException(getComponent(), ex );
SwingUtils.showMessage(getComponent(), "onExecutedFile()", ex.toString() + dsDeviceName[0]);
@@ -172,6 +172,30 @@ public class TestingList extends Panel {
}
return iconFileName;
}
@Override
public String toString() {
String status = "";
switch (this) {
case SUCCESS:
status = "Success";
break;
case FAILURE:
status = "Failure";
break;
case PENDING:
status = "Pending";
break;
case DISABLED:
status = "Disabled";
break;
case RUNNING:
status = "Running";
break;
}
return status;
}
public ImageIcon Icon(){
String iconFileName = this.IconFilename();
@@ -471,7 +495,7 @@ public class TestingList extends Panel {
//search for device name in table
try{
for (int row = 0; row <= jTable1.getRowCount() - 1; row++) {
if (jTable1.getValueAt(row, COL.STATUS.index()).toString().equals("Running")) {
if (jTable1.getValueAt(row, COL.STATUS.index()).toString().equals(TestStatus.RUNNING.toString())) {
dsTestProperties[0] = jTable1.getValueAt(row, COL.DEVICENAME.index()).toString();
dsTestProperties[1] = jTable1.getValueAt(row, COL.TESTNAME.index()).toString();
break;