bosun.org@v0.0.0-20210513094433-e25bc3e69a1f/cmd/bosun/web/static/partials/incident.html (about)

     1  <div class="row" ng-show="error">
     2  	<div class="col-lg-12">
     3  		<div class="alert alert-danger" ng-bind="error"></div>
     4  	</div>
     5  </div>
     6  <div ng-show="incident && state">
     7  	<div class="row">
     8  		<h3>
     9  			<span title="This exclamation icon represents that the alert of this incident is in an active (non-normal) state." ng-show="isActive" class="fa fa-exclamation-circle"></span>
    10  			<a ng-href="{{editSilenceLink}}" title="This mute icon represents that the alert of this incident has been silenced until {{time(silence.End)}} UTC." ng-show="silence" class="fa fa-volume-off"></a>
    11  			Incident {{incident.Id}} <span ng-show="incident.NeedAck"> - needs acknowledgement</span>
    12  		</h3>
    13  	</div>
    14  	<div class="row">
    15  		<p ng-show="incident.End">End Time:<span ts-time="incident.Start" ts-end-time="incident.End" no-link="true"></span></p>
    16  	</div>
    17  	<div class="row">
    18  		<div class="col-sm-6">
    19  			<div class="row">
    20  				<div class="col-sm-3">
    21  					<p><strong>Alert Key:</strong></p>
    22  				</div>
    23  				<div class="col-sm-9">
    24  					<span ng-bind="incident.AlertKey" />
    25  				</div>
    26  			</div>
    27  			<div class="row">
    28  				<div class="col-sm-3">
    29  					<p><strong>Start Time:</strong></p>
    30  				</div>
    31  				<div class="col-sm-9">
    32  					<span ts-time="incident.Start" />
    33  				</div>
    34  			</div>
    35  			<div class="row">
    36  				<div class="col-sm-3">
    37  					<p><strong>Current Status:</strong></p>
    38  				</div>
    39  				<div class="col-sm-9">
    40  					<span ng-bind="incident.CurrentStatus" /> since <span ts-time="incident.Time" />
    41  				</div>
    42  			</div>
    43  			<div class="row">
    44  				<div class="col-sm-3">
    45  					<p><strong>Last Abnormal Status:</strong></p>
    46  				</div>
    47  				<div class="col-sm-9">
    48  					<span ng-bind="incident.LastAbnormalStatus" /> since <span ts-time-unix="incident.LastAbnormalTime" />
    49  				</div>
    50  			</div>
    51  			<div class="row">
    52  				<div class="col-sm-3">
    53  					<p><strong>Views:</strong></p>
    54  				</div>
    55  				<div class="col-sm-9">
    56  					<a ng-href="/history?key={{encode(incident.AlertKey)}}">Full History</a>,
    57  					<a ng-href="{{configLink}}">Rule Editor</a>,
    58  					<a ng-href="/expr?expr={{btoa(incident.Expr)}}">Expression</a>
    59  				</div>
    60  			</div>
    61  			<div class="row">
    62  				<div class="col-sm-3">
    63  					<p><strong>Previous Incidents ({{ incident.PreviousIds ? incident.PreviousIds.length : 0 }}):</strong></p>
    64  				</div>
    65  				<div class="col-sm-9">
    66  					<a ng-repeat="id in incident.PreviousIds | limitTo:5" ng-href="/incident?id={{encode(id)}}">#{{id}} </a>
    67  					<p ng-hide="incident.PreviousIds">None</p>
    68  				</div>
    69  			</div>
    70  			<div class="row" ng-hide="incident.NextId == 0">
    71  				<div class="col-sm-3">
    72  					<p><strong>Next Incident:</strong></p>
    73  				</div>
    74  				<div class="col-sm-9">
    75  					<a ng-href="/incident?id={{encode(incident.NextId)}}">#{{incident.NextId}}</a>
    76  				</div>
    77  			</div>
    78  		</div>
    79  		<div class="col-sm-6">
    80  			<div class="row">
    81  				<div class="col-sm-3">
    82  					<p><strong>Silence:</strong></p>
    83  				</div>
    84  				<div class="col-sm-9">
    85  					<a class="btn btn-default btn-xs" ng-href="/silence?duration=1h&alert={{incident.Alert}}&tags={{encode(incident.Tags)}}">1 hour</a>
    86  					<a class="btn btn-default btn-xs" ng-href="/silence?duration=2h&alert={{incident.Alert}}&tags={{encode(incident.Tags)}}">2 hours</a>
    87  					<a class="btn btn-default btn-xs" ng-href="/silence?duration=6h&alert={{incident.Alert}}&tags={{encode(incident.Tags)}}">6 hours</a>
    88  					<a class="btn btn-default btn-xs" ng-href="/silence?duration=12h&alert={{incident.Alert}}&tags={{encode(incident.Tags)}}">12 hours</a>
    89  					<a class="btn btn-default btn-xs" ng-href="/silence?duration=24h&alert={{incident.Alert}}&tags={{encode(incident.Tags)}}">24 hours</a>
    90  				</div>
    91  			</div>
    92  			<div class="row">
    93  				<div class="col-sm-3">
    94  					<p><strong>Actions:</strong></p>
    95  				</div>
    96  				<div class="col-sm-9" ng-if="state.AlertKey">
    97  					<ts-note></ts-note>
    98  					<ts-ack></ts-ack>
    99  					<ts-close></ts-close>
   100  					<ts-force-close></ts-force-close>
   101  					<ts-forget ng-if="group.Status == 'unknown'"></ts-forget>
   102  					<ts-purge></ts-purge>
   103  				</div>
   104  			</div>
   105  			<div class="row" ng-show="incident.LastAction">
   106  				<div class="col-sm-3">
   107  					<p><strong>Last Action:</strong></p>
   108  				</div>
   109  				<div class="col-sm-9">
   110  					{{incident.LastAction.Type}}
   111  					<span ng-show="incident.LastAction.User">by {{incident.LastAction.User}}</span> at <span ts-time="incident.LastAction.Time"></span>
   112  					<span ng-show="incident.LastAction.Message">: {{incident.LastAction.Message}}</span>
   113  				</div>
   114  			</div>
   115  		</div>
   116  	</div>
   117  	<div class="row">
   118  		<h4>Actions</h4>
   119  	</div>
   120  	<div class="row" ng-hide="actions.length">No actions</div>
   121  	<div class="row" ng-show="actions.length">
   122  		<table class="table table-striped" style="width:100%">
   123  			<thead>
   124  				<td>Type</td>
   125  				<td>User</td>
   126  				<td>Message</td>
   127  				<td>Time</td>
   128  				<td>Deadline</td>
   129  			</thead>
   130  			<tbody>
   131  				<tr ng-repeat="a in actions">
   132  					<td ng-bind="a.Type"></td>
   133  					<td ng-bind="a.User"></td>
   134  					<td ng-bind="a.Message"></td>
   135  					<td><div ng-show="a.Time" ts-time="a.Time"></div></td>
   136  					<td><div ng-show="a.Deadline" ts-time="a.Deadline"></div></td>
   137  				</tr>
   138  			</tbody>
   139  		</table>
   140  	</div>
   141  
   142  	<div class="row">
   143  		<h4>Events</h4>
   144  	</div>
   145  	<div class="row panel" ng-class="panelClass(v.Status)" ng-repeat="($index, v) in events">
   146  		<div class="panel-heading" ng-click="collapse($index, v)">
   147  			<h4 class="panel-title">
   148  				<a href>
   149  					<span ng-bind="v.Status"></span>
   150  					<span class="pull-right" ng-show="v.Time" ts-time="v.Time" ts-end-time="events[$index-1].Time ? events[$index-1].Time : (incident.Open ? undefined : incident.End) " no-link="true"></span>
   151  				</a>
   152  			</h4>
   153  		</div>
   154  		<div class="panel-body" ng-if="shown[$index]">
   155  			<div ng-show="!v.doneLoading">Loading...</div>
   156  			<div class="row" ng-show="v.error">
   157  				<div class="col-lg-12">
   158  					<pre class="alert alert-danger" ng-bind="v.error" style="white-space: pre-wrap;"></pre>
   159  				</div>
   160  			</div>
   161  			<div class="panel panel-default">
   162  				<div class="panel-heading">
   163  					<h3 class="panel-title">Subject</h3>
   164  				</div>
   165  				<div class="panel-body template" ng-bind="v.subject"></div>
   166  			</div>
   167  			<div class="panel panel-default">
   168  				<div class="panel-heading">
   169  					<h3 class="panel-title">Body</h3>
   170  				</div>
   171  				<div class="panel-body template" ng-bind-html="v.body"></div>
   172  			</div>
   173  		</div>
   174  	</div>
   175  </div>