AMBARI-22624 Modify display of compare of config versions, second patch. 
(atkach)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 4be18df873a055f343c3d3cdf6355e33c090c67f
Parents: 0967264
Author: Andrii Tkach <[email protected]>
Authored: Mon Dec 11 17:50:21 2017 +0200
Committer: Andrii Tkach <[email protected]>
Committed: Mon Dec 11 17:50:21 2017 +0200

----------------------------------------------------------------------
 ambari-web/app/styles/application.less          | 241 -------------------
 .../app/styles/service_configurations.less      |   6 +-
 .../configs/config_versions_control_view.js     |   4 +
 3 files changed, 8 insertions(+), 243 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/4be18df8/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less 
b/ambari-web/app/styles/application.less
index b8ad4ac..43fead6 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -601,247 +601,6 @@ h1 {
   }
 }
 
-#serviceConfig {
-  &.non-wizard {
-    background: white;
-    padding: 15px;
-  }
-  .alert{
-    .glyphicon-refresh{
-      margin-left:10px;
-    }
-    .glyphicon-warning-sign {
-      color: @health-status-yellow;
-    }
-  }
-  .collapsable {
-    cursor: pointer;
-  }
-  .directories {
-    min-width: 280px;
-  }
-  .panel-heading {
-    cursor: pointer;
-  }
-  .panel-group {
-
-    .control-label {
-      text-align: left;
-      word-wrap: break-word;
-      font-weight: 500;
-    }
-    .service-config-section{
-      .overridden-property{
-        background-color: rgba(211, 237, 247, 0.39);
-        padding: 5px;
-        margin-left: -5px;
-      }
-      .checkbox {
-        line-height: 0.8em;
-        &.list-inline {
-          vertical-align: baseline;
-          &>.ember-checkbox{
-            margin-left: -14px;
-          }
-        }
-      }
-    }
-    .entry-row.indent-1 {
-      margin-left: 2em;
-    }
-    .entry-row.indent-2 {
-      margin-left: 4em;
-    }
-    .entry-row {
-      margin: 0;
-      .glyphicon-lock {
-        color: #008000;
-      }
-      .action{
-        margin-left: 3px;
-        margin-right: 1px;
-        font-size: 13px;
-        white-space: nowrap;
-      }
-      input[type="radio"] {
-        margin-right: 5px;
-        margin-left: -20px;
-      }
-      .control-group {
-        margin: 0;
-        .overrideField {
-          display: block;
-          margin-top: 5px;
-          margin-bottom: 5px;
-        }
-        .overridden-hosts-view {
-          display: inline-block;
-        }
-        &>.ember-checkbox{
-          margin-bottom: 5px;
-        }
-      }
-    }
-    form {
-      margin-bottom: 0;
-    }
-  }
-  .badge {
-    margin-left: 4px;
-  }
-
-  .master-host, .master-hosts, .slave-hosts {
-    padding-top: 5px;
-    line-height: 20px;
-  }
-
-  .enhanced-config-tab-content {
-    .action {
-      display: inline-block;
-    }
-  }
-  .common-config-category, .enhanced-config-tab-content  {
-    .panel-title {
-      line-height: 16px;
-    }
-    .action {
-      cursor: pointer;
-    }
-    .a-icon(@color) {
-      color: @color;
-      margin-right: 2px;
-    }
-    .glyphicon-plus-sign {
-      .a-icon(@health-status-green);
-    }
-    .glyphicon-minus-sign {
-      .a-icon(#FF4B4B);
-    }
-    .icon-undo {
-      .a-icon(rgb(243, 178, 11));
-    }
-    .btn-final{
-      background: transparent repeat scroll 0 0 #fff;
-    }
-    .btn-final .glyphicon-lock{
-      color: #a6a6a6;
-      cursor: inherit;
-    }
-    .btn-final.active .glyphicon-lock {
-      color: blue;
-    }
-    .btn-final.active { //copied from Bootstrap .btn.active
-      background-color: #e6e6e6;
-      background-color: #d9d9d9 \9;
-      background-image: none;
-      outline: 0;
-      box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 
0.05);
-    }
-    .btn-final.active[disabled] {
-      cursor: not-allowed;
-    }
-    a.panel-toggle:hover {
-      text-decoration: none;
-      .category-name {
-        color: #337ab7;
-        text-decoration: underline;
-      }
-    }
-  }
-
-  .enhanced-config-tab-content
-  {
-    .action-button {
-      margin-left: 3px;
-    }
-  }
-
-  .capacity-scheduler {
-    .header {
-      margin-bottom: 10px;
-      .col-md-1 {
-        padding-top: 10px;
-        font-weight: bold;
-      }
-    }
-    form.form-horizontal {
-      margin-left: 20px;
-      .control-label-span {
-        word-wrap: break-word;
-      }
-    }
-    table tr, svg {
-      cursor: pointer;
-    }
-    .marker {
-      margin: 0 5px;
-      display: inline-block;
-      width: 12px;
-      height: 12px;
-    }
-
-    .frame{
-      position:relative;
-      width: 200px;
-      height: 200px;
-    }
-  }
-  .nav-tabs > li > a {
-    padding-left: 8px;
-    padding-right: 8px;
-    &.new {
-      font-weight: 700;
-    }
-  }
-  .with-unit{
-    float: left;
-    .input-group-addon{
-      overflow: hidden;
-      max-width:250px;
-    }
-  }
-  .dropdown-menu > li > a:hover {
-    text-shadow: none;
-  }
-  .db-connection {
-    .spinner {
-      width: @spinner-small-width;
-      height: @spinner-small-height;
-      background-size: cover;
-      i {
-        font-size: 1em;
-      }
-    }
-    .glyphicon-ok-sign, .glyphicon-warning-sign {
-      font-size: 27px;
-      line-height: 30px;
-    }
-    .glyphicon-warning-sign {
-      color: @health-status-red;
-    }
-    .connection-result {
-      font-size: 15px;
-      line-height: 30px;
-    }
-    a.mute {
-      color: #333;
-      &:hover {
-        text-decoration: none;
-        color: #333;
-      }
-    }
-  }
-  .help-block {
-    display: inline-block;
-  }
-  .long-input {
-    width: 75%;
-  }
-  .config-controls {
-    line-height: 34px;
-  }
-}
-
 a:focus {
   outline: none;
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/4be18df8/ambari-web/app/styles/service_configurations.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/service_configurations.less 
b/ambari-web/app/styles/service_configurations.less
index 5c5abe47..6da3c04 100644
--- a/ambari-web/app/styles/service_configurations.less
+++ b/ambari-web/app/styles/service_configurations.less
@@ -52,8 +52,10 @@
 }
 
 #serviceConfig {
-  background: white;
-  padding: 15px;
+  &.non-wizard {
+    background: white;
+    padding: 15px;
+  }
 
   .alert{
     .glyphicon-refresh{

http://git-wip-us.apache.org/repos/asf/ambari/blob/4be18df8/ambari-web/app/views/common/configs/config_versions_control_view.js
----------------------------------------------------------------------
diff --git 
a/ambari-web/app/views/common/configs/config_versions_control_view.js 
b/ambari-web/app/views/common/configs/config_versions_control_view.js
index 0b9fb2f..8ee4e19 100644
--- a/ambari-web/app/views/common/configs/config_versions_control_view.js
+++ b/ambari-web/app/views/common/configs/config_versions_control_view.js
@@ -137,6 +137,10 @@ App.ConfigVersionsControlView = Em.View.extend({
     
controller.loadCompareVersionConfigs(controller.get('allConfigs')).done(function()
 {
       controller.onLoadOverrides(controller.get('allConfigs'));
     });
+    if ($(event.currentTarget).hasClass('compare-button')) {
+      // after entering Compare mode compare button should be destroyed before 
"focusOut" event, otherwise JS error will be thrown
+      event.view.destroy();
+    }
   },
 
   removeCompareVersionBar: function () {

Reply via email to