All checks were successful
continuous-integration/drone/push Build is passing
80 lines
2.9 KiB
Plaintext
80 lines
2.9 KiB
Plaintext
package views
|
|
|
|
import (
|
|
"strconv"
|
|
"mocksnow/components/core"
|
|
)
|
|
|
|
type IncomingRow struct {
|
|
ID int
|
|
IncidentNumber string
|
|
Description string
|
|
ShortDescription string
|
|
Urgency string
|
|
Impact string
|
|
State string
|
|
ExternalID string
|
|
WorkNotes string
|
|
AssignmentGroup string
|
|
AssignedTo string
|
|
Category string
|
|
Subcategory string
|
|
CreatedAt string
|
|
}
|
|
|
|
templ IncomingTable(rows []IncomingRow) {
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
@core.Header()
|
|
<body>
|
|
<main>
|
|
<div>
|
|
<h1>Incoming API Calls</h1>
|
|
<div>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Incident #</th>
|
|
<th>Description</th>
|
|
<th>Short Description</th>
|
|
<th>Urgency</th>
|
|
<th>Impact</th>
|
|
<th>State</th>
|
|
<th>External ID</th>
|
|
<th>Work Notes</th>
|
|
<th>Assignment Group</th>
|
|
<th>Assigned To</th>
|
|
<th>Category</th>
|
|
<th>Subcategory</th>
|
|
<th>Created At</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
for _, row := range rows {
|
|
<tr>
|
|
<td>{ strconv.Itoa(row.ID) }</td>
|
|
<td>{ row.IncidentNumber }</td>
|
|
<td>{ row.Description }</td>
|
|
<td>{ row.ShortDescription }</td>
|
|
<td>{ row.Urgency }</td>
|
|
<td>{ row.Impact }</td>
|
|
<td>{ row.State }</td>
|
|
<td>{ row.ExternalID }</td>
|
|
<td>{ row.WorkNotes }</td>
|
|
<td>{ row.AssignmentGroup }</td>
|
|
<td>{ row.AssignedTo }</td>
|
|
<td>{ row.Category }</td>
|
|
<td>{ row.Subcategory }</td>
|
|
<td>{ row.CreatedAt }</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
@core.Footer()
|
|
</body>
|
|
</html>
|
|
} |