From: Tomas Sedovic <[email protected]> Added Dashboard and the subpages (Summary, Alerts, Service Quality, Quota Usage, Billing and Help Tickets), Instances, Templates and Settings.
They are just placeholders to make the navigation links work. --- src/app/controllers/dashboard_controller.rb | 27 ++++++++++++++++++++++++++ src/app/controllers/settings_controller.rb | 24 +++++++++++++++++++++++ src/app/controllers/templates_controller.rb | 24 +++++++++++++++++++++++ src/app/views/dashboard/_dashboard_nav.haml | 13 ++++++++++++ src/app/views/dashboard/alerts.haml | 4 +++ src/app/views/dashboard/billing.haml | 4 +++ src/app/views/dashboard/help_tickets.haml | 4 +++ src/app/views/dashboard/quota_usage.haml | 4 +++ src/app/views/dashboard/service_quality.haml | 4 +++ src/app/views/dashboard/summary.haml | 4 +++ src/app/views/layouts/_header.haml | 8 +++--- src/app/views/settings/index.haml | 2 + src/app/views/templates/index.haml | 2 + src/config/routes.rb | 13 ++++++++--- 14 files changed, 129 insertions(+), 8 deletions(-) create mode 100644 src/app/controllers/dashboard_controller.rb create mode 100644 src/app/controllers/settings_controller.rb create mode 100644 src/app/controllers/templates_controller.rb create mode 100644 src/app/views/dashboard/_dashboard_nav.haml create mode 100644 src/app/views/dashboard/alerts.haml create mode 100644 src/app/views/dashboard/billing.haml create mode 100644 src/app/views/dashboard/help_tickets.haml create mode 100644 src/app/views/dashboard/quota_usage.haml create mode 100644 src/app/views/dashboard/service_quality.haml create mode 100644 src/app/views/dashboard/summary.haml create mode 100644 src/app/views/settings/index.haml create mode 100644 src/app/views/templates/index.haml diff --git a/src/app/controllers/dashboard_controller.rb b/src/app/controllers/dashboard_controller.rb new file mode 100644 index 0000000..f74fbf1 --- /dev/null +++ b/src/app/controllers/dashboard_controller.rb @@ -0,0 +1,27 @@ +# +# Copyright (C) 2009 Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. A copy of the GNU General Public License is +# also available at http://www.gnu.org/copyleft/gpl.html. + +# Filters added to this controller apply to all controllers in the application. +# Likewise, all the methods added will be available for all controllers. + +class DashboardController < ApplicationController + def index + redirect_to :action => :summary + end + +end diff --git a/src/app/controllers/settings_controller.rb b/src/app/controllers/settings_controller.rb new file mode 100644 index 0000000..7d41203 --- /dev/null +++ b/src/app/controllers/settings_controller.rb @@ -0,0 +1,24 @@ +# +# Copyright (C) 2009 Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. A copy of the GNU General Public License is +# also available at http://www.gnu.org/copyleft/gpl.html. + +# Filters added to this controller apply to all controllers in the application. +# Likewise, all the methods added will be available for all controllers. + +class SettingsController < ApplicationController + +end diff --git a/src/app/controllers/templates_controller.rb b/src/app/controllers/templates_controller.rb new file mode 100644 index 0000000..9c53be5 --- /dev/null +++ b/src/app/controllers/templates_controller.rb @@ -0,0 +1,24 @@ +# +# Copyright (C) 2009 Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. A copy of the GNU General Public License is +# also available at http://www.gnu.org/copyleft/gpl.html. + +# Filters added to this controller apply to all controllers in the application. +# Likewise, all the methods added will be available for all controllers. + +class TemplatesController < ApplicationController + +end diff --git a/src/app/views/dashboard/_dashboard_nav.haml b/src/app/views/dashboard/_dashboard_nav.haml new file mode 100644 index 0000000..851b678 --- /dev/null +++ b/src/app/views/dashboard/_dashboard_nav.haml @@ -0,0 +1,13 @@ +%ul + %li + =link_to "Summary", dashboard_url + "/summary" + %li + = link_to "Alerts", dashboard_url + "/alerts" + %li + = link_to "Service Quality", dashboard_url + "/service_quality" + %li + = link_to "Quota Usage", dashboard_url + "/quota_usage" + %li + = link_to "Billing", dashboard_url + "/billing" + %li + = link_to "Help Tickets", dashboard_url + "/help_tickets" diff --git a/src/app/views/dashboard/alerts.haml b/src/app/views/dashboard/alerts.haml new file mode 100644 index 0000000..aa471c2 --- /dev/null +++ b/src/app/views/dashboard/alerts.haml @@ -0,0 +1,4 @@ +%h1 Alerts +%p located in app/views/dashboard/alerts.haml + += render :partial => "dashboard_nav" diff --git a/src/app/views/dashboard/billing.haml b/src/app/views/dashboard/billing.haml new file mode 100644 index 0000000..bf27c7a --- /dev/null +++ b/src/app/views/dashboard/billing.haml @@ -0,0 +1,4 @@ +%h1 Billing +%p located in app/views/dashboard/billing.haml + += render :partial => "dashboard_nav" diff --git a/src/app/views/dashboard/help_tickets.haml b/src/app/views/dashboard/help_tickets.haml new file mode 100644 index 0000000..659fb1e --- /dev/null +++ b/src/app/views/dashboard/help_tickets.haml @@ -0,0 +1,4 @@ +%h1 Help Tickets +%p located in app/views/dashboard/help_tickets.haml + += render :partial => "dashboard_nav" diff --git a/src/app/views/dashboard/quota_usage.haml b/src/app/views/dashboard/quota_usage.haml new file mode 100644 index 0000000..dd9c340 --- /dev/null +++ b/src/app/views/dashboard/quota_usage.haml @@ -0,0 +1,4 @@ +%h1 Quota Usage +%p located in app/views/dashboard/quota_usage.haml + += render :partial => "dashboard_nav" diff --git a/src/app/views/dashboard/service_quality.haml b/src/app/views/dashboard/service_quality.haml new file mode 100644 index 0000000..8a01e7c --- /dev/null +++ b/src/app/views/dashboard/service_quality.haml @@ -0,0 +1,4 @@ +%h1 Service Quality +%p located in app/views/dashboard/service_quality.haml + += render :partial => "dashboard_nav" diff --git a/src/app/views/dashboard/summary.haml b/src/app/views/dashboard/summary.haml new file mode 100644 index 0000000..6ed9994 --- /dev/null +++ b/src/app/views/dashboard/summary.haml @@ -0,0 +1,4 @@ +%h1 Summary +%p located in app/views/dashboard/summary.haml + += render :partial => "dashboard_nav" diff --git a/src/app/views/layouts/_header.haml b/src/app/views/layouts/_header.haml index fef6c44..8bbd903 100644 --- a/src/app/views/layouts/_header.haml +++ b/src/app/views/layouts/_header.haml @@ -2,13 +2,13 @@ %span Deltacloud Aggregator %ul.nav %li - = link_to 'Dashboard' + = link_to 'Dashboard', dashboard_path %li - = link_to 'Instances' + = link_to 'Instances', instance_path %li - = link_to 'Templates' + = link_to 'Templates', templates_path %li - = link_to 'Settings' + = link_to 'Settings', settings_path .header_info #hi-username diff --git a/src/app/views/settings/index.haml b/src/app/views/settings/index.haml new file mode 100644 index 0000000..1647eb1 --- /dev/null +++ b/src/app/views/settings/index.haml @@ -0,0 +1,2 @@ +%h1 Settings/index +%p located in app/view/settings/index.haml diff --git a/src/app/views/templates/index.haml b/src/app/views/templates/index.haml new file mode 100644 index 0000000..4ce55ab --- /dev/null +++ b/src/app/views/templates/index.haml @@ -0,0 +1,2 @@ +%h1 Templates/index +%p located in app/view/templates/index.haml diff --git a/src/config/routes.rb b/src/config/routes.rb index 4a304ca..ea5bcc2 100644 --- a/src/config/routes.rb +++ b/src/config/routes.rb @@ -1,4 +1,4 @@ -# +# # Copyright (C) 2009 Red Hat, Inc. # Written by Scott Seago <[email protected]> # @@ -20,7 +20,7 @@ ActionController::Routing::Routes.draw do |map| # The priority is based upon order of creation: first created -> highest priority. - + # Sample of regular route: # map.connect 'products/:id', :controller => 'catalog', :action => 'view' # Keep in mind you can assign values other than :controller and :action @@ -29,7 +29,7 @@ ActionController::Routing::Routes.draw do |map| # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase' # This route can be invoked with purchase_url(:id => product.id) - # You can have the root of your site routed by hooking up '' + # You can have the root of your site routed by hooking up '' # -- just remember to delete public/index.html. @@ -45,6 +45,11 @@ ActionController::Routing::Routes.draw do |map| map.resources :users map.root :login + map.dashboard '/dashboard', :controller => 'dashboard' + map.instance '/instance', :controller => 'instance' + map.templates '/templates', :controller => 'templates' + map.settings '/settings', :controller => 'settings' + # Temporarily disable this route, provider stuff is not restful yet. # Will be re-enabled in upcoming patch # map.resources :provider @@ -56,4 +61,4 @@ ActionController::Routing::Routes.draw do |map| # Install the default route as the lowest priority. map.connect ':controller/:action/:id.:format' map.connect ':controller/:action/:id' -end \ No newline at end of file +end -- 1.6.6.1 _______________________________________________ deltacloud-devel mailing list [email protected] https://fedorahosted.org/mailman/listinfo/deltacloud-devel
