AMBARI-18831. Refactor service summary templates (onechiporenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ac7ff8ba Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ac7ff8ba Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ac7ff8ba Branch: refs/heads/branch-feature-AMBARI-18634 Commit: ac7ff8bab30a0a694c277f55186713fe5ff7bcb4 Parents: a2d53ef Author: Oleg Nechiporenko <onechipore...@apache.org> Authored: Wed Nov 9 12:03:03 2016 +0200 Committer: Oleg Nechiporenko <onechipore...@apache.org> Committed: Wed Nov 9 12:03:03 2016 +0200 ---------------------------------------------------------------------- ambari-web/app/styles/application.less | 108 +------- .../app/templates/main/service/info/summary.hbs | 16 +- .../main/service/info/summary/base.hbs | 8 +- .../service/info/summary/client_components.hbs | 14 +- .../service/info/summary/master_components.hbs | 25 +- .../service/info/summary/slave_components.hbs | 22 +- .../app/templates/main/service/service.hbs | 11 +- .../templates/main/service/services/flume.hbs | 222 +++++++-------- .../templates/main/service/services/hbase.hbs | 142 +++++----- .../templates/main/service/services/hdfs.hbs | 274 +++++++++---------- .../templates/main/service/services/hive.hbs | 54 ++-- .../templates/main/service/services/ranger.hbs | 60 ++-- .../templates/main/service/services/storm.hbs | 117 ++++---- .../templates/main/service/services/yarn.hbs | 146 +++++----- .../app/views/main/service/info/summary.js | 58 ++-- ambari-web/app/views/main/service/service.js | 14 +- .../app/views/main/service/services/flume.js | 11 +- .../app/views/main/service/services/hive.js | 6 +- .../views/main/service/info/summary_test.js | 48 ---- 19 files changed, 600 insertions(+), 756 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/ac7ff8ba/ambari-web/app/styles/application.less ---------------------------------------------------------------------- diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less index b57ebb8..f24f355 100644 --- a/ambari-web/app/styles/application.less +++ b/ambari-web/app/styles/application.less @@ -1209,15 +1209,11 @@ h1 { #summary-restart-bar { margin-top: 20px; - .alert{ - .glyphicon-refresh{ - margin-left:10px; + .alert { + .glyphicon-refresh { color: #fdb82f; } } - .dropdown-menu > li > a:hover { - text-shadow: none; - } } #serviceConfig { @@ -1986,10 +1982,6 @@ a:focus { /*start services summary*/ .services { - margin-left: 0; - margin-top: 0; - position: relative; - .alert{ padding: 5px; } @@ -2151,18 +2143,16 @@ a:focus { } .summary-info { - border-top: none; - border-collapse: collapse; color: #666; font-size: 13px; - tr.component-small { - font-size: 11px; + line-height: 16px; + .row { + margin-bottom: 8px; } .upgrade-status-warning { color: @health-status-red; } - tr td:first-child { - width: 180px; + .summary-label { text-align: right; } a { @@ -2580,11 +2570,9 @@ a:focus { a.services-menu-blocks{ overflow:auto; .icon-health-block{ - width:16%; float:left; } .service-name-block{ - width:55%; float:left; white-space:normal; word-break:break-word; @@ -2616,25 +2604,6 @@ a.services-menu-blocks{ padding: 0 2px; margin: 0 2px; } - - .nav li.dropdown.open { - .dropdown-toggle{ - color: #005580; - background-color: #eeeeee; - border-color: #eeeeee; - -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - } - a:hover .caret { - border-top-color: #005580; - border-bottom-color: #005580; - } - .caret { - border-top-color: #005580; - border-bottom-color: #005580; - } - } } .host-rack-id-popup { .control-label { @@ -2643,54 +2612,11 @@ a.services-menu-blocks{ } } -.service-content { - .summary-info { - margin-bottom: 0; - } -} .service-block { margin-top: 20px; } -.service-configuration { - padding: 10px; -} - -.service-summary { - background: #F6FAFD; - .service-block.col-md-8 { - margin-left: 0; - border-right: 1px solid #5fa3c3; - } - .service-block.col-md-3 { - padding-left: 0; - } - .service-content { - padding: 5px 0 0 10px; - .service-links { - padding: 5px 0; - } - } - h5 { - color: #0088CC; - font-size: 14px; - } - .service-links { - padding: 5px 0 10px 0; - } - .service-configuration .dl-horizontal { - dt { - width: 90px; - line-height: 19px; - } - dd { - margin-left: 100px; - line-height: 19px; - } - } -} - .service-button { text-align: right; margin-bottom: 5px; @@ -4812,13 +4738,6 @@ ul.list-inline li { } } -//bootstrap -//.dropdown-menu .active > a, .dropdown-menu .active > a:hover { -// background-color: #49AFCD; -// background-image: -moz-linear-gradient(center top, #5BC0DE, #2F96B4); -//} -//bootstrap end - // COMBOBOX FIXES .combobox-container .btn:hover { background-position: 0; @@ -4895,11 +4814,6 @@ ul.list-inline li { } } - .summary-width { - padding-right: 0; - } - - .assign-masters { .host-assignments { margin-left: 0; @@ -5002,16 +4916,6 @@ li.break { } } -/* -.progress-striped .bar { - background-color: #A5A5A5; -} - -.progress-info.progress-striped .bar, .progress-striped .bar-info { - background-color: #A5A5A5; -} -*/ - .modal-body { .api-error { max-height: 403px; http://git-wip-us.apache.org/repos/asf/ambari/blob/ac7ff8ba/ambari-web/app/templates/main/service/info/summary.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/main/service/info/summary.hbs b/ambari-web/app/templates/main/service/info/summary.hbs index 1423853..385465d 100644 --- a/ambari-web/app/templates/main/service/info/summary.hbs +++ b/ambari-web/app/templates/main/service/info/summary.hbs @@ -68,11 +68,11 @@ </div> </div> <div class="panel-body"> - {{#if view.serviceSummaryView}} - {{view view.serviceSummaryView}} - {{else}} - {{view App.SpinnerView}} - {{/if}} + {{#if view.serviceSummaryView}} + {{view view.serviceSummaryView}} + {{else}} + {{view App.SpinnerView}} + {{/if}} </div> </div> @@ -83,10 +83,10 @@ <div class="panel panel-default"> <div class="panel-heading"> <div class="row"> - <div class="col-md-8 col-lg-8"> + <div class="col-md-7 col-lg-7"> <h4 class="panel-title">{{t services.service.metrics}}</h4> </div> - <div class="col-md-4 col-lg-4"> + <div class="col-md-5 col-lg-5"> {{#if showTimeRangeControl}} {{view view.timeRangeListView}} {{/if}} @@ -148,7 +148,7 @@ <tr> {{#each graph in graphs}} <td> - <div class=""> + <div> {{view graph}} </div> </td> http://git-wip-us.apache.org/repos/asf/ambari/blob/ac7ff8ba/ambari-web/app/templates/main/service/info/summary/base.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/main/service/info/summary/base.hbs b/ambari-web/app/templates/main/service/info/summary/base.hbs index e2a7529..9b16502 100644 --- a/ambari-web/app/templates/main/service/info/summary/base.hbs +++ b/ambari-web/app/templates/main/service/info/summary/base.hbs @@ -16,6 +16,8 @@ * limitations under the License. }} -{{view App.SummaryMasterComponentsView mastersCompBinding="view.parentView.mastersObj"}} -{{view App.SummarySlaveComponentsView slavesObjBinding="view.parentView.slavesObj"}} -{{view App.SummaryClientComponentsView clientsObjBinding="view.parentView.clientObj"}} +<div class="col-md-6"> + {{view App.SummaryMasterComponentsView mastersCompBinding="view.parentView.mastersObj"}} + {{view App.SummarySlaveComponentsView slavesObjBinding="view.parentView.slavesObj"}} + {{view App.SummaryClientComponentsView clientsObjBinding="view.parentView.clientObj"}} +</div> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/ac7ff8ba/ambari-web/app/templates/main/service/info/summary/client_components.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/main/service/info/summary/client_components.hbs b/ambari-web/app/templates/main/service/info/summary/client_components.hbs index c91adf8..1bef250 100644 --- a/ambari-web/app/templates/main/service/info/summary/client_components.hbs +++ b/ambari-web/app/templates/main/service/info/summary/client_components.hbs @@ -15,16 +15,16 @@ * See the License for the specific language governing permissions and * limitations under the License. }} -<tr class="hidden"><td></td></tr> + {{#each clientComponent in view.clientsObj}} - <tr> - <td {{bindAttr class=":summary-label clientComponent.summaryLabelClassName"}}> + <div class="row"> + <div {{bindAttr class=":col-md-6 :summary-label clientComponent.summaryLabelClassName"}}> <a {{action filterHosts clientComponent}} href="javascript:void(null)" > {{clientComponent.displayNamePluralized}} </a> - </td> - <td {{bindAttr class=":summary-value clientComponent.summaryValueClassName"}}> + </div> + <div {{bindAttr class=":col-md-6 :summary-value clientComponent.summaryValueClassName"}}> <span class="green-live">{{clientComponent.installedCount}}</span> {{clientComponent.displayNamePluralized}} {{t common.installed}} - </td> - </tr> + </div> + </div> {{/each}} http://git-wip-us.apache.org/repos/asf/ambari/blob/ac7ff8ba/ambari-web/app/templates/main/service/info/summary/master_components.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/main/service/info/summary/master_components.hbs b/ambari-web/app/templates/main/service/info/summary/master_components.hbs index 8da6f5a..be388c5 100644 --- a/ambari-web/app/templates/main/service/info/summary/master_components.hbs +++ b/ambari-web/app/templates/main/service/info/summary/master_components.hbs @@ -15,10 +15,10 @@ * See the License for the specific language governing permissions and * limitations under the License. }} -<tr class="hidden"><td></td></tr> + {{#each comp in view.mastersComp}} - <tr {{bindAttr class="comp.isSubComponent:component-small :component comp.componentName"}}> - <td {{bindAttr class=":summary-label comp.summaryLabelClassName"}}> + <div {{bindAttr class="comp.isSubComponent:component-small :component comp.componentName :row"}}> + <div {{bindAttr class=":col-md-6 :summary-label comp.summaryLabelClassName"}}> <a href="#" {{action showDetails comp.host}} title="{{unbound comp.publicHostName}}" rel="UsageTooltip"> {{#if comp.displayNameAdvanced}} {{comp.displayNameAdvanced}} @@ -26,18 +26,19 @@ {{comp.displayName}} {{/if}} </a> - </td> - <td {{bindAttr class=":summary-value comp.summaryValueClassName"}}> + </div> + <div {{bindAttr class=":col-md-6 :summary-value comp.summaryValueClassName"}}> <span rel='SummaryComponentHealthTooltip' {{bindAttr class="comp.statusClass comp.statusIconClass" data-original-title="comp.passiveTooltip"}}></span> {{comp.componentTextStatus}} {{#if comp.alertsCount}} - <span {{action "showServiceAlertsPopup" comp target="controller"}} - {{bindAttr class=":label comp.hasCriticalAlerts:alerts-crit-count:alerts-warn-count"}}> - {{comp.alertsCount}} {{pluralize comp.alertsCount singular="alert" plural="alerts"}}</span> + <span {{action "showServiceAlertsPopup" comp target="controller"}} {{bindAttr class=":label comp.hasCriticalAlerts:alerts-crit-count:alerts-warn-count"}}> + {{comp.alertsCount}} {{pluralize comp.alertsCount singular="alert" plural="alerts"}} + </span> {{else}} - <span {{action "showServiceAlertsPopup" comp target="controller"}} - class="label no-alerts-label">{{t services.service.summary.alerts.noAlerts}}</span> + <span {{action "showServiceAlertsPopup" comp target="controller"}} class="label no-alerts-label"> + {{t services.service.summary.alerts.noAlerts}} + </span> {{/if}} - </td> - </tr> + </div> + </div> {{/each}} http://git-wip-us.apache.org/repos/asf/ambari/blob/ac7ff8ba/ambari-web/app/templates/main/service/info/summary/slave_components.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/main/service/info/summary/slave_components.hbs b/ambari-web/app/templates/main/service/info/summary/slave_components.hbs index a164cde..9076c7f 100644 --- a/ambari-web/app/templates/main/service/info/summary/slave_components.hbs +++ b/ambari-web/app/templates/main/service/info/summary/slave_components.hbs @@ -15,19 +15,17 @@ * See the License for the specific language governing permissions and * limitations under the License. }} -<tr class="hidden"><td></td></tr> {{#each slaveComponent in view.slavesObj}} - <tr {{bindAttr class=":component slaveComponent.componentName"}}> - <td {{bindAttr class=":summary-label slaveComponent.summaryLabelClassName"}}><a href="#" {{action filterHosts slaveComponent}}>{{slaveComponent.displayNamePluralized}}</a> - </td> - <td {{bindAttr class=":summary-value slaveComponent.summaryValueClassName"}}> - <span> - {{#view App.ComponentLiveTextView liveComponentsBinding="slaveComponent.startedCount" totalComponentsBinding="slaveComponent.totalCount"}} - {{view.liveComponents}}/{{view.totalComponents}} - {{/view}} - </span> + <div {{bindAttr class=":row :component slaveComponent.componentName"}}> + <div {{bindAttr class=":col-md-6 :summary-label slaveComponent.summaryLabelClassName"}}> + <a href="#" {{action filterHosts slaveComponent}}>{{slaveComponent.displayNamePluralized}}</a> + </div> + <div {{bindAttr class=":col-md-6 :summary-value slaveComponent.summaryValueClassName"}}> + {{#view App.ComponentLiveTextView liveComponentsBinding="slaveComponent.startedCount" totalComponentsBinding="slaveComponent.totalCount" tagName="span"}} + {{view.liveComponents}}/{{view.totalComponents}} + {{/view}} {{slaveComponent.displayNamePluralized}} {{t dashboard.services.summary.slaves.live}} - </td> - </tr> + </div> + </div> {{/each}} http://git-wip-us.apache.org/repos/asf/ambari/blob/ac7ff8ba/ambari-web/app/templates/main/service/service.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/main/service/service.hbs b/ambari-web/app/templates/main/service/service.hbs index a907d6d..9724095 100644 --- a/ambari-web/app/templates/main/service/service.hbs +++ b/ambari-web/app/templates/main/service/service.hbs @@ -15,12 +15,9 @@ * See the License for the specific language governing permissions and * limitations under the License. }} -<div class="service-content row"> - <div {{bindAttr class="view.isFullWidth:col-md-12:col-md-6"}}> - <table class="summary-info table no-borders table-condensed"> - <tbody> - {{yield}} - </tbody> - </table> + +<div class="service-content"> + <div class="summary-info"> + {{yield}} </div> </div> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/ac7ff8ba/ambari-web/app/templates/main/service/services/flume.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/main/service/services/flume.hbs b/ambari-web/app/templates/main/service/services/flume.hbs index 43ce18a..d9f053a 100644 --- a/ambari-web/app/templates/main/service/services/flume.hbs +++ b/ambari-web/app/templates/main/service/services/flume.hbs @@ -16,118 +16,126 @@ * limitations under the License. }} -<!-- Flume Agents --> -<tr> - <td> - <div id="flume-summary"> - <a href="#" {{action filterHosts view.flumeHandlerComponent}}>{{view.summaryHeader}}</a> - <a href="#" class="pull-right" {{action gotoConfigs target="controller"}}>{{t dashboard.services.flume.summary.configure}}</a> - <div id="flume-agent-table-wrap" class="scrollable-container"> - <table class="table table-hover table-bordered table-striped" id="flume-agents-table"> - <thead> +{{! Flume Agents }} +<div id="flume-summary" class="row"> + <div class="col-md-12"> + <a href="#" {{action filterHosts view.flumeHandlerComponent}}>{{view.summaryHeader}}</a> + <a href="#" class="pull-right" {{action gotoConfigs target="controller"}}>{{t dashboard.services.flume.summary.configure}}</a> + <div id="flume-agent-table-wrap" class="scrollable-container"> + <table class="table table-hover table-bordered table-striped" id="flume-agents-table"> + <thead> {{#view view.sortView contentBinding="view.filteredContent" class="label-row"}} {{view view.parentView.hostSort}} <th>{{t dashboard.services.flume.agent}}</th> - <th><i class="glyphicon glyphicon-signin" {{translateAttr title="dashboard.services.flume.sources"}}></i> {{t dashboard.services.flume.sources}}</th> - <th><i class="glyphicon glyphicon-random" {{translateAttr title="dashboard.services.flume.channels"}}></i> {{t dashboard.services.flume.channels}}</th> - <th><i class="glyphicon glyphicon-signout" {{translateAttr title="dashboard.services.flume.sinks"}}></i> {{t dashboard.services.flume.sinks}}</th> + <th> + <i class="glyphicon glyphicon-signin" {{translateAttr title="dashboard.services.flume.sources"}}></i> {{t dashboard.services.flume.sources}} + </th> + <th> + <i class="glyphicon glyphicon-random" {{translateAttr title="dashboard.services.flume.channels"}}></i> {{t dashboard.services.flume.channels}} + </th> + <th> + <i class="glyphicon glyphicon-signout" {{translateAttr title="dashboard.services.flume.sinks"}}></i> {{t dashboard.services.flume.sinks}} + </th> {{/view}} - </thead> - {{#if view.pageContent}} - {{#each host in view.pageContent}} - <tbody class="flume-agent-table-tbody"> - {{#view view.agentView contentBinding="host"}} - <td {{bindAttr rowspan="host.rowspan"}} id="flume-host-agent-row" class="agent-host-name"> - <a class="agent-host-link" href="javascript:void(null)" {{action click host target="view"}}> - {{host.hostName}} + </thead> + {{#if view.pageContent}} + {{#each host in view.pageContent}} + <tbody class="flume-agent-table-tbody"> + {{#view view.agentView contentBinding="host"}} + <td {{bindAttr rowspan="host.rowspan"}} id="flume-host-agent-row" class="agent-host-name"> + <a class="agent-host-link" href="javascript:void(null)" {{action click host target="view"}}> + {{host.hostName}} + </a> + </td> + <td class="agent-status"> + <div class="wrapp-flume-status"> + <div class="pull-left flume-agents-status"> + <span {{bindAttr class="host.firtstAgent.healthClass"}}></span> {{host.firtstAgent.name}}</div> + <div class="btn-wrapper flume-agents-actions"> + <div class="btn-group display-inline-block"> + <a class="btn btn-default dropdown-toggle" data-toggle="dropdown" + href="javascript:void(null)">{{host.firtstAgent.displayStatus}} + <span class="caret"></span> </a> - </td> - <td class="agent-status"> - <div class="wrapp-flume-status"> - <div class="pull-left flume-agents-status"><span {{bindAttr class="host.firtstAgent.healthClass"}}></span> {{host.firtstAgent.name}}</div> - <div class="btn-wrapper flume-agents-actions"> - <div class="btn-group display-inline-block"> - <a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="javascript:void(null)">{{host.firtstAgent.displayStatus}} - <span class="caret"></span> - </a> - <ul class="pull-left dropdown-menu"> - <li {{bindAttr class="host.firtstAgent.isStartAgentDisabled:disabled"}}> - <a href="javascript:void(null)" - {{bindAttr class="host.firtstAgent.isStartAgentDisabled:disabled :start-agent"}} - {{action startFlumeAgent host.firtstAgent target="controller"}}> - {{t services.service.summary.flume.startAgent}}</a> - </li> - <li {{bindAttr class="host.firtstAgent.isStopAgentDisabled:disabled"}}> - <a href="javascript:void(null)" - {{bindAttr class="host.firtstAgent.isStopAgentDisabled:disabled :stop-agent"}} - {{action stopFlumeAgent host.firtstAgent target="controller"}}> - {{t services.service.summary.flume.stopAgent}}</a> - </li> - </ul> - </div> - </div> + <ul class="pull-left dropdown-menu"> + <li {{bindAttr class="host.firtstAgent.isStartAgentDisabled:disabled"}}> + <a href="javascript:void(null)" + {{bindAttr class="host.firtstAgent.isStartAgentDisabled:disabled :start-agent"}} + {{action startFlumeAgent host.firtstAgent target="controller"}}> + {{t services.service.summary.flume.startAgent}}</a> + </li> + <li {{bindAttr class="host.firtstAgent.isStopAgentDisabled:disabled"}}> + <a href="javascript:void(null)" + {{bindAttr class="host.firtstAgent.isStopAgentDisabled:disabled :stop-agent"}} + {{action stopFlumeAgent host.firtstAgent target="controller"}}> + {{t services.service.summary.flume.stopAgent}}</a> + </li> + </ul> </div> - </td> - <td class="flume-sources-count"> - {{host.firtstAgent.sourcesCount}} - </td> - <td class="flume-channels-count"> - {{host.firtstAgent.channelsCount}} - </td> - <td class="flume-sinks-count"> - {{host.firtstAgent.sinksCount}} - </td> - {{/view}} - {{#each agent in host.otherAgents}} - {{#view view.agentView contentBinding="host"}} - <td class="agent-status"> - <div class="wrapp-flume-status"> - <div class="pull-left flume-agents-status"><span {{bindAttr class="agent.healthClass"}}></span> {{agent.name}}</div> - <div class="btn-wrapper flume-agents-actions"> - <div class="btn-group display-inline-block"> - <a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="javascript:void(null)">{{agent.displayStatus}} - <span class="caret"></span> - </a> - <ul class="pull-left dropdown-menu"> - <li {{bindAttr class="agent.isStartAgentDisabled:disabled :start-agent"}}> - <a href="javascript:void(null)" - {{bindAttr class="agent.isStartAgentDisabled:disabled"}} - {{action startFlumeAgent agent target="controller"}}> - {{t services.service.summary.flume.startAgent}}</a> - </li> - <li {{bindAttr class="agent.isStopAgentDisabled:disabled"}}> - <a href="javascript:void(null)" - {{bindAttr class="agent.isStopAgentDisabled:disabled :stop-agent"}} - {{action stopFlumeAgent agent target="controller"}}> - {{t services.service.summary.flume.stopAgent}}</a> - </li> - </ul> - </div> - </div> - </div> - </td> - <td class="flume-agent-sources-count"> - {{agent.sourcesCount}} - </td> - <td class="flume-agent-channels-count"> - {{agent.channelsCount}} - </td> - <td class="flume-agent-sink-count"> - {{agent.sinksCount}} - </td> - {{/view}} - {{/each}} - </tbody> - {{/each}} - {{else}} - <tr> - <td colspan="6" id="flume-agents-empty-label" class="empty-label"> - {{t services.service.summary.flume.noAgents}} + </div> + </div> + </td> + <td class="flume-sources-count"> + {{host.firtstAgent.sourcesCount}} + </td> + <td class="flume-channels-count"> + {{host.firtstAgent.channelsCount}} </td> - </tr> - {{/if}} - </table> - </div> + <td class="flume-sinks-count"> + {{host.firtstAgent.sinksCount}} + </td> + {{/view}} + {{#each agent in host.otherAgents}} + {{#view view.agentView contentBinding="host"}} + <td class="agent-status"> + <div class="wrapp-flume-status"> + <div class="pull-left flume-agents-status"> + <span {{bindAttr class="agent.healthClass"}}></span> {{agent.name}}</div> + <div class="btn-wrapper flume-agents-actions"> + <div class="btn-group display-inline-block"> + <a class="btn btn-default dropdown-toggle" data-toggle="dropdown" + href="javascript:void(null)">{{agent.displayStatus}} + <span class="caret"></span> + </a> + <ul class="pull-left dropdown-menu"> + <li {{bindAttr class="agent.isStartAgentDisabled:disabled :start-agent"}}> + <a href="javascript:void(null)" + {{bindAttr class="agent.isStartAgentDisabled:disabled"}} + {{action startFlumeAgent agent target="controller"}}> + {{t services.service.summary.flume.startAgent}}</a> + </li> + <li {{bindAttr class="agent.isStopAgentDisabled:disabled"}}> + <a href="javascript:void(null)" + {{bindAttr class="agent.isStopAgentDisabled:disabled :stop-agent"}} + {{action stopFlumeAgent agent target="controller"}}> + {{t services.service.summary.flume.stopAgent}}</a> + </li> + </ul> + </div> + </div> + </div> + </td> + <td class="flume-agent-sources-count"> + {{agent.sourcesCount}} + </td> + <td class="flume-agent-channels-count"> + {{agent.channelsCount}} + </td> + <td class="flume-agent-sink-count"> + {{agent.sinksCount}} + </td> + {{/view}} + {{/each}} + </tbody> + {{/each}} + {{else}} + <tr> + <td colspan="6" id="flume-agents-empty-label" class="empty-label"> + {{t services.service.summary.flume.noAgents}} + </td> + </tr> + {{/if}} + </table> </div> - </td> -</tr> + </div> +</div> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/ac7ff8ba/ambari-web/app/templates/main/service/services/hbase.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/main/service/services/hbase.hbs b/ambari-web/app/templates/main/service/services/hbase.hbs index f6fa44c..2d4f8bb 100644 --- a/ambari-web/app/templates/main/service/services/hbase.hbs +++ b/ambari-web/app/templates/main/service/services/hbase.hbs @@ -16,78 +16,74 @@ * limitations under the License. }} -<!-- HBase Master Server --> -{{view view.dashboardMasterComponentView}} -<!-- RegionServers --> -{{#if view.isRegionServerCreated}} - <tr {{bindAttr class=":component view.regionServerComponent.componentName"}}> - <td class="summary-label"><a - href="#" {{action filterHosts view.regionServerComponent}}>{{t dashboard.services.hbase.regionServers}}</a> - </td> - <td class="summary-value"> - {{#if App.router.clusterController.isServiceContentFullyLoaded}} - <span> - {{#view App.ComponentLiveTextView liveComponentsBinding="view.service.regionServersStarted" totalComponentsBinding="view.service.regionServersTotal"}} - {{view.liveComponents}}/{{view.totalComponents}} - {{/view}} - </span> - {{t services.service.summary.RegionServersLIVE}} - {{else}} - {{t common.loading.eclipses}} - {{/if}} - </td> - </tr> -{{/if}} -<!-- PhoenixServers --> -{{#if view.isPhoenixQueryServerCreated}} - <tr {{bindAttr class=":component view.phoenixServerComponent.componentName"}}> - <td class="summary-label"><a - href="#" {{action filterHosts view.phoenixServerComponent}}>{{t dashboard.services.hbase.phoenixServers}}</a> - </td> - <td class="summary-value"> - <span> - {{#view App.ComponentLiveTextView liveComponentsBinding="view.service.phoenixServersStarted" totalComponentsBinding="view.service.phoenixServersTotal"}} +<div class="row"> + <div class="col-md-6"> + {{! HBase Master Server }} + {{view view.dashboardMasterComponentView}} + {{! RegionServers }} + {{#if view.isRegionServerCreated}} + <div {{bindAttr class=":row :component view.regionServerComponent.componentName"}}> + <div class="col-md-6 summary-label"> + <a href="#" {{action filterHosts view.regionServerComponent}}>{{t dashboard.services.hbase.regionServers}}</a> + </div> + <div class="col-md-6 summary-value"> {{#if App.router.clusterController.isServiceContentFullyLoaded}} - {{view.liveComponents}}/{{view.totalComponents}} + <span> + {{#view App.ComponentLiveTextView liveComponentsBinding="view.service.regionServersStarted" totalComponentsBinding="view.service.regionServersTotal"}} + {{view.liveComponents}}/{{view.totalComponents}} + {{/view}} + </span> + {{t services.service.summary.RegionServersLIVE}} + {{else}} + {{t common.loading.eclipses}} {{/if}} - {{/view}} - </span> - {{t services.service.summary.PhoenixServersLIVE}} - </td> - </tr> -{{/if}} -<!-- Regions in Transition --> -<tr class="regions-in-trnasition"> - <td class="summary-label">{{t dashboard.services.hbase.regions.transition}}</td> - <td class="summary-value">{{view.service.regionsInTransition}}</td> -</tr> - -<!-- Divider-- make the remaining summary info on 2nd table--> -</tbody> -</table> -</div> -<div class="col-md-6"> - <table class="summary-info table no-borders table-condensed"> - <tbody> - - <!-- HBase Master Started Time --> - <tr class="started-time"> - <td class="summary-label">{{t dashboard.services.hbase.masterStarted}}</td> - <td class="summary-value">{{view.masterStartedTime}}</td> - </tr> - <!-- HBase Master Activated Time --> - <tr class="activated-time"> - <td class="summary-label">{{t dashboard.services.hbase.masterActivated}}</td> - <td class="summary-value">{{view.masterStartedTime}}</td> - </tr> - <!-- Average Load --> - <tr class="average-load"> - <td class="summary-label">{{t dashboard.services.hbase.averageLoad}}</td> - <td class="summary-value">{{view.averageLoad}}</td> - </tr> - <!-- Master Server Heap --> - <tr class="server-heap"> - <td class="summary-label">{{t dashboard.services.hbase.masterServerHeap}}</td> - <td class="summary-value">{{view.masterServerHeapSummary}}</td> - </tr> - + </div> + </div> + {{/if}} + {{! PhoenixServers }} + {{#if view.isPhoenixQueryServerCreated}} + <div {{bindAttr class=":row :component view.phoenixServerComponent.componentName"}}> + <div class="col-md-6 summary-label"> + <a href="#" {{action filterHosts view.phoenixServerComponent}}>{{t dashboard.services.hbase.phoenixServers}}</a> + </div> + <div class="col-md-6 summary-value"> + <span> + {{#view App.ComponentLiveTextView liveComponentsBinding="view.service.phoenixServersStarted" totalComponentsBinding="view.service.phoenixServersTotal"}} + {{#if App.router.clusterController.isServiceContentFullyLoaded}} + {{view.liveComponents}}/{{view.totalComponents}} + {{/if}} + {{/view}} + </span> + {{t services.service.summary.PhoenixServersLIVE}} + </div> + </div> + {{/if}} + {{! Regions in Transition }} + <div class="row regions-in-trnasition"> + <div class="col-md-6 summary-label">{{t dashboard.services.hbase.regions.transition}}</div> + <div class="col-md-6 summary-value">{{view.service.regionsInTransition}}</div> + </div> + </div> + <div class="col-md-6"> + {{! HBase Master Started Time }} + <div class="row started-time"> + <div class="col-md-6 summary-label">{{t dashboard.services.hbase.masterStarted}}</div> + <div class="col-md-6 summary-value">{{view.masterStartedTime}}</div> + </div> + {{! HBase Master Activated Time }} + <div class="row activated-time"> + <div class="col-md-6 summary-label">{{t dashboard.services.hbase.masterActivated}}</div> + <div class="col-md-6 summary-value">{{view.masterStartedTime}}</div> + </div> + {{! Average Load }} + <div class="row average-load"> + <div class="col-md-6 summary-label">{{t dashboard.services.hbase.averageLoad}}</div> + <div class="col-md-6 summary-value">{{view.averageLoad}}</div> + </div> + {{! Master Server Heap }} + <div class="row server-heap"> + <div class="col-md-6 summary-label">{{t dashboard.services.hbase.masterServerHeap}}</div> + <div class="col-md-6 summary-value">{{view.masterServerHeapSummary}}</div> + </div> + </div> +</div> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/ac7ff8ba/ambari-web/app/templates/main/service/services/hdfs.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/main/service/services/hdfs.hbs b/ambari-web/app/templates/main/service/services/hdfs.hbs index ccf3d30..01bd762 100644 --- a/ambari-web/app/templates/main/service/services/hdfs.hbs +++ b/ambari-web/app/templates/main/service/services/hdfs.hbs @@ -16,143 +16,143 @@ * limitations under the License. }} -{{view view.dashboardMasterComponentView}} -<!-- Data Nodes --> -{{#if view.isDataNodeCreated}} - <tr {{bindAttr class=":component view.dataNodeComponent.componentName"}}> - <td class="summary-label"><a - href="#" {{action filterHosts view.dataNodeComponent}}>{{t dashboard.services.hdfs.datanodes}}</a> - </td> - <td class="summary-value"> - {{#if App.router.clusterController.isServiceContentFullyLoaded}} - <span> - {{#view App.ComponentLiveTextView liveComponentsBinding="view.service.dataNodesStarted" totalComponentsBinding="view.service.dataNodesTotal"}} - {{view.liveComponents}}/{{view.totalComponents}} - {{/view}} - </span> - {{t common.started}} - {{else}} - {{t common.loading.eclipses}} - {{/if}} - </td> - </tr> -{{/if}} -<!-- Data Node Counts --> -<tr class="datanode-count"> - <td class="summary-label">{{t dashboard.services.hdfs.datanodecounts}}</td> - {{#if view.service.metricsNotAvailable}} - <td class="summary-value">{{t services.service.summary.notAvailable}}</td> - {{else}} - <td class="summary-value"> - <span {{translateAttr data-original-title="dashboard.services.hdfs.datanode.status.tooltip.live" }} - rel="tooltip">{{view.service.liveDataNodes.length}} {{t dashboard.services.hdfs.nodes.live}} </span> / - <span {{translateAttr data-original-title="dashboard.services.hdfs.datanode.status.tooltip.dead" }} - rel="tooltip">{{view.service.deadDataNodes.length}} {{t dashboard.services.hdfs.nodes.dead}} </span> / - <span {{translateAttr data-original-title="dashboard.services.hdfs.datanode.status.tooltip.decommission" }} - rel="tooltip">{{view.service.decommissionDataNodes.length}} {{t dashboard.services.hdfs.nodes.decom}}</span> - </td> - {{/if}} -</tr> -<!-- JournalNodes --> -{{#if view.isJournalNodeCreated}} - <tr {{bindAttr class=":component view.journalNodeComponent.componentName"}}> - <td class="summary-label"> - <a href="#" {{action filterHosts view.journalNodeComponent}}>{{t dashboard.services.hdfs.journalnodes}}</a> - </td> - <td class="summary-value"> - {{#if App.router.clusterController.isComponentsStateLoaded}} - <span> - {{#view App.ComponentLiveTextView liveComponentsBinding="view.journalNodesLive" totalComponentsBinding="view.journalNodesTotal"}} - {{view.liveComponents}}/{{view.totalComponents}} - {{/view}} - </span> - {{t services.service.summary.JournalNodesLive}} - {{else}} - {{t common.loading.eclipses}} - {{/if}} - </td> - </tr> -{{/if}} -<!-- NFS Gateway --> -{{#if view.isNfsInStack}} - <tr {{bindAttr class=":component view.nfsGatewayComponent.componentName"}}> - <td class="summary-label"> - <a href="#" {{action filterHosts view.nfsGatewayComponent}}>{{t dashboard.services.hdfs.nfsgateways}}</a> - </td> - <td class="summary-value"> - {{#if App.router.clusterController.isServiceContentFullyLoaded}} - <span> - {{#view App.ComponentLiveTextView liveComponentsBinding="view.service.nfsGatewaysStarted" totalComponentsBinding="view.service.nfsGatewaysTotal"}} - {{view.liveComponents}}/{{view.totalComponents}} - {{/view}} - </span> - {{t common.started}} - {{else}} - {{t common.loading.eclipses}} - {{/if}} - </td> - </tr> -{{/if}} -<!-- NameNode Uptime --> -<tr class="namenode-uptime"> - <td class="summary-label">{{t dashboard.services.hdfs.nodes.uptime}}</td> - <td class="summary-value">{{view.nodeUptime}}</td> -</tr> -<!-- NameNode Heap --> -<tr class="namenode-heap"> - <td class="summary-label">{{t dashboard.services.hdfs.nodes.heap}}</td> - <td class="summary-value">{{view.nodeHeap}}</td> -</tr> -<!-- HDFS Capacity (Disk Usage)--> -<tr class="dfs-usage"> - <td class="summary-label">{{t dashboard.services.hdfs.capacity.dfsUsed}}</td> - <td class="summary-value">{{view.dfsUsedDisk}}</td> -</tr> -<tr class="non-dfs-used"> - <td class="summary-label">{{t dashboard.services.hdfs.capacity.nonDfsUsed}}</td> - <td class="summary-value">{{view.nonDfsUsedDisk}}</td> -</tr> +<div class="row"> + {{! left column }} + <div class="col-md-6"> + {{view view.dashboardMasterComponentView}} + {{! Data Nodes }} + {{#if view.isDataNodeCreated}} + <div {{bindAttr class=":row :component view.dataNodeComponent.componentName"}}> + <div class="col-md-6 summary-label"> + <a href="#" {{action filterHosts view.dataNodeComponent}}>{{t dashboard.services.hdfs.datanodes}}</a> + </div> + <div class="col-md-6 summary-value"> + {{#if App.router.clusterController.isServiceContentFullyLoaded}} + <span> + {{#view App.ComponentLiveTextView liveComponentsBinding="view.service.dataNodesStarted" totalComponentsBinding="view.service.dataNodesTotal"}} + {{view.liveComponents}}/{{view.totalComponents}} + {{/view}} + </span> + {{t common.started}} + {{else}} + {{t common.loading.eclipses}} + {{/if}} + </div> + </div> + {{/if}} + {{! Data Node Counts }} + <div class="row datanode-count"> + <div class="col-md-6 summary-label">{{t dashboard.services.hdfs.datanodecounts}}</div> + <div class="col-md-6 summary-value"> + {{#if view.service.metricsNotAvailable}} + {{t services.service.summary.notAvailable}} + {{else}} + <span {{translateAttr data-original-title="dashboard.services.hdfs.datanode.status.tooltip.live" }} + rel="tooltip">{{view.service.liveDataNodes.length}} {{t dashboard.services.hdfs.nodes.live}} </span> / + <span {{translateAttr data-original-title="dashboard.services.hdfs.datanode.status.tooltip.dead" }} + rel="tooltip">{{view.service.deadDataNodes.length}} {{t dashboard.services.hdfs.nodes.dead}} </span> / + <span {{translateAttr data-original-title="dashboard.services.hdfs.datanode.status.tooltip.decommission" }} + rel="tooltip">{{view.service.decommissionDataNodes.length}} {{t dashboard.services.hdfs.nodes.decom}}</span> + {{/if}} + </div> + </div> + {{! JournalNodes }} + {{#if view.isJournalNodeCreated}} + <div {{bindAttr class=":row :component view.journalNodeComponent.componentName"}}> + <div class="col-md-6 summary-label"> + <a href="#" {{action filterHosts view.journalNodeComponent}}>{{t dashboard.services.hdfs.journalnodes}}</a> + </div> + <div class="col-md-6 summary-value"> + {{#if App.router.clusterController.isComponentsStateLoaded}} + <span> + {{#view App.ComponentLiveTextView liveComponentsBinding="view.journalNodesLive" totalComponentsBinding="view.journalNodesTotal"}} + {{view.liveComponents}}/{{view.totalComponents}} + {{/view}} + </span> + {{t services.service.summary.JournalNodesLive}} + {{else}} + {{t common.loading.eclipses}} + {{/if}} + </div> + </div> + {{/if}} + {{! NFS Gateway }} + {{#if view.isNfsInStack}} + <div {{bindAttr class=":row :component view.nfsGatewayComponent.componentName"}}> + <div class="col-md-6 summary-label"> + <a href="#" {{action filterHosts view.nfsGatewayComponent}}>{{t dashboard.services.hdfs.nfsgateways}}</a> + </div> + <div class="col-md-6 summary-value"> + {{#if App.router.clusterController.isServiceContentFullyLoaded}} + <span> + {{#view App.ComponentLiveTextView liveComponentsBinding="view.service.nfsGatewaysStarted" totalComponentsBinding="view.service.nfsGatewaysTotal"}} + {{view.liveComponents}}/{{view.totalComponents}} + {{/view}} + </span> + {{t common.started}} + {{else}} + {{t common.loading.eclipses}} + {{/if}} + </div> + </div> + {{/if}} + {{! NameNode Uptime }} + <div class="row namenode-uptime"> + <div class="col-md-6 summary-label">{{t dashboard.services.hdfs.nodes.uptime}}</div> + <div class="col-md-6 summary-value">{{view.nodeUptime}}</div> + </div> + {{! NameNode Heap }} + <div class="row namenode-heap"> + <div class="col-md-6 summary-label">{{t dashboard.services.hdfs.nodes.heap}}</div> + <div class="col-md-6 summary-value">{{view.nodeHeap}}</div> + </div> + {{! HDFS Capacity (Disk Usage)}} + <div class="row dfs-usage"> + <div class="col-md-6 summary-label">{{t dashboard.services.hdfs.capacity.dfsUsed}}</div> + <div class="col-md-6 summary-value">{{view.dfsUsedDisk}}</div> + </div> + <div class="row non-dfs-used"> + <div class="col-md-6 summary-label">{{t dashboard.services.hdfs.capacity.nonDfsUsed}}</div> + <div class="col-md-6 summary-value">{{view.nonDfsUsedDisk}}</div> + </div> + </div> + {{! left column end }} -<!-- Divider-- make the remaining summary info on 2nd table--> - </tbody> - </table> -</div> -<div class="col-md-6"> - <table class="summary-info table no-borders table-condensed"> - <tbody> - - <tr class="capacity-remaining"> - <td class="summary-label">{{t dashboard.services.hdfs.capacity.remaining}}</td> - <td>{{view.remainingDisk}}</td> - </tr> - <!-- Blocks Total --> - <tr class="blocks-total"> - <td class="summary-label">{{t services.service.summary.blocksTotal}}</td> - <td>{{view.dfsTotalBlocks}}</td> - </tr> - <!-- Block Errors --> - <tr class="block-errors"> - <td class="summary-label">{{t services.service.summary.blockErrors}}</td> - <td> - {{view.blockErrorsMessage}} - </td> - </tr> - <!-- Total Files And Directories --> - <tr class="total-files-dirs"> - <td class="summary-label">{{t dashboard.services.hdfs.totalFilesAndDirs}}</td> - <td>{{view.dfsTotalFiles}}</td> - </tr> - <!-- Upgrade Status --> - <tr class="upgrade-status"> - <td class="summary-label">{{t services.service.summary.pendingUpgradeStatus}}</td> - <td> + {{! right column }} + <div class="col-md-6"> + <div class="row capacity-remaining"> + <div class="col-md-6 summary-label">{{t dashboard.services.hdfs.capacity.remaining}}</div> + <div class="col-md-6 ">{{view.remainingDisk}}</div> + </div> + {{! Blocks Total }} + <div class="row blocks-total"> + <div class="col-md-6 summary-label">{{t services.service.summary.blocksTotal}}</div> + <div class="col-md-6 ">{{view.dfsTotalBlocks}}</div> + </div> + {{! Block Errors }} + <div class="row block-errors"> + <div class="col-md-6 summary-label">{{t services.service.summary.blockErrors}}</div> + <div class="col-md-6 ">{{view.blockErrorsMessage}}</div> + </div> + {{! Total Files And Directories }} + <div class="row total-files-dirs"> + <div class="col-md-6 summary-label">{{t dashboard.services.hdfs.totalFilesAndDirs}}</div> + <div class="col-md-6 ">{{view.dfsTotalFiles}}</div> + </div> + {{! Upgrade Status }} + <div class="row upgrade-status"> + <div class="col-md-6 summary-label">{{t services.service.summary.pendingUpgradeStatus}}</div> + <div class="col-md-6 "> <span {{bindAttr class="view.isUpgradeStatusWarning:upgrade-status-warning"}}>{{view.upgradeStatus}}</span> - </td> - </tr> - <!-- Safe Mode Status --> - <tr class="safe-mode-status"> - <td class="summary-label">{{t services.service.summary.safeModeStatus}}</td> - <td> + </div> + </div> + {{! Safe Mode Status }} + <div class="row safe-mode-status"> + <div class="col-md-6 summary-label">{{t services.service.summary.safeModeStatus}}</div> + <div class="col-md-6 "> {{view.safeModeStatus}} - </td> - </tr> + </div> + </div> + </div> + {{! right column end }} +</div> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/ac7ff8ba/ambari-web/app/templates/main/service/services/hive.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/main/service/services/hive.hbs b/ambari-web/app/templates/main/service/services/hive.hbs index 1b26091..672403e 100644 --- a/ambari-web/app/templates/main/service/services/hive.hbs +++ b/ambari-web/app/templates/main/service/services/hive.hbs @@ -16,31 +16,37 @@ * limitations under the License. }} -{{view App.SummaryMasterComponentsView mastersCompBinding="view.parentView.mastersObj"}} -{{view App.SummaryClientComponentsView clientsObjBinding="view.parentView.clientObj"}} - -<tr class="hidden"><td></td></tr> - +<div class="row"> + <div class="col-md-6"> + {{view App.SummaryMasterComponentsView mastersCompBinding="view.parentView.mastersObj"}} + {{view App.SummaryClientComponentsView clientsObjBinding="view.parentView.clientObj"}} + </div> +</div> {{#each endpoint in hiveServerEndPoints}} {{#if endpoint.isVisible}} - <tr {{bindAttr class=":component endpoint.componentName"}}> - <td class="summary-label">{{endpoint.label}}</td> - <td class="summary-value" > - {{#view view.summaryValueView titleBinding="endpoint.tooltipText" data-toggle="tooltip"}} - {{endpoint.value}} - {{/view}} - {{#view view.clipBoardView data-clipboard-action= "copy" data-clipboard-textBinding="endpoint.value"}} - <img src="/img/clippy.svg" alt="Copy" rel="clipboard-tooltip" data-toggle="tooltip" data-placement="bottom" title="Copied!"/> - {{/view}} - </td> - </tr> + <div {{bindAttr class=":row :component endpoint.componentName"}}> + <div class="col-md-3 col-lg-3 summary-label">{{endpoint.label}}</div> + <div class="col-md-9 col-lg-9 summary-value"> + {{#view view.summaryValueView titleBinding="endpoint.tooltipText" data-toggle="tooltip"}} + {{endpoint.value}} + {{/view}} + {{#view view.clipBoardView data-clipboard-action= "copy" data-clipboard-textBinding="endpoint.value"}} + <img src="/img/clippy.svg" alt="Copy" rel="clipboard-tooltip" data-toggle="tooltip" data-placement="bottom" title="Copied!"/> + {{/view}} + </div> + </div> {{/if}} {{/each}} -{{#each link in view.viewLinks}} - <tr> - <td class="summary-label">{{link.label}}</td> - <td class="summary-value" > - <a href="#" target="_blank" {{action goToView link target="controller"}}>{{t app.goToView}}</a> - </td> - </tr> -{{/each}} \ No newline at end of file + +<div class="row"> + <div class="col-md-6"> + {{#each link in view.viewLinks}} + <div class="row"> + <div class="col-md-6 summary-label">{{link.label}}</div> + <div class="col-md-6 summary-value"> + <a href="#" target="_blank" {{action goToView link target="controller"}}>{{t app.goToView}}</a> + </div> + </div> + {{/each}} + </div> +</div> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/ac7ff8ba/ambari-web/app/templates/main/service/services/ranger.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/main/service/services/ranger.hbs b/ambari-web/app/templates/main/service/services/ranger.hbs index 07027f4..f322498 100644 --- a/ambari-web/app/templates/main/service/services/ranger.hbs +++ b/ambari-web/app/templates/main/service/services/ranger.hbs @@ -16,33 +16,37 @@ * limitations under the License. }} -{{view view.dashboardMasterComponentView}} +<div class="row"> + <div class="col-md-6"> + {{view view.dashboardMasterComponentView}} -<!-- Ranger Tagsyncs --> -{{#if view.isRangerTagsyncCreated}} - <tr {{bindAttr class=":component view.rangerTagsyncComponent.componentName"}}> - <td class="summary-label"> - <a href="#" {{action filterHosts view.rangerTagsyncComponent}}>{{t dashboard.services.ranger.rangerTagsyncs}}</a> - </td> - <td class="summary-value"> - {{#if App.router.clusterController.isServiceContentFullyLoaded}} - <span> - {{#view App.ComponentLiveTextView liveComponentsBinding="view.service.rangerTagsyncsStarted" totalComponentsBinding="view.service.rangerTagsyncsTotal"}} - {{view.liveComponents}}/{{view.totalComponents}} - {{/view}} - </span>{{t common.started}} - {{else}} - {{t common.loading.eclipses}} - {{/if}} - </td> - </tr> -{{/if}} + {{! Ranger Tagsyncs }} + {{#if view.isRangerTagsyncCreated}} + <div {{bindAttr class=":row :component view.rangerTagsyncComponent.componentName"}}> + <div class="col-md-6 summary-label"> + <a href="#" {{action filterHosts view.rangerTagsyncComponent}}>{{t dashboard.services.ranger.rangerTagsyncs}}</a> + </div> + <div class="col-md-6 summary-value"> + {{#if App.router.clusterController.isServiceContentFullyLoaded}} + <span> + {{#view App.ComponentLiveTextView liveComponentsBinding="view.service.rangerTagsyncsStarted" totalComponentsBinding="view.service.rangerTagsyncsTotal"}} + {{view.liveComponents}}/{{view.totalComponents}} + {{/view}} + </span>{{t common.started}} + {{else}} + {{t common.loading.eclipses}} + {{/if}} + </div> + </div> + {{/if}} -{{#each item in controller.rangerPlugins}} - {{#if item.isDisplayed}} - <tr class="ranger-plugin"> - <td class="summary-label">{{item.pluginTitle}}</td> - <td class="summary-value">{{item.status}}</td> - </tr> - {{/if}} -{{/each}} + {{#each item in controller.rangerPlugins}} + {{#if item.isDisplayed}} + <div class="row ranger-plugin"> + <div class="col-md-6 summary-label">{{item.pluginTitle}}</div> + <div class="col-md-6 summary-value">{{item.status}}</div> + </div> + {{/if}} + {{/each}} + </div> +</div> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/ac7ff8ba/ambari-web/app/templates/main/service/services/storm.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/main/service/services/storm.hbs b/ambari-web/app/templates/main/service/services/storm.hbs index fb6def2..68e60eb 100644 --- a/ambari-web/app/templates/main/service/services/storm.hbs +++ b/ambari-web/app/templates/main/service/services/storm.hbs @@ -16,75 +16,70 @@ * limitations under the License. }} -{{view App.SummaryMasterComponentsView mastersCompBinding="view.parentView.mastersObj"}} -{{#if view.isSupervisorCreated}} - <tr class="component SUPERVISOR"> - <td class="summary-label"> - <a href="#" {{action filterHosts view.filterComponent}}> - {{t dashboard.services.storm.supervisors}} - </a> - </td> - <td class="summary-value"> - {{#if App.router.clusterController.isServiceContentFullyLoaded}} - <span> - {{#view App.ComponentLiveTextView liveComponentsBinding="view.superVisorsLive" totalComponentsBinding="view.superVisorsTotal"}} - {{view.liveComponents}}/{{view.totalComponents}} - {{/view}} - </span> {{t services.service.summary.SupervisorsLIVE}} - {{else}} - {{t common.loading.eclipses}} - {{/if}} - </td> - </tr> -{{/if}} -<!-- Divider-- make the remaining summary info on 2nd table--> -</tbody> -</table> -</div> -<div class="col-md-6"> - <table class="summary-info table no-borders table-condensed"> - <tbody> - - <tr class="storm-slots"> - <td class="summary-label"> +<div class="row"> + <div class="col-md-6"> + {{view App.SummaryMasterComponentsView mastersCompBinding="view.parentView.mastersObj"}} + {{#if view.isSupervisorCreated}} + <div class="row component SUPERVISOR"> + <div class="col-md-6 summary-label"> + <a href="#" {{action filterHosts view.filterComponent}}> + {{t dashboard.services.storm.supervisors}} + </a> + </div> + <div class="col-md-6 summary-value"> + {{#if App.router.clusterController.isServiceContentFullyLoaded}} + {{#view App.ComponentLiveTextView liveComponentsBinding="view.superVisorsLive" totalComponentsBinding="view.superVisorsTotal" tagName="span"}} + {{view.liveComponents}}/{{view.totalComponents}} + {{/view}} + {{t services.service.summary.SupervisorsLIVE}} + {{else}} + {{t common.loading.eclipses}} + {{/if}} + </div> + </div> + {{/if}} + </div> + <div class="col-md-6"> + <div class="row storm-slots"> + <div class="col-md-6 summary-label"> {{t services.service.summary.storm.freeslots}} - </td> - <td class="summary-value"> + </div> + <div class="col-md-6 summary-value"> {{formatNull view.service.freeSlots}} / {{formatNull view.service.totalSlots}} ({{formatNull view.freeSlotsPercentage empty="0"}}% {{t common.free}}) - </td> - </tr> - <tr class="storm-tasks"> - <td class="summary-label"> + </div> + </div> + <div class="row storm-tasks"> + <div class="col-md-6 summary-label"> {{t services.service.summary.storm.tasks}} - </td> - <td class="summary-value"> + </div> + <div class="col-md-6 summary-value"> {{formatNull view.service.totalTasks}} - </td> - </tr> - <tr class="storm-executors"> - <td class="summary-label"> + </div> + </div> + <div class="row storm-executors"> + <div class="col-md-6 summary-label"> {{t services.service.summary.storm.executors}} - </td> - <td class="summary-value"> + </div> + <div class="col-md-6 summary-value"> {{formatNull view.service.totalExecutors}} - </td> - </tr> - <tr class="storm-topologies"> - <td class="summary-label"> + </div> + </div> + <div class="row storm-topologies"> + <div class="col-md-6 summary-label"> {{t services.service.summary.storm.topologies}} - </td> - <td class="summary-value"> + </div> + <div class="col-md-6 summary-value"> {{formatNull view.service.topologies}} - </td> - </tr> - <tr class="nimbus-uptime"> - <td class="summary-label"> + </div> + </div> + <div class="row nimbus-uptime"> + <div class="col-md-6 summary-label"> {{t services.service.summary.storm.nimbus.uptime}} - </td> - <td class="summary-value"> + </div> + <div class="col-md-6 summary-value"> {{view.nimbusUptimeFormatted}} - </td> - </tr> - - + </div> + </div> + </div> +</div> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/ac7ff8ba/ambari-web/app/templates/main/service/services/yarn.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/main/service/services/yarn.hbs b/ambari-web/app/templates/main/service/services/yarn.hbs index 290c361..1827c8e 100644 --- a/ambari-web/app/templates/main/service/services/yarn.hbs +++ b/ambari-web/app/templates/main/service/services/yarn.hbs @@ -15,82 +15,86 @@ * See the License for the specific language governing permissions and * limitations under the License. }} -{{view view.dashboardMasterComponentView}} -<!-- NodeManagers --> -{{#if view.isNodeManagerCreated}} - <tr {{bindAttr class=":component view.nodeManagerComponent.componentName"}}> - <td class="summary-label"> - <a href="#" {{action filterHosts view.nodeManagerComponent}}>{{t dashboard.services.yarn.nodeManagers}}</a> - </td> - <td class="summary-value"> - {{#if App.router.clusterController.isServiceContentFullyLoaded}} - <span> - {{#view App.ComponentLiveTextView liveComponentsBinding="view.service.nodeManagersStarted" totalComponentsBinding="view.service.nodeManagersTotal"}} +<div class="row"> +{{! left column }} +<div class="col-md-6"> + {{view view.dashboardMasterComponentView}} + + {{! NodeManagers }} + {{#if view.isNodeManagerCreated}} + <div {{bindAttr class=":row :component view.nodeManagerComponent.componentName"}}> + <div class="col-md-6 summary-label"> + <a href="#" {{action filterHosts view.nodeManagerComponent}}>{{t dashboard.services.yarn.nodeManagers}}</a> + </div> + <div class="col-md-6 summary-value"> + {{#if App.router.clusterController.isServiceContentFullyLoaded}} + {{#view App.ComponentLiveTextView liveComponentsBinding="view.service.nodeManagersStarted" totalComponentsBinding="view.service.nodeManagersTotal" tagName="span"}} {{view.liveComponents}}/{{view.totalComponents}} {{/view}} - </span>{{t common.started}} - {{else}} - {{t common.loading.eclipses}} - {{/if}} - </td> - </tr> -{{/if}} -<!-- NodeManagers status --> -<tr class="nodemanager-status"> - <td class="summary-label">{{t dashboard.services.yarn.nodeManagers.status}}</td> - <td class="summary-value">{{view.nodeManagersStatus}}</td> -</tr> -<!-- YARN Clients --> -<tr {{bindAttr class=":component view.yarnClientComponent.componentName"}}> - <td class="summary-label"><a {{action filterHosts view.yarnClientComponent}} - href="javascript:void(null)">{{pluralize view.service.installedClients singular="t:dashboard.services.yarn.client" plural="t:dashboard.services.yarn.clients"}}</a> - </td> - <td class="summary-value"> - <span class="green-live">{{view.service.installedClients}} </span> - {{pluralize view.service.installedClients singular="t:dashboard.services.yarn.client" plural="t:dashboard.services.yarn.clients"}} {{t common.installed}} - </td> -</tr> -<!-- ResourceManager Uptime --> -<tr class="resourcemanager-uptime"> - <td class="summary-label">{{t dashboard.services.yarn.resourceManager.uptime}}</td> - <td class="summary-value">{{view.nodeUptime}}</td> -</tr> - -<!-- Divider-- make the remaining summary info on 2nd table--> -</tbody> -</table> + {{t common.started}} + {{else}} + {{t common.loading.eclipses}} + {{/if}} + </div> + </div> + {{/if}} + {{! NodeManagers status }} + <div class="row nodemanager-status"> + <div class="col-md-6 summary-label">{{t dashboard.services.yarn.nodeManagers.status}}</div> + <div class="col-md-6 summary-value">{{view.nodeManagersStatus}}</div> + </div> + {{! YARN Clients }} + <div {{bindAttr class=":row :component view.yarnClientComponent.componentName"}}> + <div class="col-md-6 summary-label"> + <a {{action filterHosts view.yarnClientComponent}} href="javascript:void(null)"> + {{pluralize view.service.installedClients singular="t:dashboard.services.yarn.client" plural="t:dashboard.services.yarn.clients"}} + </a> + </div> + <div class="col-md-6 summary-value"> + <span class="green-live">{{view.service.installedClients}} </span> + {{pluralize view.service.installedClients singular="t:dashboard.services.yarn.client" plural="t:dashboard.services.yarn.clients"}} {{t common.installed}} + </div> + </div> + {{! ResourceManager Uptime }} + <div class="row resourcemanager-uptime"> + <div class="col-md-6 summary-label">{{t dashboard.services.yarn.resourceManager.uptime}}</div> + <div class="col-md-6 summary-value">{{view.nodeUptime}}</div> + </div> </div> -<div class="col-md-6"> - <table class="summary-info table no-borders table-condensed"> - <tbody> +{{! left column end }} - <!-- ResourceManager Heap --> - <tr class="resourcemanager-heap"> - <td class="summary-label">{{t dashboard.services.resourceManager.nodes.heap}}</td> - <td class="summary-value">{{view.nodeHeap}}</td> - </tr> - <!-- Containers --> - <tr class="yarn-containers"> - <td class="summary-label">{{t dashboard.services.yarn.containers}}</td> - <td class="summary-value">{{view.containers}}</td> - </tr> - <!-- Applications --> - <tr class="yarn-applications"> - <td class="summary-label">{{t dashboard.services.yarn.apps}}</td> - <td class="summary-value">{{view.apps}}</td> - </tr> - <!-- Memory --> - <tr class="yarn-memory"> - <td class="summary-label">{{t dashboard.services.yarn.memory}}</td> - <td class="summary-value">{{view.memory}}</td> - </tr> - <!-- Queues --> - <tr class="yarn-queues"> - <td class="summary-label">{{t dashboard.services.yarn.queues}}</td> - <td class="summary-value"> +{{! right column }} +<div class="col-md-6"> + {{! ResourceManager Heap }} + <div class="row resourcemanager-heap"> + <div class="col-md-6 summary-label">{{t dashboard.services.resourceManager.nodes.heap}}</div> + <div class="col-md-6 summary-value">{{view.nodeHeap}}</div> + </div> + {{! Containers }} + <div class="row yarn-containers"> + <div class="col-md-6 summary-label">{{t dashboard.services.yarn.containers}}</div> + <div class="col-md-6 summary-value">{{view.containers}}</div> + </div> + {{! Applications }} + <div class="row yarn-applications"> + <div class="col-md-6 summary-label">{{t dashboard.services.yarn.apps}}</div> + <div class="col-md-6 summary-value">{{view.apps}}</div> + </div> + {{! Memory }} + <div class="row yarn-memory"> + <div class="col-md-6 summary-label">{{t dashboard.services.yarn.memory}}</div> + <div class="col-md-6 summary-value">{{view.memory}}</div> + </div> + {{! Queues }} + <div class="row yarn-queues"> + <div class="col-md-6 summary-label">{{t dashboard.services.yarn.queues}}</div> + <div class="col-md-6 summary-value"> <span rel="queue-tooltip" class="text-tooltip" {{bindAttr data-original-title="view.service.queueFormatted" }}> {{view.queues}} </span> - </td> - </tr> + </div> + </div> +</div> +{{! right column end }} +</div> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/ac7ff8ba/ambari-web/app/views/main/service/info/summary.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/summary.js b/ambari-web/app/views/main/service/info/summary.js index 05cc92f..378a8b3 100644 --- a/ambari-web/app/views/main/service/info/summary.js +++ b/ambari-web/app/views/main/service/info/summary.js @@ -92,11 +92,11 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, App.TimeRangeMixin clientsHostText: function () { if (this.get('controller.content.installedClients').length === 0) { return ''; - } else if (this.get("hasManyClients")) { + } + if (this.get("hasManyClients")) { return Em.I18n.t('services.service.summary.viewHosts'); - } else { - return Em.I18n.t('services.service.summary.viewHost'); } + return Em.I18n.t('services.service.summary.viewHost'); }.property("hasManyClients"), hasManyClients: Em.computed.gt('controller.content.installedClients.length', 1), @@ -104,7 +104,7 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, App.TimeRangeMixin servers: function () { var result = []; var service = this.get('controller.content'); - if (service.get("id") == "ZOOKEEPER" || service.get("id") == "FLUME") { + if (service.get("id") === "ZOOKEEPER" || service.get("id") === "FLUME") { var servers = service.get('hostComponents').filterProperty('isMaster'); if (servers.length > 0) { result = [ @@ -137,9 +137,9 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, App.TimeRangeMixin historyServerUI: function () { var master = this.get('controller.content.hostComponents').findProperty('isMaster'); - return (App.singleNodeInstall + return App.singleNodeInstall ? "http://" + App.singleNodeAlias + ":19888" - : "http://" + master.get("host.publicHostName") + ":19888"); + : "http://" + master.get("host.publicHostName") + ":19888"; }.property('controller.content'), /** @@ -148,7 +148,7 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, App.TimeRangeMixin */ serversHost: function() { var service = this.get('controller.content'); - if (service.get("id") == "ZOOKEEPER" || service.get("id") == "FLUME") { + if (service.get("id") === "ZOOKEEPER" || service.get("id") === "FLUME") { var servers = service.get('hostComponents').filterProperty('isMaster'); if (servers.length > 0) { return servers[0]; @@ -196,7 +196,7 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, App.TimeRangeMixin source.pushObjects(data); } if (source.length > data.length) { - sourceIds.forEach(function(item, index) { + sourceIds.forEach(function(item) { if (!dataIds.contains(item)) { var sourceItem = source.findProperty('id',item); source.removeObject(sourceItem); @@ -258,7 +258,7 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, App.TimeRangeMixin template: Ember.Handlebars.compile('{{t services.service.summary.moreStats}}'), attributeBindings: ['href'], classNames: ['more-stats'], - click: function (event) { + click: function () { this._parentView._parentView.set('isHide', false); this.remove(); }, @@ -325,11 +325,11 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, App.TimeRangeMixin var restartRequiredHostsAndComponents = this.get('controller.content.restartRequiredHostsAndComponents'); for (var hostName in restartRequiredHostsAndComponents) { restartRequiredHostsAndComponents[hostName].forEach(function (hostComponent) { - if (hostComponent == 'NameNode') + if (hostComponent === 'NameNode') isNNAffected = true; }) } - if (serviceDisplayName == 'HDFS' && isNNAffected && + if (serviceDisplayName === 'HDFS' && isNNAffected && this.get('controller.content.hostComponents').filterProperty('componentName', 'NAMENODE').someProperty('workStatus', App.HostComponentStatus.started)) { App.router.get('mainServiceItemController').checkNnLastCheckpointTime(function () { return App.showConfirmationFeedBackPopup(function (query) { @@ -397,7 +397,7 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, App.TimeRangeMixin */ persistKey: Em.computed.format('time-range-service-{0}', 'service.serviceName'), - getUserPrefSuccessCallback: function (response, request, data) { + getUserPrefSuccessCallback: function (response, request) { if (response) { this.set('currentTimeRangeIndex', response); } @@ -514,10 +514,10 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, App.TimeRangeMixin var customServiceView = this.get('serviceCustomViewsMap')[serviceName]; if (customServiceView) { - serviceSummaryView = customServiceView.extend({ + serviceSummaryView = customServiceView.extend({ service: this.get('service') }); - } else { + } else { serviceSummaryView = Em.View.extend(App.MainDashboardServiceViewWrapper, { templateName: this.get('templatePathPrefix') + 'base' }); @@ -529,10 +529,10 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, App.TimeRangeMixin /** * Service metrics panel not displayed when metrics service (ex:Ganglia) is not in stack definition. + * + * @type {boolean} */ - isNoServiceMetricsService: function() { - return !App.get('services.serviceMetrics').length; - }.property('App.services.serviceMetrics'), + isNoServiceMetricsService: Em.computed.equal('App.services.serviceMetrics.length', 0), didInsertElement: function () { this._super(); @@ -549,7 +549,6 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, App.TimeRangeMixin var allServices = require('data/service_graph_config'); this.constructGraphObjects(allServices[svcName.toLowerCase()]); } - this.adjustSummaryHeight(); this.makeSortable(); this.addWidgetTooltip(); App.loadTimer.finish('Service Summary Page'); @@ -569,25 +568,6 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, App.TimeRangeMixin }, 1000); }, - /** - * adjust the summary table height - */ - adjustSummaryHeight: function() { - var summaryTable = document.getElementById('summary-info'); - - if (summaryTable) { - var rows = $(summaryTable).find('tr'); - if (rows != null && rows.length > 0) { - var minimumHeightSum = 20; - var summaryActualHeight = summaryTable.clientHeight; - // for summary window - if (summaryActualHeight <= minimumHeightSum) { - $(summaryTable).attr('style', "height:" + minimumHeightSum + "px;"); - } - } - } - }, - willDestroyElement: function() { $("[rel='add-widget-tooltip']").tooltip('destroy'); $('.img-thumbnail').off(); @@ -623,10 +603,10 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, App.TimeRangeMixin }), self.get('controller.widgets')); self.get('controller').saveWidgetLayout(widgets); }, - activate: function (event, ui) { + activate: function () { self.set('isMoving', true); }, - deactivate: function (event, ui) { + deactivate: function () { self.set('isMoving', false); } }).disableSelection(); http://git-wip-us.apache.org/repos/asf/ambari/blob/ac7ff8ba/ambari-web/app/views/main/service/service.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/service.js b/ambari-web/app/views/main/service/service.js index 75f20e6..466ccdc 100644 --- a/ambari-web/app/views/main/service/service.js +++ b/ambari-web/app/views/main/service/service.js @@ -39,7 +39,7 @@ App.MainDashboardServiceHealthView = Em.View.extend({ doBlink: function () { var self = this; - if (this.get('blink') && (this.get("state") == "inDOM")) { + if (this.get('blink') && this.get("state") === "inDOM") { uiEffects.pulsate(self.$(), 1000, function(){ self.doBlink(); }); @@ -55,7 +55,7 @@ App.MainDashboardServiceHealthView = Em.View.extend({ if (isClientOnlyService) { return 'glyphicon glyphicon-blackboard'; } - if (this.get('service.passiveState') != 'OFF') { + if (this.get('service.passiveState') !== 'OFF') { return 'icon-medkit'; } var status = this.get('service.healthStatus'); @@ -85,8 +85,9 @@ App.MainDashboardServiceHealthView = Em.View.extend({ }.property('service.healthStatus','service.passiveState','service.serviceName'), healthStatusClass: function () { - if (this.get('service.passiveState') != 'OFF' || App.get('services.clientOnly').contains(this.get('service.serviceName'))) + if (this.get('service.passiveState') !== 'OFF' || App.get('services.clientOnly').contains(this.get('service.serviceName'))) { return ''; + } switch (this.get('service.healthStatus')) { case 'green': case 'green-blinking': @@ -110,7 +111,7 @@ App.MainDashboardServiceHealthView = Em.View.extend({ } }); -App.ComponentLiveTextView = Em.View.extend({ +App.ComponentLiveTextView = Em.View.extend({ classNameBindings: ['color:service-summary-component-red-dead:service-summary-component-green-live'], liveComponents: null, totalComponents: null, @@ -120,8 +121,7 @@ App.ComponentLiveTextView = Em.View.extend({ }); App.MainDashboardServiceViewWrapper = Em.Mixin.create({ - layoutName: require('templates/main/service/service'), - isFullWidth: false + layoutName: require('templates/main/service/service') }); App.MainDashboardServiceView = Em.View.extend(App.MainDashboardServiceViewWrapper, { @@ -188,7 +188,7 @@ App.MainDashboardServiceView.reopenClass({ return Em.computed(heapUsedKey, heapMaxKey, function () { var memUsed = Em.get(this, heapUsedKey); var memMax = Em.get(this, heapMaxKey); - var percent = memMax > 0 ? ((100 * memUsed) / memMax) : 0; + var percent = memMax > 0 ? 100 * memUsed / memMax : 0; return Em.I18n.t(i18nKey).format( numberUtils.bytesToSize(memUsed, 1, 'parseFloat'), numberUtils.bytesToSize(memMax, 1, 'parseFloat'), http://git-wip-us.apache.org/repos/asf/ambari/blob/ac7ff8ba/ambari-web/app/views/main/service/services/flume.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/services/flume.js b/ambari-web/app/views/main/service/services/flume.js index 81379eb..2db4583 100644 --- a/ambari-web/app/views/main/service/services/flume.js +++ b/ambari-web/app/views/main/service/services/flume.js @@ -16,15 +16,12 @@ */ var App = require('app'); -var date = require('utils/date/date'); var sort = require('views/common/sort_view'); require('views/main/service/info/metrics/flume/flume_agent_metrics_section'); App.MainDashboardServiceFlumeView = App.TableView.extend(App.MainDashboardServiceViewWrapper, { templateName: require('templates/main/service/services/flume'), - isFullWidth: true, - pagination: false, selectedHost: null, @@ -54,7 +51,7 @@ App.MainDashboardServiceFlumeView = App.TableView.extend(App.MainDashboardServic var agentCount = App.FlumeService.find().objectAt(0).get('agents.length'), hostCount = this.get('service.flumeHandlersTotal'); return this.t("dashboard.services.flume.summary.title") - .format(hostCount, (hostCount > 1 ? "s" : ""), agentCount, (agentCount > 1 ? "s" : "")); + .format(hostCount, hostCount > 1 ? 's' : '', agentCount, agentCount > 1 ? 's' : ''); }.property('service.agents', 'service.hostComponents.length'), flumeHandlerComponent: Em.Object.create({ @@ -67,9 +64,9 @@ App.MainDashboardServiceFlumeView = App.TableView.extend(App.MainDashboardServic click: function (e) { var numberOfAgents = this.get('content.agents').length; - if ($(e.target).attr('class') == "agent-host-name" || $(e.target).attr('class') == "agent-host-link") { + if ($(e.target).attr('class') === "agent-host-name" || $(e.target).attr('class') === "agent-host-link") { var currentTargetRow = $(e.currentTarget); - if ($(e.target).attr('class') == "agent-host-link") { + if ($(e.target).attr('class') === "agent-host-link") { currentTargetRow = currentTargetRow.parent(".agent-host-name").parent(); } currentTargetRow.parents("table:first").find('tr').removeClass('highlight'); @@ -90,7 +87,7 @@ App.MainDashboardServiceFlumeView = App.TableView.extend(App.MainDashboardServic didInsertElement: function () { var self = this; this.filter(); - this.$().on('click', '.flume-agents-actions .dropdown-toggle', function (e) { + this.$().on('click', '.flume-agents-actions .dropdown-toggle', function () { self.setDropdownPosition(this); }); }, http://git-wip-us.apache.org/repos/asf/ambari/blob/ac7ff8ba/ambari-web/app/views/main/service/services/hive.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/services/hive.js b/ambari-web/app/views/main/service/services/hive.js index 690575e..c8c341c 100644 --- a/ambari-web/app/views/main/service/services/hive.js +++ b/ambari-web/app/views/main/service/services/hive.js @@ -21,7 +21,7 @@ var App = require('app'); App.MainDashboardServiceHiveView = App.MainDashboardServiceView.extend({ templateName: require('templates/main/service/services/hive'), serviceName: 'HIVE', - isFullWidth: true, + viewsToShow: { 'AUTO_HIVE_INSTANCE': {}, 'TEZ_CLUSTER_INSTANCE': { @@ -75,7 +75,7 @@ App.MainDashboardServiceHiveView = App.MainDashboardServiceView.extend({ */ setEllipsis: function() { var $ = this.$(); - var text = $.text(); + var text = $.text(); var MAX_LENGTH = 96; var ellipsis = '...'; var length = MAX_LENGTH > text.length ? text.length : MAX_LENGTH; @@ -104,7 +104,7 @@ App.MainDashboardServiceHiveView = App.MainDashboardServiceView.extend({ href: "javascript:void(null)", attributeBindings: ['data-clipboard-text', 'data-clipboard-action', "href"], didInsertElement: function() { - var $this = this.$(); + var $this = this.$(); var id = "#" + $this.attr('id'); var clipboard = new Clipboard(id); var options = { http://git-wip-us.apache.org/repos/asf/ambari/blob/ac7ff8ba/ambari-web/test/views/main/service/info/summary_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/views/main/service/info/summary_test.js b/ambari-web/test/views/main/service/info/summary_test.js index d9fff97..51fd2f2 100644 --- a/ambari-web/test/views/main/service/info/summary_test.js +++ b/ambari-web/test/views/main/service/info/summary_test.js @@ -731,7 +731,6 @@ describe('App.MainServiceInfoSummaryView', function() { sinon.stub(view, 'getServiceModel'); sinon.stub(view.get('controller'), 'getActiveWidgetLayout'); sinon.stub(view.get('controller'), 'loadWidgetLayouts'); - sinon.stub(view, 'adjustSummaryHeight'); sinon.stub(view, 'makeSortable'); sinon.stub(view, 'addWidgetTooltip'); @@ -743,7 +742,6 @@ describe('App.MainServiceInfoSummaryView', function() { view.getServiceModel.restore(); view.get('controller').getActiveWidgetLayout.restore(); view.get('controller').loadWidgetLayouts.restore(); - view.adjustSummaryHeight.restore(); view.makeSortable.restore(); view.addWidgetTooltip.restore(); }); @@ -752,10 +750,6 @@ describe('App.MainServiceInfoSummaryView', function() { view.didInsertElement(); expect(view.getServiceModel.calledOnce).to.be.true; }); - it("adjustSummaryHeight should be called", function() { - view.didInsertElement(); - expect(view.adjustSummaryHeight.calledOnce).to.be.true; - }); it("addWidgetTooltip should be called", function() { view.didInsertElement(); expect(view.addWidgetTooltip.calledOnce).to.be.true; @@ -832,46 +826,4 @@ describe('App.MainServiceInfoSummaryView', function() { }); }); - describe("#adjustSummaryHeight()", function() { - var jQueryMock = { - find: Em.K, - attr: Em.K - }; - - beforeEach(function() { - sinon.stub(window, '$').returns(jQueryMock); - this.mockFind = sinon.stub(jQueryMock, 'find'); - sinon.spy(jQueryMock, 'attr'); - this.mockGetElementById = sinon.stub(document, 'getElementById'); - }); - afterEach(function() { - this.mockGetElementById.restore(); - window.$.restore(); - this.mockFind.restore(); - jQueryMock.attr.restore(); - }); - - it("summary-info not in DOM", function() { - this.mockGetElementById.returns(null); - view.adjustSummaryHeight(); - expect(jQueryMock.find.called).to.be.false; - }); - - it("summary-info has no rows", function() { - this.mockGetElementById.returns({}); - this.mockFind.returns(null); - view.adjustSummaryHeight(); - expect(jQueryMock.find.calledOnce).to.be.true; - expect(jQueryMock.attr.called).to.be.false; - }); - - it("summary-info has rows", function() { - this.mockGetElementById.returns({ - clientHeight: 10 - }); - this.mockFind.returns([{}]); - view.adjustSummaryHeight(); - expect(jQueryMock.attr.calledWith('style', "height:20px;")).to.be.true; - }); - }); }); \ No newline at end of file