Skip to content

Commit

Permalink
feat(task-get): Simplify --table-details option
Browse files Browse the repository at this point in the history
Implements #345
  • Loading branch information
mountaindude committed Nov 17, 2023
1 parent 8060a1b commit 2cbd470
Show file tree
Hide file tree
Showing 3 changed files with 200 additions and 269 deletions.
165 changes: 82 additions & 83 deletions .vscode/launch.json
Expand Up @@ -100,45 +100,45 @@
// ------------------------------------
// Import tasks from CSV file
// ------------------------------------
"args": [
"task-import",
"--auth-type",
"cert",
"--host",
// "192.168.100.109",
"10.211.55.15",
// "args": [
// "task-import",
// "--auth-type",
// "cert",
// "--host",
// // "192.168.100.109",
// "10.211.55.15",

"--auth-cert-file",
"../../code/secret/winsrv.local/client.pem",
"--auth-cert-key-file",
"../../code/secret/winsrv.local/client_key.pem",
// "--auth-cert-file",
// "./cert/client.pem",
// "--auth-cert-key-file",
// "./cert/client_key.pem",
"--auth-user-dir",
"winsrv1",
// "LAB",
"--auth-user-id",
"goran",
// "--auth-cert-file",
// "../../code/secret/winsrv.local/client.pem",
// "--auth-cert-key-file",
// "../../code/secret/winsrv.local/client_key.pem",
// // "--auth-cert-file",
// // "./cert/client.pem",
// // "--auth-cert-key-file",
// // "./cert/client_key.pem",
// "--auth-user-dir",
// "winsrv1",
// // "LAB",
// "--auth-user-id",
// "goran",

"--file-type",
"csv",
// "--file-type",
// "csv",

"--file-name",
// "tasks2source.csv",
// "task-chain.csv",
// "testdata/reload-tasks.csv",
"./tasks_all.csv",
// "--file-name",
// // "tasks2source.csv",
// // "task-chain.csv",
// // "testdata/reload-tasks.csv",
// "./tasks_all.csv",

// "--qvf-overwrite",
// "no",
// // "--qvf-overwrite",
// // "no",

"--limit-import-count",
"2",
// "--limit-import-count",
// "2",

// "--dry-run"
]
// // "--dry-run"
// ]

// ------------------------------------
// Export apps to QVF files
Expand Down Expand Up @@ -228,9 +228,9 @@
// // "--dry-run"
// ]

// // ------------------------------------
// // Get task tree
// // ------------------------------------
// ------------------------------------
// Get task tree
// ------------------------------------
// "args": [
// "task-get",
// // "--auth-type",
Expand Down Expand Up @@ -275,56 +275,55 @@
// ------------------------------------
// Get reload tasks as table
// ------------------------------------
// "args": [
// "task-get",
// "--auth-type",
// "cert",
// "--host",
// "192.168.100.109",
// "--auth-cert-file",
// "./cert/client.pem",
// "--auth-cert-key-file",
// "./cert/client_key.pem",
// "--auth-user-dir",
// "LAB",
// "--auth-user-id",
// "goran",
"args": [
"task-get",
"--auth-type",
"cert",
"--host",
"192.168.100.109",
"--auth-cert-file",
"../../code/secret/pro2win1-nopwd/client.pem",
// "./cert/client.pem",
"--auth-cert-key-file",
"../../code/secret/pro2win1-nopwd/client_key.pem",
// "./cert/client_key.pem",
"--auth-user-dir",
"LAB",
"--auth-user-id",
"goran",

// "--task-type",
"--task-type",
// "reload",
// "ext-program",

// // "--task-id",
// // "82bc3e66-c899-4e44-b52f-552145da5ee0",
// // "5748afa9-3abe-43ab-bb1f-127c48ced075",
// // "5520e710-91ad-41d2-aeb6-434cafbf366b",
// "--output-format",
// "table",

// "--output-dest",
// "screen",
// // "--output-file-name",
// // "tasks.csv",
// // "tasks.json",
// // "--output-file-format",
// // "csv",
// // "json",
// // "excel",

// // "--text-color",
// // "no",
"ext-program",

"--task-id",
"afc250bc-28c3-49a2-8d63-80966749abe3",
// "5748afa9-3abe-43ab-bb1f-127c48ced075",
// "5520e710-91ad-41d2-aeb6-434cafbf366b",
"--output-format",
"table",

"--output-dest",
"screen",
// "--output-file-name",
// "tasks.csv",
// "tasks.json",
// "--output-file-format",
// "csv",
// "json",
// "excel",

// "--text-color",
// "no",

// "--table-details",
// "common",
// // "extprogram",
// // "lastexecution",
// // "tag",
// // "customproperty",
// // "schematrigger",
// "compositetrigger",
// // "comptimeconstraint",
// "comprule"
// ]
// "--table-details",
// "common",
// "lastexecution",
// "tag",
// "customproperty",
// "schematrigger",
// "compositetrigger",
]

// ------------------------------------
// Get reload tasks as CSV/Excel/JSON file
Expand Down
24 changes: 2 additions & 22 deletions src/ctrl-q.js
Expand Up @@ -515,17 +515,7 @@ const program = new Command();
// This is allowed, but should be interpreted as "all" table details.
// Make options.tableDetails an array with all possible table details.
if (options.tableDetails === true) {
newOptions.tableDetails = [
'common',
'extprogram',
'lastexecution',
'tag',
'customproperty',
'schematrigger',
'compositetrigger',
'comptimeconstraint',
'comprule',
];
newOptions.tableDetails = ['common', 'lastexecution', 'tag', 'customproperty', 'schematrigger', 'compositetrigger'];
}

await sharedParamAssertOptions(newOptions);
Expand Down Expand Up @@ -577,17 +567,7 @@ const program = new Command();
'--table-details [detail...]',
'which aspects of tasks should be included in table view. Not choosing any details will show all'
)
.choices([
'common',
'extprogram',
'lastexecution',
'tag',
'customproperty',
'schematrigger',
'compositetrigger',
'comptimeconstraint',
'comprule',
])
.choices(['common', 'lastexecution', 'tag', 'customproperty', 'schematrigger', 'compositetrigger'])
.default('')
);

Expand Down

0 comments on commit 2cbd470

Please sign in to comment.