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'