You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2016/02/16 14:31:59 UTC
ambari git commit: AMBARI-15056. Long hostnames are not truncated in
Alerts dialog (alexantonenko)
Repository: ambari
Updated Branches:
refs/heads/branch-2.2 7063e9dde -> 680502cf4
AMBARI-15056. Long hostnames are not truncated in Alerts dialog (alexantonenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/680502cf
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/680502cf
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/680502cf
Branch: refs/heads/branch-2.2
Commit: 680502cf49f2b26da2239d1f12090141c2e930cf
Parents: 7063e9d
Author: Alex Antonenko <hi...@gmail.com>
Authored: Tue Feb 16 14:56:21 2016 +0200
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Tue Feb 16 15:31:55 2016 +0200
----------------------------------------------------------------------
ambari-web/app/styles/alerts.less | 25 +++++++++-------
.../main/alerts/instance_service_host.hbs | 30 +++++++++++---------
.../main/alerts/definition_details_view.js | 8 ++++++
3 files changed, 39 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/680502cf/ambari-web/app/styles/alerts.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/alerts.less b/ambari-web/app/styles/alerts.less
index 01d9df0..a2a2dcf 100644
--- a/ambari-web/app/styles/alerts.less
+++ b/ambari-web/app/styles/alerts.less
@@ -70,7 +70,7 @@
.filter-row {
th {
- padding: 0px;
+ padding: 0;
padding-left: 4px;
}
}
@@ -253,16 +253,16 @@
.definition-name {
.name-text-field{
margin-left: 2px;
- margin-bottom: 0px;
+ margin-bottom: 0;
input {
width: 99%;
- margin-bottom: 0px;
+ margin-bottom: 0;
margin-top: -4px;
margin-left: -5px;
}
}
.edit-buttons {
- margin-bottom: 0px;
+ margin-bottom: 0;
margin-top: -4px;
float: left;
margin-left: 7px;
@@ -403,7 +403,7 @@
#manage-alert-notification-content {
.notification-info .global-info .global-checkbox {
- margin: 0px;
+ margin: 0;
}
.input-label {
font-weight: bold;
@@ -461,7 +461,7 @@
.create-edit-alert-notification-popup {
.modal {
- margin-top: 0px;
+ margin-top: 0;
top: 5%;
width: 600px;
}
@@ -508,10 +508,10 @@
height: 250px;
}
.btn-toolbar {
- margin-top: 0px;
+ margin-top: 0;
}
.manage-configuration-group-content {
- margin-bottom: 0px;
+ margin-bottom: 0;
}
.notification-editable-list {
.title {
@@ -572,12 +572,17 @@
}
.alerts-popup-wrap {
+ .trim_hostname{
+ display: block;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
.top-wrap {
width: 100%;
border-bottom: 1px solid #CCC;
text-align: center;
font-size: 15px;
- padding: 0px 0px 20px 0px;
+ padding: 0 0 20px 0;
height: 20px;
.name-top {
width: 32%;
@@ -635,7 +640,7 @@
cursor: pointer;
border-top: 1px solid #CCC;
text-align: center;
- padding: 10px 10px 10px 0px;
+ padding: 10px 10px 10px 0;
font-size: 16px;
}
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/680502cf/ambari-web/app/templates/main/alerts/instance_service_host.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/alerts/instance_service_host.hbs b/ambari-web/app/templates/main/alerts/instance_service_host.hbs
index cff614c..9aca8df 100644
--- a/ambari-web/app/templates/main/alerts/instance_service_host.hbs
+++ b/ambari-web/app/templates/main/alerts/instance_service_host.hbs
@@ -15,18 +15,20 @@
* See the License for the specific language governing permissions and
* limitations under the License.
}}
-{{#if view.instance.serviceDisplayName}}
- {{#if view.serviceIsLink}}
- <a {{action goToService view.instance.service target="view.parentView"}} href="#">{{view.instance.serviceDisplayName}}</a>
- {{else}}
- {{view.instance.serviceDisplayName}}
+<span class="trim_hostname">
+ {{#if view.instance.serviceDisplayName}}
+ {{#if view.serviceIsLink}}
+ <a {{action goToService view.instance.service target="view.parentView"}} href="#">{{view.instance.serviceDisplayName}}</a>
+ {{else}}
+ {{view.instance.serviceDisplayName}}
+ {{/if}}
{{/if}}
-{{/if}}
-{{#if view.showSeparator}}
- /
-{{/if}}
-{{#if view.instance.hostName}}
- <a {{action goToHostAlerts view.instance.host target="view.parentView"}} href="#">
- {{view.instance.hostName}}
- </a>
-{{/if}}
\ No newline at end of file
+ {{#if view.showSeparator}}
+ /
+ {{/if}}
+ {{#if view.instance.hostName}}
+ <a rel="UsageTooltip" {{action goToHostAlerts view.instance.host target="view.parentView"}} data-original-title="{{unbound view.instance.hostName}}" href="#">
+ {{view.instance.hostName}}
+ </a>
+ {{/if}}
+</span>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/680502cf/ambari-web/app/views/main/alerts/definition_details_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/alerts/definition_details_view.js b/ambari-web/app/views/main/alerts/definition_details_view.js
index 093840c..6187e57 100644
--- a/ambari-web/app/views/main/alerts/definition_details_view.js
+++ b/ambari-web/app/views/main/alerts/definition_details_view.js
@@ -300,6 +300,14 @@ App.AlertInstanceServiceHostView = Em.View.extend({
templateName: require('templates/main/alerts/instance_service_host'),
+ didInsertElement: function () {
+ App.tooltip(this.$("[rel='UsageTooltip']"));
+ },
+
+ willDestroyElement: function() {
+ this.$("[rel='UsageTooltip']").remove();
+ },
+
/**
* Define whether show link for transition to service page
*/