mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 01:25:16 +00:00
Naming and indentation fixes
This commit is contained in:
parent
b748eb14f4
commit
19e5a0af86
@ -156,14 +156,14 @@
|
|||||||
$scope.recentDashboards = Dashboard.recent();
|
$scope.recentDashboards = Dashboard.recent();
|
||||||
};
|
};
|
||||||
|
|
||||||
// Controller for modal window share_permissions, works for both query and dashboards, needs api_access set in scope
|
// Controller for modal window share_permissions, works for both query and dashboards, needs apiAccess set in scope
|
||||||
var SharePermissionsCtrl = function ($scope, $http, $modalInstance, User) {
|
var SharePermissionsCtrl = function ($scope, $http, $modalInstance, User) {
|
||||||
$scope.grantees = [];
|
$scope.grantees = [];
|
||||||
$scope.newGrantees = {};
|
$scope.newGrantees = {};
|
||||||
|
|
||||||
// List users that are granted permissions
|
// List users that are granted permissions
|
||||||
var loadGrantees = function() {
|
var loadGrantees = function() {
|
||||||
$http.get($scope.api_access).success(function(result) {
|
$http.get($scope.apiAccess).success(function(result) {
|
||||||
$scope.grantees = [];
|
$scope.grantees = [];
|
||||||
for(var access_type in result) {
|
for(var access_type in result) {
|
||||||
result[access_type].forEach(function(grantee) {
|
result[access_type].forEach(function(grantee) {
|
||||||
@ -196,7 +196,7 @@
|
|||||||
$scope.addGrantee = function(user) {
|
$scope.addGrantee = function(user) {
|
||||||
$scope.newGrantees.selected = undefined;
|
$scope.newGrantees.selected = undefined;
|
||||||
var body = {'access_type': 'modify', 'user_id': user.id};
|
var body = {'access_type': 'modify', 'user_id': user.id};
|
||||||
$http.post($scope.api_access, body).success(function() {
|
$http.post($scope.apiAccess, body).success(function() {
|
||||||
user.alreadyGrantee = true;
|
user.alreadyGrantee = true;
|
||||||
loadGrantees();
|
loadGrantees();
|
||||||
});
|
});
|
||||||
@ -205,7 +205,7 @@
|
|||||||
// Remove user from grantees list
|
// Remove user from grantees list
|
||||||
$scope.removeGrantee = function(user) {
|
$scope.removeGrantee = function(user) {
|
||||||
var body = {'access_type': 'modify', 'user_id': user.id};
|
var body = {'access_type': 'modify', 'user_id': user.id};
|
||||||
$http({ url: $scope.api_access, method: 'DELETE',
|
$http({ url: $scope.apiAccess, method: 'DELETE',
|
||||||
data: body, headers: {"Content-Type": "application/json"}
|
data: body, headers: {"Content-Type": "application/json"}
|
||||||
}).success(function() {
|
}).success(function() {
|
||||||
$scope.grantees = _.filter($scope.grantees, function(m) { return m != user });
|
$scope.grantees = _.filter($scope.grantees, function(m) { return m != user });
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu pull-right" dropdown-menu>
|
<ul class="dropdown-menu pull-right" dropdown-menu>
|
||||||
<li><a data-toggle="modal" hash-link hash="edit_dashboard_dialog">Edit Dashboard</a></li>
|
<li><a data-toggle="modal" hash-link hash="edit_dashboard_dialog">Edit Dashboard</a></li>
|
||||||
<li><a ng-click="showSharePermissionsModal()">Share Edit Permissions</a></li>
|
|
||||||
<li><a data-toggle="modal" hash-link hash="add_query_dialog">Add Widget</a></li>
|
<li><a data-toggle="modal" hash-link hash="add_query_dialog">Add Widget</a></li>
|
||||||
|
<li><a ng-click="showSharePermissionsModal()">Manage Permissions</a></li>
|
||||||
<li ng-if="!dashboard.is_archived"><a ng-click="archiveDashboard()">Archive Dashboard</a></li>
|
<li ng-if="!dashboard.is_archived"><a ng-click="archiveDashboard()">Archive Dashboard</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -125,7 +125,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu pull-right" dropdown-menu>
|
<ul class="dropdown-menu pull-right" dropdown-menu>
|
||||||
<li ng-if="!query.is_archived && query.id != undefined && (isQueryOwner || currentUser.hasPermission('admin'))"><a hash-link hash="archive-confirmation-modal" data-toggle="modal">Archive Query</a></li>
|
<li ng-if="!query.is_archived && query.id != undefined && (isQueryOwner || currentUser.hasPermission('admin'))"><a hash-link hash="archive-confirmation-modal" data-toggle="modal">Archive Query</a></li>
|
||||||
<li ng-if="!query.is_archived && query.id != undefined && (isQueryOwner || currentUser.hasPermission('admin'))"><a ng-click="showSharePermissionsModal()">Share Edit Permissions</a></li>
|
<li ng-if="!query.is_archived && query.id != undefined && (isQueryOwner || currentUser.hasPermission('admin'))"><a ng-click="showSharePermissionsModal()">Manage Permissions</a></li>
|
||||||
<li ng-if="query.id != undefined"><a ng-click="showApiKey()">Show API Key</a></li>
|
<li ng-if="query.id != undefined"><a ng-click="showApiKey()">Show API Key</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user