diff --git a/public/app/core/routes/routes.ts b/public/app/core/routes/routes.ts
index 8963228210b..82da84fbc56 100644
--- a/public/app/core/routes/routes.ts
+++ b/public/app/core/routes/routes.ts
@@ -45,6 +45,7 @@ function setupAngularRoutes($routeProvider, $locationProvider) {
.when('/datasources', {
templateUrl: 'public/app/features/datasources/partials/list.html',
controller : 'DataSourcesCtrl',
+ controllerAs: 'ctrl',
resolve: loadOrgBundle,
})
.when('/datasources/edit/:id', {
diff --git a/public/app/features/datasources/list_ctrl.js b/public/app/features/datasources/list_ctrl.js
deleted file mode 100644
index da77df252e1..00000000000
--- a/public/app/features/datasources/list_ctrl.js
+++ /dev/null
@@ -1,36 +0,0 @@
-define([
- 'angular',
- 'lodash',
-],
-function (angular) {
- 'use strict';
-
- var module = angular.module('grafana.controllers');
-
- module.controller('DataSourcesCtrl', function($scope, $http, backendSrv, datasourceSrv) {
-
- $scope.init = function() {
- $scope.datasources = [];
- $scope.getDatasources();
- };
-
- $scope.getDatasources = function() {
- backendSrv.get('/api/datasources').then(function(results) {
- $scope.datasources = results;
- });
- };
-
- $scope.remove = function(ds) {
- backendSrv.delete('/api/datasources/' + ds.id).then(function() {
- $scope.getDatasources();
-
- backendSrv.get('/api/frontend/settings').then(function(settings) {
- datasourceSrv.init(settings.datasources);
- });
- });
- };
-
- $scope.init();
-
- });
-});
diff --git a/public/app/features/datasources/list_ctrl.ts b/public/app/features/datasources/list_ctrl.ts
new file mode 100644
index 00000000000..b1f93f1a158
--- /dev/null
+++ b/public/app/features/datasources/list_ctrl.ts
@@ -0,0 +1,52 @@
+///
| Name | @@ -27,7 +27,7 @@|
|---|---|
| {{ds.name}} @@ -48,7 +48,7 @@ | - + |