Api token -> api key rename
This commit is contained in:
@@ -16,17 +16,17 @@ function (angular) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.getTokens = function() {
|
$scope.getTokens = function() {
|
||||||
backendSrv.get('/api/tokens').then(function(tokens) {
|
backendSrv.get('/api/auth/keys').then(function(tokens) {
|
||||||
$scope.tokens = tokens;
|
$scope.tokens = tokens;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.removeToken = function(id) {
|
$scope.removeToken = function(id) {
|
||||||
backendSrv.delete('/api/tokens/'+id).then($scope.getTokens);
|
backendSrv.delete('/api/auth/keys/'+id).then($scope.getTokens);
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.addToken = function() {
|
$scope.addToken = function() {
|
||||||
backendSrv.post('/api/tokens', $scope.token).then($scope.getTokens);
|
backendSrv.post('/api/auth/keys', $scope.token).then($scope.getTokens);
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.init();
|
$scope.init();
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
<tr ng-repeat="t in tokens">
|
<tr ng-repeat="t in tokens">
|
||||||
<td>{{t.name}}</td>
|
<td>{{t.name}}</td>
|
||||||
<td>{{t.role}}</td>
|
<td>{{t.role}}</td>
|
||||||
<td>{{t.token}}</td>
|
<td>{{t.key}}</td>
|
||||||
<td style="width: 1%">
|
<td style="width: 1%">
|
||||||
<a ng-click="removeToken(t.id)" class="btn btn-danger btn-mini">
|
<a ng-click="removeToken(t.id)" class="btn btn-danger btn-mini">
|
||||||
<i class="fa fa-remove"></i>
|
<i class="fa fa-remove"></i>
|
||||||
|
|||||||
Reference in New Issue
Block a user