From fb1172280c7beb0b5de82030f49f23026b2b5698 Mon Sep 17 00:00:00 2001 From: Allen Gilliland <agilliland@gmail.com> Date: Wed, 9 Sep 2015 19:17:32 -0700 Subject: [PATCH] removing a bit more old angular homepage code that's not relevant any more. --- resources/frontend_client/app/controllers.js | 16 ---------- .../app/home/home.controllers.js | 29 ------------------- 2 files changed, 45 deletions(-) diff --git a/resources/frontend_client/app/controllers.js b/resources/frontend_client/app/controllers.js index 08005d18257..e6a80f52b16 100644 --- a/resources/frontend_client/app/controllers.js +++ b/resources/frontend_client/app/controllers.js @@ -39,22 +39,6 @@ MetabaseControllers.controller('Metabase', ['$scope', '$location', 'MetabaseCore }]); -MetabaseControllers.controller('Homepage', ['$scope', '$location', 'ipCookie', 'AppState', - function($scope, $location, ipCookie, AppState) { - - // At this point in time we don't actually have any kind of content to show for a homepage, so we just use this - // as a simple routing controller which sends users somewhere relevant - if (AppState.model.currentUser) { - $location.path('/dash/'); - } else { - // User is not logged-in, so always send them to login page - $location.path('/auth/login'); - } - - } -]); - - MetabaseControllers.controller('Unauthorized', ['$scope', '$location', function($scope, $location) { }]); diff --git a/resources/frontend_client/app/home/home.controllers.js b/resources/frontend_client/app/home/home.controllers.js index ed37b97956b..290cc33fd4b 100644 --- a/resources/frontend_client/app/home/home.controllers.js +++ b/resources/frontend_client/app/home/home.controllers.js @@ -1,7 +1,5 @@ 'use strict'; -import Table from "metabase/lib/table"; - import { createStore, applyMiddleware, combineReducers, compose } from 'redux'; import promiseMiddleware from 'redux-promise'; import thunkMidleware from "redux-thunk"; @@ -75,30 +73,3 @@ HomeControllers.controller('Homepage', ['$scope', '$location', '$route', '$route } }, true); }]); - - -HomeControllers.controller('HomeDatabaseList', ['$scope', 'Metabase', function($scope, Metabase) { - - $scope.databases = []; - $scope.currentDB = {}; - $scope.tables = []; - - Metabase.db_list(function (databases) { - $scope.databases = databases; - $scope.selectCurrentDB(0) - }, function (error) { - console.log(error); - }); - - - $scope.selectCurrentDB = function(index) { - $scope.currentDB = $scope.databases[index]; - Metabase.db_tables({ - 'dbId': $scope.currentDB.id - }, function (tables) { - $scope.tables = tables.filter(Table.isQueryable); - }, function (error) { - console.log(error); - }) - } -}]); -- GitLab