mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix(alerting): various alerting fixes
This commit is contained in:
parent
05c124bb1e
commit
2d19af601a
@ -579,3 +579,25 @@ Enabled to automatically remove expired snapshots
|
|||||||
|
|
||||||
### remove snapshots after 90 days
|
### remove snapshots after 90 days
|
||||||
Time to live for snapshots.
|
Time to live for snapshots.
|
||||||
|
|
||||||
|
## [external_image_storage]
|
||||||
|
These options control how images should be made public so they can be shared on services like slack.
|
||||||
|
|
||||||
|
### provider
|
||||||
|
You can choose between (s3, webdav)
|
||||||
|
|
||||||
|
## [external_image_storage.s3]
|
||||||
|
|
||||||
|
### bucket_url
|
||||||
|
|
||||||
|
### access_key
|
||||||
|
|
||||||
|
### secret_key
|
||||||
|
|
||||||
|
## [external_image_storage.webdav]
|
||||||
|
|
||||||
|
### url
|
||||||
|
|
||||||
|
### username
|
||||||
|
|
||||||
|
### password
|
||||||
|
@ -175,10 +175,10 @@ func GetAlertNotifications(c *middleware.Context) Response {
|
|||||||
return ApiError(500, "Failed to get alert notifications", err)
|
return ApiError(500, "Failed to get alert notifications", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
var result []dtos.AlertNotification
|
result := make([]*dtos.AlertNotification, 0)
|
||||||
|
|
||||||
for _, notification := range query.Result {
|
for _, notification := range query.Result {
|
||||||
result = append(result, dtos.AlertNotification{
|
result = append(result, &dtos.AlertNotification{
|
||||||
Id: notification.Id,
|
Id: notification.Id,
|
||||||
Name: notification.Name,
|
Name: notification.Name,
|
||||||
Type: notification.Type,
|
Type: notification.Type,
|
||||||
|
@ -53,11 +53,10 @@ export class AlertTabCtrl {
|
|||||||
this.panelCtrl.events.on('threshold-changed', thresholdChangedEventHandler);
|
this.panelCtrl.events.on('threshold-changed', thresholdChangedEventHandler);
|
||||||
|
|
||||||
// set panel alert edit mode
|
// set panel alert edit mode
|
||||||
var unbind = this.$scope.$on("$destroy", () => {
|
this.$scope.$on("$destroy", () => {
|
||||||
this.panelCtrl.events.off("threshold-changed", thresholdChangedEventHandler);
|
this.panelCtrl.events.off("threshold-changed", thresholdChangedEventHandler);
|
||||||
this.panelCtrl.editingThresholds = false;
|
this.panelCtrl.editingThresholds = false;
|
||||||
this.panelCtrl.render();
|
this.panelCtrl.render();
|
||||||
unbind();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// build notification model
|
// build notification model
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="panels-wrapper" ng-if="!ctrl.row.collapse">
|
<div class="panels-wrapper" ng-if="!ctrl.row.collapse">
|
||||||
<div class="dash-row-menu-container" data-click-hide>
|
<div class="dash-row-menu-container" data-click-hide ng-hide="ctrl.dashboard.meta.fullscreen">
|
||||||
<ul class="dash-row-menu" role="menu">
|
<ul class="dash-row-menu" role="menu">
|
||||||
<li>
|
<li>
|
||||||
<a ng-click="ctrl.toggleCollapse()">
|
<a ng-click="ctrl.toggleCollapse()">
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<div class="panel nospace" ng-if="panel" style="width: 100%">
|
<div class="panel panel--solo" ng-if="panel" style="width: 100%">
|
||||||
<plugin-component type="panel">
|
<plugin-component type="panel">
|
||||||
</plugin-component>
|
</plugin-component>
|
||||||
</div>
|
</div>
|
||||||
|
@ -26,13 +26,17 @@ function (angular, $) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.initPanelScope = function() {
|
$scope.initPanelScope = function() {
|
||||||
$scope.row = {
|
var panelInfo = $scope.dashboard.getPanelInfoById(panelId);
|
||||||
height: $(window).height() + 'px',
|
|
||||||
|
// fake row ctrl scope
|
||||||
|
$scope.ctrl = {
|
||||||
|
row: panelInfo.row,
|
||||||
|
dashboard: $scope.dashboard,
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.test = "Hej";
|
$scope.ctrl.row.height = $(window).height();
|
||||||
|
$scope.panel = panelInfo.panel;
|
||||||
$scope.$index = 0;
|
$scope.$index = 0;
|
||||||
$scope.panel = $scope.dashboard.getPanelById(panelId);
|
|
||||||
|
|
||||||
if (!$scope.panel) {
|
if (!$scope.panel) {
|
||||||
$scope.appEvent('alert-error', ['Panel not found', '']);
|
$scope.appEvent('alert-error', ['Panel not found', '']);
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
<div ng-show='dashboardMeta.canEdit' class="row-fluid add-row-panel-hint">
|
<div ng-show='dashboardMeta.canEdit' class="row-fluid add-row-panel-hint">
|
||||||
<div class="span12" style="text-align:right;">
|
<div class="span12" style="text-align:right;">
|
||||||
<span style="margin-right: 10px;" ng-click="addRowDefault()" class="pointer btn btn-secondary btn-small">
|
<span style="margin-right: 10px;" ng-click="addRowDefault()" class="pointer btn btn-inverse btn-small">
|
||||||
<span><i class="fa fa-plus"></i> ADD ROW</span>
|
<span><i class="fa fa-plus"></i> ADD ROW</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -100,7 +100,7 @@ export class ThresholdManager {
|
|||||||
handleTopPos = defaultHandleTopPos;
|
handleTopPos = defaultHandleTopPos;
|
||||||
} else {
|
} else {
|
||||||
var valueCanvasPos = this.plot.p2c({x: 0, y: value});
|
var valueCanvasPos = this.plot.p2c({x: 0, y: value});
|
||||||
handleTopPos = Math.min(Math.max(valueCanvasPos.top, 0), this.height) - 6;
|
handleTopPos = Math.round(Math.min(Math.max(valueCanvasPos.top, 0), this.height) - 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
var handleElem = $(this.getHandleHtml(handleIndex, model, valueStr));
|
var handleElem = $(this.getHandleHtml(handleIndex, model, valueStr));
|
||||||
|
@ -373,8 +373,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&--T0{
|
&--T0{
|
||||||
right: -105px;
|
right: -104px;
|
||||||
width: 128px;
|
width: 129px;
|
||||||
|
|
||||||
.alert-handle-line {
|
.alert-handle-line {
|
||||||
width: 28px;
|
width: 28px;
|
||||||
|
@ -22,6 +22,15 @@ div.flot-text {
|
|||||||
.panel {
|
.panel {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
float: left;
|
float: left;
|
||||||
|
|
||||||
|
&--solo {
|
||||||
|
.resize-panel-handle {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.panel-container {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel-margin {
|
.panel-margin {
|
||||||
|
Loading…
Reference in New Issue
Block a user