From 0b62ac9ecdcad391f28b302bd05a0bce9f05af24 Mon Sep 17 00:00:00 2001 From: despiegk Date: Sat, 24 May 2025 10:42:24 +0400 Subject: [PATCH] ... --- pkg/servers/ui/views/pages/rpcui.jet | 112 ++++++++++----------------- 1 file changed, 42 insertions(+), 70 deletions(-) diff --git a/pkg/servers/ui/views/pages/rpcui.jet b/pkg/servers/ui/views/pages/rpcui.jet index 137f261..ca87b04 100644 --- a/pkg/servers/ui/views/pages/rpcui.jet +++ b/pkg/servers/ui/views/pages/rpcui.jet @@ -1,12 +1,14 @@ -{{ extends "../layouts/base" }} +{{extends "../layouts/base"}} -{{ block title() }}OpenRPC UI - HeroApp UI{{ end }} +{{block title()}} +OpenRPC UI +{{end}} -{{ block css() }} +{{block css()}} -{{ end }} +{{end}} -{{ block body() }} +{{block body()}}

OpenRPC UI

@@ -23,9 +25,9 @@ +
@@ -49,26 +51,24 @@

This is the OpenRPC UI page. It allows you to interact with OpenRPC specifications.

-

Currently available specs: {{ if .SpecList }}{{ len(.SpecList) }}{{ else }}0{{ end }}

+

Currently available specs: {{ if SpecList }}{{ len(SpecList) }}{{ else }}0{{ end }}

-{{ if .SelectedSpec }} +{{ if SelectedSpec }}
-
-
Methods
-
+
Methods
- {{ if .Methods }} - {{ range .Methods }} - - {{ . }} + {{ if Methods }} + {{ range m := Methods }} + + {{ m }} {{ end }} {{ else }} @@ -81,46 +81,29 @@
- {{ if .Method }} + {{ if Method }}
-
{{ .Method.Name }}
- {{ if .Method.Description }} -

{{ .Method.Description }}

- {{ end }} +
{{ Method.Name }}
+ {{ if Method.Description }}

{{ Method.Description }}

{{ end }}
Parameters
- - - - - - - - + - {{ if .Method.Params }} - {{ range .Method.Params }} + {{ if Method.Params }} + {{ range p := Method.Params }} - - - - + + + + {{ end }} {{ else }} - - - + {{ end }}
NameTypeRequiredDescription
NameTypeRequiredDescription
{{ .Name }}{{ .Schema.Type }} - {{ if .Required }} - Yes - {{ else }} - No - {{ end }} - {{ .Description }}{{ p.Name }}{{ p.Schema.Type }}{{ if p.Required }}Yes{{ else }}No{{ end }}{{ p.Description }}
No parameters
No parameters
@@ -128,18 +111,12 @@
Result
- - - - - - - + - - - + + +
NameTypeDescription
NameTypeDescription
{{ .Method.Result.Name }}{{ .Method.Result.Schema.Type }}{{ .Method.Result.Description }}{{ Method.Result.Name }}{{ Method.Result.Schema.Type }}{{ Method.Result.Description }}
@@ -147,10 +124,10 @@
Try It
- +
- +
@@ -159,27 +136,22 @@
Result:

         
-
Error:

         
- {{ else if .SelectedMethod }} -
- Method not found: {{ .SelectedMethod }} -
+ {{ else if SelectedMethod }} +
Method not found: {{ SelectedMethod }}
{{ else }} -
- Select a method from the list to view details. -
+
Select a method from the list to view details.
{{ end }}
{{ end }} -{{ end }} +{{end}} -{{ block scripts() }} +{{block scripts()}} -{{ end }} \ No newline at end of file +{{end}}