Fixed passthrough API
This commit is contained in:
parent
42222f641f
commit
4b3a02677b
@ -1,16 +0,0 @@
|
|||||||
# Copyright (c) 2017 Huawei, Inc.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
"""REST API for Horizon dashboard Javascript code.
|
|
||||||
"""
|
|
||||||
from . import passthrough # noqa
|
|
@ -0,0 +1 @@
|
|||||||
|
from tatudashboard import rest_api
|
@ -19,6 +19,8 @@ PANEL_DASHBOARD = 'project'
|
|||||||
# If set to True, this dashboard will not be added to the settings.
|
# If set to True, this dashboard will not be added to the settings.
|
||||||
DISABLED = False
|
DISABLED = False
|
||||||
|
|
||||||
|
ADD_INSTALLED_APPS = ['tatudashboard']
|
||||||
|
|
||||||
ADD_PANEL = 'tatudashboard.dashboards.tatu.ca.panel.CA'
|
ADD_PANEL = 'tatudashboard.dashboards.tatu.ca.panel.CA'
|
||||||
|
|
||||||
ADD_ANGULAR_MODULES = ['tatudashboard']
|
ADD_ANGULAR_MODULES = ['tatudashboard']
|
||||||
|
1
tatudashboard/rest_api/__init__.py
Normal file
1
tatudashboard/rest_api/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
from . import passthrough
|
@ -56,28 +56,28 @@
|
|||||||
resourceType
|
resourceType
|
||||||
.setNames(gettext('SSH CA'), gettext('SSH CAs'))
|
.setNames(gettext('SSH CA'), gettext('SSH CAs'))
|
||||||
.setListFunction(listCAs)
|
.setListFunction(listCAs)
|
||||||
.setProperty('id', {
|
.setProperty('auth_id', {
|
||||||
label: gettext('CA ID')
|
label: gettext('Project/CA ID')
|
||||||
})
|
})
|
||||||
.setProperty('host_pub_key', {
|
.setProperty('host_key.pub', {
|
||||||
label: gettext('Host Public Key')
|
label: gettext('Host Public Key')
|
||||||
})
|
})
|
||||||
.setProperty('user_pub_key', {
|
.setProperty('user_key.pub', {
|
||||||
label: gettext('User Public Key')
|
label: gettext('User Public Key')
|
||||||
});
|
});
|
||||||
|
|
||||||
resourceType
|
resourceType
|
||||||
.tableColumns
|
.tableColumns
|
||||||
.append({
|
.append({
|
||||||
id: 'id',
|
id: 'auth_id',
|
||||||
priority: 1
|
priority: 1
|
||||||
})
|
})
|
||||||
.append({
|
.append({
|
||||||
id: 'host_pub_key',
|
id: 'host_key.pub',
|
||||||
priority: 2
|
priority: 2
|
||||||
})
|
})
|
||||||
.append({
|
.append({
|
||||||
id: 'user_pub_key',
|
id: 'user_key.pub',
|
||||||
priority: 2
|
priority: 2
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -85,9 +85,9 @@
|
|||||||
function listCAs() {
|
function listCAs() {
|
||||||
return caApi.list().then(function onList(response) {
|
return caApi.list().then(function onList(response) {
|
||||||
// listFunctions are expected to return data in "items"
|
// listFunctions are expected to return data in "items"
|
||||||
response.data.items = response.data.CAs;
|
//response.data.items = response.data.CAs;
|
||||||
|
|
||||||
util.addTimestampIds(response.data.items, 'updated_at');
|
util.addTimestampIds(response.data.items, 'auth_id');
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user