More attempts.
This commit is contained in:
parent
20b48f3e0c
commit
5c1cba79d8
24
tatudashboard/dashboard.py
Normal file
24
tatudashboard/dashboard.py
Normal file
@ -0,0 +1,24 @@
|
||||
# Copyright (c) 2016 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.
|
||||
|
||||
import horizon
|
||||
|
||||
|
||||
class SSH(horizon.Dashboard):
|
||||
name = "SSH Management"
|
||||
slug = "tatu"
|
||||
default_panel = "ssh_ca"
|
||||
|
||||
|
||||
horizon.register(SSH)
|
0
tatudashboard/dashboards/project/dummy/__init__.py
Normal file
0
tatudashboard/dashboards/project/dummy/__init__.py
Normal file
25
tatudashboard/dashboards/project/dummy/panel.py
Normal file
25
tatudashboard/dashboards/project/dummy/panel.py
Normal file
@ -0,0 +1,25 @@
|
||||
# (c) Copyright 2015 Hewlett-Packard Development Company, L.P.
|
||||
#
|
||||
# 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.
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
from openstack_dashboard.dashboards.project import dashboard
|
||||
|
||||
|
||||
class Hosts(horizon.Panel):
|
||||
name = _("SSH Hosts")
|
||||
slug = 'ssh_hosts'
|
||||
permissions = ('openstack.services.dns',)
|
||||
|
||||
dashboard.Project.register(Hosts)
|
25
tatudashboard/enabled/_3980_ssh_dashboard.py
Normal file
25
tatudashboard/enabled/_3980_ssh_dashboard.py
Normal file
@ -0,0 +1,25 @@
|
||||
# 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.
|
||||
|
||||
|
||||
# The name of the dashboard to be added to HORIZON['dashboards']. Required.
|
||||
DASHBOARD = 'tatu'
|
||||
|
||||
# If set to True, this dashboard will not be added to the settings.
|
||||
DISABLED = False
|
||||
|
||||
ADD_INSTALLED_APPS = ['tatudashboard']
|
||||
|
||||
# Automatically discover static resources in installed apps
|
||||
AUTO_DISCOVER_STATIC_FILES = True
|
28
tatudashboard/enabled/_3981_ssh_ca_panel.py
Normal file
28
tatudashboard/enabled/_3981_ssh_ca_panel.py
Normal file
@ -0,0 +1,28 @@
|
||||
# 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.
|
||||
|
||||
PANEL = 'ssh_ca'
|
||||
PANEL_GROUP = 'default'
|
||||
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.panels.ca.panel.CA'
|
||||
|
||||
ADD_ANGULAR_MODULES = ['tatudashboard']
|
||||
|
||||
AUTO_DISCOVER_STATIC_FILES = True
|
0
tatudashboard/panels/__init__.py
Normal file
0
tatudashboard/panels/__init__.py
Normal file
0
tatudashboard/panels/ca/__init__.py
Normal file
0
tatudashboard/panels/ca/__init__.py
Normal file
25
tatudashboard/panels/ca/panel.py
Normal file
25
tatudashboard/panels/ca/panel.py
Normal file
@ -0,0 +1,25 @@
|
||||
# Copyright (c) 2016 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.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
from openstack_dashboard.dashboards.project import dashboard
|
||||
|
||||
|
||||
class CA(horizon.Panel):
|
||||
name = _("SSH CA")
|
||||
slug = 'ssh_ca'
|
||||
|
||||
dashboard.Project.register(CA)
|
22
tatudashboard/panels/ca/urls.py
Normal file
22
tatudashboard/panels/ca/urls.py
Normal file
@ -0,0 +1,22 @@
|
||||
# Copyright (c) 2016 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.
|
||||
|
||||
from django.conf.urls import url
|
||||
|
||||
from . import views
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
url('', views.IndexView.as_view(), name='index'),
|
||||
]
|
19
tatudashboard/panels/ca/views.py
Normal file
19
tatudashboard/panels/ca/views.py
Normal file
@ -0,0 +1,19 @@
|
||||
# Copyright (c) 2016 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.
|
||||
|
||||
from django.views import generic
|
||||
|
||||
|
||||
class IndexView(generic.TemplateView):
|
||||
template_name = 'angular.html'
|
4
tatudashboard/static/tatudashboard/ca.html
Normal file
4
tatudashboard/static/tatudashboard/ca.html
Normal file
@ -0,0 +1,4 @@
|
||||
<hz-resource-panel resource-type-name="OS::Tatu::CA">
|
||||
<hz-resource-table resource-type-name="OS::Tatu::CA"
|
||||
track-by="_timestampId"></hz-resource-table>
|
||||
</hz-resource-panel>
|
@ -0,0 +1,78 @@
|
||||
/**
|
||||
* (c) Copyright 2016 Hewlett Packard Enterprise Development LP
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @ngdoc overview
|
||||
* @ngname tatudashboard.resources.os-tatu-host
|
||||
*
|
||||
* @description
|
||||
* Provides all of the services and widgets required
|
||||
* to support and display SSH (Tatu) host related content.
|
||||
*/
|
||||
angular
|
||||
.module('tatudashboard.resources.os-tatu-ca', [
|
||||
'ngRoute',
|
||||
])
|
||||
.constant(
|
||||
'tatudashboard.resources.os-tatu-host.resourceType', 'OS::Tatu::CA')
|
||||
.run(run);
|
||||
|
||||
run.$inject = [
|
||||
'horizon.framework.conf.resource-type-registry.service',
|
||||
'tatudashboard.resources.os-tatu-host.resourceType'
|
||||
];
|
||||
|
||||
function run(registry,
|
||||
resourceTypeString) {
|
||||
var resourceType = registry.getResourceType(resourceTypeString);
|
||||
resourceType
|
||||
.setNames(gettext('SSH CA'), gettext('SSH CAs'))
|
||||
.setListFunction(listCAs)
|
||||
.setProperty('id', {
|
||||
label: gettext('CA ID')
|
||||
})
|
||||
.setProperty('host_pub_key', {
|
||||
label: gettext('Host Public Key'),
|
||||
})
|
||||
.setProperty('user_pub_key', {
|
||||
label: gettext('User Public Key'),
|
||||
});
|
||||
|
||||
resourceType
|
||||
.tableColumns
|
||||
.append({
|
||||
id: 'id',
|
||||
priority: 1
|
||||
})
|
||||
.append({
|
||||
id: 'host_pub_key',
|
||||
priority: 2,
|
||||
})
|
||||
.append({
|
||||
id: 'user_pub_key',
|
||||
priority: 2,
|
||||
});
|
||||
|
||||
|
||||
function listHosts() {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
})();
|
Loading…
x
Reference in New Issue
Block a user