Call Tatu's authenticated API URL.

This commit is contained in:
Pino de Candia 2018-02-15 15:30:21 -06:00
parent a82ccdb3e6
commit 78c9e748dc
7 changed files with 35 additions and 11 deletions
tatudashboard/static/tatudashboard/resources

@ -59,7 +59,7 @@
*/
function list(params) {
var config = params ? {'params': params} : {};
return httpService.get(apiPassthroughUrl + 'noauth/authorities/', config)
return httpService.get(apiPassthroughUrl + 'authorities/', config)
.error(function () {
toastService.add('error', gettext('Unable to retrieve the CAs.'));
});
@ -76,7 +76,7 @@
* @returns {Object} The result of the API call
*/
function get(id) {
return httpService.get(apiPassthroughUrl + 'noauth/authorities/' + id + '/')
return httpService.get(apiPassthroughUrl + 'authorities/' + id + '/')
.error(function () {
toastService.add('error', gettext('Unable to retrieve the CA.'));
});

@ -59,6 +59,9 @@
.setProperty('auth_id', {
label: gettext('Project/CA ID')
})
.setProperty('name', {
label: gettext('Name')
})
.setProperty('host_pub_key', {
label: gettext('Host Public Key')
})
@ -72,6 +75,10 @@
id: 'auth_id',
priority: 1
})
.append({
id: 'name',
priority: 2
})
.append({
id: 'host_pub_key',
priority: 2

@ -59,7 +59,7 @@
*/
function list(params) {
var config = params ? {'params': params} : {};
return httpService.get(apiPassthroughUrl + 'noauth/hostcerts/', config)
return httpService.get(apiPassthroughUrl + 'hostcerts/', config)
.error(function () {
toastService.add('error', gettext('Unable to retrieve the certificates.'));
});
@ -76,7 +76,7 @@
* @returns {Object} The result of the API call
*/
function get(id) {
return httpService.get(apiPassthroughUrl + 'noauth/hostcerts/' + id + '/')
return httpService.get(apiPassthroughUrl + 'hostcerts/' + id + '/')
.error(function () {
toastService.add('error', gettext('Unable to retrieve the certificate.'));
});

@ -59,7 +59,7 @@
*/
function list(params) {
var config = params ? {'params': params} : {};
return httpService.get(apiPassthroughUrl + 'noauth/hosts/', config)
return httpService.get(apiPassthroughUrl + 'hosts/', config)
.error(function () {
toastService.add('error', gettext('Unable to retrieve the hosts.'));
});
@ -76,7 +76,7 @@
* @returns {Object} The result of the API call
*/
function get(id) {
return httpService.get(apiPassthroughUrl + 'noauth/hosts/' + id + '/')
return httpService.get(apiPassthroughUrl + 'hosts/' + id + '/')
.error(function () {
toastService.add('error', gettext('Unable to retrieve the host.'));
});

@ -59,7 +59,7 @@
*/
function list(params) {
var config = params ? {'params': params} : {};
return httpService.get(apiPassthroughUrl + 'noauth/pats/', config)
return httpService.get(apiPassthroughUrl + 'pats/', config)
.error(function () {
toastService.add('error', gettext('Unable to retrieve the PAT Gateways.'));
});

@ -57,7 +57,7 @@
* @returns {Object} The created user object
*/
function create(data) {
return httpService.post(apiPassthroughUrl + 'usergen/noauth/usercerts/', data)
return httpService.post(apiPassthroughUrl + 'usergen/usercerts/', data)
.error(function() {
toastService.add('error', gettext('Unable to create the certificate.'));
})
@ -75,7 +75,7 @@
*/
function revoke(user) {
var data = { 'serial': user.serial }
var url = apiPassthroughUrl + 'noauth/revokeduserkeys/' + user.auth_id + '/'
var url = apiPassthroughUrl + 'revokeduserkeys/' + user.auth_id + '/'
return httpService.post(url, data)
.error(function() {
toastService.add('error', gettext('Unable to revoke the certificate.'));
@ -97,7 +97,7 @@
*/
function list(params) {
var config = params ? {'params': params} : {};
return httpService.get(apiPassthroughUrl + 'noauth/usercerts/', config)
return httpService.get(apiPassthroughUrl + 'usercerts/', config)
.error(function () {
toastService.add('error', gettext('Unable to retrieve the users.'));
});
@ -114,7 +114,7 @@
* @returns {Object} The result of the API call
*/
function get(id) {
return httpService.get(apiPassthroughUrl + 'noauth/usercerts/' + id + '/')
return httpService.get(apiPassthroughUrl + 'usercerts/' + id + '/')
.error(function () {
toastService.add('error', gettext('Unable to retrieve the user.'));
});

@ -68,6 +68,15 @@
.setProperty('user_id', {
label: gettext('User ID')
})
.setProperty('user_name', {
label: gettext('User Name')
})
.setProperty('created_at', {
label: gettext('Created')
})
.setProperty('expires_at', {
label: gettext('Expires')
})
.setProperty('fingerprint', {
label: gettext('Fingerprint')
})
@ -102,6 +111,14 @@
id: 'revoked',
priority: 2
})
.append({
id: 'expires_at',
priority: 2
})
.append({
id: 'principals',
priority: 2
})
.append({
id: 'serial',
priority: 2