From 77768038905b9b392d732aace69d93af3563aa32 Mon Sep 17 00:00:00 2001 From: utkarshcmu Date: Wed, 23 Dec 2015 01:46:23 -0800 Subject: [PATCH] Removed unused components --- public/app/features/dashboard/all.js | 1 - public/app/features/dashboard/playlistCtrl.js | 55 ---------- public/app/partials/playlist.html | 100 ------------------ public/app/partials/search.html | 4 - 4 files changed, 160 deletions(-) delete mode 100644 public/app/features/dashboard/playlistCtrl.js delete mode 100644 public/app/partials/playlist.html diff --git a/public/app/features/dashboard/all.js b/public/app/features/dashboard/all.js index 0ee3a64a806..524441b7a99 100644 --- a/public/app/features/dashboard/all.js +++ b/public/app/features/dashboard/all.js @@ -4,7 +4,6 @@ define([ './dashboardNavCtrl', './snapshotTopNavCtrl', './saveDashboardAsCtrl', - './playlistCtrl', './rowCtrl', './shareModalCtrl', './shareSnapshotCtrl', diff --git a/public/app/features/dashboard/playlistCtrl.js b/public/app/features/dashboard/playlistCtrl.js deleted file mode 100644 index 9242905405a..00000000000 --- a/public/app/features/dashboard/playlistCtrl.js +++ /dev/null @@ -1,55 +0,0 @@ -define([ - 'angular', - 'lodash', - 'app/core/config' -], -function (angular, _, config) { - 'use strict'; - - var module = angular.module('grafana.controllers'); - - module.controller('PlaylistCtrl', function($scope, playlistSrv, backendSrv) { - - $scope.init = function() { - $scope.playlist = []; - $scope.timespan = config.playlist_timespan; - $scope.search(); - }; - - $scope.search = function() { - var query = {starred: true, limit: 10}; - - if ($scope.searchQuery) { - query.query = $scope.searchQuery; - query.starred = false; - } - - backendSrv.search(query).then(function(results) { - $scope.searchHits = results; - $scope.filterHits(); - }); - }; - - $scope.filterHits = function() { - $scope.filteredHits = _.reject($scope.searchHits, function(dash) { - return _.findWhere($scope.playlist, {uri: dash.uri}); - }); - }; - - $scope.addDashboard = function(dashboard) { - $scope.playlist.push(dashboard); - $scope.filterHits(); - }; - - $scope.removeDashboard = function(dashboard) { - $scope.playlist = _.without($scope.playlist, dashboard); - $scope.filterHits(); - }; - - $scope.start = function() { - playlistSrv.start($scope.playlist, $scope.timespan); - }; - - }); - -}); diff --git a/public/app/partials/playlist.html b/public/app/partials/playlist.html deleted file mode 100644 index 3d12e5af2d6..00000000000 --- a/public/app/partials/playlist.html +++ /dev/null @@ -1,100 +0,0 @@ -
-
-
- - Start dashboard playlist -
- - - -
- -
-
-
-
-
-
    -
  • - Search -
  • -
  • - -
  • -
-
-
-
-
-
- -
-
-
Search result
- - - - - - - - -
- {{dashboard.title}} - - -
- No dashboards found -
-
-
-
Playlist dashboards
- - - - - - - - - -
- {{dashboard.title}} - - -
- Playlist empty -
-
-
- -
-
-
-
-
    -
  • - Timespan between dashboard change -
  • -
  • - -
  • -
  • - -
  • -
-
-
-
- -
- -
-
diff --git a/public/app/partials/search.html b/public/app/partials/search.html index 97bdbc496bf..fab8fd9291a 100644 --- a/public/app/partials/search.html +++ b/public/app/partials/search.html @@ -71,10 +71,6 @@ Import -