You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2016/11/01 13:55:53 UTC
[10/22] ambari git commit: AMBARI-18750 Test and fix new tables
styles on Ambari (part 3). (ababiichuk)
AMBARI-18750 Test and fix new tables styles on Ambari (part 3). (ababiichuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0dfc3377
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0dfc3377
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0dfc3377
Branch: refs/heads/branch-feature-AMBARI-18634
Commit: 0dfc3377d24a0aeea7d54c5a56b27cdcdbf0d326
Parents: edd5588
Author: ababiichuk <ab...@hortonworks.com>
Authored: Mon Oct 31 17:57:05 2016 +0200
Committer: ababiichuk <ab...@hortonworks.com>
Committed: Mon Oct 31 17:57:05 2016 +0200
----------------------------------------------------------------------
ambari-web/app/styles/application.less | 40 +-----
.../upgrade_configs_merge_table.hbs | 10 +-
ambari-web/app/templates/wizard/step1.hbs | 140 ++++++++++---------
ambari-web/app/templates/wizard/step3.hbs | 7 +-
ambari-web/app/views/wizard/step1_view.js | 4 +
ambari-web/app/views/wizard/step3_view.js | 3 +
6 files changed, 92 insertions(+), 112 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/0dfc3377/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index 798d80f..51a22d5 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -5846,6 +5846,7 @@ input[type="radio"].align-checkbox, input[type="checkbox"].align-checkbox {
.configs-table {
table-layout: fixed;
font-size: 0.9em;
+ margin-bottom: 0;
td {
word-wrap: break-word;
&.no-value {
@@ -5859,9 +5860,6 @@ input[type="radio"].align-checkbox, input[type="checkbox"].align-checkbox {
width: 25%;
}
}
- .configs-table-header {
- padding-right: 15px;
- }
.configurations-changes-header {
display: inline-block;
}
@@ -6034,44 +6032,14 @@ input[type="radio"].align-checkbox, input[type="checkbox"].align-checkbox {
.border-bottom {
border-bottom: 1px solid #ebebeb;
}
- .repo-table-title {
- padding-left: 5px;
- padding-bottom: 10px;
- border-bottom: 1px solid #ebebeb;
- label {
- font-weight: bold;
- margin-top: 5px;
- }
- }
- .os-type-label {
- margin-top: 27px;
- padding-left: 10px;
- label {
- font-weight: bold;
- }
- }
- .repo-name-label {
- text-align: left;
- padding-top: 10px;
- }
- .repo-name-url {
- padding-top: 8px;
- .repo-name-url-inner {
- margin-bottom: 8px;
- }
+ .repos-inner-table {
+ margin-bottom: 0;
+ background-color: transparent;
}
.repo-url input {
width: 90%;
height: 24px;
}
- .add-os-button {
- button.disabled {
- cursor: not-allowed;
- }
- .dropdown-menu a {
- cursor: pointer;
- }
- }
#skip-validation {
margin-top: 13px;
span.disabled {
http://git-wip-us.apache.org/repos/asf/ambari/blob/0dfc3377/ambari-web/app/templates/main/admin/stack_upgrade/upgrade_configs_merge_table.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/stack_upgrade/upgrade_configs_merge_table.hbs b/ambari-web/app/templates/main/admin/stack_upgrade/upgrade_configs_merge_table.hbs
index 28dfbb6..5c285f8 100644
--- a/ambari-web/app/templates/main/admin/stack_upgrade/upgrade_configs_merge_table.hbs
+++ b/ambari-web/app/templates/main/admin/stack_upgrade/upgrade_configs_merge_table.hbs
@@ -23,18 +23,16 @@
<div class="alert alert-warning">
{{t popup.clusterCheck.Upgrade.configsMerge.alert}}
</div>
-<div class="configs-table-header">
- <table class="configs-table table table-hover">
- <thead>
+<table class="configs-table table table-hover">
+ <thead>
<tr>
<th>{{t popup.clusterCheck.Upgrade.configsMerge.configType}}</th>
<th>{{t popup.clusterCheck.Upgrade.configsMerge.propertyName}}</th>
<th>{{t popup.clusterCheck.Upgrade.configsMerge.currentValue}}</th>
<th>{{t popup.clusterCheck.Upgrade.configsMerge.resultingValue}}</th>
</tr>
- </thead>
- </table>
-</div>
+ </thead>
+</table>
<div class="limited-height-2">
<table class="configs-table table table-hover">
<tbody>
http://git-wip-us.apache.org/repos/asf/ambari/blob/0dfc3377/ambari-web/app/templates/wizard/step1.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/wizard/step1.hbs b/ambari-web/app/templates/wizard/step1.hbs
index 8469d66..977a8fa 100644
--- a/ambari-web/app/templates/wizard/step1.hbs
+++ b/ambari-web/app/templates/wizard/step1.hbs
@@ -97,76 +97,82 @@
{{/if}}
{{! OSes and Repositories }}
- <div class="clearfix repo-table-title row">
- <div class="col-md-2"><label>{{t common.os}}</label></div>
- <div class="col-md-9">
- <div class="col-md-3"><label>{{t common.name}}</label></div>
- <div class="col-md-1"></div>
- <div class="col-md-8"><label>{{t installer.step1.advancedRepo.localRepo.column.baseUrl}}</label></div>
- </div>
- <div class="col-md-1">
- {{! Add OS }}
- <div class="add-os-button btn-group pull-right">
- <button
- type="button" {{bindAttr data-original-title="view.addOsButtonTooltip" class=":btn :btn-default :dropdown-toggle :add-os-button view.isAddOsButtonDisabled:disabled"}}
- data-toggle="dropdown">
- <i class="glyphicon glyphicon-plus"></i> {{t common.add}} <span class="caret"></span>
- </button>
- <ul class="dropdown-menu">
- {{#each operatingSystem in selectedStack.operatingSystems}}
- {{#unless operatingSystem.isSelected}}
- <li><a {{action "addOS" operatingSystem target="controller"}}>{{operatingSystem.osType}}</a></li>
- {{/unless}}
- {{/each}}
- </ul>
+ <div class="row">
+ <div class="table-controls row col-sm-12 pull-right">
+ <div class="col-sm-12">
+ {{! Add OS }}
+ <div class="btn-group pull-right">
+ <button
+ type="button" {{bindAttr data-original-title="view.addOsButtonTooltip" class=":btn :btn-default :dropdown-toggle :add-os-button view.isAddOsButtonDisabled:disabled"}}
+ data-toggle="dropdown">
+ <i class="glyphicon glyphicon-plus"></i> {{t common.add}} <span class="caret"></span>
+ </button>
+ <ul class="dropdown-menu">
+ {{#each operatingSystem in selectedStack.operatingSystems}}
+ {{#unless operatingSystem.isSelected}}
+ <li><a {{action "addOS" operatingSystem target="controller"}}>{{operatingSystem.osType}}</a></li>
+ {{/unless}}
+ {{/each}}
+ </ul>
+ </div>
+ {{! Add OS END}}
</div>
- {{! Add OS END}}
</div>
</div>
-
- {{#each operatingSystem in selectedStack.operatingSystems}}
- {{#if operatingSystem.isSelected}}
- <div {{bindAttr class=":clearfix :row :border-bottom operatingSystem.osType"}}>
- <div class="col-md-2 os-type-label">
- <label>{{operatingSystem.osType}}</label>
- </div>
- <div class="col-md-9 repo-name-url">
- {{#each repository in operatingSystem.repositories}}
- <div {{bindAttr class=":clearfix :repo-name-url-inner repository.repoName"}}>
- <div class="col-md-3">
- <label class="repo-name-label control-label">{{repository.repoId}}</label>
- </div>
- <div class="validation-td col-md-1">
- {{#if repository.validation}}
- {{view view.popoverView repositoryBinding="repository"}}
- {{/if}}
- </div>
- <div {{bindAttr class=":col-md-8 :repo-url repository.invalidFormatError:textfield-error repository.invalidError:textfield-error"}}>
- {{view Ember.TextField placeholderBinding="repository.placeholder" valueBinding="repository.baseUrl" disabledBinding="controller.selectedStack.useRedhatSatellite" classNames="form-control"}}
- {{#if controller.selectedStack.usePublicRepo}}
- {{#if repository.undo}}
- <i class="icon-undo" data-toggle="tooltip"
- {{action "doRestoreDefaultValue" repository target="controller"}}
- {{translateAttr title="common.undo"}}>
- </i>
- {{/if}}
- {{else}}
- {{#if repository.notEmpty}}
- <i class="icon-undo" data-toggle="tooltip"
- {{action "doRestoreToEmpty" repository target="controller"}}
- {{translateAttr title="common.undo"}}>
- </i>
- {{/if}}
- {{/if}}
- </div>
- </div>
- {{/each}}
- </div>
- <div {{bindAttr class=":col-md-1 :remove-icon controller.selectedStack.useRedhatSatellite:disabled"}} {{action "removeOS" operatingSystem target="controller"}}>
- <i class="glyphicon glyphicon-minus"></i>{{t common.remove}}</div>
- </div>
- {{/if}}
- {{/each}}
+ <table class="table table-hover">
+ <thead>
+ <tr>
+ <th class="col-sm-2">{{t common.os}}</th>
+ <th class="col-sm-3">{{t common.name}}</th>
+ <th class="col-sm-6">{{t installer.step1.advancedRepo.localRepo.column.baseUrl}}</th>
+ <th class="col-sm-1"></th>
+ </tr>
+ </thead>
+ <tbody>
+ {{#each operatingSystem in selectedStack.operatingSystems}}
+ {{#if operatingSystem.isSelected}}
+ <tr>
+ <td class="col-sm-2">{{operatingSystem.osType}}</td>
+ <td class="col-sm-9" colspan="2">
+ <table class="table table-condensed no-borders repos-inner-table">
+ <tbody>
+ {{#each repository in operatingSystem.repositories}}
+ <tr>
+ <td class="col-sm-3">{{repository.repoId}}</td>
+ <td class="col-sm-1">
+ {{view view.popoverView repositoryBinding="repository"}}
+ </td>
+ <td class="col-sm-8">
+ <div {{bindAttr class=":repo-url repository.invalidFormatError:textfield-error repository.invalidError:textfield-error"}}>
+ {{view Ember.TextField placeholderBinding="repository.placeholder" valueBinding="repository.baseUrl" disabledBinding="controller.selectedStack.useRedhatSatellite" classNames="form-control"}}
+ {{#if controller.selectedStack.usePublicRepo}}
+ <i {{bindAttr class="repository.undo::invisible :icon-undo"}}
+ {{action "doRestoreDefaultValue" repository target="controller"}}
+ {{translateAttr title="common.undo"}}>
+ </i>
+ {{else}}
+ <i {{bindAttr class="repository.notEmpty::invisible :icon-undo"}}
+ {{action "doRestoreToEmpty" repository target="controller"}}
+ {{translateAttr title="common.undo"}}>
+ </i>
+ {{/if}}
+ </div>
+ </td>
+ </tr>
+ {{/each}}
+ </tbody>
+ </table>
+ </td>
+ <td class="col-sm-1">
+ <a class="action" href="#" {{action "removeOS" operatingSystem target="controller"}}>
+ <span class="icon icon-minus" {{translateAttr title="common.remove"}}></span>
+ </a>
+ </td>
+ </tr>
+ {{/if}}
+ {{/each}}
+ </tbody>
+ </table>
{{! OSes and Repositories END }}
{{! Skip Repository Base URL validation }}
http://git-wip-us.apache.org/repos/asf/ambari/blob/0dfc3377/ambari-web/app/templates/wizard/step3.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/wizard/step3.hbs b/ambari-web/app/templates/wizard/step3.hbs
index a061da0..72881cf 100644
--- a/ambari-web/app/templates/wizard/step3.hbs
+++ b/ambari-web/app/templates/wizard/step3.hbs
@@ -64,7 +64,7 @@
<th class="col-md-2">{{t common.progress}}</th>
<th class="col-md-2">{{t common.status}}</th>
<!-- given by the parsing function that parses data from bootstrap call, dynamically assign the color -->
- <th class="col-md-2">{{t common.action}}</th>
+ <th class="col-md-2"></th>
<!-- trash icon -->
<!-- retry icon -->
<th class="tinyspan">
@@ -90,8 +90,9 @@
data-toggle="modal" {{action hostLogPopup host target="controller"}}><span {{bindAttr class="host.bootStatusColor"}}>{{host.bootStatusForDisplay}}</span></a>
</td>
<td class="step3-table-action">
- <a class="btn btn-xs" {{action remove target="view"}}{{bindAttr disabled="isBackDisabled"}}><i class="glyphicon glyphicon-trash"></i>
- {{t common.remove}}</a>
+ <a class="action" href="#" {{action remove target="view"}}{{bindAttr disabled="isBackDisabled"}}>
+ <i class="glyphicon glyphicon-trash" {{translateAttr title="common.remove"}}></i>
+ </a>
</td>
<td class="step3-table-checkbox">
{{view App.CheckboxView checkedBinding="host.isChecked"}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/0dfc3377/ambari-web/app/views/wizard/step1_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step1_view.js b/ambari-web/app/views/wizard/step1_view.js
index dc313dd..fe1032b 100644
--- a/ambari-web/app/views/wizard/step1_view.js
+++ b/ambari-web/app/views/wizard/step1_view.js
@@ -27,6 +27,10 @@ App.WizardStep1View = Em.View.extend({
$("[rel=skip-validation-tooltip]").tooltip({ placement: 'right'});
$("[rel=use-redhat-tooltip]").tooltip({ placement: 'right'});
$('.add-os-button,.redhat-label').tooltip();
+ this.$().on('mouseover', '.version-contents-body .table-hover > tbody > tr', function () {
+ App.tooltip($(this).find('.action .icon'), {placement: 'bottom'});
+ App.tooltip($(this).find('.icon-undo'), {placement: 'bottom'});
+ });
if (this.get('controller.selectedStack.showAvailable')) {
// first time load
if (this.get('controller.selectedStack.useRedhatSatellite')) {
http://git-wip-us.apache.org/repos/asf/ambari/blob/0dfc3377/ambari-web/app/views/wizard/step3_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step3_view.js b/ambari-web/app/views/wizard/step3_view.js
index 4173065..2f57b9e 100644
--- a/ambari-web/app/views/wizard/step3_view.js
+++ b/ambari-web/app/views/wizard/step3_view.js
@@ -101,6 +101,9 @@ App.WizardStep3View = App.TableView.extend({
didInsertElement: function () {
this.get('controller').loadStep();
+ this.$().on('mouseover', '#confirm-hosts-table tr', function () {
+ App.tooltip($(this).find('.action .glyphicon'), {placement: 'bottom'});
+ });
},
/**