mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-19 00:02:03 +00:00
Cli improvements (#850)
* Fix infinite user list * Remove Description from table
This commit is contained in:
+1
-1
@@ -86,7 +86,7 @@ async function list(opts: GlobalOptions & { showArchived?: boolean }) {
|
||||
}
|
||||
|
||||
new Table()
|
||||
.header(["path", "summary", "edited at", "edited by", "description"])
|
||||
.header(["path", "summary", "edited at", "edited by"])
|
||||
.padding(2)
|
||||
.border(true)
|
||||
.body(
|
||||
|
||||
+2
-2
@@ -117,10 +117,10 @@ async function list(opts: GlobalOptions) {
|
||||
}
|
||||
|
||||
new Table()
|
||||
.header(["Path", "Resource Type", "Description"])
|
||||
.header(["Path", "Resource Type"])
|
||||
.padding(2)
|
||||
.border(true)
|
||||
.body(total.map((x) => [x.path, x.resource_type, x.description]))
|
||||
.body(total.map((x) => [x.path, x.resource_type]))
|
||||
.render();
|
||||
}
|
||||
|
||||
|
||||
+1
-10
@@ -152,15 +152,7 @@ async function list(opts: GlobalOptions & { showArchived?: boolean }) {
|
||||
}
|
||||
|
||||
new Table()
|
||||
.header([
|
||||
"path",
|
||||
"hash",
|
||||
"kind",
|
||||
"language",
|
||||
"created at",
|
||||
"created by",
|
||||
"description",
|
||||
])
|
||||
.header(["path", "hash", "kind", "language", "created at", "created by"])
|
||||
.padding(2)
|
||||
.border(true)
|
||||
.body(
|
||||
@@ -171,7 +163,6 @@ async function list(opts: GlobalOptions & { showArchived?: boolean }) {
|
||||
x.language,
|
||||
x.created_at,
|
||||
x.created_by,
|
||||
x.description ?? "-",
|
||||
])
|
||||
)
|
||||
.render();
|
||||
|
||||
+1
-2
@@ -1,4 +1,3 @@
|
||||
import { reset } from "https://deno.land/std@0.161.0/fmt/colors.ts";
|
||||
import { Command } from "https://deno.land/x/cliffy@v0.25.4/command/command.ts";
|
||||
import { Table } from "https://deno.land/x/cliffy@v0.25.4/table/table.ts";
|
||||
import { UserService } from "https://deno.land/x/windmill@v1.41.0/mod.ts";
|
||||
@@ -17,7 +16,7 @@ async function list(opts: GlobalOptions) {
|
||||
while (true) {
|
||||
const res = await UserService.listUsersAsSuperAdmin({ page, perPage });
|
||||
total.push(...res);
|
||||
page += 0;
|
||||
page += 1;
|
||||
|
||||
if (res.length < perPage) {
|
||||
break;
|
||||
|
||||
+1
-2
@@ -11,7 +11,7 @@ async function list(opts: GlobalOptions) {
|
||||
const variables = await VariableService.listVariable({ workspace });
|
||||
|
||||
new Table()
|
||||
.header(["Path", "Is Secret", "Account", "Value", "Description"])
|
||||
.header(["Path", "Is Secret", "Account", "Value"])
|
||||
.padding(2)
|
||||
.border(true)
|
||||
.body(
|
||||
@@ -20,7 +20,6 @@ async function list(opts: GlobalOptions) {
|
||||
x.is_secret ? "true" : "false",
|
||||
x.account ?? "-",
|
||||
x.value ?? "-",
|
||||
x.description ?? "-",
|
||||
])
|
||||
)
|
||||
.render();
|
||||
|
||||
Reference in New Issue
Block a user