-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
190 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
{{define "component/monitor"}} | ||
<div class="ui tiny monitor modal transition hidden"> | ||
<div class="header">{{tr "AddMonitor"}}</div> | ||
<div class="content"> | ||
<form id="monitorForm" class="ui form"> | ||
<input type="hidden" name="ID" /> | ||
<div class="field"> | ||
<label>{{tr "Name"}}</label> | ||
<input type="text" name="Name" placeholder="{{tr "Blog"}}" /> | ||
</div> | ||
<div class="field"> | ||
<label>{{tr "Target"}}</label> | ||
<input | ||
type="text" | ||
name="Target" | ||
placeholder="" | ||
/> | ||
</div> | ||
<div class="field"> | ||
<label>{{tr "Type"}}</label> | ||
<select name="Type" class="ui fluid dropdown"> | ||
<option value="1">TCP-Ping</option> | ||
</select> | ||
</div> | ||
<div class="field"> | ||
<label>{{tr "Duration"}}</label> | ||
<input type="number" name="Duration" placeholder="{{tr "Seconds"}}" /> | ||
</div> | ||
<div class="field"> | ||
<label>{{tr "Coverage"}}</label> | ||
<select name="Cover" class="ui fluid dropdown"> | ||
<option value="0">{{tr "AllIncludedOnlySpecificServersAreNotRequest"}}</option> | ||
<option value="1">{{tr "IgnoreAllRequestOnlyThroughSpecificServers"}}</option> | ||
</select> | ||
</div> | ||
<div class="field"> | ||
<label>{{tr "SpecificServers"}}</label> | ||
<div class="ui fluid multiple servers search selection dropdown"> | ||
<input type="hidden" name="SkipServersRaw" /> | ||
<i class="dropdown icon specificServer"></i> | ||
<div class="default text">{{tr "EnterIdAndNameToSearch"}}</div> | ||
<div class="menu"></div> | ||
</div> | ||
</div> | ||
<div class="field"> | ||
<label>{{tr "NotificationMethodGroup"}}</label> | ||
<input type="text" name="NotificationTag" placeholder="default" /> | ||
</div> | ||
<div class="field"> | ||
<div class="ui nb-notify checkbox"> | ||
<input name="Notify" type="checkbox" tabindex="0" class="hidden" /> | ||
<label>{{tr "EnableFailureNotification"}}</label> | ||
</div> | ||
</div> | ||
<div class="field"> | ||
<label>{{tr "MaxLatency"}}</label> | ||
<input type="number" name="MaxLatency" placeholder="100.88" /> | ||
</div> | ||
<div class="field"> | ||
<label>{{tr "MinLatency"}}</label> | ||
<input type="number" name="MinLatency" placeholder="100.88" /> | ||
</div> | ||
<div class="field"> | ||
<div class="ui nb-lt-notify checkbox"> | ||
<input name="LatencyNotify" type="checkbox" tabindex="0" class="hidden" /> | ||
<label>{{tr "EnableLatencyNotification"}}</label> | ||
</div> | ||
</div> | ||
|
||
<div class="field"> | ||
<div class="ui nb-EnableTriggerTask checkbox"> | ||
<input name="EnableTriggerTask" type="checkbox" tabindex="0" class="hidden" /> | ||
<label>{{tr "EnableTriggerTask"}}</label> | ||
</div> | ||
</div> | ||
|
||
<div class="field"> | ||
<label>{{tr "FailTriggerTasks"}}</label> | ||
<div class="ui fluid multiple tasks search selection dropdown"> | ||
<input type="hidden" name="FailTriggerTasksRaw"> | ||
<i class="dropdown icon failTask"></i> | ||
<div class="default text">{{tr "EnterIdAndNameToSearch"}}</div> | ||
<div class="menu"></div> | ||
</div> | ||
</div> | ||
<div class="field"> | ||
<label>{{tr "RecoverTriggerTasks"}}</label> | ||
<div class="ui fluid multiple tasks search selection dropdown"> | ||
<input type="hidden" name="RecoverTriggerTasksRaw"> | ||
<i class="dropdown icon recoverTask"></i> | ||
<div class="default text">{{tr "EnterIdAndNameToSearch"}}</div> | ||
<div class="menu"></div> | ||
</div> | ||
</div> | ||
|
||
</form> | ||
<div class="ui warning message"> | ||
<p> | ||
{{safe (tr "IntroductionOfMonitor")}} | ||
</p> | ||
</div> | ||
</div> | ||
<div class="actions"> | ||
<div class="ui negative button">{{tr "Cancel"}}</div> | ||
<button class="ui positive server-primary-btn right labeled icon button"> | ||
{{tr "Confirm"}}<i class="checkmark icon"></i> | ||
</button> | ||
</div> | ||
</div> | ||
{{end}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{{define "dashboard-default/monitor"}} {{template "common/header" .}} | ||
{{template "common/menu" .}} | ||
<div class="nb-container"> | ||
<div class="ui container"> | ||
<div class="ui grid"> | ||
<div class="right floated right aligned twelve wide column"> | ||
<button class="ui right labeled server-primary-btn icon button" onclick="addOrEditMonitor()"> | ||
<i class="add icon"></i> {{tr "AddMonitor"}} | ||
</button> | ||
</div> | ||
</div> | ||
<table class="ui very basic table"> | ||
<thead> | ||
<tr> | ||
<th>ID</th> | ||
<th>{{tr "Name"}}</th> | ||
<th>{{tr "Target"}}</th> | ||
<th>{{tr "Coverage"}}</th> | ||
<th>{{tr "SpecificServers"}}</th> | ||
<th>{{tr "Type"}}</th> | ||
<th>{{tr "Duration"}}</th> | ||
<th>{{tr "NotificationMethodGroup"}}</th> | ||
<th>{{tr "FailureNotification"}}</th> | ||
<th>{{tr "LatencyNotification"}}</th> | ||
<th>{{tr "EnableTriggerTask"}}</th> | ||
<th>{{tr "FailTriggerTasks"}}</th> | ||
<th>{{tr "RecoverTriggerTasks"}}</th> | ||
<th>{{tr "Administration"}}</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{{range $monitor := .Monitors}} | ||
<tr> | ||
<td>{{$monitor.ID}}</td> | ||
<td>{{$monitor.Name}}</td> | ||
<td>{{$monitor.Target}}</td> | ||
<td>{{if eq $monitor.Cover 0}}{{tr "CoverAll"}}{{else}}{{tr "IgnoreAll"}}{{end}}</td> | ||
<td>{{$monitor.SkipServersRaw}}</td> | ||
<td> | ||
{{if eq $monitor.Type 1}}{{tr "SSLCertificate"}} {{else if eq $monitor.Type | ||
2}} ICMP Ping {{else}} {{tr "TCPPort"}} {{end}} | ||
</td> | ||
<td>{{$monitor.Duration}} {{tr "Seconds"}}</td> | ||
<td>{{$monitor.NotificationTag}}</td> | ||
<td>{{$monitor.Notify}}</td> | ||
<td>{{$monitor.LatencyNotify}}</td> | ||
<td>{{$monitor.EnableTriggerTask}}</td> | ||
<td>{{$monitor.FailTriggerTasksRaw}}</td> | ||
<td>{{$monitor.RecoverTriggerTasksRaw}}</td> | ||
<td> | ||
<div class="ui mini icon buttons"> | ||
<button class="ui button" onclick="addOrEditMonitor({{$monitor}})"> | ||
<i class="edit icon"></i> | ||
</button> | ||
<button class="ui button" | ||
onclick="showConfirm('{{tr "DeleteService"}}','{{tr "ConfirmToDeleteThisService"}}',deleteRequest,'/api/monitor/'+{{$monitor.ID}})"> | ||
<i class="trash alternate outline icon"></i> | ||
</button> | ||
</div> | ||
</td> | ||
</tr> | ||
{{end}} | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
{{template "component/monitor"}} {{template "common/footer" .}} | ||
<script> | ||
$(".checkbox").checkbox(); | ||
</script> | ||
{{end}} |