mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 09:28:51 +00:00
Merge pull request #864 from getredash/fix/datasource_show
Fix: data source loaded without properties
This commit is contained in:
commit
8688b1c432
@ -4,7 +4,7 @@
|
||||
var directives = angular.module('redash.directives');
|
||||
|
||||
// Angular strips data- from the directive, so data-source-form becomes sourceForm...
|
||||
directives.directive('sourceForm', ['$http', 'growl', function ($http, growl) {
|
||||
directives.directive('sourceForm', ['$http', 'growl', '$q', function ($http, growl, $q) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
replace: true,
|
||||
@ -34,7 +34,10 @@
|
||||
});
|
||||
});
|
||||
|
||||
$http.get('api/data_sources/types').success(function (types) {
|
||||
var typesPromise = $http.get('api/data_sources/types');
|
||||
|
||||
$q.all([typesPromise, $scope.dataSource.$promise]).then(function(responses) {
|
||||
var types = responses[0].data;
|
||||
setType(types);
|
||||
|
||||
$scope.dataSourceTypes = types;
|
||||
|
Loading…
Reference in New Issue
Block a user