diff --git a/config/plugins.properties b/config/plugins.properties index d8d1dd1..785bae1 100644 --- a/config/plugins.properties +++ b/config/plugins.properties @@ -1,4 +1,4 @@ -json-simple-1.1.1.jar=enabled +json-simple-1.1.1.jar=disabled FilterTable.java=enabled Kollimators.java=enabled NewTest.java=enabled diff --git a/plugins/NewTest.java b/plugins/NewTest.java index b289a64..515cb80 100644 --- a/plugins/NewTest.java +++ b/plugins/NewTest.java @@ -40,8 +40,8 @@ import javax.naming.directory.SearchResult; import javax.naming.ldap.InitialLdapContext; import javax.naming.ldap.LdapContext; import javax.swing.table.DefaultTableModel; -import org.json.simple.JSONArray; -import org.json.simple.JSONObject; +//import org.json.simple.JSONArray; +//import org.json.simple.JSONObject; /** * * @author boccioli_m @@ -60,9 +60,9 @@ public class NewTest extends javax.swing.JPanel { public static Path TEMPLATES_DEVICECONFIG_FILEPATH = Paths.get(TESTS_ROOT_DIR, "templates","deviceTemplate.config"); public static String TESTS_CONFIG_FILENAME = ".config"; public static String TESTS_HELP_FILENAME = "help.html"; - public static String ALLOWED_CHARSET1 = "[a-z A-Z 0-9 . _ \\- \\[\\] () : , < > =]*"; //les restricted set of chars - public static String ALLOWED_CHARSET2 = "[a-z A-Z 0-9 . _ \\- \\[\\] ()]*"; //more restricted set of chars - public static String ALLOWED_CHARSET3 = "[a-zA-Z0-9._\\-]*"; //even more restricted set of chars + public static String ALLOWED_CHARSET1 = "[a-z A-Z 0-9 . _ \\- \\[\\] () : , < > = \\$]*"; //les restricted set of chars + public static String ALLOWED_CHARSET2 = "[a-z A-Z 0-9 . _ \\- \\[\\] () : , \\$]*"; //more restricted set of chars + public static String ALLOWED_CHARSET3 = "[a-zA-Z0-9._\\-\\$,]*"; //even more restricted set of chars /** * enumeration of table column indexes @@ -860,7 +860,7 @@ public class NewTest extends javax.swing.JPanel { value = (String) attributes.get("value"); description = (String) attributes.get("description"); //build the python code for getting the test parameter - sTestParameters = sTestParameters + name + ":" + value + ":" + description + ";" ; + sTestParameters = sTestParameters + name + "&" + value + "&" + description + ";" ; } } FileInputStream in = new FileInputStream(configFile); @@ -882,7 +882,7 @@ public class NewTest extends javax.swing.JPanel { } props.store(out, null); out.close(); - + /* JSONObject obj = new JSONObject(); obj.put("Name", "crunchify.com"); obj.put("Author", "App Shah"); @@ -900,7 +900,7 @@ public class NewTest extends javax.swing.JPanel { jout.write(jsonConfig); jout.flush(); jout.close(); - + */ success = true; } catch (FileNotFoundException ex) { SwingUtils.showMessage(this, "generateTestConfig()", "Cannot find file: " + ex.toString());