Commit 141a4ebc authored by Jacob Durrant's avatar Jacob Durrant
Browse files

Mock vina params now mostly alphabetized.

parent e1a006ca
...@@ -20,18 +20,33 @@ export function setup(): void { ...@@ -20,18 +20,33 @@ export function setup(): void {
} else { } else {
let params = this.$store.state["vinaParams"]; let params = this.$store.state["vinaParams"];
let cmdStr = "";
const paramNames = Object.keys(params); const paramNames = Object.keys(params);
const paramNamesLen = paramNames.length; const paramNamesLen = paramNames.length;
const keyValPairs = [];
for (let i = 0; i < paramNamesLen; i++) { for (let i = 0; i < paramNamesLen; i++) {
const paramName = paramNames[i]; const paramName = paramNames[i];
const val = params[paramName]; const val = params[paramName];
if ((val !== false) && (val !== null) && (val !== undefined)) { if ((val !== false) && (val !== null) && (val !== undefined)) {
cmdStr = cmdStr + " --" + paramName; let keyValPair = [paramName];
if (typeof(val) !== "boolean") { if (typeof(val) !== "boolean") {
cmdStr = cmdStr + " " + val.toString(); keyValPair.push(val.toString())
} else {
keyValPair.push("")
} }
keyValPairs.push(keyValPair);
}
}
keyValPairs.sort();
let cmdStr = "";
const keyValPairsLen = keyValPairs.length;
for (let i = 0; i < keyValPairsLen; i++) {
const keyValPair = keyValPairs[i];
const paramName = keyValPair[0];
const val = keyValPair[1];
cmdStr = cmdStr + " --" + paramName;
if (val !== "") {
cmdStr = cmdStr + " " + val.toString();
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment