Fixed passthrough API

This commit is contained in:
Pino de Candia 2018-01-16 14:48:40 +00:00
parent 42222f641f
commit 4b3a02677b
7 changed files with 13 additions and 25 deletions

View File

@ -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

View File

@ -0,0 +1 @@
from tatudashboard import rest_api

View File

@ -19,6 +19,8 @@ PANEL_DASHBOARD = 'project'
# If set to True, this dashboard will not be added to the settings.
DISABLED = False
ADD_INSTALLED_APPS = ['tatudashboard']
ADD_PANEL = 'tatudashboard.dashboards.tatu.ca.panel.CA'
ADD_ANGULAR_MODULES = ['tatudashboard']

View File

@ -0,0 +1 @@
from . import passthrough

View File

@ -56,28 +56,28 @@
resourceType
.setNames(gettext('SSH CA'), gettext('SSH CAs'))
.setListFunction(listCAs)
.setProperty('id', {
label: gettext('CA ID')
.setProperty('auth_id', {
label: gettext('Project/CA ID')
})
.setProperty('host_pub_key', {
.setProperty('host_key.pub', {
label: gettext('Host Public Key')
})
.setProperty('user_pub_key', {
.setProperty('user_key.pub', {
label: gettext('User Public Key')
});
resourceType
.tableColumns
.append({
id: 'id',
id: 'auth_id',
priority: 1
})
.append({
id: 'host_pub_key',
id: 'host_key.pub',
priority: 2
})
.append({
id: 'user_pub_key',
id: 'user_key.pub',
priority: 2
});
@ -85,9 +85,9 @@
function listCAs() {
return caApi.list().then(function onList(response) {
// 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;
});