summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorignacy123 <ignacy.buczek@onet.pl>2021-12-09 21:18:47 +0100
committerGitHub <noreply@github.com>2021-12-09 21:18:47 +0100
commitbf7f82f7b255c80cfb0bf93110b361657ec02f3b (patch)
tree41f0b4223ffa507d167d444b25c12ec7894b7062
parenteb857dbc45e1d1080544f63a33a8ad0bc1493040 (diff)
cmd/syncthing/cli: Add command to show pending devices/folders (fixes #8068) (#8069)v1.18.6-rc.1
-rw-r--r--cmd/syncthing/cli/pending.go29
-rw-r--r--cmd/syncthing/cli/show.go1
2 files changed, 30 insertions, 0 deletions
diff --git a/cmd/syncthing/cli/pending.go b/cmd/syncthing/cli/pending.go
new file mode 100644
index 000000000..362ba1a59
--- /dev/null
+++ b/cmd/syncthing/cli/pending.go
@@ -0,0 +1,29 @@
+// Copyright (C) 2021 The Syncthing Authors.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this file,
+// You can obtain one at https://mozilla.org/MPL/2.0/.
+
+package cli
+
+import (
+ "github.com/urfave/cli"
+)
+
+var pendingCommand = cli.Command{
+ Name: "pending",
+ HideHelp: true,
+ Usage: "Pending subcommand group",
+ Subcommands: []cli.Command{
+ {
+ Name: "devices",
+ Usage: "Show pending devices",
+ Action: expects(0, indexDumpOutput("cluster/pending/devices")),
+ },
+ {
+ Name: "folders",
+ Usage: "Show pending folders",
+ Action: expects(0, indexDumpOutput("cluster/pending/folders")),
+ },
+ },
+}
diff --git a/cmd/syncthing/cli/show.go b/cmd/syncthing/cli/show.go
index 08f794719..dc739250a 100644
--- a/cmd/syncthing/cli/show.go
+++ b/cmd/syncthing/cli/show.go
@@ -35,6 +35,7 @@ var showCommand = cli.Command{
Usage: "Report about connections to other devices",
Action: expects(0, indexDumpOutput("system/connections")),
},
+ pendingCommand,
{
Name: "usage",
Usage: "Show usage report",