about summary refs log tree commit diff
path: root/public
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2019-12-02T09·00+0100
committerFlorian Klink <flokli@flokli.de>2019-12-02T09·00+0100
commit04a24a0c601c28d01e1110fb82f57c7a7c3f5d74 (patch)
treeabe8872d565a82db38167b07b0a4526883031983 /public
parent7bafef7a848cc80c79551441630210e947b2481b (diff)
Use Runner
This revamps code quite a bit. Series handling has been moved into the
gerrit client, it also handles caching.

The Runner logic itself has been greatly simplified.

The runner logic has been moved into the runner.go, submitqueue.go is
gone.

The "per-run result object" concept has been dropped - we instead just
use annotated logs.

Also, we switched to apex/log
Diffstat (limited to 'public')
-rw-r--r--public/serie.tmpl.html2
-rw-r--r--public/series.tmpl.html16
-rw-r--r--public/submit-queue.tmpl.html82
3 files changed, 29 insertions, 71 deletions
diff --git a/public/serie.tmpl.html b/public/serie.tmpl.html
index 7db666c173ec..8c653946ce7e 100644
--- a/public/serie.tmpl.html
+++ b/public/serie.tmpl.html
@@ -1,6 +1,6 @@
 {{ define "serie" }}
 <tr>
-<td colspan="3" class="{{ if not (. | isAutoSubmittable) }}table-primary{{ else }}table-success{{ end }}">Serie with {{ len .ChangeSets }} changes</td>
+<td colspan="3" class="table-success">Serie with {{ len .ChangeSets }} changes</td>
 </tr>
 {{ range $changeset := .ChangeSets }}
 {{ block "changeset" $changeset }}{{ end }}
diff --git a/public/series.tmpl.html b/public/series.tmpl.html
deleted file mode 100644
index 7e5ffd49c79a..000000000000
--- a/public/series.tmpl.html
+++ /dev/null
@@ -1,16 +0,0 @@
-{{ define "series" }}
-<table class="table table-sm table-hover">
-<thead class="thead-light">
-    <tr>
-    <th scope="col">Owner</th>
-    <th scope="col">Changeset</th>
-    <th scope="col">Flags</th>
-    </tr>
-</thead>
-<tbody>
-    {{ range $serie := . }}
-    {{ block "serie" $serie }}{{ end }}
-    {{ end }}
-</tbody>
-</table>
-{{ end }}
\ No newline at end of file
diff --git a/public/submit-queue.tmpl.html b/public/submit-queue.tmpl.html
index 27d8e9fdc69e..f64cdf24a170 100644
--- a/public/submit-queue.tmpl.html
+++ b/public/submit-queue.tmpl.html
@@ -42,63 +42,37 @@
         </tr>
         <tr>
           <th scope="row">Currently running:</th>
-	  <td>
-	    {{ if .currentlyRunning }}
-	    started at {{ .currentlyRunning.Format "2006-01-02 15:04:05 UTC" }}
-	    {{ else }}
-	    <span class="text-secondary">Not currently running</span>
-	    {{ end }}
-	  </td>
+          <td>
+            {{ if .currentlyRunning }}yes{{ else }}no{{ end }}
+          </td>
+        </tr>
+        <tr>
+          <th scope="row">HEAD:</th>
+          <td>
+            {{ if .currentlyRunning }}{{ .HEAD }}{{ else }}-{{ end }}
+          </td>
         </tr>
       </tbody>
     </table>
-    <h2 id="region-log">Log</h2>
 
-    <div id="history-accordion">
-        {{ range $i, $result := .results }}
-        <div class="card">
-          <div class="card-header">
-            <h5>
-              <button class="btn btn-link" data-toggle="collapse" data-target="#history-collapse-{{ $i }}">
-                Result Item {{ $i }}, {{ $result.StartTime.Format "2006-01-02 15:04:05 UTC"}} - {{ $result.EndTime.Format "2006-01-02 15:04:05 UTC"}}
-              </button>
-            </h5>
-          </div>
-          <div id="history-collapse-{{ $i }}" class="collapse {{ if eq $i 0 }} show{{ end }}" data-parent="#history-accordion">
-            <div class="card-body">
-              <table class="table">
-                <tbody>
-                  <tr>
-                    <th scope="row">HEAD:</th>
-                    <td><code>{{ .HEAD }}</code></td>
-                  </tr>
-                  {{ if $result.Error }}
-                  <tr>
-                    <th scope="row">Error:</th>
-                    <td class="text-danger">{{ $result.Error }}</td>
-                    </td>
-                  </tr>
-                  {{ end }}
-                  <tr>
-                    <th scope="row">Log:</th>
-                    <td class="bg-dark text-white">
-                        {{ range $logEntry := $result.LogEntries }}
-                        <code>{{ $logEntry }}</code><br />
-                        {{ end }}
-                    </td>
-                  </tr>
-                  <tr>
-                    <td colspan="2">
-                      {{ block "series" $result.Series}}{{ end }}
-                    </td>
-                  </tr>
-                </tbody>
-              </table>
-            </div>
-          </div>
-        </div>
-        {{ end }}
-    </div>
-  </div> <!-- .container -->
+    <h2 id="region-wipserie">wip Serie</h2>
+    {{ if .wipSerie }}
+    {{ block "serie" .wipSerie }}{{ end }}
+    {{ else }}
+    - 
+    {{ end }}
+
+    <h2 id="region-log">Log</h2>
+    <table class="table">
+      <tbody>
+        <tr>
+          <td class="bg-dark text-white">
+            {{ range $entry := .memory.Entries }}
+            <code>{{ $entry }}</code><br />
+            {{ end }}
+          </td>
+        </tr>
+      </tbody>
+    </table>
 </body>
 </html>