feat(alerting): changed name of root Alerts nav item and page from Alerts to Alerting

pull/5622/head
Torkel Ödegaard 9 years ago
parent f36a44c49a
commit 70cb8400c3
  1. 3
      pkg/api/api.go
  2. 4
      pkg/api/index.go
  3. 1
      pkg/services/sqlstore/migrations/alert_mig.go
  4. 19
      public/app/core/routes/routes.ts
  5. 0
      public/app/features/alerting/alert_def.ts
  6. 0
      public/app/features/alerting/alert_log_ctrl.ts
  7. 4
      public/app/features/alerting/alerts_ctrl.ts
  8. 0
      public/app/features/alerting/all.ts
  9. 8
      public/app/features/alerting/partials/alert_list.html
  10. 2
      public/app/features/alerting/partials/alert_log.html

@ -58,8 +58,7 @@ func Register(r *macaron.Macaron) {
r.Get("/playlists/", reqSignedIn, Index)
r.Get("/playlists/*", reqSignedIn, Index)
r.Get("/alerts/", reqSignedIn, Index)
r.Get("/alerts/*", reqSignedIn, Index)
r.Get("/alerting/", reqSignedIn, Index)
// sign up
r.Get("/signup", Index)

@ -81,9 +81,9 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) {
if setting.AlertingEnabled && (c.OrgRole == m.ROLE_ADMIN || c.OrgRole == m.ROLE_EDITOR) {
data.MainNavLinks = append(data.MainNavLinks, &dtos.NavLink{
Text: "Alerts",
Text: "Alerting",
Icon: "icon-gf icon-gf-monitoring",
Url: setting.AppSubUrl + "/alerts",
Url: setting.AppSubUrl + "/alerting",
})
}

@ -72,5 +72,4 @@ func addAlertMigrations(mg *Migrator) {
}
mg.AddMigration("create alert_heartbeat table v1", NewAddTableMigration(alert_heartbeat))
}

@ -13,7 +13,7 @@ function setupAngularRoutes($routeProvider, $locationProvider) {
var loadOrgBundle = new BundleLoader('app/features/org/all');
var loadPluginsBundle = new BundleLoader('app/features/plugins/all');
var loadAdminBundle = new BundleLoader('app/features/admin/admin');
var loadAlertsBundle = new BundleLoader('app/features/alerts/all');
var loadAlertingBundle = new BundleLoader('app/features/alerting/all');
$routeProvider
.when('/', {
@ -190,25 +190,22 @@ function setupAngularRoutes($routeProvider, $locationProvider) {
controllerAs: 'ctrl',
resolve: loadPluginsBundle,
})
.when('/global-alerts', {
templateUrl: 'public/app/features/dashboard/partials/globalAlerts.html',
})
.when('/styleguide/:page?', {
controller: 'StyleGuideCtrl',
controllerAs: 'ctrl',
templateUrl: 'public/app/features/styleguide/styleguide.html',
})
.when('/alerts', {
templateUrl: 'public/app/features/alerts/partials/alerts_page.html',
controller: 'AlertPageCtrl',
.when('/alerting', {
templateUrl: 'public/app/features/alerting/partials/alert_list.html',
controller: 'AlertListCtrl',
controllerAs: 'ctrl',
resolve: loadAlertsBundle,
resolve: loadAlertingBundle,
})
.when('/alerts/:alertId/states', {
templateUrl: 'public/app/features/alerts/partials/alert_log.html',
.when('/alerting/:alertId/states', {
templateUrl: 'public/app/features/alerting/partials/alert_log.html',
controller: 'AlertLogCtrl',
controllerAs: 'ctrl',
resolve: loadAlertsBundle,
resolve: loadAlertingBundle,
})
.otherwise({
templateUrl: 'public/app/partials/error.html',

@ -6,7 +6,7 @@ import coreModule from '../../core/core_module';
import config from 'app/core/config';
import alertDef from './alert_def';
export class AlertPageCtrl {
export class AlertListCtrl {
alerts: any;
filter = {
@ -58,5 +58,5 @@ export class AlertPageCtrl {
}
}
coreModule.controller('AlertPageCtrl', AlertPageCtrl);
coreModule.controller('AlertListCtrl', AlertListCtrl);

@ -1,9 +1,9 @@
<navbar icon="fa fa-fw fa-list" title="Alerts" title-url="alerts">
<navbar icon="fa fa-fw fa-list" title="Alerting" title-url="alerting">
</navbar>
<div class="page-container" >
<div class="page-header">
<h1>Alerts</h1>
<h1>Alerting</h1>
<div class="gf-form-inline pull-right">
<gf-form-switch class="gf-form" label="Ok" label-class="width-5" checked="ctrl.filter.ok" on-change="ctrl.updateFilter()"></gf-form-switch>
<gf-form-switch class="gf-form" label="Warn" label-class="width-5" checked="ctrl.filter.warn" on-change="ctrl.updateFilter()"></gf-form-switch>
@ -20,12 +20,12 @@
</thead>
<tr ng-repeat="alert in ctrl.alerts">
<td>
<a href="alerts/{{alert.id}}/states">
<a href="alerting/{{alert.id}}/states">
{{alert.title}}
</a>
</td>
<td class="text-center">
<a href="alerts/{{alert.id}}/states">
<a href="alerting/{{alert.id}}/states">
<i class="icon-gf {{alert.iconCss}}"></i>
</a>
</td>

@ -1,4 +1,4 @@
<navbar icon="fa fa-fw fa-list" title="Alerts" title-url="alerts">
<navbar icon="fa fa-fw fa-list" title="Alerts" title-url="alerting">
</navbar>
<div class="page-container" >
Loading…
Cancel
Save