dashboard_templ.go 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. // Code generated by templ - DO NOT EDIT.
  2. // templ: version: v0.3.1020
  3. package views
  4. //lint:file-ignore SA4006 This context is only used if a nested component is present.
  5. import "github.com/a-h/templ"
  6. import templruntime "github.com/a-h/templ/runtime"
  7. import (
  8. "code.osinet.fr/fgm/jamtrack/internal/query"
  9. "fmt"
  10. )
  11. // Dashboard renders the practice-list ranking table.
  12. func Dashboard(ranks []query.SongRank, locationID string) templ.Component {
  13. return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
  14. templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
  15. if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
  16. return templ_7745c5c3_CtxErr
  17. }
  18. templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
  19. if !templ_7745c5c3_IsBuffer {
  20. defer func() {
  21. templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
  22. if templ_7745c5c3_Err == nil {
  23. templ_7745c5c3_Err = templ_7745c5c3_BufErr
  24. }
  25. }()
  26. }
  27. ctx = templ.InitializeContext(ctx)
  28. templ_7745c5c3_Var1 := templ.GetChildren(ctx)
  29. if templ_7745c5c3_Var1 == nil {
  30. templ_7745c5c3_Var1 = templ.NopComponent
  31. }
  32. ctx = templ.ClearChildren(ctx)
  33. templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
  34. templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
  35. templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
  36. if !templ_7745c5c3_IsBuffer {
  37. defer func() {
  38. templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
  39. if templ_7745c5c3_Err == nil {
  40. templ_7745c5c3_Err = templ_7745c5c3_BufErr
  41. }
  42. }()
  43. }
  44. ctx = templ.InitializeContext(ctx)
  45. templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"level\"><div class=\"level-left\"><h1 class=\"title\">Practice List</h1></div><div class=\"level-right\"><a class=\"button is-primary\" href=\"/jams/new\">+ New Jam</a></div></div>")
  46. if templ_7745c5c3_Err != nil {
  47. return templ_7745c5c3_Err
  48. }
  49. if len(ranks) == 0 {
  50. templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "<p class=\"has-text-grey\">No songs logged yet. <a href=\"/jams/new\">Add a jam</a> to get started.</p>")
  51. if templ_7745c5c3_Err != nil {
  52. return templ_7745c5c3_Err
  53. }
  54. } else {
  55. templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "<table class=\"table is-fullwidth is-striped is-hoverable\"><thead><tr><th>Artist</th><th>Title</th><th class=\"has-text-right\">Played</th><th class=\"has-text-right\">Proposed</th></tr></thead> <tbody>")
  56. if templ_7745c5c3_Err != nil {
  57. return templ_7745c5c3_Err
  58. }
  59. for _, r := range ranks {
  60. templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "<tr><td>")
  61. if templ_7745c5c3_Err != nil {
  62. return templ_7745c5c3_Err
  63. }
  64. var templ_7745c5c3_Var3 string
  65. templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(r.Artist)
  66. if templ_7745c5c3_Err != nil {
  67. return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 34, Col: 21}
  68. }
  69. _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
  70. if templ_7745c5c3_Err != nil {
  71. return templ_7745c5c3_Err
  72. }
  73. templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "</td><td>")
  74. if templ_7745c5c3_Err != nil {
  75. return templ_7745c5c3_Err
  76. }
  77. var templ_7745c5c3_Var4 string
  78. templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(r.Title)
  79. if templ_7745c5c3_Err != nil {
  80. return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 35, Col: 20}
  81. }
  82. _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
  83. if templ_7745c5c3_Err != nil {
  84. return templ_7745c5c3_Err
  85. }
  86. templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "</td><td class=\"has-text-right\">")
  87. if templ_7745c5c3_Err != nil {
  88. return templ_7745c5c3_Err
  89. }
  90. var templ_7745c5c3_Var5 string
  91. templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(r.PlayedCount))
  92. if templ_7745c5c3_Err != nil {
  93. return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 36, Col: 61}
  94. }
  95. _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
  96. if templ_7745c5c3_Err != nil {
  97. return templ_7745c5c3_Err
  98. }
  99. templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "</td><td class=\"has-text-right\">")
  100. if templ_7745c5c3_Err != nil {
  101. return templ_7745c5c3_Err
  102. }
  103. var templ_7745c5c3_Var6 string
  104. templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(r.ProposedCount))
  105. if templ_7745c5c3_Err != nil {
  106. return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 37, Col: 63}
  107. }
  108. _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
  109. if templ_7745c5c3_Err != nil {
  110. return templ_7745c5c3_Err
  111. }
  112. templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "</td></tr>")
  113. if templ_7745c5c3_Err != nil {
  114. return templ_7745c5c3_Err
  115. }
  116. }
  117. templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "</tbody></table>")
  118. if templ_7745c5c3_Err != nil {
  119. return templ_7745c5c3_Err
  120. }
  121. }
  122. return nil
  123. })
  124. templ_7745c5c3_Err = Layout("Practice List").Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
  125. if templ_7745c5c3_Err != nil {
  126. return templ_7745c5c3_Err
  127. }
  128. return nil
  129. })
  130. }
  131. var _ = templruntime.GeneratedTemplate
PANIC: session(release): write data/sessions/2/f/2f521ea44690d244: no space left on device

PANIC

session(release): write data/sessions/2/f/2f521ea44690d244: no space left on device
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/session@v1.0.3/session.go:204 (0xb13e07)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:80 (0x967b75)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:157 (0x9512ee)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:135 (0x951205)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:124 (0x967cc4)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:114 (0x967bf6)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/recovery.go:161 (0x15baec4)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/logger.go:40 (0x96b257)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:157 (0x9512ee)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:135 (0x951205)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:124 (0x967cc4)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/router.go:187 (0x972959)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/router.go:304 (0x973a01)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/macaron.go:218 (0x96c572)
/my/cache/.heroku/go/go1.26.3/go/src/net/http/server.go:3311 (0x85a5cd)
/my/cache/.heroku/go/go1.26.3/go/src/net/http/server.go:2073 (0x837f6f)
/my/cache/.heroku/go/go1.26.3/go/src/runtime/asm_amd64.s:1771 (0x493380)