mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
feat(alerting): fixing failing typescript build
This commit is contained in:
13
packaging/release_process.md
Normal file
13
packaging/release_process.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# New Grafana Release Processes
|
||||
|
||||
## Building release packages
|
||||
|
||||
1) Update package.json so that it has the right version.
|
||||
2) Packages from master a built automatically by circle CI for this repo [grafana/grafana-packer](https://github.com/grafana/grafana-packer)
|
||||
|
||||
### Non master branch
|
||||
|
||||
When building from non master branch create a new branch in repo [grafana/grafana-packer](https://github.com/grafana/grafana-packer)
|
||||
and configure circle.yml to deploy that branch as well, https://github.com/grafana/grafana-packer/blob/master/circle.yml#L25
|
||||
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
///<reference path="../../headers/common.d.ts" />
|
||||
|
||||
import angular from 'angular';
|
||||
import _ from 'lodash';
|
||||
import coreModule from '../../core/core_module';
|
||||
import config from 'app/core/config';
|
||||
import alertDef from './alert_def';
|
||||
import moment from 'moment';
|
||||
|
||||
export class AlertLogCtrl {
|
||||
|
||||
alertLogs: any;
|
||||
alert: any;
|
||||
|
||||
/** @ngInject */
|
||||
constructor(private $route, private backendSrv) {
|
||||
if ($route.current.params.alertId) {
|
||||
this.loadAlertLogs($route.current.params.alertId);
|
||||
}
|
||||
}
|
||||
|
||||
loadAlertLogs(alertId: number) {
|
||||
this.backendSrv.get(`/api/alerts/${alertId}/states`).then(result => {
|
||||
this.alertLogs = _.map(result, log => {
|
||||
log.iconCss = alertDef.getSeverityIconClass(log.severity);
|
||||
log.humanTime = moment(log.created).format("YYYY-MM-DD HH:mm:ss");
|
||||
return log;
|
||||
});
|
||||
});
|
||||
|
||||
this.backendSrv.get(`/api/alerts/${alertId}`).then(result => {
|
||||
this.alert = result;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
coreModule.controller('AlertLogCtrl', AlertLogCtrl);
|
||||
@@ -1,5 +1,4 @@
|
||||
import './alert_list_ctrl';
|
||||
import './alert_log_ctrl';
|
||||
import './notifications_list_ctrl';
|
||||
import './notification_edit_ctrl';
|
||||
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
<navbar icon="fa fa-fw fa-list" title="Alerts" title-url="alerting">
|
||||
</navbar>
|
||||
|
||||
<div class="page-container" >
|
||||
<div class="page-header">
|
||||
<h1>Alert history for {{ctrl.alert.title}}</h1>
|
||||
</div>
|
||||
|
||||
<table class="filter-table">
|
||||
<thead>
|
||||
<th style="width: 68px">Status</th>
|
||||
<th style="width: 160px">Time</th>
|
||||
<th>Description</th>
|
||||
</thead>
|
||||
<tr ng-repeat="alertLog in ctrl.alertLogs">
|
||||
<td>
|
||||
<i class="icon-gf {{alertLog.iconCss}}"></i>
|
||||
</td>
|
||||
<td>
|
||||
{{alertLog.humanTime}}
|
||||
</td>
|
||||
<td>
|
||||
{{alertLog.info}}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user