Add enabled files in Kingbird-Dashboard.

These enabled files are required to create panel and
panel group in a horizon the steps are mentioned in README.rst

Change-Id: I65af14d28d8cfa795a0ebbe02e008f2d34ccc995
This commit is contained in:
Goutham Pratapa 2018-01-12 18:36:14 +05:30
parent fb2f4d70d1
commit 7e3536cb8b
5 changed files with 66 additions and 26 deletions

View File

@ -53,8 +53,9 @@ Install Kingbird Dashboard with all dependencies in your virtual environment::
And enable it in Horizon::
ln -s ../kingbird-dashboard/kingbird_dashboard/enabled/_90_project_kingbird_panelgroup.py openstack_dashboard/local/enabled
ln -s ../kingbird-dashboard/kingbird_dashboard/enabled/_91_project_kingbird_kingbirds_panel.py openstack_dashboard/local/enabled
ln -s ../kingbird-dashboard/kingbird_dashboard/enabled/_90_kingbird.py openstack_dashboard/local/enabled
ln -s ../kingbird-dashboard/kingbird_dashboard/enabled/_91_kingbird_quotasync.py openstack_dashboard/local/enabled
ln -s ../kingbird-dashboard/kingbird_dashboard/enabled/_92_kingbird_resourcesync.py openstack_dashboard/local/enabled
To run horizon with the newly enabled Kingbird Dashboard plugin run::

View File

@ -0,0 +1,25 @@
# Copyright (c) 2018 Ericsson AB.
#
# 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 kingbird_dashboard import exceptions
DASHBOARD = 'kingbird'
ADD_INSTALLED_APPS = ['kingbird_dashboard']
DEFAULT = True
ADD_EXCEPTIONS = {
'recoverable': exceptions.RECOVERABLE,
'not_found': exceptions.NOT_FOUND,
'unauthorized': exceptions.UNAUTHORIZED,
}

View File

@ -1,3 +1,6 @@
# Copyright (c) 2018 Ericsson AB.
# All Rights Reserved.
#
# 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
@ -10,27 +13,14 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.utils.translation import ugettext_lazy as _
# The slug of the panel group to be added to HORIZON_CONFIG. Required.
PANEL_GROUP = 'kingbird'
PANEL_GROUP = 'default'
# The display name of the PANEL_GROUP. Required.
PANEL_GROUP_NAME = _('Kingbird')
PANEL = 'quota_management'
# The slug of the dashboard the PANEL_GROUP associated with. Required.
PANEL_GROUP_DASHBOARD = 'kingbird'
PANEL_DASHBOARD = 'kingbird'
ADD_INSTALLED_APPS = ['kingbird_dashboard']
ADD_ANGULAR_MODULES = [
'horizon.dashboard.kingbird'
]
ADD_JS_FILES = [
'horizon/lib/angular/angular-route.js'
]
ADD_SCSS_FILES = [
'dashboard/kingbird/kingbird.scss'
]
AUTO_DISCOVER_STATIC_FILES = True
# Python panel class of the PANEL to be added
ADD_PANEL = 'kingbird_dashboard.quota_management.panel.QuotaManagement'

View File

@ -1,3 +1,5 @@
# Copyright (c) 2018 Ericsson AB.
#
# 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
@ -11,11 +13,11 @@
# under the License.
# The slug of the panel to be added to HORIZON_CONFIG. Required.
PANEL = 'kingbirds'
# The slug of the panel group the PANEL is associated with.
PANEL_GROUP = 'kingbird'
PANEL = 'resource_management'
# The slug of the dashboard the PANEL associated with. Required.
PANEL_DASHBOARD = 'kingbird'
# The slug of the panel group the PANEL is associated with.
PANEL_GROUP = 'default'
# Python panel class of the PANEL to be added.
ADD_PANEL = 'kingbird_dashboard.content.kingbirds.panel.Kingbirds'
ADD_PANEL = 'kingbird_dashboard.resource_management.panel.ResourceManagement'

View File

@ -0,0 +1,22 @@
# Copyright (c) 2018 Ericsson AB.
#
# 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 kingbirdclient import exceptions as kb_exception
from openstack_dashboard import exceptions
NOT_FOUND = exceptions.NOT_FOUND
RECOVERABLE = exceptions.RECOVERABLE + (kb_exception.APIException,)
UNAUTHORIZED = exceptions.UNAUTHORIZED