swirl/views/service/logs.jet
2017-09-29 16:43:02 +08:00

108 lines
3.2 KiB
Go

{{ extends "../_layouts/default" }}
{{ block body() }}
<section class="hero is-info">
<div class="hero-body">
<div class="container has-text-centered">
<h1 class="title is-2">
SERVICE
</h1>
<h2 class="subtitle is-5">
Services are the definitions of tasks to run on a swarm.
</h2>
</div>
</div>
</section>
<div class="container">
<nav class="breadcrumb has-succeeds-separator is-small is-marginless" aria-label="breadcrumbs">
<ul>
<li><a href="/">Dashboard</a></li>
<li><a href="/service/">Services</a></li>
<li class="is-active"><a>Logs</a></li>
</ul>
</nav>
</div>
<section class="hero is-small is-light">
<div class="hero-body">
<div class="container">
<h2 class="title is-2">
{{ .Service }}
</h2>
</div>
</div>
</section>
<nav class="navbar has-shadow">
<div class="container">
<div class="navbar-brand">
<a class="navbar-item is-tab" href="/service/{{.Service}}/detail">Detail</a>
<a class="navbar-item is-tab" href="/service/{{.Service}}/raw">Raw</a>
<a class="navbar-item is-tab is-active" href="/service/{{.Service}}/logs">Logs</a>
<a class="navbar-item is-tab" href="/service/{{.Service}}/edit">Edit</a>
</div>
</div>
</nav>
<section class="section">
<div class="container">
<nav class="level">
<form>
<div class="level-left">
<div class="level-item">
<div class="field has-addons">
<p class="control">
<a class="button is-static">Lines</a>
</p>
<p class="control">
<input name="line" value="{{ .Line }}" class="input" placeholder="Max lines from tail">
</p>
</div>
</div>
<div class="level-item">
<div class="field">
<input id="cb-timestamps" name="timestamps" value="true" type="checkbox" class="switch is-success is-rounded"{{if .Timestamps}} checked{{end}}>
<label for="cb-timestamps">Add timestamps</label>
</div>
</div>
<div class="level-item">
<div class="field">
<p class="control">
<button class="button is-primary">Search</button>
</p>
</div>
</div>
</div>
</form>
</nav>
<div class="tabs is-boxed" data-target="tab-content">
<ul>
<li class="is-active">
<a><span>Stdout</span></a>
</li>
<li>
<a><span>Stderr</span></a>
</li>
</ul>
</div>
<div id="tab-content" class="content">
<div class="field">
<div class="control">
{{ if .Stdout }}<textarea class="textarea code is-small" rows="30" readonly>{{ .Stdout }}</textarea>{{ end }}
</div>
</div>
<div class="field" style="display: none">
<div class="control">
{{ if .Stderr }}<textarea class="textarea code is-small" rows="30" readonly>{{ .Stderr }}</textarea>{{ end }}
</div>
</div>
</div>
<a href="/service/" class="button is-primary">
<span class="icon"><i class="fa fa-reply"></i></span>
<span>Return</span>
</a>
</div>
</section>
{{ end }}