summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadomir Dopieralski <openstack@sheep.art.pl>2013-12-10 11:35:04 +0100
committerRadomir Dopieralski <openstack@sheep.art.pl>2013-12-10 12:22:39 +0100
commitffbf33370c117cfea5d66bf5275d352c75072c3a (patch)
treea2d90278ddc34bb0569c173f5a5b0d65581190b5
parent53d0cb711ac4a00da58e8c18193a1259884b747c (diff)
downloadtuskar-ui-ffbf33370c117cfea5d66bf5275d352c75072c3a.tar.gz
Group related panels in packages (resources)
This is a part of a larger patch, split to make it less confusing. This patch deals with moving the files into the "resources/" direcotry. Make the file structure of the source reflect the logical structure of the application (and its menus) by grouping related panels into packages. This gives us a place to put common code shared by those panels, and lets us find the source code for a specific panel based on where it is in the menu. Because Horizon was not initially designed for autodiscovery of panels that are not immediate children of the dashboard, the URLs of those panels will have the form of /infrastructure/resources.archived/. That can be amended by a simple patch to Horizon later on. Change-Id: I843efc86b582fb7b9e2d046dc83edefbebb5a861
-rw-r--r--tuskar_ui/infrastructure/dashboard.py12
-rw-r--r--tuskar_ui/infrastructure/resources/__init__.py (renamed from tuskar_ui/infrastructure/resources_archived/__init__.py)0
-rw-r--r--tuskar_ui/infrastructure/resources/archived/__init__.py (renamed from tuskar_ui/infrastructure/resources_management/__init__.py)0
-rw-r--r--tuskar_ui/infrastructure/resources/archived/panel.py (renamed from tuskar_ui/infrastructure/resources_archived/panel.py)2
-rw-r--r--tuskar_ui/infrastructure/resources/archived/urls.py (renamed from tuskar_ui/infrastructure/resources_overview/urls.py)2
-rw-r--r--tuskar_ui/infrastructure/resources/archived/views.py (renamed from tuskar_ui/infrastructure/resources_archived/views.py)0
-rw-r--r--tuskar_ui/infrastructure/resources/management/__init__.py (renamed from tuskar_ui/infrastructure/resources_overview/__init__.py)0
-rw-r--r--tuskar_ui/infrastructure/resources/management/panel.py (renamed from tuskar_ui/infrastructure/resources_management/panel.py)2
-rw-r--r--tuskar_ui/infrastructure/resources/management/urls.py (renamed from tuskar_ui/infrastructure/resources_management/urls.py)2
-rw-r--r--tuskar_ui/infrastructure/resources/management/views.py (renamed from tuskar_ui/infrastructure/resources_management/views.py)0
-rw-r--r--tuskar_ui/infrastructure/resources/overview/__init__.py (renamed from tuskar_ui/infrastructure/resources_resource/__init__.py)0
-rw-r--r--tuskar_ui/infrastructure/resources/overview/panel.py (renamed from tuskar_ui/infrastructure/resources_overview/panel.py)2
-rw-r--r--tuskar_ui/infrastructure/resources/overview/urls.py (renamed from tuskar_ui/infrastructure/resources_archived/urls.py)2
-rw-r--r--tuskar_ui/infrastructure/resources/overview/views.py (renamed from tuskar_ui/infrastructure/resources_overview/views.py)0
-rw-r--r--tuskar_ui/infrastructure/resources/resource/__init__.py (renamed from tuskar_ui/infrastructure/resources_unallocated/__init__.py)0
-rw-r--r--tuskar_ui/infrastructure/resources/resource/panel.py (renamed from tuskar_ui/infrastructure/resources_resource/panel.py)2
-rw-r--r--tuskar_ui/infrastructure/resources/resource/urls.py (renamed from tuskar_ui/infrastructure/resources_resource/urls.py)2
-rw-r--r--tuskar_ui/infrastructure/resources/resource/views.py (renamed from tuskar_ui/infrastructure/resources_resource/views.py)0
-rw-r--r--tuskar_ui/infrastructure/resources/unallocated/__init__.py0
-rw-r--r--tuskar_ui/infrastructure/resources/unallocated/panel.py (renamed from tuskar_ui/infrastructure/resources_unallocated/panel.py)2
-rw-r--r--tuskar_ui/infrastructure/resources/unallocated/urls.py (renamed from tuskar_ui/infrastructure/resources_unallocated/urls.py)2
-rw-r--r--tuskar_ui/infrastructure/resources/unallocated/views.py (renamed from tuskar_ui/infrastructure/resources_unallocated/views.py)0
22 files changed, 16 insertions, 16 deletions
diff --git a/tuskar_ui/infrastructure/dashboard.py b/tuskar_ui/infrastructure/dashboard.py
index d87a513a..7b9df905 100644
--- a/tuskar_ui/infrastructure/dashboard.py
+++ b/tuskar_ui/infrastructure/dashboard.py
@@ -38,14 +38,14 @@ class Deployment(horizon.PanelGroup):
class Resources(horizon.PanelGroup):
- slug = "nodes"
+ slug = "resources"
name = _("Resources")
panels = (
- 'resources_overview',
- 'resources_resource',
- 'resources_management',
- 'resources_unallocated',
- 'resources_archived',
+ 'resources.overview',
+ 'resources.resource',
+ 'resources.management',
+ 'resources.unallocated',
+ 'resources.archived',
)
diff --git a/tuskar_ui/infrastructure/resources_archived/__init__.py b/tuskar_ui/infrastructure/resources/__init__.py
index e69de29b..e69de29b 100644
--- a/tuskar_ui/infrastructure/resources_archived/__init__.py
+++ b/tuskar_ui/infrastructure/resources/__init__.py
diff --git a/tuskar_ui/infrastructure/resources_management/__init__.py b/tuskar_ui/infrastructure/resources/archived/__init__.py
index e69de29b..e69de29b 100644
--- a/tuskar_ui/infrastructure/resources_management/__init__.py
+++ b/tuskar_ui/infrastructure/resources/archived/__init__.py
diff --git a/tuskar_ui/infrastructure/resources_archived/panel.py b/tuskar_ui/infrastructure/resources/archived/panel.py
index 1b0477f9..efe397c4 100644
--- a/tuskar_ui/infrastructure/resources_archived/panel.py
+++ b/tuskar_ui/infrastructure/resources/archived/panel.py
@@ -21,7 +21,7 @@ from tuskar_ui.infrastructure import dashboard
class ResourcesArchived(horizon.Panel):
name = _("Archived")
- slug = "resources_archived"
+ slug = "resources.archived"
dashboard.Infrastructure.register(ResourcesArchived)
diff --git a/tuskar_ui/infrastructure/resources_overview/urls.py b/tuskar_ui/infrastructure/resources/archived/urls.py
index 5638adfc..e255484b 100644
--- a/tuskar_ui/infrastructure/resources_overview/urls.py
+++ b/tuskar_ui/infrastructure/resources/archived/urls.py
@@ -14,7 +14,7 @@
from django.conf.urls import defaults
-from tuskar_ui.infrastructure.resources_overview import views
+from tuskar_ui.infrastructure.resources.archived import views
urlpatterns = defaults.patterns(
diff --git a/tuskar_ui/infrastructure/resources_archived/views.py b/tuskar_ui/infrastructure/resources/archived/views.py
index f046b626..f046b626 100644
--- a/tuskar_ui/infrastructure/resources_archived/views.py
+++ b/tuskar_ui/infrastructure/resources/archived/views.py
diff --git a/tuskar_ui/infrastructure/resources_overview/__init__.py b/tuskar_ui/infrastructure/resources/management/__init__.py
index e69de29b..e69de29b 100644
--- a/tuskar_ui/infrastructure/resources_overview/__init__.py
+++ b/tuskar_ui/infrastructure/resources/management/__init__.py
diff --git a/tuskar_ui/infrastructure/resources_management/panel.py b/tuskar_ui/infrastructure/resources/management/panel.py
index d69a6c99..417396e0 100644
--- a/tuskar_ui/infrastructure/resources_management/panel.py
+++ b/tuskar_ui/infrastructure/resources/management/panel.py
@@ -21,7 +21,7 @@ from tuskar_ui.infrastructure import dashboard
class ResourcesManagement(horizon.Panel):
name = _("Management Nodes")
- slug = "resources_management"
+ slug = "resources.management"
dashboard.Infrastructure.register(ResourcesManagement)
diff --git a/tuskar_ui/infrastructure/resources_management/urls.py b/tuskar_ui/infrastructure/resources/management/urls.py
index 5ecf4c3a..8494f017 100644
--- a/tuskar_ui/infrastructure/resources_management/urls.py
+++ b/tuskar_ui/infrastructure/resources/management/urls.py
@@ -14,7 +14,7 @@
from django.conf.urls import defaults
-from tuskar_ui.infrastructure.resources_management import views
+from tuskar_ui.infrastructure.resources.management import views
urlpatterns = defaults.patterns(
diff --git a/tuskar_ui/infrastructure/resources_management/views.py b/tuskar_ui/infrastructure/resources/management/views.py
index f046b626..f046b626 100644
--- a/tuskar_ui/infrastructure/resources_management/views.py
+++ b/tuskar_ui/infrastructure/resources/management/views.py
diff --git a/tuskar_ui/infrastructure/resources_resource/__init__.py b/tuskar_ui/infrastructure/resources/overview/__init__.py
index e69de29b..e69de29b 100644
--- a/tuskar_ui/infrastructure/resources_resource/__init__.py
+++ b/tuskar_ui/infrastructure/resources/overview/__init__.py
diff --git a/tuskar_ui/infrastructure/resources_overview/panel.py b/tuskar_ui/infrastructure/resources/overview/panel.py
index 746a81b8..a1779dc5 100644
--- a/tuskar_ui/infrastructure/resources_overview/panel.py
+++ b/tuskar_ui/infrastructure/resources/overview/panel.py
@@ -21,7 +21,7 @@ from tuskar_ui.infrastructure import dashboard
class ResourcesOverview(horizon.Panel):
name = _("Overview")
- slug = "resources_overview"
+ slug = "resources.overview"
dashboard.Infrastructure.register(ResourcesOverview)
diff --git a/tuskar_ui/infrastructure/resources_archived/urls.py b/tuskar_ui/infrastructure/resources/overview/urls.py
index d4258572..dc2af4bc 100644
--- a/tuskar_ui/infrastructure/resources_archived/urls.py
+++ b/tuskar_ui/infrastructure/resources/overview/urls.py
@@ -14,7 +14,7 @@
from django.conf.urls import defaults
-from tuskar_ui.infrastructure.resources_archived import views
+from tuskar_ui.infrastructure.resources.overview import views
urlpatterns = defaults.patterns(
diff --git a/tuskar_ui/infrastructure/resources_overview/views.py b/tuskar_ui/infrastructure/resources/overview/views.py
index f046b626..f046b626 100644
--- a/tuskar_ui/infrastructure/resources_overview/views.py
+++ b/tuskar_ui/infrastructure/resources/overview/views.py
diff --git a/tuskar_ui/infrastructure/resources_unallocated/__init__.py b/tuskar_ui/infrastructure/resources/resource/__init__.py
index e69de29b..e69de29b 100644
--- a/tuskar_ui/infrastructure/resources_unallocated/__init__.py
+++ b/tuskar_ui/infrastructure/resources/resource/__init__.py
diff --git a/tuskar_ui/infrastructure/resources_resource/panel.py b/tuskar_ui/infrastructure/resources/resource/panel.py
index 54286120..c38fa65f 100644
--- a/tuskar_ui/infrastructure/resources_resource/panel.py
+++ b/tuskar_ui/infrastructure/resources/resource/panel.py
@@ -21,7 +21,7 @@ from tuskar_ui.infrastructure import dashboard
class ResourcesResource(horizon.Panel):
name = _("Resource Nodes")
- slug = "resources_resource"
+ slug = "resources.resource"
dashboard.Infrastructure.register(ResourcesResource)
diff --git a/tuskar_ui/infrastructure/resources_resource/urls.py b/tuskar_ui/infrastructure/resources/resource/urls.py
index b06e8c69..6dcd8555 100644
--- a/tuskar_ui/infrastructure/resources_resource/urls.py
+++ b/tuskar_ui/infrastructure/resources/resource/urls.py
@@ -14,7 +14,7 @@
from django.conf.urls import defaults
-from tuskar_ui.infrastructure.resources_resource import views
+from tuskar_ui.infrastructure.resources.resource import views
urlpatterns = defaults.patterns(
diff --git a/tuskar_ui/infrastructure/resources_resource/views.py b/tuskar_ui/infrastructure/resources/resource/views.py
index f046b626..f046b626 100644
--- a/tuskar_ui/infrastructure/resources_resource/views.py
+++ b/tuskar_ui/infrastructure/resources/resource/views.py
diff --git a/tuskar_ui/infrastructure/resources/unallocated/__init__.py b/tuskar_ui/infrastructure/resources/unallocated/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tuskar_ui/infrastructure/resources/unallocated/__init__.py
diff --git a/tuskar_ui/infrastructure/resources_unallocated/panel.py b/tuskar_ui/infrastructure/resources/unallocated/panel.py
index b78b679d..8f0e2061 100644
--- a/tuskar_ui/infrastructure/resources_unallocated/panel.py
+++ b/tuskar_ui/infrastructure/resources/unallocated/panel.py
@@ -21,7 +21,7 @@ from tuskar_ui.infrastructure import dashboard
class ResourcesUnallocated(horizon.Panel):
name = _("Unallocated")
- slug = "resources_unallocated"
+ slug = "resources.unallocated"
dashboard.Infrastructure.register(ResourcesUnallocated)
diff --git a/tuskar_ui/infrastructure/resources_unallocated/urls.py b/tuskar_ui/infrastructure/resources/unallocated/urls.py
index b96f8861..622c2871 100644
--- a/tuskar_ui/infrastructure/resources_unallocated/urls.py
+++ b/tuskar_ui/infrastructure/resources/unallocated/urls.py
@@ -14,7 +14,7 @@
from django.conf.urls import defaults
-from tuskar_ui.infrastructure.resources_unallocated import views
+from tuskar_ui.infrastructure.resources.unallocated import views
urlpatterns = defaults.patterns(
diff --git a/tuskar_ui/infrastructure/resources_unallocated/views.py b/tuskar_ui/infrastructure/resources/unallocated/views.py
index f046b626..f046b626 100644
--- a/tuskar_ui/infrastructure/resources_unallocated/views.py
+++ b/tuskar_ui/infrastructure/resources/unallocated/views.py