You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sr...@apache.org on 2015/05/15 01:46:32 UTC

ambari git commit: AMBARI-11148. Look into adjusting width of installer and other UI to show configs with actions better

Repository: ambari
Updated Branches:
  refs/heads/trunk 501afc0f5 -> 9bec90a6a


AMBARI-11148. Look into adjusting width of installer and other UI to show configs with actions better


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9bec90a6
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9bec90a6
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9bec90a6

Branch: refs/heads/trunk
Commit: 9bec90a6ac5416d6f0789af261fbabc22446693c
Parents: 501afc0
Author: Srimanth Gunturi <sg...@hortonworks.com>
Authored: Thu May 14 16:02:47 2015 -0700
Committer: Srimanth Gunturi <sg...@hortonworks.com>
Committed: Thu May 14 16:46:27 2015 -0700

----------------------------------------------------------------------
 ambari-web/app/routes/add_service_routes.js     |  2 +-
 ambari-web/app/routes/installer.js              |  1 +
 ambari-web/app/styles/application.less          | 32 +++++++++++++++++++-
 ambari-web/app/styles/widgets.less              |  4 ++-
 .../common/configs/widgets/controls.hbs         | 17 +++++------
 5 files changed, 44 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/9bec90a6/ambari-web/app/routes/add_service_routes.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/add_service_routes.js b/ambari-web/app/routes/add_service_routes.js
index 79e75d6..3db7879 100644
--- a/ambari-web/app/routes/add_service_routes.js
+++ b/ambari-web/app/routes/add_service_routes.js
@@ -29,7 +29,7 @@ module.exports = App.WizardRoute.extend({
         var addServiceController = router.get('addServiceController');
         App.router.get('updateController').set('isWorking', false);
         var popup = App.ModalPopup.show({
-          classNames: ['full-width-modal'],
+          classNames: ['full-width-modal', 'add-service-wizard-modal'],
           header:Em.I18n.t('services.add.header'),
           bodyClass:  App.AddServiceView.extend({
             controllerBinding: 'App.router.addServiceController'

http://git-wip-us.apache.org/repos/asf/ambari/blob/9bec90a6/ambari-web/app/routes/installer.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/installer.js b/ambari-web/app/routes/installer.js
index 1b6e286..5119077 100644
--- a/ambari-web/app/routes/installer.js
+++ b/ambari-web/app/routes/installer.js
@@ -37,6 +37,7 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
 
           var name = 'Cluster Install Wizard';
           $('title').text('Ambari - ' + name);
+          $('#main').addClass('install-wizard-content');
 
           App.router.get('mainViewsController').loadAmbariViews();
           if (App.isAccessible('ADMIN')) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/9bec90a6/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index a3d8483..6261b43 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -4634,7 +4634,7 @@ ul.inline li {
   }
   // when the scree is narrow, the popup modal width is adjustable
   .full-width-modal {
-    .modal{
+    .modal {
       width: 90%;
       margin: 350px 0 0 -45%;
     }
@@ -4763,6 +4763,36 @@ i.icon-asterisks {
   white-space: nowrap;
 }
 
+@installer-container-width: 1236px;
+@installer-container-margin: 20px;
+#main {
+  &.install-wizard-content {
+    .main-container {
+      min-width: @installer-container-width + 2*@installer-container-margin;
+    }
+    .wizard {
+      .container {
+        width: @installer-container-width;
+      }
+    }
+  }
+}
+
+#wrapper {
+  .full-width-modal {
+    &.add-service-wizard-modal {
+      .modal {
+        width: @installer-container-width + 2*@installer-container-margin;
+        margin: -350px 0 0 -(@installer-container-width + @installer-container-margin)/2;
+      }
+      .wizard {
+        .container {
+          width: @installer-container-width;
+        }
+      }
+    }
+  }
+}
 //styles for screen width more than 1200px
 @media (min-width: 1200px) {
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/9bec90a6/ambari-web/app/styles/widgets.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/widgets.less b/ambari-web/app/styles/widgets.less
index b033d59..845ae0d 100644
--- a/ambari-web/app/styles/widgets.less
+++ b/ambari-web/app/styles/widgets.less
@@ -18,7 +18,7 @@
 @import 'common.less';
 
 @undo-btn-margin: 10px;
-@controls-min-width: 39px;
+@controls-min-width: 55px;
 @combo-widget-width: 100px;
 @green: #6ebd45;
 @slider-light-grey: #e6e6e6;
@@ -245,6 +245,8 @@
   .ui-slider-wrapper {
     .ui-slider-wrapper-inner {
       width: 68%;
+      width: calc(~"100% - 30px -"@controls-min-width);
+      max-width: 68%;
       padding-left: 10px;
       .slider.slider-horizontal {
         width: 100%;

http://git-wip-us.apache.org/repos/asf/ambari/blob/9bec90a6/ambari-web/app/templates/common/configs/widgets/controls.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/widgets/controls.hbs b/ambari-web/app/templates/common/configs/widgets/controls.hbs
index 1e0ea6c..8ea82a8 100644
--- a/ambari-web/app/templates/common/configs/widgets/controls.hbs
+++ b/ambari-web/app/templates/common/configs/widgets/controls.hbs
@@ -23,16 +23,15 @@
     </div>
   {{/if}}
   <div class="widget-config-controls">
+    <div {{bindAttr class=":widget-col :left view.config.isNotDefaultValue::not-show"}}>
+      <a href="#"
+        {{bindAttr class=":widget-action :widget-action-undo view.undoAllowed::not-show"}}
+        data-toggle="tooltip" {{translateAttr data-original-title="common.undo"}}
+        {{action "restoreValue" target="view"}}>
+         <i class="icon-undo"></i>
+      </a>
+    </div>
     <div class="widget-col left">
-      {{#if view.config.isNotDefaultValue}}
-        {{#if view.undoAllowed}}
-            <a class="widget-action widget-action-undo" href="#"
-               data-toggle="tooltip" {{translateAttr data-original-title="common.undo"}}
-               {{action "restoreValue" target="view"}}>
-            <i class="icon-undo"></i>
-          </a>
-        {{/if}}
-      {{/if}}
       {{#if view.showPencil}}
         {{#if view.isWidgetViewAllowed}}
           <a href="#"