mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2026-10-20 16:22:41 +00:00
28 lines
1.7 KiB
Go
28 lines
1.7 KiB
Go
package actions
|
|
|
|
import (
|
|
. "github.com/mickael-kerjean/filestash/server/pkg/kernel"
|
|
. "github.com/mickael-kerjean/filestash/server/pkg/core"
|
|
. "github.com/mickael-kerjean/filestash/server/pkg/utils"
|
|
)
|
|
|
|
func init() {
|
|
Hooks.Register.WorkflowAction(&ToolsDebug{})
|
|
}
|
|
|
|
type ToolsDebug struct{}
|
|
|
|
func (this *ToolsDebug) Manifest() WorkflowSpecs {
|
|
return WorkflowSpecs{
|
|
Name: "tools/debug",
|
|
Title: "Debug",
|
|
Icon: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path d="M102.8 57.3C108.2 51.9 116.6 51.1 123 55.3L241.9 134.5C250.8 140.4 256.1 150.4 256.1 161.1L256.1 210.7L346.9 301.5C380.2 286.5 420.8 292.6 448.1 320L574.2 446.1C592.9 464.8 592.9 495.2 574.2 514L514.1 574.1C495.4 592.8 465 592.8 446.2 574.1L320.1 448C292.7 420.6 286.6 380.1 301.6 346.8L210.8 256L161.2 256C150.5 256 140.5 250.7 134.6 241.8L55.4 122.9C51.2 116.6 52 108.1 57.4 102.7L102.8 57.3zM247.8 360.8C241.5 397.7 250.1 436.7 274 468L179.1 563C151 591.1 105.4 591.1 77.3 563C49.2 534.9 49.2 489.3 77.3 461.2L212.7 325.7L247.9 360.8zM416.1 64C436.2 64 455.5 67.7 473.2 74.5C483.2 78.3 485 91 477.5 98.6L420.8 155.3C417.8 158.3 416.1 162.4 416.1 166.6L416.1 208C416.1 216.8 423.3 224 432.1 224L473.5 224C477.7 224 481.8 222.3 484.8 219.3L541.5 162.6C549.1 155.1 561.8 156.9 565.6 166.9C572.4 184.6 576.1 203.9 576.1 224C576.1 267.2 558.9 306.3 531.1 335.1L482 286C448.9 253 403.5 240.3 360.9 247.6L304.1 190.8L304.1 161.1L303.9 156.1C303.1 143.7 299.5 131.8 293.4 121.2C322.8 86.2 366.8 64 416.1 63.9z"></path></svg>`,
|
|
Specs: Form{},
|
|
}
|
|
}
|
|
|
|
func (this *ToolsDebug) Execute(params map[string]string, input map[string]string) (map[string]string, error) {
|
|
Log.Info("[workflow] action=tools/debug input=%v", input)
|
|
return input, nil
|
|
}
|