@@ -7,76 +7,79 @@ <h2>Showing {{len .Endpoints}} endpoints.</h2>
7
7
</ hgroup >
8
8
9
9
{{range $val := .Endpoints}}
10
- < article id ="endpoint_{{$val.ID}} ">
11
- < h3 > {{$val.Name}}</ h3 >
10
+ < section id ="endpoint-{{$val.ID}} ">
11
+ < details >
12
+ < summary > {{$val.Name}}</ summary >
13
+ < article >
14
+ < div class ="flex flex-col gap-4 ">
15
+ < div class ="flex justify-between gap-2 ">
16
+ < div >
17
+ < em title ="Endpoint was created internally and cannot be modified. ">
18
+ Internal
19
+ </ em >
20
+ </ div >
21
+ < div >
22
+ < input disabled {{if $val.Internal}}checked{{end}} type ="checkbox " role ="switch " />
23
+ </ div >
24
+ </ div >
12
25
13
- < div class ="flex flex-col gap-4 ">
14
- < div class ="flex justify-between gap-2 ">
15
- < div >
16
- < em title ="Endpoint was created internally and cannot be modified. ">
17
- Internal
18
- </ em >
19
- </ div >
20
- < div >
21
- < input disabled {{if $val.Internal}}checked{{end}} type ="checkbox " role ="switch " />
22
- </ div >
23
- </ div >
26
+ < div class ="flex justify-between gap-2 ">
27
+ < div > Kind</ div >
28
+ < div > {{$val.Kind}}</ div >
29
+ </ div >
24
30
25
- < div class ="flex justify-between gap-2 ">
26
- < div > Kind</ div >
27
- < div > {{$val.Kind}}</ div >
28
- </ div >
31
+ < div class ="flex justify-between gap-2 ">
32
+ < div >
33
+ < em title ="Do not send attachments to endpoint. ">
34
+ Attachment Disable
35
+ </ em >
36
+ </ div >
37
+ < div >
38
+ < input {{if $val.Internal}}disabled{{end}} {{if $val.AttachmentDisable}}checked{{end}} type ="checkbox "
39
+ role ="switch " />
40
+ </ div >
41
+ </ div >
29
42
30
- < div class ="flex justify-between gap-2 ">
31
- < div >
32
- < em title ="Do not send attachments to endpoint. ">
33
- Attachment Disable
34
- </ em >
35
- </ div >
36
- < div >
37
- < input {{if $val.Internal}}disabled{{end}} {{if $val.AttachmentDisable }}checked{{end}} type ="checkbox "
38
- role ="switch " />
39
- </ div >
40
- </ div >
43
+ < div class ="flex justify-between gap-2 ">
44
+ < div >
45
+ < em title ="Do not send text to endpoint. ">
46
+ Text Disable
47
+ </ em >
48
+ </ div >
49
+ < div >
50
+ < input {{if $val.Internal}}disabled{{end}} {{if $val.TextDisable }}checked{{end}} type ="checkbox "
51
+ role ="switch " />
52
+ </ div >
53
+ </ div >
41
54
42
- < div class ="flex justify-between gap-2 ">
43
- < div >
44
- < em title ="Do not send text to endpoint. ">
45
- Text Disable
46
- </ em >
47
- </ div >
48
- < div >
49
- < input {{if $val.Internal}}disabled{{end}} {{if $val.TextDisable}}checked{{end}} type ="checkbox "
50
- role ="switch " />
55
+ < label for ="body_template ">
56
+ Body Template
57
+ < textarea id ="body_template " rows ="4 " {{if $val.Internal}}readonly{{end}} > {{$val.BodyTemplate}}</ textarea >
58
+ </ label >
51
59
</ div >
52
- </ div >
53
-
54
- < label for ="body_template ">
55
- Body Template
56
- < textarea id ="body_template " rows ="4 " {{if $val.Internal}}readonly{{end}} > {{$val.BodyTemplate}}</ textarea >
57
- </ label >
58
- </ div >
59
60
60
- {{if $val.Config}}
61
- < h4 > Config</ h4 >
62
- < form >
63
- {{ range $key, $value := $val.Config }}
64
- < label for ="config_{{$key}} ">
65
- {{$key}}
66
- < textarea {{if $val.Internal}}readonly{{end}} {{if $value}}placeholder ="********** " {{end}}
67
- id ="config_{{$key}} "> </ textarea >
68
- </ label >
69
- {{ end }}
70
- </ form >
71
- {{ end }}
61
+ {{if $val.Config}}
62
+ < h4 > Config</ h4 >
63
+ < form >
64
+ {{ range $key, $value := $val.Config }}
65
+ < label for ="config_{{$key}} ">
66
+ {{$key}}
67
+ < textarea {{if $val.Internal}}readonly{{end}} {{if $value}}placeholder ="********** " {{end}}
68
+ id ="config_{{$key}} "> </ textarea >
69
+ </ label >
70
+ {{ end }}
71
+ </ form >
72
+ {{ end }}
72
73
73
- < form method ="post " action ="/endpoints/{{$val.ID}}/test " hx-post ="/endpoints/{{$val.ID}}/test "
74
- class ="pico-form-reset ">
75
- < button type ="submit " data-loading-disable data-loading-aria-busy >
76
- Test Endpoint
77
- </ button >
78
- </ form >
79
- </ article >
74
+ < form method ="post " action ="/endpoints/{{$val.ID}}/test " hx-post ="/endpoints/{{$val.ID}}/test "
75
+ class ="pico-form-reset ">
76
+ < button type ="submit " data-loading-disable data-loading-aria-busy >
77
+ Test Endpoint
78
+ </ button >
79
+ </ form >
80
+ </ article >
81
+ </ details >
82
+ </ section >
80
83
{{end}}
81
84
</ main >
82
85
0 commit comments