Merge pull request #7 from ediardo/AddDashboardPanel
Move the panel dashboard outside of the project section
This commit is contained in:
commit
cb7922c74c
1
AUTHORS
1
AUTHORS
|
@ -2,3 +2,4 @@ Chris Spencer <christopher.m.spencer@intel.com>
|
||||||
Eddie Ramirez <djedi.r@gmail.com>
|
Eddie Ramirez <djedi.r@gmail.com>
|
||||||
Eddie Ramirez <eddie.ramirez@intel.com>
|
Eddie Ramirez <eddie.ramirez@intel.com>
|
||||||
Luis Daniel Castellanos <luis.daniel.castellanos@intel.com>
|
Luis Daniel Castellanos <luis.daniel.castellanos@intel.com>
|
||||||
|
Revon Mathews <revon.mathews@intel.com>
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
CHANGES
|
CHANGES
|
||||||
=======
|
=======
|
||||||
|
|
||||||
|
* Move the panel dashboard outside of the project section
|
||||||
|
* Removed the docstrings from the start of file
|
||||||
|
* Removed PEP8 errors
|
||||||
|
* More files to ignore
|
||||||
* [WIP] Added code base for unit testing and code refactoring
|
* [WIP] Added code base for unit testing and code refactoring
|
||||||
* Added some files and stuff
|
* Added some files and stuff
|
||||||
* dummy test
|
* dummy test
|
||||||
|
|
|
@ -14,9 +14,12 @@
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
|
from craton_dashboard import dashboard
|
||||||
import horizon
|
import horizon
|
||||||
|
|
||||||
|
|
||||||
class Inventory(horizon.Panel):
|
class Inventory(horizon.Panel):
|
||||||
name = _('Inventory')
|
name = _('Inventory')
|
||||||
slug = 'fleet.inventory'
|
slug = 'inventory'
|
||||||
|
|
||||||
|
dashboard.FleetManagement.register(Inventory)
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
# Copyright 2016 Intel Corporation
|
||||||
|
#
|
||||||
|
# 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 django.conf.urls import url
|
||||||
|
|
||||||
from craton_dashboard.content.fleet_management.inventory import views
|
from craton_dashboard.content.fleet_management.inventory import views
|
||||||
|
|
|
@ -17,5 +17,5 @@ from django.views import generic
|
||||||
|
|
||||||
|
|
||||||
class IndexView(generic.TemplateView):
|
class IndexView(generic.TemplateView):
|
||||||
template_name = 'project/fleet.inventory/index.html'
|
template_name = 'fleet_management/inventory/index.html'
|
||||||
page_title = _('Inventory')
|
page_title = _('Inventory')
|
||||||
|
|
|
@ -19,4 +19,4 @@ import horizon
|
||||||
|
|
||||||
class Taskflows(horizon.Panel):
|
class Taskflows(horizon.Panel):
|
||||||
name = _('Taskflows')
|
name = _('Taskflows')
|
||||||
slug = 'fleet.taskflows'
|
slug = 'taskflows'
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
# Copyright 2016 Intel Corporation
|
||||||
|
#
|
||||||
|
# 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 django.conf.urls import url
|
||||||
|
|
||||||
from craton_dashboard.content.fleet_management.taskflows import views
|
from craton_dashboard.content.fleet_management.taskflows import views
|
||||||
|
|
|
@ -17,5 +17,5 @@ from django.views import generic
|
||||||
|
|
||||||
|
|
||||||
class IndexView(generic.TemplateView):
|
class IndexView(generic.TemplateView):
|
||||||
template_name = 'project/fleet.taskflows/index.html'
|
template_name = 'fleet_management/taskflows/index.html'
|
||||||
page_title = _('Taskflows')
|
page_title = _('Taskflows')
|
||||||
|
|
|
@ -14,10 +14,12 @@
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
PANEL_GROUP = 'fleet_management'
|
import horizon
|
||||||
|
|
||||||
PANEL_GROUP_NAME = _('Fleet Management')
|
|
||||||
|
|
||||||
PANEL_GROUP_DASHBOARD = 'project'
|
class FleetManagement(horizon.Dashboard):
|
||||||
|
name = _("Fleet Management")
|
||||||
|
slug = "fleet_management"
|
||||||
|
default_panel = 'inventory'
|
||||||
|
|
||||||
DISABLED = False
|
horizon.register(FleetManagement)
|
|
@ -0,0 +1,24 @@
|
||||||
|
# Copyright 2016 Intel Corporation
|
||||||
|
#
|
||||||
|
# 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 slug of the dashboard to be added to HORIZON['dashboards']. Required.
|
||||||
|
DASHBOARD = 'fleet_management'
|
||||||
|
# A dictionary of exception classes to be added to HORIZON['exceptions'].
|
||||||
|
ADD_EXCEPTIONS = {}
|
||||||
|
# A list of applications to be added to INSTALLED_APPS.
|
||||||
|
ADD_INSTALLED_APPS = ['craton_dashboard', ]
|
||||||
|
|
||||||
|
ADD_ANGULAR_MODULES = ['horizon.dashboard.project.fleet_management']
|
||||||
|
|
||||||
|
AUTO_DISCOVER_STATIC_FILES = True
|
|
@ -13,17 +13,11 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
|
||||||
PANEL = 'fleet.taskflows'
|
PANEL = 'taskflows'
|
||||||
|
|
||||||
PANEL_DASHBOARD = 'project'
|
PANEL_DASHBOARD = 'fleet_management'
|
||||||
|
|
||||||
PANEL_GROUP = 'fleet_management'
|
PANEL_GROUP = 'default'
|
||||||
|
|
||||||
ADD_PANEL = (
|
ADD_PANEL = (
|
||||||
'craton_dashboard.content.fleet_management.taskflows.panel.Taskflows')
|
'craton_dashboard.content.fleet_management.taskflows.panel.Taskflows')
|
||||||
|
|
||||||
ADD_INSTALLED_APPS = ['craton_dashboard', ]
|
|
||||||
|
|
||||||
ADD_ANGULAR_MODULES = ['horizon.dashboard.project.fleet_management']
|
|
||||||
|
|
||||||
AUTO_DISCOVER_STATIC_FILES = True
|
|
|
@ -13,11 +13,11 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
|
||||||
PANEL = 'fleet.inventory'
|
PANEL = 'inventory'
|
||||||
|
|
||||||
PANEL_DASHBOARD = 'project'
|
PANEL_DASHBOARD = 'fleet_management'
|
||||||
|
|
||||||
PANEL_GROUP = 'fleet_management'
|
PANEL_GROUP = 'default'
|
||||||
|
|
||||||
ADD_PANEL = (
|
ADD_PANEL = (
|
||||||
'craton_dashboard.content.fleet_management.inventory.panel.Inventory')
|
'craton_dashboard.content.fleet_management.inventory.panel.Inventory')
|
|
@ -14,5 +14,4 @@ from horizon.test.settings import * # noqa
|
||||||
from openstack_dashboard.test.settings import * # noqa
|
from openstack_dashboard.test.settings import * # noqa
|
||||||
|
|
||||||
INSTALLED_APPS = list(INSTALLED_APPS)
|
INSTALLED_APPS = list(INSTALLED_APPS)
|
||||||
# INSTALLED_APPS.append('craton_dashboard.dashboards.project.fleet.inventory')
|
|
||||||
INSTALLED_APPS.append('craton_dashboard.content.fleet_management')
|
INSTALLED_APPS.append('craton_dashboard.content.fleet_management')
|
||||||
|
|
Loading…
Reference in New Issue