diff --git a/migrations/add_queue_name_to_data_source.py b/migrations/add_queue_name_to_data_source.py index 7151f67f..a222e387 100644 --- a/migrations/add_queue_name_to_data_source.py +++ b/migrations/add_queue_name_to_data_source.py @@ -1,5 +1,5 @@ from playhouse.migrate import Migrator -from redash import db +from redash.models import db from redash import models @@ -10,4 +10,4 @@ if __name__ == '__main__': migrator.add_column(models.DataSource, models.DataSource.queue_name, 'queue_name') migrator.add_column(models.DataSource, models.DataSource.scheduled_queue_name, 'scheduled_queue_name') - db.close_db(None) \ No newline at end of file + db.close_db(None) diff --git a/migrations/permissions_migration.py b/migrations/permissions_migration.py index beae8a31..3f44a001 100644 --- a/migrations/permissions_migration.py +++ b/migrations/permissions_migration.py @@ -1,7 +1,7 @@ import peewee from playhouse.migrate import Migrator -from redash import db from redash import models +from redash.models import db if __name__ == '__main__': diff --git a/rd_ui/app/scripts/app.js b/rd_ui/app/scripts/app.js index 81d38973..a5d81f67 100644 --- a/rd_ui/app/scripts/app.js +++ b/rd_ui/app/scripts/app.js @@ -74,6 +74,11 @@ angular.module('redash', [ templateUrl: '/views/admin_status.html', controller: 'AdminStatusCtrl' }); + $routeProvider.when('/admin/workers', { + templateUrl: '/views/admin_workers.html', + controller: 'AdminWorkersCtrl' + }); + $routeProvider.when('/', { templateUrl: '/views/index.html', controller: 'IndexCtrl' diff --git a/rd_ui/app/scripts/controllers/admin_controllers.js b/rd_ui/app/scripts/controllers/admin_controllers.js index 170c5ed3..f4a891bf 100644 --- a/rd_ui/app/scripts/controllers/admin_controllers.js +++ b/rd_ui/app/scripts/controllers/admin_controllers.js @@ -16,9 +16,16 @@ $timeout(refresh, 59 * 1000); }; + $scope.flowerUrl = featureFlags.flowerUrl; + refresh(); } + var AdminWorkersCtrl = function ($scope, $sce) { + $scope.flowerUrl = $sce.trustAsResourceUrl(featureFlags.flowerUrl); + }; + angular.module('redash.admin_controllers', []) .controller('AdminStatusCtrl', ['$scope', 'Events', '$http', '$timeout', AdminStatusCtrl]) + .controller('AdminWorkersCtrl', ['$scope', '$sce', AdminWorkersCtrl]) })(); diff --git a/rd_ui/app/styles/redash.css b/rd_ui/app/styles/redash.css index 85db12c6..06bf79a4 100644 --- a/rd_ui/app/styles/redash.css +++ b/rd_ui/app/styles/redash.css @@ -268,6 +268,10 @@ pivot-table-renderer > table, grid-renderer > div, visualization-renderer > div overflow: auto; } +.iframe-container { + height: 100%; +} + /* bootstrap's hidden-xs class adds display:block when not hidden use this class when you need to keep the original display value diff --git a/rd_ui/app/views/admin_status.html b/rd_ui/app/views/admin_status.html index a08e6c3a..6c8af4c7 100644 --- a/rd_ui/app/views/admin_status.html +++ b/rd_ui/app/views/admin_status.html @@ -20,9 +20,9 @@ Started -
  • - {{manager.queue_size}} - Queue Size + +
  • + Workers' Status