From: Tomas Sedovic tsedovic@redhat.com
These controllers, views and whatnot are no longer used after switching to the new UI. --- src/app/controllers/builds_controller.rb | 91 -- src/app/controllers/cloud_accounts_controller.rb | 181 --- src/app/controllers/dashboard_controller.rb | 81 -- .../controllers/hardware_profiles_controller.rb | 36 - src/app/controllers/images_controller.rb | 57 - src/app/controllers/instances_controller.rb | 198 --- src/app/controllers/pools_controller.rb | 138 -- src/app/controllers/providers_controller.rb | 151 --- src/app/controllers/settings_controller.rb | 73 -- src/app/controllers/templates_controller.rb | 267 ---- src/app/controllers/users_controller.rb | 145 --- src/app/helpers/dashboard_helper.rb | 62 - src/app/stylesheets/aggregator.scss | 1325 -------------------- src/app/views/builds/index.haml | 89 -- src/app/views/builds/new.haml | 55 - src/app/views/cloud_accounts/_form.haml | 52 - src/app/views/cloud_accounts/edit.haml | 17 - src/app/views/cloud_accounts/index.haml | 25 - src/app/views/cloud_accounts/new.haml | 17 - src/app/views/dashboard/_dashboard_nav.haml | 13 - src/app/views/dashboard/alerts.haml | 2 - src/app/views/dashboard/billing.haml | 2 - src/app/views/dashboard/help_tickets.haml | 2 - src/app/views/dashboard/monitor.haml | 185 --- src/app/views/dashboard/quota_usage.haml | 2 - src/app/views/dashboard/service_quality.haml | 2 - src/app/views/dashboard/summary.haml | 121 -- src/app/views/hardware_profiles/_list.haml | 20 - src/app/views/hardware_profiles/index.haml | 1 - src/app/views/images/_images.haml | 18 - src/app/views/images/show.haml | 20 - src/app/views/instances/_instances.haml | 24 - src/app/views/instances/configure.haml | 23 - src/app/views/instances/create.haml | 2 - src/app/views/instances/delete.haml | 2 - src/app/views/instances/index.haml | 127 -- src/app/views/instances/new.haml | 19 - src/app/views/instances/show.haml | 61 - src/app/views/pools/delete.haml | 2 - src/app/views/pools/edit.haml | 1 - src/app/views/pools/hardware_profiles.haml | 1 - src/app/views/pools/index.haml | 44 - src/app/views/pools/list.haml | 3 - src/app/views/pools/new.haml | 12 - src/app/views/pools/realms.haml | 1 - src/app/views/pools/show.haml | 12 - src/app/views/providers/_form.haml | 25 - src/app/views/providers/_providers.haml | 28 - src/app/views/providers/accounts.haml | 125 -- src/app/views/providers/delete.haml | 2 - src/app/views/providers/edit.haml | 7 - src/app/views/providers/hardware_profiles.haml | 1 - src/app/views/providers/index.haml | 1 - src/app/views/providers/list.haml | 1 - src/app/views/providers/new.haml | 7 - src/app/views/providers/realms.haml | 1 - src/app/views/providers/settings.haml | 3 - src/app/views/providers/show.haml | 14 - src/app/views/realms/_list.haml | 12 - src/app/views/settings/general_settings.haml | 41 - src/app/views/settings/index.haml | 64 - src/app/views/settings/self_service.haml | 128 -- src/app/views/templates/_addbuttons.haml | 3 - src/app/views/templates/_basics.haml | 27 - src/app/views/templates/_collections.haml | 8 - src/app/views/templates/_form.haml | 122 -- src/app/views/templates/_hidden_fields.haml | 8 - .../views/templates/_local_content_to_bundle.haml | 21 - src/app/views/templates/_managed_content.haml | 21 - src/app/views/templates/_metagroup_packages.haml | 19 - src/app/views/templates/_metagroups.haml | 13 - .../views/templates/_preboot_configuration.haml | 11 - src/app/views/templates/_search_packages.haml | 45 - src/app/views/templates/_software_selection.haml | 39 - src/app/views/templates/_templates.haml | 27 - src/app/views/templates/assembly.haml | 138 -- src/app/views/templates/collections.haml | 1 - src/app/views/templates/deployment_definition.haml | 113 -- src/app/views/templates/edit.haml | 6 - src/app/views/templates/index.haml | 78 -- src/app/views/templates/managed_content.haml | 1 - src/app/views/templates/metagroup_packages.haml | 1 - src/app/views/templates/new.haml | 5 - src/app/views/templates/search_packages.haml | 1 - src/app/views/users/_form.haml | 47 - src/app/views/users/edit.haml | 6 - src/app/views/users/index.haml | 54 - src/app/views/users/new.haml | 6 - src/app/views/users/show.haml | 104 -- src/config/old_navigation.rb | 42 - src/public/images/dashboard_summary_next.png | Bin 412 -> 0 bytes src/public/images/dashboard_summary_prev.png | Bin 375 -> 0 bytes src/public/images/icon_dashboard.png | Bin 952 -> 0 bytes src/public/stylesheets/images/icon_dashboard.gif | Bin 14152 -> 0 bytes src/spec/controllers/dashboard_controller_spec.rb | 19 - 95 files changed, 0 insertions(+), 5228 deletions(-) delete mode 100644 src/app/controllers/builds_controller.rb delete mode 100644 src/app/controllers/cloud_accounts_controller.rb delete mode 100644 src/app/controllers/dashboard_controller.rb delete mode 100644 src/app/controllers/hardware_profiles_controller.rb delete mode 100644 src/app/controllers/images_controller.rb delete mode 100644 src/app/controllers/instances_controller.rb delete mode 100644 src/app/controllers/pools_controller.rb delete mode 100644 src/app/controllers/providers_controller.rb delete mode 100644 src/app/controllers/settings_controller.rb delete mode 100644 src/app/controllers/templates_controller.rb delete mode 100644 src/app/controllers/users_controller.rb delete mode 100644 src/app/helpers/dashboard_helper.rb delete mode 100644 src/app/stylesheets/aggregator.scss delete mode 100644 src/app/views/builds/index.haml delete mode 100644 src/app/views/builds/new.haml delete mode 100644 src/app/views/cloud_accounts/_form.haml delete mode 100644 src/app/views/cloud_accounts/edit.haml delete mode 100644 src/app/views/cloud_accounts/index.haml delete mode 100644 src/app/views/cloud_accounts/new.haml delete mode 100644 src/app/views/dashboard/_dashboard_nav.haml delete mode 100644 src/app/views/dashboard/alerts.haml delete mode 100644 src/app/views/dashboard/billing.haml delete mode 100644 src/app/views/dashboard/help_tickets.haml delete mode 100644 src/app/views/dashboard/monitor.haml delete mode 100644 src/app/views/dashboard/quota_usage.haml delete mode 100644 src/app/views/dashboard/service_quality.haml delete mode 100644 src/app/views/dashboard/summary.haml delete mode 100644 src/app/views/hardware_profiles/_list.haml delete mode 100644 src/app/views/hardware_profiles/index.haml delete mode 100644 src/app/views/images/_images.haml delete mode 100644 src/app/views/images/show.haml delete mode 100644 src/app/views/instances/_instances.haml delete mode 100644 src/app/views/instances/configure.haml delete mode 100644 src/app/views/instances/create.haml delete mode 100644 src/app/views/instances/delete.haml delete mode 100644 src/app/views/instances/index.haml delete mode 100644 src/app/views/instances/new.haml delete mode 100644 src/app/views/instances/show.haml delete mode 100644 src/app/views/pools/delete.haml delete mode 100644 src/app/views/pools/edit.haml delete mode 100644 src/app/views/pools/hardware_profiles.haml delete mode 100644 src/app/views/pools/index.haml delete mode 100644 src/app/views/pools/list.haml delete mode 100644 src/app/views/pools/new.haml delete mode 100644 src/app/views/pools/realms.haml delete mode 100644 src/app/views/pools/show.haml delete mode 100644 src/app/views/providers/_form.haml delete mode 100644 src/app/views/providers/_providers.haml delete mode 100644 src/app/views/providers/accounts.haml delete mode 100644 src/app/views/providers/delete.haml delete mode 100644 src/app/views/providers/edit.haml delete mode 100644 src/app/views/providers/hardware_profiles.haml delete mode 100644 src/app/views/providers/index.haml delete mode 100644 src/app/views/providers/list.haml delete mode 100644 src/app/views/providers/new.haml delete mode 100644 src/app/views/providers/realms.haml delete mode 100644 src/app/views/providers/settings.haml delete mode 100644 src/app/views/providers/show.haml delete mode 100644 src/app/views/realms/_list.haml delete mode 100644 src/app/views/settings/general_settings.haml delete mode 100644 src/app/views/settings/index.haml delete mode 100644 src/app/views/settings/self_service.haml delete mode 100644 src/app/views/templates/_addbuttons.haml delete mode 100644 src/app/views/templates/_basics.haml delete mode 100644 src/app/views/templates/_collections.haml delete mode 100644 src/app/views/templates/_form.haml delete mode 100644 src/app/views/templates/_hidden_fields.haml delete mode 100644 src/app/views/templates/_local_content_to_bundle.haml delete mode 100644 src/app/views/templates/_managed_content.haml delete mode 100644 src/app/views/templates/_metagroup_packages.haml delete mode 100644 src/app/views/templates/_metagroups.haml delete mode 100644 src/app/views/templates/_preboot_configuration.haml delete mode 100644 src/app/views/templates/_search_packages.haml delete mode 100644 src/app/views/templates/_software_selection.haml delete mode 100644 src/app/views/templates/_templates.haml delete mode 100644 src/app/views/templates/assembly.haml delete mode 100644 src/app/views/templates/collections.haml delete mode 100644 src/app/views/templates/deployment_definition.haml delete mode 100644 src/app/views/templates/edit.haml delete mode 100644 src/app/views/templates/index.haml delete mode 100644 src/app/views/templates/managed_content.haml delete mode 100644 src/app/views/templates/metagroup_packages.haml delete mode 100644 src/app/views/templates/new.haml delete mode 100644 src/app/views/templates/search_packages.haml delete mode 100644 src/app/views/users/_form.haml delete mode 100644 src/app/views/users/edit.haml delete mode 100644 src/app/views/users/index.haml delete mode 100644 src/app/views/users/new.haml delete mode 100644 src/app/views/users/show.haml delete mode 100644 src/config/old_navigation.rb delete mode 100644 src/public/images/dashboard_summary_next.png delete mode 100644 src/public/images/dashboard_summary_prev.png delete mode 100644 src/public/images/icon_dashboard.png delete mode 100644 src/public/stylesheets/images/icon_dashboard.gif delete mode 100644 src/spec/controllers/dashboard_controller_spec.rb
diff --git a/src/app/controllers/builds_controller.rb b/src/app/controllers/builds_controller.rb deleted file mode 100644 index 5f33ba3..0000000 --- a/src/app/controllers/builds_controller.rb +++ /dev/null @@ -1,91 +0,0 @@ -class BuildsController < ApplicationController - before_filter [:require_user] - - def section_id - 'build' - end - - def index - require_privilege(Privilege::VIEW, Template) - order = get_order('templates.name') - @running_images = Image.all(:include => :template, :conditions => ['status IN (?)', Image::ACTIVE_STATES], :order => order) - @completed_images = Image.all(:include => :template, :conditions => {:status => Image::STATE_COMPLETE}, :order => order) - @failed_images = Image.all(:include => :template, :conditions => {:status => Image::STATE_FAILED}, :order => order) - end - - def new - raise "select template to build" unless id = params[:template_id] - @tpl = Template.find(id) - check_permission - if @tpl.imported - flash[:warning] = "Build imported template is not supported" - redirect_to templates_path - end - @all_targets = Image.available_targets - end - - def create - if params[:cancel] - redirect_to templates_path - return - end - - @tpl = Template.find(params[:template_id]) - check_permission - @all_targets = Image.available_targets - - if params[:targets].blank? - flash.now[:warning] = 'You need to check at least one provider format' - render :action => 'new' - return - end - - @tpl.upload unless @tpl.uploaded - errors = {} - warnings = [] - params[:targets].each do |target| - begin - Image.build(@tpl, target) - rescue ImageExistsError - warnings << $!.message - rescue - errors[target] = $!.message - end - end - flash[:warning] = 'Warning: ' + warnings.join unless warnings.empty? - if errors.empty? - redirect_to builds_path - else - flash_error('Error while trying to build image', errors) - render :action => 'new' - end - end - - def edit - # FIXME: is @tpl defined here? do we need check_permission here? - end - - def update - # FIXME: is @tpl defined here? do we need check_permission here? - end - - private - - # TODO: DRY this, is used in templates controller too - def get_order(default) - @order_dir = params[:order_dir] == 'desc' ? 'desc' : 'asc' - @order_field = params[:order_field] || default - "#{@order_field} #{@order_dir}" - end - - def flash_error(summary, errs) - flash.now[:error] ||= {} - flash.now[:error][:summary] = summary - flash.now[:error][:failures] ||= {} - flash.now[:error][:failures].merge!(errs) - end - - def check_permission - require_privilege(Privilege::MODIFY, @tpl) - end -end diff --git a/src/app/controllers/cloud_accounts_controller.rb b/src/app/controllers/cloud_accounts_controller.rb deleted file mode 100644 index d292f57..0000000 --- a/src/app/controllers/cloud_accounts_controller.rb +++ /dev/null @@ -1,181 +0,0 @@ -# -# Copyright (C) 2010 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 CloudAccountsController < ApplicationController - before_filter :require_user - before_filter :load_providers - - helper :providers - - def section_id - 'administration' - end - - def index - @provider = Provider.find(params[:provider_id]) - require_privilege(Privilege::VIEW, CloudAccount, @provider) - end - - def new - @provider = Provider.find(params[:provider_id]) - @cloud_account = CloudAccount.new - @quota = Quota.new - require_privilege(Privilege::CREATE, CloudAccount, @provider) - end - - def create - @provider = Provider.find(params[:provider_id]) - require_privilege(Privilege::CREATE, CloudAccount, @provider) - @cloud_account = CloudAccount.new(params[:cloud_account]) - @cloud_account.provider = @provider - @cloud_account.quota = @quota = Quota.new - - if params[:test_account] - test_account(@cloud_account) - render :action => 'new' and return - end - - limit = params[:quota][:maximum_running_instances] if params[:quota] - @cloud_account.quota.set_maximum_running_instances(limit) - - if @cloud_account.invalid? - if not @cloud_account.valid_credentials? - flash.now[:error] = "The entered credential information is incorrect" - elsif @cloud_account.errors.on(:username) - flash.now[:error] = "The access key '#{params[:cloud_account][:username]}' has already been taken." - else - flash.now[:error] = "You must fill in all the required fields" - end - render :action => 'new' and return - end - - @cloud_account.pool_families << PoolFamily.default - @cloud_account.save! - if @cloud_account.populate_realms - flash[:notice] = "Provider account added." - end - redirect_to provider_accounts_path(@provider) - kick_condor - end - - def edit - @cloud_account = CloudAccount.find(params[:id]) - @quota = @cloud_account.quota - @provider = @cloud_account.provider - require_privilege(Privilege::MODIFY, @cloud_account) - end - - def update_accounts - @provider = Provider.find(params[:provider][:id]) - require_privilege(Privilege::MODIFY, CloudAccount, @provider) - @providers = Provider.list_for_user(@current_user, Privilege::VIEW) - - success = true - @provider.cloud_accounts.each do |cloud_account| - attributes = params[:cloud_accounts][cloud_account.id.to_s] - - password = attributes[:password] - # blank password means the user didn't change it -- don't update it then - if password.blank? - attributes.delete :password - end - cloud_account.quota.maximum_running_instances = quota_from_string(params[:quota][cloud_account.id.to_s][:maximum_running_instances]) - - private_cert = attributes[:x509_cert_priv_file] - unless private_cert.blank? - attributes[:x509_cert_priv] = private_cert.read - end - attributes.delete :x509_cert_priv_file - - public_cert = attributes[:x509_cert_pub_file] - unless public_cert.blank? - attributes[:x509_cert_pub] = public_cert.read - end - attributes.delete :x509_cert_pub_file - - begin - cloud_account.update_attributes!(attributes) - cloud_account.quota.save! - rescue - success = false - end - end - if success - flash[:notice] = "Account updated." - redirect_to :controller => 'providers', :action => 'accounts', :id => @provider - else - flash.now[:notice] = "Error updating the cloud account." - render :template => 'provider/accounts' - end - end - - def update - @cloud_account = CloudAccount.find(params[:id]) - @provider = @cloud_account.provider - require_privilege(Privilege::MODIFY, @cloud_account) - @quota = @cloud_account.quota - - limit = params[:quota][:maximum_running_instances] if params[:quota] - @cloud_account.quota.set_maximum_running_instances(limit) - if @cloud_account.update_attributes(params[:cloud_account]) - flash[:notice] = "Cloud Account updated!" - redirect_to provider_accounts_path(@provider) - else - render :action => :edit - end - end - - def key - @cloud_account = CloudAccount.find(params[:id]) - require_privilege(Privilege::MODIFY,@cloud_account) - unless @cloud_account.instance_key.nil? - render :text => @cloud_account.instance_key.pem - end - end - - def destroy - account = CloudAccount.find(params[:id]) - provider = account.provider - require_privilege(Privilege::MODIFY, account) - if account.destroy - flash[:notice] = "Cloud Account destroyed" - else - flash[:error] = "Cloud Account could not be destroyed" - end - redirect_to provider_accounts_path(provider) - end - - def test_account(account) - if account.valid_credentials? - flash.now[:notice] = "Test Connection Success: Valid Account Details" - else - flash.now[:error] = "Test Connection Failed: Invalid Account Details" - end - rescue - flash.now[:error] = "Test Connection Failed: Could not connect to provider" - end - - private - - def load_providers - @providers = Provider.list_for_user(@current_user, Privilege::VIEW) - end -end diff --git a/src/app/controllers/dashboard_controller.rb b/src/app/controllers/dashboard_controller.rb deleted file mode 100644 index 5254dd7..0000000 --- a/src/app/controllers/dashboard_controller.rb +++ /dev/null @@ -1,81 +0,0 @@ -# -# 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 - before_filter :require_user - before_filter :get_nav_items, :only => [:index] - - def ajax? - return params[:ajax] == "true" - end - - def section_id - 'operation' - end - - def provider_qos_avg_time_to_submit_graph - params[:provider] = Provider.find(params[:id]) - graph = GraphService.dashboard_qos_avg_time_to_submit_graph(current_user, params)[params[:provider]][Graph::QOS_AVG_TIME_TO_SUBMIT] - respond_to do |format| - format.svg { render :xml => graph.svg} - end - end - - def quota_usage_graph - if params[:cloud_account_id] - params[:parent] = CloudAccount.find(params[:cloud_account_id]) - elsif params[:pool_id] - params[:parent] = Pool.find(params[:pool_id]) - else - return nil - end - - graphs = GraphService.dashboard_quota_usage(current_user, params) - graph = graphs[params[:parent]][Graph.get_quota_usage_graph_name(params[:resource_name])] - respond_to do |format| - format.svg { render :xml => graph.svg} - end - end - - def provider_instances_graph - graph = GraphService.dashboard_instances_by_provider(current_user, params)[Graph::INSTANCES_BY_PROVIDER_PIE] - respond_to do |format| - format.svg { render :xml => graph.svg} - end - end - - def monitor - end - - def index - # FIXME filter to just those that the user has access to - @cloud_accounts = CloudAccount.find(:all) - - - render :action => 'monitor' - end - - def hide_getting_started - cookies["#{@current_user.login}_hide_getting_started"] = { :value => true, :expires => 1.year.from_now } - redirect_to :action => 'show' - end - -end diff --git a/src/app/controllers/hardware_profiles_controller.rb b/src/app/controllers/hardware_profiles_controller.rb deleted file mode 100644 index d18110c..0000000 --- a/src/app/controllers/hardware_profiles_controller.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (C) 2010 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 HardwareProfilesController < ApplicationController - before_filter :require_user - - def index - @hardware_profiles = HardwareProfile.find(:all) - end - - def new - end - - def create - end - - def delete - end -end diff --git a/src/app/controllers/images_controller.rb b/src/app/controllers/images_controller.rb deleted file mode 100644 index da6998b..0000000 --- a/src/app/controllers/images_controller.rb +++ /dev/null @@ -1,57 +0,0 @@ -# -# 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 ImagesController < ApplicationController - before_filter :require_user - - def section_id - 'build' - end - - def index - end - - def cancel - Image.update(params[:id], :status => Image::STATE_CANCELED) - redirect_to :controller => 'templates', :action => 'new', :params => {'image_descriptor[id]' => params[:template_id], :tab => 'software'} - end - - def show - if params[:create_instance] - redirect_to :controller => 'instances', :action => 'new', 'instance[image_id]' => (params[:ids] || []).first - end - - require_privilege(Privilege::VIEW) - - @order_dir = params[:order_dir] == 'desc' ? 'desc' : 'asc' - @order = params[:order] || 'name' - @images = Image.search_filter(params[:search], Image::SEARCHABLE_COLUMNS).paginate( - :page => params[:page] || 1, - :order => @order + ' ' + @order_dir, - :include => :instances - ) - - if request.xhr? and params[:partial] - render :partial => 'images' - return - end - end -end diff --git a/src/app/controllers/instances_controller.rb b/src/app/controllers/instances_controller.rb deleted file mode 100644 index e877729..0000000 --- a/src/app/controllers/instances_controller.rb +++ /dev/null @@ -1,198 +0,0 @@ -# -# 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. - -require 'util/condormatic' - -class InstancesController < ApplicationController - before_filter :require_user, :get_nav_items - before_filter :instance, :only => [:show, :key] - layout :layout - - def section_id - 'runtime' - end - - def layout - return "aggregator" unless request.xhr? - end - - def index - @pools = Pool.list_for_user(@current_user, Privilege::MODIFY, :target_type => Instance) - - @order_dir = params[:order_dir] == 'desc' ? 'desc' : 'asc' - @order_field = params[:order_field] || 'name' - - # we can't use pool.instances, because we need custom sorting - @sorted_instances_by_pool = {} - Instance.find( - :all, - :include => [:template, :hardware_profile, :owner, :pool], - :order => @order_field + ' ' + @order_dir - ).each do |inst| - pool_id = inst.pool.id - next unless @pools.find {|p| p.id == pool_id} - (@sorted_instances_by_pool[pool_id] ||= []) << inst - end - end - - def show - end - - def key - unless @instance.instance_key.nil? - send_data @instance.instance_key.pem, - :filename => "#{@instance.instance_key.name}.pem", - :type => "text/plain" - return - end - flash[:warning] = "SSH Key not found for this Instance." - redirect_to :action => "show", :id => @instance - end - - def new - @instance = Instance.new(params[:instance]) - require_privilege(Privilege::CREATE, Instance, @instance.pool) if @instance.pool - # FIXME: we need to list only templates for particular user, - # => TODO: add TEMPLATE_* permissions - @templates = Template.paginate( - :page => params[:page] || 1, - :include => {:images => :replicated_images}, - :conditions => "replicated_images.uploaded = 't'" - ) - end - - def configure - @instance = Instance.new(params[:instance]) - require_privilege(Privilege::CREATE, Instance, @instance.pool) - @hardware_profiles = HardwareProfile.find(:all, :include => :architecture, - :conditions => {:provider_id => nil, - 'hardware_profile_properties.value' => @instance.template.architecture}) - end - - def create - if params[:cancel] - redirect_to :action => 'new', :instance => {:pool_id => params[:instance][:pool_id]} - return - end - - @instance = Instance.new(params[:instance]) - @instance.state = Instance::STATE_NEW - @instance.owner = current_user - - require_privilege(Privilege::CREATE, Instance, - Pool.find(@instance.pool_id)) - #FIXME: This should probably be in a transaction - if @instance.save! - # set owner permissions: - @instance.assign_owner_roles(current_user) - @task = InstanceTask.new({:user => current_user, - :task_target => @instance, - :action => InstanceTask::ACTION_CREATE}) - if @task.save - condormatic_instance_create(@task) - if Quota.can_start_instance?(@instance, nil) - flash[:notice] = "Instance added." - else - flash[:warning] = "Quota Exceeded: Instance will not start until you have free quota" - end - else - @pool = @instance.pool - render :action => 'configure' - end - redirect_to :action => 'index' - else - @hardware_profiles = HardwareProfile.all - render :action => 'configure' - end - end - - def instance_action - params.keys.each do |param| - if param =~ /^launch_instance_(\d+)$/ - redirect_to :action => 'new', 'instance[pool_id]' => $1 - return - end - end - - @instance = Instance.find((params[:id] || []).first) - require_privilege(Privilege::USE,@instance) - - if params[:instance_details] - render :action => 'show' - return - end - - if params[:remove_failed] - action = remove_failed - else - # action list will be longer (restart, start, stop..) - action = if params[:shutdown] - 'stop' - #elsif params[:restart] - # 'restart' - end - - unless @instance.valid_action?(action) - raise ActionError.new("'#{action}' is an invalid action.") - end - - # not sure if task is used as everything goes through condor - #permissons check here - @task = @instance.queue_action(@current_user, action) - unless @task - raise ActionError.new("#{action} cannot be performed on this instance.") - end - - case action - when 'stop' - condormatic_instance_stop(@task) - when 'destroy' - condormatic_instance_destroy(@task) - when 'start' - condormatic_instance_create(@task) - else - raise ActionError.new("Sorry, action '#{action}' is currently not supported by condor backend.") - end - end - - flash[:notice] = "#{@instance.name}: #{action} was successfully queued." - redirect_to :action => 'index' - end - - def delete - end - - def remove_failed - action ='remove failed' - raise ActionError.new("#{action} cannot be performed on this instance.") unless - @instance.state == Instance::STATE_ERROR - condormatic_instance_reset_error(@instance) - action - end - - private - - def instance - @instance = Instance.find(params[:id]) - require_privilege(Privilege::VIEW, @instance) - end - -end diff --git a/src/app/controllers/pools_controller.rb b/src/app/controllers/pools_controller.rb deleted file mode 100644 index c553318..0000000 --- a/src/app/controllers/pools_controller.rb +++ /dev/null @@ -1,138 +0,0 @@ -# -# 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. - -require 'util/condormatic' - -class PoolsController < ApplicationController - before_filter :require_user, :get_nav_items - - def section_id - 'administration' - end - - def index - @header = [ - { :name => "Pool name", :sort_attr => :name }, - { :name => "% Quota used", :sortable => false }, - { :name => "Quota (Instances)", :sort_attr => "quotas.total_instances"}, - { :name => "Pool Family", :sort_attr => "pool_families.name" } - ] - @pools = Pool.paginate(:all, :include => [ :quota, :pool_family ], - :page => params[:page] || 1, - :order => (params[:order_field] || 'name') +' '+ (params[:order_dir] || 'asc') - ) - end - - - def show - @pool = Pool.find(params[:id]) - require_privilege(Privilege::VIEW, @pool) - end - - def edit - @pool = Pool.find(params[:id]) - require_privilege(Privilege::MODIFY, @pool) - end - - def list - #FIXME: clean this up, many error cases here - @pool = Pool.find(params[:id]) - # FIXME: really we need perm-filtered list here - require_privilege(Privilege::VIEW, @pool) - @pool.reload - - @order_dir = params[:order_dir] == 'desc' ? 'desc' : 'asc' - @order = params[:order] || 'name' - - @instances = Instance.search_filter(params[:search], Instance::SEARCHABLE_COLUMNS).paginate( - :page => params[:page] || 1, - :order => @order + ' ' + @order_dir, - :conditions => {:pool_id => @pool.id} - ) - - if request.xhr? and params[:partial] - render :partial => 'instance/instances' - return - end - end - - def hardware_profiles - @pool = Pool.find(params[:id]) - @hardware_profiles = @pool.hardware_profiles - require_privilege(Privilege::VIEW, @pool) - end - - def realms - @pool = Pool.find(params[:id]) - @realm_names = @pool.realms - require_privilege(Privilege::VIEW, @pool) - end - - def new - require_privilege(Privilege::CREATE, Pool) - @pools = Pool.list_for_user(@current_user, Privilege::MODIFY) - @pool = Pool.new - end - - def create - require_privilege(Privilege::CREATE, Pool) - - #FIXME: This should probably be in a transaction - @pool = Pool.new(params[:pool]) - # FIXME: do we need any more handling around save failures? What if perm - # creation fails? - - quota = Quota.new - quota.save! - - @pool.quota_id = quota.id - - @pool.pool_family = PoolFamily.default - if @pool.save - flash[:notice] = "Pool added." - redirect_to :action => 'show', :id => @pool.id - else - render :action => :new - end - end - - def manage_pool - type = params[:commit] - pool_id = params[:pool_checkbox] - if type && Pool.exists?(pool_id) - if type == "edit" - redirect_to :action => 'edit', :id => pool_id - elsif type == "delete" - require_privilege(Privilege::MODIFY, Pool.find(pool_id)) - params[:id] = pool_id - destroy - end - else - flash[:notice] = "Error performing this operation" - redirect_to pool_path - end - end - - def delete - end - - kick_condor -end diff --git a/src/app/controllers/providers_controller.rb b/src/app/controllers/providers_controller.rb deleted file mode 100644 index 57b4240..0000000 --- a/src/app/controllers/providers_controller.rb +++ /dev/null @@ -1,151 +0,0 @@ -# -# 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 ProvidersController < ApplicationController - before_filter :require_user - before_filter :load_providers, :only => [:index, :show, :edit, :new, :accounts, :list] - - def section_id - 'administration' - end - - def index - end - - def show - @provider = Provider.find(:first, :conditions => {:id => params[:id]}) - require_privilege(Privilege::VIEW, @provider) - end - - def edit - @providers = Provider.list_for_user(@current_user, Privilege::VIEW) - @provider = Provider.find(:first, :conditions => {:id => params[:id]}) - require_privilege(Privilege::MODIFY, @provider) - end - - def new - require_privilege(Privilege::CREATE, Provider) - @providers = Provider.list_for_user(@current_user, Privilege::MODIFY) - @provider = Provider.new(params[:provider]) - kick_condor - end - - def create - require_privilege(Privilege::CREATE, Provider) - @providers = Provider.list_for_user(@current_user, Privilege::MODIFY) - @provider = Provider.new(params[:provider]) - - if params[:test_connection] - test_connection(@provider) - render :action => "new" - else - @provider.set_cloud_type! - if @provider.save && @provider.populate_hardware_profiles - flash[:notice] = "Provider added." - redirect_to :action => "show", :id => @provider - else - flash[:notice] = "Cannot add the provider." - render :action => "new" - end - kick_condor - end - end - - def update - @providers = Provider.list_for_user(@current_user, Privilege::MODIFY) - @provider = Provider.find(:first, :conditions => {:id => params[:id]}) - require_privilege(Privilege::MODIFY, @provider) - previous_cloud_type = @provider.cloud_type - - @provider.update_attributes(params[:provider]) - if params[:test_connection] - test_connection(@provider) - render :action => "edit" - else - @provider.set_cloud_type! - if previous_cloud_type != @provider.cloud_type - @provider.errors.add :url, "points to a different provider" - end - - if @provider.errors.empty? and @provider.save - flash[:notice] = "Provider updated." - redirect_to :action => "show", :id => @provider - else - flash[:notice] = "Cannot update the provider." - render :action => "edit" - end - kick_condor - end - end - - def destroy - if request.post? || request.delete? - @provider = Provider.find(params[:id]) - require_privilege(Privilege::MODIFY, @provider) - if @provider.destroy and @provider.destroyed? - redirect_to :action => "index" - flash[:notice] = "Provider Deleted" - return - end - - flash[:error] = { - :summary => "Failed to delete Provider", - :failures => @provider.errors.full_messages, - } - end - render :action => 'show' - end - - def hardware_profiles - @provider = Provider.find(params[:id]) - @hardware_profiles = @provider.hardware_profiles - require_privilege(Privilege::VIEW, @provider) - end - - def realms - @provider = Provider.find(params[:id]) - @realm_names = @provider.realms.collect { |r| r.name } - require_privilege(Privilege::VIEW, @provider) - end - - def settings - @provider = Provider.find(params[:id]) - require_privilege(Privilege::VIEW, @provider) - end - - def list - end - - def test_connection(provider) - @provider.errors.clear - if @provider.connect - flash[:notice] = "Successfuly Connected to Provider" - else - flash[:notice] = "Failed to Connect to Provider" - @provider.errors.add :url - end - end - - protected - def load_providers - @providers = Provider.list_for_user(@current_user, Privilege::VIEW) - end -end diff --git a/src/app/controllers/settings_controller.rb b/src/app/controllers/settings_controller.rb deleted file mode 100644 index 0717fc0..0000000 --- a/src/app/controllers/settings_controller.rb +++ /dev/null @@ -1,73 +0,0 @@ -# -# 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 - before_filter :require_user - - # Settings MetaData Keys - SELF_SERVICE_DEFAULT_QUOTA = "self_service_default_quota" - KEYS = [SELF_SERVICE_DEFAULT_QUOTA] - - def section_id - "system_settings" - end - - def index - @providers = Provider.list_for_user(@current_user, Privilege::VIEW) - end - - def self_service - require_privilege(Privilege::MODIFY) - @self_service_default_quota = MetadataObject.lookup(SELF_SERVICE_DEFAULT_QUOTA) - end - - def general_settings - require_privilege(Privilege::MODIFY) - end - - def update - KEYS.each do |key| - if params[key] - if key == SELF_SERVICE_DEFAULT_QUOTA - @self_service_default_quota = MetadataObject.lookup(key) - if !@self_service_default_quota.update_attributes(params[key]) - flash[:notice] = "Could not update the default quota" - render :self_service - return - end - elsif key == SELF_SERVICE_DEFAULT_POOL - if Pool.exists?(params[key]) - MetadataObject.set(key, Pool.find(params[key])) - end - elsif key == SELF_SERVICE_DEFAULT_ROLE - if Role.exists?(params[key]) - MetadataObject.set(key, Role.find(params[key])) - end - else - MetadataObject.set(key, params[key]) - end - end - end - flash[:notice] = "Settings Updated!" - redirect_to :action => 'self_service' - end - -end diff --git a/src/app/controllers/templates_controller.rb b/src/app/controllers/templates_controller.rb deleted file mode 100644 index 51ed922..0000000 --- a/src/app/controllers/templates_controller.rb +++ /dev/null @@ -1,267 +0,0 @@ -require 'util/repository_manager' - -class TemplatesController < ApplicationController - before_filter :require_user - layout :layout - - def layout - return "aggregator" unless request.xhr? - end - - def section_id - 'build' - end - - def index - @templates = Template.list_for_user(current_user, - Privilege::VIEW, - :include => :images, - :order => get_order('name')) - end - - def index_action - if params[:new_template] - redirect_to new_template_path - elsif params[:assembly] - redirect_to assembly_template_path(:id => params[:ids].to_a.first) - elsif params[:deployment_definition] - redirect_to deployment_definition_template_path(:id => params[:ids].to_a.first) - elsif params[:delete] - redirect_to destroy_multiple_templates_path(:ids => params[:ids].to_a) - elsif params[:edit] - if id = get_selected_id - redirect_to edit_template_path(:id => id) - else - redirect_to templates_path - end - elsif params[:build] - if id = get_selected_id - redirect_to new_build_path(:template_id => id) - else - redirect_to templates_path - end - else - raise 'Unknown action' - end - end - - # Since the template form submission can mean multiple things, - # we dispatch based on form parameters here - def dispatch - if params[:save] - create - elsif params[:cancel] - redirect_to templates_path - elsif params[:add_software_form] - collections - elsif params[:collections] - collections - elsif pkg = params.keys.find { |k| k =~ /^remove_package_(.*)$/ } - # actually remove the package from list - params[:packages].delete($1) if params[:packages] - new - elsif params[:add_selected] - new - elsif params[:cancel_add_software] - params[:selected_packages] = params[:packages] - params[:selected_groups] = params[:groups] - params[:cached_packages] = [] - new - elsif params.include?('metagroup_packages') - metagroup_packages - elsif params[:package_search] - search_packages - else - raise "unknown action" - end - end - - def new - check_create_permission - # can't use @template variable - is used by compass (or something other) - @tpl = Template.new(params[:tpl]) - @repository_manager = RepositoryManager.new(:repositories => params[:repository] || @tpl.platform) - @tpl.add_software(params[:packages].to_a + params[:selected_packages].to_a + params[:cached_packages].to_a, - params[:groups].to_a + params[:selected_groups].to_a) - render :action => :new - end - - def edit - @tpl = Template.find(params[:id]) - check_edit_permission - @tpl.attributes = params[:tpl] unless params[:tpl].blank? - @repository_manager = RepositoryManager.new(:repositories => params[:repository] || @tpl.platform) - render :action => :edit - end - - def create - check_create_permission - @tpl = Template.new(params[:tpl]) - @tpl.packages = params[:packages] - if @tpl.save - flash[:notice] = "Template saved." - @tpl.set_complete - redirect_to templates_path - else - @repository_manager = RepositoryManager.new(:repositories => params[:repository] || @tpl.platform) - render :action => 'new' - end - end - - def update - @tpl = Template.find(params[:id]) - @tpl.packages = [] - check_edit_permission - - if @tpl.update_attributes(params[:tpl]) - @tpl.set_complete - flash[:notice] = "Template updated." - redirect_to templates_path - else - @repository_manager = RepositoryManager.new(:repositories => params[:repository] || @tpl.platform) - render :action => 'edit' - end - end - - def search_packages - set_package_vars - @page = get_page - @cached_packages = params[:cached_packages].to_a + params[:selected_packages].to_a - @searched_packages = params[:package_search].empty? ? [] : @repository_manager.search_package( - params[:package_search]).paginate(:page => @page, :per_page => 60) - if request.xhr? - render :partial => 'search_packages' - else - render :search_packages - end - end - - def metagroup_packages - set_package_vars - @metagroup_packages = @repository_manager.metagroup_packages(params[:metagroup_packages]) - if request.xhr? - render :partial => 'metagroup_packages' - else - render :metagroup_packages - end - end - - def collections - set_package_vars - @collections = @repository_manager.groups - if request.xhr? - render :partial => 'collections' - else - render :collections - end - end - - def content_selection - set_package_vars(true) - @collections = @repository_manager.groups - render :collections - end - - def managed_content - if params[:template_id].blank? - @tpl = Template.new - check_create_permission - else - @tpl = Template.find(params[:template_id]) - check_edit_permission - end - @tpl.add_software(params[:packages].to_a + params[:selected_packages].to_a, - params[:groups].to_a + params[:selected_groups].to_a) - render :layout => false - end - - def destroy_multiple - ids = params[:ids].to_a - if ids.empty? - flash[:notice] = "No Template Selected" - else - errs = {} - Template.find(ids).each do |t| - if check_permission(Privilege::MODIFY, t) - t.destroy - errs[t.name] = t.errors.full_messages.join(". ") unless t.destroyed? - else - errs[t.name] = "You don't have permission to delete #{t.name}" - end - end - if errs.empty? - flash[:notice] = 'Template deleted' - else - flash_error('Error while deleting template', errs) - end - end - redirect_to templates_path - end - - def assembly - # FIXME: do we need perm check here? - end - - def deployment_definition - # FIXME: do we need perm check here? - @all_targets = Image.available_targets - end - - private - - def set_package_vars(set_all = false) - if params[:id].blank? - @tpl = Template.new - check_create_permission - else - @tpl = Template.find(params[:id]) - check_edit_permission - end - @tpl.attributes = params[:tpl] unless params[:tpl].nil? - @repository_manager = RepositoryManager.new(:repositories => params[:repository] || @tpl.platform) - @groups = @repository_manager.groups - @categories = @repository_manager.categories if not request.xhr? or set_all - @metagroups = @repository_manager.metagroups if not request.xhr? or set_all - @tpl.add_software(params[:packages].to_a, params[:groups].to_a) - end - - def get_order(default) - @order_dir = params[:order_dir] == 'desc' ? 'desc' : 'asc' - @order_field = params[:order_field] || default - "#{@order_field} #{@order_dir}" - end - - def flash_error(summary, errs) - flash.now[:error] ||= {} - flash.now[:error][:summary] = summary - flash.now[:error][:failures] ||= {} - flash.now[:error][:failures].merge!(errs) - end - - def check_create_permission - require_privilege(Privilege::CREATE, Template) - end - - def check_edit_permission - require_privilege(Privilege::MODIFY, @tpl) - end - - def get_selected_id - ids = params[:ids].to_a - if ids.size != 1 - flash[:warning] = ids.empty? ? 'No Template Selected' : 'You can select only one template' - return - end - return ids.first - end - - def get_page - if params[:page] == 'Previous' - return params[:old_page].to_i - 1 - elsif params[:page] == 'Next' - return params[:old_page].to_i + 1 - else - return params[:page].blank? ? 1 : params[:page].to_i - end - end -end diff --git a/src/app/controllers/users_controller.rb b/src/app/controllers/users_controller.rb deleted file mode 100644 index 04754a6..0000000 --- a/src/app/controllers/users_controller.rb +++ /dev/null @@ -1,145 +0,0 @@ -# -# 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 UsersController < ApplicationController - before_filter :require_user, :only => [:show, :edit, :update, :index, :destroy] - before_filter :current_user - - def new - require_privilege(Privilege::CREATE, User) unless current_user.nil? - @user = User.new - @user.quota = Quota.new - end - - def create - require_privilege(Privilege::CREATE, User) unless current_user.nil? - @user = User.new(params[:user]) - - if params[:commit] == "Reset" - redirect_to :action => :new - return - end - - @registration = RegistrationService.new(@user) - if @registration.save - if @current_user - flash[:notice] = "User registered!" - redirect_to users_path - else - flash[:notice] = "You have successfully registered!" - redirect_to :dashboard - end - else - flash[:warning] = "user registration failed: #{@registration.error}" - render :action => :new - end - end - - def show - if params.has_key?(:id) && params[:id] != "show" - @user = User.find(params[:id]) - else - @user = current_user - end - require_privilege(Privilege::VIEW, User) unless current_user == @user - @quota_resources = @user.quota.quota_resources() - end - - def edit - @user = params[:id] ? User.find(params[:id]) : current_user - require_privilege(Privilege::MODIFY, User) unless current_user == @user - end - - def update - @user = params[:user][:id] ? User.find(params[:user][:id]) : @current_user - require_privilege(Privilege::MODIFY, User) unless current_user == @user - if params[:commit] == "Save" - if @user - if @user.update_attributes(params[:user]) - flash[:notice] = "User updated!" - if @user == current_user - redirect_to :dashboard - else - redirect_to users_path - end - else - render :action => :edit - end - end - elsif params[:commit] == "Reset" - redirect_to :action => "edit", :id => @user.id - end - end - - def index - require_privilege(Privilege::VIEW, User) - @users = User.all - sort_order = params[:sort_by].nil? ? "login" : params[:sort_by] - if sort_order == "percentage_quota_used" - @users = User.all - @users.sort! {|x,y| y.quota.percentage_used <=> x.quota.percentage_used } - elsif sort_order == "quota" - @users = User.all - @users.sort! {|x,y| (x.quota.maximum_running_instances and y.quota.maximum_running_instances) ? x.quota.maximum_running_instances <=> y.quota.maximum_running_instances : (x ? 1 : -1) } - else - @users = User.find(:all, :order => sort_order) - end - end - - def manage_user - @current_user = current_user - type = params[:commit] - user_id = params[:user_checkbox] - if type && User.exists?(user_id) - if type == "edit" - redirect_to :action => 'edit', :id => user_id - elsif type == "delete" - params[:id] = user_id - destroy - end - else - flash[:notice] = "Error performing this operation" - redirect_to users_path - end - end - - def destroy - require_privilege(Privilege::MODIFY, User) - if request.post? || request.delete? - @user = User.find(params[:id]) - if @user == @current_user - flash[:notice] = "Can not delete the currently logged in user!" - elsif @user.destroy - flash[:notice] = "User Deleted" - else - flash[:error] = { - :summary => "Failed to delete User", - :failures => @user.errors.full_messages, - } - end - end - redirect_to users_path - end - - def section_id - "loginpage" - end -end diff --git a/src/app/helpers/dashboard_helper.rb b/src/app/helpers/dashboard_helper.rb deleted file mode 100644 index 86f0124..0000000 --- a/src/app/helpers/dashboard_helper.rb +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright (C) 2010 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. - -module DashboardHelper - - def monitor_quota_value(name, value, unit) - name=content_tag 'td', :class => 'first nowrap' do - name - end - value=content_tag 'td', :class => 'graph' do - content_tag 'div', :class => 'percentBlock' do - value - end - end - unit=content_tag 'td' do - unit - end - "#{name}#{value}#{unit}" - end - - def monitor_bar_value(value, opts={}) - bar=content_tag 'td', :class => "graph" do - percent_block=content_tag 'div', :class => 'percentBlock' do - # TODO: Count text-indent value correctly here - bar_style = "width:#{value}%;text-indent:14%" - content_tag 'div', :class => 'percentBlockInner good', :style => bar_style do - "#{value}%" - end - end - if opts[:min] and opts[:max] - min=content_tag 'div', :class => 'min' do "#{opts[:min]}% Min" ; end - max=content_tag 'div', :class => 'max' do "#{opts[:max]}% Max" ; end - "#{percent_block}#{min}#{max}" - else - percent_block - end - end - total=content_tag 'td' do - "#{opts[:total]}" - end - "#{bar}#{total}" - end - - -end diff --git a/src/app/stylesheets/aggregator.scss b/src/app/stylesheets/aggregator.scss deleted file mode 100644 index 381fc6d..0000000 --- a/src/app/stylesheets/aggregator.scss +++ /dev/null @@ -1,1325 +0,0 @@ -@charset "UTF-8"; -@import "base"; - -html { -} - -a { - color: $dcprimary; - text-decoration: none; - &:hover, &:focus { - color: lighten($dcprimary, 20%); - text-decoration: underline; - } - &:active { - color: darken($dcprimary, 20%); - } -} - -/* TEXT ENTRIES */ -input,textarea { - @include inset-box-shadow(0,1px,1px,rgba(0, 0, 0, 0.2)); - border: 1px solid darken($strokecl,20%); - background-color: #f0f0f0; - background: #f0f0f0 url(../../images/input-bg.png) repeat-x 0 0; - padding: 4px; - margin: 0; - &:focus { - border-width: 2px; - padding: 3px; - background-color: #fff; - outline: none; - } - &.disabled, &[disabled] { - opacity: 0.6; - } -} - input[type="search"] { - @include border-radius(20px); - padding: 4px 30px 4px 10px; - &:focus { - padding: 3px 29px 3px 9px; - } - } - /* CHECKBOXES and RADIOBUTTONS*/ - input[type="checkbox"],input[type="radio"] { - background-color: transparent; - border: none; - margin: 0; - padding: 2px; - &:focus { - border-width: 1px; - padding: 1px; - } - } - -/* FILE INPUT */ -input[type="file"] { - /* FIXME */ -} - -/* compensate grid_* for padding+border of the inputboxes and textareas */ -input.grid_1 { width: 30px !important; } -input.grid_2 { width: 90px !important; } - .grid_2 input[type="file"] { width: 90px; } -input.grid_3 { width: 150px !important; } - .grid_3 input[type="search"] { width: 118px; } - .grid_3 input[type="file"] { width: 150px; } -input.grid_4 { width: 210px !important; } -input.grid_5 { width: 270px !important; } -input.grid_6 { width: 330px !important; } -input.grid_7 { width: 390px !important; } -input.grid_8 { width: 450px !important; } - -/* BUTTONS */ -input[type='submit'],button,.button { - font-family: $screenfont; /* for some reason ff3.6 won't inherit from body */ - font-size: 10px; - display: inline-block; - background: -moz-linear-gradient(top, #f9f9f9, #f0f0f0, #e5e5e5, #e9e9e9); - background: -webkit-gradient(linear, left top, left bottom, from(#f9f9f9), color-stop(0.9, #e5e5e5), to(#e9e9e9)); - @include no-box-shadow; - border: 1px solid darken($strokecl, 20%); - color: #221e1f; - cursor: pointer; - margin: 4px; - padding: 4px 12px; - @include border-radius(5px); - @include text-shadow(0, 1px, 0, #fff); - min-height: 14px; - .nomargin { - margin: 0; - } - &:hover { - background: -moz-linear-gradient(top, #fff, #fff, #cfcfcf); - background: -webkit-gradient(linear, left top, left bottom, from(#fff), color-stop(0.6, #fff), to(#cfcfcf)); - @include box-shadow(0, 1px, 2px, rgba(0,0,0,0.5)); - text-decoration: none; - color: black; - } - &:active { - background: -moz-linear-gradient(top, #c2c3c0, #e4e5e4); - background: -webkit-gradient(linear, left top, left bottom, from(#c2c3c0), to(#e4e5e4)); - box-shadow: none; - -webkit-box-shadow: none; - -moz-box-shadow: none; - padding: 5px 12px 3px; - text-decoration: none; - } - &:focus { - text-decoration: none; - color: #000; - border-width: 2px; - padding: 3px 11px; - } - &.dialogbutton { - float: right; - margin-left: 3px; - margin: 40px 4px 4px; - } - &.formbutton { - display: inline-block; - margin-left: 3px; - margin: 40px 4px 4px; - float: left; - } - &.actionlink { - margin: 40px 0 0; - } - &.linkbutton { - background: none; - border:0; - margin:4px 4px 4px 5px; - color: $dcprimary; - text-decoration: none; - font:13px/1.5 "Liberation Sans","Droid Sans",Helvetica,Arial,sans-serif; - &:hover { - @include box-shadow(0, 0, 0, rgba(0,0,0,0)); - text-decoration: underline; - color: lighten($dcprimary,20%); - } - &:active { - color: darken($dcprimary, 20%); - font:13px/1.5 "Liberation Sans","Droid Sans",Helvetica,Arial,sans-serif; - margin:4px 4px 4px 5px; - } - } - &.disabled, &[disabled] { - cursor: default; - background: transparent; - opacity: 0.6; - /* @include no-box-shadow; */ - &:hover { - background: transparent; - text-decoration: none; - @include no-box-shadow; - } - } - &.iconbutton { - display: inline-block; - } - &.tiny { - padding: 4px; - margin: 0; - &:active, &:focus { - margin: 0; - padding: 3px; - } - } -} - -h1,h2,h3,h4,h5 { - text-transform: uppercase; - color: $headercl; - margin-top: 1em; - &:first-child { - margin-top: 0; - } -} - -h1 { font-size: 140%; } -h2 { font-size: 130%; } -h3 { - font-size: 120%; - &.gap { - margin: 3em 0 1em; - } -} -h4 { - font-size: 110%; - &.legend { - margin-bottom: 4px; - } -} -h5 { font-size: 80%; } - -.clear { - clear: both; -} - -.wrap { /* wrapper around floated elements */ - overflow: hidden; - margin-bottom: 2em; -} - -.nomargin { - margin: none; -} - -.la { text-align: left; } -.ra { text-align: right; } -.fr { float: right; } -.fl { float: left; } - -.twocolumn { - @include column-count(2); - @include column-gap(10px); -} - -.placeholder { margin-bottom: 2em; } -.disabled, a[href="#"] { opacity: 0.6; filter: alpha(opacity=60); cursor: default !important; } -.nomargin { margin: 0; } -.nowrap { white-space: nowrap; } -.gap { margin-bottom: 4em; } -.padforicon { - padding-right: 30px; - position: relative; -} -.pointercursor { cursor: pointer; } -.nospace { - margin: 0 !important; - padding: 0 !important; -} - -div,section,fieldset { - display: block; - overflow: hidden; /* force to wrap floats */ -} - -/* TABLES */ - -table { - border-collapse: collapse; - border: 1px solid $strokecl; - margin: 10px 0 40px; width: 100%; - font-size: 95%; - thead { - background-color: lighten($strokecl,8%); - th { - font-size: 95%; - padding: 2px 6px; - font-family: $headlinefont; - color: lighten($headercl,20%); - text-transform: uppercase; - border-right: 1px dotted darken($strokecl,20%); - &.active { - &.desc { - background: #fff url(../../images/order-desc.png) no-repeat center right; - } - &.asc { - background: #fff url(../../images/order-asc.png) no-repeat center right; - } - } - &.show { - border: 0px; - width: 50% - } - a, a:hover, a:active { - display: block; - margin: 0; - color: inherit; - text-decoration: none; - } - } - } - td { - padding: 4px; - vertical-align: top; - min-height: 16px; - } - &.noborder { - border: none; - thead { - background-color: transparent; - th { - border: none; - span { - color: lighten($headercl,30%); - } - } - } - td { - color: #888; - &.graph { - width: 102px; - height: 4em; - } - .percentBlock { - display: block; - border:1px solid #909090; - padding: 0; - width:100px; - font-size: 9px; - text-align: center; - color: #555; - .percentBlockInner { - } - .good { - background-color: $goodcl; - @include gradient-2p-linear(lighten($goodcl,30%),$goodcl); - } - .ok { - background-color: $okcl; - @include gradient-2p-linear(lighten($okcl,30%),$okcl); - } - .bad { - background-color: $badcl; - @include gradient-2p-linear(lighten($badcl,30%),$badcl); - } - } - .min { - background: url(../../images/arrow-min.png) no-repeat top center; - float:left; - padding-top:5px; - width:50px; - } - .max { - background: url(../../images/arrow-max.png) no-repeat top center; - float:left; - padding-top:5px; - width:50px; - } - } - } - &.gap { - margin-bottom: 7em; - } -} - -.action { - background: url(../../images/icons/action-icons.png) no-repeat 0 0; - &:hover { - background: url(../../images/icons/action-icons.png) no-repeat 0 0; - } - &:active { - background: url(../../images/icons/action-icons.png) no-repeat 0 0; - } -} -input[type='submit'].icon { - border: none; - background: transparent; - font-size: 100%; - padding: 0; - &:hover { - @include no-box-shadow; - color: $dcprimary; - &[disabled] { - color: #000; - } - } -} - -.actionsidebar { - border-right: 1px solid darken($footerbg, 10%); - width: 159px !important; - dt { - background-color: $footerbg; - border-bottom: 1px solid darken($footerbg, 10%); - border-top: 1px solid darken($footerbg, 10%); - color: $headercl; - font-family: $headlinefont; - font-size: 110%; - margin: 3px 0 20px; - padding:14px 10px 12px; - text-transform: uppercase; - } - dd { - margin: 0 0 0 10px; - font-size: 110%; - position: relative; - a { - display: block; - padding: 4px 4px 4px 20px; - &.selected { - background: url("../../images/actionsidebar-bullet.png") no-repeat left center; - font-weight: bold; - color: $dcprimary; - } - } - h5 { - margin: 3em 0 .5em 0; - &:first-child { - margin: 0 0 .5em 0; - } - } - ul { - display: block; - li { - display: block; - margin: 0; - padding: 0 0 0 16px; - position: relative; - } - } - } - form.buttononly { - display: inline-block; - } - span { - display: block; - position: absolute; - width: 16px; height: 16px; - left: 0; top: 50%; margin-top: -8px; - background: url(../../images/icons/action-icons.png) no-repeat 0 0; - } - .edit span { background-position: -16px 0;} - .delete span { background-position: -32px 0;} - .rename span { background-position: -80px 0;} - .copy span { background-position: -48px 0;} - .build span { background-position: -64px 0;} - .add span { background-position: -48px 0;} - .clear span { background-position: -160px 0;} - .start span { background-position: -176px 0;} - .stop span { background-position: -192px 0;} - .snapshot span { background-position: -208px 0;} - .grantaccess span { background-position: -224px 0;} - .request_help span { background-position: -240px 0;} - .info span { background-position: -256px 0;} - .restart span { background-position: -272px 0;} - .shutdown span { background-position: -288px 0;} - .console span { background-position: -304px 0;} - .VD span { background-position: -320px 0;} - label { - font-weight: normal; - } -} - - -.searchedpackages, .collections { - display: block; - margin: 0 2em 2em 0; - @include column-count(3); - li { - display: block; - margin: 0; - label { - font-weight: normal; - } - } -} - -/* ICONS */ - -img.icon { - width: 16px; height: 16px; - vertical-align: middle; - background: url(../../images/icons/statusicons.png) no-repeat 0 0; - &.large { - width: 48px; height: 16px; - } - &.yes { background-position: -16px 0; } - &.no { background-position: -32px 0; } - &.platform { - background: url(../../images/icons/platformicons.png) no-repeat 0 0; - &.rhel { - background-position: 0 0; - } - } -} - -#notification { - &>div { - padding: 10px; - @include border-radius(5px); - margin-bottom: 2em; - ul { - display: block; - margin: 0; - li { - display: block; - margin: 0; - } - } - } - .success { - background-color: lighten($goodcl,45%); - border: 1px solid lighten($goodcl,20%); - } - .error, .warning { - background-color: lighten($badcl,45%); - border: 1px solid lighten($badcl,20%); - } - .close { - display: block; - position: absolute; - width: 16px; height: 16px; - top: 0; right: 0; - background: url(../../images/icons/close.png) no-repeat 0 0; - cursor: pointer; - } -} - -ul.block { - display: block; - margin: 0; - li { - display: block; - margin: 0; - } -} - -#head { - background-color: $headerbg; - border-bottom: 2px solid desaturate(lighten($headerbg,30%),50%); - overflow: hidden; - header { - display: block; - h1 { - text-transform: uppercase; - font-size: 110%; - color: #fff; - margin: 2px 0 0; - padding: 6px 0 4px 54px; - background: url(../../images/rh_logo.png) no-repeat 10px center; - position: relative; - float: left; - img.dc { - position: absolute; - left: 43px; - top: 7px; - } - } - ul { - display: block; - float: right; - margin: 0 10px 0 0; - padding: 8px 0 0; - li { - display: inline-block; - margin: 0 5px; - &.hello { - margin-left: 30px; - } - a { - color: #fff; - } - } - } - } -} - -#subheader { - background: lighten($headerbg,50%) url(../../images/subheader-shade.png) repeat-x 0 0; - position: relative; - min-height: 130px; - #s { - font-size: 80%; - text-align: right; - overflow: hidden; - padding: 10px 0 0; - p { - margin: 0; - } - div { - position: relative; - margin-bottom: 0; - button { - position: absolute; - width: 16px; height: 16px; - text-indent: -200em; - right: 8px; top: 50%; - margin: -8px 0 0; - background-position: 0 0; - border: none; - padding: 0; - &:hover { - box-shadow: none; - -webkit-shadow: none; - -moz-box-shadow: none; - } - } - input[type="search"] { - border-color: $headerbg; - width: 80%; - } - } - a { - color: #fff; - margin-right: 10px; - } - } - hr { /* stroke on the bottom to be overdrawn by tabs */ - position: absolute; - display: block; - margin: 0; - left: 0; right: 0; bottom: 0; - height: 1px; - color: #9F9F9F; - background-color: #9F9F9F; - z-index: 1; - border-style: none; - } -} - -nav { - display: block; - overflow: hidden; - z-index: 2; - position: absolute; - bottom: 0; left: 0; right: 0; - &>ul { /* groups -- operation, administration ... */ - display: block; - &>li { - display: block; - float: left; - margin: 0 2px; - &>a { /* group labels */ - display: block; - cursor: default; - color: desaturate(lighten($headerbg,50%),50%); - font-weight: normal; - text-transform: uppercase; - font-family: $headlinefont; - &:hover, &:active { - color: desaturate(lighten($headerbg,50%),50%); - text-decoration: none; - } - } - &.selected>ul { /* generic selected tabs */ - background-color: #fff; - border-bottom: 1px solid #fff; - } - &.runtime>ul>li { - max-width: 90px; - } - &>ul { /* generic background tabs */ - display: block; - margin: 0; - background-color: #ddd; - overflow: hidden; - border-left: 1px solid #9F9F9F; - border-right: 1px solid #9F9F9F; - border-bottom: 1px solid #9F9F9F; - li { /* tab items */ - font-size: 95%; - margin: 0; padding: 10px 8px 6px; - text-align: center; - font-family: $screenfont; - font-weight: bold; - display: block; - float: left; - max-width: 70px; - a { - display: table-cell; - vertical-align: middle; - height: 38px; /* easy click targets */ - color: #888; - padding: 2px 6px; margin: 0; - } - &.selected { - a { - color: #000; - } - } - &.disabled { - a { - color: #aaa; - cursor: default; - &:hover { - text-decoration: none; - } - } - } - } - } - } - } - - #help { - float: right; - margin-right: 10px; - a { - display: block; - color: #fff; - cursor: pointer; - width: 48px; height: 37px; - margin: 20px 0 0; - background: url(../../images/help-bubble.png) no-repeat 0 0; - text-align: center; - padding: 8px 0 0; - } - &.disabled a { - cursor: default !important; - } - } - - &.subnav { /* subnavigation */ - position: relative; - background: #888 url(../../images/subnav-bg.png) repeat-x 0 0; /* fallback */ - border-top: 3px solid #fff; - border-bottom: 1px solid #666; - overflow: visible; - min-height: 6px; - &>ul { - /* - position: absolute; - top: 0; left: 0; right: 0; - */ - width: 960px; - margin: 0 auto; - padding: 4px; - overflow: visible; - height: 22px; - li { - a { - height: 20px; - cursor: pointer; - font-family: $screenfont; - text-transform: none; - display: inline-block; - color: #fff; - margin: 2px 6px; - &.selected { - @include text-shadow(0,2px,2px,rgba(0,0,0,0.9)); - height: 30px; - background: url(../../images/selected-subnav.png) no-repeat bottom center; - } - } - } - } - } - &.subsubnav { /* in page tabs */ - position: static; - overflow: hidden; - bottom: inherit; - left: inherit; - right: inherit; - margin-bottom: 2em; - &>ul { - display: block; - li { - display: block; - float: left; - a { - cursor: pointer; - font-family: $screenfont; - text-transform: none; - font-weight: normal; - color: black; - display: block; - padding: 6px; margin-right: 10px; - &.selected { - color: #fff; - background-color: $dcprimary; - @include border-radius(5px); - } - } - } - } - } -} - - /* color coding for the subnav */ - #operation .subnav { background-color: $operationbg; } - #operation nav>ul>li>ul>li>a.selected { color: $operationbg; } - #administration .subnav, - #system_settings .subnav, - #loginpage .subnav { background-color: $administrationbg; } - #administration nav>ul>li>ul>li>a.selected, - #system_settings nav>ul>li>ul>li>a.selected, - #loginpage nav>ul>li>ul>li>a.selected { color: $administrationbg; } - #build .subnav { background-color: $buildbg; } - #build nav>ul>li>ul>li>a.selected { color: $buildbg; } - #runtime .subnav { background-color: $runtimebg; } - #runtime nav>ul>li>ul>li>a.selected { color: $runtimebg; } - #operation .subnav>ul>li a.selected { background: url(../../images/selected-subnav-op.png) no-repeat bottom center; } - #administration .subnav>ul>li a.selected, - #system_settings .subnav>ul>li a.selected, - #loginpage .subnav>ul>li a.selected - { background: url(../../images/selected-subnav-ad.png) no-repeat bottom center; } - #build .subnav>ul>li a.selected { background: url(../../images/selected-subnav-bu.png) no-repeat bottom center; } - #runtime .subnav>ul>li a.selected { background: url(../../images/selected-subnav-ru.png) no-repeat bottom center; } - -/* image backgrounds for tabs */ -li.operation>ul, li.administration>ul, li.build>ul, li.runtime>ul { - background: #ddd url(../../images/tab-bg.png) repeat-x 0 0; -} - li.operation.selected>ul { background-position: 0 -140px; } - li.operation>ul { background-position: 0 -210px; } - li.administration.selected>ul { background-position: 0 -420px; } - li.administration>ul { background-position: 0 -490px; } - li.build.selected>ul { background-position: 0 -280px; } - li.build>ul { background-position: 0 -350px; } - li.runtime.selected>ul { background-position: 0 0; } - li.runtime>ul { background-position: 0 -70px; } - - - -.modalbox { - margin: 150px auto; - @include box-shadow(0,1px,5px,rgba(0, 0, 0, 0.6)); - width: 550px; - overflow: hidden; - h2 { - background-color: $formheadbg; - color: $formheadfg; - text-transform: uppercase; - font-size: 120%; - padding: 10px; - } - .dcloud_form { - margin: 40px; - overflow: hidden; - } - .errorExplanation { - h2 { - text-transform: none; - } - } -} - -#content { - position: relative; - margin-top: 2em; - margin-bottom: 60px; - overflow: hidden; -} - -/* FORMS */ -/* generic */ -label { - text-align: right; - font-weight: bold; - &.header { - text-align: left; - font-weight: normal; - font-size: 90%; - margin-bottom: 1em; - } - &.big { - text-align: left; - text-transform: uppercase; - font-family: $headlinefont; - font-size: 110%; - font-weight: normal; - color: $formheadfg; - } -} - -legend { - font-size: 130%; - font-family: $headlinefont; - font-weight: bold; - text-transform: uppercase; - color: $headercl; -} - -fieldset.gap { - margin-bottom: 7em; -} - -.fieldWithErrors { - border: 0; margin: 0; padding: 0; - overflow: visible; - input { - background-color: lighten($errorcl, 45%); - color: $errorcl; - } - label { - color: $errorcl; - } -} - -.pagination { - font-size: 90%; - text-align: right; - .disabled { - display: none; - } - input { - display: inline-block; - text-align: center; - background: none; - border: 1px solid $strokecl; - width: 18px; padding: 3px; margin-right: 4px; - @include border-radius(0); - &.prev_page, &.next_page { - width: 54px; - &:active, &:hover, &:focus { /* behave like links, not buttons */ - width: 54px; - } - } - &:active, &:hover, &:focus { /* behave like links, not buttons */ - text-align: center; - background: none; - @include no-box-shadow(); - width: 18px; padding: 3px; margin-right: 4px; - } - } - .current { - text-align: center; - display: inline-block; - width: 22px; - border: none; - font-weight: bold; - } -} - -.pageinfo { - float: left; -} - -/* simple two column label + input pairs */ -.dcloud_form { - fieldset { - overflow: hidden; - margin: 10px 0 0; - text-align: left; - label { - display: inline-block; - font-weight: bold; - padding: 4px 0 0 0; - } - input[type='text'], input[type='password'], textarea { - display: inline-block; - width: 20em; - } - } - .indented { - margin: 10px 0 0; - text-align: right; - input[type="text"],label,a,div,p { - text-align: left; - display: inline-block; - width: 20em; - } - } -} - -/* search forms */ - -.search { - position: relative; - button { - position: absolute; - width: 16px; height: 16px; - text-indent: -200em; - right: 8px; top: 50%; - margin: -8px 0 0; - background-position: 0 0; - border: none; - padding: 0; - &:hover { - box-shadow: none; - -webkit-shadow: none; - -moz-box-shadow: none; - } - } - input[type="search"] { - float: right; /* webkit adds an extra padding and makes the widget narrower */ - } -} -/* WIZARD TILES */ - -ul.tiles { - overflow: hidden; - margin: 2em 0 0; - li.grid_8 { - margin-bottom: 30px; - padding-left: 60px; - width: 400px !important; - position: relative; - img { - position: absolute; - background: url(../../images/icons/config-icons.png) no-repeat 0 0; - width: 48px; height: 48px; - top: 0; left: 0; - } - } - button, a.button { - float: right; - } - .disabled { - opacity: 0.6; - button { - pointer: default; - } - } -} - -/* CONFIG PANE ICONS */ - - #settings { - img { background-position: 0 -48px; } - &.disabled { - img { background-position: 0 0; } - } - } - #locales { - img { background-position: -48px -48px; } - &.disabled { - img { background-position: -48px 0; } - } - } - #users { - img { background-position: -144px -48px; } - &.disabled { - img { background-position: -144px 0; } - } - } - #providers { - img { background-position: -96px -48px; } - &.disabled { - img { background-position: -96px 0; } - } - } - #permissions { - img { background-position: -288px -48px; } - &.disabled { - img { background-position: -288px 0; } - } - } - #hardware { - img { background-position: -240px -48px; } - &.disabled { - img { background-position: -240px 0; } - } - } - #services { - img { background-position: -192px -48px; } - &.disabled { - img { background-position: -192px 0; } - } - } - -/* GRAPHS */ - -.graphkey { - li { - padding: 2px 4px 2px 32px; - background: url(../../images/graph-key.png) no-repeat 0 0; - height: 18px; overflow: hidden; - } - .instances { background-position: 0 0; } - .requests { background-position: 0 -18px; } - .ttl { background-position: 0 -36px; } - .failures { background-position: 0 -54px; } - .retries { background-position: 0 -72px; } -} - -footer { - font-size: 90%; - margin: 10px 0 0; - padding: 10px; - display: block; - background: $footerbg url(../../images/footer-shade.png) repeat-x 0 0; - ul { - display: block; - padding: 10px 10px 0 0; - min-height: 50px; - li { - display: block; - float: right; - } - } - - &.fixed { - position: absolute; - bottom: 0; left: 0; right: 0; - } -} - -/* RIGHT SIDEBAR */ -.sidebarcontainer { - /* height: 300px; overflow: scroll; */ - display: block; - li { - display: block; - margin: 0; - } - h5 { - text-transform: none; - margin-top: 3em; - } -} - -/* PAGE SPECIFIC */ - -/* DASHBOARD */ - -.currency { - font-size: 180%; - line-height: 70%; -} - -/* GRINDS */ -.status,.capacity { - span { - display: inline-block; - width: 10px; - height: 10px; - background: url(../../images/icons/status.png) no-repeat 0 0; - &.good { - background-position: 0 0; - } - &.ok { - background-position: 0 -10px; - } - &.bad { - background-position: 0 -20px; - } - } -} - -/* INSTANCE MANAGEMENT */ -.poolname { - h4 { - float: left; - margin: 10px 0 0; - } -} - -.poolfilter { - margin: 10px 0 0; - label { - font-weight: normal; - margin-right: 1em; - } -} - -a.iconbutton { - padding: 4px 4px 4px 24px; - position: relative; - overflow: hidden; - @include border-radius(2px); - &:active { - padding: 4px 4px 4px 24px; - } - &:focus { - padding: 3px 3px 3px 23px; - } - img { - position: absolute; - width: 18px; - height: 54px; - left: 0; top: 50%; - margin-top: -27px; - background: url(../../images/icons/launchinstance.png) no-repeat 0 0; - } -} - -/* TEMPLATES */ - -#build { - #add_software_button { - margin-top: 2em; - font-size: 140%; - } - - #package_selection_list { - display: block; - overflow: auto; - margin-top: 2em; - &.loading { - display: block; - height: 100px; - background: url(../../images/spinner.gif) no-repeat center center; - } - &>.grid_16 { - margin: 0; - } - } - - #metagrouppackages { - &.loading { - display: block; - height: 100px; - background: url(../../images/spinner.gif) no-repeat center center; - } - } - - span.loading { - background: url(../../images/spinner.gif) no-repeat center left; - display: inline-block; - padding: 6px 0 6px 24px; - } - .packagewrap { - position: relative; - float: left; - padding: 4px 22px 4px 4px; - margin: 2px; - @include border-radius(4px); - .remove_package { - position: absolute; - width: 16px; height: 16px; - top: 50%; right: 4px; - border: none; - background: url(../../images/icons/action-icons.png) no-repeat -32px 0 !important; - text-indent: -200em; - padding: 0; margin: -8px 0; - @include border-radius(2px); - &:hover { - @include no-box-shadow(); - background: lighten($dcprimary,10%) url(../../images/icons/action-icons.png) no-repeat -32px 0 !important; - } - } - .packagename { - cursor: pointer; - &:hover { - color: white; - } - } - &.selected { - color: white; - background-color: $dcprimary; - .packagename { - color: white; - } - } - &:hover { - color: white; - background-color: $dcprimary; - .packagename { - color: white; - } - } - } - - .packagegroupsidebar { - display: block; - text-align: right; - font-size: 120%; - li { - display: block; - margin: 0; - } - .icon { - text-transform: capitalize; - } - } - #collections { - margin: 0 0 1em; - font-weight: bold; - } - - .metagrouppackages { - display: block; - &>li { - display: block; - text-transform: uppercase; - margin: 0 2em 2em 0; padding: 0; - label { - cursor: pointer; - } - ul { - @include column-count(3); - display: block; - text-transform: none; - font-size: 95%; - li { - display: block; - margin: 0 0 0 4px; - text-transform: capitalize; - label { - font-weight: normal; - } - } - } - } - } -} - #dropdown { - position: absolute; - background-color: white; - border: 1px solid $dcprimary; - @include border-radius-bottom(4px); - padding: 1em; - display: none; - z-index: 2; - font-size: 95%; - } - -/* IE and other horror browser workarounds */ - -/* basic image styling for buttons in older browsers */ -.no-cssgradients input[type='submit'], .no-cssgradients button, .no-cssgradients .button { - - /* FIXME image based buttons */ -} - -/* when modalbox miss dropshadow set some border */ -.no-boxshadow .modalbox { border: 2px solid $strokecl; } - - -/* jQuery UI tabs overrides */ - -.ui-widget-content { border: none; } -.ui-tabs { - margin-bottom: 1em; - .ui-widget-header { - font-size: 90%; - background: transparent; - border: none; - } - .ui-state-default { - background: transparent; - border: none; - } - .ui-state-active { - background-color: $dcprimary; - @include border-radius(5px); - &>a { - color: #fff; - } - } -} - -/* DEBUG GRID */ -#grid { - display: none; - position: fixed; - top: 0; bottom: 0; - left: 50%; - width: 1020px; - margin-left: -510px; -} diff --git a/src/app/views/builds/index.haml b/src/app/views/builds/index.haml deleted file mode 100644 index 0d2d5ce..0000000 --- a/src/app/views/builds/index.haml +++ /dev/null @@ -1,89 +0,0 @@ -- columns = [ | - {:name => 'NAME', :sort_attr => 'templates.name'}, | - {:name => 'OS', :sort_attr => 'templates.platform'}, | - {:name => 'VERSION', :sort_attr => 'templates.platform_version'}, | - {:name => 'ARCH', :sort_attr => 'templates.architecture'}, | - {:name => 'STATUS', :sort_attr => 'status'}, | -] | - -- form_tag :action => "" do - .actionsidebar.grid_3 - %dl - %dt Build Job Actions - %dd - %h5 JOB QUEUE - %ul - %li.delete - %span - = submit_tag "Cancel Job", :name => "job_details", :disabled => true, :class => "icon" - %li.show - %span - = submit_tag "Show Job Details", :name => "job_details", :disabled => true, :class => "icon" - %li.show - %span - = submit_tag "Show Job Log", :name => "job_log", :disabled => true, :class => "icon" - %li.clear - %span - = submit_tag "Clear Job History", :name => "job_history", :disabled => true, :class => "icon" - - .grid_13 - %h1 Status - %section.wrap.status - %label.grid_4.alpha Image Warehouse Status: - .grid_3.suffix_6.omega - %span.good - Green - - %label.grid_4.alpha Total Builds in Queue: - .grid_3.suffix_6.omega - = @running_images.size - - %label.grid_4.alpha Number of VM's Building: - .grid_3.suffix_6.omega - = @running_images.select {|i| i.status == Image::STATE_BUILDING}.size - - %h1 Running - - %table - = sortable_table_header(columns) - %tbody - - if @running_images.empty? - %tr - %td{:colspan => 5} No Images - - else - - @running_images.each do |img| - %tr - %td= img.template.name - %td= img.template.platform - %td= img.template.platform_version - %td= img.template.architecture - %td= img.status - - - unless @failed_images.empty? - %h1 Failed - %table - = sortable_table_header(columns) - %tbody - - @failed_images.each do |img| - %tr - %td= img.template.name - %td= img.template.platform - %td= img.template.platform_version - %td= img.template.architecture - %td= img.status - - %h1 Completed - %table - = sortable_table_header(columns) - %tbody - - if @completed_images.empty? - %tr - %td{:colspan => 5} No Images - - else - - @completed_images.each do |img| - %tr - %td= img.template.name - %td= img.template.platform - %td= img.template.platform_version - %td= img.template.architecture - %td OK diff --git a/src/app/views/builds/new.haml b/src/app/views/builds/new.haml deleted file mode 100644 index 2cb159e..0000000 --- a/src/app/views/builds/new.haml +++ /dev/null @@ -1,55 +0,0 @@ -%h2 Build Request -- form_tag :action => 'create' do - = hidden_field_tag :template_id, @tpl.id - %h3 Deployment Definition - %fieldset.clearfix - = label_tag :deploy_name, 'Deployment Definition Name:', :class => 'grid_4' - = text_field_tag 'deploy_name', 'Deployment Name', :disabled => true, :class => 'grid_3' - = text_field_tag 'deploy_description', 'Deployment Description', :disabled => true, :class => 'grid_3' - %fieldset.clearfix - .prefix_4.grid_6 - = check_box_tag 'use_for_machine', 1, true, :disabled => true - = label_tag 'use_for_machine', 'Use for Machine Definition Name and Description' - %fieldset.clearfix - .grid_7 - = file_field :templates, :choose_logo, :value => 'Choose Logo', :disabled => true - = text_field :templates, :logo_text, :value => 'Logo Text (5 characters)', :disabled => true, :class => "grid_3" - - %fieldset.clearfix - %label.grid_4{:for => :template_group} - Template Category: - .grid_3 - = select_tag(:template_group, options_for_select([['User Private', 1]])) - - %h3 Deployment Options - %fieldset.clearfix - .grid_6 - %label OS: - = @tpl.platform - .grid_3 - Hardware Profile - .grid_3.suffix_3 - Locale - %fieldset.clearfix - .grid_3 - %label OS Version: - = @tpl.platform_version - .grid_3.ra - %label Global Settings: - .grid_3 - Small - .grid_3 - Any - .grid_3 - = submit_tag "Config", :name => "config", :disabled => true - %h3 Build Options - %label Choose Provider Format: - %section.clearfix.gap - %ul.block - - @all_targets.each do |target_id, target| - %li - = check_box_tag 'targets[]', target_id, false, :id => target_id - = label_tag target_id, target['name'] - - = submit_tag "Submit to Build", :name => "build" - = submit_tag "Cancel", :name => "cancel" diff --git a/src/app/views/cloud_accounts/_form.haml b/src/app/views/cloud_accounts/_form.haml deleted file mode 100644 index 2d35d47..0000000 --- a/src/app/views/cloud_accounts/_form.haml +++ /dev/null @@ -1,52 +0,0 @@ -= error_messages_for 'cloud_account' -%fieldset.clearfix.nomargin - %label.grid_4.la.alpha - = t('.account_name') - %span.required * - %label.grid_3.la - = t('.user_name') - %span.required * - %label.grid_3.la - = t('.password') - %span.required * - %label.grid_3.la.omega - = t('.quota_instances') - %span.required * -%fieldset.nomargin.clearfix - = f.text_field :label, :title => t('.account_name'), :class => "grid_4 alpha" - = f.text_field :username, :title => t('.user_name'), :class => "grid_3" - = f.password_field :password, :title => t('.password'), :class => "grid_3" - = text_field "quota", :maximum_running_instances, :title => t('.quota_instances'), :value => @quota.maximum_running_instances || "unlimited", :id => "quota_instances", :class => "grid_3 omega" -%fieldset.nomargin.clearfix - .grid_3.prefix_10.alpha.omega - ( - %button.linkbutton.nospace{ :type => 'button', :onclick => "set_unlimited_quota("quota_instances");" }<> - = t('.unlimited_quota') - ) -%fieldset.clearfix.nomargin - %label.grid_4.la.alpha - = t('.account_number') - %span.required * - %label.grid_3.la - = t('.account_private_cert') - %span.required * - %label.grid_3.la - = t('.account_public_cert') - %span.required * - .grid_3.omega -%fieldset.clearfix.nomargin - = f.text_field :account_number, :title => t('.account_number'), :class => "grid_4 alpha" - .grid_3 - = f.file_field :x509_cert_priv_file, :title => t('.account_private_cert') - .grid_3 - = f.file_field :x509_cert_pub_file, :title => t('.account_public_cert') - .grid_3.omega - ( - %button.linkbutton.nospace{ :type => 'submit', :value => t('.test_account'), :name => 'test_account', :id => 'test_account' }<> - = t('.test_account') - ) - -:javascript - function set_unlimited_quota(elem_id) { - $("#" + elem_id)[0].value = "unlimited"; - } diff --git a/src/app/views/cloud_accounts/edit.haml b/src/app/views/cloud_accounts/edit.haml deleted file mode 100644 index dc24584..0000000 --- a/src/app/views/cloud_accounts/edit.haml +++ /dev/null @@ -1,17 +0,0 @@ -= render :partial => 'providers/providers' -#details.grid_13 - %nav.subsubnav - = render_navigation({:context => 'old', :level => 4}) - - %h2 - = t('.edit_provider_account') - - form_for @cloud_account, :url => provider_account_path(@provider, @cloud_account), :html => { :method => :put, :multipart => true } do |f| - = render :partial => 'form', :locals => { :f => f } - %fieldset.clearfix - .grid_13.alpha.omega - = submit_tag t(:edit), :class => "ra nomargin dialogbutton" - %section - %p.requirement - %span.required * - - - = t('.required_field') diff --git a/src/app/views/cloud_accounts/index.haml b/src/app/views/cloud_accounts/index.haml deleted file mode 100644 index e4d8670..0000000 --- a/src/app/views/cloud_accounts/index.haml +++ /dev/null @@ -1,25 +0,0 @@ -= render :partial => 'providers/providers' -#details.grid_13 - %nav.subsubnav - = render_navigation({:context => 'old', :level => 4}) - %h2 - = t('.provider_accounts') - - unless @provider.cloud_accounts.empty? - %table - %thead - %tr - %th{:scope => "col"} Label - %th{:scope => "col"} Username - %th{:scope => "col"} Account Number - %th{:scope => "col", :colspan => "2"} Actions - %tbody - - @provider.cloud_accounts.each do |cloud_account| - %tr - %td= cloud_account.label - %td= cloud_account.username - %td= cloud_account.account_number - %td= link_to 'Edit', edit_provider_account_path(@provider, cloud_account) - %td= link_to 'Delete', destroy_providers_account_path(@provider, cloud_account), :confirm => 'Are you sure?' - - - if @provider.cloud_accounts.empty? - = link_to 'Add', new_provider_account_path(@provider.id), :class => 'button' diff --git a/src/app/views/cloud_accounts/new.haml b/src/app/views/cloud_accounts/new.haml deleted file mode 100644 index b605714..0000000 --- a/src/app/views/cloud_accounts/new.haml +++ /dev/null @@ -1,17 +0,0 @@ -= render :partial => 'providers/providers' -#details.grid_13 - %nav.subsubnav - = render_navigation({:context => 'old', :level => 4}) - - %h2 - = t('.new_provider_account') - - form_for @cloud_account, :url => provider_accounts_path(@provider), :html => { :multipart => true } do |f| - = render :partial => 'form', :locals => { :f => f } - %fieldset.clearfix - .grid_13.alpha.omega - = submit_tag t(:add), :class => "ra nomargin dialogbutton" - %section - %p.requirement - %span.required * - - - = t('.required_field') diff --git a/src/app/views/dashboard/_dashboard_nav.haml b/src/app/views/dashboard/_dashboard_nav.haml deleted file mode 100644 index b75690c..0000000 --- a/src/app/views/dashboard/_dashboard_nav.haml +++ /dev/null @@ -1,13 +0,0 @@ -- menu = [ { :text => "Summary", :action => "index" }, | - { :text => "Alerts", :action => "alerts" }, | - { :text => "Service Quality", :action => "service_quality" }, | - { :text => "Quota Usage", :action => "quota_usage" }, | - { :text => "Billing", :action => "billing" }, | - { :text => "Help Tickets", :action => "help_tickets" }, ] | - -#dashboard-tabs{ :class => "ui-tabs ui-widget ui-widget-content ui-corner-all" } - %ul{ :class => "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header" } - - menu.each do |item| - - selection_style = "ui-tabs-selected ui-state-active" if item[:action] == controller.action_name - %li{ :class => "#{selection_style} ui-state-default ui-corner-top" } - = link_to item[:text], { :controller => "dashboard", :action => item[:action] } diff --git a/src/app/views/dashboard/alerts.haml b/src/app/views/dashboard/alerts.haml deleted file mode 100644 index 2ad3978..0000000 --- a/src/app/views/dashboard/alerts.haml +++ /dev/null @@ -1,2 +0,0 @@ -%h1 Alerts -%p located in app/views/dashboard/alerts.haml diff --git a/src/app/views/dashboard/billing.haml b/src/app/views/dashboard/billing.haml deleted file mode 100644 index 5f0efec..0000000 --- a/src/app/views/dashboard/billing.haml +++ /dev/null @@ -1,2 +0,0 @@ -%h1 Billing -%p located in app/views/dashboard/billing.haml diff --git a/src/app/views/dashboard/help_tickets.haml b/src/app/views/dashboard/help_tickets.haml deleted file mode 100644 index a32e7f1..0000000 --- a/src/app/views/dashboard/help_tickets.haml +++ /dev/null @@ -1,2 +0,0 @@ -%h1 Help Tickets -%p located in app/views/dashboard/help_tickets.haml diff --git a/src/app/views/dashboard/monitor.haml b/src/app/views/dashboard/monitor.haml deleted file mode 100644 index 610a228..0000000 --- a/src/app/views/dashboard/monitor.haml +++ /dev/null @@ -1,185 +0,0 @@ -%section.gap - .grid_3.disabled - = radio_button_tag :dashboard, 'system', :checked => "checked" - %label{:for => 'dashboard_system'} View System Dashboard - .grid_13.disabled - = radio_button_tag :dashboard, 'user' - %label{:for => 'dashboard_user'} View User Dashboard -.grid_16 - %h2 Key Metrics - %table{ :class => 'noborder' } - %thead - %tr - %th - %th{ :colspan => 2 } Aggregate quota - %th{ :colspan => 2 } Current usage - %th{ :colspan => 2 } Avg: Last 24 hours - %th{ :colspan => 2 } Avg: Last month - %th{ :colspan => 2 } Avg: Calendar year - %tbody - %tr - =monitor_quota_value "Number of Instances", '2.500', 'Instances' - =monitor_bar_value '32', :total => '2351' - =monitor_bar_value '32', :total => '2351', :min => 13, :max => 83 - =monitor_bar_value '32', :total => '2351', :min => 13, :max => 83 - =monitor_bar_value '32', :total => '2351', :min => 13, :max => 83 - %tr - =monitor_quota_value "System Storage", '1.200', 'Templates' - =monitor_bar_value '32', :total => '2351' - =monitor_bar_value '32', :total => '2351', :min => 13, :max => 83 - =monitor_bar_value '32', :total => '2351', :min => 13, :max => 83 - =monitor_bar_value '32', :total => '2351', :min => 13, :max => 83 - %tr - =monitor_quota_value "Operational Storage", '512', 'TB' - =monitor_bar_value '32', :total => '2351' - =monitor_bar_value '32', :total => '2351', :min => 13, :max => 83 - =monitor_bar_value '32', :total => '2351', :min => 13, :max => 83 - =monitor_bar_value '32', :total => '2351', :min => 13, :max => 83 - %tr - =monitor_quota_value "Customed Network Traffic", '824', 'GB' - =monitor_bar_value '32', :total => '2351' - =monitor_bar_value '32', :total => '2351', :min => 13, :max => 83 - =monitor_bar_value '32', :total => '2351', :min => 13, :max => 83 - =monitor_bar_value '32', :total => '2351', :min => 13, :max => 83 - %tr - =monitor_quota_value "Cost per hour", '824', '<span class="currency">¤</span>' - =monitor_bar_value '32', :total => '102' - =monitor_bar_value '32', :total => '2351', :min => 13, :max => 83 - =monitor_bar_value '32', :total => '2351', :min => 13, :max => 83 - =monitor_bar_value '32', :total => '2351', :min => 13, :max => 83 - - %h2 Aggregate quality of service - %section.wrap - = image_tag 'placeholder_rackspace_graph.png', :class => "placeholder" - %div{ :class => 'grid_4 alpha' } - %h4.legend Show: - %ul.block.twocolumn - %li - %input{ :type => 'checkbox', :checked => 'checked', :name => 'instances', :id => 'instances' } - %label{ :for => 'instances' } Instances - %li - %input{ :type => 'checkbox', :checked => 'checked', :name => 'time_to', :id => 'time_to' } - %label{ :for => 'time_to' } Time to - %li - %input{ :type => 'checkbox', :checked => 'checked', :name => 'launch_failures', :id => 'launch_failures' } - %label{ :for => 'launch_failures' } Launch failures - %li - %input{ :type => 'checkbox', :checked => 'checked', :name => 'requests', :id => 'requests' } - %label{ :for => 'requests' } Requests - %li - %input{ :type => 'checkbox', :checked => 'checked', :name => 'retries', :id => 'retries' } - %label{ :for => 'retries' } Retries - - %div{ :class => 'grid_4' } - %h4.legend Set time scale: - %ul.block.twocolumn - %li - %input{ :type => 'radio', :checked => 'checked', :name => 'time1', :id => 'one' } - %label{ :for => 'one' } 30 minutes - %li - %input{ :type => 'radio', :checked => 'checked', :name => 'time1', :id => 'two' } - %label{ :for => 'two' } 2 hours - %li - %input{ :type => 'radio', :checked => 'checked', :name => 'time1', :id => 'three' } - %label{ :for => 'three' } 2 days - %li - %input{ :type => 'radio', :checked => 'checked', :name => 'time1', :id => 'four' } - %label{ :for => 'four' } 1 week - %li - %input{ :type => 'radio', :checked => 'checked', :name => 'time1', :id => 'five' } - %label{ :for => 'five' } 1 month - - %div{ :class => 'grid_8 omega' } - %h4.legend Graph key: - %ul.block.graphkey - %li.instances - Instances - %li.requests - Requests - %li.ttl - Time to Launch - %li.failures - Failures - %li.retries - Retries - - %h2.clear Statistics - %table{ :class => 'noborder' } - %thead - %tr - %th - %th{ :colspan => 2 } Last Hour - %th{ :colspan => 2 } Last 24 Hours - %th{ :colspan => 2 } Last Month - %th{ :colspan => 2 } Calendar YTD - %tbody - %tr - =monitor_quota_value "Ratio New Accounts / Total Accounts:", '2.500', '' - =monitor_bar_value '1', :total => '23 of 2,200' - =monitor_bar_value '32', :total => '1,038 of 2,200', :min => 13, :max => 83 - =monitor_bar_value '32', :total => '1,038 of 2,200', :min => 13, :max => 83 - %tr - =monitor_quota_value "Ratio Archive Accounts / Total Accounts:", '1.200', '' - =monitor_bar_value '1', :total => '23 of 2,200' - =monitor_bar_value '32', :total => '1,038 of 2,200', :min => 13, :max => 83 - =monitor_bar_value '32', :total => '1,038 of 2,200', :min => 13, :max => 83 - %tr - =monitor_quota_value "Ratio Used Quota / Theoretical Quota:", '512', '' - =monitor_bar_value '1', :total => '23 of 2,200' - =monitor_bar_value '32', :total => '1,038 of 2,200', :min => 13, :max => 83 - =monitor_bar_value '32', :total => '1,038 of 2,200', :min => 13, :max => 83 - - %h2 Quality of service provider - %section.wrap - = image_tag 'placeholder_rackspace_graph2.png', :class => "placeholder" - %div{ :class => 'grid_4 alpha' } - %h4.legend Show: - %ul.block.twocolumn - %li - %input{ :type => 'checkbox', :checked => 'checked', :name => 'instances2', :id => 'instances2' } - %label{ :for => 'instances2' } Instances - %li - %input{ :type => 'checkbox', :checked => 'checked', :name => 'time_to2', :id => 'time_to2' } - %label{ :for => 'time_to2' } Time to - %li - %input{ :type => 'checkbox', :checked => 'checked', :name => 'launch_failures2', :id => 'launch_failures2' } - %label{ :for => 'launch_failures2' } Launch failures - %li - %input{ :type => 'checkbox', :checked => 'checked', :name => 'requests2', :id => 'requests2' } - %label{ :for => 'requests2' } Requests - %li - %input{ :type => 'checkbox', :checked => 'checked', :name => 'retries2', :id => 'retries2' } - %label{ :for => 'retries2' } Retries - - %div{ :class => 'grid_4' } - %h4.legend Set time scale: - %ul.block.twocolumn - %li - %input{ :type => 'radio', :checked => 'checked', :name => 'time2', :id => 'one2' } - %label{ :for => 'one2' } 30 minutes - %li - %input{ :type => 'radio', :checked => 'checked', :name => 'time2', :id => 'two2' } - %label{ :for => 'two2' } 2 hours - %li - %input{ :type => 'radio', :checked => 'checked', :name => 'time2', :id => 'three2' } - %label{ :for => 'three2' } 2 days - %li - %input{ :type => 'radio', :checked => 'checked', :name => 'time2', :id => 'four2' } - %label{ :for => 'four2' } 1 week - %li - %input{ :type => 'radio', :checked => 'checked', :name => 'time2', :id => 'five2' } - %label{ :for => 'five2' } 1 month - - %div{ :class => 'grid_8 omega' } - %h4.legend Graph key: - %ul.block.graphkey - %li.instances - Instances - %li.requests - Requests - %li.ttl - Time to Launch - %li.failures - Failures - %li.retries - Retries diff --git a/src/app/views/dashboard/quota_usage.haml b/src/app/views/dashboard/quota_usage.haml deleted file mode 100644 index 89e3e36..0000000 --- a/src/app/views/dashboard/quota_usage.haml +++ /dev/null @@ -1,2 +0,0 @@ -%h1 Quota Usage -%p located in app/views/dashboard/quota_usage.haml diff --git a/src/app/views/dashboard/service_quality.haml b/src/app/views/dashboard/service_quality.haml deleted file mode 100644 index 988bbcb..0000000 --- a/src/app/views/dashboard/service_quality.haml +++ /dev/null @@ -1,2 +0,0 @@ -%h1 Service Quality -%p located in app/views/dashboard/service_quality.haml diff --git a/src/app/views/dashboard/summary.haml b/src/app/views/dashboard/summary.haml deleted file mode 100644 index cc8d8e9..0000000 --- a/src/app/views/dashboard/summary.haml +++ /dev/null @@ -1,121 +0,0 @@ -- unless @hide_getting_started - #getting_started_dashboard_section - %p - Welcome to your Deltacloud dashboard where you can track your cloud resource - usage. Here's what you need to know to get started - %ul - %li - %img{:src => "images/getting_started_pools.png"} - Deltacloud organizes your cloud machines in collections called pools - %li - %img{:src => "images/getting_started_accounts.png"} - A pool can be connected to multiple <b>cloud provider accounts</b> - %li - %img{:src => "images/getting_started_pool_permissions.png"} - You have one personal pool and you may have access to more shared pools - %li - %img{:src => "images/getting_started_check.png"} - %p - Ready to work in the cloud?</p> - #getting_started_links - %a{:class => "button_link", :href => url_for(:controller => :pool, :action => :show, :id => @current_users_pool.id)} - Go to my personal pool - %a{:href => url_for(:controller => :user, :action => :pools, :id => @current_user.id)} - Show all my pools - %p - %input{ :id => "hide_getting_started", :type => "checkbox" } - Thanks, don't show this again - -.dashboard_column - #actions_dashboard_section - %h2 - Actions - - if check_privilege(Privilege::CREATE, Provider) - %a{:href => url_for(:controller => "providers", :action => "new")} - Add a Provider - - if check_privilege(Privilege::CREATE, User) - %a{:href => url_for(:controller => "users", :action => "new")} - Create a User - %a{:href => url_for(:controller => "instances", :action => "index")} - View Instances - %a{:href => url_for(:controller => "", :action => "")} - Launch Instances - %a{:href => url_for(:controller => "", :action => "")} - Enter a help ticket - - if check_privilege(Privilege::CREATE, Template) - %a{:href => url_for(:controller => "templates", :action => "new")} - Create a Template - - #service_quality_dashboard_section - - if check_privilege(Privilege::MODIFY) - %h2 - Provider Service Quality - .dashboard_section_summary - %img{ :src => "images/dashboard_summary_next.png", :alt => "next" } - %img{ :src => "images/dashboard_summary_prev.png", :alt => "prev" } - %p - Average time to submit tasks to provider, 24 hours - %div{ :style => "clear:both"} - - @providers.each do |provider| - .provider_service_quality_graph - -end_time = Time.now - -start_time = end_time - (24 * 60 * 60) - -interval_length = 3600 - -task_action = "create" - = "<object data='" + url_for(:action => :provider_qos_avg_time_to_submit_graph, :id => provider.id, :start_time => start_time, :end_time => end_time, :interval_length => interval_length, :task_action => task_action, :width => 100, :height => 50) + "' type='image/svg+xml' />" - .provider_service_quality_graph_summary - = provider.name - <!-- FIXME 'good/poor/average service... --> - <div style="clear: both;" /> - - else - %h2 - Service Quality - - #key_indicators_dashboard_section - %h2 - Key indicators - %ul - %li - Providers - .count= @providers.size - %li - Accounts - .count= @cloud_accounts.size - %li - Pools - .count= @pools.size - %li - Running instances - .count= @stats[:running_instances] - %li - Stopped instances - .count= @stats[:stopped_instances] - %li - Total instances - .count= @stats[:total_instances] - #provider_instances_graph - %object{ :data => url_for(:action => :provider_instances_graph, :width => 220, :height => 290), :type => 'image/svg+xml'} - -.dashboard_column - #quota_usage_dashboard_section - %h2 - Quota Usage - .dashboard_section_summary - Instance utilization by account - .account_quota_usage_graph_key - %img{:src => "images/quota_usage_key_running_instances.png", :width => 10, :heigth => 10} - Running - %img{:src => "images/quota_usage_key_instances_limit.png", :width => 10, :heigth => 10} - Limit - - @cloud_accounts.each do |account| - .account_quota_usage_graph_summary - = account.provider.name + ": " + account.name - .account_quota_usage_current_graph - %object{ :data => url_for(:action => :quota_usage_graph, :cloud_account_id => account.id, :resource_name => Quota::RESOURCE_RUNNING_INSTANCES, :width => 100, :height => 50), :type => 'image/svg+xml'} - <div style="clear: both;" /> - -:javascript - $("#hide_getting_started").click(function(){ - $('#getting_started_dashboard_section').hide(); - $.post("#{url_for(:action => 'hide_getting_started')}"); - }); diff --git a/src/app/views/hardware_profiles/_list.haml b/src/app/views/hardware_profiles/_list.haml deleted file mode 100644 index 9dca88e..0000000 --- a/src/app/views/hardware_profiles/_list.haml +++ /dev/null @@ -1,20 +0,0 @@ -- if @hardware_profiles.size == 0 - %h1 There are no hardware profiles to display -- else - %table - %thead - %tr - %th{:scope => "col"} Name - %th{:scope => "col"} Memory - %th{:scope => "col"} Storage - %th{:scope => "col"} CPU - %th{:scope => "col"} Architecture - %tbody - - @hardware_profiles.each {|hp| - %tr - %td= hp.name - %td= hp.memory.value if hp.memory - %td= hp.storage.value if hp.storage - %td= hp.cpu.value if hp.cpu - %td= hp.architecture.value if hp.architecture - - } diff --git a/src/app/views/hardware_profiles/index.haml b/src/app/views/hardware_profiles/index.haml deleted file mode 100644 index 9dabd7e..0000000 --- a/src/app/views/hardware_profiles/index.haml +++ /dev/null @@ -1 +0,0 @@ -= render :partial => 'list' diff --git a/src/app/views/images/_images.haml b/src/app/views/images/_images.haml deleted file mode 100644 index d37f1d3..0000000 --- a/src/app/views/images/_images.haml +++ /dev/null @@ -1,18 +0,0 @@ -- columns = [ | - {:id => 'id', :header => ''}, | - {:id => 'name', :header => 'Name', :sortable => true}, | -] | - -- opts = { :order => @order, - :order_dir => @order_dir, - :title => 'list of templates', - :check_all => 'id', - :header => defined?(header) ? header : nil, - :footer => defined?(footer) ? footer : nil, - :single_select => @single_select || false } - -= paginated_table('images_table', columns, @images, opts) do |rec| - %tr{:class => "#{cycle('even', 'odd')}"} - %td= check_box_tag 'ids[]', rec.id - %td{:class => 'image_name'}= rec.image.name - /%td= rec.instances.count diff --git a/src/app/views/images/show.haml b/src/app/views/images/show.haml deleted file mode 100644 index eeb823e..0000000 --- a/src/app/views/images/show.haml +++ /dev/null @@ -1,20 +0,0 @@ -- content_for :scripts do - :javascript - $(document).ready(function() { - // bind listener, which enables "create instance" button if - // only 1 row is selected - $("#images_table").click(function() { - var checked_count = $('input[name="ids[]"]:checked', $("#images_table")).length; - $('input[name="create_instance"]').attr('disabled', checked_count != 1); - }); - - // uncheck all on load and disable create button - $('input[name="ids[]"]:checked', $("#images_table")).attr('checked', false); - $('input[name="create_instance"]').attr('disabled', true); - }); - -- buttons = capture_haml do - .action_buttons - = submit_tag "Create instance", :name => "create_instance" - -= render :partial => 'images', :locals => {:footer => buttons} diff --git a/src/app/views/instances/_instances.haml b/src/app/views/instances/_instances.haml deleted file mode 100644 index 5dbca9f..0000000 --- a/src/app/views/instances/_instances.haml +++ /dev/null @@ -1,24 +0,0 @@ -- columns = [ | - {:id => 'id', :header => ''}, | - {:header => 'Actions'}, | - {:id => 'name', :header => 'Name', :sortable => true}, | - {:header => 'Details'}, | - {:id => 'template', :header => 'Template'}, | - {:id => 'state', :sortable => true, :header => 'State'}, | - {:id => 'time_last_running', :header => 'Time last running'}, | -] | - -- opts = { :order => @order, - :order_dir => @order_dir, - :title => "Instances for #{@pool.name}", - :check_all => 'id' } - -= paginated_table('instances_table', columns, @instances, opts) do |rec| - %tr{:class => "#{cycle('even', 'odd')}"} - %td= check_box_tag 'ids[]', rec.id - %td= rec.get_action_list.map {|action| link_to action, :controller => "instances", :action => "instance_action", :id => rec, :instance_action => action}.join(" | ") - %td= rec.name - %td Details - %td= rec.template.name - %td= rec.state - %td= rec.time_last_running diff --git a/src/app/views/instances/configure.haml b/src/app/views/instances/configure.haml deleted file mode 100644 index 809c044..0000000 --- a/src/app/views/instances/configure.haml +++ /dev/null @@ -1,23 +0,0 @@ -%h2 Launch instance -- form_for @instance, :url => {:action => 'create'} do - = hidden_field :instance, :template_id - = hidden_field :instance, :pool_id - %ul - %li - = label :instance, :name - = text_field :instance, :name - %li - = label :instance, :template - = text_field_tag :template_name, @instance.template ? @instance.template.name : '', :disabled => true - %li - = label :instance, :pool - = text_field_tag :pool_name, @instance.pool ? @instance.pool.name : '', :disabled => true - %li - = label :instance, :hardware_profile - = select :instance, :hardware_profile_id, @hardware_profiles.map {|p| [ p.name, p.id ]}, { :include_blank => false } - %li - = label :instance, :realm - = select :instance, :realm_id, @instance.pool.realms.map {|r| [ r.name, r.id ]}, { :include_blank => true } - - = submit_tag 'Cancel', :name => 'cancel' - = submit_tag 'Launch', :name => 'launch' diff --git a/src/app/views/instances/create.haml b/src/app/views/instances/create.haml deleted file mode 100644 index 6fd9474..0000000 --- a/src/app/views/instances/create.haml +++ /dev/null @@ -1,2 +0,0 @@ -%h1 Instance#create -%p Find me in app/views/instance/create.html.erb diff --git a/src/app/views/instances/delete.haml b/src/app/views/instances/delete.haml deleted file mode 100644 index 63de29b..0000000 --- a/src/app/views/instances/delete.haml +++ /dev/null @@ -1,2 +0,0 @@ -%h1 Instance#delete -%p Find me in app/views/instance/delete.html.erb diff --git a/src/app/views/instances/index.haml b/src/app/views/instances/index.haml deleted file mode 100644 index e33041e..0000000 --- a/src/app/views/instances/index.haml +++ /dev/null @@ -1,127 +0,0 @@ -- columns = [ | - {:name => '', :sortable => false}, | - {:name => 'STATUS', :sortable => false}, | - {:name => 'VM NAME', :sort_attr => 'name'}, | - {:name => 'TYPE', :sort_attr => 'hardware_profiles.name'}, | - {:name => 'TEMPLATE', :sort_attr => 'templates.name'}, | - {:name => 'PUBLIC ADDRESS', :sort_attr => 'public_addresses'}, | - {:name => 'PROVIDER', :sortable => false}, | - {:name => 'CREATED BY', :sort_attr => 'users.last_name'}, | -] | - -- pool_columns = [ | - { :name => "Pool name", :sort_attr => :name }, | - { :name => "Alerts", :sortable => false }, | - { :name => "Capacity", :sortable => false }, | - { :name => "Pool Family", :sort_attr => "pool_families.name" } | -] | - - -- form_tag(:action => 'instance_action') do - .actionsidebar.grid_3 - %dl - %dt Actions - %dd - %h5 Control Instances - %ul - %li.start.disabled - %span - = submit_tag "Start", :name => "start", :class => "icon", :disabled => true - %li.stop.disabled - %span - = submit_tag "Stop", :name => "stop", :class => "icon", :disabled => true - %li.restart.disabled - %span - = submit_tag "Restart", :name => "restart", :class => "icon", :disabled => true - %li.shutdown - %span - = submit_tag "Shutdown", :name => "shutdown", :class => "icon" - %li.console.disabled - %span - = submit_tag "Console Access", :name => "console_access", :class => "icon", :disabled => true - %li.VD.disabled - %span - = submit_tag "Virtual Desktop", :name => "vd", :class => "icon", :disabled => true - %li.delete - %span - = submit_tag "Remove Failed", :name => "remove_failed", :class => "icon" - %dd - %h5 Manage Instances - %ul - %li.snapshot.disabled - %span - = submit_tag "Create Snapshot", :name => "snapshot", :class => "icon", :disabled => true - %li.grantaccess.disabled - %span - = submit_tag "Grant Access", :name => "grantaccess", :class => "icon", :disabled => true - %li.info - %span - = submit_tag "Instance Details", :name => "instance_details", :class => "icon" - %li.request_help.disabled - %span - = submit_tag "Request Help", :name => "request_help", :class => "icon", :disabled => true - - .grid_5 - %h2 My Quota - %table - %thead - %tr - %th % Quota Used - %th - Quota - %span.small (Instances) - %tbody - %tr - - quota = current_user.quota.maximum_running_instances - %td - - if quota.respond_to? '>' and quota > 0 - = "%.2f" % ((current_user.quota.running_instances / quota.to_f) * 100) - - else - = 0 - %td - = quota or "unlimited" - .grid_8 - %h2 Pool Status - %table - =sortable_table_header pool_columns - - @pools.each do |pool| - %tr - %td - = pool.name - %td N/A - %td.capacity - %span.good - %td - =pool.pool_family.name - .grid_13 - %h2 Instances by Pool - - @pools.each do |pool| - .grid_6.alpha.poolname - %h4= pool.name - = link_to image_tag("blnk.png", :border=>0) + "Launch Instance", {:controller => "instances", :action => "new", 'instance[pool_id]' => pool.id}, :class => "button iconbutton fr" - - .grid_4.poolfilter - %input{:type => "radio", :id => "all_" + pool.id.to_s, :name => "filter_" + pool.id.to_s} - %label{:for => "all_" + pool.id.to_s} Show All - %input{:type => "radio", :id => "summary_" + pool.id.to_s, :name => "filter_" + pool.id.to_s} - %label{:for => "summary_" + pool.id.to_s} Summary View - .search.grid_3.omega - %input{:type => "search", :placeholder => "Search Instance"} - %button.action Search - %table.gap - = sortable_table_header(columns) - %tbody - - if not instances = @sorted_instances_by_pool[pool.id] or instances.empty? - %tr - %td{:colspan => 8} No Instances - - else - - instances.each do |inst| - %tr - %td= radio_button_tag 'id[]', inst.id - %td= inst.state - %td= inst.name - %td= inst.hardware_profile.name - %td= inst.template.name - %td= inst.public_addresses - %td= inst.cloud_account ? inst.cloud_account.provider.name : '' - %td= owner_name(inst) diff --git a/src/app/views/instances/new.haml b/src/app/views/instances/new.haml deleted file mode 100644 index 8038a2b..0000000 --- a/src/app/views/instances/new.haml +++ /dev/null @@ -1,19 +0,0 @@ -%h3 Show Templates -%hr -%ul - - @templates.each do |tpl| - %li - - form_tag(:action => 'configure') do - = hidden_field :instance, :template_id, :value => tpl.id - = hidden_field :instance, :pool_id, :value => @instance.pool.id - = image_tag "platform_#{tpl.platform}.png", :size => "32x32", :alt => tpl.platform - %h3= tpl.name - %p= tpl.summary - %p - %label Group: - System - %label Version: - 2.5 - = submit_tag 'Launch', :name => 'launch' -= will_paginate(@templates) -= page_entries_info(@templates) diff --git a/src/app/views/instances/show.haml b/src/app/views/instances/show.haml deleted file mode 100644 index 33b2897..0000000 --- a/src/app/views/instances/show.haml +++ /dev/null @@ -1,61 +0,0 @@ -%h2 Instance Details -- form_tag(:action => 'index') do - %ul - %li - = label_tag :name, 'Name' - %span= @instance.name - %li - = label_tag :status, 'Status' - %span= @instance.state - %li - = label_tag :public_addresses, 'Public Addresses' - %span= @instance.public_addresses - %li - = label_tag :private_addresses, 'Private Addresses' - %span= @instance.private_addresses - %li - = label_tag :operating_system, 'Operating system' - %span= "#{@instance.template.xml.platform} #{@instance.template.xml.platform_version}" - %li - = label_tag :provider, 'Provider' - %span= @instance.cloud_account.provider.name if @instance.cloud_account - %li - = label_tag :base_template, 'Base Template' - %span= @instance.template.name - %li - = label_tag :architecture, 'Architecture' - %span= @instance.hardware_profile.architecture.value - %li - = label_tag :memory, 'Memory' - %span= @instance.hardware_profile.memory.value - %li - = label_tag :storage, 'Storage' - %span= @instance.hardware_profile.storage.value - %li - = label_tag :instantiation_time, 'Instantiation Time' - %span= @instance.created_at.strftime("%d-%b-%Y %H:%M:%S") - %li - = label_tag :uptime, 'Uptime' - %span= @instance.total_state_time(@instance.state) - %li - = label_tag :current_alerts, 'Current Alerts' - %span= 0 - %li - = label_tag :console_connection, 'Console Connection' - %span= 'via SSH' - - unless @instance.instance_key_id.nil? - %li - = label_tag :instance_key, 'SSH key' - %span= link_to("Download", { :controller => "instances", :action => "key", :id => @instance }) - %li - = label_tag :owner, 'Owner' - %span= "#{@instance.owner.first_name} #{@instance.owner.last_name}" - %li - = label_tag :shared_to, 'Shared to' - %span= "N/A" - - if @instance.state == Instance::STATE_ERROR - %li - = label_tag :error, 'Error' - %span= @instance.last_error - - = submit_tag 'Back', :name => 'back' diff --git a/src/app/views/pools/delete.haml b/src/app/views/pools/delete.haml deleted file mode 100644 index 6727d77..0000000 --- a/src/app/views/pools/delete.haml +++ /dev/null @@ -1,2 +0,0 @@ -%h1 ProviderController#delete -%p Find me in app/views/provider_controller/delete.html.erb diff --git a/src/app/views/pools/edit.haml b/src/app/views/pools/edit.haml deleted file mode 100644 index 755ecd9..0000000 --- a/src/app/views/pools/edit.haml +++ /dev/null @@ -1 +0,0 @@ -%h1 Edit Pool '#{@pool.name}' diff --git a/src/app/views/pools/hardware_profiles.haml b/src/app/views/pools/hardware_profiles.haml deleted file mode 100644 index 96fe378..0000000 --- a/src/app/views/pools/hardware_profiles.haml +++ /dev/null @@ -1 +0,0 @@ -= render :partial => 'hardware_profiles/list' diff --git a/src/app/views/pools/index.haml b/src/app/views/pools/index.haml deleted file mode 100644 index a6455d5..0000000 --- a/src/app/views/pools/index.haml +++ /dev/null @@ -1,44 +0,0 @@ -= form_tag :action => 'manage_pool' -#pools_nav.grid_3.actionsidebar - %dl - %dt - Pools - / NOTE the 'edit' and 'delete' buttons are temporarily disabled. - / They are replaced by generic <button> tags with no functionality. - / Once we suport editing and deleting pools, we should switch it back. - %dd.edit - %span - /= submit_tag "edit", :class => "submit linkbutton" - %button.submit.linkbutton{ :disabled => 'disabled'} edit - %dd.delete - %span - /= submit_tag "delete", :class => "submit linkbutton" - %button.submit.linkbutton{ :disabled => 'disabled'} delete - %dd.add - %span - /=link_to 'new pool', :action => :new, :class => "button" - %button.submit.linkbutton{ :disabled => 'disabled'} new pool - -#details{:class => 'grid_13'} - %table - =sortable_table_header @header - - @pools.each do |pool| - %tr - %td - - is_first_pool = (pool == @pools.first) - %input{:checked => is_first_pool, :name => "pool_checkbox", :type => "radio", :value => pool.id, :id => "pool_checkbox_#{pool.id}" } - = pool.name - %td - =((pool.quota.maximum_running_instances || 0)/100)*pool.quota.total_instances - ='%' - %td - =pool.quota.total_instances - %td - =pool.pool_family.name - -:javascript - $(document).ready(function () { - /* NOTE: once we support bulk actions on multiple pools selected at once, - uncomment this line: - $("input[type='checkbox']").buttonSensitivity().change(); */ - }); diff --git a/src/app/views/pools/list.haml b/src/app/views/pools/list.haml deleted file mode 100644 index 675891d..0000000 --- a/src/app/views/pools/list.haml +++ /dev/null @@ -1,3 +0,0 @@ -= render :partial => "instance/instances" - -= link_to "Add a new instance", {:controller => "instances", :action => "new", "instance[pool_id]" => @pool}, :class=>"actionlink" diff --git a/src/app/views/pools/new.haml b/src/app/views/pools/new.haml deleted file mode 100644 index 037c7c4..0000000 --- a/src/app/views/pools/new.haml +++ /dev/null @@ -1,12 +0,0 @@ -.grid_16 - = error_messages_for 'account' - %h1 Create a new Pool - - form_for @pool, :action => 'create' do |form| - %h2 Pool - %fieldset - %label.grid_2.alpha Name: - = form.text_field :name, :class => "grid_5" - = form.error_message_on :name, 'Name ' - .clear.grid_14.prefix_2.alpha Provide a descriptive name for this pool. - - = submit_tag "Save", :class => "submit formbutton" diff --git a/src/app/views/pools/realms.haml b/src/app/views/pools/realms.haml deleted file mode 100644 index 31f7886..0000000 --- a/src/app/views/pools/realms.haml +++ /dev/null @@ -1 +0,0 @@ -= render :partial => 'realms/list' diff --git a/src/app/views/pools/show.haml b/src/app/views/pools/show.haml deleted file mode 100644 index ab914ad..0000000 --- a/src/app/views/pools/show.haml +++ /dev/null @@ -1,12 +0,0 @@ -:javascript - $(document).ready(function() { - $("#pool-tabs").tabs(); - }); -#pool-tabs - %ul - %li= link_to "Instances", {:action => "list", :id => @pool.id, :ajax => true} - - if check_privilege(Privilege::PERM_VIEW) - %li= link_to "User access", {:controller => "permissions", :action => "list", :pool_id => @pool.id, :ajax => true} - %li= link_to "Hardware Profiles", {:action => "hardware_profiles", :id => @pool.id, :ajax => true} - %li= link_to "Realms", {:action => "realms", :id => @pool.id, :ajax => true} - %li= link_to "Quota", {:controller => "quotas", :action => "show", :id => @pool, :parent_type => "pool", :ajax => true} diff --git a/src/app/views/providers/_form.haml b/src/app/views/providers/_form.haml deleted file mode 100644 index dca4cd3..0000000 --- a/src/app/views/providers/_form.haml +++ /dev/null @@ -1,25 +0,0 @@ -%fieldset - %label.grid_4.alpha.big{ :for => "provider_name" } - = t('.provider_name') - %span.required - * - %label.grid_5.big{ :for => "provider_url" } - = t('.provider_url') - %span.required - * - %div.grid_4.omega - = f.error_message_on :url, 'URL ' - = f.error_message_on :name, 'Name ' - = f.text_field :name, :title => t('.provider_name'), :value => @provider.name, :class => "clear grid_4 alpha" - = f.text_field :url, :title => t('.provider_url'), :class => 'emailinput', :value => @provider.url, :class => "grid_5" - .clear.prefix_4.grid_5.alpha.omega - %span - ( - %button.linkbutton.nospace{ :type => 'submit', :value => t('.test_connection'), :name => 'test_connection', :id => 'test_connection' } - = t('.test_connection') - ) -%p.requirement - %span.required - * - - - = t('.required_field') diff --git a/src/app/views/providers/_providers.haml b/src/app/views/providers/_providers.haml deleted file mode 100644 index 6c46532..0000000 --- a/src/app/views/providers/_providers.haml +++ /dev/null @@ -1,28 +0,0 @@ -#providers_nav.grid_3.actionsidebar - %dl - %dt - = t('providers.providers') - - @providers.each do |provider| - %dd - - selected = 'selected' if @provider and (provider.id == @provider.id) - %a{ :href => url_for(:controller => 'providers', :action => 'show', :id => provider), :class => selected } - = provider.name - = edit_button(@provider, controller.action_name) - - form_tag({:controller => 'providers', :action => 'new'}, {:method => :get , :class => 'buttononly'}) do - %input{ :type => 'submit', :value => t(:add), :disabled => ('disabled' unless controller.action_name == 'index') } - - form_tag({:controller => 'providers', :action => 'destroy', :id => @provider}, {:method => :delete , :class => 'buttononly'}) do - = submit_tag 'delete', :disabled => ('disabled' unless @provider and controller.action_name == 'show') - -:javascript - $(document).ready( function () { - $("a#edit_button").click(function (event) { - event.preventDefault() - if (!$(this).attr("disabled")) { - $.get(($(this).attr("href")), function (response) { - var form = $(response).find('#edit_dcloud_form') - $("#show_dcloud").replaceWith(form) - $('a.button').attr('disabled', true) - }); - } - }) - }) diff --git a/src/app/views/providers/accounts.haml b/src/app/views/providers/accounts.haml deleted file mode 100644 index 984f257..0000000 --- a/src/app/views/providers/accounts.haml +++ /dev/null @@ -1,125 +0,0 @@ -:javascript - function set_unlimited_quota(elem_id) { - $("#" + elem_id)[0].value = "unlimited"; - } -= render :partial => 'providers/providers' -#details.grid_13 - %nav.subsubnav - = render_navigation({:context => 'old', :level => 4}) - - %h1 - = t('.provider_accounts') - - form_tag ({:controller => 'cloud_accounts', :action => 'update_accounts'}), :multipart => true do - = hidden_field :provider, :id, :value => @provider.id - - @provider.cloud_accounts.each do |acct| - %fieldset.clearfix.nomargin - %label.grid_4.la.alpha - = t('.account_name') - %span.required * - %label.grid_3.la - = t('.user_name') - %span.required * - %label.grid_3.la - = t('.password') - %span.required * - %label.grid_3.la.omega - = t('.quota_instances') - %span.required * - %fieldset.nomargin.clearfix - - disabled = 'disabled' unless check_privilege(Privilege::MODIFY, Account, @provider) - - cloud_account_id = "cloud_accounts[#{acct.id}]" - = text_field cloud_account_id, :label, :title => t('.account_name'), :value => acct.label, :disabled => disabled, :class => "grid_4 alpha" - = text_field cloud_account_id, :username, :title => t('.user_name'), :value => acct.username, :disabled => disabled, :class => "grid_3" - = password_field cloud_account_id, :password, :title => t('.password'), :disabled => disabled, :class => "grid_3" - = error_message_on :maximum_running_instances, 'Maximum Running Instances ' - = text_field "quota[#{acct.id}]", :maximum_running_instances, :title => t('.quota_instances'), :value => (acct.quota.maximum_running_instances.nil? ? "unlimited" : acct.quota.maximum_running_instances), :disabled => disabled, :id => "quota_instances#{acct.id}", :class => "grid_3 omega" - %fieldset.nomargin.clearfix - .grid_3.prefix_10.alpha.omega - ( - %button.linkbutton.nospace{ :type => 'button', :onclick => "set_unlimited_quota("quota_instances#{acct.id}");" }<> - = t('.unlimited_quota') - ) - %fieldset.clearfix.nomargin - %label.grid_4.la.alpha - = t('.account_number') - %span.required * - %label.grid_3.la - = t('.account_private_cert') - %span.required * - %label.grid_3.la - = t('.account_public_cert') - %span.required * - .grid_3.omega - %fieldset.clearfix - = text_field cloud_account_id, :account_number, :title => t('.account_number'), :value => acct.account_number, :disabled => disabled, :class => "grid_4 alpha" - .grid_3 - = file_field cloud_account_id, :x509_cert_priv_file, :title => t('.account_private_cert'), :disabled => disabled - .grid_3 - = file_field cloud_account_id, :x509_cert_pub_file, :title => t('.account_public_cert'), :disabled => disabled - - remove_path = url_for :controller => 'cloud_accounts', :action => 'destroy', :id => acct.id if check_privilege(Privilege::MODIFY, Account, @provider) && acct.destroyable? - .grid_3.omega - %a.button{ :href => remove_path, :name => "remove_acc_#{acct.id}", :class => "tiny #{'disabled' unless remove_path}" } - = t(:remove) - %fieldset.clearfix.gap - = link_to t(:reset), {:controller => 'provider', :action => 'accounts', :id => @provider.id}, :class => "button dialogbutton" unless @provider.cloud_accounts.empty? - = submit_tag t(:save), :name => 'update_cloud_accounts', :class => "dialogbutton" unless @provider.cloud_accounts.empty? - - %h2 - = t('.new_provider_account') - - form_tag({:controller => 'cloud_accounts', :action => 'create'}, :multipart => true) do - = hidden_field :cloud_account, :provider_id, :value => @provider.id - %fieldset.clearfix.nomargin - %label.grid_4.la.alpha - = t('.account_name') - %span.required * - %label.grid_3.la - = t('.user_name') - %span.required * - %label.grid_3.la - = t('.password') - %span.required * - %label.grid_3.la.omega - = t('.quota_instances') - %span.required * - %fieldset.nomargin.clearfix - = text_field :cloud_account, :label, :title => t('.account_name'), :class => "grid_4 alpha" - = text_field :cloud_account, :username, :title => t('.user_name'), :class => "grid_3" - = password_field :cloud_account, :password, :title => t('.password'), :class => "grid_3" - = text_field "quota", :maximum_running_instances, :title => t('.quota_instances'), :value => "unlimited",:id => "quota_instances", :class => "grid_3 omega" - %fieldset.nomargin.clearfix - .grid_3.prefix_10.alpha.omega - ( - %button.linkbutton.nospace{ :type => 'button', :onclick => "set_unlimited_quota("quota_instances");" }<> - = t('.unlimited_quota') - ) - %fieldset.clearfix.nomargin - %label.grid_4.la.alpha - = t('.account_number') - %span.required * - %label.grid_3.la - = t('.account_private_cert') - %span.required * - %label.grid_3.la - = t('.account_public_cert') - %span.required * - .grid_3.omega - %fieldset.clearfix.nomargin - = text_field :cloud_account, :account_number, :title => t('.account_number'), :class => "grid_4 alpha" - .grid_3 - = file_field :cloud_account, :x509_cert_priv_file, :title => t('.account_private_cert') - .grid_3 - = file_field :cloud_account, :x509_cert_pub_file, :title => t('.account_public_cert') - - remove_path = url_for :controller => 'cloud_accounts', :action => 'destroy' - .grid_3.omega - ( - %button.linkbutton.nospace{ :type => 'submit', :value => t('.test_account'), :name => 'test_account', :id => 'test_account' }<> - = t('.test_account') - ) - %fieldset.clearfix - .grid_13.alpha.omega - = submit_tag t(:add), :class => "ra nomargin dialogbutton" - %section - %p.requirement - %span.required * - - - = t('.required_field') diff --git a/src/app/views/providers/delete.haml b/src/app/views/providers/delete.haml deleted file mode 100644 index 6727d77..0000000 --- a/src/app/views/providers/delete.haml +++ /dev/null @@ -1,2 +0,0 @@ -%h1 ProviderController#delete -%p Find me in app/views/provider_controller/delete.html.erb diff --git a/src/app/views/providers/edit.haml b/src/app/views/providers/edit.haml deleted file mode 100644 index 3440311..0000000 --- a/src/app/views/providers/edit.haml +++ /dev/null @@ -1,7 +0,0 @@ -= render :partial => 'providers' -#details.grid_13 - %nav.subsubnav - = render_navigation({:context => 'old', :level => 4}) - - form_for :provider, @provider, :url => provider_path(@provider), :html => { :id => 'edit_dcloud_form', :method => 'put', :class => "dcloud_form" } do |f| - = render :partial => 'form', :locals => { :f => f } - %input{ :type => 'submit', :value => t(:save), :name => 'save_provider', :id => 'save_provider' } diff --git a/src/app/views/providers/hardware_profiles.haml b/src/app/views/providers/hardware_profiles.haml deleted file mode 100644 index 96fe378..0000000 --- a/src/app/views/providers/hardware_profiles.haml +++ /dev/null @@ -1 +0,0 @@ -= render :partial => 'hardware_profiles/list' diff --git a/src/app/views/providers/index.haml b/src/app/views/providers/index.haml deleted file mode 100644 index 9823f42..0000000 --- a/src/app/views/providers/index.haml +++ /dev/null @@ -1 +0,0 @@ -= render :partial => 'providers' diff --git a/src/app/views/providers/list.haml b/src/app/views/providers/list.haml deleted file mode 100644 index 9517a21..0000000 --- a/src/app/views/providers/list.haml +++ /dev/null @@ -1 +0,0 @@ -= render :partial => 'providers/providers' diff --git a/src/app/views/providers/new.haml b/src/app/views/providers/new.haml deleted file mode 100644 index 2803b64..0000000 --- a/src/app/views/providers/new.haml +++ /dev/null @@ -1,7 +0,0 @@ -= render :partial => 'providers' -#details.grid_13 - %nav.subsubnav - = render_navigation({:context => 'old', :level => 4}) - - form_for :provider, @provider, :url => providers_path, :html => { :class => "dcloud_form" } do |f| - = render :partial => 'form', :locals => { :f => f } - %input{ :type => 'submit', :value => t(:add), :name => 'add_provider', :id => 'add_provider' } diff --git a/src/app/views/providers/realms.haml b/src/app/views/providers/realms.haml deleted file mode 100644 index 31f7886..0000000 --- a/src/app/views/providers/realms.haml +++ /dev/null @@ -1 +0,0 @@ -= render :partial => 'realms/list' diff --git a/src/app/views/providers/settings.haml b/src/app/views/providers/settings.haml deleted file mode 100644 index b4cdc43..0000000 --- a/src/app/views/providers/settings.haml +++ /dev/null @@ -1,3 +0,0 @@ -- form_tag({ :action => 'destroy' }, {:onsubmit => "return confirm('Really delete the provider?');"}) do - = hidden_field :provider, :id - = submit_tag "Delete Provider", :class => "submit_link" diff --git a/src/app/views/providers/show.haml b/src/app/views/providers/show.haml deleted file mode 100644 index ccc814a..0000000 --- a/src/app/views/providers/show.haml +++ /dev/null @@ -1,14 +0,0 @@ -= render :partial => 'providers' -#details.grid_13 - %nav.subsubnav - = render_navigation({:context => 'old', :level => 4}) - %br - %table#show_dcloud - %thead - %tr - %th{:scope => "col"} Provider Name - %th{:scope => "col"} Provider URL - %tbody - %tr - %td= @provider.name - %td= @provider.url diff --git a/src/app/views/realms/_list.haml b/src/app/views/realms/_list.haml deleted file mode 100644 index 9aa09dc..0000000 --- a/src/app/views/realms/_list.haml +++ /dev/null @@ -1,12 +0,0 @@ -- if @realm_names.size == 0 - %h1 There are no realms to display -- else - %table - %thead - %tr - %th{:scope => "col"} Name - %tbody - - @realm_names.each {|realm_name| - %tr - %td= realm_name - - } diff --git a/src/app/views/settings/general_settings.haml b/src/app/views/settings/general_settings.haml deleted file mode 100644 index 43eba52..0000000 --- a/src/app/views/settings/general_settings.haml +++ /dev/null @@ -1,41 +0,0 @@ -%form - .grid_16 - %h1 Portal - %fieldset.clearfix - %label.grid_5.alpha Brand Icon: - .grid_6 - %input{:type => "file", :disabled => true} - %fieldset.clearfix - %label.grid_5.alpha Tag Line: - %textarea.grid_6.disabled{:disabled => true} - %fieldset.clearfix - .grid_5.alpha.disabled.ra - %input{:type => "checkbox", :disabled => true} - %label Allow Self Service Account Creation: - .grid_6.disabled - %select{:disabled => true} - %option Select User Treatment - %fieldset.clearfix - %label.alpha.grid_5 Primary URL Port: - %input.grid_6{:value => "3000", :disabled => true} - %h1 Content - %fieldset.clearfix - %label.grid_5.alpha Entitlement Mode: - .grid_5 - %ul.block - %li - %input{:type => "radio", :name => "entitlement", :disabled => true} - %label.disabled User Brings Subscriptions - %li - %input{:type => "radio", :name => "entitlement", :disabled => true} - %label.disabled System Provides Subscriptions - %fieldset.clearfix - %label.grid_5.alpha Certitifcate: - .grid_6 - %input{:type => "file", :disabled => true} - %fieldset.clearfix - %label.alpha.grid_5 Content Manager URL: - %input.grid_6{:disabled => true} - %fieldset.clearfix - %button.formbutton{:disabled => true} Reset - %button.formbutton{:disabled => true} Save diff --git a/src/app/views/settings/index.haml b/src/app/views/settings/index.haml deleted file mode 100644 index 5963ec4..0000000 --- a/src/app/views/settings/index.haml +++ /dev/null @@ -1,64 +0,0 @@ -%ul.tiles - %li#providers.grid_8 - = image_tag "blnk.png", :class => "icon", :alt => "" - %h2 - = t('.manage_providers') - %p - = t('.manage_providers_desc') - = link_to t(:continue), {:controller => 'providers'}, :class => 'button' - %li#users.grid_8 - = image_tag "blnk.png", :class => "icon", :alt => "" - %h2 - = t('.manage_users') - %p - = t('.manage_users_desc') - = link_to t(:continue), {:controller => 'users'}, :class => 'button' - %li#services.grid_8.disabled.clear - = image_tag "blnk.png", :class => "icon", :alt => "" - %h2 - = t('.define_services') - %p - = t('.define_services_desc') - %button{:disabled => "disabled"} - = t(:continue) - %li#permissions.grid_8 - = image_tag "blnk.png", :class => "icon", :alt => "" - %h2 - = t('.permissions') - %p - = t('.permissions_desc') - = link_to t(:continue), {:controller => 'settings', :action => 'self_service'}, :class => 'button' - %li#hardware.grid_8.disabled - = image_tag "blnk.png", :class => "icon", :alt => "" - %h2 - = t('.define_hardware_profiles') - %p - = t('.define_hardware_profiles_desc') - %button{:disabled => "disabled"} - = t(:continue) - %li#settings.grid_8 - = image_tag "blnk.png", :class => "icon", :alt => "" - %h2 - = t('.general_settings') - %p - = t('.general_settings_desc') - = link_to t(:continue), {:controller => 'settings', :action => 'general_settings'}, :class => 'button' - %li#locales.grid_8.disabled.clear - = image_tag "blnk.png", :class => "icon", :alt => "" - %h2 - = t('.define_locales') - %p - = t('.define_locales_desc') - %button{:disabled => "disabled"} - = t(:continue) - -:javascript - $(document).ready(function () { - var $tiles = $(".tiles li:not(.disabled)").addClass('pointercursor'); - $tiles.click(function (e) { - $e = $(e.target); - if (!$e.is('.button')) { - window.location = $('.button',this).attr('href'); - } - }); - }); diff --git a/src/app/views/settings/self_service.haml b/src/app/views/settings/self_service.haml deleted file mode 100644 index 8fd9950..0000000 --- a/src/app/views/settings/self_service.haml +++ /dev/null @@ -1,128 +0,0 @@ -.actionsidebar.grid_3 - %dl - %dd - %a.selected Self-Service User - %form - = submit_tag t(:edit), :disabled => 'disabled' - = submit_tag t(:new), :disabled => 'disabled' - -.grid_13 - = error_messages_for @parent_type - %h2 - = t('.self_service_default') - - form_for @self_service_default_quota, :url => { :action => 'update' } do |form| - %h3 Instances - %fieldset.clearfix - %label.grid_2.alpha Permissions: - .grid_4 My personal Instances - .grid_4 Full Instance Permission - .grid_3.omega - ( - %a{:href=>'#'}> Edit - ) - ( - %a{:href=>'#'}> Remove - ) - %fieldset.clearfix.gap - .grid_4.prefix_2.alpha - %select.disabled{:disabled => true} - %option - Category of Instances - .grid_4 - %ul.block - %li - %input{ :type => "radio", :name => "permission", :disabled => true} - %label.disabled Control Instance - Can't Share - %li - %input{ :type => "radio", :name => "permission", :disabled => true} - %label.disabled Control Instance - Can Share - %li - %input{ :type => "radio", :name => "permission", :disabled => true} - %label.disabled Full Instance Permission - %li - %input{ :type => "radio", :name => "permission", :disabled => true} - %label.disabled Custom ... - .grid_3.omega - ( - %a{:href=>'#'}> Add - ) - = hidden_field :self_service_default_quota, :id - %fieldset.clearfix.gap - %label.grid_2.alpha - = t('.quota') + ":" - = text_field :self_service_default_quota, :maximum_running_instances, :class => 'grid_5' - .grid_2.la (instances) - = form.error_message_on :maximum_running_instances, 'Maximum Running Instances ' - %h3 POOLS - %fieldset.clearfix - %label.grid_2.alpha Permissions: - .grid_4 General Usage - .grid_4 Regular Pool User - .grid_3.omega - ( - %a{:href=>'#'}> Edit - ) - ( - %a{:href=>'#'}> Remove - ) - %fieldset.clearfix.gap - .grid_4.prefix_2.alpha - %select.disabled{:disabled => true} - %option - Category of Pools - .grid_4 - %ul.block - %li - %input{ :type => "radio", :name => "pooltype", :disabled => true} - %label.disabled Limited Pool User - %li - %input{ :type => "radio", :name => "pooltype", :disabled => true} - %label.disabled Regular Pool User - %li - %input{ :type => "radio", :name => "pooltype", :disabled => true} - %label.disabled Advanced Pool User - %li - %input{ :type => "radio", :name => "pooltype", :disabled => true} - %label.disabled Custom ... - .grid_3.omega - ( - %a{:href=>'#'}> Add - ) - %h3 TEMPLATES - %fieldset.clearfix - %label.grid_2.alpha Permissions: - .grid_4 General Usage - .grid_4 Basic Template User - .grid_3.omega - ( - %a{:href=>'#'}> Edit - ) - ( - %a{:href=>'#'}> Remove - ) - %fieldset.clearfix.gap - .grid_4.prefix_2.alpha - %select.disabled{:disabled => true} - %option - Category of Templates - .grid_4 - %ul.block - %li - %input{ :type => "radio", :name => "pooltype", :disabled => true} - %label.disabled Basic Template User - %li - %input{ :type => "radio", :name => "pooltype", :disabled => true} - %label.disabled General Template User - %li - %input{ :type => "radio", :name => "pooltype", :disabled => true} - %label.disabled Advanced Template User - %li - %input{ :type => "radio", :name => "pooltype", :disabled => true} - %label.disabled Custom ... - .grid_3.omega - ( - %a{:href=>'#'}> Add - ) - .grid_13.omega.alpha.gap - %button.formbutton Reset - = submit_tag t(:save), :class => "submit formbutton" diff --git a/src/app/views/templates/_addbuttons.haml b/src/app/views/templates/_addbuttons.haml deleted file mode 100644 index 44cc12a..0000000 --- a/src/app/views/templates/_addbuttons.haml +++ /dev/null @@ -1,3 +0,0 @@ -%fieldset.clear - = submit_tag "Add Selected", :name => "add_selected", :class => "grid_2 alpha", :id => "do_add_software" - = submit_tag "Cancel", :name => "cancel_add_software", :class => "grid_2", :id => "cancel_add_software" diff --git a/src/app/views/templates/_basics.haml b/src/app/views/templates/_basics.haml deleted file mode 100644 index 72d2423..0000000 --- a/src/app/views/templates/_basics.haml +++ /dev/null @@ -1,27 +0,0 @@ -%h3 General Information -%fieldset.clearfix - %label.grid_4.alpha.la Template Name: - %label.grid_7.la Summary: - %label.grid_3.suffix_2.omega.la Version: - = text_field :tpl, :name, :value => @tpl.name || 'Template Name', :class => "grid_4 alpha" - = text_field :tpl, :summary, :value => @tpl.summary || 'Template Description', :class => "grid_7" - = text_field_tag 'current_version', 'Current Version', :disabled => true, :class => "grid_3" - %button{:type => 'button', :disabled => 'disabled', :class => "grid_2 omega"} New Version -%fieldset.clearfix - %label.grid_4.alpha Choose Logo: - %input{:type => 'file', :disabled => 'disabled', :class => "grid_7"} -%fieldset.clearfix - - default = @tpl.platforms['fedora'] - = label :tpl, :platform, 'Platform Choice:', :class => "grid_4 alpha" - = select :tpl, :platform, @tpl.platforms.map {|id, p| ["#{p['name']} #{p['version']} (#{p['architecture']})", id]}, {:selected => @tpl.platform || 'fedora'}, {:class => 'grid_7'} -%fieldset.clearfix - = label_tag :bootable, 'Bootable:', :class => "grid_4 alpha" - .grid_12.omega - = radio_button_tag :bootable, 'yes', true, :disabled => true - = label_tag :bootable, 'Yes' - = radio_button_tag :bootable, 'no', false, :disabled => true - = label_tag :bootable, 'No' -%fieldset.clearfix - %label{:for => :template_group, :class => 'grid_4 alpha'} - Template Group: - = select_tag(:template_group, options_for_select([['User Private', 1]]), :class => 'grid_4') diff --git a/src/app/views/templates/_collections.haml b/src/app/views/templates/_collections.haml deleted file mode 100644 index 98ce959..0000000 --- a/src/app/views/templates/_collections.haml +++ /dev/null @@ -1,8 +0,0 @@ -%ul.collections - - @collections.each do |c| - %li - /- selected = c[:selected] ? true : false - - selected = false - = check_box_tag 'groups[]', c[:id], selected, {:disabled => selected, :id => "group_#{c[:id]}", :class => "#{selected ? 'selected' : ''}"} - = label_tag "group_#{c[:id]}", c[:name] -= render :partial => 'addbuttons' diff --git a/src/app/views/templates/_form.haml b/src/app/views/templates/_form.haml deleted file mode 100644 index dff9811..0000000 --- a/src/app/views/templates/_form.haml +++ /dev/null @@ -1,122 +0,0 @@ -:javascript - $(document).ready(function() { - var $content_container = $('#managed_content'); - var $sel_pkg_container = $('#package_selection_list'); - var $submit = $('#add_software_button'); - $submit.click(function(e) { - e.preventDefault(); - $submit.hide(); - var data = { - 'packages[]': $("input[name='packages[]']").map(function() {return $(this).val()}).get(), - 'repository': $("select[name='tpl[platform]']").val() || '' - } - var url = '#{url_for :action => 'content_selection', :id => @id}'; - //$content_container.empty().show(); - $sel_pkg_container.empty().show().addClass('loading'); - $sel_pkg_container.load(url, data, function(){ - $sel_pkg_container.removeClass('loading'); - var $groups = $('.softwaregroups .disclosure', this); - //search - $("input[name='package_search']").keypress(function(event) { - if (event.keyCode == '13') { - event.preventDefault(); - $("input[name=package_search] ~ button").click(); - } - }); - $("input[name=package_search] ~ button").click(function(event) { - event.preventDefault(); - var data = { - 'packages[]': $("input:text[name='packages[]']").map(function() {return $(this).val()}).get(), - 'package_search': $("input[name='package_search']").val(), - 'repository': $("select[name='tpl[platform]']").val() - }; - var url = '#{url_for :action => 'search_packages', :id => @id}'; - $('#metagrouppackages').empty().addClass('loading'); - $('#metagrouppackages').load(url, data, function() { - $('#metagrouppackages').removeClass('loading'); - }); - }); - }); - }); - //removing packages from the list - $('.remove_package').live('click', function (e) { - e.preventDefault(); - $(this).parent().hide(300, function () { - $(this).remove(); - }); - }); - //displaying extended package info and actions - $('.dropdown').hide(); - $('.packagename').live('click', function () { - var dropdowncontent = $(this).siblings('.dropdown').html(), - $dropdown = $("#dropdown"); - $('.packagewrap').removeClass('selected'); - $(this).parent().addClass('selected'); - $dropdown.empty().html(dropdowncontent).css({ - 'top': $(this).positionAncestor('#content').top + 17, - 'left': $(this).positionAncestor('#content').left - 4 - }).show(); - }); - //catch #content clicks and hide the #dropdown if it's not within it - $("#content").click(function (e) { - if(!e.target.id === 'dropdown' || !$(e.target).closest("#dropdown").length) { - $("#dropdown").hide(); - $('.packagewrap').removeClass('selected'); - } - }); - // select correct package repo when we change platform - $("select[name='tpl[platform]']").change(function() { - if ($submit.is(':hidden')) { - $submit.trigger('click'); - } - }); - // add selected pkgs/groups - $('#do_add_software').live('click', function(e) { - e.preventDefault(); - var $button = $(this).clone(); - var label = "<span id='do_add_software' class='loading fl'>Adding Packages</span>"; - var url = '#{url_for :action => 'managed_content'}'; - var new_pkgs = $("input:checked[name='selected_packages[]']").map(function() {return $(this).val()}).get(); - var old_pkgs = $("input:hidden[name='packages[]']").map(function() {return $(this).val()}).get() - var cached_pkgs = $("input:hidden[name='cached_packages[]']").map(function() {return $(this).val()}).get() - var data = { - 'selected_packages[]': old_pkgs.concat(new_pkgs.concat(cached_pkgs)), - 'selected_groups[]': $("input:checked[name='groups[]']").map(function() {return $(this).val()}).get(), - 'collections': $("input:hidden[name=collections]").val(), - 'template_id' : '#{@id.nil? ? nil : @id}' - }; - $(this).replaceWith(label); - $('#managed_content').load(url, data, function(){ - $("input:checked[name='groups[]']").attr('disabled', 'disabled'); - $("input:checked[name='packages[]']").attr('disabled', 'disabled'); - // $('#add_software_button').show(); - $('.dropdown').hide(); - $('#do_add_software').replaceWith($button); - }); - }); - // hide sw selection panel - $('#cancel_add_software').live('click', function(e) { - e.preventDefault(); - $('#package_selection_list').hide(); - $('#add_software_button').show(); - $('.dropdown').hide(); - }); - }); - -= error_messages_for :tpl, :object_name => 'template' -= render :partial => 'basics' -= render :partial => 'local_content_to_bundle' - -#managed_content - = render :partial => 'managed_content' - -.clearfix - .grid_16.alpha.omega - = submit_tag "Add Software", :name => "add_software_form", :id => "add_software_button", :class => "iconbutton" - -#package_selection_list{:style => 'display: none'} - -= render :partial => 'preboot_configuration' - -= submit_tag "Save", :name => "save", :class => "formbutton" -= submit_tag "Cancel", :name => "cancel", :class => "formbutton" diff --git a/src/app/views/templates/_hidden_fields.haml b/src/app/views/templates/_hidden_fields.haml deleted file mode 100644 index 5709087..0000000 --- a/src/app/views/templates/_hidden_fields.haml +++ /dev/null @@ -1,8 +0,0 @@ -= hidden_field :tpl, :id -= hidden_field :tpl, :name -= hidden_field :tpl, :summary -= hidden_field :tpl, :platform -= hidden_field :tpl, :platform_version -= hidden_field :tpl, :architecture -- @tpl.packages.each do |p| - = hidden_field_tag "packages[]", p, :id => "package_#{p}" diff --git a/src/app/views/templates/_local_content_to_bundle.haml b/src/app/views/templates/_local_content_to_bundle.haml deleted file mode 100644 index 109ce20..0000000 --- a/src/app/views/templates/_local_content_to_bundle.haml +++ /dev/null @@ -1,21 +0,0 @@ -%h3.disabled.gap Local Content to Bundle -%fieldset.clearfix - = label_tag :local_bundle_name, 'Local:', :class => "disabled grid_2 alpha" - = text_field_tag 'local_bundle_name[]', 'Bundle Name', :disabled => true, :class => "grid_8" - .grid_6.omega - %button{:type => 'button', :disabled => 'disabled'} Browse - %button{:type => 'button', :disabled => 'disabled'} Config - %button{:type => 'button', :disabled => 'disabled'} Metadata - ( - %a{:href => '#'} Remove - ) - .grid_2.alpha - - = text_field_tag 'local_bundle_name[]', 'Bundle Name', :disabled => true, :class => "grid_8" - .grid_6.omega - %button{:type => 'button', :disabled => 'disabled'} Browse - %button{:type => 'button', :disabled => 'disabled'} Config - %button{:type => 'button', :disabled => 'disabled'} Metadata - ( - %a{:href => '#'} Remove - ) diff --git a/src/app/views/templates/_managed_content.haml b/src/app/views/templates/_managed_content.haml deleted file mode 100644 index 5b9f13a..0000000 --- a/src/app/views/templates/_managed_content.haml +++ /dev/null @@ -1,21 +0,0 @@ -#selected_packages - %h3.gap Managed Content to Bundle - .grid_16.alpha.omega - - if @tpl.packages.empty? - No selected packages - - else - /- repos = @repository_manager.repositories_hash - - @tpl.packages.sort.each do |pkg| - /- pkg_group = @groups.keys.find {|g| @groups[g][:packages][pkg]} - .packagewrap - %a.packagename{:id => "package_#{pkg}"}=pkg - = hidden_field_tag 'packages[]', pkg, :id => "package_#{pkg}" - = submit_tag "Remove", :name => "remove_package_#{pkg}", :id => "remove_package_#{pkg}", :class => 'remove_package' - .dropdown - / we don't display repository for now, it's pretty difficult with current design - /%section - / Repository: - / %label= (pkg_group and repo = repos[@groups[pkg_group][:repository_id]]) ? repo.name.to_s : ' ' - %fieldset.nomargin - %button{:disabled => true} Browse - %button{:disabled => true} Config diff --git a/src/app/views/templates/_metagroup_packages.haml b/src/app/views/templates/_metagroup_packages.haml deleted file mode 100644 index 3e83d34..0000000 --- a/src/app/views/templates/_metagroup_packages.haml +++ /dev/null @@ -1,19 +0,0 @@ -- if @metagroup_packages.blank? - %span.disabled No group selected -- else - %h4 - = "#{@metagroup} Packages" - %ul.metagrouppackages - - @metagroup_packages.sort {|a, b| a[:name] <=> b[:name]}.each do |group| - %li - - selected = false - %h5 - = check_box_tag 'selected_groups[]', group[:id], selected, {:disabled => selected, :id => "group_#{group[:id]}", :class => "softwaregroups #{selected ? 'selected' : ''}"} - = label_tag "group_#{group[:id]}", group[:name] - %ul - - group[:packages].each do |pkg| - %li - - selected = @packages.to_a.find {|p| p[:name] == pkg} - = check_box_tag 'selected_packages[]', pkg, selected, {:disabled => selected, :id => "pkg_#{group[:name]}_#{pkg}"} - = label_tag "pkg_#{group[:name]}_#{pkg}", pkg - = render :partial => 'addbuttons' diff --git a/src/app/views/templates/_metagroups.haml b/src/app/views/templates/_metagroups.haml deleted file mode 100644 index b4fcf3f..0000000 --- a/src/app/views/templates/_metagroups.haml +++ /dev/null @@ -1,13 +0,0 @@ -%fieldset.clearfix - .search.grid_4.alpha - %input{:type => "search", :placeholder => "Search for package", :name => 'package_search', :value => params[:package_search], :id => 'package_search'} - %button.action{:id => 'package_search_button'} - .grid_8 - %a.grid_4.omega Advanced Search - -%ul.metagroups{:class => 'packagegroupsidebar grid_4 alpha'} - %li - = submit_tag 'Collections', :name => 'collections', :id => 'collections', :class => 'icon' - - @metagroups.keys.sort.each do |cat| - %li - = submit_tag cat, :name => "metagroup_packages", :class => 'icon' diff --git a/src/app/views/templates/_preboot_configuration.haml b/src/app/views/templates/_preboot_configuration.haml deleted file mode 100644 index 79ae839..0000000 --- a/src/app/views/templates/_preboot_configuration.haml +++ /dev/null @@ -1,11 +0,0 @@ -%h3.clear.gap Preboot Configuration -%fieldset.clearfix - .grid_4.alpha - = radio_button_tag :configure_via_script, 'no', :disabled => true - = label_tag :configure_via_script, 'Configure Via Script' - = file_field_tag 'script_file', :disabled => true, :class => 'grid_12 omega' -%fieldset.clearfix - .grid_4.alpha - = radio_button_tag :configure_via_script, 'no', :disabled => true - = label_tag :configure_via_script, 'Configure Via Script' - = file_field_tag 'script_file', :disabled => true, :class => 'grid_12 omega' diff --git a/src/app/views/templates/_search_packages.haml b/src/app/views/templates/_search_packages.haml deleted file mode 100644 index 873f2ab..0000000 --- a/src/app/views/templates/_search_packages.haml +++ /dev/null @@ -1,45 +0,0 @@ -:javascript - $(document).ready(function() { - $('.pagination input[type=submit]').click(function(e) { - e.preventDefault(); - var url = '#{url_for :action => 'dispatch', :id => @id}'; - var old_pkgs = $("input:hidden[name='cached_packages[]']").map(function() {return $(this).val()}).get(); - var new_pkgs = $("input:checked[name='selected_packages[]']").map(function() {return $(this).val()}).get(); - var data = { - 'selected_packages[]': $("input:hidden[name='packages[]']").map(function() {return $(this).val()}).get(), - 'cached_packages[]': old_pkgs.concat(new_pkgs), - 'selected_groups[]': $("input:checked[name='groups[]']").map(function() {return $(this).val()}).get(), - 'package_search': $("input[name='package_search']").val(), - 'old_page': '#{@page}', - 'template_id' : '#{@id.nil? ? nil : @id}', - 'page': $(this).val(), - 'repository': $("select[name='tpl[platform]']").val() - }; - $('#metagrouppackages').empty().addClass('loading'); - $('#metagrouppackages').load(url, data, function() { - $('#metagrouppackages').removeClass('loading'); - }) - }); - }); - -- @cached_packages.uniq.each do |pkg| - = hidden_field_tag 'cached_packages[]', pkg - -- if params[:package_search].empty? - Search string is empty. --else - %h4 - = "Search Results for '#{params[:package_search]}'" - %ul.searchedpackages - - @searched_packages.sort {|a, b| a [:name] <=> b[:name]}.each do |pkg| - %li - - selected = (@packages.to_a.find {|p| p[:name] == pkg[:name]} or @cached_packages.include?(pkg[:name])) - - disabled = @tpl.packages.include?(pkg[:name]) - = check_box_tag 'selected_packages[]', pkg[:name], selected, {:disabled => disabled, :id => "pkg_#{pkg[:name]}"} - = label_tag "pkg_#{pkg[:name]}", pkg[:name] - .pageinfo - = page_entries_info @searched_packages, :entry_name => 'package' - = will_paginate @searched_packages, :params => {:package_search => params[:package_search]}, :renderer => TemplatesHelper::ButtonPaginationRenderer.new, :previous_label => 'Previous', :next_label => 'Next' - - - = render :partial => 'addbuttons' diff --git a/src/app/views/templates/_software_selection.haml b/src/app/views/templates/_software_selection.haml deleted file mode 100644 index 79bbe1e..0000000 --- a/src/app/views/templates/_software_selection.haml +++ /dev/null @@ -1,39 +0,0 @@ -:javascript - $(document).ready(function() { - var $metagrouppackages = $('#metagrouppackages'); - $('.metagroups input').click(function(e) { - e.preventDefault(); - var data = { - 'repository': $("select[name='tpl[platform]']").val(), - 'packages[]': $("input:hidden[name='packages[]']").map(function() {return $(this).val()}).get() - }; - if ($(this).attr('name') == 'collections') { - var url = '#{url_for :action => 'collections', :id => @id}'; - } else { - var url = '#{url_for :action => 'metagroup_packages', :id => @id}'; - data.metagroup_packages = e.currentTarget.value; - } - $metagrouppackages.empty().addClass('loading'); - $metagrouppackages.load(url, data, function() { - $metagrouppackages.removeClass('loading'); - //select all packages in collection - $(".softwaregroups").click(function() { - if ($(this).attr("checked") === true) { - $(this).parent().siblings("ul").find("input[type='checkbox']").attr("checked","checked"); - } else { - $(this).parent().siblings("ul").find("input[type='checkbox']").removeAttr("checked"); - } - }); - }); - }); - }); - -.grid_16 - %h4 Managed Content Selection - - - form_tag :action => 'dispatch' do - - unless request.xhr? - = render :partial => 'hidden_fields' - = render :partial => 'metagroups' - #metagrouppackages.grid_12.omega.gap - = render :partial => view diff --git a/src/app/views/templates/_templates.haml b/src/app/views/templates/_templates.haml deleted file mode 100644 index 54dc222..0000000 --- a/src/app/views/templates/_templates.haml +++ /dev/null @@ -1,27 +0,0 @@ -- template_columns = [ | - {:name => '', :sortable => false}, | - {:name => 'NAME', :sort_attr => 'name'}, | - {:name => 'OS', :sort_attr => 'platform'}, | - {:name => 'VERSION', :sort_attr => 'platform_version'}, | - {:name => 'BOOTABLE', :sortable => false}, | - {:name => 'ARCH', :sort_attr => 'architecture'}, | -] | - -%table - = sortable_table_header(template_columns) - %tbody - - if @templates.empty? - %tr - %td{:colspan => 7} No Templates - - else - - @templates.each do |tpl| - %tr - %td= radio_button_tag 'ids[]', tpl.id - %td - = image_tag "blnk.png", :alt => tpl.platform, :class => "icon platform #{tpl.platform}" - = tpl.name - %td= tpl.platform - %td= tpl.platform_version - %td - = image_tag 'blnk.png', :alt => 'yes', :class => "icon yes" - %td= tpl.architecture diff --git a/src/app/views/templates/assembly.haml b/src/app/views/templates/assembly.haml deleted file mode 100644 index c23620c..0000000 --- a/src/app/views/templates/assembly.haml +++ /dev/null @@ -1,138 +0,0 @@ -%h2 Assembly -- form_tag :controller => 'templates' do - #general_information - %h3 General Information - = text_field :templates, :machine_name, :value => 'Machine Name', :disabled => 'disabled' - = text_field :templates, :machine_description, :value => 'Machine Description', :disabled => 'disabled' - = text_field :templates, :current_version, :value => 'Current Version' - %button{ :disabled => 'disabled' } - New Version - = file_field :templates, :choose_logo, :value => 'Choose Logo' - = text_field :templates, :logo_text, :value => 'Logo Text (5 characters)' - %label{ :for => :template_group} - Template Group - = select_tag(:template_group, options_for_select([['User Private', 1]])) - %span - ( - %a{ :href => ''}<> add - ) - #templates - %h3 Templates - %button{ :disabled => 'disabled'} Add Templates - %h4 Bootable Template: - %span.name RHEL Standard - %button Config - %span - ( - %a{ :href => ''}<> Remove - ) - %label OS: - RHEL - %label OS Version: - 6.013 Beta 2 - %h4 Non-Bootable Template: - - (1..4).each do - %span.name Bill's LB Kernel - %button - Config - %span - ( - %a{ :href => ''}<> Remove - ) - #services - %h3 Services - %label Type: - %label Name: - %label Provided - .service - = select_tag('type1', options_for_select([['LB', 1]])) - = text_field :templates, 'name1', :value => "Bill's Load Balancer", :disabled => 'disabled' - %button Config - %span - ( - %a{ :href => ''}<> Remove - ) - .service - = select_tag('type2', options_for_select([['Type', 1]])) - = text_field :templates, 'name2', :disabled => 'disabled' - %button Config - %span - ( - %a{ :href => ''}<> Add New - ) - - %label Type: - %label Name: - %label Required - .service - = select_tag('type3', options_for_select([['SQL', 1]])) - = text_field :templates, 'name3', :value => "Special SQL Server", :disabled => 'disabled' - %button Config - %span - ( - %a{ :href => ''}<> Remove - ) - .service - = select_tag('type4', options_for_select([['Type', 1]])) - = text_field :templates, 'name4', :disabled => 'disabled' - %button Config - %span - ( - %a{ :href => ''}<> Add New - ) - #pre-boot_configuration - %h3 Pre-boot Configuration - %input{ :type => 'radio', :id => 'select_script', :name => 'configuration', :value => 'script' } - %label{ :for => 'select_script' } Configure Via Script - = text_field :templates, :file_name, :value => 'File Name' - %button{ :disabled => 'disabled' } - Browse - - %input{ :type => 'radio', :id => 'select_puppet', :name => 'configuration', :value => 'puppet' } - %label{ :for => 'select_puppet' } Configure Via Puppet - = text_field :templates, :corporate_security, :value => 'Corporate Security' - %button{ :disabled => 'disabled' } - Browse - - #search_assemblies - %h3 Search Assemblies - %input{ :type => 'text', :class => 'search'} Search Text - %span - ( - %a{ :href => '' }<> Filter Results - ) - %h4 Show Matches with: - %input{ :type => 'checkbox', :id => 'match_name' } - %label{ :for => 'match_name'} Name - %input{ :type => 'checkbox', :id => 'match_description' } - %label{ :for => 'match_description'} Match Description - %input{ :type => 'checkbox', :id => 'match_category' } - %label{ :for => 'match_category'} Category - %input{ :type => 'checkbox', :id => 'match_base_os' } - %label{ :for => 'match_base_os'} Base OS - %input{ :type => 'checkbox', :id => 'match_services_provided' } - %label{ :for => 'match_services_provided'} Services Provided - %input{ :type => 'checkbox', :id => 'match_services_required' } - %label{ :for => 'match_services_required'} Services Required - %span - ( - %a{ :href => ''}<> Uncheck All - ) - - #template - %h3 Template - %ul - - (1..10).each do - %li - %span.name Bill's LB Kernel - %span.description Basic Kernel code for the Load Balancer - %label OS - %span.os RHEL 6.013 Beta 2 - Non-Bootable - %button Add - %label Category: - %span.category System - %span.version Vers 7.2 - - = submit_tag 'Cancel' - = submit_tag 'Save' diff --git a/src/app/views/templates/collections.haml b/src/app/views/templates/collections.haml deleted file mode 100644 index a899c85..0000000 --- a/src/app/views/templates/collections.haml +++ /dev/null @@ -1 +0,0 @@ -= render :partial => 'software_selection', :locals => {:view => 'collections'} diff --git a/src/app/views/templates/deployment_definition.haml b/src/app/views/templates/deployment_definition.haml deleted file mode 100644 index adf071d..0000000 --- a/src/app/views/templates/deployment_definition.haml +++ /dev/null @@ -1,113 +0,0 @@ -%h2 Assembly -- form_tag :controller => 'templates' do - #general_information - %h3 General Information - = text_field :templates, :deployment_name, :value => 'Deployment Name', :disabled => 'disabled' - = text_field :templates, :deployment_description, :value => 'Deployment Description', :disabled => 'disabled' - = text_field :templates, :current_version, :value => 'Current Version' - %button{ :disabled => 'disabled' } - New Version - = file_field :templates, :choose_logo, :value => 'Choose Logo' - = text_field :templates, :logo_text, :value => 'Logo Text (5 characters)' - %label{ :for => :template_group} - Template Group - = select_tag(:template_group, options_for_select([['User Private', 1]])) - %span - ( - %a{ :href => ''}<> add - ) - #machine_definitions - %h3 MACHINE DEFINITIONS - %label OS: - RHEL - %label OS Version: - 6.013 Beta 2 - %table - %thead - %th - %th Hardware Profiles - %th Locale - %th - %tbody - %tr - %td Global Settings - %td= select_tag('type1', options_for_select([['Small', 1]])) - %td= select_tag('type2', options_for_select([['Any', 1]])) - %td - %button{:type => 'button', :disabled => 'disabled'} Config - %table - %thead - %th - %th Name - %th Hardware Profiles - %th Locale - %th - %th - %tbody - - (1..2).each do - %tr - %td Bill's LB Kernel - %td= text_field :templates, :type1 - %td= select_tag('type1', options_for_select([['Small', 1]])) - %td= select_tag('type2', options_for_select([['Any', 1]])) - %td - %button{:type => 'button', :disabled => 'disabled'} Config - %td - %a Remove - - #build - %h3 BUILD - %b Choose Provider Format: - %ul - - @all_targets.each do |target_id, target| - %li - = check_box_tag 'targets[]', target_id, false - = label_tag 'targets[]', target['name'] - - - #search_assemblies - %h3 Search Assemblies - %input{ :type => 'text', :class => 'search'} Search Text - %span - ( - %a{ :href => '' }<> Filter Results - ) - %h4 Show Matches with: - %input{ :type => 'checkbox', :id => 'match_name' } - %label{ :for => 'match_name'} Name - %input{ :type => 'checkbox', :id => 'match_description' } - %label{ :for => 'match_description'} Match Description - %input{ :type => 'checkbox', :id => 'match_category' } - %label{ :for => 'match_category'} Category - %input{ :type => 'checkbox', :id => 'match_base_os' } - %label{ :for => 'match_base_os'} Base OS - %input{ :type => 'checkbox', :id => 'match_services_provided' } - %label{ :for => 'match_services_provided'} Services Provided - %input{ :type => 'checkbox', :id => 'match_services_required' } - %label{ :for => 'match_services_required'} Services Required - %span - ( - %a{ :href => ''}<> Uncheck All - ) - - #machine_definitions_list - %h3 MACHINE DEFINITION - %ul - - (1..10).each do - %li - %span.name BILL'S LOAD BALANCER - %span.description A load balancer based on the algorithms put fourth in the latest journal - %label OS - %span.os RHEL 6.013 Beta 2 - %label Service Provided - %span.service_provided Load Balancer - %label Service Required - %span.service_required SQL Server, S3 - - %button Add - %label Category: - %span.category System - %span.version Vers 7.2 - - = submit_tag 'Cancel' - = submit_tag 'Submit to Build' diff --git a/src/app/views/templates/edit.haml b/src/app/views/templates/edit.haml deleted file mode 100644 index a2fece4..0000000 --- a/src/app/views/templates/edit.haml +++ /dev/null @@ -1,6 +0,0 @@ -#dropdown -.grid_16 - %h2 Edit Template - - form_for @tpl, :url => {:action => 'dispatch'} do - = hidden_field_tag :id, @tpl.id - = render :partial => 'form' diff --git a/src/app/views/templates/index.haml b/src/app/views/templates/index.haml deleted file mode 100644 index 38b32de..0000000 --- a/src/app/views/templates/index.haml +++ /dev/null @@ -1,78 +0,0 @@ -- form_tag(:action => 'index_action') do - .actionsidebar.grid_3 - %dl - %dt Actions - %dd - %h5 Show - %ul.filters - %li - = check_box_tag 'templates', 'templates', true, :disabled => true - = label_tag 'templates', 'Templates' - %li - = check_box_tag 'assemblies', 'assemblies', true, :disabled => true - = label_tag 'assemblies', 'Assemblies' - %li - = check_box_tag 'deployables', 'deployables', true, :disabled => true - = label_tag 'deployables', 'Deployables' - - %dd - %h5 Manage - %ul - %li.edit - %span - = submit_tag "Edit", :name => "edit", :class => "icon" - %li.delete - %span - = submit_tag "Delete", :name => "delete", :class => "icon" - %li.rename.disabled - %span - = submit_tag "Rename", :name => "rename", :disabled => true, :class => "icon" - %li.copy.disabled - %span - = submit_tag "Copy", :name => "copy", :disabled => true, :class => "icon" - %dd - %h5 Build - %ul - %li.build - %span - = submit_tag "Build", :name => "build", :class => "icon" - %dd - %h5 Create New - %ul - %li.add - %span - = submit_tag "Template", :name => "new_template", :class => "icon" - %li.add - %span - = submit_tag "Assembly", :name => "assembly", :class => "icon" - %li.add - %span - = submit_tag "Deployment def.", :name => "deployment_definition", :class => "icon" - - #tables.grid_13 - .templates - %h3 Templates - = render :partial => 'templates' - - .assemblies - %h3 Assemblies - = render :partial => 'templates' - - .deployables - %h3 Deployables - = render :partial => 'templates' - -:javascript - $(document).ready(function () { - var $filters = $('.filters input'); - $("#tables input[type='checkbox']").buttonSensitivity().change(); - $filters.removeAttr("disabled").change(function () { - $filters.each(function () { - if ($(this).filter(':checked').length) { - $("."+this.id).show(200); - } else { - $("."+this.id).hide(200); - } - }); - }).change(); - }); diff --git a/src/app/views/templates/managed_content.haml b/src/app/views/templates/managed_content.haml deleted file mode 100644 index 926142d..0000000 --- a/src/app/views/templates/managed_content.haml +++ /dev/null @@ -1 +0,0 @@ -= render :partial => 'managed_content' diff --git a/src/app/views/templates/metagroup_packages.haml b/src/app/views/templates/metagroup_packages.haml deleted file mode 100644 index 9703663..0000000 --- a/src/app/views/templates/metagroup_packages.haml +++ /dev/null @@ -1 +0,0 @@ -= render :partial => 'software_selection', :locals => {:view => 'metagroup_packages'} diff --git a/src/app/views/templates/new.haml b/src/app/views/templates/new.haml deleted file mode 100644 index 9ae8525..0000000 --- a/src/app/views/templates/new.haml +++ /dev/null @@ -1,5 +0,0 @@ -#dropdown -.grid_16 - %h2 New Template - - form_for @tpl, :url => {:action => 'dispatch'} do - = render :partial => 'form' diff --git a/src/app/views/templates/search_packages.haml b/src/app/views/templates/search_packages.haml deleted file mode 100644 index 94e30f5..0000000 --- a/src/app/views/templates/search_packages.haml +++ /dev/null @@ -1 +0,0 @@ -= render :partial => 'software_selection', :locals => {:view => 'search_packages'} diff --git a/src/app/views/users/_form.haml b/src/app/views/users/_form.haml deleted file mode 100644 index efe0c96..0000000 --- a/src/app/views/users/_form.haml +++ /dev/null @@ -1,47 +0,0 @@ -.dcloud_form - - form_for @user, :url => account_path do |form| - = hidden_field :user, :id, :value => @user.id - = form.error_messages - %fieldset.clear - = form.label :login, t(:choose_name), :class => "grid_3 alpha" - = form.text_field :login, :class => "grid_5" - %fieldset.clear - = form.label :password, form.object.new_record? ? t(:choose_password) : t(:change_password), :class => "grid_3 alpha" - = form.password_field :password, :class => "grid_5" - %fieldset - = form.label :password_confirmation, t(:confirm_password), :class => "grid_3 alpha" - = form.password_field :password_confirmation, :class => "grid_5" - -if check_privilege(Privilege::MODIFY, User) - %fieldset.clear - = form.label :user_status, "User Status:", :class => "alpha grid_3" - .grid_5 - = radio_button_tag "user_status","Active",true - = label_tag "user_status_active", "Active" - = radio_button_tag "user_status","Inactive", false, :disabled => true - = label_tag "user_status_inactive", "Inactive" - %fieldset.clear - = form.label :first_name, t(:first_name), :class => "alpha grid_3" - = form.text_field :first_name, :class => "grid_5" - %fieldset.clear - = form.label :last_name, t(:last_name), :class => "alpha grid_3" - = form.text_field :last_name, :class => "grid_5" - %fieldset.clear - = form.label :email, t(:email), :class => "alpha grid_3" - = form.text_field :email, :class => "grid_5" - -if check_privilege(Privilege::MODIFY, User) - %h3.grid_16 User Treatment - %fieldset.clearfix - = label_tag 'apply_treatment', t(:apply_treatment), :class => "alpha grid_3" - = select_tag 'user_treatment', options_for_select([t(:choose_treatment)]), :class => "grid_5" - = submit_tag t(:apply), :disabled => true, :class => "grid_2" - - - form.fields_for :quota do |quota_form| - %fieldset.clear - = quota_form.label :maximum_running_instances, t(:maximum_running_instances), :class => "alpha grid_3" - = quota_form.text_field :maximum_running_instances, :class => "grid_5" - (instances) - = quota_form.error_message_on :maximum_running_instances, 'Maximum Running Instances ' - %fieldset.clearfix - = form.submit "Save", :class => "submit formbutton" - = form.submit "Reset", :class => "submit formbutton" - = link_to t(:cancel), cancel_path, :class => 'button formbutton' diff --git a/src/app/views/users/edit.haml b/src/app/views/users/edit.haml deleted file mode 100644 index aa70a7c..0000000 --- a/src/app/views/users/edit.haml +++ /dev/null @@ -1,6 +0,0 @@ -.formwindow -- if check_privilege(Privilege::MODIFY, User) - %h2 Editing User: #{@user.first_name} #{@user.last_name} -- else - %h2 Editing Account -= render :partial => "form", :object => @user, :locals => { :cancel_path => users_path} diff --git a/src/app/views/users/index.haml b/src/app/views/users/index.haml deleted file mode 100644 index 8ec3178..0000000 --- a/src/app/views/users/index.haml +++ /dev/null @@ -1,54 +0,0 @@ -= form_tag :action => 'manage_user' -.grid_3.actionsidebar - %dl - %dt - Users - %dd.edit - %span - = submit_tag "edit", :class => "submit linkbutton" - %dd.delete - %span - = submit_tag "delete", :id => 'delete_button', :class => "submit linkbutton" - %dd.add - %span - = link_to "create", new_user_url - -.grid_13 - %table{:id => 'users_table'} - %thead - %tr - %th - %th= link_to "User ID", users_url(:sort_by => "login") - %th= link_to "Last Name", users_url(:sort_by => "last_name") - %th= link_to "First Name", users_url(:sort_by => "first_name") - %th= link_to "% Quota Used", users_url(:sort_by => "percentage_quota_used") - %th - =link_to "Quota", users_url(:sort_by => "quota") - %span (Instances) - %th= link_to "e-mail", users_url(:sort_by => "email") - %th - -@users.each do |user| - %tr - %td - %input{:name => "user_checkbox", :type => "radio", :value => user.id, :id => "user_checkbox_#{user.id}" } - %td= link_to user.login, user_path(user) - %td= user.last_name - %td= user.first_name - %td= sprintf("%.2f", user.quota.percentage_used) - %td= Quota.no_limit(user.quota.maximum_running_instances) ? "Unlimited" : user.quota.maximum_running_instances - %td= user.email - %td= link_to "edit", edit_user_path(user) - -:javascript - $(document).ready(function () { - $('#delete_button').click(function(e) { - if ($("#users_table input[@type=radio]:checked").length == 0) { - alert('please select any user to be deleted'); - e.preventDefault(); - } else { - if (!confirm("Are you sure you want to delete this user?")) { - e.preventDefault(); - } - } - }); - }); diff --git a/src/app/views/users/new.haml b/src/app/views/users/new.haml deleted file mode 100644 index 792d7c4..0000000 --- a/src/app/views/users/new.haml +++ /dev/null @@ -1,6 +0,0 @@ -%h2 New Account --if (current_user) - = render :partial => "form", :locals => { :cancel_path => users_path} --else - .modalbox - = render :partial => "form", :locals => { :cancel_path => login_path} diff --git a/src/app/views/users/show.haml b/src/app/views/users/show.haml deleted file mode 100644 index 7c522c8..0000000 --- a/src/app/views/users/show.haml +++ /dev/null @@ -1,104 +0,0 @@ -.grid_3.actionsidebar - %dl - %dt - Users - %dd.edit - %span - = link_to "edit", edit_user_path(@user) - -.grid_13 - %h2 #{@user.first_name} #{@user.last_name} (#{@user.login}) - - %table - %thead - %tr - %th.show - Personal Details - %th.show - %tbody - %tr - %td - %label Username - %td - = @user.login - %tr - %td - %label First Name - %td - = @user.first_name - %tr - %td - %label Last Name - %td - = @user.last_name - %tr - %td - %label e-mail - %td - = @user.email - - %table - %thead - %tr - %th.show - Quota Status - %th.show - %tbody - %tr - %td - %label Maximum - %td - = @quota_resources["running_instances"].max - %tr - %td - %label Used - %td - = @quota_resources["running_instances"].used - %tr - %td - %label Availabe - %td - = @quota_resources["running_instances"].available - - %table - %thead - %tr - %th.show - Login Information - %th.show - %tbody - %tr - %td - %label Current Login IP - %td - = @user.current_login_ip - %tr - %td - %label Current Login at - %td - = @user.current_login_at - %tr - %td - %label Last Login IP - %td - = @user.last_login_ip - %tr - %td - %label Last Login at - %td - = @user.last_login_at - %tr - %td - %label Login Count - %td - = @user.login_count - %tr - %td - %label Failed Login Count - %td - = @user.login_count - %tr - %td - %label Last Request at - %td - = @user.last_request_at \ No newline at end of file diff --git a/src/config/old_navigation.rb b/src/config/old_navigation.rb deleted file mode 100644 index 27b44cf..0000000 --- a/src/config/old_navigation.rb +++ /dev/null @@ -1,42 +0,0 @@ -SimpleNavigation::Configuration.run do |navigation| - navigation.autogenerate_item_ids = false - navigation.items do |first_level| - first_level.item :operation, t(:operation), '#', :class => 'operation' do |second_level| - second_level.item :monitor, t(:monitor), :controller => 'dashboard' - second_level.item :browse_objects, t(:browse_objects), '#', :class => 'disabled' - end - first_level.item :administration, t(:administration), '#', :class => 'administration' do |second_level| - second_level.item :system_settings, t(:system_settings), :controller => 'settings' do |third_level| - third_level.item :manage_providers, t(:manage_providers), providers_path do |fourth_level| - fourth_level.item :provider_summary, t(:provider_summary), { :controller => 'providers', :action => 'show', :id => (@provider.id if @provider) }, :highlights_on => //providers/\d+(/edit)?$/ - fourth_level.item :provider_accounts, t(:provider_accounts), { :controller => 'cloud_accounts', :action => 'index', :provider_id => (@provider.id if @provider) }, :highlights_on => //providers/\d+/accounts(/(\d+|new))?/ - fourth_level.item :scheduling_policies, t(:scheduling_policies), '#' - fourth_level.item :services_provided, t(:services_provided), '#' - fourth_level.item :map_profiles, t(:map_profiles), '#' - fourth_level.item :map_locales, t(:map_locales), '#' - end - third_level.item :define_services, t(:define_services), '#' - third_level.item :define_services, t(:define_profiles), '#' - third_level.item :define_services, t(:define_locales), '#' - third_level.item :manage_users, t(:manage_users), :controller => 'users' do |fourth_level| - fourth_level.item :new_user, t(:new_user), {:controller => 'users', :action => 'new'}, :highlights_on => //users/new/ - fourth_level.item :edit_user, t(:edit_user), {:controller => 'users', :action => 'edit'}, :highlights_on => //users/edit/ - end - third_level.item :general_settings, t(:general_settings), {:controller => 'settings', :action => "general_settings"} - third_level.item :permissions, t(:permissions), { :controller => 'settings', :action => 'self_service'} - end - second_level.item :pools_and_zones, t(:pools_and_zones), {:controller => 'pools'}, :highlights_on => //pools/ - second_level.item :audit_report, t(:audit_report), '#', :class => 'disabled' - second_level.item :assistance_requests, t(:assistance_requests), '#', :class => 'disabled' - end - first_level.item :define, t(:define), '#', :class => 'build' do |second_level| - second_level.item :deployables, t(:deployables), {:controller => 'templates'}, :highlights_on => //templates/ - second_level.item :builds, t(:builds), :controller => 'builds', :action => 'index' - second_level.item :images, t(:images), '#', :class => 'disabled' - end - first_level.item :runtime, t(:runtime), '#', :class => 'runtime' do |second_level| - second_level.item :instance_management, t(:instance_management), :controller => 'instances' - end - first_level.item :help, t(:help), '#', :id => 'help', :class => "disabled" - end -end diff --git a/src/public/images/dashboard_summary_next.png b/src/public/images/dashboard_summary_next.png deleted file mode 100644 index ae8b24a3fb0754caeabee6fc3ee2d0ee09d99570..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001
literal 412 zcmV;N0b~A&P)<h;3K|Lk000e1NJLTq000;O000yS0ssI27}sjl00001b5ch_0Itp) z=>Px#32;bRa{vGf6951U69E94oEQKA00(qQO+^RV1sM)0F!F(b!2kdOE=fc|R5;6} zl)J5iFcgMOpx_}vB;*D}MacrtBf$V+0v13_kPS%B1i_voRZ2im(5H#Sqsjwui!`}W zf)o68$2$7-`y9*6@puFj$g&I}WLcJ(rfIR|e!n+OGmfKS7%Q4M9LJfadA(k5w;Ms! zbsf<q2m)DT+xFpb_$D1e)c1W51ZkSmiXLpY+bD|WugSgCo6Y8JA3~@oirsE!S=QTz z*Y)eVKL2WxB=LR!`LM3*^?Lo=`un~Q!!XOTg)@4_aU9R{Xhm@xV~iC=ArBiN^jro( zFf*NhOtWa3rfHh%x_O>|>Zz*gbUKl*=6N2*_|w+EO|;+dClZfDRNu&hvMg0qT~S(w zVYpl_q9}61Ff6vTZF@eSA%p+`rYMTVB2g42N#c1P0PqJMO6kwB(fBq10000<MNUMn GLSTZh>#cwQ
diff --git a/src/public/images/dashboard_summary_prev.png b/src/public/images/dashboard_summary_prev.png deleted file mode 100644 index 34ab07092795ddba41e3935920f7779f7dc50965..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001
literal 375 zcmV--0f_#IP)<h;3K|Lk000e1NJLTq000*N000yS0ssI2>D)0{00001b5ch_0Itp) z=>Px#32;bRa{vGf6951U69E94oEQKA00(qQO+^RV1sM)07{@dyI{*Ly2}wjjR5;6} zl)(ywAP|P#iUh$!6ba#>lhFG=OcZp8Bs$b#CDO2BZxQX5;m&QG@gL`#!Iuz1Db=>^ zvMj*XJgqh7JV_Elh_#9{j$;r6|40A;oNe2D-@i{XHtQJg7eyhZG;q0zP197C<+`qB zx>td|@9VmLI-{RmaL$Ke*iV|Kab0(J!!V4Z=uTyx=c=ksAWkmE`0g$9Jm-1-1jOBp zAcS!o+w9B9Pm+W&cBEiQ7h{}d*^v&V6d|-Hd~fORNka%3WBa5KLf=Fm?XKr}X_`_> zEjv0IAp~P=#N-+49En_Z1R)%T;h!%G0Pqq*bX}*EisSf6*-I4w!2A7{QfjU3R6at9 VdNubHEt&uT002ovPDHLkV1hsVmc0M~
diff --git a/src/public/images/icon_dashboard.png b/src/public/images/icon_dashboard.png deleted file mode 100644 index bfbcd9ff93266a87e65231b0e41f11a5fe68972b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001
literal 952 zcmV;p14sOcP)<h;3K|Lk000e1NJLTq000&M000&U1^@s6#I$TX0000PbVXQnQ*UN; zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBU#T1iAfRCwB)lv_*`R~X0tv$MOp!)>*I zBCu@m)}~cM0yM4ACcS7iqzSQ#F+Q0zP2i<3^+Ebz0;D{*R7_lYc|mEkK<cI!rA-kj zt)@+lmx!%c373T}1MFOOXJ+U0oPnjYu4@+0=D*oJ=lg#DZ_b(XafA@C!Eqe#+g*3f zG>kDrmAa;H41G(dmljt!7?ZPsh4R-A%ax_MxIVs!m?ZYbRXOl928`*j{dcjiU0cg= zv}QZ1w`{5x3QB^-)q5^%*io~ed9Ma;2Xm~fh<hD4cNTVTF2%u0A1eHX^`3&_;HIiK zFBHCzxq*Evy#Ci3#2>pmG4fyzqt|{$?B8ja>LQ|16?Y!a;I3#wm&IN~RRc3O({ItE zd+hbSdQiOeO&56Hi5W%1$o)Bt{Llx7A|kFVLXAf8*W@hzjyR!7%s>gu-nyD%kOD4! z<sI?QzB6z+o#0(O+%7jJ=T!{d3t=dD9-J}<Ls~#oi(+hg9%G8jGKfdjK=}6Xia`pv zq~?J5``4XtQZSR?5mu_0oL4Y78p2Qg-QXl@AkQPFX?PfpVBE-?(&dHV)NdExqoF2a zI_-~O7;)&j&MYl+Vtc|OuLlj)e$;MzA6G_a@cma`fS1DX<<m7?EBe*Ut)pRXswj(3 z0uvJ}VCzFt&!#BPgF{tisM+!X2JeP&u{!{V9EKhfH`>AW*A1p=T3{x_Ff8!nw6@8G z;CU4dFZ$7b@&xuBJ5GxtNjyh##RMANH;sZdO<y_+o7T7mwEWRx#WpofSaZc*0Y_dc zhZ!enF9_oCI0QkUV9ipZLf7tEgj!pzn2$p3Nv~BxEH@pP=#jb06>m49@4G>(nnV&C zvu$mUy$A`JkDiAu*+b=DlfSt!%U?B+`}|wv^p`zEQ4|t8*F*kk{*VUpgzt9}$Ga@y zy0w-Ni>LYC1k(=Ysj{iq>27o9mp6LKss?hN+e=P=P7P#*bi_U-&A&AN52kYoWz)EH zU@SKn*5z_m44$C|zRH2@XZMg(pPeJJB$JLyG4jdB6V~s9*!q*e85*1=QbbBprr=c@ ztQMS^LD$(7u)PUo)W4V8z*?#-s$6RD2A{S50LQyGDr3Vh)47GG0jD!yqE{7RDuprs a6JP*Vrd^qjCEz�<MNUMnLSTYig2CSa
diff --git a/src/public/stylesheets/images/icon_dashboard.gif b/src/public/stylesheets/images/icon_dashboard.gif deleted file mode 100644 index 5ed7483685461cb65f00718a83b207af6187b545..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001
literal 14152 zcmeI3X;>3S9EVq{6|q7vZPki(iL{E6Y%Y#$2{&j}yr7Clku}*sB$r7r0kuW2#e-V# z1QkJz7V!!dkBW+kC<s(7wTQJ85EZQj@hFE}-3WsEp?&6q-)5eDvYXlWKeO}B@9RwZ zJkVW0j6g;r%?Q$EX`Rh&olje-tK)HVM?+IbeN)H7XYKc&wBLKue)~~dRYO~4eOtv} zZRHQ1U%S^@QrlW|yX9ha%Y{E%OqDIi${LMV8;n=#5C8n|VDbG!#ShX-yHblgvkLDX zD7?G%a{HE|w#`M)_Z8G`ywtMk(sP5kCZ(V$rJy<4+?1JL`JL%m)4`Oa{3l8IPt)^$ zN4k(Tc@1f&ZX}-mJMnaVd~RL*@%wSPbt{auD~+`)j@({;q~_^nP0YcnW!aUw?8@i^ zx1zIdY4%ktHQZ3`Em!QhF3Tv>r<<3gUyIy%RhxS5@mF)m)DrQwV$qhOMH?@Mr4-Cd zI*-Sm#A8kf^v97j#7&p$wk+3m*)f;sV|;B+QaH&|8@Z~(Y~^9L;t-}d#FA%M2GW^P z2W|z@oujgxmt>U(&?^Gy*Zt{TJf2g;{_zsS72jdwNCP72D)AZSD9XI(W#>p_T=29T z8=m11mX3z)I486_BeeT?;r0_aZS?%KQK8#%1hk{>wj<|k$#%2Na<w(M*k<x<(z!Ni z9Ggwp(2dy8QiN)y)b?2Ju)Q4v4qZb+gJz=sgqEQ09$tDCA&Mfk=wdQLst__B<>fO_ zsaVLE>k`BcQu&dQ(#f%EGB|d6h$uEnBoH&aJgq(SxL&T3lUf4R%Vi1;t`{;0v2rnq zQ_q%ejDfyDv{6EakL3kwnbS|HCQ&|%!xXW3e3b9X;<|AKZm!N~Frh`K5DJv*hH}|# z>W7PSI5?k!_B4j4HTC477EAEi{((JnQvZaENUc_dW0+2-W9fJ-r8)xR2m}I*&BeG} zCPgqcF$yiAXDT#fy9aqWjz6gpsii8dRH;BM;}VON(OMycVVS76^(>B1^-iSFuwE>b zB~r>UJ)y!lEH>6VGF9k7b>e<%lF%yEAxfppvwQi0QZ=bls-rZhUog+ZQu!LxH)~%# zNo^77N%?SRviZ~%!sXyR7o5wT|4Mx~^hSA*QY@9kyk71e!m-ri9JikGSD>D956mLs z6)`WYTh{bO|NjXSi+X*jqSdk&+aeZWq>Pl43ay56#(CYDScFTIYB{0xl*)++5{r;Z zJg~mb|NOr0ucl%_#S-hy<;zd+-O9J}(C7WF4BtH{oCHWN)CF|`832M|x}Yu~13)lL z7t{r000@TZg1UeV0KqU_P#2H^AQ+|#>H;zV1jBSeT|fqaV3;nb3&;Qv4ATX50T}>- zVY;9$AOk=!Oc&GzWB>?;>4Lg|3;@9}T~HU00U#Kr3+e(g00hHyL0v!wfMA#|s0+vd z5De1=bpaUwf?>L#E+7LyFiaQJ1!MpS{?Bw-_nq`071Z$#9d(YQUsq>Gd)xEYmgc5^ zo;`i?xbaa#{ofD&dT_t)-rYO3w`;1a{;d4t*6%kfZj}Fa{nxTzu3f$Ib7@KO<)Xq% z7Yi<!P3QB^ojsFx`lnMTPaMxZ_G6Cm=#j&R4rU+7`eFY*!`?l+Gc$Ij@7%FHEp^-0 zEt@xOOiBKJ!*@yR*R5TX`0Y2V6XI9Jef`zS70Y8|^txryT8(<CN~w^`qLxS_BP66) zw3rBA6!zu91@q^H&Ykl`Nbu}gGiOW>nl^RH=aVM|2Kf8=`gnVJ3Ox{9;O^$?!sl^0 zY>dTpo;bm2{J2j)aU9EVK*xMM+J4kWBS#GX@Pqg1!|Z6bHbdVVVm;Vu(7OW%ywkrQ zf;hAe=r;&ik2qV-+E@;VAy!?;@WJ+zjhUtdEBb_mMMlEciMB5^XHUTT;h3cK)Y9NV zh_4gkyUyOJY(rs!T~2t7d0=TOM^;gqwztk;a<W%{>s=EcICQl4I>)8vLW$1=flqSi z<G@)P#`q=kSCtixH%$~wJ)c#Un@AfwZI^#Padh}r8^(0m@i-!35Pd>e(ahO%GPlx} z43nQV`X^QKrPX(C#wQP1du9P|4Pn}wQ|o1wXYgJakWj^os4g<qj-#0|rsR(byE_S~ z$^G9OA4wx<W;RDw-RL78FcML|d*&u{H_gnADlb^8sk8bB>2K{A-WVS5u-egYziDN7 u^C;`Y%t=am91=g!1`QeEZAf>t$Cr0nG5oFUViFr`OEPBUdz#{q&;A8^{IuTy
diff --git a/src/spec/controllers/dashboard_controller_spec.rb b/src/spec/controllers/dashboard_controller_spec.rb deleted file mode 100644 index bd327ce..0000000 --- a/src/spec/controllers/dashboard_controller_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -require 'spec_helper' - -describe DashboardController do - - fixtures :all - before(:each) do - @admin_permission = Factory :admin_permission - @admin = @admin_permission.user - activate_authlogic - end - - it "should provide access to the dashboard" do - UserSession.create(@admin) - get :index - response.should be_success - response.should render_template("monitor") - end - -end
From: Tomas Sedovic tsedovic@redhat.com
Some of the tests still depended on the old controllers. This hooks it all up to the new stuff. --- src/features/authentication.feature | 6 +- src/features/deployable.feature | 1 - src/features/hardware_profile.feature | 1 - src/features/instance.feature | 3 +- src/features/pool.feature | 3 +- src/features/pool_family.feature | 1 - src/features/provider.feature | 3 +- src/features/provider_account.feature | 1 - src/features/role.feature | 1 - src/features/settings.feature | 9 ++-- src/features/step_definitions/template_steps.rb | 8 ++-- src/features/step_definitions/web_steps.rb | 4 -- src/features/support/paths.rb | 9 +-- src/features/template.feature | 53 ++++++++++---------- src/features/user.feature | 1 - src/spec/controllers/builds_controller_spec.rb | 2 +- .../controllers/cloud_accounts_controller_spec.rb | 8 ++-- .../hardware_profiles_controller_spec.rb | 2 +- src/spec/controllers/instance_controller_spec.rb | 5 +- src/spec/controllers/pools_controller_spec.rb | 23 +-------- src/spec/controllers/provider_controller_spec.rb | 10 ++-- src/spec/controllers/templates_controller_spec.rb | 4 +- src/spec/controllers/users_controller_spec.rb | 17 ++----- 23 files changed, 64 insertions(+), 111 deletions(-)
diff --git a/src/features/authentication.feature b/src/features/authentication.feature index 0aa39fd..9e41789 100644 --- a/src/features/authentication.feature +++ b/src/features/authentication.feature @@ -17,7 +17,7 @@ Feature: User authentication | Last name | Tester | | E-mail | testuser@example.com | And I press "Save" - Then I should be on the dashboard page + Then I should be on the root page
Scenario: Want to register new user but decide to cancel Given I am on the homepage @@ -55,7 +55,7 @@ Feature: User authentication Then should see "Editing Account" When I fill in "E-mail" with "changed@example.com" And I press "Save" - Then I should be on the dashboard page + Then I should be on the root page And I should see "User updated!"
Scenario: log out @@ -81,4 +81,4 @@ Feature: User authentication And I am on the login page When I login with incorrect credentials Then I should see "Login failed" - And I should be on the login error page \ No newline at end of file + And I should be on the login error page diff --git a/src/features/deployable.feature b/src/features/deployable.feature index 17c5764..012a459 100644 --- a/src/features/deployable.feature +++ b/src/features/deployable.feature @@ -6,7 +6,6 @@ Feature: Manage Deployables Background: Given I am an authorised user And I am logged in - And I am using new UI
Scenario: List deployables Given I am on the homepage diff --git a/src/features/hardware_profile.feature b/src/features/hardware_profile.feature index d93f7ce..b727772 100644 --- a/src/features/hardware_profile.feature +++ b/src/features/hardware_profile.feature @@ -6,7 +6,6 @@ Feature: Manage Pools Background: Given I am an authorised user And I am logged in - And I am using new UI
Scenario: View front end hardware profiles Given there are the following aggregator hardware profiles: diff --git a/src/features/instance.feature b/src/features/instance.feature index ad22025..583ee49 100644 --- a/src/features/instance.feature +++ b/src/features/instance.feature @@ -7,7 +7,6 @@ Feature: Mange Instances Background: Given I am an authorised user And I am logged in - And I am using new UI
Scenario: Download an Instance Key Given a mock running instance exists @@ -109,4 +108,4 @@ Feature: Mange Instances And I press "Search" Then I should not see "mock" And I should see "test" - And I should not see "other" \ No newline at end of file + And I should not see "other" diff --git a/src/features/pool.feature b/src/features/pool.feature index b26e556..1eced2a 100644 --- a/src/features/pool.feature +++ b/src/features/pool.feature @@ -6,7 +6,6 @@ Feature: Manage Pools Background: Given I am an authorised user And I am logged in - And I am using new UI
Scenario: Create a new Pool Given I am on the pools page @@ -37,7 +36,7 @@ Feature: Manage Pools
Scenario: Enter invalid characters into Name field Given I am an authorised user - And I am on the new pool page + And I am on the new resources pool page When I fill in "pool[name]" with "@%&*())_@!#!" And I press "Save" Then I should see "Name must only contain: numbers, letters, spaces, '_' and '-'" diff --git a/src/features/pool_family.feature b/src/features/pool_family.feature index 64c5635..441e927 100644 --- a/src/features/pool_family.feature +++ b/src/features/pool_family.feature @@ -6,7 +6,6 @@ Feature: Pool Families Background: Given I am an authorised user And I am logged in - And I am using new UI
Scenario: List pool families Given I am on the homepage diff --git a/src/features/provider.feature b/src/features/provider.feature index 08704dd..c2f6da5 100644 --- a/src/features/provider.feature +++ b/src/features/provider.feature @@ -6,7 +6,6 @@ Feature: Manage Providers Background: Given I am an authorised user And I am logged in - And I am using new UI
Scenario: List providers Given I am on the homepage @@ -94,4 +93,4 @@ Feature: Manage Providers And I press "Search" Then I should see "Mock" And I should not see "Test" - And I should not see "Other" \ No newline at end of file + And I should not see "Other" diff --git a/src/features/provider_account.feature b/src/features/provider_account.feature index 964aba2..7f645ee 100644 --- a/src/features/provider_account.feature +++ b/src/features/provider_account.feature @@ -6,7 +6,6 @@ Feature: Manage Provider Accounts Background: Given I am an authorised user And I am logged in - And I am using new UI
Scenario: List provider accounts Given I am on the homepage diff --git a/src/features/role.feature b/src/features/role.feature index 727259a..dbfb22b 100644 --- a/src/features/role.feature +++ b/src/features/role.feature @@ -8,7 +8,6 @@ Feature: Manage Roles And I am logged in Given there's a list of roles And a role "Captain" exists - And I am using new UI
Scenario: Change the name Given I am on the admin roles page diff --git a/src/features/settings.feature b/src/features/settings.feature index c106ea8..3da9589 100644 --- a/src/features/settings.feature +++ b/src/features/settings.feature @@ -6,11 +6,10 @@ Feature: Manage System wide Settings Background: Given I am an authorised user And I am logged in - And I am using new UI
Scenario: Change the self service default quota Given the default quota is set to 5 - And I am on the self service settings page + And I am on the self service admin settings page When I fill in "self_service_default_quota[maximum_running_instances]" with "8" And I press "Save" Then I should see "Settings Updated!" @@ -19,7 +18,7 @@ Feature: Manage System wide Settings
Scenario: Invalid decimal entry for the self service default quota Given the default quota is set to 5 - And I am on the self service settings page + And I am on the self service admin settings page When I fill in "self_service_default_quota[maximum_running_instances]" with "1.5" And I press "Save" Then I should see "Could not update the default quota" @@ -28,7 +27,7 @@ Feature: Manage System wide Settings
Scenario: Invalid chars entry for the self service default quota Given the default quota is set to 5 - And I am on the self service settings page + And I am on the self service admin settings page When I fill in "self_service_default_quota[maximum_running_instances]" with "abc" And I press "Save" Then I should see "Could not update the default quota" @@ -37,7 +36,7 @@ Feature: Manage System wide Settings
Scenario: Invalid special chars entry for the self service default quota Given the default quota is set to 5 - And I am on the self service settings page + And I am on the self service admin settings page When I fill in "self_service_default_quota[maximum_running_instances]" with "^&(*_!" And I press "Save" Then I should see "Could not update the default quota" diff --git a/src/features/step_definitions/template_steps.rb b/src/features/step_definitions/template_steps.rb index e0ab543..990b67b 100644 --- a/src/features/step_definitions/template_steps.rb +++ b/src/features/step_definitions/template_steps.rb @@ -82,14 +82,14 @@ Then /^I should see "([^"]*)" followed by "([^"]*)"$/ do |arg1, arg2| end
Given /^there is a "([^"]*)" build$/ do |arg1| - template = Factory.build :template, :name => arg1 - template.save! - image = Factory.build(:image, :template => template) + @template = Factory.build :template, :name => arg1 + @template.save! + image = Factory.build(:image, :template => @template) image.save! end
When /^I choose this template$/ do - choose("ids__#{@template.id}") + click_link(@template.name) end
Given /^there is ec2 cloud account$/ do diff --git a/src/features/step_definitions/web_steps.rb b/src/features/step_definitions/web_steps.rb index 53e5987..e6d6808 100644 --- a/src/features/step_definitions/web_steps.rb +++ b/src/features/step_definitions/web_steps.rb @@ -12,10 +12,6 @@ require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "pat # Commonly used webrat steps # http://github.com/brynary/webrat
-Given /^I am using new UI$/ do - cookies['layout'] = 'newui' -end - Given /^(?:|I )am on (.+)$/ do |page_name| visit path_to(page_name) end diff --git a/src/features/support/paths.rb b/src/features/support/paths.rb index 4bc7ba4..d59e780 100644 --- a/src/features/support/paths.rb +++ b/src/features/support/paths.rb @@ -56,9 +56,6 @@ module NavigationHelpers when /the pool realms page/ pool_realms_path
- when /the dashboard page/ - dashboard_path - when /the instances page/ resources_instances_path
@@ -69,10 +66,10 @@ module NavigationHelpers hardware_profiles_pool_path
when /the permissions page/ - url_for :action => 'list', :controller => 'permissions', :only_path => true + url_for list_permissions_path
when /the new permission page/ - url_for :action => 'new', :controller => 'permissions', :only_path => true + url_for new_permission_path
when /the new template page/ url_for new_template_path @@ -81,7 +78,7 @@ module NavigationHelpers url_for new_build_path
when /the template builds page/ - url_for builds_path + url_for image_factory_template_path(@template, :details_tab => 'images')
when /the templates page/ templates_path diff --git a/src/features/template.feature b/src/features/template.feature index b7d75a8..b982dfe 100644 --- a/src/features/template.feature +++ b/src/features/template.feature @@ -7,23 +7,22 @@ Feature: Manage Templates Given I am an authorised user And I am logged in And There is a mock pulp repository - And I am using new UI
Scenario: Create a new Template - Given I am on the templates page - When I press "Template" - Then I should be on the new template page + Given I am on the image factory templates page + When I follow "Create" + Then I should be on the new image factory template page When I fill in the following: | tpl_name | mocktemplate | | tpl_platform | fedora | | tpl_summary | mockdesc | When I press "Save" - Then I should be on the templates page + Then I should be on the image factory templates page And I should see "Template saved" And I should see "mocktemplate"
Scenario: Add a searched package to a new template - Given I am on the new template page + Given I am on the new image factory template page When I press "Add Software" And I fill in "package_search" with "libdeltacloud" And I press "package_search_button" @@ -34,9 +33,9 @@ Feature: Manage Templates And I should see "libdeltacloud"
Scenario: Add group and remove package to/from the template - Given I am on the templates page - When I press "Template" - Then I should be on the new template page + Given I am on the image factory templates page + When I follow "Create" + Then I should be on the new image factory template page When I fill in the following: | tpl_name | mocktemplate | And I press "Add Software" @@ -51,17 +50,17 @@ Feature: Manage Templates Then I should see "Managed Content to Bundle" And the page should not contain "#package_libdeltacloud" selector When I press "Save" - Then I should be on the templates page + Then I should be on the image factory templates page And I should see "Template saved" And I should see "mocktemplate"
Scenario: Sorting templates Given there is a "mock1" template And there is a "mock2" template - And I am on the templates page - When I follow "Name" within ".templates" + And I am on the image factory templates page + When I follow "Name" within "#templates_table" Then I should see "mock1" followed by "mock2" - When I follow "Name" within ".templates" + When I follow "Name" within "#templates_table" Then I should see "mock2" followed by "mock1"
Scenario: Sorting template builds @@ -74,14 +73,14 @@ Feature: Manage Templates Then I should see "mock2" followed by "mock1"
Scenario: Search software with empty string - Given I am on the new template page + Given I am on the new image factory template page When I press "Add Software" And I fill in "package_search" with "" And I press "package_search_button" Then I should see "Search string is empty"
Scenario: Show software selection - Given I am on the new template page + Given I am on the new image factory template page And I press "Add Software" Then I should see an input "Collections" # test that we see a metagroup @@ -92,37 +91,37 @@ Feature: Manage Templates Scenario: Build template Given there is a "mock1" template And there is ec2 cloud account - And I am on the templates page + And I am on the image factory templates page When I choose this template - And I press "Build" - Then I should be on the new template build page + And I follow "Build" + Then I should be on the new image factory build page And I should see "Build Request" When I check "ec2" And I press "Submit to Build" - Then I should be on the template builds page + Then I should be on the image factory template page And I should see "mock1"
Scenario: Build template which is already built Given there is a "mock1" template And there is ec2 cloud account - And I am on the templates page + And I am on the image factory templates page And there is ec2 build for this template When I choose this template - And I press "Build" - Then I should be on the new template build page + And I follow "Build" + Then I should be on the new image factory build page And I should see "Build Request" When I check "ec2" And I press "Submit to Build" - Then I should be on the template builds page + Then I should be on the image factory template page And I should see "mock1" And I should see "An attempted build of this template for the target 'ec2' already exists"
Scenario: Build imported template Given there is an imported template - And I am on the templates page + And I am on the image factory templates page When I choose this template - And I press "Build" - Then I should be on the templates page + And I follow "Build" + Then I should be on the image factory templates page And I should see "Build imported template is not supported"
Scenario: Search for templates @@ -166,4 +165,4 @@ Feature: Manage Templates And I press "Search" Then I should not see "Test1" And I should see "Other" - And I should not see "Mock" \ No newline at end of file + And I should not see "Mock" diff --git a/src/features/user.feature b/src/features/user.feature index 1819cb5..34559c7 100644 --- a/src/features/user.feature +++ b/src/features/user.feature @@ -7,7 +7,6 @@ Feature: Manage Users Given I am an authorised user And I am logged in And a user "testuser" exists - And I am using new UI
Scenario: Change the password Given I am on the admin users page diff --git a/src/spec/controllers/builds_controller_spec.rb b/src/spec/controllers/builds_controller_spec.rb index ef4f3d4..31b47f5 100644 --- a/src/spec/controllers/builds_controller_spec.rb +++ b/src/spec/controllers/builds_controller_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper'
-describe BuildsController do +describe ImageFactory::BuildsController do fixtures :all before(:each) do @admin_permission = Factory :admin_permission diff --git a/src/spec/controllers/cloud_accounts_controller_spec.rb b/src/spec/controllers/cloud_accounts_controller_spec.rb index d61ad34..7f10af0 100644 --- a/src/spec/controllers/cloud_accounts_controller_spec.rb +++ b/src/spec/controllers/cloud_accounts_controller_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper'
-describe CloudAccountsController do +describe Admin::ProviderAccountsController do
fixtures :all before(:each) do @@ -53,16 +53,16 @@ describe CloudAccountsController do @cloud_account.save.should be_true
post :update, :id => @cloud_account.id, :cloud_account => { :password => 'mockpassword' } - response.should redirect_to provider_accounts_path(@provider) + response.should redirect_to admin_provider_account_path(@provider) CloudAccount.find(@cloud_account.id).password.should == "mockpassword" end
it "should allow users with account modify permission to delete a cloud account" do UserSession.create(@admin) lambda do - get :destroy, :id => @cloud_account.id + post :multi_destroy, :accounts_selected => [@cloud_account.id] end.should change(CloudAccount, :count).by(-1) - response.should redirect_to provider_accounts_path(@provider) + response.should redirect_to admin_provider_accounts_url CloudAccount.find_by_id(@cloud_account.id).should be_nil end
diff --git a/src/spec/controllers/hardware_profiles_controller_spec.rb b/src/spec/controllers/hardware_profiles_controller_spec.rb index 5d21841..f9410dc 100644 --- a/src/spec/controllers/hardware_profiles_controller_spec.rb +++ b/src/spec/controllers/hardware_profiles_controller_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper'
-describe HardwareProfilesController do +describe Admin::HardwareProfilesController do
fixtures :all before(:each) do diff --git a/src/spec/controllers/instance_controller_spec.rb b/src/spec/controllers/instance_controller_spec.rb index a84819e..c2cfa64 100644 --- a/src/spec/controllers/instance_controller_spec.rb +++ b/src/spec/controllers/instance_controller_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper'
-describe InstancesController do +describe Resources::InstancesController do fixtures :all before(:each) do @admin_permission = Factory :admin_permission @@ -11,8 +11,7 @@ describe InstancesController do it "should provide ui to create new instance" do UserSession.create(@admin) get :new - response.should be_success - response.should render_template("new") + response.should redirect_to(select_template_resources_instances_path) end
it "should fail to grant access to new pool ui for unauthenticated user" do diff --git a/src/spec/controllers/pools_controller_spec.rb b/src/spec/controllers/pools_controller_spec.rb index c9fcc82..bc3488d 100644 --- a/src/spec/controllers/pools_controller_spec.rb +++ b/src/spec/controllers/pools_controller_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper'
-describe PoolsController do +describe Resources::PoolsController do fixtures :all before(:each) do @admin_permission = Factory :admin_permission @@ -26,27 +26,8 @@ describe PoolsController do post :create, :pool => { :name => 'foopool' } end.should change(Pool, :count).by(1) id = Pool.find(:first, :conditions => ['name = ?', 'foopool']).id - response.should redirect_to("http://test.host/pools/#%7Bid%7D") + response.should redirect_to(resources_pool_path(id)) end
- it "should provide ui to view hardware profiles" do - UserSession.create(@admin) - pool = Factory :tpool - - get :hardware_profiles, :id => pool.id - response.should be_success - assigns[:hardware_profiles].size.should == pool.hardware_profiles.size - response.should render_template("hardware_profiles") - end - - it "should provide ui to view realms" do - UserSession.create(@admin) - pool = Factory :tpool - - get :realms, :id => pool.id - response.should be_success - assigns[:realm_names].size.should == pool.realms.size - response.should render_template("realms") - end
end diff --git a/src/spec/controllers/provider_controller_spec.rb b/src/spec/controllers/provider_controller_spec.rb index 49a45a8..0b4661d 100644 --- a/src/spec/controllers/provider_controller_spec.rb +++ b/src/spec/controllers/provider_controller_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper'
-describe ProvidersController do +describe Admin::ProvidersController do
fixtures :all before(:each) do @@ -14,20 +14,20 @@ describe ProvidersController do UserSession.create(@admin) provider = @admin_permission.permission_object
- get :hardware_profiles, :id => provider.id + get :show, :id => provider.id, :details_tab => 'hw_profiles' response.should be_success assigns[:hardware_profiles].size.should == provider.hardware_profiles.size - response.should render_template("hardware_profiles") + response.should render_template("admin/providers/_hw_profiles") end
it "should provide ui to view realms" do UserSession.create(@admin) provider = @admin_permission.permission_object
- get :realms, :id => provider.id + get :show, :id => provider.id, :details_tab => 'realms' response.should be_success assigns[:realm_names].size.should == provider.realms.size - response.should render_template("realms") + response.should render_template("admin/providers/_realms") end
diff --git a/src/spec/controllers/templates_controller_spec.rb b/src/spec/controllers/templates_controller_spec.rb index 0ead1b0..65bb26c 100644 --- a/src/spec/controllers/templates_controller_spec.rb +++ b/src/spec/controllers/templates_controller_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper'
-describe TemplatesController do +describe ImageFactory::TemplatesController do
fixtures :all before(:each) do @@ -15,7 +15,7 @@ describe TemplatesController do lambda do post :create, :tpl => { :name => 'template', :platform => 'fedora' } end.should change(Template, :count).by(1) - response.should redirect_to(templates_path) + response.should redirect_to(image_factory_templates_path) end
it "should deny access to new template ui without image modify permission" do diff --git a/src/spec/controllers/users_controller_spec.rb b/src/spec/controllers/users_controller_spec.rb index f9a3dde..90b161b 100644 --- a/src/spec/controllers/users_controller_spec.rb +++ b/src/spec/controllers/users_controller_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper'
-describe UsersController do +describe Admin::UsersController do
before(:each) do @tuser = Factory :tuser @@ -24,7 +24,7 @@ describe UsersController do :password_confirmation => "testpass" } end.should change(User, :count).by(1)
- response.should redirect_to(dashboard_url) + response.should redirect_to(root_path) end
it "fails to create pool" do @@ -53,7 +53,7 @@ describe UsersController do :password_confirmation => "testpass" } end.should change(User, :count)
- response.should redirect_to(users_url) + response.should redirect_to(admin_users_url) end
it "should not allow a regular user to create user" do @@ -84,16 +84,7 @@ describe UsersController do UserSession.create(@tuser) put :update, :id => @tuser.id, :user => {}, :commit => 'Save'
- response.should redirect_to(dashboard_path) + response.should redirect_to(root_path) end
- # checks whether proper error template is rendered when an exception raises - # "layouts/error" template should be displayed for all non-ajax error - # responses, "layouts/popup-error" should be displayed for ajax - # (see "Fixed error handling" patch for details) - it "should render error template when getting nonexisting user" do - UserSession.create(@tuser) - get :show, :id => "unknown_id" - response.should render_template("layouts/error") - end end
From: Tomas Sedovic tsedovic@redhat.com
This fixes all the failing tests and takes care of a few sensible renames (e.g. newui.haml -> application.haml). --- src/app/controllers/admin/providers_controller.rb | 3 + src/app/controllers/admin/users_controller.rb | 10 +- src/app/controllers/application_controller.rb | 8 +- .../controllers/image_factory/builds_controller.rb | 2 +- .../image_factory/templates_controller.rb | 4 +- src/app/controllers/user_sessions_controller.rb | 4 - src/app/helpers/providers_helper.rb | 2 +- src/app/stylesheets/application.scss | 1391 +++++++++++++++++++ src/app/stylesheets/newui.scss | 1398 -------------------- src/app/views/image_factory/templates/_list.haml | 2 +- .../views/image_factory/templates/_metagroups.haml | 2 +- src/app/views/layouts/_header.haml | 2 +- src/app/views/layouts/aggregator.haml | 53 - src/app/views/layouts/application.haml | 52 + src/app/views/layouts/newui.haml | 52 - src/app/views/resources/deployments/_list.haml | 4 +- src/app/views/user_sessions/new.haml | 4 +- src/config/navigation.rb | 26 + src/config/new_navigation.rb | 26 - src/config/routes.rb | 30 +- 20 files changed, 1494 insertions(+), 1581 deletions(-) create mode 100644 src/app/stylesheets/application.scss delete mode 100644 src/app/stylesheets/newui.scss delete mode 100644 src/app/views/layouts/aggregator.haml create mode 100644 src/app/views/layouts/application.haml delete mode 100644 src/app/views/layouts/newui.haml create mode 100644 src/config/navigation.rb delete mode 100644 src/config/new_navigation.rb
diff --git a/src/app/controllers/admin/providers_controller.rb b/src/app/controllers/admin/providers_controller.rb index 0490af8..95c9561 100644 --- a/src/app/controllers/admin/providers_controller.rb +++ b/src/app/controllers/admin/providers_controller.rb @@ -30,6 +30,9 @@ class Admin::ProvidersController < ApplicationController def show load_providers @provider = Provider.find(params[:id]) + @hardware_profiles = @provider.hardware_profiles + @realm_names = @provider.realms.collect { |r| r.name } + @url_params = params.clone require_privilege(Privilege::VIEW, @provider) @tab_captions = ['Properties', 'HW Profiles', 'Realms', 'Provider Accounts', 'Services','History','Permissions'] diff --git a/src/app/controllers/admin/users_controller.rb b/src/app/controllers/admin/users_controller.rb index 58aabf8..4635f41 100644 --- a/src/app/controllers/admin/users_controller.rb +++ b/src/app/controllers/admin/users_controller.rb @@ -1,5 +1,5 @@ class Admin::UsersController < ApplicationController - before_filter :require_user + before_filter :require_user, :except => [:new, :create] before_filter :load_users, :only => [:show]
def index @@ -37,12 +37,12 @@ class Admin::UsersController < ApplicationController render :action => 'new' and return end
- if current_user + if current_user != @user flash[:notice] = "User registered!" redirect_to admin_users_url else flash[:notice] = "You have successfully registered!" - redirect_to dashboard_url + redirect_to root_url end end
@@ -78,13 +78,13 @@ class Admin::UsersController < ApplicationController redirect_to edit_admin_user_url(@user) and return end
- redirect_to dashboard_url and return unless @user + redirect_to root_url and return unless @user
unless @user.update_attributes(params[:user]) render :action => 'edit' and return else flash[:notice] = "User updated!" - redirect_to (@user == current_user) ? dashboard_url : admin_users_url + redirect_to (@user == current_user) ? root_url : admin_users_url end end
diff --git a/src/app/controllers/application_controller.rb b/src/app/controllers/application_controller.rb index bd1c070..a720939 100644 --- a/src/app/controllers/application_controller.rb +++ b/src/app/controllers/application_controller.rb @@ -27,7 +27,7 @@ class ApplicationController < ActionController::Base filter_parameter_logging :password, :password_confirmation helper_method :current_user_session, :current_user
- layout 'newui' + layout 'application'
# General error handlers, must be in order from least specific # to most specific @@ -36,10 +36,6 @@ class ApplicationController < ActionController::Base rescue_from ActionError, :with => :handle_action_error rescue_from PartialSuccessError, :with => :handle_partial_success_error
- def section_id - 'generic' - end - helper_method :check_privilege
protected @@ -93,7 +89,7 @@ class ApplicationController < ActionController::Base render :template => 'layouts/popup-error', :layout => 'popup', :locals => {:title => title, :errmsg => msg} else - render :template => 'layouts/error', :layout => 'newui', + render :template => 'layouts/error', :layout => 'application', :locals => {:title => title, :errmsg => msg} end end diff --git a/src/app/controllers/image_factory/builds_controller.rb b/src/app/controllers/image_factory/builds_controller.rb index a2018bc..13cfd7b 100644 --- a/src/app/controllers/image_factory/builds_controller.rb +++ b/src/app/controllers/image_factory/builds_controller.rb @@ -7,7 +7,7 @@ class ImageFactory::BuildsController < ApplicationController check_permission if @tpl.imported flash[:warning] = "Build imported template is not supported" - redirect_to templates_path + redirect_to image_factory_templates_path end @all_targets = Image.available_targets end diff --git a/src/app/controllers/image_factory/templates_controller.rb b/src/app/controllers/image_factory/templates_controller.rb index 58caecd..9c56b0c 100644 --- a/src/app/controllers/image_factory/templates_controller.rb +++ b/src/app/controllers/image_factory/templates_controller.rb @@ -105,6 +105,8 @@ class ImageFactory::TemplatesController < ApplicationController params[:package_search]).paginate(:page => @page, :per_page => 60) if request.xhr? render :partial => 'search_packages' + else + render 'search_packages' end end
@@ -118,7 +120,7 @@ class ImageFactory::TemplatesController < ApplicationController end
def collections - unless params[:package_search].blank? + if params[:package_search_button] search_packages return end diff --git a/src/app/controllers/user_sessions_controller.rb b/src/app/controllers/user_sessions_controller.rb index 3e4e8f0..625531b 100644 --- a/src/app/controllers/user_sessions_controller.rb +++ b/src/app/controllers/user_sessions_controller.rb @@ -23,10 +23,6 @@ class UserSessionsController < ApplicationController before_filter :require_no_user, :only => [:new, :create] before_filter :require_user, :only => :destroy
- def section_id - "loginpage" - end - def new @user_session = UserSession.new end diff --git a/src/app/helpers/providers_helper.rb b/src/app/helpers/providers_helper.rb index cfc12b7..3c0d348 100644 --- a/src/app/helpers/providers_helper.rb +++ b/src/app/helpers/providers_helper.rb @@ -2,7 +2,7 @@ module ProvidersHelper
def edit_button(provider, action) if provider and action == 'show' - link_to 'Edit', edit_provider_path(provider), :class => 'button', :id => 'edit_button' + link_to 'Edit', edit_admin_provider_path(provider), :class => 'button', :id => 'edit_button' else content_tag('a', 'Edit', :href => '#', :class => 'button disabled') end diff --git a/src/app/stylesheets/application.scss b/src/app/stylesheets/application.scss new file mode 100644 index 0000000..01b6ada --- /dev/null +++ b/src/app/stylesheets/application.scss @@ -0,0 +1,1391 @@ +@charset "UTF-8"; +@import "base"; + +html { +} + +.selected { + color: orange; +} + +.hidden { + display: none; +} + +a { + color: $dcprimary; + text-decoration: none; + &:hover, &:focus { + color: lighten($dcprimary, 20%); + text-decoration: underline; + } + &:active { + color: darken($dcprimary, 20%); + } +} + +/* TEXT ENTRIES */ +input,textarea { + @include inset-box-shadow(0,1px,1px,rgba(0, 0, 0, 0.2)); + border: 1px solid darken($strokecl,20%); + background-color: #f0f0f0; + background: #f0f0f0 url(../../images/input-bg.png) repeat-x 0 0; + padding: 4px; + margin: 0; + &:focus { + border-width: 2px; + padding: 3px; + background-color: #fff; + outline: none; + } + &.disabled, &[disabled] { + opacity: 0.6; + } +} + input[type="search"] { + @include border-radius(20px); + padding: 4px 30px 4px 10px; + &:focus { + padding: 3px 29px 3px 9px; + } + } + /* CHECKBOXES and RADIOBUTTONS*/ + input[type="checkbox"],input[type="radio"] { + background-color: transparent; + border: none; + margin: 0; + padding: 2px; + &:focus { + border-width: 1px; + padding: 1px; + } + } + +/* FILE INPUT */ +input[type="file"] { + /* FIXME */ +} + +/* compensate grid_* for padding+border of the inputboxes and textareas */ +input.grid_1 { width: 30px !important; } +input.grid_2 { width: 90px !important; } + .grid_2 input[type="file"] { width: 90px; } +input.grid_3 { width: 150px !important; } + .grid_3 input[type="search"] { width: 118px; } + .grid_3 input[type="file"] { width: 150px; } +input.grid_4 { width: 210px !important; } +input.grid_5 { width: 270px !important; } +input.grid_6 { width: 330px !important; } +input.grid_7 { width: 390px !important; } +input.grid_8 { width: 450px !important; } + +/* BUTTONS */ +input[type='submit'],button,.button { + font-family: $screenfont; /* for some reason ff3.6 won't inherit from body */ + font-size: 10px; + display: inline-block; + background: -moz-linear-gradient(top, #f9f9f9, #f0f0f0, #e5e5e5, #e9e9e9); + background: -webkit-gradient(linear, left top, left bottom, from(#f9f9f9), color-stop(0.9, #e5e5e5), to(#e9e9e9)); + @include no-box-shadow; + border: 1px solid darken($strokecl, 20%); + color: #221e1f; + cursor: pointer; + margin: 4px; + padding: 4px 12px; + @include border-radius(5px); + @include text-shadow(0, 1px, 0, #fff); + min-height: 14px; + .nomargin { + margin: 0; + } + &:hover { + background: -moz-linear-gradient(top, #fff, #fff, #cfcfcf); + background: -webkit-gradient(linear, left top, left bottom, from(#fff), color-stop(0.6, #fff), to(#cfcfcf)); + @include box-shadow(0, 1px, 2px, rgba(0,0,0,0.5)); + text-decoration: none; + color: black; + } + &:active { + background: -moz-linear-gradient(top, #c2c3c0, #e4e5e4); + background: -webkit-gradient(linear, left top, left bottom, from(#c2c3c0), to(#e4e5e4)); + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + padding: 5px 12px 3px; + text-decoration: none; + } + &:focus { + text-decoration: none; + color: #000; + border-width: 2px; + padding: 3px 11px; + } + &.dialogbutton { + float: right; + margin-left: 3px; + margin: 40px 4px 4px; + } + &.formbutton { + display: inline-block; + margin-left: 3px; + margin: 40px 4px 4px; + float: left; + } + &.actionlink { + margin: 40px 0 0; + } + &.linkbutton { + background: none; + border:0; + margin:4px 4px 4px 5px; + color: $dcprimary; + text-decoration: none; + font:13px/1.5 "Liberation Sans","Droid Sans",Helvetica,Arial,sans-serif; + &:hover { + @include box-shadow(0, 0, 0, rgba(0,0,0,0)); + text-decoration: underline; + color: lighten($dcprimary,20%); + } + &:active { + color: darken($dcprimary, 20%); + font:13px/1.5 "Liberation Sans","Droid Sans",Helvetica,Arial,sans-serif; + margin:4px 4px 4px 5px; + } + } + &.disabled, &[disabled] { + cursor: default; + background: transparent; + opacity: 0.6; + /* @include no-box-shadow; */ + &:hover { + background: transparent; + text-decoration: none; + @include no-box-shadow; + } + } + &.iconbutton { + display: inline-block; + } + &.tiny { + padding: 4px; + margin: 0; + &:active, &:focus { + margin: 0; + padding: 3px; + } + } +} + +h1,h2,h3,h4,h5 { + text-transform: uppercase; + color: $headercl; + margin-top: 1em; + &:first-child { + margin-top: 0; + } +} + +h1 { font-size: 140%; } +h2 { font-size: 130%; } +h3 { + font-size: 120%; + &.gap { + margin: 3em 0 1em; + } +} +h4 { + font-size: 110%; + &.legend { + margin-bottom: 4px; + } +} +h5 { font-size: 80%; } + +.clear { + clear: both; +} + +.wrap { /* wrapper around floated elements */ + overflow: hidden; + margin-bottom: 2em; +} + +.nomargin { + margin: none; +} + +.la { text-align: left; } +.ra { text-align: right; } +.fr { float: right; } +.fl { float: left; } + +.twocolumn { + @include column-count(2); + @include column-gap(10px); +} + +.placeholder { margin-bottom: 2em; } +.disabled, a[href="#"] { opacity: 0.6; filter: alpha(opacity=60); cursor: default !important; } +.nomargin { margin: 0; } +.nowrap { white-space: nowrap; } +.gap { margin-bottom: 4em; } +.padforicon { + padding-right: 30px; + position: relative; +} +.pointercursor { cursor: pointer; } +.nospace { + margin: 0 !important; + padding: 0 !important; +} + +div,section,fieldset { + display: block; + overflow: hidden; /* force to wrap floats */ +} + +/* TABLES */ + +table { + border-collapse: collapse; + border: 1px solid $strokecl; + margin: 10px 0 40px; width: 100%; + font-size: 95%; + thead { + background-color: lighten($strokecl,8%); + th { + font-size: 95%; + padding: 2px 6px; + font-family: $headlinefont; + color: lighten($headercl,20%); + text-transform: uppercase; + border-right: 1px dotted darken($strokecl,20%); + &.active { + &.desc { + background: #fff url(../../images/order-desc.png) no-repeat center right; + } + &.asc { + background: #fff url(../../images/order-asc.png) no-repeat center right; + } + } + &.show { + border: 0px; + width: 50% + } + a, a:hover, a:active { + display: block; + margin: 0; + color: inherit; + text-decoration: none; + } + } + } + td { + padding: 4px; + vertical-align: top; + min-height: 16px; + } + &.noborder { + border: none; + thead { + background-color: transparent; + th { + border: none; + span { + color: lighten($headercl,30%); + } + } + } + td { + color: #888; + &.graph { + width: 102px; + height: 4em; + } + .percentBlock { + display: block; + border:1px solid #909090; + padding: 0; + width:100px; + font-size: 9px; + text-align: center; + color: #555; + .percentBlockInner { + } + .good { + background-color: $goodcl; + @include gradient-2p-linear(lighten($goodcl,30%),$goodcl); + } + .ok { + background-color: $okcl; + @include gradient-2p-linear(lighten($okcl,30%),$okcl); + } + .bad { + background-color: $badcl; + @include gradient-2p-linear(lighten($badcl,30%),$badcl); + } + } + .min { + background: url(../../images/arrow-min.png) no-repeat top center; + float:left; + padding-top:5px; + width:50px; + } + .max { + background: url(../../images/arrow-max.png) no-repeat top center; + float:left; + padding-top:5px; + width:50px; + } + } + } + &.gap { + margin-bottom: 7em; + } +} + +.action { + background: url(../../images/icons/action-icons.png) no-repeat 0 0; + &:hover { + background: url(../../images/icons/action-icons.png) no-repeat 0 0; + } + &:active { + background: url(../../images/icons/action-icons.png) no-repeat 0 0; + } +} +input[type='submit'].icon { + border: none; + background: transparent; + font-size: 100%; + padding: 0; + &:hover { + @include no-box-shadow; + color: $dcprimary; + &[disabled] { + color: #000; + } + } +} + +.actionsidebar { + border-right: 1px solid darken($footerbg, 10%); + width: 159px !important; + dt { + background-color: $footerbg; + border-bottom: 1px solid darken($footerbg, 10%); + border-top: 1px solid darken($footerbg, 10%); + color: $headercl; + font-family: $headlinefont; + font-size: 110%; + margin: 3px 0 20px; + padding:14px 10px 12px; + text-transform: uppercase; + } + dd { + margin: 0 0 0 10px; + font-size: 110%; + position: relative; + a { + display: block; + padding: 4px 4px 4px 20px; + &.selected { + background: url("../../images/actionsidebar-bullet.png") no-repeat left center; + font-weight: bold; + color: $dcprimary; + } + } + h5 { + margin: 3em 0 .5em 0; + &:first-child { + margin: 0 0 .5em 0; + } + } + ul { + display: block; + li { + display: block; + margin: 0; + padding: 0 0 0 16px; + position: relative; + } + } + } + form.buttononly { + display: inline-block; + } + span { + display: block; + position: absolute; + width: 16px; height: 16px; + left: 0; top: 50%; margin-top: -8px; + background: url(../../images/icons/action-icons.png) no-repeat 0 0; + } + .edit span { background-position: -16px 0;} + .delete span { background-position: -32px 0;} + .rename span { background-position: -80px 0;} + .copy span { background-position: -48px 0;} + .build span { background-position: -64px 0;} + .add span { background-position: -48px 0;} + .clear span { background-position: -160px 0;} + .start span { background-position: -176px 0;} + .stop span { background-position: -192px 0;} + .snapshot span { background-position: -208px 0;} + .grantaccess span { background-position: -224px 0;} + .request_help span { background-position: -240px 0;} + .info span { background-position: -256px 0;} + .restart span { background-position: -272px 0;} + .shutdown span { background-position: -288px 0;} + .console span { background-position: -304px 0;} + .VD span { background-position: -320px 0;} + label { + font-weight: normal; + } +} + + +.searchedpackages, .collections { + display: block; + margin: 0 2em 2em 0; + @include column-count(3); + li { + display: block; + margin: 0; + label { + font-weight: normal; + } + } +} + +/* ICONS */ + +img.icon { + width: 16px; height: 16px; + vertical-align: middle; + background: url(../../images/icons/statusicons.png) no-repeat 0 0; + &.large { + width: 48px; height: 16px; + } + &.yes { background-position: -16px 0; } + &.no { background-position: -32px 0; } + &.platform { + background: url(../../images/icons/platformicons.png) no-repeat 0 0; + &.rhel { + background-position: 0 0; + } + } +} + +#notification { + &>div { + padding: 10px; + @include border-radius(5px); + margin-bottom: 2em; + ul { + display: block; + margin: 0; + li { + display: block; + margin: 0; + } + } + } + .success { + background-color: lighten($goodcl,45%); + border: 1px solid lighten($goodcl,20%); + } + .error, .warning { + background-color: lighten($badcl,45%); + border: 1px solid lighten($badcl,20%); + } + .close { + display: block; + position: absolute; + width: 16px; height: 16px; + top: 0; right: 0; + background: url(../../images/icons/close.png) no-repeat 0 0; + cursor: pointer; + } +} + +ul.block { + display: block; + margin: 0; + li { + display: block; + margin: 0; + } +} + +#head { + background-color: $headerbg; + border-bottom: 2px solid desaturate(lighten($headerbg,30%),50%); + overflow: hidden; + header { + display: block; + h1 { + text-transform: uppercase; + font-size: 110%; + color: #fff; + margin: 2px 0 0; + padding: 6px 0 4px 54px; + background: url(../../images/rh_logo.png) no-repeat 10px center; + position: relative; + float: left; + img.dc { + position: absolute; + left: 43px; + top: 7px; + } + } + ul { + display: block; + float: right; + margin: 0 10px 0 0; + padding: 8px 0 0; + li { + display: inline-block; + margin: 0 5px; + &.hello { + margin-left: 30px; + } + a { + color: #fff; + } + } + } + } +} + +#subheader { + background: lighten($headerbg,50%) url(../../images/subheader-shade.png) repeat-x 0 0; + position: relative; + height: 50px; + #s { + font-size: 80%; + text-align: right; + overflow: hidden; + padding: 10px 0 0; + p { + margin: 0; + } + div { + position: relative; + margin-bottom: 0; + button { + position: absolute; + width: 16px; height: 16px; + text-indent: -200em; + right: 8px; top: 50%; + margin: -8px 0 0; + background-position: 0 0; + border: none; + padding: 0; + &:hover { + box-shadow: none; + -webkit-shadow: none; + -moz-box-shadow: none; + } + } + input[type="search"] { + border-color: $headerbg; + width: 80%; + } + } + a { + color: #fff; + margin-right: 10px; + } + } + hr { /* stroke on the bottom to be overdrawn by tabs */ + position: absolute; + display: block; + margin: 0; + left: 0; right: 0; bottom: 0; + height: 1px; + color: #9F9F9F; + background-color: #9F9F9F; + z-index: 1; + border-style: none; + } +} + +nav { + display: block; + overflow: hidden; + z-index: 2; + position: absolute; + bottom: 0; left: 0; right: 0; + &>ul { /* groups -- operation, administration ... */ + display: block; + &>li { + display: block; + float: left; + margin: 0 9px; + &>a { /* group labels */ + display: block; + cursor: default; + color: white; + font-weight: normal; + text-transform: uppercase; + font-family: $headlinefont; + &:hover, &:active { + color: desaturate(lighten($headerbg,50%),50%); + text-decoration: none; + } + } + &.selected>ul { /* generic selected tabs */ + background-color: #fff; + border-bottom: 1px solid #fff; + } + &.runtime>ul>li { + max-width: 90px; + } + &>ul { /* generic background tabs */ + display: block; + margin: 0; + background-color: #ddd; + overflow: hidden; + border-left: 1px solid #9F9F9F; + border-right: 1px solid #9F9F9F; + border-bottom: 1px solid #9F9F9F; + li { /* tab items */ + font-size: 95%; + margin: 0; padding: 10px 8px 6px; + text-align: center; + font-family: $screenfont; + font-weight: bold; + display: block; + float: left; + max-width: 70px; + a { + display: table-cell; + vertical-align: middle; + height: 38px; /* easy click targets */ + color: #888; + padding: 2px 6px; margin: 0; + } + &.selected { + a { + color: #000; + } + } + &.disabled { + a { + color: #aaa; + cursor: default; + &:hover { + text-decoration: none; + } + } + } + } + } + } + } + + #help { + float: right; + margin-right: 10px; + a { + display: block; + color: #fff; + cursor: pointer; + width: 48px; height: 37px; + margin: 20px 0 0; + background: url(../../images/help-bubble.png) no-repeat 0 0; + text-align: center; + padding: 8px 0 0; + } + &.disabled a { + cursor: default !important; + } + } + + &.subnav { /* subnavigation */ + position: relative; + background: #888 url(../../images/subnav-bg.png) repeat-x 0 0; /* fallback */ + border-top: 3px solid #fff; + border-bottom: 1px solid #666; + overflow: visible; + min-height: 6px; + &>ul { + /* + position: absolute; + top: 0; left: 0; right: 0; + */ + width: 960px; + margin: 0 auto; + padding: 4px; + overflow: visible; + height: 22px; + li { + a { + height: 20px; + cursor: pointer; + font-family: $screenfont; + text-transform: none; + display: inline-block; + color: #fff; + margin: 2px 6px; + &.selected { + @include text-shadow(0,2px,2px,rgba(0,0,0,0.9)); + height: 30px; + background: url(../../images/selected-subnav.png) no-repeat bottom center; + } + } + } + } + } + &.subsubnav { /* in page tabs */ + position: static; + overflow: hidden; + bottom: inherit; + left: inherit; + right: inherit; + margin-bottom: 2em; + &>ul { + display: block; + li { + display: block; + float: left; + a { + cursor: pointer; + font-family: $screenfont; + text-transform: none; + font-weight: normal; + color: black; + display: block; + padding: 6px; margin-right: 10px; + &.selected { + color: #fff; + background-color: $dcprimary; + @include border-radius(5px); + } + } + } + } + } +} + + /* color coding for the subnav */ + #operation .subnav { background-color: $operationbg; } + #operation nav>ul>li>ul>li>a.selected { color: $operationbg; } + #administration .subnav, + #system_settings .subnav, + #loginpage .subnav { background-color: $administrationbg; } + #administration nav>ul>li>ul>li>a.selected, + #system_settings nav>ul>li>ul>li>a.selected, + #loginpage nav>ul>li>ul>li>a.selected { color: $administrationbg; } + #build .subnav { background-color: $buildbg; } + #build nav>ul>li>ul>li>a.selected { color: $buildbg; } + #runtime .subnav { background-color: $runtimebg; } + #runtime nav>ul>li>ul>li>a.selected { color: $runtimebg; } + #operation .subnav>ul>li a.selected { background: url(../../images/selected-subnav-op.png) no-repeat bottom center; } + #administration .subnav>ul>li a.selected, + #system_settings .subnav>ul>li a.selected, + #loginpage .subnav>ul>li a.selected + { background: url(../../images/selected-subnav-ad.png) no-repeat bottom center; } + #build .subnav>ul>li a.selected { background: url(../../images/selected-subnav-bu.png) no-repeat bottom center; } + #runtime .subnav>ul>li a.selected { background: url(../../images/selected-subnav-ru.png) no-repeat bottom center; } + +/* image backgrounds for tabs */ +li.operation>ul, li.administration>ul, li.build>ul, li.runtime>ul { + background: #ddd url(../../images/tab-bg.png) repeat-x 0 0; +} + li.operation.selected>ul { background-position: 0 -140px; } + li.operation>ul { background-position: 0 -210px; } + li.administration.selected>ul { background-position: 0 -420px; } + li.administration>ul { background-position: 0 -490px; } + li.build.selected>ul { background-position: 0 -280px; } + li.build>ul { background-position: 0 -350px; } + li.runtime.selected>ul { background-position: 0 0; } + li.runtime>ul { background-position: 0 -70px; } + + + +.modalbox { + margin: 150px auto; + @include box-shadow(0,1px,5px,rgba(0, 0, 0, 0.6)); + width: 550px; + overflow: hidden; + h2 { + background-color: $formheadbg; + color: $formheadfg; + text-transform: uppercase; + font-size: 120%; + padding: 10px; + } + .dcloud_form { + margin: 40px; + overflow: hidden; + } + .errorExplanation { + h2 { + text-transform: none; + } + } +} + +#content { + position: absolute; + top: 100px; + bottom: 100px; + left: 1em; + right: 1em; + overflow: hidden; +} + +/* FORMS */ +/* generic */ +label { + text-align: right; + font-weight: bold; + &.header { + text-align: left; + font-weight: normal; + font-size: 90%; + margin-bottom: 1em; + } + &.big { + text-align: left; + text-transform: uppercase; + font-family: $headlinefont; + font-size: 110%; + font-weight: normal; + color: $formheadfg; + } +} + +legend { + font-size: 130%; + font-family: $headlinefont; + font-weight: bold; + text-transform: uppercase; + color: $headercl; +} + +fieldset.gap { + margin-bottom: 7em; +} + +.fieldWithErrors { + border: 0; margin: 0; padding: 0; + overflow: visible; + input { + background-color: lighten($errorcl, 45%); + color: $errorcl; + } + label { + color: $errorcl; + } +} + +.pagination { + font-size: 90%; + text-align: right; + .disabled { + display: none; + } + input { + display: inline-block; + text-align: center; + background: none; + border: 1px solid $strokecl; + width: 18px; padding: 3px; margin-right: 4px; + @include border-radius(0); + &.prev_page, &.next_page { + width: 54px; + &:active, &:hover, &:focus { /* behave like links, not buttons */ + width: 54px; + } + } + &:active, &:hover, &:focus { /* behave like links, not buttons */ + text-align: center; + background: none; + @include no-box-shadow(); + width: 18px; padding: 3px; margin-right: 4px; + } + } + .current { + text-align: center; + display: inline-block; + width: 22px; + border: none; + font-weight: bold; + } +} + +.pageinfo { + float: left; +} + +/* simple two column label + input pairs */ +.dcloud_form { + fieldset { + overflow: hidden; + margin: 10px 0 0; + text-align: left; + label { + display: inline-block; + font-weight: bold; + padding: 4px 0 0 0; + } + input[type='text'], input[type='password'], textarea { + display: inline-block; + width: 20em; + } + } + .indented { + margin: 10px 0 0; + text-align: right; + input[type="text"],label,a,div,p { + text-align: left; + display: inline-block; + width: 20em; + } + } +} + +/* search forms */ + +.search { + position: relative; + button { + position: absolute; + width: 16px; height: 16px; + text-indent: -200em; + right: 8px; top: 50%; + margin: -8px 0 0; + background-position: 0 0; + border: none; + padding: 0; + &:hover { + box-shadow: none; + -webkit-shadow: none; + -moz-box-shadow: none; + } + } + input[type="search"] { + float: right; /* webkit adds an extra padding and makes the widget narrower */ + } +} +/* WIZARD TILES */ + +ul.tiles { + overflow: hidden; + margin: 2em 0 0; + li.grid_8 { + margin-bottom: 30px; + padding-left: 60px; + width: 400px !important; + position: relative; + img { + position: absolute; + background: url(../../images/icons/config-icons.png) no-repeat 0 0; + width: 48px; height: 48px; + top: 0; left: 0; + } + } + button, a.button { + float: right; + } + .disabled { + opacity: 0.6; + button { + pointer: default; + } + } +} + +/* CONFIG PANE ICONS */ + + #settings { + img { background-position: 0 -48px; } + &.disabled { + img { background-position: 0 0; } + } + } + #locales { + img { background-position: -48px -48px; } + &.disabled { + img { background-position: -48px 0; } + } + } + #users { + img { background-position: -144px -48px; } + &.disabled { + img { background-position: -144px 0; } + } + } + #providers { + img { background-position: -96px -48px; } + &.disabled { + img { background-position: -96px 0; } + } + } + #permissions { + img { background-position: -288px -48px; } + &.disabled { + img { background-position: -288px 0; } + } + } + #hardware { + img { background-position: -240px -48px; } + &.disabled { + img { background-position: -240px 0; } + } + } + #services { + img { background-position: -192px -48px; } + &.disabled { + img { background-position: -192px 0; } + } + } + +/* GRAPHS */ + +.graphkey { + li { + padding: 2px 4px 2px 32px; + background: url(../../images/graph-key.png) no-repeat 0 0; + height: 18px; overflow: hidden; + } + .instances { background-position: 0 0; } + .requests { background-position: 0 -18px; } + .ttl { background-position: 0 -36px; } + .failures { background-position: 0 -54px; } + .retries { background-position: 0 -72px; } +} + +footer { + font-size: 90%; + margin: 10px 0 0; + padding: 10px; + display: block; + background: $footerbg url(../../images/footer-shade.png) repeat-x 0 0; + ul { + display: block; + padding: 10px 10px 0 0; + min-height: 50px; + li { + display: block; + float: right; + } + } + + &.fixed { + position: absolute; + bottom: 0; left: 0; right: 0; + } +} + +/* RIGHT SIDEBAR */ +.sidebarcontainer { + /* height: 300px; overflow: scroll; */ + display: block; + li { + display: block; + margin: 0; + } + h5 { + text-transform: none; + margin-top: 3em; + } +} + +/* PAGE SPECIFIC */ + +/* GRINDS */ +.status,.capacity { + span { + display: inline-block; + width: 10px; + height: 10px; + background: url(../../images/icons/status.png) no-repeat 0 0; + &.good { + background-position: 0 0; + } + &.ok { + background-position: 0 -10px; + } + &.bad { + background-position: 0 -20px; + } + } +} + +/* INSTANCE MANAGEMENT */ +.poolname { + h4 { + float: left; + margin: 10px 0 0; + } +} + +.poolfilter { + margin: 10px 0 0; + label { + font-weight: normal; + margin-right: 1em; + } +} + +a.iconbutton { + padding: 4px 4px 4px 24px; + position: relative; + overflow: hidden; + @include border-radius(2px); + &:active { + padding: 4px 4px 4px 24px; + } + &:focus { + padding: 3px 3px 3px 23px; + } + img { + position: absolute; + width: 18px; + height: 54px; + left: 0; top: 50%; + margin-top: -27px; + background: url(../../images/icons/launchinstance.png) no-repeat 0 0; + } +} + +/* TEMPLATES */ + +#build { + #add_software_button { + margin-top: 2em; + font-size: 140%; + } + + #package_selection_list { + display: block; + overflow: auto; + margin-top: 2em; + &.loading { + display: block; + height: 100px; + background: url(../../images/spinner.gif) no-repeat center center; + } + &>.grid_16 { + margin: 0; + } + } + + #metagrouppackages { + &.loading { + display: block; + height: 100px; + background: url(../../images/spinner.gif) no-repeat center center; + } + } + + span.loading { + background: url(../../images/spinner.gif) no-repeat center left; + display: inline-block; + padding: 6px 0 6px 24px; + } + .packagewrap { + position: relative; + float: left; + padding: 4px 22px 4px 4px; + margin: 2px; + @include border-radius(4px); + .remove_package { + position: absolute; + width: 16px; height: 16px; + top: 50%; right: 4px; + border: none; + background: url(../../images/icons/action-icons.png) no-repeat -32px 0 !important; + text-indent: -200em; + padding: 0; margin: -8px 0; + @include border-radius(2px); + &:hover { + @include no-box-shadow(); + background: lighten($dcprimary,10%) url(../../images/icons/action-icons.png) no-repeat -32px 0 !important; + } + } + .packagename { + cursor: pointer; + &:hover { + color: white; + } + } + &.selected { + color: white; + background-color: $dcprimary; + .packagename { + color: white; + } + } + &:hover { + color: white; + background-color: $dcprimary; + .packagename { + color: white; + } + } + } + + .packagegroupsidebar { + float: left; + padding-right: 20px; + display: block; + text-align: right; + font-size: 120%; + li { + display: block; + margin: 0; + } + .icon { + text-transform: capitalize; + } + } + #collections { + margin: 0 0 1em; + font-weight: bold; + } + + .metagrouppackages { + display: block; + &>li { + display: block; + text-transform: uppercase; + margin: 0 2em 2em 0; padding: 0; + label { + cursor: pointer; + } + ul { + @include column-count(3); + display: block; + text-transform: none; + font-size: 95%; + li { + display: block; + margin: 0 0 0 4px; + text-transform: capitalize; + label { + font-weight: normal; + } + } + } + } + } +} + #dropdown { + position: absolute; + background-color: white; + border: 1px solid $dcprimary; + @include border-radius-bottom(4px); + padding: 1em; + display: none; + z-index: 2; + font-size: 95%; + } + +/* IE and other horror browser workarounds */ + +/* basic image styling for buttons in older browsers */ +.no-cssgradients input[type='submit'], .no-cssgradients button, .no-cssgradients .button { + + /* FIXME image based buttons */ +} + +/* when modalbox miss dropshadow set some border */ +.no-boxshadow .modalbox { border: 2px solid $strokecl; } + + +/* jQuery UI tabs overrides */ + +.ui-widget-content { border: none; } +.ui-tabs { + margin-bottom: 1em; + .ui-widget-header { + font-size: 90%; + background: transparent; + border: none; + } + .ui-state-default { + background: transparent; + border: none; + } + .ui-state-active { + background-color: $dcprimary; + @include border-radius(5px); + &>a { + color: #fff; + } + } +} + +#saved-searches { + position: absolute; + left: 0.2em; + top: 1em; + bottom: 1em; + width: 13em; + +} + + +$details-height: 190px; +$content-left: 180px; + +#list-view { + border: 1px solid; + padding: 1em; + position: absolute; + top: 1em; + left: $content-left; + right: 0; + overflow: auto; + &.part { + bottom: $details-height + 30px; + } + &.full { + bottom: 1em; + } +} + +#object-actions { + position: relative; + float: left; + width: 100%; +} + +#search-actions { + position: relative; + float: right; +} + +#selections { + position: relative; + float: left; +} + +#list { + float: left; + width: 100%; +} + +#details-view { + border: 1px solid; + position: absolute; + left: $content-left; + right: 0; + height: $details-height; + bottom: 0; + padding: 0; + overflow-y:scroll; +} + +/* DEBUG GRID */ +#grid { + display: none; + position: fixed; + top: 0; bottom: 0; + left: 50%; + width: 1020px; + margin-left: -510px; +} diff --git a/src/app/stylesheets/newui.scss b/src/app/stylesheets/newui.scss deleted file mode 100644 index d0fbcc9..0000000 --- a/src/app/stylesheets/newui.scss +++ /dev/null @@ -1,1398 +0,0 @@ -@charset "UTF-8"; -@import "base"; - -html { -} - -.selected { - color: orange; -} - -.hidden { - display: none; -} - -a { - color: $dcprimary; - text-decoration: none; - &:hover, &:focus { - color: lighten($dcprimary, 20%); - text-decoration: underline; - } - &:active { - color: darken($dcprimary, 20%); - } -} - -/* TEXT ENTRIES */ -input,textarea { - @include inset-box-shadow(0,1px,1px,rgba(0, 0, 0, 0.2)); - border: 1px solid darken($strokecl,20%); - background-color: #f0f0f0; - background: #f0f0f0 url(../../images/input-bg.png) repeat-x 0 0; - padding: 4px; - margin: 0; - &:focus { - border-width: 2px; - padding: 3px; - background-color: #fff; - outline: none; - } - &.disabled, &[disabled] { - opacity: 0.6; - } -} - input[type="search"] { - @include border-radius(20px); - padding: 4px 30px 4px 10px; - &:focus { - padding: 3px 29px 3px 9px; - } - } - /* CHECKBOXES and RADIOBUTTONS*/ - input[type="checkbox"],input[type="radio"] { - background-color: transparent; - border: none; - margin: 0; - padding: 2px; - &:focus { - border-width: 1px; - padding: 1px; - } - } - -/* FILE INPUT */ -input[type="file"] { - /* FIXME */ -} - -/* compensate grid_* for padding+border of the inputboxes and textareas */ -input.grid_1 { width: 30px !important; } -input.grid_2 { width: 90px !important; } - .grid_2 input[type="file"] { width: 90px; } -input.grid_3 { width: 150px !important; } - .grid_3 input[type="search"] { width: 118px; } - .grid_3 input[type="file"] { width: 150px; } -input.grid_4 { width: 210px !important; } -input.grid_5 { width: 270px !important; } -input.grid_6 { width: 330px !important; } -input.grid_7 { width: 390px !important; } -input.grid_8 { width: 450px !important; } - -/* BUTTONS */ -input[type='submit'],button,.button { - font-family: $screenfont; /* for some reason ff3.6 won't inherit from body */ - font-size: 10px; - display: inline-block; - background: -moz-linear-gradient(top, #f9f9f9, #f0f0f0, #e5e5e5, #e9e9e9); - background: -webkit-gradient(linear, left top, left bottom, from(#f9f9f9), color-stop(0.9, #e5e5e5), to(#e9e9e9)); - @include no-box-shadow; - border: 1px solid darken($strokecl, 20%); - color: #221e1f; - cursor: pointer; - margin: 4px; - padding: 4px 12px; - @include border-radius(5px); - @include text-shadow(0, 1px, 0, #fff); - min-height: 14px; - .nomargin { - margin: 0; - } - &:hover { - background: -moz-linear-gradient(top, #fff, #fff, #cfcfcf); - background: -webkit-gradient(linear, left top, left bottom, from(#fff), color-stop(0.6, #fff), to(#cfcfcf)); - @include box-shadow(0, 1px, 2px, rgba(0,0,0,0.5)); - text-decoration: none; - color: black; - } - &:active { - background: -moz-linear-gradient(top, #c2c3c0, #e4e5e4); - background: -webkit-gradient(linear, left top, left bottom, from(#c2c3c0), to(#e4e5e4)); - box-shadow: none; - -webkit-box-shadow: none; - -moz-box-shadow: none; - padding: 5px 12px 3px; - text-decoration: none; - } - &:focus { - text-decoration: none; - color: #000; - border-width: 2px; - padding: 3px 11px; - } - &.dialogbutton { - float: right; - margin-left: 3px; - margin: 40px 4px 4px; - } - &.formbutton { - display: inline-block; - margin-left: 3px; - margin: 40px 4px 4px; - float: left; - } - &.actionlink { - margin: 40px 0 0; - } - &.linkbutton { - background: none; - border:0; - margin:4px 4px 4px 5px; - color: $dcprimary; - text-decoration: none; - font:13px/1.5 "Liberation Sans","Droid Sans",Helvetica,Arial,sans-serif; - &:hover { - @include box-shadow(0, 0, 0, rgba(0,0,0,0)); - text-decoration: underline; - color: lighten($dcprimary,20%); - } - &:active { - color: darken($dcprimary, 20%); - font:13px/1.5 "Liberation Sans","Droid Sans",Helvetica,Arial,sans-serif; - margin:4px 4px 4px 5px; - } - } - &.disabled, &[disabled] { - cursor: default; - background: transparent; - opacity: 0.6; - /* @include no-box-shadow; */ - &:hover { - background: transparent; - text-decoration: none; - @include no-box-shadow; - } - } - &.iconbutton { - display: inline-block; - } - &.tiny { - padding: 4px; - margin: 0; - &:active, &:focus { - margin: 0; - padding: 3px; - } - } -} - -h1,h2,h3,h4,h5 { - text-transform: uppercase; - color: $headercl; - margin-top: 1em; - &:first-child { - margin-top: 0; - } -} - -h1 { font-size: 140%; } -h2 { font-size: 130%; } -h3 { - font-size: 120%; - &.gap { - margin: 3em 0 1em; - } -} -h4 { - font-size: 110%; - &.legend { - margin-bottom: 4px; - } -} -h5 { font-size: 80%; } - -.clear { - clear: both; -} - -.wrap { /* wrapper around floated elements */ - overflow: hidden; - margin-bottom: 2em; -} - -.nomargin { - margin: none; -} - -.la { text-align: left; } -.ra { text-align: right; } -.fr { float: right; } -.fl { float: left; } - -.twocolumn { - @include column-count(2); - @include column-gap(10px); -} - -.placeholder { margin-bottom: 2em; } -.disabled, a[href="#"] { opacity: 0.6; filter: alpha(opacity=60); cursor: default !important; } -.nomargin { margin: 0; } -.nowrap { white-space: nowrap; } -.gap { margin-bottom: 4em; } -.padforicon { - padding-right: 30px; - position: relative; -} -.pointercursor { cursor: pointer; } -.nospace { - margin: 0 !important; - padding: 0 !important; -} - -div,section,fieldset { - display: block; - overflow: hidden; /* force to wrap floats */ -} - -/* TABLES */ - -table { - border-collapse: collapse; - border: 1px solid $strokecl; - margin: 10px 0 40px; width: 100%; - font-size: 95%; - thead { - background-color: lighten($strokecl,8%); - th { - font-size: 95%; - padding: 2px 6px; - font-family: $headlinefont; - color: lighten($headercl,20%); - text-transform: uppercase; - border-right: 1px dotted darken($strokecl,20%); - &.active { - &.desc { - background: #fff url(../../images/order-desc.png) no-repeat center right; - } - &.asc { - background: #fff url(../../images/order-asc.png) no-repeat center right; - } - } - &.show { - border: 0px; - width: 50% - } - a, a:hover, a:active { - display: block; - margin: 0; - color: inherit; - text-decoration: none; - } - } - } - td { - padding: 4px; - vertical-align: top; - min-height: 16px; - } - &.noborder { - border: none; - thead { - background-color: transparent; - th { - border: none; - span { - color: lighten($headercl,30%); - } - } - } - td { - color: #888; - &.graph { - width: 102px; - height: 4em; - } - .percentBlock { - display: block; - border:1px solid #909090; - padding: 0; - width:100px; - font-size: 9px; - text-align: center; - color: #555; - .percentBlockInner { - } - .good { - background-color: $goodcl; - @include gradient-2p-linear(lighten($goodcl,30%),$goodcl); - } - .ok { - background-color: $okcl; - @include gradient-2p-linear(lighten($okcl,30%),$okcl); - } - .bad { - background-color: $badcl; - @include gradient-2p-linear(lighten($badcl,30%),$badcl); - } - } - .min { - background: url(../../images/arrow-min.png) no-repeat top center; - float:left; - padding-top:5px; - width:50px; - } - .max { - background: url(../../images/arrow-max.png) no-repeat top center; - float:left; - padding-top:5px; - width:50px; - } - } - } - &.gap { - margin-bottom: 7em; - } -} - -.action { - background: url(../../images/icons/action-icons.png) no-repeat 0 0; - &:hover { - background: url(../../images/icons/action-icons.png) no-repeat 0 0; - } - &:active { - background: url(../../images/icons/action-icons.png) no-repeat 0 0; - } -} -input[type='submit'].icon { - border: none; - background: transparent; - font-size: 100%; - padding: 0; - &:hover { - @include no-box-shadow; - color: $dcprimary; - &[disabled] { - color: #000; - } - } -} - -.actionsidebar { - border-right: 1px solid darken($footerbg, 10%); - width: 159px !important; - dt { - background-color: $footerbg; - border-bottom: 1px solid darken($footerbg, 10%); - border-top: 1px solid darken($footerbg, 10%); - color: $headercl; - font-family: $headlinefont; - font-size: 110%; - margin: 3px 0 20px; - padding:14px 10px 12px; - text-transform: uppercase; - } - dd { - margin: 0 0 0 10px; - font-size: 110%; - position: relative; - a { - display: block; - padding: 4px 4px 4px 20px; - &.selected { - background: url("../../images/actionsidebar-bullet.png") no-repeat left center; - font-weight: bold; - color: $dcprimary; - } - } - h5 { - margin: 3em 0 .5em 0; - &:first-child { - margin: 0 0 .5em 0; - } - } - ul { - display: block; - li { - display: block; - margin: 0; - padding: 0 0 0 16px; - position: relative; - } - } - } - form.buttononly { - display: inline-block; - } - span { - display: block; - position: absolute; - width: 16px; height: 16px; - left: 0; top: 50%; margin-top: -8px; - background: url(../../images/icons/action-icons.png) no-repeat 0 0; - } - .edit span { background-position: -16px 0;} - .delete span { background-position: -32px 0;} - .rename span { background-position: -80px 0;} - .copy span { background-position: -48px 0;} - .build span { background-position: -64px 0;} - .add span { background-position: -48px 0;} - .clear span { background-position: -160px 0;} - .start span { background-position: -176px 0;} - .stop span { background-position: -192px 0;} - .snapshot span { background-position: -208px 0;} - .grantaccess span { background-position: -224px 0;} - .request_help span { background-position: -240px 0;} - .info span { background-position: -256px 0;} - .restart span { background-position: -272px 0;} - .shutdown span { background-position: -288px 0;} - .console span { background-position: -304px 0;} - .VD span { background-position: -320px 0;} - label { - font-weight: normal; - } -} - - -.searchedpackages, .collections { - display: block; - margin: 0 2em 2em 0; - @include column-count(3); - li { - display: block; - margin: 0; - label { - font-weight: normal; - } - } -} - -/* ICONS */ - -img.icon { - width: 16px; height: 16px; - vertical-align: middle; - background: url(../../images/icons/statusicons.png) no-repeat 0 0; - &.large { - width: 48px; height: 16px; - } - &.yes { background-position: -16px 0; } - &.no { background-position: -32px 0; } - &.platform { - background: url(../../images/icons/platformicons.png) no-repeat 0 0; - &.rhel { - background-position: 0 0; - } - } -} - -#notification { - &>div { - padding: 10px; - @include border-radius(5px); - margin-bottom: 2em; - ul { - display: block; - margin: 0; - li { - display: block; - margin: 0; - } - } - } - .success { - background-color: lighten($goodcl,45%); - border: 1px solid lighten($goodcl,20%); - } - .error, .warning { - background-color: lighten($badcl,45%); - border: 1px solid lighten($badcl,20%); - } - .close { - display: block; - position: absolute; - width: 16px; height: 16px; - top: 0; right: 0; - background: url(../../images/icons/close.png) no-repeat 0 0; - cursor: pointer; - } -} - -ul.block { - display: block; - margin: 0; - li { - display: block; - margin: 0; - } -} - -#head { - background-color: $headerbg; - border-bottom: 2px solid desaturate(lighten($headerbg,30%),50%); - overflow: hidden; - header { - display: block; - h1 { - text-transform: uppercase; - font-size: 110%; - color: #fff; - margin: 2px 0 0; - padding: 6px 0 4px 54px; - background: url(../../images/rh_logo.png) no-repeat 10px center; - position: relative; - float: left; - img.dc { - position: absolute; - left: 43px; - top: 7px; - } - } - ul { - display: block; - float: right; - margin: 0 10px 0 0; - padding: 8px 0 0; - li { - display: inline-block; - margin: 0 5px; - &.hello { - margin-left: 30px; - } - a { - color: #fff; - } - } - } - } -} - -#subheader { - background: lighten($headerbg,50%) url(../../images/subheader-shade.png) repeat-x 0 0; - position: relative; - height: 50px; - #s { - font-size: 80%; - text-align: right; - overflow: hidden; - padding: 10px 0 0; - p { - margin: 0; - } - div { - position: relative; - margin-bottom: 0; - button { - position: absolute; - width: 16px; height: 16px; - text-indent: -200em; - right: 8px; top: 50%; - margin: -8px 0 0; - background-position: 0 0; - border: none; - padding: 0; - &:hover { - box-shadow: none; - -webkit-shadow: none; - -moz-box-shadow: none; - } - } - input[type="search"] { - border-color: $headerbg; - width: 80%; - } - } - a { - color: #fff; - margin-right: 10px; - } - } - hr { /* stroke on the bottom to be overdrawn by tabs */ - position: absolute; - display: block; - margin: 0; - left: 0; right: 0; bottom: 0; - height: 1px; - color: #9F9F9F; - background-color: #9F9F9F; - z-index: 1; - border-style: none; - } -} - -nav { - display: block; - overflow: hidden; - z-index: 2; - position: absolute; - bottom: 0; left: 0; right: 0; - &>ul { /* groups -- operation, administration ... */ - display: block; - &>li { - display: block; - float: left; - margin: 0 9px; - &>a { /* group labels */ - display: block; - cursor: default; - color: white; - font-weight: normal; - text-transform: uppercase; - font-family: $headlinefont; - &:hover, &:active { - color: desaturate(lighten($headerbg,50%),50%); - text-decoration: none; - } - } - &.selected>ul { /* generic selected tabs */ - background-color: #fff; - border-bottom: 1px solid #fff; - } - &.runtime>ul>li { - max-width: 90px; - } - &>ul { /* generic background tabs */ - display: block; - margin: 0; - background-color: #ddd; - overflow: hidden; - border-left: 1px solid #9F9F9F; - border-right: 1px solid #9F9F9F; - border-bottom: 1px solid #9F9F9F; - li { /* tab items */ - font-size: 95%; - margin: 0; padding: 10px 8px 6px; - text-align: center; - font-family: $screenfont; - font-weight: bold; - display: block; - float: left; - max-width: 70px; - a { - display: table-cell; - vertical-align: middle; - height: 38px; /* easy click targets */ - color: #888; - padding: 2px 6px; margin: 0; - } - &.selected { - a { - color: #000; - } - } - &.disabled { - a { - color: #aaa; - cursor: default; - &:hover { - text-decoration: none; - } - } - } - } - } - } - } - - #help { - float: right; - margin-right: 10px; - a { - display: block; - color: #fff; - cursor: pointer; - width: 48px; height: 37px; - margin: 20px 0 0; - background: url(../../images/help-bubble.png) no-repeat 0 0; - text-align: center; - padding: 8px 0 0; - } - &.disabled a { - cursor: default !important; - } - } - - &.subnav { /* subnavigation */ - position: relative; - background: #888 url(../../images/subnav-bg.png) repeat-x 0 0; /* fallback */ - border-top: 3px solid #fff; - border-bottom: 1px solid #666; - overflow: visible; - min-height: 6px; - &>ul { - /* - position: absolute; - top: 0; left: 0; right: 0; - */ - width: 960px; - margin: 0 auto; - padding: 4px; - overflow: visible; - height: 22px; - li { - a { - height: 20px; - cursor: pointer; - font-family: $screenfont; - text-transform: none; - display: inline-block; - color: #fff; - margin: 2px 6px; - &.selected { - @include text-shadow(0,2px,2px,rgba(0,0,0,0.9)); - height: 30px; - background: url(../../images/selected-subnav.png) no-repeat bottom center; - } - } - } - } - } - &.subsubnav { /* in page tabs */ - position: static; - overflow: hidden; - bottom: inherit; - left: inherit; - right: inherit; - margin-bottom: 2em; - &>ul { - display: block; - li { - display: block; - float: left; - a { - cursor: pointer; - font-family: $screenfont; - text-transform: none; - font-weight: normal; - color: black; - display: block; - padding: 6px; margin-right: 10px; - &.selected { - color: #fff; - background-color: $dcprimary; - @include border-radius(5px); - } - } - } - } - } -} - - /* color coding for the subnav */ - #operation .subnav { background-color: $operationbg; } - #operation nav>ul>li>ul>li>a.selected { color: $operationbg; } - #administration .subnav, - #system_settings .subnav, - #loginpage .subnav { background-color: $administrationbg; } - #administration nav>ul>li>ul>li>a.selected, - #system_settings nav>ul>li>ul>li>a.selected, - #loginpage nav>ul>li>ul>li>a.selected { color: $administrationbg; } - #build .subnav { background-color: $buildbg; } - #build nav>ul>li>ul>li>a.selected { color: $buildbg; } - #runtime .subnav { background-color: $runtimebg; } - #runtime nav>ul>li>ul>li>a.selected { color: $runtimebg; } - #operation .subnav>ul>li a.selected { background: url(../../images/selected-subnav-op.png) no-repeat bottom center; } - #administration .subnav>ul>li a.selected, - #system_settings .subnav>ul>li a.selected, - #loginpage .subnav>ul>li a.selected - { background: url(../../images/selected-subnav-ad.png) no-repeat bottom center; } - #build .subnav>ul>li a.selected { background: url(../../images/selected-subnav-bu.png) no-repeat bottom center; } - #runtime .subnav>ul>li a.selected { background: url(../../images/selected-subnav-ru.png) no-repeat bottom center; } - -/* image backgrounds for tabs */ -li.operation>ul, li.administration>ul, li.build>ul, li.runtime>ul { - background: #ddd url(../../images/tab-bg.png) repeat-x 0 0; -} - li.operation.selected>ul { background-position: 0 -140px; } - li.operation>ul { background-position: 0 -210px; } - li.administration.selected>ul { background-position: 0 -420px; } - li.administration>ul { background-position: 0 -490px; } - li.build.selected>ul { background-position: 0 -280px; } - li.build>ul { background-position: 0 -350px; } - li.runtime.selected>ul { background-position: 0 0; } - li.runtime>ul { background-position: 0 -70px; } - - - -.modalbox { - margin: 150px auto; - @include box-shadow(0,1px,5px,rgba(0, 0, 0, 0.6)); - width: 550px; - overflow: hidden; - h2 { - background-color: $formheadbg; - color: $formheadfg; - text-transform: uppercase; - font-size: 120%; - padding: 10px; - } - .dcloud_form { - margin: 40px; - overflow: hidden; - } - .errorExplanation { - h2 { - text-transform: none; - } - } -} - -#content { - position: absolute; - top: 100px; - bottom: 100px; - left: 1em; - right: 1em; - overflow: hidden; -} - -/* FORMS */ -/* generic */ -label { - text-align: right; - font-weight: bold; - &.header { - text-align: left; - font-weight: normal; - font-size: 90%; - margin-bottom: 1em; - } - &.big { - text-align: left; - text-transform: uppercase; - font-family: $headlinefont; - font-size: 110%; - font-weight: normal; - color: $formheadfg; - } -} - -legend { - font-size: 130%; - font-family: $headlinefont; - font-weight: bold; - text-transform: uppercase; - color: $headercl; -} - -fieldset.gap { - margin-bottom: 7em; -} - -.fieldWithErrors { - border: 0; margin: 0; padding: 0; - overflow: visible; - input { - background-color: lighten($errorcl, 45%); - color: $errorcl; - } - label { - color: $errorcl; - } -} - -.pagination { - font-size: 90%; - text-align: right; - .disabled { - display: none; - } - input { - display: inline-block; - text-align: center; - background: none; - border: 1px solid $strokecl; - width: 18px; padding: 3px; margin-right: 4px; - @include border-radius(0); - &.prev_page, &.next_page { - width: 54px; - &:active, &:hover, &:focus { /* behave like links, not buttons */ - width: 54px; - } - } - &:active, &:hover, &:focus { /* behave like links, not buttons */ - text-align: center; - background: none; - @include no-box-shadow(); - width: 18px; padding: 3px; margin-right: 4px; - } - } - .current { - text-align: center; - display: inline-block; - width: 22px; - border: none; - font-weight: bold; - } -} - -.pageinfo { - float: left; -} - -/* simple two column label + input pairs */ -.dcloud_form { - fieldset { - overflow: hidden; - margin: 10px 0 0; - text-align: left; - label { - display: inline-block; - font-weight: bold; - padding: 4px 0 0 0; - } - input[type='text'], input[type='password'], textarea { - display: inline-block; - width: 20em; - } - } - .indented { - margin: 10px 0 0; - text-align: right; - input[type="text"],label,a,div,p { - text-align: left; - display: inline-block; - width: 20em; - } - } -} - -/* search forms */ - -.search { - position: relative; - button { - position: absolute; - width: 16px; height: 16px; - text-indent: -200em; - right: 8px; top: 50%; - margin: -8px 0 0; - background-position: 0 0; - border: none; - padding: 0; - &:hover { - box-shadow: none; - -webkit-shadow: none; - -moz-box-shadow: none; - } - } - input[type="search"] { - float: right; /* webkit adds an extra padding and makes the widget narrower */ - } -} -/* WIZARD TILES */ - -ul.tiles { - overflow: hidden; - margin: 2em 0 0; - li.grid_8 { - margin-bottom: 30px; - padding-left: 60px; - width: 400px !important; - position: relative; - img { - position: absolute; - background: url(../../images/icons/config-icons.png) no-repeat 0 0; - width: 48px; height: 48px; - top: 0; left: 0; - } - } - button, a.button { - float: right; - } - .disabled { - opacity: 0.6; - button { - pointer: default; - } - } -} - -/* CONFIG PANE ICONS */ - - #settings { - img { background-position: 0 -48px; } - &.disabled { - img { background-position: 0 0; } - } - } - #locales { - img { background-position: -48px -48px; } - &.disabled { - img { background-position: -48px 0; } - } - } - #users { - img { background-position: -144px -48px; } - &.disabled { - img { background-position: -144px 0; } - } - } - #providers { - img { background-position: -96px -48px; } - &.disabled { - img { background-position: -96px 0; } - } - } - #permissions { - img { background-position: -288px -48px; } - &.disabled { - img { background-position: -288px 0; } - } - } - #hardware { - img { background-position: -240px -48px; } - &.disabled { - img { background-position: -240px 0; } - } - } - #services { - img { background-position: -192px -48px; } - &.disabled { - img { background-position: -192px 0; } - } - } - -/* GRAPHS */ - -.graphkey { - li { - padding: 2px 4px 2px 32px; - background: url(../../images/graph-key.png) no-repeat 0 0; - height: 18px; overflow: hidden; - } - .instances { background-position: 0 0; } - .requests { background-position: 0 -18px; } - .ttl { background-position: 0 -36px; } - .failures { background-position: 0 -54px; } - .retries { background-position: 0 -72px; } -} - -footer { - font-size: 90%; - margin: 10px 0 0; - padding: 10px; - display: block; - background: $footerbg url(../../images/footer-shade.png) repeat-x 0 0; - ul { - display: block; - padding: 10px 10px 0 0; - min-height: 50px; - li { - display: block; - float: right; - } - } - - &.fixed { - position: absolute; - bottom: 0; left: 0; right: 0; - } -} - -/* RIGHT SIDEBAR */ -.sidebarcontainer { - /* height: 300px; overflow: scroll; */ - display: block; - li { - display: block; - margin: 0; - } - h5 { - text-transform: none; - margin-top: 3em; - } -} - -/* PAGE SPECIFIC */ - -/* DASHBOARD */ - -.currency { - font-size: 180%; - line-height: 70%; -} - -/* GRINDS */ -.status,.capacity { - span { - display: inline-block; - width: 10px; - height: 10px; - background: url(../../images/icons/status.png) no-repeat 0 0; - &.good { - background-position: 0 0; - } - &.ok { - background-position: 0 -10px; - } - &.bad { - background-position: 0 -20px; - } - } -} - -/* INSTANCE MANAGEMENT */ -.poolname { - h4 { - float: left; - margin: 10px 0 0; - } -} - -.poolfilter { - margin: 10px 0 0; - label { - font-weight: normal; - margin-right: 1em; - } -} - -a.iconbutton { - padding: 4px 4px 4px 24px; - position: relative; - overflow: hidden; - @include border-radius(2px); - &:active { - padding: 4px 4px 4px 24px; - } - &:focus { - padding: 3px 3px 3px 23px; - } - img { - position: absolute; - width: 18px; - height: 54px; - left: 0; top: 50%; - margin-top: -27px; - background: url(../../images/icons/launchinstance.png) no-repeat 0 0; - } -} - -/* TEMPLATES */ - -#build { - #add_software_button { - margin-top: 2em; - font-size: 140%; - } - - #package_selection_list { - display: block; - overflow: auto; - margin-top: 2em; - &.loading { - display: block; - height: 100px; - background: url(../../images/spinner.gif) no-repeat center center; - } - &>.grid_16 { - margin: 0; - } - } - - #metagrouppackages { - &.loading { - display: block; - height: 100px; - background: url(../../images/spinner.gif) no-repeat center center; - } - } - - span.loading { - background: url(../../images/spinner.gif) no-repeat center left; - display: inline-block; - padding: 6px 0 6px 24px; - } - .packagewrap { - position: relative; - float: left; - padding: 4px 22px 4px 4px; - margin: 2px; - @include border-radius(4px); - .remove_package { - position: absolute; - width: 16px; height: 16px; - top: 50%; right: 4px; - border: none; - background: url(../../images/icons/action-icons.png) no-repeat -32px 0 !important; - text-indent: -200em; - padding: 0; margin: -8px 0; - @include border-radius(2px); - &:hover { - @include no-box-shadow(); - background: lighten($dcprimary,10%) url(../../images/icons/action-icons.png) no-repeat -32px 0 !important; - } - } - .packagename { - cursor: pointer; - &:hover { - color: white; - } - } - &.selected { - color: white; - background-color: $dcprimary; - .packagename { - color: white; - } - } - &:hover { - color: white; - background-color: $dcprimary; - .packagename { - color: white; - } - } - } - - .packagegroupsidebar { - float: left; - padding-right: 20px; - display: block; - text-align: right; - font-size: 120%; - li { - display: block; - margin: 0; - } - .icon { - text-transform: capitalize; - } - } - #collections { - margin: 0 0 1em; - font-weight: bold; - } - - .metagrouppackages { - display: block; - &>li { - display: block; - text-transform: uppercase; - margin: 0 2em 2em 0; padding: 0; - label { - cursor: pointer; - } - ul { - @include column-count(3); - display: block; - text-transform: none; - font-size: 95%; - li { - display: block; - margin: 0 0 0 4px; - text-transform: capitalize; - label { - font-weight: normal; - } - } - } - } - } -} - #dropdown { - position: absolute; - background-color: white; - border: 1px solid $dcprimary; - @include border-radius-bottom(4px); - padding: 1em; - display: none; - z-index: 2; - font-size: 95%; - } - -/* IE and other horror browser workarounds */ - -/* basic image styling for buttons in older browsers */ -.no-cssgradients input[type='submit'], .no-cssgradients button, .no-cssgradients .button { - - /* FIXME image based buttons */ -} - -/* when modalbox miss dropshadow set some border */ -.no-boxshadow .modalbox { border: 2px solid $strokecl; } - - -/* jQuery UI tabs overrides */ - -.ui-widget-content { border: none; } -.ui-tabs { - margin-bottom: 1em; - .ui-widget-header { - font-size: 90%; - background: transparent; - border: none; - } - .ui-state-default { - background: transparent; - border: none; - } - .ui-state-active { - background-color: $dcprimary; - @include border-radius(5px); - &>a { - color: #fff; - } - } -} - -#saved-searches { - position: absolute; - left: 0.2em; - top: 1em; - bottom: 1em; - width: 13em; - -} - - -$details-height: 190px; -$content-left: 180px; - -#list-view { - border: 1px solid; - padding: 1em; - position: absolute; - top: 1em; - left: $content-left; - right: 0; - overflow: auto; - &.part { - bottom: $details-height + 30px; - } - &.full { - bottom: 1em; - } -} - -#object-actions { - position: relative; - float: left; - width: 100%; -} - -#search-actions { - position: relative; - float: right; -} - -#selections { - position: relative; - float: left; -} - -#list { - float: left; - width: 100%; -} - -#details-view { - border: 1px solid; - position: absolute; - left: $content-left; - right: 0; - height: $details-height; - bottom: 0; - padding: 0; - overflow-y:scroll; -} - -/* DEBUG GRID */ -#grid { - display: none; - position: fixed; - top: 0; bottom: 0; - left: 50%; - width: 1020px; - margin-left: -510px; -} diff --git a/src/app/views/image_factory/templates/_list.haml b/src/app/views/image_factory/templates/_list.haml index 3980b06..7675d72 100644 --- a/src/app/views/image_factory/templates/_list.haml +++ b/src/app/views/image_factory/templates/_list.haml @@ -1,5 +1,5 @@ - form_tag do - = restful_submit_tag "Create", "new_template", new_image_factory_template_path, 'GET' + = link_to "Create", new_image_factory_template_path, :class => 'button' = restful_submit_tag "Delete", 'destroy', multi_destroy_image_factory_templates_path, 'DELETE', :id => 'delete_button'
%table#templates_table diff --git a/src/app/views/image_factory/templates/_metagroups.haml b/src/app/views/image_factory/templates/_metagroups.haml index 339ce8a..f23c408 100644 --- a/src/app/views/image_factory/templates/_metagroups.haml +++ b/src/app/views/image_factory/templates/_metagroups.haml @@ -1,7 +1,7 @@ %fieldset.clearfix .search.grid_4.alpha %input{:type => "search", :placeholder => "Search for package", :name => 'package_search', :value => params[:package_search], :id => 'package_search'} - %button.action{:id => 'package_search_button'} + %button.action{:id => 'package_search_button', :name => 'package_search_button' , :value => 'true'} .grid_8 %a.grid_4.omega Advanced Search
diff --git a/src/app/views/layouts/_header.haml b/src/app/views/layouts/_header.haml index f31b6cd..f319082 100644 --- a/src/app/views/layouts/_header.haml +++ b/src/app/views/layouts/_header.haml @@ -12,7 +12,7 @@ = t(:configure)
%li.hello - - link_to :controller => 'users', :action => 'edit', :id => @current_user.id do + - link_to edit_admin_user_path(@current_user) do = t(:hello) + " " %b = "#{@current_user.first_name} #{@current_user.last_name}" diff --git a/src/app/views/layouts/aggregator.haml b/src/app/views/layouts/aggregator.haml deleted file mode 100644 index 3e407e3..0000000 --- a/src/app/views/layouts/aggregator.haml +++ /dev/null @@ -1,53 +0,0 @@ -!!! -%html - %head - %meta(http-equiv="Content-Type" content="text/html; charset=UTF-8") - %title - Red Hat Cloud Engine - = yield :title - - = stylesheet_link_tag 'facebox' - = stylesheet_link_tag 'jquery.ui-1.8.1/jquery-ui-1.8.1.custom.css' - = stylesheet_link_tag 'jquery.loadmask' - = stylesheet_link_tag 'compiled/aggregator' - - / [if lt IE 9] - = javascript_include_tag "http://html5shiv.googlecode.com/svn/trunk/html5.js" - = javascript_include_tag "jquery-1.4.2.min.js" - = javascript_include_tag "application.js" - = javascript_include_tag "jquery.ui-1.8.1/jquery-ui-1.8.1.custom.min.js" - = javascript_include_tag "jquery.loadmask.min" - = javascript_include_tag "modernizr-1.5" - /= javascript_include_tag "jquery.html5form" - = yield :scripts - %body{:id => controller.section_id} - %a{ :href => '', :onClick => "document.cookie = 'layout=newui'"} - Switch to the New UI - %div#head - %header.container_16 - = render :partial => '/layouts/header' - - if @current_user.nil? - #content.container_16 - = render :partial => '/layouts/notification' - #formwindow - = yield - - else - #subheader - %form#s.container_16.disabled{:disabled => "disabled"} - .prefix_10.grid_6 - %input{ :name => "s", :type => "search", :placeholder => "Search Cloud Aggregator", :disabled => "disabled"} - %button.action{:form => "s"} Search - %p.prefix_10.grid_6 - %a.disabled - = t(:advanced_search) - %nav.container_16 - = render_navigation({:context => 'old', :expand_all => true, :level => 1..2}) - %hr - %nav.subnav - = render_navigation({:context => 'old', :expand_all => true, :level => 3}) - #content.container_16 - = render :partial => '/layouts/notification' - = yield - %footer - = render :partial => "layouts/footer" - #grid diff --git a/src/app/views/layouts/application.haml b/src/app/views/layouts/application.haml new file mode 100644 index 0000000..6d75bd7 --- /dev/null +++ b/src/app/views/layouts/application.haml @@ -0,0 +1,52 @@ +!!! +%html + %head + %meta(http-equiv="Content-Type" content="text/html; charset=UTF-8") + %title + Red Hat Cloud Engine + = yield :title + + = stylesheet_link_tag 'facebox' + = stylesheet_link_tag 'jquery.ui-1.8.1/jquery-ui-1.8.1.custom.css' + = stylesheet_link_tag 'jquery.loadmask' + = stylesheet_link_tag 'compiled/application' + + / [if lt IE 9] + = javascript_include_tag "http://html5shiv.googlecode.com/svn/trunk/html5.js" + = javascript_include_tag "jquery-1.4.2.min.js" + = javascript_include_tag "application.js" + = javascript_include_tag "jquery.ui-1.8.1/jquery-ui-1.8.1.custom.min.js" + = javascript_include_tag "jquery.loadmask.min" + = javascript_include_tag "modernizr-1.5" + /= javascript_include_tag "jquery.html5form" + = yield :scripts + %body + %div#head + %header.container_16 + = render :partial => '/layouts/header' + - if @current_user.nil? + #content.container_16 + = render :partial => '/layouts/notification' + #formwindow + = yield + - else + #subheader + %nav.container_16 + = render_navigation({:expand_all => true, :level => 1}) + = render_navigation({:expand_all => true, :level => 2}) + #content + #saved-searches + Saved searches + - details = !(yield :details).blank? + #list-view{ :class => details ? 'part' : 'full'} + - form_tag({:action => 'index'}, :method => :get) do + = text_field_tag :q, @search_term + = submit_tag "Search" + = render :partial => '/layouts/notification' + = (yield :list or yield) + #details-view.ui-tabs.ui-widget.ui-widget-content.ui-corner-all{ :class => ('hidden' unless details)} + - if details + = yield :details + %footer + = render :partial => "layouts/footer" + #grid diff --git a/src/app/views/layouts/newui.haml b/src/app/views/layouts/newui.haml deleted file mode 100644 index 681f607..0000000 --- a/src/app/views/layouts/newui.haml +++ /dev/null @@ -1,52 +0,0 @@ -!!! -%html - %head - %meta(http-equiv="Content-Type" content="text/html; charset=UTF-8") - %title - Red Hat Cloud Engine - = yield :title - - = stylesheet_link_tag 'facebox' - = stylesheet_link_tag 'jquery.ui-1.8.1/jquery-ui-1.8.1.custom.css' - = stylesheet_link_tag 'jquery.loadmask' - = stylesheet_link_tag 'compiled/newui' - - / [if lt IE 9] - = javascript_include_tag "http://html5shiv.googlecode.com/svn/trunk/html5.js" - = javascript_include_tag "jquery-1.4.2.min.js" - = javascript_include_tag "application.js" - = javascript_include_tag "jquery.ui-1.8.1/jquery-ui-1.8.1.custom.min.js" - = javascript_include_tag "jquery.loadmask.min" - = javascript_include_tag "modernizr-1.5" - /= javascript_include_tag "jquery.html5form" - = yield :scripts - %body{:id => controller.section_id} - %div#head - %header.container_16 - = render :partial => '/layouts/header' - - if @current_user.nil? - #content.container_16 - = render :partial => '/layouts/notification' - #formwindow - = yield - - else - #subheader - %nav.container_16 - = render_navigation({:context => 'new', :expand_all => true, :level => 1}) - = render_navigation({:context => 'new', :expand_all => true, :level => 2}) - #content - #saved-searches - Saved searches - - details = !(yield :details).blank? - #list-view{ :class => details ? 'part' : 'full'} - - form_tag({:action => 'index'}, :method => :get) do - = text_field_tag :q, @search_term - = submit_tag "Search" - = render :partial => '/layouts/notification' - = (yield :list or yield) - #details-view.ui-tabs.ui-widget.ui-widget-content.ui-corner-all{ :class => ('hidden' unless details)} - - if details - = yield :details - %footer - = render :partial => "layouts/footer" - #grid diff --git a/src/app/views/resources/deployments/_list.haml b/src/app/views/resources/deployments/_list.haml index 6c3dee8..6f62520 100644 --- a/src/app/views/resources/deployments/_list.haml +++ b/src/app/views/resources/deployments/_list.haml @@ -1,4 +1,4 @@ -- form_tag do |f| +- form_tag do #object-actions = restful_submit_tag "Start", "start", resources_deployments_path, "PUT" = restful_submit_tag "Stop", "stop", resources_deployments_path, "PUT" @@ -17,4 +17,4 @@ = link_to "None", @url_params.merge(:select => 'none')
%table - = sortable_table_header @header \ No newline at end of file + = sortable_table_header @header diff --git a/src/app/views/user_sessions/new.haml b/src/app/views/user_sessions/new.haml index 9bd71f6..4dc7a03 100644 --- a/src/app/views/user_sessions/new.haml +++ b/src/app/views/user_sessions/new.haml @@ -12,7 +12,5 @@ = f.check_box :remember_me = f.label :remember_me %div.indented - = link_to "Don't have an account? Create one now.", | - {:controller => 'users', :action => 'new'}, | - :class => 'actionlink' | + = link_to "Don't have an account? Create one now.", register_path, :class => 'actionlink' = f.submit "Login", :class => "submit dialogbutton" diff --git a/src/config/navigation.rb b/src/config/navigation.rb new file mode 100644 index 0000000..e929a59 --- /dev/null +++ b/src/config/navigation.rb @@ -0,0 +1,26 @@ +SimpleNavigation::Configuration.run do |navigation| + navigation.autogenerate_item_ids = false + navigation.items do |first_level| + first_level.item :resource_management, t(:resource_management), resources_pools_path, :highlights_on => /^/$/ do |second_level| + second_level.item :pools, t(:pools), resources_pools_path + second_level.item :deployments, t(:deployments),resources_deployments_path, :highlights_on => /^/$|/deployments/ + second_level.item :instances, t(:instances), resources_instances_path + end + first_level.item :image_factory, t(:image_factory), image_factory_templates_path, :highlights_on => //image_factory/ do |second_level| + second_level.item :templates, t(:templates), image_factory_templates_path + second_level.item :assemblies, t(:assemblies), image_factory_assemblies_path + second_level.item :deployables, t(:deployables), image_factory_deployables_path + end + first_level.item :administration, t(:administration), admin_users_path, :highlights_on => //admin/ do |second_level| + second_level.item :users, t(:users), admin_users_path + second_level.item :roles, t(:roles), admin_roles_path + second_level.item :providers, t('providers.providers'), admin_providers_path + second_level.item :provider_accounts, t(:provider_accounts), admin_provider_accounts_path + second_level.item :hardware_profiles, t(:cloud_engine_hardware_profiles), admin_hardware_profiles_path + second_level.item :realms, t(:cloud_engine_realms), admin_realms_path + second_level.item :pool_families, t(:pool_families), admin_pool_families_path + second_level.item :settings, t(:setting), admin_settings_path + end + first_level.item :dashboard, t(:dashboard), '#' + end +end diff --git a/src/config/new_navigation.rb b/src/config/new_navigation.rb deleted file mode 100644 index 5d54b6b..0000000 --- a/src/config/new_navigation.rb +++ /dev/null @@ -1,26 +0,0 @@ -SimpleNavigation::Configuration.run do |navigation| - navigation.autogenerate_item_ids = false - navigation.items do |first_level| - first_level.item :resource_management, t(:resource_management), resources_pools_path, :highlights_on => //resources/ do |second_level| - second_level.item :pools, t(:pools), resources_pools_path - second_level.item :deployments, t(:deployments),resources_deployments_path - second_level.item :instances, t(:instances), resources_instances_path - end - first_level.item :image_factory, t(:image_factory), image_factory_templates_path, :highlights_on => //image_factory/ do |second_level| - second_level.item :templates, t(:templates), image_factory_templates_path - second_level.item :assemblies, t(:assemblies), image_factory_assemblies_path - second_level.item :deployables, t(:deployables), image_factory_deployables_path - end - first_level.item :administration, t(:administration), admin_users_path, :highlights_on => //admin/ do |second_level| - second_level.item :users, t(:users), admin_users_path - second_level.item :roles, t(:roles), admin_roles_path - second_level.item :providers, t('providers.providers'), admin_providers_path - second_level.item :provider_accounts, t(:provider_accounts), admin_provider_accounts_path - second_level.item :hardware_profiles, t(:cloud_engine_hardware_profiles), admin_hardware_profiles_path - second_level.item :realms, t(:cloud_engine_realms), admin_realms_path - second_level.item :pool_families, t(:pool_families), admin_pool_families_path - second_level.item :settings, t(:setting), admin_settings_path - end - first_level.item :dashboard, t(:dashboard), '#' - end -end diff --git a/src/config/routes.rb b/src/config/routes.rb index 0aa281b..01d536e 100644 --- a/src/config/routes.rb +++ b/src/config/routes.rb @@ -56,37 +56,15 @@ ActionController::Routing::Routes.draw do |map| r.resources :pool_families, :collection => { :multi_destroy => :delete } end
- map.resources :pools - - map.connect '', :controller => 'dashboard' - map.login 'login', :controller => "user_sessions", :action => "new" map.logout 'logout', :controller => "user_sessions", :action => "destroy" map.resource :user_session - map.register 'register', :controller => 'users', :action => 'new' - map.resource :account, :controller => "users" - map.resources :users + map.register 'register', :controller => 'admin/users', :action => 'new' + map.resource :account, :controller => "admin/users" + map.resources :permissions, :collection => { :list => :get }
- map.dashboard '/dashboard', :controller => 'dashboard' - map.instance '/instances', :controller => 'instances' - # map.templates '/templates', :controller => 'templates' - map.settings '/settings', :controller => 'settings' - map.root :dashboard - - # Temporarily disable this route, provider stuff is not restful yet. - # Will be re-enabled in upcoming patch - map.resources :providers do |provider| - provider.resources :accounts, :controller => 'cloud_accounts' - end - map.destroy_providers_account '/providers/:provider_id/accounts/:id/destroy', :controller => 'cloud_accounts', :action => 'destroy', :conditions => { :method => :get } + map.root :controller => 'resources/deployments'
- map.resources :templates, :collection => { :destroy_multiple => :get }, - :member => { - :assembly => :get, - :deployment_definition => :get, - :action => :get, - } - map.resources :builds
# Allow downloading Web Service WSDL as a file with an extension # instead of a file named 'wsdl'
On 02/03/2011 10:01 AM, tsedovic@redhat.com wrote:
From: Tomas Sedovictsedovic@redhat.com
These controllers, views and whatnot are no longer used after switching to the new UI.
src/app/controllers/builds_controller.rb | 91 -- src/app/controllers/cloud_accounts_controller.rb | 181 --- src/app/controllers/dashboard_controller.rb | 81 -- .../controllers/hardware_profiles_controller.rb | 36 - src/app/controllers/images_controller.rb | 57 - src/app/controllers/instances_controller.rb | 198 --- src/app/controllers/pools_controller.rb | 138 -- src/app/controllers/providers_controller.rb | 151 --- src/app/controllers/settings_controller.rb | 73 -- src/app/controllers/templates_controller.rb | 267 ---- src/app/controllers/users_controller.rb | 145 --- src/app/helpers/dashboard_helper.rb | 62 - src/app/stylesheets/aggregator.scss | 1325 -------------------- src/app/views/builds/index.haml | 89 -- src/app/views/builds/new.haml | 55 - src/app/views/cloud_accounts/_form.haml | 52 - src/app/views/cloud_accounts/edit.haml | 17 - src/app/views/cloud_accounts/index.haml | 25 - src/app/views/cloud_accounts/new.haml | 17 - src/app/views/dashboard/_dashboard_nav.haml | 13 - src/app/views/dashboard/alerts.haml | 2 - src/app/views/dashboard/billing.haml | 2 - src/app/views/dashboard/help_tickets.haml | 2 - src/app/views/dashboard/monitor.haml | 185 --- src/app/views/dashboard/quota_usage.haml | 2 - src/app/views/dashboard/service_quality.haml | 2 - src/app/views/dashboard/summary.haml | 121 -- src/app/views/hardware_profiles/_list.haml | 20 - src/app/views/hardware_profiles/index.haml | 1 - src/app/views/images/_images.haml | 18 - src/app/views/images/show.haml | 20 - src/app/views/instances/_instances.haml | 24 - src/app/views/instances/configure.haml | 23 - src/app/views/instances/create.haml | 2 - src/app/views/instances/delete.haml | 2 - src/app/views/instances/index.haml | 127 -- src/app/views/instances/new.haml | 19 - src/app/views/instances/show.haml | 61 - src/app/views/pools/delete.haml | 2 - src/app/views/pools/edit.haml | 1 - src/app/views/pools/hardware_profiles.haml | 1 - src/app/views/pools/index.haml | 44 - src/app/views/pools/list.haml | 3 - src/app/views/pools/new.haml | 12 - src/app/views/pools/realms.haml | 1 - src/app/views/pools/show.haml | 12 - src/app/views/providers/_form.haml | 25 - src/app/views/providers/_providers.haml | 28 - src/app/views/providers/accounts.haml | 125 -- src/app/views/providers/delete.haml | 2 - src/app/views/providers/edit.haml | 7 - src/app/views/providers/hardware_profiles.haml | 1 - src/app/views/providers/index.haml | 1 - src/app/views/providers/list.haml | 1 - src/app/views/providers/new.haml | 7 - src/app/views/providers/realms.haml | 1 - src/app/views/providers/settings.haml | 3 - src/app/views/providers/show.haml | 14 - src/app/views/realms/_list.haml | 12 - src/app/views/settings/general_settings.haml | 41 - src/app/views/settings/index.haml | 64 - src/app/views/settings/self_service.haml | 128 -- src/app/views/templates/_addbuttons.haml | 3 - src/app/views/templates/_basics.haml | 27 - src/app/views/templates/_collections.haml | 8 - src/app/views/templates/_form.haml | 122 -- src/app/views/templates/_hidden_fields.haml | 8 - .../views/templates/_local_content_to_bundle.haml | 21 - src/app/views/templates/_managed_content.haml | 21 - src/app/views/templates/_metagroup_packages.haml | 19 - src/app/views/templates/_metagroups.haml | 13 - .../views/templates/_preboot_configuration.haml | 11 - src/app/views/templates/_search_packages.haml | 45 - src/app/views/templates/_software_selection.haml | 39 - src/app/views/templates/_templates.haml | 27 - src/app/views/templates/assembly.haml | 138 -- src/app/views/templates/collections.haml | 1 - src/app/views/templates/deployment_definition.haml | 113 -- src/app/views/templates/edit.haml | 6 - src/app/views/templates/index.haml | 78 -- src/app/views/templates/managed_content.haml | 1 - src/app/views/templates/metagroup_packages.haml | 1 - src/app/views/templates/new.haml | 5 - src/app/views/templates/search_packages.haml | 1 - src/app/views/users/_form.haml | 47 - src/app/views/users/edit.haml | 6 - src/app/views/users/index.haml | 54 - src/app/views/users/new.haml | 6 - src/app/views/users/show.haml | 104 -- src/config/old_navigation.rb | 42 - src/public/images/dashboard_summary_next.png | Bin 412 -> 0 bytes src/public/images/dashboard_summary_prev.png | Bin 375 -> 0 bytes src/public/images/icon_dashboard.png | Bin 952 -> 0 bytes src/public/stylesheets/images/icon_dashboard.gif | Bin 14152 -> 0 bytes src/spec/controllers/dashboard_controller_spec.rb | 19 - 95 files changed, 0 insertions(+), 5228 deletions(-) delete mode 100644 src/app/controllers/builds_controller.rb delete mode 100644 src/app/controllers/cloud_accounts_controller.rb delete mode 100644 src/app/controllers/dashboard_controller.rb delete mode 100644 src/app/controllers/hardware_profiles_controller.rb delete mode 100644 src/app/controllers/images_controller.rb delete mode 100644 src/app/controllers/instances_controller.rb delete mode 100644 src/app/controllers/pools_controller.rb delete mode 100644 src/app/controllers/providers_controller.rb delete mode 100644 src/app/controllers/settings_controller.rb delete mode 100644 src/app/controllers/templates_controller.rb delete mode 100644 src/app/controllers/users_controller.rb delete mode 100644 src/app/helpers/dashboard_helper.rb delete mode 100644 src/app/stylesheets/aggregator.scss delete mode 100644 src/app/views/builds/index.haml delete mode 100644 src/app/views/builds/new.haml delete mode 100644 src/app/views/cloud_accounts/_form.haml delete mode 100644 src/app/views/cloud_accounts/edit.haml delete mode 100644 src/app/views/cloud_accounts/index.haml delete mode 100644 src/app/views/cloud_accounts/new.haml delete mode 100644 src/app/views/dashboard/_dashboard_nav.haml delete mode 100644 src/app/views/dashboard/alerts.haml delete mode 100644 src/app/views/dashboard/billing.haml delete mode 100644 src/app/views/dashboard/help_tickets.haml delete mode 100644 src/app/views/dashboard/monitor.haml delete mode 100644 src/app/views/dashboard/quota_usage.haml delete mode 100644 src/app/views/dashboard/service_quality.haml delete mode 100644 src/app/views/dashboard/summary.haml delete mode 100644 src/app/views/hardware_profiles/_list.haml delete mode 100644 src/app/views/hardware_profiles/index.haml delete mode 100644 src/app/views/images/_images.haml delete mode 100644 src/app/views/images/show.haml delete mode 100644 src/app/views/instances/_instances.haml delete mode 100644 src/app/views/instances/configure.haml delete mode 100644 src/app/views/instances/create.haml delete mode 100644 src/app/views/instances/delete.haml delete mode 100644 src/app/views/instances/index.haml delete mode 100644 src/app/views/instances/new.haml delete mode 100644 src/app/views/instances/show.haml delete mode 100644 src/app/views/pools/delete.haml delete mode 100644 src/app/views/pools/edit.haml delete mode 100644 src/app/views/pools/hardware_profiles.haml delete mode 100644 src/app/views/pools/index.haml delete mode 100644 src/app/views/pools/list.haml delete mode 100644 src/app/views/pools/new.haml delete mode 100644 src/app/views/pools/realms.haml delete mode 100644 src/app/views/pools/show.haml delete mode 100644 src/app/views/providers/_form.haml delete mode 100644 src/app/views/providers/_providers.haml delete mode 100644 src/app/views/providers/accounts.haml delete mode 100644 src/app/views/providers/delete.haml delete mode 100644 src/app/views/providers/edit.haml delete mode 100644 src/app/views/providers/hardware_profiles.haml delete mode 100644 src/app/views/providers/index.haml delete mode 100644 src/app/views/providers/list.haml delete mode 100644 src/app/views/providers/new.haml delete mode 100644 src/app/views/providers/realms.haml delete mode 100644 src/app/views/providers/settings.haml delete mode 100644 src/app/views/providers/show.haml delete mode 100644 src/app/views/realms/_list.haml delete mode 100644 src/app/views/settings/general_settings.haml delete mode 100644 src/app/views/settings/index.haml delete mode 100644 src/app/views/settings/self_service.haml delete mode 100644 src/app/views/templates/_addbuttons.haml delete mode 100644 src/app/views/templates/_basics.haml delete mode 100644 src/app/views/templates/_collections.haml delete mode 100644 src/app/views/templates/_form.haml delete mode 100644 src/app/views/templates/_hidden_fields.haml delete mode 100644 src/app/views/templates/_local_content_to_bundle.haml delete mode 100644 src/app/views/templates/_managed_content.haml delete mode 100644 src/app/views/templates/_metagroup_packages.haml delete mode 100644 src/app/views/templates/_metagroups.haml delete mode 100644 src/app/views/templates/_preboot_configuration.haml delete mode 100644 src/app/views/templates/_search_packages.haml delete mode 100644 src/app/views/templates/_software_selection.haml delete mode 100644 src/app/views/templates/_templates.haml delete mode 100644 src/app/views/templates/assembly.haml delete mode 100644 src/app/views/templates/collections.haml delete mode 100644 src/app/views/templates/deployment_definition.haml delete mode 100644 src/app/views/templates/edit.haml delete mode 100644 src/app/views/templates/index.haml delete mode 100644 src/app/views/templates/managed_content.haml delete mode 100644 src/app/views/templates/metagroup_packages.haml delete mode 100644 src/app/views/templates/new.haml delete mode 100644 src/app/views/templates/search_packages.haml delete mode 100644 src/app/views/users/_form.haml delete mode 100644 src/app/views/users/edit.haml delete mode 100644 src/app/views/users/index.haml delete mode 100644 src/app/views/users/new.haml delete mode 100644 src/app/views/users/show.haml delete mode 100644 src/config/old_navigation.rb delete mode 100644 src/public/images/dashboard_summary_next.png delete mode 100644 src/public/images/dashboard_summary_prev.png delete mode 100644 src/public/images/icon_dashboard.png delete mode 100644 src/public/stylesheets/images/icon_dashboard.gif delete mode 100644 src/spec/controllers/dashboard_controller_spec.rb
diff --git a/src/app/controllers/builds_controller.rb b/src/app/controllers/builds_controller.rb deleted file mode 100644 index 5f33ba3..0000000 --- a/src/app/controllers/builds_controller.rb +++ /dev/null @@ -1,91 +0,0 @@ -class BuildsController< ApplicationController
- before_filter [:require_user]
- def section_id
- 'build'
- end
- def index
- require_privilege(Privilege::VIEW, Template)
- order = get_order('templates.name')
- @running_images = Image.all(:include => :template, :conditions => ['status IN (?)', Image::ACTIVE_STATES], :order => order)
- @completed_images = Image.all(:include => :template, :conditions => {:status => Image::STATE_COMPLETE}, :order => order)
- @failed_images = Image.all(:include => :template, :conditions => {:status => Image::STATE_FAILED}, :order => order)
- end
- def new
- raise "select template to build" unless id = params[:template_id]
- @tpl = Template.find(id)
- check_permission
- if @tpl.imported
flash[:warning] = "Build imported template is not supported"
redirect_to templates_path
- end
- @all_targets = Image.available_targets
- end
- def create
- if params[:cancel]
redirect_to templates_path
return
- end
- @tpl = Template.find(params[:template_id])
- check_permission
- @all_targets = Image.available_targets
- if params[:targets].blank?
flash.now[:warning] = 'You need to check at least one provider format'
render :action => 'new'
return
- end
- @tpl.upload unless @tpl.uploaded
- errors = {}
- warnings = []
- params[:targets].each do |target|
begin
Image.build(@tpl, target)
rescue ImageExistsError
warnings<< $!.message
rescue
errors[target] = $!.message
end
- end
- flash[:warning] = 'Warning: ' + warnings.join unless warnings.empty?
- if errors.empty?
redirect_to builds_path
- else
flash_error('Error while trying to build image', errors)
render :action => 'new'
- end
- end
- def edit
- # FIXME: is @tpl defined here? do we need check_permission here?
- end
- def update
- # FIXME: is @tpl defined here? do we need check_permission here?
- end
- private
- # TODO: DRY this, is used in templates controller too
- def get_order(default)
- @order_dir = params[:order_dir] == 'desc' ? 'desc' : 'asc'
- @order_field = params[:order_field] || default
- "#{@order_field} #{@order_dir}"
- end
- def flash_error(summary, errs)
- flash.now[:error] ||= {}
- flash.now[:error][:summary] = summary
- flash.now[:error][:failures] ||= {}
- flash.now[:error][:failures].merge!(errs)
- end
- def check_permission
- require_privilege(Privilege::MODIFY, @tpl)
- end
-end diff --git a/src/app/controllers/cloud_accounts_controller.rb b/src/app/controllers/cloud_accounts_controller.rb deleted file mode 100644 index d292f57..0000000 --- a/src/app/controllers/cloud_accounts_controller.rb +++ /dev/null @@ -1,181 +0,0 @@ -# -# Copyright (C) 2010 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 CloudAccountsController< ApplicationController
- before_filter :require_user
- before_filter :load_providers
- helper :providers
- def section_id
- 'administration'
- end
- def index
- @provider = Provider.find(params[:provider_id])
- require_privilege(Privilege::VIEW, CloudAccount, @provider)
- end
- def new
- @provider = Provider.find(params[:provider_id])
- @cloud_account = CloudAccount.new
- @quota = Quota.new
- require_privilege(Privilege::CREATE, CloudAccount, @provider)
- end
- def create
- @provider = Provider.find(params[:provider_id])
- require_privilege(Privilege::CREATE, CloudAccount, @provider)
- @cloud_account = CloudAccount.new(params[:cloud_account])
- @cloud_account.provider = @provider
- @cloud_account.quota = @quota = Quota.new
- if params[:test_account]
test_account(@cloud_account)
render :action => 'new' and return
- end
- limit = params[:quota][:maximum_running_instances] if params[:quota]
- @cloud_account.quota.set_maximum_running_instances(limit)
- if @cloud_account.invalid?
if not @cloud_account.valid_credentials?
flash.now[:error] = "The entered credential information is incorrect"
elsif @cloud_account.errors.on(:username)
flash.now[:error] = "The access key '#{params[:cloud_account][:username]}' has already been taken."
else
flash.now[:error] = "You must fill in all the required fields"
end
render :action => 'new' and return
- end
- @cloud_account.pool_families<< PoolFamily.default
- @cloud_account.save!
- if @cloud_account.populate_realms
flash[:notice] = "Provider account added."
- end
- redirect_to provider_accounts_path(@provider)
- kick_condor
- end
- def edit
- @cloud_account = CloudAccount.find(params[:id])
- @quota = @cloud_account.quota
- @provider = @cloud_account.provider
- require_privilege(Privilege::MODIFY, @cloud_account)
- end
- def update_accounts
- @provider = Provider.find(params[:provider][:id])
- require_privilege(Privilege::MODIFY, CloudAccount, @provider)
- @providers = Provider.list_for_user(@current_user, Privilege::VIEW)
- success = true
- @provider.cloud_accounts.each do |cloud_account|
attributes = params[:cloud_accounts][cloud_account.id.to_s]
password = attributes[:password]
# blank password means the user didn't change it -- don't update it then
if password.blank?
attributes.delete :password
end
cloud_account.quota.maximum_running_instances = quota_from_string(params[:quota][cloud_account.id.to_s][:maximum_running_instances])
private_cert = attributes[:x509_cert_priv_file]
unless private_cert.blank?
attributes[:x509_cert_priv] = private_cert.read
end
attributes.delete :x509_cert_priv_file
public_cert = attributes[:x509_cert_pub_file]
unless public_cert.blank?
attributes[:x509_cert_pub] = public_cert.read
end
attributes.delete :x509_cert_pub_file
begin
cloud_account.update_attributes!(attributes)
cloud_account.quota.save!
rescue
success = false
end
- end
- if success
flash[:notice] = "Account updated."
redirect_to :controller => 'providers', :action => 'accounts', :id => @provider
- else
flash.now[:notice] = "Error updating the cloud account."
render :template => 'provider/accounts'
- end
- end
- def update
- @cloud_account = CloudAccount.find(params[:id])
- @provider = @cloud_account.provider
- require_privilege(Privilege::MODIFY, @cloud_account)
- @quota = @cloud_account.quota
- limit = params[:quota][:maximum_running_instances] if params[:quota]
- @cloud_account.quota.set_maximum_running_instances(limit)
- if @cloud_account.update_attributes(params[:cloud_account])
flash[:notice] = "Cloud Account updated!"
redirect_to provider_accounts_path(@provider)
- else
render :action => :edit
- end
- end
- def key
- @cloud_account = CloudAccount.find(params[:id])
- require_privilege(Privilege::MODIFY,@cloud_account)
- unless @cloud_account.instance_key.nil?
render :text => @cloud_account.instance_key.pem
- end
- end
- def destroy
- account = CloudAccount.find(params[:id])
- provider = account.provider
- require_privilege(Privilege::MODIFY, account)
- if account.destroy
flash[:notice] = "Cloud Account destroyed"
- else
flash[:error] = "Cloud Account could not be destroyed"
- end
- redirect_to provider_accounts_path(provider)
- end
- def test_account(account)
- if account.valid_credentials?
flash.now[:notice] = "Test Connection Success: Valid Account Details"
- else
flash.now[:error] = "Test Connection Failed: Invalid Account Details"
- end
- rescue
- flash.now[:error] = "Test Connection Failed: Could not connect to provider"
- end
- private
- def load_providers
- @providers = Provider.list_for_user(@current_user, Privilege::VIEW)
- end
-end diff --git a/src/app/controllers/dashboard_controller.rb b/src/app/controllers/dashboard_controller.rb deleted file mode 100644 index 5254dd7..0000000 --- a/src/app/controllers/dashboard_controller.rb +++ /dev/null @@ -1,81 +0,0 @@ -# -# 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
- before_filter :require_user
- before_filter :get_nav_items, :only => [:index]
- def ajax?
- return params[:ajax] == "true"
- end
- def section_id
- 'operation'
- end
- def provider_qos_avg_time_to_submit_graph
- params[:provider] = Provider.find(params[:id])
- graph = GraphService.dashboard_qos_avg_time_to_submit_graph(current_user, params)[params[:provider]][Graph::QOS_AVG_TIME_TO_SUBMIT]
- respond_to do |format|
format.svg { render :xml => graph.svg}
- end
- end
- def quota_usage_graph
- if params[:cloud_account_id]
params[:parent] = CloudAccount.find(params[:cloud_account_id])
- elsif params[:pool_id]
params[:parent] = Pool.find(params[:pool_id])
- else
return nil
- end
- graphs = GraphService.dashboard_quota_usage(current_user, params)
- graph = graphs[params[:parent]][Graph.get_quota_usage_graph_name(params[:resource_name])]
- respond_to do |format|
format.svg { render :xml => graph.svg}
- end
- end
- def provider_instances_graph
- graph = GraphService.dashboard_instances_by_provider(current_user, params)[Graph::INSTANCES_BY_PROVIDER_PIE]
- respond_to do |format|
format.svg { render :xml => graph.svg}
- end
- end
- def monitor
- end
- def index
- # FIXME filter to just those that the user has access to
- @cloud_accounts = CloudAccount.find(:all)
- render :action => 'monitor'
- end
- def hide_getting_started
- cookies["#{@current_user.login}_hide_getting_started"] = { :value => true, :expires => 1.year.from_now }
- redirect_to :action => 'show'
- end
-end diff --git a/src/app/controllers/hardware_profiles_controller.rb b/src/app/controllers/hardware_profiles_controller.rb deleted file mode 100644 index d18110c..0000000 --- a/src/app/controllers/hardware_profiles_controller.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (C) 2010 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 HardwareProfilesController< ApplicationController
- before_filter :require_user
- def index
- @hardware_profiles = HardwareProfile.find(:all)
- end
- def new
- end
- def create
- end
- def delete
- end
-end diff --git a/src/app/controllers/images_controller.rb b/src/app/controllers/images_controller.rb deleted file mode 100644 index da6998b..0000000 --- a/src/app/controllers/images_controller.rb +++ /dev/null @@ -1,57 +0,0 @@ -# -# 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 ImagesController< ApplicationController
- before_filter :require_user
- def section_id
- 'build'
- end
- def index
- end
- def cancel
- Image.update(params[:id], :status => Image::STATE_CANCELED)
- redirect_to :controller => 'templates', :action => 'new', :params => {'image_descriptor[id]' => params[:template_id], :tab => 'software'}
- end
- def show
- if params[:create_instance]
redirect_to :controller => 'instances', :action => 'new', 'instance[image_id]' => (params[:ids] || []).first
- end
- require_privilege(Privilege::VIEW)
- @order_dir = params[:order_dir] == 'desc' ? 'desc' : 'asc'
- @order = params[:order] || 'name'
- @images = Image.search_filter(params[:search], Image::SEARCHABLE_COLUMNS).paginate(
:page => params[:page] || 1,
:order => @order + ' ' + @order_dir,
:include => :instances
- )
- if request.xhr? and params[:partial]
render :partial => 'images'
return
- end
- end
-end diff --git a/src/app/controllers/instances_controller.rb b/src/app/controllers/instances_controller.rb deleted file mode 100644 index e877729..0000000 --- a/src/app/controllers/instances_controller.rb +++ /dev/null @@ -1,198 +0,0 @@ -# -# 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.
-require 'util/condormatic'
-class InstancesController< ApplicationController
- before_filter :require_user, :get_nav_items
- before_filter :instance, :only => [:show, :key]
- layout :layout
- def section_id
- 'runtime'
- end
- def layout
- return "aggregator" unless request.xhr?
- end
- def index
- @pools = Pool.list_for_user(@current_user, Privilege::MODIFY, :target_type => Instance)
- @order_dir = params[:order_dir] == 'desc' ? 'desc' : 'asc'
- @order_field = params[:order_field] || 'name'
- # we can't use pool.instances, because we need custom sorting
- @sorted_instances_by_pool = {}
- Instance.find(
:all,
:include => [:template, :hardware_profile, :owner, :pool],
:order => @order_field + ' ' + @order_dir
- ).each do |inst|
pool_id = inst.pool.id
next unless @pools.find {|p| p.id == pool_id}
(@sorted_instances_by_pool[pool_id] ||= [])<< inst
- end
- end
- def show
- end
- def key
- unless @instance.instance_key.nil?
send_data @instance.instance_key.pem,
:filename => "#{@instance.instance_key.name}.pem",
:type => "text/plain"
return
- end
- flash[:warning] = "SSH Key not found for this Instance."
- redirect_to :action => "show", :id => @instance
- end
- def new
- @instance = Instance.new(params[:instance])
- require_privilege(Privilege::CREATE, Instance, @instance.pool) if @instance.pool
- # FIXME: we need to list only templates for particular user,
- # => TODO: add TEMPLATE_* permissions
- @templates = Template.paginate(
:page => params[:page] || 1,
:include => {:images => :replicated_images},
:conditions => "replicated_images.uploaded = 't'"
- )
- end
- def configure
- @instance = Instance.new(params[:instance])
- require_privilege(Privilege::CREATE, Instance, @instance.pool)
- @hardware_profiles = HardwareProfile.find(:all, :include => :architecture,
:conditions => {:provider_id => nil,
'hardware_profile_properties.value' => @instance.template.architecture})
- end
- def create
- if params[:cancel]
redirect_to :action => 'new', :instance => {:pool_id => params[:instance][:pool_id]}
return
- end
- @instance = Instance.new(params[:instance])
- @instance.state = Instance::STATE_NEW
- @instance.owner = current_user
- require_privilege(Privilege::CREATE, Instance,
Pool.find(@instance.pool_id))
- #FIXME: This should probably be in a transaction
- if @instance.save!
# set owner permissions:
@instance.assign_owner_roles(current_user)
@task = InstanceTask.new({:user => current_user,
:task_target => @instance,
:action => InstanceTask::ACTION_CREATE})
if @task.save
condormatic_instance_create(@task)
if Quota.can_start_instance?(@instance, nil)
flash[:notice] = "Instance added."
else
flash[:warning] = "Quota Exceeded: Instance will not start until you have free quota"
end
else
@pool = @instance.pool
render :action => 'configure'
end
redirect_to :action => 'index'
- else
@hardware_profiles = HardwareProfile.all
render :action => 'configure'
- end
- end
- def instance_action
- params.keys.each do |param|
if param =~ /^launch_instance_(\d+)$/
redirect_to :action => 'new', 'instance[pool_id]' => $1
return
end
- end
- @instance = Instance.find((params[:id] || []).first)
- require_privilege(Privilege::USE,@instance)
- if params[:instance_details]
render :action => 'show'
return
- end
- if params[:remove_failed]
action = remove_failed
- else
# action list will be longer (restart, start, stop..)
action = if params[:shutdown]
'stop'
#elsif params[:restart]
# 'restart'
end
unless @instance.valid_action?(action)
raise ActionError.new("'#{action}' is an invalid action.")
end
# not sure if task is used as everything goes through condor
#permissons check here
@task = @instance.queue_action(@current_user, action)
unless @task
raise ActionError.new("#{action} cannot be performed on this instance.")
end
case action
when 'stop'
condormatic_instance_stop(@task)
when 'destroy'
condormatic_instance_destroy(@task)
when 'start'
condormatic_instance_create(@task)
else
raise ActionError.new("Sorry, action '#{action}' is currently not supported by condor backend.")
end
- end
- flash[:notice] = "#{@instance.name}: #{action} was successfully queued."
- redirect_to :action => 'index'
- end
- def delete
- end
- def remove_failed
- action ='remove failed'
- raise ActionError.new("#{action} cannot be performed on this instance.") unless
@instance.state == Instance::STATE_ERROR
- condormatic_instance_reset_error(@instance)
- action
- end
- private
- def instance
- @instance = Instance.find(params[:id])
- require_privilege(Privilege::VIEW, @instance)
- end
-end diff --git a/src/app/controllers/pools_controller.rb b/src/app/controllers/pools_controller.rb deleted file mode 100644 index c553318..0000000 --- a/src/app/controllers/pools_controller.rb +++ /dev/null @@ -1,138 +0,0 @@ -# -# 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.
-require 'util/condormatic'
-class PoolsController< ApplicationController
- before_filter :require_user, :get_nav_items
- def section_id
- 'administration'
- end
- def index
- @header = [
{ :name => "Pool name", :sort_attr => :name },
{ :name => "% Quota used", :sortable => false },
{ :name => "Quota (Instances)", :sort_attr => "quotas.total_instances"},
{ :name => "Pool Family", :sort_attr => "pool_families.name" }
- ]
- @pools = Pool.paginate(:all, :include => [ :quota, :pool_family ],
:page => params[:page] || 1,
:order => (params[:order_field] || 'name') +' '+ (params[:order_dir] || 'asc')
- )
- end
- def show
- @pool = Pool.find(params[:id])
- require_privilege(Privilege::VIEW, @pool)
- end
- def edit
- @pool = Pool.find(params[:id])
- require_privilege(Privilege::MODIFY, @pool)
- end
- def list
- #FIXME: clean this up, many error cases here
- @pool = Pool.find(params[:id])
- # FIXME: really we need perm-filtered list here
- require_privilege(Privilege::VIEW, @pool)
- @pool.reload
- @order_dir = params[:order_dir] == 'desc' ? 'desc' : 'asc'
- @order = params[:order] || 'name'
- @instances = Instance.search_filter(params[:search], Instance::SEARCHABLE_COLUMNS).paginate(
:page => params[:page] || 1,
:order => @order + ' ' + @order_dir,
:conditions => {:pool_id => @pool.id}
- )
- if request.xhr? and params[:partial]
render :partial => 'instance/instances'
return
- end
- end
- def hardware_profiles
- @pool = Pool.find(params[:id])
- @hardware_profiles = @pool.hardware_profiles
- require_privilege(Privilege::VIEW, @pool)
- end
- def realms
- @pool = Pool.find(params[:id])
- @realm_names = @pool.realms
- require_privilege(Privilege::VIEW, @pool)
- end
- def new
- require_privilege(Privilege::CREATE, Pool)
- @pools = Pool.list_for_user(@current_user, Privilege::MODIFY)
- @pool = Pool.new
- end
- def create
- require_privilege(Privilege::CREATE, Pool)
- #FIXME: This should probably be in a transaction
- @pool = Pool.new(params[:pool])
- # FIXME: do we need any more handling around save failures? What if perm
- # creation fails?
- quota = Quota.new
- quota.save!
- @pool.quota_id = quota.id
- @pool.pool_family = PoolFamily.default
- if @pool.save
flash[:notice] = "Pool added."
redirect_to :action => 'show', :id => @pool.id
- else
render :action => :new
- end
- end
- def manage_pool
- type = params[:commit]
- pool_id = params[:pool_checkbox]
- if type&& Pool.exists?(pool_id)
if type == "edit"
redirect_to :action => 'edit', :id => pool_id
elsif type == "delete"
require_privilege(Privilege::MODIFY, Pool.find(pool_id))
params[:id] = pool_id
destroy
end
- else
flash[:notice] = "Error performing this operation"
redirect_to pool_path
- end
- end
- def delete
- end
- kick_condor
-end diff --git a/src/app/controllers/providers_controller.rb b/src/app/controllers/providers_controller.rb deleted file mode 100644 index 57b4240..0000000 --- a/src/app/controllers/providers_controller.rb +++ /dev/null @@ -1,151 +0,0 @@ -# -# 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 ProvidersController< ApplicationController
- before_filter :require_user
- before_filter :load_providers, :only => [:index, :show, :edit, :new, :accounts, :list]
- def section_id
- 'administration'
- end
- def index
- end
- def show
- @provider = Provider.find(:first, :conditions => {:id => params[:id]})
- require_privilege(Privilege::VIEW, @provider)
- end
- def edit
- @providers = Provider.list_for_user(@current_user, Privilege::VIEW)
- @provider = Provider.find(:first, :conditions => {:id => params[:id]})
- require_privilege(Privilege::MODIFY, @provider)
- end
- def new
- require_privilege(Privilege::CREATE, Provider)
- @providers = Provider.list_for_user(@current_user, Privilege::MODIFY)
- @provider = Provider.new(params[:provider])
- kick_condor
- end
- def create
- require_privilege(Privilege::CREATE, Provider)
- @providers = Provider.list_for_user(@current_user, Privilege::MODIFY)
- @provider = Provider.new(params[:provider])
- if params[:test_connection]
test_connection(@provider)
render :action => "new"
- else
@provider.set_cloud_type!
if @provider.save&& @provider.populate_hardware_profiles
flash[:notice] = "Provider added."
redirect_to :action => "show", :id => @provider
else
flash[:notice] = "Cannot add the provider."
render :action => "new"
end
kick_condor
- end
- end
- def update
- @providers = Provider.list_for_user(@current_user, Privilege::MODIFY)
- @provider = Provider.find(:first, :conditions => {:id => params[:id]})
- require_privilege(Privilege::MODIFY, @provider)
- previous_cloud_type = @provider.cloud_type
- @provider.update_attributes(params[:provider])
- if params[:test_connection]
test_connection(@provider)
render :action => "edit"
- else
@provider.set_cloud_type!
if previous_cloud_type != @provider.cloud_type
@provider.errors.add :url, "points to a different provider"
end
if @provider.errors.empty? and @provider.save
flash[:notice] = "Provider updated."
redirect_to :action => "show", :id => @provider
else
flash[:notice] = "Cannot update the provider."
render :action => "edit"
end
kick_condor
- end
- end
- def destroy
- if request.post? || request.delete?
@provider = Provider.find(params[:id])
require_privilege(Privilege::MODIFY, @provider)
if @provider.destroy and @provider.destroyed?
redirect_to :action => "index"
flash[:notice] = "Provider Deleted"
return
end
flash[:error] = {
:summary => "Failed to delete Provider",
:failures => @provider.errors.full_messages,
}
- end
- render :action => 'show'
- end
- def hardware_profiles
- @provider = Provider.find(params[:id])
- @hardware_profiles = @provider.hardware_profiles
- require_privilege(Privilege::VIEW, @provider)
- end
- def realms
- @provider = Provider.find(params[:id])
- @realm_names = @provider.realms.collect { |r| r.name }
- require_privilege(Privilege::VIEW, @provider)
- end
- def settings
- @provider = Provider.find(params[:id])
- require_privilege(Privilege::VIEW, @provider)
- end
- def list
- end
- def test_connection(provider)
- @provider.errors.clear
- if @provider.connect
flash[:notice] = "Successfuly Connected to Provider"
- else
flash[:notice] = "Failed to Connect to Provider"
@provider.errors.add :url
- end
- end
- protected
- def load_providers
- @providers = Provider.list_for_user(@current_user, Privilege::VIEW)
- end
-end diff --git a/src/app/controllers/settings_controller.rb b/src/app/controllers/settings_controller.rb deleted file mode 100644 index 0717fc0..0000000 --- a/src/app/controllers/settings_controller.rb +++ /dev/null @@ -1,73 +0,0 @@ -# -# 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
- before_filter :require_user
- # Settings MetaData Keys
- SELF_SERVICE_DEFAULT_QUOTA = "self_service_default_quota"
- KEYS = [SELF_SERVICE_DEFAULT_QUOTA]
- def section_id
- "system_settings"
- end
- def index
- @providers = Provider.list_for_user(@current_user, Privilege::VIEW)
- end
- def self_service
- require_privilege(Privilege::MODIFY)
- @self_service_default_quota = MetadataObject.lookup(SELF_SERVICE_DEFAULT_QUOTA)
- end
- def general_settings
- require_privilege(Privilege::MODIFY)
- end
- def update
- KEYS.each do |key|
if params[key]
if key == SELF_SERVICE_DEFAULT_QUOTA
@self_service_default_quota = MetadataObject.lookup(key)
if !@self_service_default_quota.update_attributes(params[key])
flash[:notice] = "Could not update the default quota"
render :self_service
return
end
elsif key == SELF_SERVICE_DEFAULT_POOL
if Pool.exists?(params[key])
MetadataObject.set(key, Pool.find(params[key]))
end
elsif key == SELF_SERVICE_DEFAULT_ROLE
if Role.exists?(params[key])
MetadataObject.set(key, Role.find(params[key]))
end
else
MetadataObject.set(key, params[key])
end
end
- end
- flash[:notice] = "Settings Updated!"
- redirect_to :action => 'self_service'
- end
-end diff --git a/src/app/controllers/templates_controller.rb b/src/app/controllers/templates_controller.rb deleted file mode 100644 index 51ed922..0000000 --- a/src/app/controllers/templates_controller.rb +++ /dev/null @@ -1,267 +0,0 @@ -require 'util/repository_manager'
-class TemplatesController< ApplicationController
- before_filter :require_user
- layout :layout
- def layout
- return "aggregator" unless request.xhr?
- end
- def section_id
- 'build'
- end
- def index
- @templates = Template.list_for_user(current_user,
Privilege::VIEW,
:include => :images,
:order => get_order('name'))
- end
- def index_action
- if params[:new_template]
redirect_to new_template_path
- elsif params[:assembly]
redirect_to assembly_template_path(:id => params[:ids].to_a.first)
- elsif params[:deployment_definition]
redirect_to deployment_definition_template_path(:id => params[:ids].to_a.first)
- elsif params[:delete]
redirect_to destroy_multiple_templates_path(:ids => params[:ids].to_a)
- elsif params[:edit]
if id = get_selected_id
redirect_to edit_template_path(:id => id)
else
redirect_to templates_path
end
- elsif params[:build]
if id = get_selected_id
redirect_to new_build_path(:template_id => id)
else
redirect_to templates_path
end
- else
raise 'Unknown action'
- end
- end
- # Since the template form submission can mean multiple things,
- # we dispatch based on form parameters here
- def dispatch
- if params[:save]
create
- elsif params[:cancel]
redirect_to templates_path
- elsif params[:add_software_form]
collections
- elsif params[:collections]
collections
- elsif pkg = params.keys.find { |k| k =~ /^remove_package_(.*)$/ }
# actually remove the package from list
params[:packages].delete($1) if params[:packages]
new
- elsif params[:add_selected]
new
- elsif params[:cancel_add_software]
params[:selected_packages] = params[:packages]
params[:selected_groups] = params[:groups]
params[:cached_packages] = []
new
- elsif params.include?('metagroup_packages')
metagroup_packages
- elsif params[:package_search]
search_packages
- else
raise "unknown action"
- end
- end
- def new
- check_create_permission
- # can't use @template variable - is used by compass (or something other)
- @tpl = Template.new(params[:tpl])
- @repository_manager = RepositoryManager.new(:repositories => params[:repository] || @tpl.platform)
- @tpl.add_software(params[:packages].to_a + params[:selected_packages].to_a + params[:cached_packages].to_a,
params[:groups].to_a + params[:selected_groups].to_a)
- render :action => :new
- end
- def edit
- @tpl = Template.find(params[:id])
- check_edit_permission
- @tpl.attributes = params[:tpl] unless params[:tpl].blank?
- @repository_manager = RepositoryManager.new(:repositories => params[:repository] || @tpl.platform)
- render :action => :edit
- end
- def create
- check_create_permission
- @tpl = Template.new(params[:tpl])
- @tpl.packages = params[:packages]
- if @tpl.save
flash[:notice] = "Template saved."
@tpl.set_complete
redirect_to templates_path
- else
@repository_manager = RepositoryManager.new(:repositories => params[:repository] || @tpl.platform)
render :action => 'new'
- end
- end
- def update
- @tpl = Template.find(params[:id])
- @tpl.packages = []
- check_edit_permission
- if @tpl.update_attributes(params[:tpl])
@tpl.set_complete
flash[:notice] = "Template updated."
redirect_to templates_path
- else
@repository_manager = RepositoryManager.new(:repositories => params[:repository] || @tpl.platform)
render :action => 'edit'
- end
- end
- def search_packages
- set_package_vars
- @page = get_page
- @cached_packages = params[:cached_packages].to_a + params[:selected_packages].to_a
- @searched_packages = params[:package_search].empty? ? [] : @repository_manager.search_package(
params[:package_search]).paginate(:page => @page, :per_page => 60)
- if request.xhr?
render :partial => 'search_packages'
- else
render :search_packages
- end
- end
- def metagroup_packages
- set_package_vars
- @metagroup_packages = @repository_manager.metagroup_packages(params[:metagroup_packages])
- if request.xhr?
render :partial => 'metagroup_packages'
- else
render :metagroup_packages
- end
- end
- def collections
- set_package_vars
- @collections = @repository_manager.groups
- if request.xhr?
render :partial => 'collections'
- else
render :collections
- end
- end
- def content_selection
- set_package_vars(true)
- @collections = @repository_manager.groups
- render :collections
- end
- def managed_content
- if params[:template_id].blank?
@tpl = Template.new
check_create_permission
- else
@tpl = Template.find(params[:template_id])
check_edit_permission
- end
- @tpl.add_software(params[:packages].to_a + params[:selected_packages].to_a,
params[:groups].to_a + params[:selected_groups].to_a)
- render :layout => false
- end
- def destroy_multiple
- ids = params[:ids].to_a
- if ids.empty?
flash[:notice] = "No Template Selected"
- else
errs = {}
Template.find(ids).each do |t|
if check_permission(Privilege::MODIFY, t)
t.destroy
errs[t.name] = t.errors.full_messages.join(". ") unless t.destroyed?
else
errs[t.name] = "You don't have permission to delete #{t.name}"
end
end
if errs.empty?
flash[:notice] = 'Template deleted'
else
flash_error('Error while deleting template', errs)
end
- end
- redirect_to templates_path
- end
- def assembly
- # FIXME: do we need perm check here?
- end
- def deployment_definition
- # FIXME: do we need perm check here?
- @all_targets = Image.available_targets
- end
- private
- def set_package_vars(set_all = false)
- if params[:id].blank?
@tpl = Template.new
check_create_permission
- else
@tpl = Template.find(params[:id])
check_edit_permission
- end
- @tpl.attributes = params[:tpl] unless params[:tpl].nil?
- @repository_manager = RepositoryManager.new(:repositories => params[:repository] || @tpl.platform)
- @groups = @repository_manager.groups
- @categories = @repository_manager.categories if not request.xhr? or set_all
- @metagroups = @repository_manager.metagroups if not request.xhr? or set_all
- @tpl.add_software(params[:packages].to_a, params[:groups].to_a)
- end
- def get_order(default)
- @order_dir = params[:order_dir] == 'desc' ? 'desc' : 'asc'
- @order_field = params[:order_field] || default
- "#{@order_field} #{@order_dir}"
- end
- def flash_error(summary, errs)
- flash.now[:error] ||= {}
- flash.now[:error][:summary] = summary
- flash.now[:error][:failures] ||= {}
- flash.now[:error][:failures].merge!(errs)
- end
- def check_create_permission
- require_privilege(Privilege::CREATE, Template)
- end
- def check_edit_permission
- require_privilege(Privilege::MODIFY, @tpl)
- end
- def get_selected_id
- ids = params[:ids].to_a
- if ids.size != 1
flash[:warning] = ids.empty? ? 'No Template Selected' : 'You can select only one template'
return
- end
- return ids.first
- end
- def get_page
- if params[:page] == 'Previous'
return params[:old_page].to_i - 1
- elsif params[:page] == 'Next'
return params[:old_page].to_i + 1
- else
return params[:page].blank? ? 1 : params[:page].to_i
- end
- end
-end diff --git a/src/app/controllers/users_controller.rb b/src/app/controllers/users_controller.rb deleted file mode 100644 index 04754a6..0000000 --- a/src/app/controllers/users_controller.rb +++ /dev/null @@ -1,145 +0,0 @@ -# -# 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 UsersController< ApplicationController
- before_filter :require_user, :only => [:show, :edit, :update, :index, :destroy]
- before_filter :current_user
- def new
- require_privilege(Privilege::CREATE, User) unless current_user.nil?
- @user = User.new
- @user.quota = Quota.new
- end
- def create
- require_privilege(Privilege::CREATE, User) unless current_user.nil?
- @user = User.new(params[:user])
- if params[:commit] == "Reset"
redirect_to :action => :new
return
- end
- @registration = RegistrationService.new(@user)
- if @registration.save
if @current_user
flash[:notice] = "User registered!"
redirect_to users_path
else
flash[:notice] = "You have successfully registered!"
redirect_to :dashboard
end
- else
flash[:warning] = "user registration failed: #{@registration.error}"
render :action => :new
- end
- end
- def show
- if params.has_key?(:id)&& params[:id] != "show"
@user = User.find(params[:id])
- else
@user = current_user
- end
- require_privilege(Privilege::VIEW, User) unless current_user == @user
- @quota_resources = @user.quota.quota_resources()
- end
- def edit
- @user = params[:id] ? User.find(params[:id]) : current_user
- require_privilege(Privilege::MODIFY, User) unless current_user == @user
- end
- def update
- @user = params[:user][:id] ? User.find(params[:user][:id]) : @current_user
- require_privilege(Privilege::MODIFY, User) unless current_user == @user
- if params[:commit] == "Save"
if @user
if @user.update_attributes(params[:user])
flash[:notice] = "User updated!"
if @user == current_user
redirect_to :dashboard
else
redirect_to users_path
end
else
render :action => :edit
end
end
- elsif params[:commit] == "Reset"
redirect_to :action => "edit", :id => @user.id
- end
- end
- def index
- require_privilege(Privilege::VIEW, User)
- @users = User.all
- sort_order = params[:sort_by].nil? ? "login" : params[:sort_by]
- if sort_order == "percentage_quota_used"
@users = User.all
@users.sort! {|x,y| y.quota.percentage_used<=> x.quota.percentage_used }
- elsif sort_order == "quota"
@users = User.all
@users.sort! {|x,y| (x.quota.maximum_running_instances and y.quota.maximum_running_instances) ? x.quota.maximum_running_instances<=> y.quota.maximum_running_instances : (x ? 1 : -1) }
- else
@users = User.find(:all, :order => sort_order)
- end
- end
- def manage_user
- @current_user = current_user
- type = params[:commit]
- user_id = params[:user_checkbox]
- if type&& User.exists?(user_id)
if type == "edit"
redirect_to :action => 'edit', :id => user_id
elsif type == "delete"
params[:id] = user_id
destroy
end
- else
flash[:notice] = "Error performing this operation"
redirect_to users_path
- end
- end
- def destroy
- require_privilege(Privilege::MODIFY, User)
- if request.post? || request.delete?
@user = User.find(params[:id])
if @user == @current_user
flash[:notice] = "Can not delete the currently logged in user!"
elsif @user.destroy
flash[:notice] = "User Deleted"
else
flash[:error] = {
:summary => "Failed to delete User",
:failures => @user.errors.full_messages,
}
end
- end
- redirect_to users_path
- end
- def section_id
- "loginpage"
- end
-end diff --git a/src/app/helpers/dashboard_helper.rb b/src/app/helpers/dashboard_helper.rb deleted file mode 100644 index 86f0124..0000000 --- a/src/app/helpers/dashboard_helper.rb +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright (C) 2010 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.
-module DashboardHelper
- def monitor_quota_value(name, value, unit)
- name=content_tag 'td', :class => 'first nowrap' do
name
- end
- value=content_tag 'td', :class => 'graph' do
content_tag 'div', :class => 'percentBlock' do
value
end
- end
- unit=content_tag 'td' do
unit
- end
- "#{name}#{value}#{unit}"
- end
- def monitor_bar_value(value, opts={})
- bar=content_tag 'td', :class => "graph" do
percent_block=content_tag 'div', :class => 'percentBlock' do
# TODO: Count text-indent value correctly here
bar_style = "width:#{value}%;text-indent:14%"
content_tag 'div', :class => 'percentBlockInner good', :style => bar_style do
"#{value}%"
end
end
if opts[:min] and opts[:max]
min=content_tag 'div', :class => 'min' do "#{opts[:min]}% Min" ; end
max=content_tag 'div', :class => 'max' do "#{opts[:max]}% Max" ; end
"#{percent_block}#{min}#{max}"
else
percent_block
end
- end
- total=content_tag 'td' do
"#{opts[:total]}"
- end
- "#{bar}#{total}"
- end
-end diff --git a/src/app/stylesheets/aggregator.scss b/src/app/stylesheets/aggregator.scss deleted file mode 100644 index 381fc6d..0000000 --- a/src/app/stylesheets/aggregator.scss +++ /dev/null @@ -1,1325 +0,0 @@ -@charset "UTF-8"; -@import "base";
-html { -}
-a {
- color: $dcprimary;
- text-decoration: none;
-&:hover,&:focus {
- color: lighten($dcprimary, 20%);
- text-decoration: underline;
- }
-&:active {
- color: darken($dcprimary, 20%);
- }
-}
-/* TEXT ENTRIES */ -input,textarea {
- @include inset-box-shadow(0,1px,1px,rgba(0, 0, 0, 0.2));
- border: 1px solid darken($strokecl,20%);
- background-color: #f0f0f0;
- background: #f0f0f0 url(../../images/input-bg.png) repeat-x 0 0;
- padding: 4px;
- margin: 0;
-&:focus {
- border-width: 2px;
- padding: 3px;
- background-color: #fff;
- outline: none;
- }
-&.disabled,&[disabled] {
- opacity: 0.6;
- }
-}
- input[type="search"] {
- @include border-radius(20px);
- padding: 4px 30px 4px 10px;
-&:focus {
padding: 3px 29px 3px 9px;
- }
- }
- /* CHECKBOXES and RADIOBUTTONS*/
- input[type="checkbox"],input[type="radio"] {
- background-color: transparent;
- border: none;
- margin: 0;
- padding: 2px;
-&:focus {
border-width: 1px;
padding: 1px;
- }
- }
-/* FILE INPUT */ -input[type="file"] {
- /* FIXME */
-}
-/* compensate grid_* for padding+border of the inputboxes and textareas */ -input.grid_1 { width: 30px !important; } -input.grid_2 { width: 90px !important; }
- .grid_2 input[type="file"] { width: 90px; }
-input.grid_3 { width: 150px !important; }
- .grid_3 input[type="search"] { width: 118px; }
- .grid_3 input[type="file"] { width: 150px; }
-input.grid_4 { width: 210px !important; } -input.grid_5 { width: 270px !important; } -input.grid_6 { width: 330px !important; } -input.grid_7 { width: 390px !important; } -input.grid_8 { width: 450px !important; }
-/* BUTTONS */ -input[type='submit'],button,.button {
- font-family: $screenfont; /* for some reason ff3.6 won't inherit from body */
- font-size: 10px;
- display: inline-block;
- background: -moz-linear-gradient(top, #f9f9f9, #f0f0f0, #e5e5e5, #e9e9e9);
- background: -webkit-gradient(linear, left top, left bottom, from(#f9f9f9), color-stop(0.9, #e5e5e5), to(#e9e9e9));
- @include no-box-shadow;
- border: 1px solid darken($strokecl, 20%);
- color: #221e1f;
- cursor: pointer;
- margin: 4px;
- padding: 4px 12px;
- @include border-radius(5px);
- @include text-shadow(0, 1px, 0, #fff);
- min-height: 14px;
- .nomargin {
- margin: 0;
- }
-&:hover {
- background: -moz-linear-gradient(top, #fff, #fff, #cfcfcf);
- background: -webkit-gradient(linear, left top, left bottom, from(#fff), color-stop(0.6, #fff), to(#cfcfcf));
- @include box-shadow(0, 1px, 2px, rgba(0,0,0,0.5));
- text-decoration: none;
- color: black;
- }
-&:active {
- background: -moz-linear-gradient(top, #c2c3c0, #e4e5e4);
- background: -webkit-gradient(linear, left top, left bottom, from(#c2c3c0), to(#e4e5e4));
- box-shadow: none;
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- padding: 5px 12px 3px;
- text-decoration: none;
- }
-&:focus {
- text-decoration: none;
- color: #000;
- border-width: 2px;
- padding: 3px 11px;
- }
-&.dialogbutton {
- float: right;
- margin-left: 3px;
- margin: 40px 4px 4px;
- }
-&.formbutton {
- display: inline-block;
- margin-left: 3px;
- margin: 40px 4px 4px;
- float: left;
- }
-&.actionlink {
- margin: 40px 0 0;
- }
-&.linkbutton {
- background: none;
- border:0;
- margin:4px 4px 4px 5px;
- color: $dcprimary;
- text-decoration: none;
- font:13px/1.5 "Liberation Sans","Droid Sans",Helvetica,Arial,sans-serif;
-&:hover {
@include box-shadow(0, 0, 0, rgba(0,0,0,0));
text-decoration: underline;
color: lighten($dcprimary,20%);
- }
-&:active {
color: darken($dcprimary, 20%);
font:13px/1.5 "Liberation Sans","Droid Sans",Helvetica,Arial,sans-serif;
margin:4px 4px 4px 5px;
- }
- }
-&.disabled,&[disabled] {
- cursor: default;
- background: transparent;
- opacity: 0.6;
- /* @include no-box-shadow; */
-&:hover {
background: transparent;
text-decoration: none;
@include no-box-shadow;
- }
- }
-&.iconbutton {
- display: inline-block;
- }
-&.tiny {
- padding: 4px;
- margin: 0;
-&:active,&:focus {
margin: 0;
padding: 3px;
- }
- }
-}
-h1,h2,h3,h4,h5 {
- text-transform: uppercase;
- color: $headercl;
- margin-top: 1em;
-&:first-child {
- margin-top: 0;
- }
-}
-h1 { font-size: 140%; } -h2 { font-size: 130%; } -h3 {
- font-size: 120%;
-&.gap {
- margin: 3em 0 1em;
- }
-} -h4 {
- font-size: 110%;
-&.legend {
- margin-bottom: 4px;
- }
-} -h5 { font-size: 80%; }
-.clear {
- clear: both;
-}
-.wrap { /* wrapper around floated elements */
- overflow: hidden;
- margin-bottom: 2em;
-}
-.nomargin {
- margin: none;
-}
-.la { text-align: left; } -.ra { text-align: right; } -.fr { float: right; } -.fl { float: left; }
-.twocolumn {
- @include column-count(2);
- @include column-gap(10px);
-}
-.placeholder { margin-bottom: 2em; } -.disabled, a[href="#"] { opacity: 0.6; filter: alpha(opacity=60); cursor: default !important; } -.nomargin { margin: 0; } -.nowrap { white-space: nowrap; } -.gap { margin-bottom: 4em; } -.padforicon {
- padding-right: 30px;
- position: relative;
-} -.pointercursor { cursor: pointer; } -.nospace {
- margin: 0 !important;
- padding: 0 !important;
-}
-div,section,fieldset {
- display: block;
- overflow: hidden; /* force to wrap floats */
-}
-/* TABLES */
-table {
- border-collapse: collapse;
- border: 1px solid $strokecl;
- margin: 10px 0 40px; width: 100%;
- font-size: 95%;
- thead {
- background-color: lighten($strokecl,8%);
- th {
font-size: 95%;
padding: 2px 6px;
font-family: $headlinefont;
color: lighten($headercl,20%);
text-transform: uppercase;
border-right: 1px dotted darken($strokecl,20%);
-&.active { -&.desc {
background: #fff url(../../images/order-desc.png) no-repeat center right;
}
-&.asc {
background: #fff url(../../images/order-asc.png) no-repeat center right;
}
}
-&.show {
border: 0px;
width: 50%
}
a, a:hover, a:active {
display: block;
margin: 0;
color: inherit;
text-decoration: none;
}
- }
- }
- td {
- padding: 4px;
- vertical-align: top;
- min-height: 16px;
- }
-&.noborder {
- border: none;
- thead {
background-color: transparent;
th {
border: none;
span {
color: lighten($headercl,30%);
}
}
- }
- td {
color: #888;
-&.graph {
width: 102px;
height: 4em;
}
.percentBlock {
display: block;
border:1px solid #909090;
padding: 0;
width:100px;
font-size: 9px;
text-align: center;
color: #555;
.percentBlockInner {
}
.good {
background-color: $goodcl;
@include gradient-2p-linear(lighten($goodcl,30%),$goodcl);
}
.ok {
background-color: $okcl;
@include gradient-2p-linear(lighten($okcl,30%),$okcl);
}
.bad {
background-color: $badcl;
@include gradient-2p-linear(lighten($badcl,30%),$badcl);
}
}
.min {
background: url(../../images/arrow-min.png) no-repeat top center;
float:left;
padding-top:5px;
width:50px;
}
.max {
background: url(../../images/arrow-max.png) no-repeat top center;
float:left;
padding-top:5px;
width:50px;
}
- }
- }
-&.gap {
- margin-bottom: 7em;
- }
-}
-.action {
- background: url(../../images/icons/action-icons.png) no-repeat 0 0;
-&:hover {
- background: url(../../images/icons/action-icons.png) no-repeat 0 0;
- }
-&:active {
- background: url(../../images/icons/action-icons.png) no-repeat 0 0;
- }
-} -input[type='submit'].icon {
- border: none;
- background: transparent;
- font-size: 100%;
- padding: 0;
-&:hover {
- @include no-box-shadow;
- color: $dcprimary;
-&[disabled] {
color: #000;
- }
- }
-}
-.actionsidebar {
- border-right: 1px solid darken($footerbg, 10%);
- width: 159px !important;
- dt {
- background-color: $footerbg;
- border-bottom: 1px solid darken($footerbg, 10%);
- border-top: 1px solid darken($footerbg, 10%);
- color: $headercl;
- font-family: $headlinefont;
- font-size: 110%;
- margin: 3px 0 20px;
- padding:14px 10px 12px;
- text-transform: uppercase;
- }
- dd {
- margin: 0 0 0 10px;
- font-size: 110%;
- position: relative;
- a {
display: block;
padding: 4px 4px 4px 20px;
-&.selected {
background: url("../../images/actionsidebar-bullet.png") no-repeat left center;
font-weight: bold;
color: $dcprimary;
}
- }
- h5 {
margin: 3em 0 .5em 0;
-&:first-child {
margin: 0 0 .5em 0;
}
- }
- ul {
display: block;
li {
display: block;
margin: 0;
padding: 0 0 0 16px;
position: relative;
}
- }
- }
- form.buttononly {
- display: inline-block;
- }
- span {
display: block;
position: absolute;
width: 16px; height: 16px;
left: 0; top: 50%; margin-top: -8px;
background: url(../../images/icons/action-icons.png) no-repeat 0 0;
- }
- .edit span { background-position: -16px 0;}
- .delete span { background-position: -32px 0;}
- .rename span { background-position: -80px 0;}
- .copy span { background-position: -48px 0;}
- .build span { background-position: -64px 0;}
- .add span { background-position: -48px 0;}
- .clear span { background-position: -160px 0;}
- .start span { background-position: -176px 0;}
- .stop span { background-position: -192px 0;}
- .snapshot span { background-position: -208px 0;}
- .grantaccess span { background-position: -224px 0;}
- .request_help span { background-position: -240px 0;}
- .info span { background-position: -256px 0;}
- .restart span { background-position: -272px 0;}
- .shutdown span { background-position: -288px 0;}
- .console span { background-position: -304px 0;}
- .VD span { background-position: -320px 0;}
- label {
- font-weight: normal;
- }
-}
-.searchedpackages, .collections {
- display: block;
- margin: 0 2em 2em 0;
- @include column-count(3);
- li {
- display: block;
- margin: 0;
- label {
font-weight: normal;
- }
- }
-}
-/* ICONS */
-img.icon {
- width: 16px; height: 16px;
- vertical-align: middle;
- background: url(../../images/icons/statusicons.png) no-repeat 0 0;
-&.large {
- width: 48px; height: 16px;
- }
-&.yes { background-position: -16px 0; } -&.no { background-position: -32px 0; } -&.platform {
- background: url(../../images/icons/platformicons.png) no-repeat 0 0;
-&.rhel {
background-position: 0 0;
- }
- }
-}
-#notification { -&>div {
- padding: 10px;
- @include border-radius(5px);
- margin-bottom: 2em;
- ul {
display: block;
margin: 0;
li {
display: block;
margin: 0;
}
- }
- }
- .success {
- background-color: lighten($goodcl,45%);
- border: 1px solid lighten($goodcl,20%);
- }
- .error, .warning {
- background-color: lighten($badcl,45%);
- border: 1px solid lighten($badcl,20%);
- }
- .close {
- display: block;
- position: absolute;
- width: 16px; height: 16px;
- top: 0; right: 0;
- background: url(../../images/icons/close.png) no-repeat 0 0;
- cursor: pointer;
- }
-}
-ul.block {
- display: block;
- margin: 0;
- li {
- display: block;
- margin: 0;
- }
-}
-#head {
- background-color: $headerbg;
- border-bottom: 2px solid desaturate(lighten($headerbg,30%),50%);
- overflow: hidden;
- header {
- display: block;
- h1 {
text-transform: uppercase;
font-size: 110%;
color: #fff;
margin: 2px 0 0;
padding: 6px 0 4px 54px;
background: url(../../images/rh_logo.png) no-repeat 10px center;
position: relative;
float: left;
img.dc {
position: absolute;
left: 43px;
top: 7px;
}
- }
- ul {
display: block;
float: right;
margin: 0 10px 0 0;
padding: 8px 0 0;
li {
display: inline-block;
margin: 0 5px;
-&.hello {
margin-left: 30px;
}
a {
color: #fff;
}
}
- }
- }
-}
-#subheader {
- background: lighten($headerbg,50%) url(../../images/subheader-shade.png) repeat-x 0 0;
- position: relative;
- min-height: 130px;
- #s {
- font-size: 80%;
- text-align: right;
- overflow: hidden;
- padding: 10px 0 0;
- p {
margin: 0;
- }
- div {
position: relative;
margin-bottom: 0;
button {
position: absolute;
width: 16px; height: 16px;
text-indent: -200em;
right: 8px; top: 50%;
margin: -8px 0 0;
background-position: 0 0;
border: none;
padding: 0;
-&:hover {
box-shadow: none;
-webkit-shadow: none;
-moz-box-shadow: none;
}
}
input[type="search"] {
border-color: $headerbg;
width: 80%;
}
- }
- a {
color: #fff;
margin-right: 10px;
- }
- }
- hr { /* stroke on the bottom to be overdrawn by tabs */
- position: absolute;
- display: block;
- margin: 0;
- left: 0; right: 0; bottom: 0;
- height: 1px;
- color: #9F9F9F;
- background-color: #9F9F9F;
- z-index: 1;
- border-style: none;
- }
-}
-nav {
- display: block;
- overflow: hidden;
- z-index: 2;
- position: absolute;
- bottom: 0; left: 0; right: 0;
-&>ul { /* groups -- operation, administration ... */
- display: block;
-&>li {
display: block;
float: left;
margin: 0 2px;
-&>a { /* group labels */
display: block;
cursor: default;
color: desaturate(lighten($headerbg,50%),50%);
font-weight: normal;
text-transform: uppercase;
font-family: $headlinefont;
-&:hover,&:active {
color: desaturate(lighten($headerbg,50%),50%);
text-decoration: none;
}
}
-&.selected>ul { /* generic selected tabs */
background-color: #fff;
border-bottom: 1px solid #fff;
}
-&.runtime>ul>li {
max-width: 90px;
}
-&>ul { /* generic background tabs */
display: block;
margin: 0;
background-color: #ddd;
overflow: hidden;
border-left: 1px solid #9F9F9F;
border-right: 1px solid #9F9F9F;
border-bottom: 1px solid #9F9F9F;
li { /* tab items */
font-size: 95%;
margin: 0; padding: 10px 8px 6px;
text-align: center;
font-family: $screenfont;
font-weight: bold;
display: block;
float: left;
max-width: 70px;
a {
display: table-cell;
vertical-align: middle;
height: 38px; /* easy click targets */
color: #888;
padding: 2px 6px; margin: 0;
}
-&.selected {
a {
color: #000;
}
}
-&.disabled {
a {
color: #aaa;
cursor: default;
-&:hover {
text-decoration: none;
}
}
}
}
}
- }
- }
- #help {
- float: right;
- margin-right: 10px;
- a {
display: block;
color: #fff;
cursor: pointer;
width: 48px; height: 37px;
margin: 20px 0 0;
background: url(../../images/help-bubble.png) no-repeat 0 0;
text-align: center;
padding: 8px 0 0;
- }
-&.disabled a {
cursor: default !important;
- }
- }
-&.subnav { /* subnavigation */
- position: relative;
- background: #888 url(../../images/subnav-bg.png) repeat-x 0 0; /* fallback */
- border-top: 3px solid #fff;
- border-bottom: 1px solid #666;
- overflow: visible;
- min-height: 6px;
-&>ul {
/*
position: absolute;
top: 0; left: 0; right: 0;
*/
width: 960px;
margin: 0 auto;
padding: 4px;
overflow: visible;
height: 22px;
li {
a {
height: 20px;
cursor: pointer;
font-family: $screenfont;
text-transform: none;
display: inline-block;
color: #fff;
margin: 2px 6px;
-&.selected {
@include text-shadow(0,2px,2px,rgba(0,0,0,0.9));
height: 30px;
background: url(../../images/selected-subnav.png) no-repeat bottom center;
}
}
}
- }
- }
-&.subsubnav { /* in page tabs */
- position: static;
- overflow: hidden;
- bottom: inherit;
- left: inherit;
- right: inherit;
- margin-bottom: 2em;
-&>ul {
display: block;
li {
display: block;
float: left;
a {
cursor: pointer;
font-family: $screenfont;
text-transform: none;
font-weight: normal;
color: black;
display: block;
padding: 6px; margin-right: 10px;
-&.selected {
color: #fff;
background-color: $dcprimary;
@include border-radius(5px);
}
}
}
- }
- }
-}
- /* color coding for the subnav */
- #operation .subnav { background-color: $operationbg; }
- #operation nav>ul>li>ul>li>a.selected { color: $operationbg; }
- #administration .subnav,
- #system_settings .subnav,
- #loginpage .subnav { background-color: $administrationbg; }
- #administration nav>ul>li>ul>li>a.selected,
- #system_settings nav>ul>li>ul>li>a.selected,
- #loginpage nav>ul>li>ul>li>a.selected { color: $administrationbg; }
- #build .subnav { background-color: $buildbg; }
- #build nav>ul>li>ul>li>a.selected { color: $buildbg; }
- #runtime .subnav { background-color: $runtimebg; }
- #runtime nav>ul>li>ul>li>a.selected { color: $runtimebg; }
- #operation .subnav>ul>li a.selected { background: url(../../images/selected-subnav-op.png) no-repeat bottom center; }
- #administration .subnav>ul>li a.selected,
- #system_settings .subnav>ul>li a.selected,
- #loginpage .subnav>ul>li a.selected
{ background: url(../../images/selected-subnav-ad.png) no-repeat bottom center; }
- #build .subnav>ul>li a.selected { background: url(../../images/selected-subnav-bu.png) no-repeat bottom center; }
- #runtime .subnav>ul>li a.selected { background: url(../../images/selected-subnav-ru.png) no-repeat bottom center; }
-/* image backgrounds for tabs */ -li.operation>ul, li.administration>ul, li.build>ul, li.runtime>ul {
- background: #ddd url(../../images/tab-bg.png) repeat-x 0 0;
-}
- li.operation.selected>ul { background-position: 0 -140px; }
- li.operation>ul { background-position: 0 -210px; }
- li.administration.selected>ul { background-position: 0 -420px; }
- li.administration>ul { background-position: 0 -490px; }
- li.build.selected>ul { background-position: 0 -280px; }
- li.build>ul { background-position: 0 -350px; }
- li.runtime.selected>ul { background-position: 0 0; }
- li.runtime>ul { background-position: 0 -70px; }
-.modalbox {
- margin: 150px auto;
- @include box-shadow(0,1px,5px,rgba(0, 0, 0, 0.6));
- width: 550px;
- overflow: hidden;
- h2 {
- background-color: $formheadbg;
- color: $formheadfg;
- text-transform: uppercase;
- font-size: 120%;
- padding: 10px;
- }
- .dcloud_form {
- margin: 40px;
- overflow: hidden;
- }
- .errorExplanation {
- h2 {
text-transform: none;
- }
- }
-}
-#content {
- position: relative;
- margin-top: 2em;
- margin-bottom: 60px;
- overflow: hidden;
-}
-/* FORMS */ -/* generic */ -label {
- text-align: right;
- font-weight: bold;
-&.header {
- text-align: left;
- font-weight: normal;
- font-size: 90%;
- margin-bottom: 1em;
- }
-&.big {
- text-align: left;
- text-transform: uppercase;
- font-family: $headlinefont;
- font-size: 110%;
- font-weight: normal;
- color: $formheadfg;
- }
-}
-legend {
- font-size: 130%;
- font-family: $headlinefont;
- font-weight: bold;
- text-transform: uppercase;
- color: $headercl;
-}
-fieldset.gap {
- margin-bottom: 7em;
-}
-.fieldWithErrors {
- border: 0; margin: 0; padding: 0;
- overflow: visible;
- input {
- background-color: lighten($errorcl, 45%);
- color: $errorcl;
- }
- label {
- color: $errorcl;
- }
-}
-.pagination {
- font-size: 90%;
- text-align: right;
- .disabled {
- display: none;
- }
- input {
- display: inline-block;
- text-align: center;
- background: none;
- border: 1px solid $strokecl;
- width: 18px; padding: 3px; margin-right: 4px;
- @include border-radius(0);
-&.prev_page,&.next_page {
width: 54px;
-&:active,&:hover,&:focus { /* behave like links, not buttons */
width: 54px;
}
- }
-&:active,&:hover,&:focus { /* behave like links, not buttons */
text-align: center;
background: none;
@include no-box-shadow();
width: 18px; padding: 3px; margin-right: 4px;
- }
- }
- .current {
- text-align: center;
- display: inline-block;
- width: 22px;
- border: none;
- font-weight: bold;
- }
-}
-.pageinfo {
- float: left;
-}
-/* simple two column label + input pairs */ -.dcloud_form {
- fieldset {
- overflow: hidden;
- margin: 10px 0 0;
- text-align: left;
- label {
display: inline-block;
font-weight: bold;
padding: 4px 0 0 0;
- }
- input[type='text'], input[type='password'], textarea {
display: inline-block;
width: 20em;
- }
- }
- .indented {
- margin: 10px 0 0;
- text-align: right;
- input[type="text"],label,a,div,p {
text-align: left;
display: inline-block;
width: 20em;
- }
- }
-}
-/* search forms */
-.search {
- position: relative;
- button {
- position: absolute;
- width: 16px; height: 16px;
- text-indent: -200em;
- right: 8px; top: 50%;
- margin: -8px 0 0;
- background-position: 0 0;
- border: none;
- padding: 0;
-&:hover {
box-shadow: none;
-webkit-shadow: none;
-moz-box-shadow: none;
- }
- }
- input[type="search"] {
- float: right; /* webkit adds an extra padding and makes the widget narrower */
- }
-} -/* WIZARD TILES */
-ul.tiles {
- overflow: hidden;
- margin: 2em 0 0;
- li.grid_8 {
- margin-bottom: 30px;
- padding-left: 60px;
- width: 400px !important;
- position: relative;
- img {
position: absolute;
background: url(../../images/icons/config-icons.png) no-repeat 0 0;
width: 48px; height: 48px;
top: 0; left: 0;
- }
- }
- button, a.button {
- float: right;
- }
- .disabled {
- opacity: 0.6;
- button {
pointer: default;
- }
- }
-}
-/* CONFIG PANE ICONS */
- #settings {
- img { background-position: 0 -48px; }
-&.disabled {
img { background-position: 0 0; }
- }
- }
- #locales {
- img { background-position: -48px -48px; }
-&.disabled {
img { background-position: -48px 0; }
- }
- }
- #users {
- img { background-position: -144px -48px; }
-&.disabled {
img { background-position: -144px 0; }
- }
- }
- #providers {
- img { background-position: -96px -48px; }
-&.disabled {
img { background-position: -96px 0; }
- }
- }
- #permissions {
- img { background-position: -288px -48px; }
-&.disabled {
img { background-position: -288px 0; }
- }
- }
- #hardware {
- img { background-position: -240px -48px; }
-&.disabled {
img { background-position: -240px 0; }
- }
- }
- #services {
- img { background-position: -192px -48px; }
-&.disabled {
img { background-position: -192px 0; }
- }
- }
-/* GRAPHS */
-.graphkey {
- li {
- padding: 2px 4px 2px 32px;
- background: url(../../images/graph-key.png) no-repeat 0 0;
- height: 18px; overflow: hidden;
- }
- .instances { background-position: 0 0; }
- .requests { background-position: 0 -18px; }
- .ttl { background-position: 0 -36px; }
- .failures { background-position: 0 -54px; }
- .retries { background-position: 0 -72px; }
-}
-footer {
- font-size: 90%;
- margin: 10px 0 0;
- padding: 10px;
- display: block;
- background: $footerbg url(../../images/footer-shade.png) repeat-x 0 0;
- ul {
- display: block;
- padding: 10px 10px 0 0;
- min-height: 50px;
- li {
display: block;
float: right;
- }
- }
-&.fixed {
- position: absolute;
- bottom: 0; left: 0; right: 0;
- }
-}
-/* RIGHT SIDEBAR */ -.sidebarcontainer {
- /* height: 300px; overflow: scroll; */
- display: block;
- li {
- display: block;
- margin: 0;
- }
- h5 {
- text-transform: none;
- margin-top: 3em;
- }
-}
-/* PAGE SPECIFIC */
-/* DASHBOARD */
-.currency {
- font-size: 180%;
- line-height: 70%;
-}
-/* GRINDS */ -.status,.capacity {
- span {
- display: inline-block;
- width: 10px;
- height: 10px;
- background: url(../../images/icons/status.png) no-repeat 0 0;
-&.good {
background-position: 0 0;
- }
-&.ok {
background-position: 0 -10px;
- }
-&.bad {
background-position: 0 -20px;
- }
- }
-}
-/* INSTANCE MANAGEMENT */ -.poolname {
- h4 {
- float: left;
- margin: 10px 0 0;
- }
-}
-.poolfilter {
- margin: 10px 0 0;
- label {
- font-weight: normal;
- margin-right: 1em;
- }
-}
-a.iconbutton {
- padding: 4px 4px 4px 24px;
- position: relative;
- overflow: hidden;
- @include border-radius(2px);
-&:active {
- padding: 4px 4px 4px 24px;
- }
-&:focus {
- padding: 3px 3px 3px 23px;
- }
- img {
- position: absolute;
- width: 18px;
- height: 54px;
- left: 0; top: 50%;
- margin-top: -27px;
- background: url(../../images/icons/launchinstance.png) no-repeat 0 0;
- }
-}
-/* TEMPLATES */
-#build {
- #add_software_button {
- margin-top: 2em;
- font-size: 140%;
- }
- #package_selection_list {
- display: block;
- overflow: auto;
- margin-top: 2em;
-&.loading {
display: block;
height: 100px;
background: url(../../images/spinner.gif) no-repeat center center;
- }
-&>.grid_16 {
margin: 0;
- }
- }
- #metagrouppackages {
-&.loading {
display: block;
height: 100px;
background: url(../../images/spinner.gif) no-repeat center center;
- }
- }
- span.loading {
- background: url(../../images/spinner.gif) no-repeat center left;
- display: inline-block;
- padding: 6px 0 6px 24px;
- }
- .packagewrap {
- position: relative;
- float: left;
- padding: 4px 22px 4px 4px;
- margin: 2px;
- @include border-radius(4px);
- .remove_package {
position: absolute;
width: 16px; height: 16px;
top: 50%; right: 4px;
border: none;
background: url(../../images/icons/action-icons.png) no-repeat -32px 0 !important;
text-indent: -200em;
padding: 0; margin: -8px 0;
@include border-radius(2px);
-&:hover {
@include no-box-shadow();
background: lighten($dcprimary,10%) url(../../images/icons/action-icons.png) no-repeat -32px 0 !important;
}
- }
- .packagename {
cursor: pointer;
-&:hover {
color: white;
}
- }
-&.selected {
color: white;
background-color: $dcprimary;
.packagename {
color: white;
}
- }
-&:hover {
color: white;
background-color: $dcprimary;
.packagename {
color: white;
}
- }
- }
- .packagegroupsidebar {
- display: block;
- text-align: right;
- font-size: 120%;
- li {
display: block;
margin: 0;
- }
- .icon {
text-transform: capitalize;
- }
- }
- #collections {
margin: 0 0 1em;
font-weight: bold;
- }
- .metagrouppackages {
- display: block;
-&>li {
display: block;
text-transform: uppercase;
margin: 0 2em 2em 0; padding: 0;
label {
cursor: pointer;
}
ul {
@include column-count(3);
display: block;
text-transform: none;
font-size: 95%;
li {
display: block;
margin: 0 0 0 4px;
text-transform: capitalize;
label {
font-weight: normal;
}
}
}
- }
- }
-}
- #dropdown {
- position: absolute;
- background-color: white;
- border: 1px solid $dcprimary;
- @include border-radius-bottom(4px);
- padding: 1em;
- display: none;
- z-index: 2;
- font-size: 95%;
- }
-/* IE and other horror browser workarounds */
-/* basic image styling for buttons in older browsers */ -.no-cssgradients input[type='submit'], .no-cssgradients button, .no-cssgradients .button {
- /* FIXME image based buttons */
-}
-/* when modalbox miss dropshadow set some border */ -.no-boxshadow .modalbox { border: 2px solid $strokecl; }
-/* jQuery UI tabs overrides */
-.ui-widget-content { border: none; } -.ui-tabs {
- margin-bottom: 1em;
- .ui-widget-header {
- font-size: 90%;
- background: transparent;
- border: none;
- }
- .ui-state-default {
- background: transparent;
- border: none;
- }
- .ui-state-active {
- background-color: $dcprimary;
- @include border-radius(5px);
-&>a {
color: #fff;
- }
- }
-}
-/* DEBUG GRID */ -#grid {
- display: none;
- position: fixed;
- top: 0; bottom: 0;
- left: 50%;
- width: 1020px;
- margin-left: -510px;
-} diff --git a/src/app/views/builds/index.haml b/src/app/views/builds/index.haml deleted file mode 100644 index 0d2d5ce..0000000 --- a/src/app/views/builds/index.haml +++ /dev/null @@ -1,89 +0,0 @@ -- columns = [ |
- {:name => 'NAME', :sort_attr => 'templates.name'}, |
- {:name => 'OS', :sort_attr => 'templates.platform'}, |
- {:name => 'VERSION', :sort_attr => 'templates.platform_version'}, |
- {:name => 'ARCH', :sort_attr => 'templates.architecture'}, |
- {:name => 'STATUS', :sort_attr => 'status'}, |
-] |
-- form_tag :action => "" do
- .actionsidebar.grid_3
- %dl
%dt Build Job Actions
%dd
%h5 JOB QUEUE
%ul
%li.delete
%span
= submit_tag "Cancel Job", :name => "job_details", :disabled => true, :class => "icon"
%li.show
%span
= submit_tag "Show Job Details", :name => "job_details", :disabled => true, :class => "icon"
%li.show
%span
= submit_tag "Show Job Log", :name => "job_log", :disabled => true, :class => "icon"
%li.clear
%span
= submit_tag "Clear Job History", :name => "job_history", :disabled => true, :class => "icon"
- .grid_13
- %h1 Status
- %section.wrap.status
%label.grid_4.alpha Image Warehouse Status:
.grid_3.suffix_6.omega
%span.good
Green
%label.grid_4.alpha Total Builds in Queue:
.grid_3.suffix_6.omega
= @running_images.size
%label.grid_4.alpha Number of VM's Building:
.grid_3.suffix_6.omega
= @running_images.select {|i| i.status == Image::STATE_BUILDING}.size
- %h1 Running
- %table
= sortable_table_header(columns)
%tbody
- if @running_images.empty?
%tr
%td{:colspan => 5} No Images
- else
- @running_images.each do |img|
%tr
%td= img.template.name
%td= img.template.platform
%td= img.template.platform_version
%td= img.template.architecture
%td= img.status
- unless @failed_images.empty?
%h1 Failed
%table
= sortable_table_header(columns)
%tbody
- @failed_images.each do |img|
%tr
%td= img.template.name
%td= img.template.platform
%td= img.template.platform_version
%td= img.template.architecture
%td= img.status
- %h1 Completed
- %table
= sortable_table_header(columns)
%tbody
- if @completed_images.empty?
%tr
%td{:colspan => 5} No Images
- else
- @completed_images.each do |img|
%tr
%td= img.template.name
%td= img.template.platform
%td= img.template.platform_version
%td= img.template.architecture
%td OK
diff --git a/src/app/views/builds/new.haml b/src/app/views/builds/new.haml deleted file mode 100644 index 2cb159e..0000000 --- a/src/app/views/builds/new.haml +++ /dev/null @@ -1,55 +0,0 @@ -%h2 Build Request -- form_tag :action => 'create' do
- = hidden_field_tag :template_id, @tpl.id
- %h3 Deployment Definition
- %fieldset.clearfix
- = label_tag :deploy_name, 'Deployment Definition Name:', :class => 'grid_4'
- = text_field_tag 'deploy_name', 'Deployment Name', :disabled => true, :class => 'grid_3'
- = text_field_tag 'deploy_description', 'Deployment Description', :disabled => true, :class => 'grid_3'
- %fieldset.clearfix
- .prefix_4.grid_6
= check_box_tag 'use_for_machine', 1, true, :disabled => true
= label_tag 'use_for_machine', 'Use for Machine Definition Name and Description'
- %fieldset.clearfix
- .grid_7
= file_field :templates, :choose_logo, :value => 'Choose Logo', :disabled => true
- = text_field :templates, :logo_text, :value => 'Logo Text (5 characters)', :disabled => true, :class => "grid_3"
- %fieldset.clearfix
- %label.grid_4{:for => :template_group}
Template Category:
- .grid_3
= select_tag(:template_group, options_for_select([['User Private', 1]]))
- %h3 Deployment Options
- %fieldset.clearfix
- .grid_6
%label OS:
= @tpl.platform
- .grid_3
Hardware Profile
- .grid_3.suffix_3
Locale
- %fieldset.clearfix
- .grid_3
%label OS Version:
= @tpl.platform_version
- .grid_3.ra
%label Global Settings:
- .grid_3
Small
- .grid_3
Any
- .grid_3
= submit_tag "Config", :name => "config", :disabled => true
- %h3 Build Options
- %label Choose Provider Format:
- %section.clearfix.gap
- %ul.block
- @all_targets.each do |target_id, target|
%li
= check_box_tag 'targets[]', target_id, false, :id => target_id
= label_tag target_id, target['name']
- = submit_tag "Submit to Build", :name => "build"
- = submit_tag "Cancel", :name => "cancel"
diff --git a/src/app/views/cloud_accounts/_form.haml b/src/app/views/cloud_accounts/_form.haml deleted file mode 100644 index 2d35d47..0000000 --- a/src/app/views/cloud_accounts/_form.haml +++ /dev/null @@ -1,52 +0,0 @@ -= error_messages_for 'cloud_account' -%fieldset.clearfix.nomargin
- %label.grid_4.la.alpha
- = t('.account_name')
- %span.required *
- %label.grid_3.la
- = t('.user_name')
- %span.required *
- %label.grid_3.la
- = t('.password')
- %span.required *
- %label.grid_3.la.omega
- = t('.quota_instances')
- %span.required *
-%fieldset.nomargin.clearfix
- = f.text_field :label, :title => t('.account_name'), :class => "grid_4 alpha"
- = f.text_field :username, :title => t('.user_name'), :class => "grid_3"
- = f.password_field :password, :title => t('.password'), :class => "grid_3"
- = text_field "quota", :maximum_running_instances, :title => t('.quota_instances'), :value => @quota.maximum_running_instances || "unlimited", :id => "quota_instances", :class => "grid_3 omega"
-%fieldset.nomargin.clearfix
- .grid_3.prefix_10.alpha.omega
- (
- %button.linkbutton.nospace{ :type => 'button', :onclick => "set_unlimited_quota("quota_instances");" }<>
= t('.unlimited_quota')
- )
-%fieldset.clearfix.nomargin
- %label.grid_4.la.alpha
- = t('.account_number')
- %span.required *
- %label.grid_3.la
- = t('.account_private_cert')
- %span.required *
- %label.grid_3.la
- = t('.account_public_cert')
- %span.required *
- .grid_3.omega
-%fieldset.clearfix.nomargin
- = f.text_field :account_number, :title => t('.account_number'), :class => "grid_4 alpha"
- .grid_3
- = f.file_field :x509_cert_priv_file, :title => t('.account_private_cert')
- .grid_3
- = f.file_field :x509_cert_pub_file, :title => t('.account_public_cert')
- .grid_3.omega
- (
- %button.linkbutton.nospace{ :type => 'submit', :value => t('.test_account'), :name => 'test_account', :id => 'test_account' }<>
= t('.test_account')
- )
-:javascript
- function set_unlimited_quota(elem_id) {
- $("#" + elem_id)[0].value = "unlimited";
- }
diff --git a/src/app/views/cloud_accounts/edit.haml b/src/app/views/cloud_accounts/edit.haml deleted file mode 100644 index dc24584..0000000 --- a/src/app/views/cloud_accounts/edit.haml +++ /dev/null @@ -1,17 +0,0 @@ -= render :partial => 'providers/providers' -#details.grid_13
- %nav.subsubnav
- = render_navigation({:context => 'old', :level => 4})
- %h2
- = t('.edit_provider_account')
- form_for @cloud_account, :url => provider_account_path(@provider, @cloud_account), :html => { :method => :put, :multipart => true } do |f|
- = render :partial => 'form', :locals => { :f => f }
- %fieldset.clearfix
.grid_13.alpha.omega
= submit_tag t(:edit), :class => "ra nomargin dialogbutton"
- %section
%p.requirement
%span.required *
\-
= t('.required_field')
diff --git a/src/app/views/cloud_accounts/index.haml b/src/app/views/cloud_accounts/index.haml deleted file mode 100644 index e4d8670..0000000 --- a/src/app/views/cloud_accounts/index.haml +++ /dev/null @@ -1,25 +0,0 @@ -= render :partial => 'providers/providers' -#details.grid_13
- %nav.subsubnav
- = render_navigation({:context => 'old', :level => 4})
- %h2
- = t('.provider_accounts')
- unless @provider.cloud_accounts.empty?
- %table
%thead
%tr
%th{:scope => "col"} Label
%th{:scope => "col"} Username
%th{:scope => "col"} Account Number
%th{:scope => "col", :colspan => "2"} Actions
%tbody
- @provider.cloud_accounts.each do |cloud_account|
%tr
%td= cloud_account.label
%td= cloud_account.username
%td= cloud_account.account_number
%td= link_to 'Edit', edit_provider_account_path(@provider, cloud_account)
%td= link_to 'Delete', destroy_providers_account_path(@provider, cloud_account), :confirm => 'Are you sure?'
- if @provider.cloud_accounts.empty?
- = link_to 'Add', new_provider_account_path(@provider.id), :class => 'button'
diff --git a/src/app/views/cloud_accounts/new.haml b/src/app/views/cloud_accounts/new.haml deleted file mode 100644 index b605714..0000000 --- a/src/app/views/cloud_accounts/new.haml +++ /dev/null @@ -1,17 +0,0 @@ -= render :partial => 'providers/providers' -#details.grid_13
- %nav.subsubnav
- = render_navigation({:context => 'old', :level => 4})
- %h2
- = t('.new_provider_account')
- form_for @cloud_account, :url => provider_accounts_path(@provider), :html => { :multipart => true } do |f|
- = render :partial => 'form', :locals => { :f => f }
- %fieldset.clearfix
.grid_13.alpha.omega
= submit_tag t(:add), :class => "ra nomargin dialogbutton"
- %section
%p.requirement
%span.required *
\-
= t('.required_field')
diff --git a/src/app/views/dashboard/_dashboard_nav.haml b/src/app/views/dashboard/_dashboard_nav.haml deleted file mode 100644 index b75690c..0000000 --- a/src/app/views/dashboard/_dashboard_nav.haml +++ /dev/null @@ -1,13 +0,0 @@ -- menu = [ { :text => "Summary", :action => "index" }, |
- { :text => "Alerts", :action => "alerts" }, |
- { :text => "Service Quality", :action => "service_quality" }, |
- { :text => "Quota Usage", :action => "quota_usage" }, |
- { :text => "Billing", :action => "billing" }, |
- { :text => "Help Tickets", :action => "help_tickets" }, ] |
-#dashboard-tabs{ :class => "ui-tabs ui-widget ui-widget-content ui-corner-all" }
- %ul{ :class => "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header" }
- menu.each do |item|
- selection_style = "ui-tabs-selected ui-state-active" if item[:action] == controller.action_name
%li{ :class => "#{selection_style} ui-state-default ui-corner-top" }
= link_to item[:text], { :controller => "dashboard", :action => item[:action] }
diff --git a/src/app/views/dashboard/alerts.haml b/src/app/views/dashboard/alerts.haml deleted file mode 100644 index 2ad3978..0000000 --- a/src/app/views/dashboard/alerts.haml +++ /dev/null @@ -1,2 +0,0 @@ -%h1 Alerts -%p located in app/views/dashboard/alerts.haml diff --git a/src/app/views/dashboard/billing.haml b/src/app/views/dashboard/billing.haml deleted file mode 100644 index 5f0efec..0000000 --- a/src/app/views/dashboard/billing.haml +++ /dev/null @@ -1,2 +0,0 @@ -%h1 Billing -%p located in app/views/dashboard/billing.haml diff --git a/src/app/views/dashboard/help_tickets.haml b/src/app/views/dashboard/help_tickets.haml deleted file mode 100644 index a32e7f1..0000000 --- a/src/app/views/dashboard/help_tickets.haml +++ /dev/null @@ -1,2 +0,0 @@ -%h1 Help Tickets -%p located in app/views/dashboard/help_tickets.haml diff --git a/src/app/views/dashboard/monitor.haml b/src/app/views/dashboard/monitor.haml deleted file mode 100644 index 610a228..0000000 --- a/src/app/views/dashboard/monitor.haml +++ /dev/null @@ -1,185 +0,0 @@ -%section.gap
- .grid_3.disabled
- = radio_button_tag :dashboard, 'system', :checked => "checked"
- %label{:for => 'dashboard_system'} View System Dashboard
- .grid_13.disabled
- = radio_button_tag :dashboard, 'user'
- %label{:for => 'dashboard_user'} View User Dashboard
-.grid_16
- %h2 Key Metrics
- %table{ :class => 'noborder' }
- %thead
%tr
%th
%th{ :colspan => 2 } Aggregate quota
%th{ :colspan => 2 } Current usage
%th{ :colspan => 2 } Avg: Last 24 hours
%th{ :colspan => 2 } Avg: Last month
%th{ :colspan => 2 } Avg: Calendar year
- %tbody
%tr
=monitor_quota_value "Number of Instances", '2.500', 'Instances'
=monitor_bar_value '32', :total => '2351'
=monitor_bar_value '32', :total => '2351', :min => 13, :max => 83
=monitor_bar_value '32', :total => '2351', :min => 13, :max => 83
=monitor_bar_value '32', :total => '2351', :min => 13, :max => 83
%tr
=monitor_quota_value "System Storage", '1.200', 'Templates'
=monitor_bar_value '32', :total => '2351'
=monitor_bar_value '32', :total => '2351', :min => 13, :max => 83
=monitor_bar_value '32', :total => '2351', :min => 13, :max => 83
=monitor_bar_value '32', :total => '2351', :min => 13, :max => 83
%tr
=monitor_quota_value "Operational Storage", '512', 'TB'
=monitor_bar_value '32', :total => '2351'
=monitor_bar_value '32', :total => '2351', :min => 13, :max => 83
=monitor_bar_value '32', :total => '2351', :min => 13, :max => 83
=monitor_bar_value '32', :total => '2351', :min => 13, :max => 83
%tr
=monitor_quota_value "Customed Network Traffic", '824', 'GB'
=monitor_bar_value '32', :total => '2351'
=monitor_bar_value '32', :total => '2351', :min => 13, :max => 83
=monitor_bar_value '32', :total => '2351', :min => 13, :max => 83
=monitor_bar_value '32', :total => '2351', :min => 13, :max => 83
%tr
=monitor_quota_value "Cost per hour", '824', '<span class="currency">¤</span>'
=monitor_bar_value '32', :total => '102'
=monitor_bar_value '32', :total => '2351', :min => 13, :max => 83
=monitor_bar_value '32', :total => '2351', :min => 13, :max => 83
=monitor_bar_value '32', :total => '2351', :min => 13, :max => 83
- %h2 Aggregate quality of service
- %section.wrap
- = image_tag 'placeholder_rackspace_graph.png', :class => "placeholder"
- %div{ :class => 'grid_4 alpha' }
%h4.legend Show:
%ul.block.twocolumn
%li
%input{ :type => 'checkbox', :checked => 'checked', :name => 'instances', :id => 'instances' }
%label{ :for => 'instances' } Instances
%li
%input{ :type => 'checkbox', :checked => 'checked', :name => 'time_to', :id => 'time_to' }
%label{ :for => 'time_to' } Time to
%li
%input{ :type => 'checkbox', :checked => 'checked', :name => 'launch_failures', :id => 'launch_failures' }
%label{ :for => 'launch_failures' } Launch failures
%li
%input{ :type => 'checkbox', :checked => 'checked', :name => 'requests', :id => 'requests' }
%label{ :for => 'requests' } Requests
%li
%input{ :type => 'checkbox', :checked => 'checked', :name => 'retries', :id => 'retries' }
%label{ :for => 'retries' } Retries
- %div{ :class => 'grid_4' }
%h4.legend Set time scale:
%ul.block.twocolumn
%li
%input{ :type => 'radio', :checked => 'checked', :name => 'time1', :id => 'one' }
%label{ :for => 'one' } 30 minutes
%li
%input{ :type => 'radio', :checked => 'checked', :name => 'time1', :id => 'two' }
%label{ :for => 'two' } 2 hours
%li
%input{ :type => 'radio', :checked => 'checked', :name => 'time1', :id => 'three' }
%label{ :for => 'three' } 2 days
%li
%input{ :type => 'radio', :checked => 'checked', :name => 'time1', :id => 'four' }
%label{ :for => 'four' } 1 week
%li
%input{ :type => 'radio', :checked => 'checked', :name => 'time1', :id => 'five' }
%label{ :for => 'five' } 1 month
- %div{ :class => 'grid_8 omega' }
%h4.legend Graph key:
%ul.block.graphkey
%li.instances
Instances
%li.requests
Requests
%li.ttl
Time to Launch
%li.failures
Failures
%li.retries
Retries
- %h2.clear Statistics
- %table{ :class => 'noborder' }
- %thead
%tr
%th
%th{ :colspan => 2 } Last Hour
%th{ :colspan => 2 } Last 24 Hours
%th{ :colspan => 2 } Last Month
%th{ :colspan => 2 } Calendar YTD
- %tbody
%tr
=monitor_quota_value "Ratio New Accounts / Total Accounts:", '2.500', ''
=monitor_bar_value '1', :total => '23 of 2,200'
=monitor_bar_value '32', :total => '1,038 of 2,200', :min => 13, :max => 83
=monitor_bar_value '32', :total => '1,038 of 2,200', :min => 13, :max => 83
%tr
=monitor_quota_value "Ratio Archive Accounts / Total Accounts:", '1.200', ''
=monitor_bar_value '1', :total => '23 of 2,200'
=monitor_bar_value '32', :total => '1,038 of 2,200', :min => 13, :max => 83
=monitor_bar_value '32', :total => '1,038 of 2,200', :min => 13, :max => 83
%tr
=monitor_quota_value "Ratio Used Quota / Theoretical Quota:", '512', ''
=monitor_bar_value '1', :total => '23 of 2,200'
=monitor_bar_value '32', :total => '1,038 of 2,200', :min => 13, :max => 83
=monitor_bar_value '32', :total => '1,038 of 2,200', :min => 13, :max => 83
- %h2 Quality of service provider
- %section.wrap
- = image_tag 'placeholder_rackspace_graph2.png', :class => "placeholder"
- %div{ :class => 'grid_4 alpha' }
%h4.legend Show:
%ul.block.twocolumn
%li
%input{ :type => 'checkbox', :checked => 'checked', :name => 'instances2', :id => 'instances2' }
%label{ :for => 'instances2' } Instances
%li
%input{ :type => 'checkbox', :checked => 'checked', :name => 'time_to2', :id => 'time_to2' }
%label{ :for => 'time_to2' } Time to
%li
%input{ :type => 'checkbox', :checked => 'checked', :name => 'launch_failures2', :id => 'launch_failures2' }
%label{ :for => 'launch_failures2' } Launch failures
%li
%input{ :type => 'checkbox', :checked => 'checked', :name => 'requests2', :id => 'requests2' }
%label{ :for => 'requests2' } Requests
%li
%input{ :type => 'checkbox', :checked => 'checked', :name => 'retries2', :id => 'retries2' }
%label{ :for => 'retries2' } Retries
- %div{ :class => 'grid_4' }
%h4.legend Set time scale:
%ul.block.twocolumn
%li
%input{ :type => 'radio', :checked => 'checked', :name => 'time2', :id => 'one2' }
%label{ :for => 'one2' } 30 minutes
%li
%input{ :type => 'radio', :checked => 'checked', :name => 'time2', :id => 'two2' }
%label{ :for => 'two2' } 2 hours
%li
%input{ :type => 'radio', :checked => 'checked', :name => 'time2', :id => 'three2' }
%label{ :for => 'three2' } 2 days
%li
%input{ :type => 'radio', :checked => 'checked', :name => 'time2', :id => 'four2' }
%label{ :for => 'four2' } 1 week
%li
%input{ :type => 'radio', :checked => 'checked', :name => 'time2', :id => 'five2' }
%label{ :for => 'five2' } 1 month
- %div{ :class => 'grid_8 omega' }
%h4.legend Graph key:
%ul.block.graphkey
%li.instances
Instances
%li.requests
Requests
%li.ttl
Time to Launch
%li.failures
Failures
%li.retries
Retries
diff --git a/src/app/views/dashboard/quota_usage.haml b/src/app/views/dashboard/quota_usage.haml deleted file mode 100644 index 89e3e36..0000000 --- a/src/app/views/dashboard/quota_usage.haml +++ /dev/null @@ -1,2 +0,0 @@ -%h1 Quota Usage -%p located in app/views/dashboard/quota_usage.haml diff --git a/src/app/views/dashboard/service_quality.haml b/src/app/views/dashboard/service_quality.haml deleted file mode 100644 index 988bbcb..0000000 --- a/src/app/views/dashboard/service_quality.haml +++ /dev/null @@ -1,2 +0,0 @@ -%h1 Service Quality -%p located in app/views/dashboard/service_quality.haml diff --git a/src/app/views/dashboard/summary.haml b/src/app/views/dashboard/summary.haml deleted file mode 100644 index cc8d8e9..0000000 --- a/src/app/views/dashboard/summary.haml +++ /dev/null @@ -1,121 +0,0 @@ -- unless @hide_getting_started
- #getting_started_dashboard_section
- %p
Welcome to your Deltacloud dashboard where you can track your cloud resource
usage. Here's what you need to know to get started
- %ul
%li
%img{:src => "images/getting_started_pools.png"}
Deltacloud organizes your cloud machines in collections called pools
%li
%img{:src => "images/getting_started_accounts.png"}
A pool can be connected to multiple<b>cloud provider accounts</b>
%li
%img{:src => "images/getting_started_pool_permissions.png"}
You have one personal pool and you may have access to more shared pools
%li
%img{:src => "images/getting_started_check.png"}
%p
Ready to work in the cloud?</p>
#getting_started_links
%a{:class => "button_link", :href => url_for(:controller => :pool, :action => :show, :id => @current_users_pool.id)}
Go to my personal pool
%a{:href => url_for(:controller => :user, :action => :pools, :id => @current_user.id)}
Show all my pools
- %p
%input{ :id => "hide_getting_started", :type => "checkbox" }
Thanks, don't show this again
-.dashboard_column
- #actions_dashboard_section
- %h2
Actions
- if check_privilege(Privilege::CREATE, Provider)
%a{:href => url_for(:controller => "providers", :action => "new")}
Add a Provider
- if check_privilege(Privilege::CREATE, User)
%a{:href => url_for(:controller => "users", :action => "new")}
Create a User
- %a{:href => url_for(:controller => "instances", :action => "index")}
View Instances
- %a{:href => url_for(:controller => "", :action => "")}
Launch Instances
- %a{:href => url_for(:controller => "", :action => "")}
Enter a help ticket
- if check_privilege(Privilege::CREATE, Template)
%a{:href => url_for(:controller => "templates", :action => "new")}
Create a Template
- #service_quality_dashboard_section
- if check_privilege(Privilege::MODIFY)
%h2
Provider Service Quality
.dashboard_section_summary
%img{ :src => "images/dashboard_summary_next.png", :alt => "next" }
%img{ :src => "images/dashboard_summary_prev.png", :alt => "prev" }
%p
Average time to submit tasks to provider, 24 hours
%div{ :style => "clear:both"}
- @providers.each do |provider|
.provider_service_quality_graph
-end_time = Time.now
-start_time = end_time - (24 * 60 * 60)
-interval_length = 3600
-task_action = "create"
= "<object data='" + url_for(:action => :provider_qos_avg_time_to_submit_graph, :id => provider.id, :start_time => start_time, :end_time => end_time, :interval_length => interval_length, :task_action => task_action, :width => 100, :height => 50) + "' type='image/svg+xml' />"
.provider_service_quality_graph_summary
= provider.name
-<!-- FIXME 'good/poor/average service... --> -<div style="clear: both;" />
- else
%h2
Service Quality
- #key_indicators_dashboard_section
- %h2
Key indicators
- %ul
%li
Providers
.count= @providers.size
%li
Accounts
.count= @cloud_accounts.size
%li
Pools
.count= @pools.size
%li
Running instances
.count= @stats[:running_instances]
%li
Stopped instances
.count= @stats[:stopped_instances]
%li
Total instances
.count= @stats[:total_instances]
- #provider_instances_graph
%object{ :data => url_for(:action => :provider_instances_graph, :width => 220, :height => 290), :type => 'image/svg+xml'}
-.dashboard_column
- #quota_usage_dashboard_section
- %h2
Quota Usage
- .dashboard_section_summary
Instance utilization by account
- .account_quota_usage_graph_key
%img{:src => "images/quota_usage_key_running_instances.png", :width => 10, :heigth => 10}
Running
%img{:src => "images/quota_usage_key_instances_limit.png", :width => 10, :heigth => 10}
Limit
- @cloud_accounts.each do |account|
.account_quota_usage_graph_summary
= account.provider.name + ": " + account.name
.account_quota_usage_current_graph
%object{ :data => url_for(:action => :quota_usage_graph, :cloud_account_id => account.id, :resource_name => Quota::RESOURCE_RUNNING_INSTANCES, :width => 100, :height => 50), :type => 'image/svg+xml'}
-<div style="clear: both;" />
-:javascript
- $("#hide_getting_started").click(function(){
- $('#getting_started_dashboard_section').hide();
- $.post("#{url_for(:action => 'hide_getting_started')}");
- });
diff --git a/src/app/views/hardware_profiles/_list.haml b/src/app/views/hardware_profiles/_list.haml deleted file mode 100644 index 9dca88e..0000000 --- a/src/app/views/hardware_profiles/_list.haml +++ /dev/null @@ -1,20 +0,0 @@ -- if @hardware_profiles.size == 0
- %h1 There are no hardware profiles to display
-- else
- %table
- %thead
%tr
%th{:scope => "col"} Name
%th{:scope => "col"} Memory
%th{:scope => "col"} Storage
%th{:scope => "col"} CPU
%th{:scope => "col"} Architecture
- %tbody
- @hardware_profiles.each {|hp|
%tr
%td= hp.name
%td= hp.memory.value if hp.memory
%td= hp.storage.value if hp.storage
%td= hp.cpu.value if hp.cpu
%td= hp.architecture.value if hp.architecture
- }
diff --git a/src/app/views/hardware_profiles/index.haml b/src/app/views/hardware_profiles/index.haml deleted file mode 100644 index 9dabd7e..0000000 --- a/src/app/views/hardware_profiles/index.haml +++ /dev/null @@ -1 +0,0 @@ -= render :partial => 'list' diff --git a/src/app/views/images/_images.haml b/src/app/views/images/_images.haml deleted file mode 100644 index d37f1d3..0000000 --- a/src/app/views/images/_images.haml +++ /dev/null @@ -1,18 +0,0 @@ -- columns = [ |
- {:id => 'id', :header => ''}, |
- {:id => 'name', :header => 'Name', :sortable => true}, |
-] |
-- opts = { :order => @order,
- :order_dir => @order_dir,
- :title => 'list of templates',
- :check_all => 'id',
- :header => defined?(header) ? header : nil,
- :footer => defined?(footer) ? footer : nil,
- :single_select => @single_select || false }
-= paginated_table('images_table', columns, @images, opts) do |rec|
- %tr{:class => "#{cycle('even', 'odd')}"}
- %td= check_box_tag 'ids[]', rec.id
- %td{:class => 'image_name'}= rec.image.name
- /%td= rec.instances.count
diff --git a/src/app/views/images/show.haml b/src/app/views/images/show.haml deleted file mode 100644 index eeb823e..0000000 --- a/src/app/views/images/show.haml +++ /dev/null @@ -1,20 +0,0 @@ -- content_for :scripts do
- :javascript
- $(document).ready(function() {
// bind listener, which enables "create instance" button if
// only 1 row is selected
$("#images_table").click(function() {
var checked_count = $('input[name="ids[]"]:checked', $("#images_table")).length;
$('input[name="create_instance"]').attr('disabled', checked_count != 1);
});
// uncheck all on load and disable create button
$('input[name="ids[]"]:checked', $("#images_table")).attr('checked', false);
$('input[name="create_instance"]').attr('disabled', true);
- });
-- buttons = capture_haml do
- .action_buttons
- = submit_tag "Create instance", :name => "create_instance"
-= render :partial => 'images', :locals => {:footer => buttons} diff --git a/src/app/views/instances/_instances.haml b/src/app/views/instances/_instances.haml deleted file mode 100644 index 5dbca9f..0000000 --- a/src/app/views/instances/_instances.haml +++ /dev/null @@ -1,24 +0,0 @@ -- columns = [ |
- {:id => 'id', :header => ''}, |
- {:header => 'Actions'}, |
- {:id => 'name', :header => 'Name', :sortable => true}, |
- {:header => 'Details'}, |
- {:id => 'template', :header => 'Template'}, |
- {:id => 'state', :sortable => true, :header => 'State'}, |
- {:id => 'time_last_running', :header => 'Time last running'}, |
-] |
-- opts = { :order => @order,
- :order_dir => @order_dir,
- :title => "Instances for #{@pool.name}",
- :check_all => 'id' }
-= paginated_table('instances_table', columns, @instances, opts) do |rec|
- %tr{:class => "#{cycle('even', 'odd')}"}
- %td= check_box_tag 'ids[]', rec.id
- %td= rec.get_action_list.map {|action| link_to action, :controller => "instances", :action => "instance_action", :id => rec, :instance_action => action}.join(" | ")
- %td= rec.name
- %td Details
- %td= rec.template.name
- %td= rec.state
- %td= rec.time_last_running
diff --git a/src/app/views/instances/configure.haml b/src/app/views/instances/configure.haml deleted file mode 100644 index 809c044..0000000 --- a/src/app/views/instances/configure.haml +++ /dev/null @@ -1,23 +0,0 @@ -%h2 Launch instance -- form_for @instance, :url => {:action => 'create'} do
- = hidden_field :instance, :template_id
- = hidden_field :instance, :pool_id
- %ul
- %li
= label :instance, :name
= text_field :instance, :name
- %li
= label :instance, :template
= text_field_tag :template_name, @instance.template ? @instance.template.name : '', :disabled => true
- %li
= label :instance, :pool
= text_field_tag :pool_name, @instance.pool ? @instance.pool.name : '', :disabled => true
- %li
= label :instance, :hardware_profile
= select :instance, :hardware_profile_id, @hardware_profiles.map {|p| [ p.name, p.id ]}, { :include_blank => false }
- %li
= label :instance, :realm
= select :instance, :realm_id, @instance.pool.realms.map {|r| [ r.name, r.id ]}, { :include_blank => true }
- = submit_tag 'Cancel', :name => 'cancel'
- = submit_tag 'Launch', :name => 'launch'
diff --git a/src/app/views/instances/create.haml b/src/app/views/instances/create.haml deleted file mode 100644 index 6fd9474..0000000 --- a/src/app/views/instances/create.haml +++ /dev/null @@ -1,2 +0,0 @@ -%h1 Instance#create -%p Find me in app/views/instance/create.html.erb diff --git a/src/app/views/instances/delete.haml b/src/app/views/instances/delete.haml deleted file mode 100644 index 63de29b..0000000 --- a/src/app/views/instances/delete.haml +++ /dev/null @@ -1,2 +0,0 @@ -%h1 Instance#delete -%p Find me in app/views/instance/delete.html.erb diff --git a/src/app/views/instances/index.haml b/src/app/views/instances/index.haml deleted file mode 100644 index e33041e..0000000 --- a/src/app/views/instances/index.haml +++ /dev/null @@ -1,127 +0,0 @@ -- columns = [ |
- {:name => '', :sortable => false}, |
- {:name => 'STATUS', :sortable => false}, |
- {:name => 'VM NAME', :sort_attr => 'name'}, |
- {:name => 'TYPE', :sort_attr => 'hardware_profiles.name'}, |
- {:name => 'TEMPLATE', :sort_attr => 'templates.name'}, |
- {:name => 'PUBLIC ADDRESS', :sort_attr => 'public_addresses'}, |
- {:name => 'PROVIDER', :sortable => false}, |
- {:name => 'CREATED BY', :sort_attr => 'users.last_name'}, |
-] |
-- pool_columns = [ |
- { :name => "Pool name", :sort_attr => :name }, |
- { :name => "Alerts", :sortable => false }, |
- { :name => "Capacity", :sortable => false }, |
- { :name => "Pool Family", :sort_attr => "pool_families.name" } |
-] |
-- form_tag(:action => 'instance_action') do
- .actionsidebar.grid_3
- %dl
%dt Actions
%dd
%h5 Control Instances
%ul
%li.start.disabled
%span
= submit_tag "Start", :name => "start", :class => "icon", :disabled => true
%li.stop.disabled
%span
= submit_tag "Stop", :name => "stop", :class => "icon", :disabled => true
%li.restart.disabled
%span
= submit_tag "Restart", :name => "restart", :class => "icon", :disabled => true
%li.shutdown
%span
= submit_tag "Shutdown", :name => "shutdown", :class => "icon"
%li.console.disabled
%span
= submit_tag "Console Access", :name => "console_access", :class => "icon", :disabled => true
%li.VD.disabled
%span
= submit_tag "Virtual Desktop", :name => "vd", :class => "icon", :disabled => true
%li.delete
%span
= submit_tag "Remove Failed", :name => "remove_failed", :class => "icon"
%dd
%h5 Manage Instances
%ul
%li.snapshot.disabled
%span
= submit_tag "Create Snapshot", :name => "snapshot", :class => "icon", :disabled => true
%li.grantaccess.disabled
%span
= submit_tag "Grant Access", :name => "grantaccess", :class => "icon", :disabled => true
%li.info
%span
= submit_tag "Instance Details", :name => "instance_details", :class => "icon"
%li.request_help.disabled
%span
= submit_tag "Request Help", :name => "request_help", :class => "icon", :disabled => true
- .grid_5
- %h2 My Quota
- %table
%thead
%tr
%th % Quota Used
%th
Quota
%span.small (Instances)
%tbody
%tr
- quota = current_user.quota.maximum_running_instances
%td
- if quota.respond_to? '>' and quota> 0
= "%.2f" % ((current_user.quota.running_instances / quota.to_f) * 100)
- else
= 0
%td
= quota or "unlimited"
- .grid_8
- %h2 Pool Status
- %table
=sortable_table_header pool_columns
- @pools.each do |pool|
%tr
%td
= pool.name
%td N/A
%td.capacity
%span.good
%td
=pool.pool_family.name
- .grid_13
- %h2 Instances by Pool
- @pools.each do |pool|
.grid_6.alpha.poolname
%h4= pool.name
= link_to image_tag("blnk.png", :border=>0) + "Launch Instance", {:controller => "instances", :action => "new", 'instance[pool_id]' => pool.id}, :class => "button iconbutton fr"
.grid_4.poolfilter
%input{:type => "radio", :id => "all_" + pool.id.to_s, :name => "filter_" + pool.id.to_s}
%label{:for => "all_" + pool.id.to_s} Show All
%input{:type => "radio", :id => "summary_" + pool.id.to_s, :name => "filter_" + pool.id.to_s}
%label{:for => "summary_" + pool.id.to_s} Summary View
.search.grid_3.omega
%input{:type => "search", :placeholder => "Search Instance"}
%button.action Search
%table.gap
= sortable_table_header(columns)
%tbody
- if not instances = @sorted_instances_by_pool[pool.id] or instances.empty?
%tr
%td{:colspan => 8} No Instances
- else
- instances.each do |inst|
%tr
%td= radio_button_tag 'id[]', inst.id
%td= inst.state
%td= inst.name
%td= inst.hardware_profile.name
%td= inst.template.name
%td= inst.public_addresses
%td= inst.cloud_account ? inst.cloud_account.provider.name : ''
%td= owner_name(inst)
diff --git a/src/app/views/instances/new.haml b/src/app/views/instances/new.haml deleted file mode 100644 index 8038a2b..0000000 --- a/src/app/views/instances/new.haml +++ /dev/null @@ -1,19 +0,0 @@ -%h3 Show Templates -%hr -%ul
- @templates.each do |tpl|
- %li
- form_tag(:action => 'configure') do
= hidden_field :instance, :template_id, :value => tpl.id
= hidden_field :instance, :pool_id, :value => @instance.pool.id
= image_tag "platform_#{tpl.platform}.png", :size => "32x32", :alt => tpl.platform
%h3= tpl.name
%p= tpl.summary
%p
%label Group:
System
%label Version:
2.5
= submit_tag 'Launch', :name => 'launch'
-= will_paginate(@templates) -= page_entries_info(@templates) diff --git a/src/app/views/instances/show.haml b/src/app/views/instances/show.haml deleted file mode 100644 index 33b2897..0000000 --- a/src/app/views/instances/show.haml +++ /dev/null @@ -1,61 +0,0 @@ -%h2 Instance Details -- form_tag(:action => 'index') do
- %ul
- %li
= label_tag :name, 'Name'
%span= @instance.name
- %li
= label_tag :status, 'Status'
%span= @instance.state
- %li
= label_tag :public_addresses, 'Public Addresses'
%span= @instance.public_addresses
- %li
= label_tag :private_addresses, 'Private Addresses'
%span= @instance.private_addresses
- %li
= label_tag :operating_system, 'Operating system'
%span= "#{@instance.template.xml.platform} #{@instance.template.xml.platform_version}"
- %li
= label_tag :provider, 'Provider'
%span= @instance.cloud_account.provider.name if @instance.cloud_account
- %li
= label_tag :base_template, 'Base Template'
%span= @instance.template.name
- %li
= label_tag :architecture, 'Architecture'
%span= @instance.hardware_profile.architecture.value
- %li
= label_tag :memory, 'Memory'
%span= @instance.hardware_profile.memory.value
- %li
= label_tag :storage, 'Storage'
%span= @instance.hardware_profile.storage.value
- %li
= label_tag :instantiation_time, 'Instantiation Time'
%span= @instance.created_at.strftime("%d-%b-%Y %H:%M:%S")
- %li
= label_tag :uptime, 'Uptime'
%span= @instance.total_state_time(@instance.state)
- %li
= label_tag :current_alerts, 'Current Alerts'
%span= 0
- %li
= label_tag :console_connection, 'Console Connection'
%span= 'via SSH'
- unless @instance.instance_key_id.nil?
%li
= label_tag :instance_key, 'SSH key'
%span= link_to("Download", { :controller => "instances", :action => "key", :id => @instance })
- %li
= label_tag :owner, 'Owner'
%span= "#{@instance.owner.first_name} #{@instance.owner.last_name}"
- %li
= label_tag :shared_to, 'Shared to'
%span= "N/A"
- if @instance.state == Instance::STATE_ERROR
%li
= label_tag :error, 'Error'
%span= @instance.last_error
- = submit_tag 'Back', :name => 'back'
diff --git a/src/app/views/pools/delete.haml b/src/app/views/pools/delete.haml deleted file mode 100644 index 6727d77..0000000 --- a/src/app/views/pools/delete.haml +++ /dev/null @@ -1,2 +0,0 @@ -%h1 ProviderController#delete -%p Find me in app/views/provider_controller/delete.html.erb diff --git a/src/app/views/pools/edit.haml b/src/app/views/pools/edit.haml deleted file mode 100644 index 755ecd9..0000000 --- a/src/app/views/pools/edit.haml +++ /dev/null @@ -1 +0,0 @@ -%h1 Edit Pool '#{@pool.name}' diff --git a/src/app/views/pools/hardware_profiles.haml b/src/app/views/pools/hardware_profiles.haml deleted file mode 100644 index 96fe378..0000000 --- a/src/app/views/pools/hardware_profiles.haml +++ /dev/null @@ -1 +0,0 @@ -= render :partial => 'hardware_profiles/list' diff --git a/src/app/views/pools/index.haml b/src/app/views/pools/index.haml deleted file mode 100644 index a6455d5..0000000 --- a/src/app/views/pools/index.haml +++ /dev/null @@ -1,44 +0,0 @@ -= form_tag :action => 'manage_pool' -#pools_nav.grid_3.actionsidebar
- %dl
- %dt
Pools
- / NOTE the 'edit' and 'delete' buttons are temporarily disabled.
- / They are replaced by generic<button> tags with no functionality.
- / Once we suport editing and deleting pools, we should switch it back.
- %dd.edit
%span
/= submit_tag "edit", :class => "submit linkbutton"
%button.submit.linkbutton{ :disabled => 'disabled'} edit
- %dd.delete
%span
/= submit_tag "delete", :class => "submit linkbutton"
%button.submit.linkbutton{ :disabled => 'disabled'} delete
- %dd.add
%span
/=link_to 'new pool', :action => :new, :class => "button"
%button.submit.linkbutton{ :disabled => 'disabled'} new pool
-#details{:class => 'grid_13'}
- %table
- =sortable_table_header @header
- @pools.each do |pool|
%tr
%td
- is_first_pool = (pool == @pools.first)
%input{:checked => is_first_pool, :name => "pool_checkbox", :type => "radio", :value => pool.id, :id => "pool_checkbox_#{pool.id}" }
= pool.name
%td
=((pool.quota.maximum_running_instances || 0)/100)*pool.quota.total_instances
='%'
%td
=pool.quota.total_instances
%td
=pool.pool_family.name
-:javascript
- $(document).ready(function () {
- /* NOTE: once we support bulk actions on multiple pools selected at once,
- uncomment this line:
- $("input[type='checkbox']").buttonSensitivity().change(); */
- });
diff --git a/src/app/views/pools/list.haml b/src/app/views/pools/list.haml deleted file mode 100644 index 675891d..0000000 --- a/src/app/views/pools/list.haml +++ /dev/null @@ -1,3 +0,0 @@ -= render :partial => "instance/instances"
-= link_to "Add a new instance", {:controller => "instances", :action => "new", "instance[pool_id]" => @pool}, :class=>"actionlink" diff --git a/src/app/views/pools/new.haml b/src/app/views/pools/new.haml deleted file mode 100644 index 037c7c4..0000000 --- a/src/app/views/pools/new.haml +++ /dev/null @@ -1,12 +0,0 @@ -.grid_16
- = error_messages_for 'account'
- %h1 Create a new Pool
- form_for @pool, :action => 'create' do |form|
- %h2 Pool
- %fieldset
%label.grid_2.alpha Name:
= form.text_field :name, :class => "grid_5"
= form.error_message_on :name, 'Name '
.clear.grid_14.prefix_2.alpha Provide a descriptive name for this pool.
- = submit_tag "Save", :class => "submit formbutton"
diff --git a/src/app/views/pools/realms.haml b/src/app/views/pools/realms.haml deleted file mode 100644 index 31f7886..0000000 --- a/src/app/views/pools/realms.haml +++ /dev/null @@ -1 +0,0 @@ -= render :partial => 'realms/list' diff --git a/src/app/views/pools/show.haml b/src/app/views/pools/show.haml deleted file mode 100644 index ab914ad..0000000 --- a/src/app/views/pools/show.haml +++ /dev/null @@ -1,12 +0,0 @@ -:javascript
- $(document).ready(function() {
- $("#pool-tabs").tabs();
- });
-#pool-tabs
- %ul
- %li= link_to "Instances", {:action => "list", :id => @pool.id, :ajax => true}
- if check_privilege(Privilege::PERM_VIEW)
%li= link_to "User access", {:controller => "permissions", :action => "list", :pool_id => @pool.id, :ajax => true}
- %li= link_to "Hardware Profiles", {:action => "hardware_profiles", :id => @pool.id, :ajax => true}
- %li= link_to "Realms", {:action => "realms", :id => @pool.id, :ajax => true}
- %li= link_to "Quota", {:controller => "quotas", :action => "show", :id => @pool, :parent_type => "pool", :ajax => true}
diff --git a/src/app/views/providers/_form.haml b/src/app/views/providers/_form.haml deleted file mode 100644 index dca4cd3..0000000 --- a/src/app/views/providers/_form.haml +++ /dev/null @@ -1,25 +0,0 @@ -%fieldset
- %label.grid_4.alpha.big{ :for => "provider_name" }
- = t('.provider_name')
- %span.required
*
- %label.grid_5.big{ :for => "provider_url" }
- = t('.provider_url')
- %span.required
*
- %div.grid_4.omega
- = f.error_message_on :url, 'URL '
- = f.error_message_on :name, 'Name '
- = f.text_field :name, :title => t('.provider_name'), :value => @provider.name, :class => "clear grid_4 alpha"
- = f.text_field :url, :title => t('.provider_url'), :class => 'emailinput', :value => @provider.url, :class => "grid_5"
- .clear.prefix_4.grid_5.alpha.omega
- %span
(
%button.linkbutton.nospace{ :type => 'submit', :value => t('.test_connection'), :name => 'test_connection', :id => 'test_connection' }
= t('.test_connection')
)
-%p.requirement
- %span.required
- -
- = t('.required_field')
diff --git a/src/app/views/providers/_providers.haml b/src/app/views/providers/_providers.haml deleted file mode 100644 index 6c46532..0000000 --- a/src/app/views/providers/_providers.haml +++ /dev/null @@ -1,28 +0,0 @@ -#providers_nav.grid_3.actionsidebar
- %dl
- %dt
= t('providers.providers')
- @providers.each do |provider|
%dd
- selected = 'selected' if @provider and (provider.id == @provider.id)
%a{ :href => url_for(:controller => 'providers', :action => 'show', :id => provider), :class => selected }
= provider.name
- = edit_button(@provider, controller.action_name)
- form_tag({:controller => 'providers', :action => 'new'}, {:method => :get , :class => 'buttononly'}) do
- %input{ :type => 'submit', :value => t(:add), :disabled => ('disabled' unless controller.action_name == 'index') }
- form_tag({:controller => 'providers', :action => 'destroy', :id => @provider}, {:method => :delete , :class => 'buttononly'}) do
- = submit_tag 'delete', :disabled => ('disabled' unless @provider and controller.action_name == 'show')
-:javascript
- $(document).ready( function () {
- $("a#edit_button").click(function (event) {
event.preventDefault()
if (!$(this).attr("disabled")) {
$.get(($(this).attr("href")), function (response) {
var form = $(response).find('#edit_dcloud_form')
$("#show_dcloud").replaceWith(form)
$('a.button').attr('disabled', true)
});
}
- })
- })
diff --git a/src/app/views/providers/accounts.haml b/src/app/views/providers/accounts.haml deleted file mode 100644 index 984f257..0000000 --- a/src/app/views/providers/accounts.haml +++ /dev/null @@ -1,125 +0,0 @@ -:javascript
- function set_unlimited_quota(elem_id) {
- $("#" + elem_id)[0].value = "unlimited";
- }
-= render :partial => 'providers/providers' -#details.grid_13
- %nav.subsubnav
- = render_navigation({:context => 'old', :level => 4})
- %h1
- = t('.provider_accounts')
- form_tag ({:controller => 'cloud_accounts', :action => 'update_accounts'}), :multipart => true do
- = hidden_field :provider, :id, :value => @provider.id
- @provider.cloud_accounts.each do |acct|
%fieldset.clearfix.nomargin
%label.grid_4.la.alpha
= t('.account_name')
%span.required *
%label.grid_3.la
= t('.user_name')
%span.required *
%label.grid_3.la
= t('.password')
%span.required *
%label.grid_3.la.omega
= t('.quota_instances')
%span.required *
%fieldset.nomargin.clearfix
- disabled = 'disabled' unless check_privilege(Privilege::MODIFY, Account, @provider)
- cloud_account_id = "cloud_accounts[#{acct.id}]"
= text_field cloud_account_id, :label, :title => t('.account_name'), :value => acct.label, :disabled => disabled, :class => "grid_4 alpha"
= text_field cloud_account_id, :username, :title => t('.user_name'), :value => acct.username, :disabled => disabled, :class => "grid_3"
= password_field cloud_account_id, :password, :title => t('.password'), :disabled => disabled, :class => "grid_3"
= error_message_on :maximum_running_instances, 'Maximum Running Instances '
= text_field "quota[#{acct.id}]", :maximum_running_instances, :title => t('.quota_instances'), :value => (acct.quota.maximum_running_instances.nil? ? "unlimited" : acct.quota.maximum_running_instances), :disabled => disabled, :id => "quota_instances#{acct.id}", :class => "grid_3 omega"
%fieldset.nomargin.clearfix
.grid_3.prefix_10.alpha.omega
(
%button.linkbutton.nospace{ :type => 'button', :onclick => "set_unlimited_quota(\"quota_instances#{acct.id}\");" }<>
= t('.unlimited_quota')
)
%fieldset.clearfix.nomargin
%label.grid_4.la.alpha
= t('.account_number')
%span.required *
%label.grid_3.la
= t('.account_private_cert')
%span.required *
%label.grid_3.la
= t('.account_public_cert')
%span.required *
.grid_3.omega
%fieldset.clearfix
= text_field cloud_account_id, :account_number, :title => t('.account_number'), :value => acct.account_number, :disabled => disabled, :class => "grid_4 alpha"
.grid_3
= file_field cloud_account_id, :x509_cert_priv_file, :title => t('.account_private_cert'), :disabled => disabled
.grid_3
= file_field cloud_account_id, :x509_cert_pub_file, :title => t('.account_public_cert'), :disabled => disabled
- remove_path = url_for :controller => 'cloud_accounts', :action => 'destroy', :id => acct.id if check_privilege(Privilege::MODIFY, Account, @provider)&& acct.destroyable?
.grid_3.omega
%a.button{ :href => remove_path, :name => "remove_acc_#{acct.id}", :class => "tiny #{'disabled' unless remove_path}" }
= t(:remove)
%fieldset.clearfix.gap
= link_to t(:reset), {:controller => 'provider', :action => 'accounts', :id => @provider.id}, :class => "button dialogbutton" unless @provider.cloud_accounts.empty?
= submit_tag t(:save), :name => 'update_cloud_accounts', :class => "dialogbutton" unless @provider.cloud_accounts.empty?
- %h2
- = t('.new_provider_account')
- form_tag({:controller => 'cloud_accounts', :action => 'create'}, :multipart => true) do
- = hidden_field :cloud_account, :provider_id, :value => @provider.id
- %fieldset.clearfix.nomargin
%label.grid_4.la.alpha
= t('.account_name')
%span.required *
%label.grid_3.la
= t('.user_name')
%span.required *
%label.grid_3.la
= t('.password')
%span.required *
%label.grid_3.la.omega
= t('.quota_instances')
%span.required *
- %fieldset.nomargin.clearfix
= text_field :cloud_account, :label, :title => t('.account_name'), :class => "grid_4 alpha"
= text_field :cloud_account, :username, :title => t('.user_name'), :class => "grid_3"
= password_field :cloud_account, :password, :title => t('.password'), :class => "grid_3"
= text_field "quota", :maximum_running_instances, :title => t('.quota_instances'), :value => "unlimited",:id => "quota_instances", :class => "grid_3 omega"
- %fieldset.nomargin.clearfix
.grid_3.prefix_10.alpha.omega
(
%button.linkbutton.nospace{ :type => 'button', :onclick => "set_unlimited_quota(\"quota_instances\");" }<>
= t('.unlimited_quota')
)
- %fieldset.clearfix.nomargin
%label.grid_4.la.alpha
= t('.account_number')
%span.required *
%label.grid_3.la
= t('.account_private_cert')
%span.required *
%label.grid_3.la
= t('.account_public_cert')
%span.required *
.grid_3.omega
- %fieldset.clearfix.nomargin
= text_field :cloud_account, :account_number, :title => t('.account_number'), :class => "grid_4 alpha"
.grid_3
= file_field :cloud_account, :x509_cert_priv_file, :title => t('.account_private_cert')
.grid_3
= file_field :cloud_account, :x509_cert_pub_file, :title => t('.account_public_cert')
- remove_path = url_for :controller => 'cloud_accounts', :action => 'destroy'
.grid_3.omega
(
%button.linkbutton.nospace{ :type => 'submit', :value => t('.test_account'), :name => 'test_account', :id => 'test_account' }<>
= t('.test_account')
)
- %fieldset.clearfix
.grid_13.alpha.omega
= submit_tag t(:add), :class => "ra nomargin dialogbutton"
- %section
%p.requirement
%span.required *
\-
= t('.required_field')
diff --git a/src/app/views/providers/delete.haml b/src/app/views/providers/delete.haml deleted file mode 100644 index 6727d77..0000000 --- a/src/app/views/providers/delete.haml +++ /dev/null @@ -1,2 +0,0 @@ -%h1 ProviderController#delete -%p Find me in app/views/provider_controller/delete.html.erb diff --git a/src/app/views/providers/edit.haml b/src/app/views/providers/edit.haml deleted file mode 100644 index 3440311..0000000 --- a/src/app/views/providers/edit.haml +++ /dev/null @@ -1,7 +0,0 @@ -= render :partial => 'providers' -#details.grid_13
- %nav.subsubnav
- = render_navigation({:context => 'old', :level => 4})
- form_for :provider, @provider, :url => provider_path(@provider), :html => { :id => 'edit_dcloud_form', :method => 'put', :class => "dcloud_form" } do |f|
- = render :partial => 'form', :locals => { :f => f }
- %input{ :type => 'submit', :value => t(:save), :name => 'save_provider', :id => 'save_provider' }
diff --git a/src/app/views/providers/hardware_profiles.haml b/src/app/views/providers/hardware_profiles.haml deleted file mode 100644 index 96fe378..0000000 --- a/src/app/views/providers/hardware_profiles.haml +++ /dev/null @@ -1 +0,0 @@ -= render :partial => 'hardware_profiles/list' diff --git a/src/app/views/providers/index.haml b/src/app/views/providers/index.haml deleted file mode 100644 index 9823f42..0000000 --- a/src/app/views/providers/index.haml +++ /dev/null @@ -1 +0,0 @@ -= render :partial => 'providers' diff --git a/src/app/views/providers/list.haml b/src/app/views/providers/list.haml deleted file mode 100644 index 9517a21..0000000 --- a/src/app/views/providers/list.haml +++ /dev/null @@ -1 +0,0 @@ -= render :partial => 'providers/providers' diff --git a/src/app/views/providers/new.haml b/src/app/views/providers/new.haml deleted file mode 100644 index 2803b64..0000000 --- a/src/app/views/providers/new.haml +++ /dev/null @@ -1,7 +0,0 @@ -= render :partial => 'providers' -#details.grid_13
- %nav.subsubnav
- = render_navigation({:context => 'old', :level => 4})
- form_for :provider, @provider, :url => providers_path, :html => { :class => "dcloud_form" } do |f|
- = render :partial => 'form', :locals => { :f => f }
- %input{ :type => 'submit', :value => t(:add), :name => 'add_provider', :id => 'add_provider' }
diff --git a/src/app/views/providers/realms.haml b/src/app/views/providers/realms.haml deleted file mode 100644 index 31f7886..0000000 --- a/src/app/views/providers/realms.haml +++ /dev/null @@ -1 +0,0 @@ -= render :partial => 'realms/list' diff --git a/src/app/views/providers/settings.haml b/src/app/views/providers/settings.haml deleted file mode 100644 index b4cdc43..0000000 --- a/src/app/views/providers/settings.haml +++ /dev/null @@ -1,3 +0,0 @@ -- form_tag({ :action => 'destroy' }, {:onsubmit => "return confirm('Really delete the provider?');"}) do
- = hidden_field :provider, :id
- = submit_tag "Delete Provider", :class => "submit_link"
diff --git a/src/app/views/providers/show.haml b/src/app/views/providers/show.haml deleted file mode 100644 index ccc814a..0000000 --- a/src/app/views/providers/show.haml +++ /dev/null @@ -1,14 +0,0 @@ -= render :partial => 'providers' -#details.grid_13
- %nav.subsubnav
- = render_navigation({:context => 'old', :level => 4})
- %br
- %table#show_dcloud
%thead
%tr
%th{:scope => "col"} Provider Name
%th{:scope => "col"} Provider URL
%tbody
%tr
%td= @provider.name
%td= @provider.url
diff --git a/src/app/views/realms/_list.haml b/src/app/views/realms/_list.haml deleted file mode 100644 index 9aa09dc..0000000 --- a/src/app/views/realms/_list.haml +++ /dev/null @@ -1,12 +0,0 @@ -- if @realm_names.size == 0
- %h1 There are no realms to display
-- else
- %table
- %thead
%tr
%th{:scope => "col"} Name
- %tbody
- @realm_names.each {|realm_name|
%tr
%td= realm_name
- }
diff --git a/src/app/views/settings/general_settings.haml b/src/app/views/settings/general_settings.haml deleted file mode 100644 index 43eba52..0000000 --- a/src/app/views/settings/general_settings.haml +++ /dev/null @@ -1,41 +0,0 @@ -%form
- .grid_16
- %h1 Portal
- %fieldset.clearfix
%label.grid_5.alpha Brand Icon:
.grid_6
%input{:type => "file", :disabled => true}
- %fieldset.clearfix
%label.grid_5.alpha Tag Line:
%textarea.grid_6.disabled{:disabled => true}
- %fieldset.clearfix
.grid_5.alpha.disabled.ra
%input{:type => "checkbox", :disabled => true}
%label Allow Self Service Account Creation:
.grid_6.disabled
%select{:disabled => true}
%option Select User Treatment
- %fieldset.clearfix
%label.alpha.grid_5 Primary URL Port:
%input.grid_6{:value => "3000", :disabled => true}
- %h1 Content
- %fieldset.clearfix
%label.grid_5.alpha Entitlement Mode:
.grid_5
%ul.block
%li
%input{:type => "radio", :name => "entitlement", :disabled => true}
%label.disabled User Brings Subscriptions
%li
%input{:type => "radio", :name => "entitlement", :disabled => true}
%label.disabled System Provides Subscriptions
- %fieldset.clearfix
%label.grid_5.alpha Certitifcate:
.grid_6
%input{:type => "file", :disabled => true}
- %fieldset.clearfix
%label.alpha.grid_5 Content Manager URL:
%input.grid_6{:disabled => true}
- %fieldset.clearfix
%button.formbutton{:disabled => true} Reset
%button.formbutton{:disabled => true} Save
diff --git a/src/app/views/settings/index.haml b/src/app/views/settings/index.haml deleted file mode 100644 index 5963ec4..0000000 --- a/src/app/views/settings/index.haml +++ /dev/null @@ -1,64 +0,0 @@ -%ul.tiles
- %li#providers.grid_8
- = image_tag "blnk.png", :class => "icon", :alt => ""
- %h2
= t('.manage_providers')
- %p
= t('.manage_providers_desc')
- = link_to t(:continue), {:controller => 'providers'}, :class => 'button'
- %li#users.grid_8
- = image_tag "blnk.png", :class => "icon", :alt => ""
- %h2
= t('.manage_users')
- %p
= t('.manage_users_desc')
- = link_to t(:continue), {:controller => 'users'}, :class => 'button'
- %li#services.grid_8.disabled.clear
- = image_tag "blnk.png", :class => "icon", :alt => ""
- %h2
= t('.define_services')
- %p
= t('.define_services_desc')
- %button{:disabled => "disabled"}
= t(:continue)
- %li#permissions.grid_8
- = image_tag "blnk.png", :class => "icon", :alt => ""
- %h2
= t('.permissions')
- %p
= t('.permissions_desc')
- = link_to t(:continue), {:controller => 'settings', :action => 'self_service'}, :class => 'button'
- %li#hardware.grid_8.disabled
- = image_tag "blnk.png", :class => "icon", :alt => ""
- %h2
= t('.define_hardware_profiles')
- %p
= t('.define_hardware_profiles_desc')
- %button{:disabled => "disabled"}
= t(:continue)
- %li#settings.grid_8
- = image_tag "blnk.png", :class => "icon", :alt => ""
- %h2
= t('.general_settings')
- %p
= t('.general_settings_desc')
- = link_to t(:continue), {:controller => 'settings', :action => 'general_settings'}, :class => 'button'
- %li#locales.grid_8.disabled.clear
- = image_tag "blnk.png", :class => "icon", :alt => ""
- %h2
= t('.define_locales')
- %p
= t('.define_locales_desc')
- %button{:disabled => "disabled"}
= t(:continue)
-:javascript
- $(document).ready(function () {
- var $tiles = $(".tiles li:not(.disabled)").addClass('pointercursor');
- $tiles.click(function (e) {
$e = $(e.target);
if (!$e.is('.button')) {
window.location = $('.button',this).attr('href');
}
- });
- });
diff --git a/src/app/views/settings/self_service.haml b/src/app/views/settings/self_service.haml deleted file mode 100644 index 8fd9950..0000000 --- a/src/app/views/settings/self_service.haml +++ /dev/null @@ -1,128 +0,0 @@ -.actionsidebar.grid_3
- %dl
- %dd
%a.selected Self-Service User
- %form
- = submit_tag t(:edit), :disabled => 'disabled'
- = submit_tag t(:new), :disabled => 'disabled'
-.grid_13
- = error_messages_for @parent_type
- %h2
- = t('.self_service_default')
- form_for @self_service_default_quota, :url => { :action => 'update' } do |form|
- %h3 Instances
- %fieldset.clearfix
%label.grid_2.alpha Permissions:
.grid_4 My personal Instances
.grid_4 Full Instance Permission
.grid_3.omega
(
%a{:href=>'#'}> Edit
)
(
%a{:href=>'#'}> Remove
)
- %fieldset.clearfix.gap
.grid_4.prefix_2.alpha
%select.disabled{:disabled => true}
%option
Category of Instances
.grid_4
%ul.block
%li
%input{ :type => "radio", :name => "permission", :disabled => true}
%label.disabled Control Instance - Can't Share
%li
%input{ :type => "radio", :name => "permission", :disabled => true}
%label.disabled Control Instance - Can Share
%li
%input{ :type => "radio", :name => "permission", :disabled => true}
%label.disabled Full Instance Permission
%li
%input{ :type => "radio", :name => "permission", :disabled => true}
%label.disabled Custom ...
.grid_3.omega
(
%a{:href=>'#'}> Add
)
- = hidden_field :self_service_default_quota, :id
- %fieldset.clearfix.gap
%label.grid_2.alpha
= t('.quota') + ":"
= text_field :self_service_default_quota, :maximum_running_instances, :class => 'grid_5'
.grid_2.la (instances)
= form.error_message_on :maximum_running_instances, 'Maximum Running Instances '
- %h3 POOLS
- %fieldset.clearfix
%label.grid_2.alpha Permissions:
.grid_4 General Usage
.grid_4 Regular Pool User
.grid_3.omega
(
%a{:href=>'#'}> Edit
)
(
%a{:href=>'#'}> Remove
)
- %fieldset.clearfix.gap
.grid_4.prefix_2.alpha
%select.disabled{:disabled => true}
%option
Category of Pools
.grid_4
%ul.block
%li
%input{ :type => "radio", :name => "pooltype", :disabled => true}
%label.disabled Limited Pool User
%li
%input{ :type => "radio", :name => "pooltype", :disabled => true}
%label.disabled Regular Pool User
%li
%input{ :type => "radio", :name => "pooltype", :disabled => true}
%label.disabled Advanced Pool User
%li
%input{ :type => "radio", :name => "pooltype", :disabled => true}
%label.disabled Custom ...
.grid_3.omega
(
%a{:href=>'#'}> Add
)
- %h3 TEMPLATES
- %fieldset.clearfix
%label.grid_2.alpha Permissions:
.grid_4 General Usage
.grid_4 Basic Template User
.grid_3.omega
(
%a{:href=>'#'}> Edit
)
(
%a{:href=>'#'}> Remove
)
- %fieldset.clearfix.gap
.grid_4.prefix_2.alpha
%select.disabled{:disabled => true}
%option
Category of Templates
.grid_4
%ul.block
%li
%input{ :type => "radio", :name => "pooltype", :disabled => true}
%label.disabled Basic Template User
%li
%input{ :type => "radio", :name => "pooltype", :disabled => true}
%label.disabled General Template User
%li
%input{ :type => "radio", :name => "pooltype", :disabled => true}
%label.disabled Advanced Template User
%li
%input{ :type => "radio", :name => "pooltype", :disabled => true}
%label.disabled Custom ...
.grid_3.omega
(
%a{:href=>'#'}> Add
)
- .grid_13.omega.alpha.gap
%button.formbutton Reset
= submit_tag t(:save), :class => "submit formbutton"
diff --git a/src/app/views/templates/_addbuttons.haml b/src/app/views/templates/_addbuttons.haml deleted file mode 100644 index 44cc12a..0000000 --- a/src/app/views/templates/_addbuttons.haml +++ /dev/null @@ -1,3 +0,0 @@ -%fieldset.clear
- = submit_tag "Add Selected", :name => "add_selected", :class => "grid_2 alpha", :id => "do_add_software"
- = submit_tag "Cancel", :name => "cancel_add_software", :class => "grid_2", :id => "cancel_add_software"
diff --git a/src/app/views/templates/_basics.haml b/src/app/views/templates/_basics.haml deleted file mode 100644 index 72d2423..0000000 --- a/src/app/views/templates/_basics.haml +++ /dev/null @@ -1,27 +0,0 @@ -%h3 General Information -%fieldset.clearfix
- %label.grid_4.alpha.la Template Name:
- %label.grid_7.la Summary:
- %label.grid_3.suffix_2.omega.la Version:
- = text_field :tpl, :name, :value => @tpl.name || 'Template Name', :class => "grid_4 alpha"
- = text_field :tpl, :summary, :value => @tpl.summary || 'Template Description', :class => "grid_7"
- = text_field_tag 'current_version', 'Current Version', :disabled => true, :class => "grid_3"
- %button{:type => 'button', :disabled => 'disabled', :class => "grid_2 omega"} New Version
-%fieldset.clearfix
- %label.grid_4.alpha Choose Logo:
- %input{:type => 'file', :disabled => 'disabled', :class => "grid_7"}
-%fieldset.clearfix
- default = @tpl.platforms['fedora']
- = label :tpl, :platform, 'Platform Choice:', :class => "grid_4 alpha"
- = select :tpl, :platform, @tpl.platforms.map {|id, p| ["#{p['name']} #{p['version']} (#{p['architecture']})", id]}, {:selected => @tpl.platform || 'fedora'}, {:class => 'grid_7'}
-%fieldset.clearfix
- = label_tag :bootable, 'Bootable:', :class => "grid_4 alpha"
- .grid_12.omega
- = radio_button_tag :bootable, 'yes', true, :disabled => true
- = label_tag :bootable, 'Yes'
- = radio_button_tag :bootable, 'no', false, :disabled => true
- = label_tag :bootable, 'No'
-%fieldset.clearfix
- %label{:for => :template_group, :class => 'grid_4 alpha'}
- Template Group:
- = select_tag(:template_group, options_for_select([['User Private', 1]]), :class => 'grid_4')
diff --git a/src/app/views/templates/_collections.haml b/src/app/views/templates/_collections.haml deleted file mode 100644 index 98ce959..0000000 --- a/src/app/views/templates/_collections.haml +++ /dev/null @@ -1,8 +0,0 @@ -%ul.collections
- @collections.each do |c|
- %li
/- selected = c[:selected] ? true : false
- selected = false
= check_box_tag 'groups[]', c[:id], selected, {:disabled => selected, :id => "group_#{c[:id]}", :class => "#{selected ? 'selected' : ''}"}
= label_tag "group_#{c[:id]}", c[:name]
-= render :partial => 'addbuttons' diff --git a/src/app/views/templates/_form.haml b/src/app/views/templates/_form.haml deleted file mode 100644 index dff9811..0000000 --- a/src/app/views/templates/_form.haml +++ /dev/null @@ -1,122 +0,0 @@ -:javascript
- $(document).ready(function() {
- var $content_container = $('#managed_content');
- var $sel_pkg_container = $('#package_selection_list');
- var $submit = $('#add_software_button');
- $submit.click(function(e) {
e.preventDefault();
$submit.hide();
var data = {
'packages[]': $("input[name='packages[]']").map(function() {return $(this).val()}).get(),
'repository': $("select[name='tpl[platform]']").val() || ''
}
var url = '#{url_for :action => 'content_selection', :id => @id}';
//$content_container.empty().show();
$sel_pkg_container.empty().show().addClass('loading');
$sel_pkg_container.load(url, data, function(){
$sel_pkg_container.removeClass('loading');
var $groups = $('.softwaregroups .disclosure', this);
//search
$("input[name='package_search']").keypress(function(event) {
if (event.keyCode == '13') {
event.preventDefault();
$("input[name=package_search] ~ button").click();
}
});
$("input[name=package_search] ~ button").click(function(event) {
event.preventDefault();
var data = {
'packages[]': $("input:text[name='packages[]']").map(function() {return $(this).val()}).get(),
'package_search': $("input[name='package_search']").val(),
'repository': $("select[name='tpl[platform]']").val()
};
var url = '#{url_for :action => 'search_packages', :id => @id}';
$('#metagrouppackages').empty().addClass('loading');
$('#metagrouppackages').load(url, data, function() {
$('#metagrouppackages').removeClass('loading');
});
});
});
- });
- //removing packages from the list
- $('.remove_package').live('click', function (e) {
e.preventDefault();
$(this).parent().hide(300, function () {
$(this).remove();
});
- });
- //displaying extended package info and actions
- $('.dropdown').hide();
- $('.packagename').live('click', function () {
var dropdowncontent = $(this).siblings('.dropdown').html(),
$dropdown = $("#dropdown");
$('.packagewrap').removeClass('selected');
$(this).parent().addClass('selected');
$dropdown.empty().html(dropdowncontent).css({
'top': $(this).positionAncestor('#content').top + 17,
'left': $(this).positionAncestor('#content').left - 4
}).show();
- });
- //catch #content clicks and hide the #dropdown if it's not within it
- $("#content").click(function (e) {
if(!e.target.id === 'dropdown' || !$(e.target).closest("#dropdown").length) {
$("#dropdown").hide();
$('.packagewrap').removeClass('selected');
}
- });
- // select correct package repo when we change platform
- $("select[name='tpl[platform]']").change(function() {
if ($submit.is(':hidden')) {
$submit.trigger('click');
}
- });
- // add selected pkgs/groups
- $('#do_add_software').live('click', function(e) {
e.preventDefault();
var $button = $(this).clone();
var label = "<span id='do_add_software' class='loading fl'>Adding Packages</span>";
var url = '#{url_for :action => 'managed_content'}';
var new_pkgs = $("input:checked[name='selected_packages[]']").map(function() {return $(this).val()}).get();
var old_pkgs = $("input:hidden[name='packages[]']").map(function() {return $(this).val()}).get()
var cached_pkgs = $("input:hidden[name='cached_packages[]']").map(function() {return $(this).val()}).get()
var data = {
'selected_packages[]': old_pkgs.concat(new_pkgs.concat(cached_pkgs)),
'selected_groups[]': $("input:checked[name='groups[]']").map(function() {return $(this).val()}).get(),
'collections': $("input:hidden[name=collections]").val(),
'template_id' : '#{@id.nil? ? nil : @id}'
};
$(this).replaceWith(label);
$('#managed_content').load(url, data, function(){
$("input:checked[name='groups[]']").attr('disabled', 'disabled');
$("input:checked[name='packages[]']").attr('disabled', 'disabled');
// $('#add_software_button').show();
$('.dropdown').hide();
$('#do_add_software').replaceWith($button);
});
- });
- // hide sw selection panel
- $('#cancel_add_software').live('click', function(e) {
e.preventDefault();
$('#package_selection_list').hide();
$('#add_software_button').show();
$('.dropdown').hide();
- });
- });
-= error_messages_for :tpl, :object_name => 'template' -= render :partial => 'basics' -= render :partial => 'local_content_to_bundle'
-#managed_content
- = render :partial => 'managed_content'
-.clearfix
- .grid_16.alpha.omega
- = submit_tag "Add Software", :name => "add_software_form", :id => "add_software_button", :class => "iconbutton"
-#package_selection_list{:style => 'display: none'}
-= render :partial => 'preboot_configuration'
-= submit_tag "Save", :name => "save", :class => "formbutton" -= submit_tag "Cancel", :name => "cancel", :class => "formbutton" diff --git a/src/app/views/templates/_hidden_fields.haml b/src/app/views/templates/_hidden_fields.haml deleted file mode 100644 index 5709087..0000000 --- a/src/app/views/templates/_hidden_fields.haml +++ /dev/null @@ -1,8 +0,0 @@ -= hidden_field :tpl, :id -= hidden_field :tpl, :name -= hidden_field :tpl, :summary -= hidden_field :tpl, :platform -= hidden_field :tpl, :platform_version -= hidden_field :tpl, :architecture -- @tpl.packages.each do |p|
- = hidden_field_tag "packages[]", p, :id => "package_#{p}"
diff --git a/src/app/views/templates/_local_content_to_bundle.haml b/src/app/views/templates/_local_content_to_bundle.haml deleted file mode 100644 index 109ce20..0000000 --- a/src/app/views/templates/_local_content_to_bundle.haml +++ /dev/null @@ -1,21 +0,0 @@ -%h3.disabled.gap Local Content to Bundle -%fieldset.clearfix
- = label_tag :local_bundle_name, 'Local:', :class => "disabled grid_2 alpha"
- = text_field_tag 'local_bundle_name[]', 'Bundle Name', :disabled => true, :class => "grid_8"
- .grid_6.omega
- %button{:type => 'button', :disabled => 'disabled'} Browse
- %button{:type => 'button', :disabled => 'disabled'} Config
- %button{:type => 'button', :disabled => 'disabled'} Metadata
- (
- %a{:href => '#'} Remove
- )
- .grid_2.alpha
-
- = text_field_tag 'local_bundle_name[]', 'Bundle Name', :disabled => true, :class => "grid_8"
- .grid_6.omega
- %button{:type => 'button', :disabled => 'disabled'} Browse
- %button{:type => 'button', :disabled => 'disabled'} Config
- %button{:type => 'button', :disabled => 'disabled'} Metadata
- (
- %a{:href => '#'} Remove
- )
diff --git a/src/app/views/templates/_managed_content.haml b/src/app/views/templates/_managed_content.haml deleted file mode 100644 index 5b9f13a..0000000 --- a/src/app/views/templates/_managed_content.haml +++ /dev/null @@ -1,21 +0,0 @@ -#selected_packages
- %h3.gap Managed Content to Bundle
- .grid_16.alpha.omega
- if @tpl.packages.empty?
No selected packages
- else
/- repos = @repository_manager.repositories_hash
- @tpl.packages.sort.each do |pkg|
/- pkg_group = @groups.keys.find {|g| @groups[g][:packages][pkg]}
.packagewrap
%a.packagename{:id => "package_#{pkg}"}=pkg
= hidden_field_tag 'packages[]', pkg, :id => "package_#{pkg}"
= submit_tag "Remove", :name => "remove_package_#{pkg}", :id => "remove_package_#{pkg}", :class => 'remove_package'
.dropdown
/ we don't display repository for now, it's pretty difficult with current design
/%section
/ Repository:
/ %label= (pkg_group and repo = repos[@groups[pkg_group][:repository_id]]) ? repo.name.to_s : ' '
%fieldset.nomargin
%button{:disabled => true} Browse
%button{:disabled => true} Config
diff --git a/src/app/views/templates/_metagroup_packages.haml b/src/app/views/templates/_metagroup_packages.haml deleted file mode 100644 index 3e83d34..0000000 --- a/src/app/views/templates/_metagroup_packages.haml +++ /dev/null @@ -1,19 +0,0 @@ -- if @metagroup_packages.blank?
- %span.disabled No group selected
-- else
- %h4
- = "#{@metagroup} Packages"
- %ul.metagrouppackages
- @metagroup_packages.sort {|a, b| a[:name]<=> b[:name]}.each do |group|
%li
- selected = false
%h5
= check_box_tag 'selected_groups[]', group[:id], selected, {:disabled => selected, :id => "group_#{group[:id]}", :class => "softwaregroups #{selected ? 'selected' : ''}"}
= label_tag "group_#{group[:id]}", group[:name]
%ul
- group[:packages].each do |pkg|
%li
- selected = @packages.to_a.find {|p| p[:name] == pkg}
= check_box_tag 'selected_packages[]', pkg, selected, {:disabled => selected, :id => "pkg_#{group[:name]}_#{pkg}"}
= label_tag "pkg_#{group[:name]}_#{pkg}", pkg
- = render :partial => 'addbuttons'
diff --git a/src/app/views/templates/_metagroups.haml b/src/app/views/templates/_metagroups.haml deleted file mode 100644 index b4fcf3f..0000000 --- a/src/app/views/templates/_metagroups.haml +++ /dev/null @@ -1,13 +0,0 @@ -%fieldset.clearfix
- .search.grid_4.alpha
- %input{:type => "search", :placeholder => "Search for package", :name => 'package_search', :value => params[:package_search], :id => 'package_search'}
- %button.action{:id => 'package_search_button'}
- .grid_8
- %a.grid_4.omega Advanced Search
-%ul.metagroups{:class => 'packagegroupsidebar grid_4 alpha'}
- %li
- = submit_tag 'Collections', :name => 'collections', :id => 'collections', :class => 'icon'
- @metagroups.keys.sort.each do |cat|
- %li
= submit_tag cat, :name => "metagroup_packages", :class => 'icon'
diff --git a/src/app/views/templates/_preboot_configuration.haml b/src/app/views/templates/_preboot_configuration.haml deleted file mode 100644 index 79ae839..0000000 --- a/src/app/views/templates/_preboot_configuration.haml +++ /dev/null @@ -1,11 +0,0 @@ -%h3.clear.gap Preboot Configuration -%fieldset.clearfix
- .grid_4.alpha
- = radio_button_tag :configure_via_script, 'no', :disabled => true
- = label_tag :configure_via_script, 'Configure Via Script'
- = file_field_tag 'script_file', :disabled => true, :class => 'grid_12 omega'
-%fieldset.clearfix
- .grid_4.alpha
- = radio_button_tag :configure_via_script, 'no', :disabled => true
- = label_tag :configure_via_script, 'Configure Via Script'
- = file_field_tag 'script_file', :disabled => true, :class => 'grid_12 omega'
diff --git a/src/app/views/templates/_search_packages.haml b/src/app/views/templates/_search_packages.haml deleted file mode 100644 index 873f2ab..0000000 --- a/src/app/views/templates/_search_packages.haml +++ /dev/null @@ -1,45 +0,0 @@ -:javascript
- $(document).ready(function() {
- $('.pagination input[type=submit]').click(function(e) {
e.preventDefault();
var url = '#{url_for :action => 'dispatch', :id => @id}';
var old_pkgs = $("input:hidden[name='cached_packages[]']").map(function() {return $(this).val()}).get();
var new_pkgs = $("input:checked[name='selected_packages[]']").map(function() {return $(this).val()}).get();
var data = {
'selected_packages[]': $("input:hidden[name='packages[]']").map(function() {return $(this).val()}).get(),
'cached_packages[]': old_pkgs.concat(new_pkgs),
'selected_groups[]': $("input:checked[name='groups[]']").map(function() {return $(this).val()}).get(),
'package_search': $("input[name='package_search']").val(),
'old_page': '#{@page}',
'template_id' : '#{@id.nil? ? nil : @id}',
'page': $(this).val(),
'repository': $("select[name='tpl[platform]']").val()
};
$('#metagrouppackages').empty().addClass('loading');
$('#metagrouppackages').load(url, data, function() {
$('#metagrouppackages').removeClass('loading');
})
- });
- });
-- @cached_packages.uniq.each do |pkg|
- = hidden_field_tag 'cached_packages[]', pkg
-- if params[:package_search].empty?
- Search string is empty.
--else
- %h4
- = "Search Results for '#{params[:package_search]}'"
- %ul.searchedpackages
- @searched_packages.sort {|a, b| a [:name]<=> b[:name]}.each do |pkg|
%li
- selected = (@packages.to_a.find {|p| p[:name] == pkg[:name]} or @cached_packages.include?(pkg[:name]))
- disabled = @tpl.packages.include?(pkg[:name])
= check_box_tag 'selected_packages[]', pkg[:name], selected, {:disabled => disabled, :id => "pkg_#{pkg[:name]}"}
= label_tag "pkg_#{pkg[:name]}", pkg[:name]
- .pageinfo
- = page_entries_info @searched_packages, :entry_name => 'package'
- = will_paginate @searched_packages, :params => {:package_search => params[:package_search]}, :renderer => TemplatesHelper::ButtonPaginationRenderer.new, :previous_label => 'Previous', :next_label => 'Next'
- = render :partial => 'addbuttons'
diff --git a/src/app/views/templates/_software_selection.haml b/src/app/views/templates/_software_selection.haml deleted file mode 100644 index 79bbe1e..0000000 --- a/src/app/views/templates/_software_selection.haml +++ /dev/null @@ -1,39 +0,0 @@ -:javascript
- $(document).ready(function() {
- var $metagrouppackages = $('#metagrouppackages');
- $('.metagroups input').click(function(e) {
e.preventDefault();
var data = {
'repository': $("select[name='tpl[platform]']").val(),
'packages[]': $("input:hidden[name='packages[]']").map(function() {return $(this).val()}).get()
};
if ($(this).attr('name') == 'collections') {
var url = '#{url_for :action => 'collections', :id => @id}';
} else {
var url = '#{url_for :action => 'metagroup_packages', :id => @id}';
data.metagroup_packages = e.currentTarget.value;
}
$metagrouppackages.empty().addClass('loading');
$metagrouppackages.load(url, data, function() {
$metagrouppackages.removeClass('loading');
//select all packages in collection
$(".softwaregroups").click(function() {
if ($(this).attr("checked") === true) {
$(this).parent().siblings("ul").find("input[type='checkbox']").attr("checked","checked");
} else {
$(this).parent().siblings("ul").find("input[type='checkbox']").removeAttr("checked");
}
});
});
- });
- });
-.grid_16
- %h4 Managed Content Selection
- form_tag :action => 'dispatch' do
- unless request.xhr?
= render :partial => 'hidden_fields'
- = render :partial => 'metagroups'
- #metagrouppackages.grid_12.omega.gap
= render :partial => view
diff --git a/src/app/views/templates/_templates.haml b/src/app/views/templates/_templates.haml deleted file mode 100644 index 54dc222..0000000 --- a/src/app/views/templates/_templates.haml +++ /dev/null @@ -1,27 +0,0 @@ -- template_columns = [ |
- {:name => '', :sortable => false}, |
- {:name => 'NAME', :sort_attr => 'name'}, |
- {:name => 'OS', :sort_attr => 'platform'}, |
- {:name => 'VERSION', :sort_attr => 'platform_version'}, |
- {:name => 'BOOTABLE', :sortable => false}, |
- {:name => 'ARCH', :sort_attr => 'architecture'}, |
-] |
-%table
- = sortable_table_header(template_columns)
- %tbody
- if @templates.empty?
%tr
%td{:colspan => 7} No Templates
- else
- @templates.each do |tpl|
%tr
%td= radio_button_tag 'ids[]', tpl.id
%td
= image_tag "blnk.png", :alt => tpl.platform, :class => "icon platform #{tpl.platform}"
= tpl.name
%td= tpl.platform
%td= tpl.platform_version
%td
= image_tag 'blnk.png', :alt => 'yes', :class => "icon yes"
%td= tpl.architecture
diff --git a/src/app/views/templates/assembly.haml b/src/app/views/templates/assembly.haml deleted file mode 100644 index c23620c..0000000 --- a/src/app/views/templates/assembly.haml +++ /dev/null @@ -1,138 +0,0 @@ -%h2 Assembly -- form_tag :controller => 'templates' do
- #general_information
- %h3 General Information
- = text_field :templates, :machine_name, :value => 'Machine Name', :disabled => 'disabled'
- = text_field :templates, :machine_description, :value => 'Machine Description', :disabled => 'disabled'
- = text_field :templates, :current_version, :value => 'Current Version'
- %button{ :disabled => 'disabled' }
New Version
- = file_field :templates, :choose_logo, :value => 'Choose Logo'
- = text_field :templates, :logo_text, :value => 'Logo Text (5 characters)'
- %label{ :for => :template_group}
Template Group
- = select_tag(:template_group, options_for_select([['User Private', 1]]))
- %span
(
%a{ :href => ''}<> add
)
- #templates
- %h3 Templates
- %button{ :disabled => 'disabled'} Add Templates
- %h4 Bootable Template:
- %span.name RHEL Standard
- %button Config
- %span
(
%a{ :href => ''}<> Remove
)
- %label OS:
- RHEL
- %label OS Version:
- 6.013 Beta 2
- %h4 Non-Bootable Template:
- (1..4).each do
%span.name Bill's LB Kernel
%button
Config
%span
(
%a{ :href => ''}<> Remove
)
- #services
- %h3 Services
- %label Type:
- %label Name:
- %label Provided
- .service
= select_tag('type1', options_for_select([['LB', 1]]))
= text_field :templates, 'name1', :value => "Bill's Load Balancer", :disabled => 'disabled'
%button Config
%span
(
%a{ :href => ''}<> Remove
)
- .service
= select_tag('type2', options_for_select([['Type', 1]]))
= text_field :templates, 'name2', :disabled => 'disabled'
%button Config
%span
(
%a{ :href => ''}<> Add New
)
- %label Type:
- %label Name:
- %label Required
- .service
= select_tag('type3', options_for_select([['SQL', 1]]))
= text_field :templates, 'name3', :value => "Special SQL Server", :disabled => 'disabled'
%button Config
%span
(
%a{ :href => ''}<> Remove
)
- .service
= select_tag('type4', options_for_select([['Type', 1]]))
= text_field :templates, 'name4', :disabled => 'disabled'
%button Config
%span
(
%a{ :href => ''}<> Add New
)
- #pre-boot_configuration
- %h3 Pre-boot Configuration
- %input{ :type => 'radio', :id => 'select_script', :name => 'configuration', :value => 'script' }
- %label{ :for => 'select_script' } Configure Via Script
- = text_field :templates, :file_name, :value => 'File Name'
- %button{ :disabled => 'disabled' }
Browse
- %input{ :type => 'radio', :id => 'select_puppet', :name => 'configuration', :value => 'puppet' }
- %label{ :for => 'select_puppet' } Configure Via Puppet
- = text_field :templates, :corporate_security, :value => 'Corporate Security'
- %button{ :disabled => 'disabled' }
Browse
- #search_assemblies
- %h3 Search Assemblies
- %input{ :type => 'text', :class => 'search'} Search Text
- %span
(
%a{ :href => '' }<> Filter Results
)
- %h4 Show Matches with:
- %input{ :type => 'checkbox', :id => 'match_name' }
- %label{ :for => 'match_name'} Name
- %input{ :type => 'checkbox', :id => 'match_description' }
- %label{ :for => 'match_description'} Match Description
- %input{ :type => 'checkbox', :id => 'match_category' }
- %label{ :for => 'match_category'} Category
- %input{ :type => 'checkbox', :id => 'match_base_os' }
- %label{ :for => 'match_base_os'} Base OS
- %input{ :type => 'checkbox', :id => 'match_services_provided' }
- %label{ :for => 'match_services_provided'} Services Provided
- %input{ :type => 'checkbox', :id => 'match_services_required' }
- %label{ :for => 'match_services_required'} Services Required
- %span
(
%a{ :href => ''}<> Uncheck All
)
- #template
- %h3 Template
- %ul
- (1..10).each do
%li
%span.name Bill's LB Kernel
%span.description Basic Kernel code for the Load Balancer
%label OS
%span.os RHEL 6.013 Beta 2
Non-Bootable
%button Add
%label Category:
%span.category System
%span.version Vers 7.2
- = submit_tag 'Cancel'
- = submit_tag 'Save'
diff --git a/src/app/views/templates/collections.haml b/src/app/views/templates/collections.haml deleted file mode 100644 index a899c85..0000000 --- a/src/app/views/templates/collections.haml +++ /dev/null @@ -1 +0,0 @@ -= render :partial => 'software_selection', :locals => {:view => 'collections'} diff --git a/src/app/views/templates/deployment_definition.haml b/src/app/views/templates/deployment_definition.haml deleted file mode 100644 index adf071d..0000000 --- a/src/app/views/templates/deployment_definition.haml +++ /dev/null @@ -1,113 +0,0 @@ -%h2 Assembly -- form_tag :controller => 'templates' do
- #general_information
- %h3 General Information
- = text_field :templates, :deployment_name, :value => 'Deployment Name', :disabled => 'disabled'
- = text_field :templates, :deployment_description, :value => 'Deployment Description', :disabled => 'disabled'
- = text_field :templates, :current_version, :value => 'Current Version'
- %button{ :disabled => 'disabled' }
New Version
- = file_field :templates, :choose_logo, :value => 'Choose Logo'
- = text_field :templates, :logo_text, :value => 'Logo Text (5 characters)'
- %label{ :for => :template_group}
Template Group
- = select_tag(:template_group, options_for_select([['User Private', 1]]))
- %span
(
%a{ :href => ''}<> add
)
- #machine_definitions
- %h3 MACHINE DEFINITIONS
- %label OS:
- RHEL
- %label OS Version:
- 6.013 Beta 2
- %table
%thead
%th
%th Hardware Profiles
%th Locale
%th
%tbody
%tr
%td Global Settings
%td= select_tag('type1', options_for_select([['Small', 1]]))
%td= select_tag('type2', options_for_select([['Any', 1]]))
%td
%button{:type => 'button', :disabled => 'disabled'} Config
- %table
%thead
%th
%th Name
%th Hardware Profiles
%th Locale
%th
%th
%tbody
- (1..2).each do
%tr
%td Bill's LB Kernel
%td= text_field :templates, :type1
%td= select_tag('type1', options_for_select([['Small', 1]]))
%td= select_tag('type2', options_for_select([['Any', 1]]))
%td
%button{:type => 'button', :disabled => 'disabled'} Config
%td
%a Remove
- #build
- %h3 BUILD
- %b Choose Provider Format:
- %ul
- @all_targets.each do |target_id, target|
%li
= check_box_tag 'targets[]', target_id, false
= label_tag 'targets[]', target['name']
- #search_assemblies
- %h3 Search Assemblies
- %input{ :type => 'text', :class => 'search'} Search Text
- %span
(
%a{ :href => '' }<> Filter Results
)
- %h4 Show Matches with:
- %input{ :type => 'checkbox', :id => 'match_name' }
- %label{ :for => 'match_name'} Name
- %input{ :type => 'checkbox', :id => 'match_description' }
- %label{ :for => 'match_description'} Match Description
- %input{ :type => 'checkbox', :id => 'match_category' }
- %label{ :for => 'match_category'} Category
- %input{ :type => 'checkbox', :id => 'match_base_os' }
- %label{ :for => 'match_base_os'} Base OS
- %input{ :type => 'checkbox', :id => 'match_services_provided' }
- %label{ :for => 'match_services_provided'} Services Provided
- %input{ :type => 'checkbox', :id => 'match_services_required' }
- %label{ :for => 'match_services_required'} Services Required
- %span
(
%a{ :href => ''}<> Uncheck All
)
- #machine_definitions_list
- %h3 MACHINE DEFINITION
- %ul
- (1..10).each do
%li
%span.name BILL'S LOAD BALANCER
%span.description A load balancer based on the algorithms put fourth in the latest journal
%label OS
%span.os RHEL 6.013 Beta 2
%label Service Provided
%span.service_provided Load Balancer
%label Service Required
%span.service_required SQL Server, S3
%button Add
%label Category:
%span.category System
%span.version Vers 7.2
- = submit_tag 'Cancel'
- = submit_tag 'Submit to Build'
diff --git a/src/app/views/templates/edit.haml b/src/app/views/templates/edit.haml deleted file mode 100644 index a2fece4..0000000 --- a/src/app/views/templates/edit.haml +++ /dev/null @@ -1,6 +0,0 @@ -#dropdown -.grid_16
- %h2 Edit Template
- form_for @tpl, :url => {:action => 'dispatch'} do
- = hidden_field_tag :id, @tpl.id
- = render :partial => 'form'
diff --git a/src/app/views/templates/index.haml b/src/app/views/templates/index.haml deleted file mode 100644 index 38b32de..0000000 --- a/src/app/views/templates/index.haml +++ /dev/null @@ -1,78 +0,0 @@ -- form_tag(:action => 'index_action') do
- .actionsidebar.grid_3
- %dl
%dt Actions
%dd
%h5 Show
%ul.filters
%li
= check_box_tag 'templates', 'templates', true, :disabled => true
= label_tag 'templates', 'Templates'
%li
= check_box_tag 'assemblies', 'assemblies', true, :disabled => true
= label_tag 'assemblies', 'Assemblies'
%li
= check_box_tag 'deployables', 'deployables', true, :disabled => true
= label_tag 'deployables', 'Deployables'
%dd
%h5 Manage
%ul
%li.edit
%span
= submit_tag "Edit", :name => "edit", :class => "icon"
%li.delete
%span
= submit_tag "Delete", :name => "delete", :class => "icon"
%li.rename.disabled
%span
= submit_tag "Rename", :name => "rename", :disabled => true, :class => "icon"
%li.copy.disabled
%span
= submit_tag "Copy", :name => "copy", :disabled => true, :class => "icon"
%dd
%h5 Build
%ul
%li.build
%span
= submit_tag "Build", :name => "build", :class => "icon"
%dd
%h5 Create New
%ul
%li.add
%span
= submit_tag "Template", :name => "new_template", :class => "icon"
%li.add
%span
= submit_tag "Assembly", :name => "assembly", :class => "icon"
%li.add
%span
= submit_tag "Deployment def.", :name => "deployment_definition", :class => "icon"
- #tables.grid_13
- .templates
%h3 Templates
= render :partial => 'templates'
- .assemblies
%h3 Assemblies
= render :partial => 'templates'
- .deployables
%h3 Deployables
= render :partial => 'templates'
-:javascript
- $(document).ready(function () {
- var $filters = $('.filters input');
- $("#tables input[type='checkbox']").buttonSensitivity().change();
- $filters.removeAttr("disabled").change(function () {
$filters.each(function () {
if ($(this).filter(':checked').length) {
$("."+this.id).show(200);
} else {
$("."+this.id).hide(200);
}
});
- }).change();
- });
diff --git a/src/app/views/templates/managed_content.haml b/src/app/views/templates/managed_content.haml deleted file mode 100644 index 926142d..0000000 --- a/src/app/views/templates/managed_content.haml +++ /dev/null @@ -1 +0,0 @@ -= render :partial => 'managed_content' diff --git a/src/app/views/templates/metagroup_packages.haml b/src/app/views/templates/metagroup_packages.haml deleted file mode 100644 index 9703663..0000000 --- a/src/app/views/templates/metagroup_packages.haml +++ /dev/null @@ -1 +0,0 @@ -= render :partial => 'software_selection', :locals => {:view => 'metagroup_packages'} diff --git a/src/app/views/templates/new.haml b/src/app/views/templates/new.haml deleted file mode 100644 index 9ae8525..0000000 --- a/src/app/views/templates/new.haml +++ /dev/null @@ -1,5 +0,0 @@ -#dropdown -.grid_16
- %h2 New Template
- form_for @tpl, :url => {:action => 'dispatch'} do
- = render :partial => 'form'
diff --git a/src/app/views/templates/search_packages.haml b/src/app/views/templates/search_packages.haml deleted file mode 100644 index 94e30f5..0000000 --- a/src/app/views/templates/search_packages.haml +++ /dev/null @@ -1 +0,0 @@ -= render :partial => 'software_selection', :locals => {:view => 'search_packages'} diff --git a/src/app/views/users/_form.haml b/src/app/views/users/_form.haml deleted file mode 100644 index efe0c96..0000000 --- a/src/app/views/users/_form.haml +++ /dev/null @@ -1,47 +0,0 @@ -.dcloud_form
- form_for @user, :url => account_path do |form|
- = hidden_field :user, :id, :value => @user.id
- = form.error_messages
- %fieldset.clear
= form.label :login, t(:choose_name), :class => "grid_3 alpha"
= form.text_field :login, :class => "grid_5"
- %fieldset.clear
= form.label :password, form.object.new_record? ? t(:choose_password) : t(:change_password), :class => "grid_3 alpha"
= form.password_field :password, :class => "grid_5"
- %fieldset
= form.label :password_confirmation, t(:confirm_password), :class => "grid_3 alpha"
= form.password_field :password_confirmation, :class => "grid_5"
- -if check_privilege(Privilege::MODIFY, User)
%fieldset.clear
= form.label :user_status, "User Status:", :class => "alpha grid_3"
.grid_5
= radio_button_tag "user_status","Active",true
= label_tag "user_status_active", "Active"
= radio_button_tag "user_status","Inactive", false, :disabled => true
= label_tag "user_status_inactive", "Inactive"
- %fieldset.clear
= form.label :first_name, t(:first_name), :class => "alpha grid_3"
= form.text_field :first_name, :class => "grid_5"
- %fieldset.clear
= form.label :last_name, t(:last_name), :class => "alpha grid_3"
= form.text_field :last_name, :class => "grid_5"
- %fieldset.clear
= form.label :email, t(:email), :class => "alpha grid_3"
= form.text_field :email, :class => "grid_5"
- -if check_privilege(Privilege::MODIFY, User)
%h3.grid_16 User Treatment
%fieldset.clearfix
= label_tag 'apply_treatment', t(:apply_treatment), :class => "alpha grid_3"
= select_tag 'user_treatment', options_for_select([t(:choose_treatment)]), :class => "grid_5"
= submit_tag t(:apply), :disabled => true, :class => "grid_2"
- form.fields_for :quota do |quota_form|
%fieldset.clear
= quota_form.label :maximum_running_instances, t(:maximum_running_instances), :class => "alpha grid_3"
= quota_form.text_field :maximum_running_instances, :class => "grid_5"
(instances)
= quota_form.error_message_on :maximum_running_instances, 'Maximum Running Instances '
- %fieldset.clearfix
= form.submit "Save", :class => "submit formbutton"
= form.submit "Reset", :class => "submit formbutton"
= link_to t(:cancel), cancel_path, :class => 'button formbutton'
diff --git a/src/app/views/users/edit.haml b/src/app/views/users/edit.haml deleted file mode 100644 index aa70a7c..0000000 --- a/src/app/views/users/edit.haml +++ /dev/null @@ -1,6 +0,0 @@ -.formwindow -- if check_privilege(Privilege::MODIFY, User)
- %h2 Editing User: #{@user.first_name} #{@user.last_name}
-- else
- %h2 Editing Account
-= render :partial => "form", :object => @user, :locals => { :cancel_path => users_path} diff --git a/src/app/views/users/index.haml b/src/app/views/users/index.haml deleted file mode 100644 index 8ec3178..0000000 --- a/src/app/views/users/index.haml +++ /dev/null @@ -1,54 +0,0 @@ -= form_tag :action => 'manage_user' -.grid_3.actionsidebar
- %dl
- %dt
Users
%dd.edit
%span
= submit_tag "edit", :class => "submit linkbutton"
%dd.delete
%span
= submit_tag "delete", :id => 'delete_button', :class => "submit linkbutton"
%dd.add
%span
= link_to "create", new_user_url
-.grid_13
- %table{:id => 'users_table'}
- %thead
%tr
%th
%th= link_to "User ID", users_url(:sort_by => "login")
%th= link_to "Last Name", users_url(:sort_by => "last_name")
%th= link_to "First Name", users_url(:sort_by => "first_name")
%th= link_to "% Quota Used", users_url(:sort_by => "percentage_quota_used")
%th
=link_to "Quota", users_url(:sort_by => "quota")
%span (Instances)
%th= link_to "e-mail", users_url(:sort_by => "email")
%th
- -@users.each do |user|
%tr
%td
%input{:name => "user_checkbox", :type => "radio", :value => user.id, :id => "user_checkbox_#{user.id}" }
%td= link_to user.login, user_path(user)
%td= user.last_name
%td= user.first_name
%td= sprintf("%.2f", user.quota.percentage_used)
%td= Quota.no_limit(user.quota.maximum_running_instances) ? "Unlimited" : user.quota.maximum_running_instances
%td= user.email
%td= link_to "edit", edit_user_path(user)
-:javascript
- $(document).ready(function () {
- $('#delete_button').click(function(e) {
if ($("#users_table input[@type=radio]:checked").length == 0) {
alert('please select any user to be deleted');
e.preventDefault();
} else {
if (!confirm("Are you sure you want to delete this user?")) {
e.preventDefault();
}
}
- });
- });
diff --git a/src/app/views/users/new.haml b/src/app/views/users/new.haml deleted file mode 100644 index 792d7c4..0000000 --- a/src/app/views/users/new.haml +++ /dev/null @@ -1,6 +0,0 @@ -%h2 New Account --if (current_user)
- = render :partial => "form", :locals => { :cancel_path => users_path}
--else
- .modalbox
- = render :partial => "form", :locals => { :cancel_path => login_path}
diff --git a/src/app/views/users/show.haml b/src/app/views/users/show.haml deleted file mode 100644 index 7c522c8..0000000 --- a/src/app/views/users/show.haml +++ /dev/null @@ -1,104 +0,0 @@ -.grid_3.actionsidebar
- %dl
- %dt
Users
%dd.edit
%span
= link_to "edit", edit_user_path(@user)
-.grid_13
- %h2 #{@user.first_name} #{@user.last_name} (#{@user.login})
- %table
- %thead
%tr
%th.show
Personal Details
%th.show
- %tbody
%tr
%td
%label Username
%td
= @user.login
%tr
%td
%label First Name
%td
= @user.first_name
%tr
%td
%label Last Name
%td
= @user.last_name
%tr
%td
%label e-mail
%td
= @user.email
- %table
- %thead
%tr
%th.show
Quota Status
%th.show
- %tbody
%tr
%td
%label Maximum
%td
= @quota_resources["running_instances"].max
%tr
%td
%label Used
%td
= @quota_resources["running_instances"].used
%tr
%td
%label Availabe
%td
= @quota_resources["running_instances"].available
- %table
- %thead
%tr
%th.show
Login Information
%th.show
- %tbody
%tr
%td
%label Current Login IP
%td
= @user.current_login_ip
%tr
%td
%label Current Login at
%td
= @user.current_login_at
%tr
%td
%label Last Login IP
%td
= @user.last_login_ip
%tr
%td
%label Last Login at
%td
= @user.last_login_at
%tr
%td
%label Login Count
%td
= @user.login_count
%tr
%td
%label Failed Login Count
%td
= @user.login_count
%tr
%td
%label Last Request at
%td
= @user.last_request_at
\ No newline at end of file diff --git a/src/config/old_navigation.rb b/src/config/old_navigation.rb deleted file mode 100644 index 27b44cf..0000000 --- a/src/config/old_navigation.rb +++ /dev/null @@ -1,42 +0,0 @@ -SimpleNavigation::Configuration.run do |navigation|
- navigation.autogenerate_item_ids = false
- navigation.items do |first_level|
- first_level.item :operation, t(:operation), '#', :class => 'operation' do |second_level|
second_level.item :monitor, t(:monitor), :controller => 'dashboard'
second_level.item :browse_objects, t(:browse_objects), '#', :class => 'disabled'
- end
- first_level.item :administration, t(:administration), '#', :class => 'administration' do |second_level|
second_level.item :system_settings, t(:system_settings), :controller => 'settings' do |third_level|
third_level.item :manage_providers, t(:manage_providers), providers_path do |fourth_level|
fourth_level.item :provider_summary, t(:provider_summary), { :controller => 'providers', :action => 'show', :id => (@provider.id if @provider) }, :highlights_on => /\/providers\/\d+(\/edit)?$/
fourth_level.item :provider_accounts, t(:provider_accounts), { :controller => 'cloud_accounts', :action => 'index', :provider_id => (@provider.id if @provider) }, :highlights_on => /\/providers\/\d+\/accounts(\/(\d+|new))?/
fourth_level.item :scheduling_policies, t(:scheduling_policies), '#'
fourth_level.item :services_provided, t(:services_provided), '#'
fourth_level.item :map_profiles, t(:map_profiles), '#'
fourth_level.item :map_locales, t(:map_locales), '#'
end
third_level.item :define_services, t(:define_services), '#'
third_level.item :define_services, t(:define_profiles), '#'
third_level.item :define_services, t(:define_locales), '#'
third_level.item :manage_users, t(:manage_users), :controller => 'users' do |fourth_level|
fourth_level.item :new_user, t(:new_user), {:controller => 'users', :action => 'new'}, :highlights_on => /\/users\/new/
fourth_level.item :edit_user, t(:edit_user), {:controller => 'users', :action => 'edit'}, :highlights_on => /\/users\/edit/
end
third_level.item :general_settings, t(:general_settings), {:controller => 'settings', :action => "general_settings"}
third_level.item :permissions, t(:permissions), { :controller => 'settings', :action => 'self_service'}
end
second_level.item :pools_and_zones, t(:pools_and_zones), {:controller => 'pools'}, :highlights_on => /\/pools/
second_level.item :audit_report, t(:audit_report), '#', :class => 'disabled'
second_level.item :assistance_requests, t(:assistance_requests), '#', :class => 'disabled'
- end
- first_level.item :define, t(:define), '#', :class => 'build' do |second_level|
second_level.item :deployables, t(:deployables), {:controller => 'templates'}, :highlights_on => /\/templates/
second_level.item :builds, t(:builds), :controller => 'builds', :action => 'index'
second_level.item :images, t(:images), '#', :class => 'disabled'
- end
- first_level.item :runtime, t(:runtime), '#', :class => 'runtime' do |second_level|
second_level.item :instance_management, t(:instance_management), :controller => 'instances'
- end
- first_level.item :help, t(:help), '#', :id => 'help', :class => "disabled"
- end
-end diff --git a/src/public/images/dashboard_summary_next.png b/src/public/images/dashboard_summary_next.png deleted file mode 100644 index ae8b24a3fb0754caeabee6fc3ee2d0ee09d99570..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001
literal 412 zcmV;N0b~A&P)<h;3K|Lk000e1NJLTq000;O000yS0ssI27}sjl00001b5ch_0Itp) z=>Px#32;bRa{vGf6951U69E94oEQKA00(qQO+^RV1sM)0F!F(b!2kdOE=fc|R5;6} zl)J5iFcgMOpx_}vB;*D}MacrtBf$V+0v13_kPS%B1i_voRZ2im(5H#Sqsjwui!`}W zf)o68$2$7-`y9*6@puFj$g&I}WLcJ(rfIR|e!n+OGmfKS7%Q4M9LJfadA(k5w;Ms! zbsf<q2m)DT+xFpb_$D1e)c1W51ZkSmiXLpY+bD|WugSgCo6Y8JA3~@oirsE!S=QTz z*Y)eVKL2WxB=LR!`LM3*^?Lo=`un~Q!!XOTg)@4_aU9R{Xhm@xV~iC=ArBiN^jro( zFf*NhOtWa3rfHh%x_O>|>Zz*gbUKl*=6N2*_|w+EO|;+dClZfDRNu&hvMg0qT~S(w zVYpl_q9}61Ff6vTZF@eSA%p+`rYMTVB2g42N#c1P0PqJMO6kwB(fBq10000<MNUMn GLSTZh>#cwQ
diff --git a/src/public/images/dashboard_summary_prev.png b/src/public/images/dashboard_summary_prev.png deleted file mode 100644 index 34ab07092795ddba41e3935920f7779f7dc50965..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001
literal 375 zcmV--0f_#IP)<h;3K|Lk000e1NJLTq000*N000yS0ssI2>D)0{00001b5ch_0Itp) z=>Px#32;bRa{vGf6951U69E94oEQKA00(qQO+^RV1sM)07{@dyI{*Ly2}wjjR5;6} zl)(ywAP|P#iUh$!6ba#>lhFG=OcZp8Bs$b#CDO2BZxQX5;m&QG@gL`#!Iuz1Db=>^ zvMj*XJgqh7JV_Elh_#9{j$;r6|40A;oNe2D-@i{XHtQJg7eyhZG;q0zP197C<+`qB zx>td|@9VmLI-{RmaL$Ke*iV|Kab0(J!!V4Z=uTyx=c=ksAWkmE`0g$9Jm-1-1jOBp zAcS!o+w9B9Pm+W&cBEiQ7h{}d*^v&V6d|-Hd~fORNka%3WBa5KLf=Fm?XKr}X_`_> zEjv0IAp~P=#N-+49En_Z1R)%T;h!%G0Pqq*bX}*EisSf6*-I4w!2A7{QfjU3R6at9 VdNubHEt&uT002ovPDHLkV1hsVmc0M~
diff --git a/src/public/images/icon_dashboard.png b/src/public/images/icon_dashboard.png deleted file mode 100644 index bfbcd9ff93266a87e65231b0e41f11a5fe68972b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001
literal 952 zcmV;p14sOcP)<h;3K|Lk000e1NJLTq000&M000&U1^@s6#I$TX0000PbVXQnQ*UN; zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBU#T1iAfRCwB)lv_*`R~X0tv$MOp!)>*I zBCu@m)}~cM0yM4ACcS7iqzSQ#F+Q0zP2i<3^+Ebz0;D{*R7_lYc|mEkK<cI!rA-kj zt)@+lmx!%c373T}1MFOOXJ+U0oPnjYu4@+0=D*oJ=lg#DZ_b(XafA@C!Eqe#+g*3f zG>kDrmAa;H41G(dmljt!7?ZPsh4R-A%ax_MxIVs!m?ZYbRXOl928`*j{dcjiU0cg= zv}QZ1w`{5x3QB^-)q5^%*io~ed9Ma;2Xm~fh<hD4cNTVTF2%u0A1eHX^`3&_;HIiK zFBHCzxq*Evy#Ci3#2>pmG4fyzqt|{$?B8ja>LQ|16?Y!a;I3#wm&IN~RRc3O({ItE zd+hbSdQiOeO&56Hi5W%1$o)Bt{Llx7A|kFVLXAf8*W@hzjyR!7%s>gu-nyD%kOD4! z<sI?QzB6z+o#0(O+%7jJ=T!{d3t=dD9-J}<Ls~#oi(+hg9%G8jGKfdjK=}6Xia`pv zq~?J5``4XtQZSR?5mu_0oL4Y78p2Qg-QXl@AkQPFX?PfpVBE-?(&dHV)NdExqoF2a zI_-~O7;)&j&MYl+Vtc|OuLlj)e$;MzA6G_a@cma`fS1DX<<m7?EBe*Ut)pRXswj(3 z0uvJ}VCzFt&!#BPgF{tisM+!X2JeP&u{!{V9EKhfH`>AW*A1p=T3{x_Ff8!nw6@8G z;CU4dFZ$7b@&xuBJ5GxtNjyh##RMANH;sZdO<y_+o7T7mwEWRx#WpofSaZc*0Y_dc zhZ!enF9_oCI0QkUV9ipZLf7tEgj!pzn2$p3Nv~BxEH@pP=#jb06>m49@4G>(nnV&C zvu$mUy$A`JkDiAu*+b=DlfSt!%U?B+`}|wv^p`zEQ4|t8*F*kk{*VUpgzt9}$Ga@y zy0w-Ni>LYC1k(=Ysj{iq>27o9mp6LKss?hN+e=P=P7P#*bi_U-&A&AN52kYoWz)EH zU@SKn*5z_m44$C|zRH2@XZMg(pPeJJB$JLyG4jdB6V~s9*!q*e85*1=QbbBprr=c@ ztQMS^LD$(7u)PUo)W4V8z*?#-s$6RD2A{S50LQyGDr3Vh)47GG0jD!yqE{7RDuprs a6JP*Vrd^qjCEz�<MNUMnLSTYig2CSa
diff --git a/src/public/stylesheets/images/icon_dashboard.gif b/src/public/stylesheets/images/icon_dashboard.gif deleted file mode 100644 index 5ed7483685461cb65f00718a83b207af6187b545..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001
literal 14152 zcmeI3X;>3S9EVq{6|q7vZPki(iL{E6Y%Y#$2{&j}yr7Clku}*sB$r7r0kuW2#e-V# z1QkJz7V!!dkBW+kC<s(7wTQJ85EZQj@hFE}-3WsEp?&6q-)5eDvYXlWKeO}B@9RwZ zJkVW0j6g;r%?Q$EX`Rh&olje-tK)HVM?+IbeN)H7XYKc&wBLKue)~~dRYO~4eOtv} zZRHQ1U%S^@QrlW|yX9ha%Y{E%OqDIi${LMV8;n=#5C8n|VDbG!#ShX-yHblgvkLDX zD7?G%a{HE|w#`M)_Z8G`ywtMk(sP5kCZ(V$rJy<4+?1JL`JL%m)4`Oa{3l8IPt)^$ zN4k(Tc@1f&ZX}-mJMnaVd~RL*@%wSPbt{auD~+`)j@({;q~_^nP0YcnW!aUw?8@i^ zx1zIdY4%ktHQZ3`Em!QhF3Tv>r<<3gUyIy%RhxS5@mF)m)DrQwV$qhOMH?@Mr4-Cd zI*-Sm#A8kf^v97j#7&p$wk+3m*)f;sV|;B+QaH&|8@Z~(Y~^9L;t-}d#FA%M2GW^P z2W|z@oujgxmt>U(&?^Gy*Zt{TJf2g;{_zsS72jdwNCP72D)AZSD9XI(W#>p_T=29T z8=m11mX3z)I486_BeeT?;r0_aZS?%KQK8#%1hk{>wj<|k$#%2Na<w(M*k<x<(z!Ni z9Ggwp(2dy8QiN)y)b?2Ju)Q4v4qZb+gJz=sgqEQ09$tDCA&Mfk=wdQLst__B<>fO_ zsaVLE>k`BcQu&dQ(#f%EGB|d6h$uEnBoH&aJgq(SxL&T3lUf4R%Vi1;t`{;0v2rnq zQ_q%ejDfyDv{6EakL3kwnbS|HCQ&|%!xXW3e3b9X;<|AKZm!N~Frh`K5DJv*hH}|# z>W7PSI5?k!_B4j4HTC477EAEi{((JnQvZaENUc_dW0+2-W9fJ-r8)xR2m}I*&BeG} zCPgqcF$yiAXDT#fy9aqWjz6gpsii8dRH;BM;}VON(OMycVVS76^(>B1^-iSFuwE>b zB~r>UJ)y!lEH>6VGF9k7b>e<%lF%yEAxfppvwQi0QZ=bls-rZhUog+ZQu!LxH)~%# zNo^77N%?SRviZ~%!sXyR7o5wT|4Mx~^hSA*QY@9kyk71e!m-ri9JikGSD>D956mLs z6)`WYTh{bO|NjXSi+X*jqSdk&+aeZWq>Pl43ay56#(CYDScFTIYB{0xl*)++5{r;Z zJg~mb|NOr0ucl%_#S-hy<;zd+-O9J}(C7WF4BtH{oCHWN)CF|`832M|x}Yu~13)lL z7t{r000@TZg1UeV0KqU_P#2H^AQ+|#>H;zV1jBSeT|fqaV3;nb3&;Qv4ATX50T}>- zVY;9$AOk=!Oc&GzWB>?;>4Lg|3;@9}T~HU00U#Kr3+e(g00hHyL0v!wfMA#|s0+vd z5De1=bpaUwf?>L#E+7LyFiaQJ1!MpS{?Bw-_nq`071Z$#9d(YQUsq>Gd)xEYmgc5^ zo;`i?xbaa#{ofD&dT_t)-rYO3w`;1a{;d4t*6%kfZj}Fa{nxTzu3f$Ib7@KO<)Xq% z7Yi<!P3QB^ojsFx`lnMTPaMxZ_G6Cm=#j&R4rU+7`eFY*!`?l+Gc$Ij@7%FHEp^-0 zEt@xOOiBKJ!*@yR*R5TX`0Y2V6XI9Jef`zS70Y8|^txryT8(<CN~w^`qLxS_BP66) zw3rBA6!zu91@q^H&Ykl`Nbu}gGiOW>nl^RH=aVM|2Kf8=`gnVJ3Ox{9;O^$?!sl^0 zY>dTpo;bm2{J2j)aU9EVK*xMM+J4kWBS#GX@Pqg1!|Z6bHbdVVVm;Vu(7OW%ywkrQ zf;hAe=r;&ik2qV-+E@;VAy!?;@WJ+zjhUtdEBb_mMMlEciMB5^XHUTT;h3cK)Y9NV zh_4gkyUyOJY(rs!T~2t7d0=TOM^;gqwztk;a<W%{>s=EcICQl4I>)8vLW$1=flqSi z<G@)P#`q=kSCtixH%$~wJ)c#Un@AfwZI^#Padh}r8^(0m@i-!35Pd>e(ahO%GPlx} z43nQV`X^QKrPX(C#wQP1du9P|4Pn}wQ|o1wXYgJakWj^os4g<qj-#0|rsR(byE_S~ z$^G9OA4wx<W;RDw-RL78FcML|d*&u{H_gnADlb^8sk8bB>2K{A-WVS5u-egYziDN7 u^C;`Y%t=am91=g!1`QeEZAf>t$Cr0nG5oFUViFr`OEPBUdz#{q&;A8^{IuTy
diff --git a/src/spec/controllers/dashboard_controller_spec.rb b/src/spec/controllers/dashboard_controller_spec.rb deleted file mode 100644 index bd327ce..0000000 --- a/src/spec/controllers/dashboard_controller_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -require 'spec_helper'
-describe DashboardController do
- fixtures :all
- before(:each) do
- @admin_permission = Factory :admin_permission
- @admin = @admin_permission.user
- activate_authlogic
- end
- it "should provide access to the dashboard" do
UserSession.create(@admin)
get :index
response.should be_success
response.should render_template("monitor")
- end
-end
Nice. ACK to patchset. Jan
aeolus-devel@lists.fedorahosted.org