ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject [1/2] ambari git commit: AMBARI-12463. Decrease initial application load time. (jaimin)
Date Tue, 21 Jul 2015 19:47:14 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 96735e28e -> 508d8db4c


http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/ambari-web/app/templates/main/host/host_alerts.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/host/host_alerts.hbs b/ambari-web/app/templates/main/host/host_alerts.hbs
index 675f02e..19d44d7 100644
--- a/ambari-web/app/templates/main/host/host_alerts.hbs
+++ b/ambari-web/app/templates/main/host/host_alerts.hbs
@@ -22,49 +22,53 @@
 
   {{#if App.router.mainAlertInstancesController.isLoaded}}
 
-  <table class="table advanced-header-table table-bordered table-striped alerts-table" id="host-alerts-table">
-    <thead>
+    <table class="table advanced-header-table table-bordered table-striped alerts-table" id="host-alerts-table">
+      <thead>
       {{#view view.sortView classNames="label-row" contentBinding="view.filteredContent"}}
         {{view view.parentView.serviceSort class="first service-sorting"}}
         {{view view.parentView.nameSort class="name-sorting"}}
         {{view view.parentView.statusSort class="status-sorting"}}
         {{view view.parentView.textSort class="text-sorting"}}
       {{/view}}
-    <tr class="filter-row">
-      <th class="first">{{view view.serviceFilterView class="service-filter"}}</th>
-      <th>{{view view.nameFilterView class="name-filter"}}</th>
-      <th>{{view view.stateFilterView class="status-filter"}}</th>
-      <th>{{view view.textView class="text-filter"}}</th>
-    </tr>
-    </thead>
-    <tbody>
-    {{#if view.pageContent}}
-      {{#each alertInstance in view.pageContent}}
+      <tr class="filter-row">
+        <th class="first">{{view view.serviceFilterView class="service-filter"}}</th>
+        <th>{{view view.nameFilterView class="name-filter"}}</th>
+        <th>{{view view.stateFilterView class="status-filter"}}</th>
+        <th>{{view view.textView class="text-filter"}}</th>
+      </tr>
+      </thead>
+      <tbody>
+      {{#if view.pageContent}}
+        {{#each alertInstance in view.pageContent}}
+          <tr>
+            <td class="first">
+              {{#if alertInstance.isAmbariServiceName}}
+                {{alertInstance.serviceDisplayName}}
+              {{else}}
+                <a href="#" {{action routeToService alertInstance.service}}>{{alertInstance.serviceDisplayName}}</a>
+              {{/if}}
+            </td>
+            <td>
+              <a href="#" {{action routeToAlertDefinition alertInstance.definitionId target="controller"}}>{{alertInstance.label}}</a>
+            </td>
+            <td>{{{alertInstance.status}}}
+              <time class="timeago" {{bindAttr data-original-title="alertInstance.statusChangedAndLastCheckedFormatted"}}>{{alertInstance.lastTriggeredForFormatted}}</time>
+            </td>
+            <td><span
+                    class="alert-text" {{bindAttr data-original-title="alertInstance.escapeSpecialCharactersFromTooltip"}}
+                    class="alert-text">{{alertInstance.text}}</span></td>
+          </tr>
+        {{/each}}
+      {{else}}
         <tr>
           <td class="first">
-            {{#if alertInstance.isAmbariServiceName}}
-              {{alertInstance.serviceDisplayName}}
-            {{else}}
-              <a href="#" {{action routeToService alertInstance.service}}>{{alertInstance.serviceDisplayName}}</a>
-            {{/if}}
-          </td>
-          <td>
-            <a href="#" {{action routeToAlertDefinition alertInstance.definitionId target="controller"}}>{{alertInstance.label}}</a>
+            {{t alerts.table.noAlerts}}
           </td>
-          <td>{{{alertInstance.status}}} <time class="timeago" {{bindAttr data-original-title="alertInstance.statusChangedAndLastCheckedFormatted"}}>{{alertInstance.lastTriggeredForFormatted}}</time></td>
-          <td><span class="alert-text" {{bindAttr data-original-title="alertInstance.escapeSpecialCharactersFromTooltip"}} class="alert-text">{{alertInstance.text}}</span></td>
+          <td colspan="3"></td>
         </tr>
-      {{/each}}
-    {{else}}
-      <tr>
-        <td class="first">
-          {{t alerts.table.noAlerts}}
-        </td>
-        <td colspan="3"></td>
-      </tr>
-    {{/if}}
-    </tbody>
-  </table>
+      {{/if}}
+      </tbody>
+    </table>
 
   {{else}}
     <div class="spinner"></div>
@@ -74,7 +78,7 @@
     <div class="filtered-info span4">
       {{#if view.showFilteredContent}}
         <label>{{view.filteredContentInfo}} - <a {{action clearFilters target="view"}}
-            href="#">{{t tableView.filters.clearAllFilters}}</a></label>
+                href="#">{{t tableView.filters.clearAllFilters}}</a></label>
       {{/if}}
     </div>
     <div class="selected-hosts-info span4">
@@ -84,8 +88,10 @@
     </div>
     <div class="info">{{view.paginationInfo}}</div>
     <div class="paging_two_button">
-      <a {{bindAttr class="view.paginationLeftClass"}}{{action previousPage target="view"}}><i class="icon-arrow-left"></i></a>
-      <a {{bindAttr class="view.paginationRightClass"}}{{action nextPage target="view"}}><i class="icon-arrow-right"></i></a>
+      <a {{bindAttr class="view.paginationLeftClass"}}{{action previousPage target="view"}}><i
+              class="icon-arrow-left"></i></a>
+      <a {{bindAttr class="view.paginationRightClass"}}{{action nextPage target="view"}}><i
+              class="icon-arrow-right"></i></a>
     </div>
   </div>
 </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/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 1ed96dd..b728abe 100644
--- a/ambari-web/app/templates/main/service/services/hbase.hbs
+++ b/ambari-web/app/templates/main/service/services/hbase.hbs
@@ -17,33 +17,39 @@
 }}
 
 <!-- HBase Master Server -->
-  {{view view.dashboardMasterComponentView}}
+{{view view.dashboardMasterComponentView}}
 <!-- RegionServers -->
 <tr>
-  <td class="summary-label"><a href="#" {{action filterHosts view.regionServerComponent}}>{{t dashboard.services.hbase.regionServers}}</a>
+  <td class="summary-label"><a
+          href="#" {{action filterHosts view.regionServerComponent}}>{{t dashboard.services.hbase.regionServers}}</a>
   </td>
   <td>
-    <span>
-      {{#view App.ComponentLiveTextView liveComponentsBinding="view.service.regionServersStarted" totalComponentsBinding="view.service.regionServersTotal"}}
-        {{view.liveComponents}}/{{view.totalComponents}}
-      {{/view}}
-    </span>
+    {{#if App.router.clusterController.isComponentsStateLoaded}}
+      <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.noData}}
+    {{/if}}
   </td>
 </tr>
 <!-- PhoenixServers -->
 {{#if view.showPhoenixInfo}}
   <tr>
-      <td class="summary-label"><a href="#" {{action filterHosts view.phoenixServerComponent}}>{{t dashboard.services.hbase.phoenixServers}}</a>
-      </td>
-      <td>
+    <td class="summary-label"><a
+            href="#" {{action filterHosts view.phoenixServerComponent}}>{{t dashboard.services.hbase.phoenixServers}}</a>
+    </td>
+    <td>
       <span>
         {{#view App.ComponentLiveTextView liveComponentsBinding="view.service.phoenixServersStarted" totalComponentsBinding="view.service.phoenixServersTotal"}}
           {{view.liveComponents}}/{{view.totalComponents}}
         {{/view}}
       </span>
-        {{t services.service.summary.PhoenixServersLIVE}}
-      </td>
+      {{t services.service.summary.PhoenixServersLIVE}}
+    </td>
   </tr>
 {{/if}}
 <!-- Regions in Transition -->
@@ -53,31 +59,31 @@
 </tr>
 
 <!-- Divider-- make the remaining summary info on 2nd table-->
-    </tbody>
-  </table>
+</tbody>
+</table>
 </div>
 <div class="span6">
   <table class="summary-info table no-borders table-condensed">
     <tbody>
 
-<!-- HBase Master Started Time -->
-<tr>
-  <td class="summary-label">{{t dashboard.services.hbase.masterStarted}}</td>
-  <td>{{view.masterStartedTime}}</td>
-</tr>
-<!-- HBase Master Activated Time -->
-<tr>
-  <td class="summary-label">{{t dashboard.services.hbase.masterActivated}}</td>
-  <td>{{view.masterStartedTime}}</td>
-</tr>
-<!-- Average Load -->
-<tr>
-  <td class="summary-label">{{t dashboard.services.hbase.averageLoad}}</td>
-  <td>{{view.averageLoad}}</td>
-</tr>
-<!-- Master Server Heap -->
-<tr>
-  <td class="summary-label">{{t dashboard.services.hbase.masterServerHeap}}</td>
-  <td>{{view.masterServerHeapSummary}}</td>
-</tr>
+    <!-- HBase Master Started Time -->
+    <tr>
+      <td class="summary-label">{{t dashboard.services.hbase.masterStarted}}</td>
+      <td>{{view.masterStartedTime}}</td>
+    </tr>
+    <!-- HBase Master Activated Time -->
+    <tr>
+      <td class="summary-label">{{t dashboard.services.hbase.masterActivated}}</td>
+      <td>{{view.masterStartedTime}}</td>
+    </tr>
+    <!-- Average Load -->
+    <tr>
+      <td class="summary-label">{{t dashboard.services.hbase.averageLoad}}</td>
+      <td>{{view.averageLoad}}</td>
+    </tr>
+    <!-- Master Server Heap -->
+    <tr>
+      <td class="summary-label">{{t dashboard.services.hbase.masterServerHeap}}</td>
+      <td>{{view.masterServerHeapSummary}}</td>
+    </tr>
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/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 aac2379..1cbd082 100644
--- a/ambari-web/app/templates/main/service/services/hdfs.hbs
+++ b/ambari-web/app/templates/main/service/services/hdfs.hbs
@@ -19,14 +19,19 @@
 {{view view.dashboardMasterComponentView}}
 <!-- Data Nodes -->
 <tr>
-  <td class="summary-label"><a href="#" {{action filterHosts view.dataNodeComponent}}>{{t dashboard.services.hdfs.datanodes}}</a></td>
+  <td class="summary-label"><a
+          href="#" {{action filterHosts view.dataNodeComponent}}>{{t dashboard.services.hdfs.datanodes}}</a></td>
   <td>
-    <span>
-      {{#view App.ComponentLiveTextView liveComponentsBinding="view.service.dataNodesStarted" totalComponentsBinding="view.service.dataNodesTotal"}}
-        {{view.liveComponents}}/{{view.totalComponents}}
-      {{/view}}
-    </span>
+    {{#if App.router.clusterController.isComponentsStateLoaded}}
+      <span>
+        {{#view App.ComponentLiveTextView liveComponentsBinding="view.service.dataNodesStarted" totalComponentsBinding="view.service.dataNodesTotal"}}
+          {{view.liveComponents}}/{{view.totalComponents}}
+        {{/view}}
+      </span>
       {{t common.started}}
+    {{else}}
+      {{t common.noData}}
+    {{/if}}
   </td>
 </tr>
 <!-- Data Node Counts -->
@@ -36,38 +41,51 @@
     <td>{{t services.service.summary.notAvailable}}</td>
   {{else}}
     <td>
-      <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>
+      <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.showJournalNodes}}
   <tr>
-    <td class="summary-label"><a href="#" {{action filterHosts view.journalNodeComponent}}>{{t dashboard.services.hdfs.journalnodes}}</a>
+    <td class="summary-label"><a
+            href="#" {{action filterHosts view.journalNodeComponent}}>{{t dashboard.services.hdfs.journalnodes}}</a>
     </td>
     <td>
-      <span>
-        {{#view App.ComponentLiveTextView liveComponentsBinding="view.journalNodesLive" totalComponentsBinding="view.journalNodesTotal"}}
-          {{view.liveComponents}}/{{view.totalComponents}}
-        {{/view}}
-      </span>
+      {{#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.noData}}
+      {{/if}}
     </td>
   </tr>
 {{/if}}
 <!-- NFS Gateway -->
 {{#if view.isNfsInStack}}
   <tr>
-    <td class="summary-label"><a href="#" {{action filterHosts view.nfsGatewayComponent}}>{{t dashboard.services.hdfs.nfsgateways}}</a></td>
+    <td class="summary-label"><a
+            href="#" {{action filterHosts view.nfsGatewayComponent}}>{{t dashboard.services.hdfs.nfsgateways}}</a></td>
     <td>
-      <span>
-        {{#view App.ComponentLiveTextView liveComponentsBinding="view.service.nfsGatewaysStarted" totalComponentsBinding="view.service.nfsGatewaysTotal"}}
-          {{view.liveComponents}}/{{view.totalComponents}}
-        {{/view}}
-      </span>
-      {{t common.started}}
+      {{#if App.router.clusterController.isComponentsStateLoaded}}
+        <span>
+          {{#view App.ComponentLiveTextView liveComponentsBinding="view.service.nfsGatewaysStarted" totalComponentsBinding="view.service.nfsGatewaysTotal"}}
+            {{view.liveComponents}}/{{view.totalComponents}}
+          {{/view}}
+        </span>
+        {{t common.started}}
+      {{else}}
+        {{t common.noData}}
+      {{/if}}
     </td>
   </tr>
 {{/if}}
@@ -99,38 +117,38 @@
   <table class="summary-info table no-borders table-condensed">
     <tbody>
 
-<tr>
-  <td class="summary-label">{{t dashboard.services.hdfs.capacity.remaining}}</td>
-  <td>{{view.remainingDisk}}</td>
-</tr>
-<!-- Blocks Total -->
-<tr>
-  <td class="summary-label">{{t services.service.summary.blocksTotal}}</td>
-  <td>{{view.dfsTotalBlocks}}</td>
-</tr>
-<!-- Block Errors -->
-<tr>
-  <td class="summary-label">{{t services.service.summary.blockErrors}}</td>
-  <td>
-    {{view.blockErrorsMessage}}
-  </td>
-</tr>
-<!-- Total Files And Directories -->
-<tr>
-  <td class="summary-label">{{t dashboard.services.hdfs.totalFilesAndDirs}}</td>
-  <td>{{view.dfsTotalFiles}}</td>
-</tr>
-<!-- Upgrade Status -->
-<tr>
-  <td class="summary-label">{{t services.service.summary.pendingUpgradeStatus}}</td>
-  <td>
-    <span {{bindAttr class="view.isUpgradeStatusWarning:upgrade-status-warning"}}>{{view.upgradeStatus}}</span>
-  </td>
-</tr>
-<!-- Safe Mode Status -->
-<tr>
-  <td class="summary-label">{{t services.service.summary.safeModeStatus}}</td>
-  <td>
-    {{view.safeModeStatus}}
-  </td>
-</tr>
\ No newline at end of file
+    <tr>
+      <td class="summary-label">{{t dashboard.services.hdfs.capacity.remaining}}</td>
+      <td>{{view.remainingDisk}}</td>
+    </tr>
+    <!-- Blocks Total -->
+    <tr>
+      <td class="summary-label">{{t services.service.summary.blocksTotal}}</td>
+      <td>{{view.dfsTotalBlocks}}</td>
+    </tr>
+    <!-- Block Errors -->
+    <tr>
+      <td class="summary-label">{{t services.service.summary.blockErrors}}</td>
+      <td>
+        {{view.blockErrorsMessage}}
+      </td>
+    </tr>
+    <!-- Total Files And Directories -->
+    <tr>
+      <td class="summary-label">{{t dashboard.services.hdfs.totalFilesAndDirs}}</td>
+      <td>{{view.dfsTotalFiles}}</td>
+    </tr>
+    <!-- Upgrade Status -->
+    <tr>
+      <td class="summary-label">{{t services.service.summary.pendingUpgradeStatus}}</td>
+      <td>
+        <span {{bindAttr class="view.isUpgradeStatusWarning:upgrade-status-warning"}}>{{view.upgradeStatus}}</span>
+      </td>
+    </tr>
+    <!-- Safe Mode Status -->
+    <tr>
+      <td class="summary-label">{{t services.service.summary.safeModeStatus}}</td>
+      <td>
+        {{view.safeModeStatus}}
+      </td>
+    </tr>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/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 0439232..18b84d5 100644
--- a/ambari-web/app/templates/main/service/services/storm.hbs
+++ b/ambari-web/app/templates/main/service/services/storm.hbs
@@ -24,61 +24,66 @@
     </a>
   </td>
   <td>
-    <span>
-      {{#view App.ComponentLiveTextView liveComponentsBinding="view.superVisorsLive" totalComponentsBinding="view.superVisorsTotal"}}
-        {{view.liveComponents}}/{{view.totalComponents}}
-      {{/view}}
-    </span> {{t services.service.summary.SupervisorsLIVE}}
+    {{#if App.router.clusterController.isComponentsStateLoaded}}
+      <span>
+        {{#view App.ComponentLiveTextView liveComponentsBinding="view.superVisorsLive" totalComponentsBinding="view.superVisorsTotal"}}
+          {{view.liveComponents}}/{{view.totalComponents}}
+        {{/view}}
+      </span> {{t services.service.summary.SupervisorsLIVE}}
+    {{else}}
+      {{t common.noData}}
+    {{/if}}
   </td>
 </tr>
 
 <!-- Divider-- make the remaining summary info on 2nd table-->
-    </tbody>
-  </table>
+</tbody>
+</table>
 </div>
 <div class="span6">
   <table class="summary-info table no-borders table-condensed">
     <tbody>
 
-<tr>
-  <td class="summary-label">
-    {{t services.service.summary.storm.freeslots}}
-  </td>
-  <td>
-    {{formatNull view.service.freeSlots}} / {{formatNull view.service.totalSlots}} ({{formatNull view.freeSlotsPercentage empty="0"}}% {{t common.free}})
-  </td>
-</tr>
-<tr>
-  <td class="summary-label">
-    {{t services.service.summary.storm.tasks}}
-  </td>
-  <td>
-    {{formatNull view.service.totalTasks}}
-  </td>
-</tr>
-<tr>
-  <td class="summary-label">
-    {{t services.service.summary.storm.executors}}
-  </td>
-  <td>
-    {{formatNull view.service.totalExecutors}}
-  </td>
-</tr>
-<tr>
-  <td class="summary-label">
-    {{t services.service.summary.storm.topologies}}
-  </td>
-  <td>
-    {{formatNull view.service.topologies}}
-  </td>
-</tr>
-<tr>
-  <td class="summary-label">
-    {{t services.service.summary.storm.nimbus.uptime}}
-  </td>
-  <td>
-    {{view.nimbusUptimeFormatted}}
-  </td>
-</tr>
+    <tr>
+      <td class="summary-label">
+        {{t services.service.summary.storm.freeslots}}
+      </td>
+      <td>
+        {{formatNull view.service.freeSlots}} / {{formatNull view.service.totalSlots}}
+        ({{formatNull view.freeSlotsPercentage empty="0"}}% {{t common.free}})
+      </td>
+    </tr>
+    <tr>
+      <td class="summary-label">
+        {{t services.service.summary.storm.tasks}}
+      </td>
+      <td>
+        {{formatNull view.service.totalTasks}}
+      </td>
+    </tr>
+    <tr>
+      <td class="summary-label">
+        {{t services.service.summary.storm.executors}}
+      </td>
+      <td>
+        {{formatNull view.service.totalExecutors}}
+      </td>
+    </tr>
+    <tr>
+      <td class="summary-label">
+        {{t services.service.summary.storm.topologies}}
+      </td>
+      <td>
+        {{formatNull view.service.topologies}}
+      </td>
+    </tr>
+    <tr>
+      <td class="summary-label">
+        {{t services.service.summary.storm.nimbus.uptime}}
+      </td>
+      <td>
+        {{view.nimbusUptimeFormatted}}
+      </td>
+    </tr>
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/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 3413b19..c29bbcc 100644
--- a/ambari-web/app/templates/main/service/services/yarn.hbs
+++ b/ambari-web/app/templates/main/service/services/yarn.hbs
@@ -19,13 +19,18 @@
 
 <!-- NodeManagers -->
 <tr>
-  <td class="summary-label"><a href="#" {{action filterHosts view.nodeManagerComponent}}>{{t dashboard.services.yarn.nodeManagers}}</a></td>
+  <td class="summary-label"><a
+          href="#" {{action filterHosts view.nodeManagerComponent}}>{{t dashboard.services.yarn.nodeManagers}}</a></td>
   <td>
-    <span>
-      {{#view App.ComponentLiveTextView liveComponentsBinding="view.service.nodeManagersStarted" totalComponentsBinding="view.service.nodeManagersTotal"}}
-        {{view.liveComponents}}/{{view.totalComponents}}
-      {{/view}}
-    </span>{{t common.started}}
+    {{#if App.router.clusterController.isComponentsStateLoaded}}
+      <span>
+        {{#view App.ComponentLiveTextView liveComponentsBinding="view.service.nodeManagersStarted" totalComponentsBinding="view.service.nodeManagersTotal"}}
+          {{view.liveComponents}}/{{view.totalComponents}}
+        {{/view}}
+      </span>{{t common.started}}
+    {{else}}
+      {{t common.noData}}
+    {{/if}}
   </td>
 </tr>
 <!-- NodeManagers status -->
@@ -36,7 +41,7 @@
 <!-- YARN Clients -->
 <tr>
   <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>
+          href="javascript:void(null)">{{pluralize view.service.installedClients singular="t:dashboard.services.yarn.client" plural="t:dashboard.services.yarn.clients"}}</a>
   </td>
   <td>
     <span class="green-live">{{view.service.installedClients}} </span>
@@ -50,37 +55,37 @@
 </tr>
 
 <!-- Divider-- make the remaining summary info on 2nd table-->
-    </tbody>
-  </table>
+</tbody>
+</table>
 </div>
 <div class="span6">
   <table class="summary-info table no-borders table-condensed">
     <tbody>
 
-<!-- ResourceManager Heap -->
-<tr>
-  <td class="summary-label">{{t dashboard.services.resourceManager.nodes.heap}}</td>
-  <td>{{view.nodeHeap}}</td>
-</tr>
-<!-- Containers -->
-<tr>
-  <td class="summary-label">{{t dashboard.services.yarn.containers}}</td>
-  <td>{{view.containers}}</td>
-</tr>
-<!-- Applications -->
-<tr>
-  <td class="summary-label">{{t dashboard.services.yarn.apps}}</td>
-  <td>{{view.apps}}</td>
-</tr>
-<!-- Memory -->
-<tr>
-  <td class="summary-label">{{t dashboard.services.yarn.memory}}</td>
-  <td>{{view.memory}}</td>
-</tr>
-<!-- Queues -->
-<tr>
-  <td class="summary-label">{{t dashboard.services.yarn.queues}}</td>
-  <td><span rel="queue-tooltip"
-            class="text-tooltip" {{bindAttr data-original-title="view.service.queueFormatted" }}>{{view.queues}}</span>
-  </td>
-</tr>
+    <!-- ResourceManager Heap -->
+    <tr>
+      <td class="summary-label">{{t dashboard.services.resourceManager.nodes.heap}}</td>
+      <td>{{view.nodeHeap}}</td>
+    </tr>
+    <!-- Containers -->
+    <tr>
+      <td class="summary-label">{{t dashboard.services.yarn.containers}}</td>
+      <td>{{view.containers}}</td>
+    </tr>
+    <!-- Applications -->
+    <tr>
+      <td class="summary-label">{{t dashboard.services.yarn.apps}}</td>
+      <td>{{view.apps}}</td>
+    </tr>
+    <!-- Memory -->
+    <tr>
+      <td class="summary-label">{{t dashboard.services.yarn.memory}}</td>
+      <td>{{view.memory}}</td>
+    </tr>
+    <!-- Queues -->
+    <tr>
+      <td class="summary-label">{{t dashboard.services.yarn.queues}}</td>
+      <td><span rel="queue-tooltip"
+                class="text-tooltip" {{bindAttr data-original-title="view.service.queueFormatted" }}>{{view.queues}}</span>
+      </td>
+    </tr>

http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/ambari-web/app/utils/ajax/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js
index dd82b53..ef6cee3 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -1209,7 +1209,7 @@ var urls = {
     }
   },
   'cluster.load_cluster_name': {
-    'real': '/clusters',
+    'real': '/clusters?fields=Clusters/security_type',
     'mock': '/data/clusters/info.json'
   },
   'cluster.load_last_upgrade': {

http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/ambari-web/app/utils/components.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/components.js b/ambari-web/app/utils/components.js
index 6624ced..74f0a33 100644
--- a/ambari-web/app/utils/components.js
+++ b/ambari-web/app/utils/components.js
@@ -22,7 +22,7 @@ module.exports = {
     var self = this,
         componentName = component.get('componentName'),
         displayName = component.get('displayName');
-    this.createServiceComponent(componentName).done(function () {
+    this.updateAndCreateServiceComponent(componentName).done(function () {
       App.ajax.send({
         name: 'host.host_component.add_new_component',
         sender: self,
@@ -178,9 +178,29 @@ module.exports = {
    * @param componentName
    * @returns {*}
    */
-  createServiceComponent: function (componentName) {
+  updateAndCreateServiceComponent: function (componentName) {
+    var self = this;
     var dfd = $.Deferred();
-    if (App.serviceComponents.contains(componentName)) {
+    App.router.get('updateController').updateComponentsState(function() {
+      self.createServiceComponent(componentName, dfd);
+    });
+    return dfd.promise();
+  },
+
+  /**
+   *
+   * @param componentName
+   * @param dfd
+   * @returns {*}
+   */
+  createServiceComponent: function(componentName, dfd) {
+    var allServiceComponents = [];
+    var services = App.Service.find().mapProperty('serviceName');
+    services.forEach(function(_service){
+      var _serviceComponents = App.Service.find(_service).get('serviceComponents');
+      allServiceComponents = allServiceComponents.concat(_serviceComponents);
+    }, this);
+    if (allServiceComponents.contains(componentName)) {
       dfd.resolve();
     } else {
       App.ajax.send({
@@ -192,10 +212,7 @@ module.exports = {
         }
       }).complete(function () {
         dfd.resolve();
-        App.serviceComponents.push(componentName);
       });
     }
-    return dfd.promise();
   }
-
 };
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/ambari-web/app/utils/http_client.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/http_client.js b/ambari-web/app/utils/http_client.js
index ea05d18..6b94d81 100644
--- a/ambari-web/app/utils/http_client.js
+++ b/ambari-web/app/utils/http_client.js
@@ -166,7 +166,7 @@ App.HttpClient = Em.Object.create({
    * @param {Object} data - ajax data property
    * @param {App.ServerDataMapper} mapper - json processor
    * @param {callback} errorHandler
-   * @param {number} interval - frequecy request
+   * @param {number} interval - frequency request
    */
   post: function (url, data, mapper, errorHandler, interval) {
     this.get(url, data, mapper, errorHandler, interval);

http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/ambari-web/app/utils/updater.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/updater.js b/ambari-web/app/utils/updater.js
index 9dbd83f..dcff44e 100644
--- a/ambari-web/app/utils/updater.js
+++ b/ambari-web/app/utils/updater.js
@@ -104,7 +104,7 @@ App.updater = {
    * @param obj Object
    * @param name Method name
    * @param isWorking Property, which will be checked as a rule for working
-   * @param interval Interval between calls
+   * @param [interval] Interval between calls
    * @return {*}
    */
   run: function(obj, name, isWorking, interval){

http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/ambari-web/app/views/main/dashboard/widgets/datanode_live.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/widgets/datanode_live.js b/ambari-web/app/views/main/dashboard/widgets/datanode_live.js
index 123e653..49220f5 100644
--- a/ambari-web/app/views/main/dashboard/widgets/datanode_live.js
+++ b/ambari-web/app/views/main/dashboard/widgets/datanode_live.js
@@ -42,17 +42,29 @@ App.DataNodeUpView = App.TextDashboardWidgetView.extend({
   maxValue: 100,
 
   dataNodesLive: function () {
-    return this.get('model.metricsNotAvailable') ? Em.I18n.t('services.service.summary.notAvailable') : this.get('model.liveDataNodes.length');
+    if (!Em.isNone(this.get('model.liveDataNodes')) && !this.get('model.metricsNotAvailable')) {
+      return this.get('model.liveDataNodes.length');
+    } else {
+      return   Em.I18n.t('services.service.summary.notAvailable');
+    }
   }.property('model.liveDataNodes.length'),
   dataNodesDead: function () {
-    return this.get('model.metricsNotAvailable') ? Em.I18n.t('services.service.summary.notAvailable') : this.get('model.deadDataNodes.length');
+    if (!Em.isNone(this.get('model.deadDataNodes')) && !this.get('model.metricsNotAvailable')) {
+      return this.get('model.deadDataNodes.length');
+    } else {
+      return   Em.I18n.t('services.service.summary.notAvailable');
+    }
   }.property('model.deadDataNodes.length'),
   dataNodesDecom: function () {
-    return this.get('model.metricsNotAvailable') ? Em.I18n.t('services.service.summary.notAvailable') : this.get('model.decommissionDataNodes.length');
+    if (!Em.isNone(this.get('model.decommissionDataNodes')) && !this.get('model.metricsNotAvailable')) {
+      return this.get('model.decommissionDataNodes.length');
+    } else {
+      return   Em.I18n.t('services.service.summary.notAvailable');
+    }
   }.property('model.decommissionDataNodes.length'),
 
   data: function () {
-    if (this.get('model.metricsNotAvailable')) {
+    if (Em.isNone(this.get('model.liveDataNodes')) || Em.isNone(this.get('model.dataNodesTotal')) || this.get('model.metricsNotAvailable')) {
       return null;
     } else {
       return ((this.get('dataNodesLive') / this.get('model.dataNodesTotal')).toFixed(2)) * 100;
@@ -60,7 +72,11 @@ App.DataNodeUpView = App.TextDashboardWidgetView.extend({
   }.property('model.dataNodesTotal', 'dataNodesLive'),
 
   content: function () {
-    return this.get('model.metricsNotAvailable') ? Em.I18n.t('services.service.summary.notAvailable') : this.get('dataNodesLive') + "/" + this.get('model.dataNodesTotal');
+    if (Em.isNone(this.get('model.liveDataNodes')) || Em.isNone(this.get('model.dataNodesTotal')) || this.get('model.metricsNotAvailable')) {
+      return  Em.I18n.t('services.service.summary.notAvailable');
+    } else {
+      return this.get('dataNodesLive') + "/" + this.get('model.dataNodesTotal');
+    }
   }.property('model.dataNodesTotal', 'dataNodesLive'),
 
   editWidget: function (event) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/ambari-web/app/views/main/dashboard/widgets/node_managers_live.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/widgets/node_managers_live.js b/ambari-web/app/views/main/dashboard/widgets/node_managers_live.js
index e2ad245..9b12abf 100644
--- a/ambari-web/app/views/main/dashboard/widgets/node_managers_live.js
+++ b/ambari-web/app/views/main/dashboard/widgets/node_managers_live.js
@@ -46,6 +46,10 @@ App.NodeManagersLiveView = App.TextDashboardWidgetView.extend({
   thresh2: 70,
   maxValue: 100,
 
+  isDataAvailable: function() {
+    return !this.get('model.metricsNotAvailable') &&  App.get('router.clusterController.isComponentsStateLoaded');
+  }.property('App.router.clusterController.isComponentsStateLoaded'),
+
   nodeManagersLive: function () {
     return this.get('model.nodeManagersCountActive');
   }.property('model.nodeManagersCountActive'),
@@ -53,7 +57,7 @@ App.NodeManagersLiveView = App.TextDashboardWidgetView.extend({
   data: function () {
     var nodeManagers = this.get('model.nodeManagersTotal');
     var nodeManagersLive = this.get('nodeManagersLive');
-    if (nodeManagersLive == null) {
+    if (nodeManagersLive == null || !nodeManagers) {
       return null;
     } else {
       return (nodeManagersLive / nodeManagers).toFixed(2) * 100;
@@ -61,7 +65,7 @@ App.NodeManagersLiveView = App.TextDashboardWidgetView.extend({
   }.property('model.nodeManagersTotal', 'nodeManagersLive'),
 
   content: function () {
-    return this.get('nodeManagersLive') == null ? Em.I18n.t('services.service.summary.notAvailable') : this.get('nodeManagersLive') + '/' + this.get('model.nodeManagersTotal');
+    return this.get('nodeManagersLive') == null || !this.get('model.nodeManagersTotal') ? Em.I18n.t('services.service.summary.notAvailable') : this.get('nodeManagersLive') + '/' + this.get('model.nodeManagersTotal');
   }.property('model.nodeManagersTotal', 'nodeManagersLive'),
 
   editWidget: function (event) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/ambari-web/app/views/main/dashboard/widgets/supervisor_live.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/widgets/supervisor_live.js b/ambari-web/app/views/main/dashboard/widgets/supervisor_live.js
index 79a0cb0..4f33242 100644
--- a/ambari-web/app/views/main/dashboard/widgets/supervisor_live.js
+++ b/ambari-web/app/views/main/dashboard/widgets/supervisor_live.js
@@ -53,7 +53,7 @@ App.SuperVisorUpView = App.TextDashboardWidgetView.extend({
   }.property('model.superVisorsTotal'),
 
   data: function () {
-    if ( !this.get('superVisorsTotal')) {
+    if ( !this.get('superVisorsTotal') || Em.isNone(this.get('superVisorsLive'))) {
       return -1;
     } else {
       return ((this.get('superVisorsLive') / this.get('superVisorsTotal')).toFixed(2)) * 100;
@@ -61,7 +61,11 @@ App.SuperVisorUpView = App.TextDashboardWidgetView.extend({
   }.property('superVisorsTotal', 'superVisorsLive'),
 
   content: function () {
-    return this.get('superVisorsLive') + "/" + this.get('superVisorsTotal');
+    if (!Em.isNone(this.get('superVisorsTotal')) && !Em.isNone(this.get('superVisorsLive'))) {
+      return this.get('superVisorsLive') + "/" + this.get('superVisorsTotal');
+    } else {
+      return Em.I18n.t('services.service.summary.notAvailable');
+    }
   }.property('superVisorsLive', 'superVisorsTotal'),
 
   editWidget: function (event) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/ambari-web/app/views/main/host/details/host_component_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host/details/host_component_view.js b/ambari-web/app/views/main/host/details/host_component_view.js
index fece46d..00c10a0 100644
--- a/ambari-web/app/views/main/host/details/host_component_view.js
+++ b/ambari-web/app/views/main/host/details/host_component_view.js
@@ -207,7 +207,7 @@ App.HostComponentView = Em.View.extend({
    */
   isDeleteComponentDisabled: function () {
     var stackComponentCount = App.StackServiceComponent.find(this.get('hostComponent.componentName')).get('minToInstall');
-    var installedCount = this.componentCounter();
+    var installedCount = this.get('componentCounter');
     return (installedCount <= stackComponentCount)
       || ![App.HostComponentStatus.stopped, App.HostComponentStatus.unknown, App.HostComponentStatus.install_failed, App.HostComponentStatus.upgrade_failed, App.HostComponentStatus.init].contains(this.get('workStatus'));
   }.property('workStatus'),
@@ -217,10 +217,20 @@ App.HostComponentView = Em.View.extend({
    * @returns {Number}
    */
   componentCounter: function() {
-    return App.StackServiceComponent.find(this.get('hostComponent.componentName')).get('isMaster')
-      ? App.HostComponent.find().filterProperty('componentName', this.get('content.componentName')).length
-      : App.SlaveComponent.find().findProperty('componentName', this.get('content.componentName')).get('totalCount');
-  },
+    var componentCounter = 0;
+    var stackServiceComponent =  App.StackServiceComponent.find(this.get('hostComponent.componentName'));
+    if (stackServiceComponent && App.get('router.clusterController.isHostContentLoaded')) {
+      if (stackServiceComponent.get('isMaster')) {
+          componentCounter = App.HostComponent.find().filterProperty('componentName', this.get('content.componentName')).length
+      } else {
+        var slaveComponent = App.SlaveComponent.find().findProperty('componentName', this.get('content.componentName'));
+        if (slaveComponent) {
+          componentCounter = slaveComponent.get('totalCount');
+        }
+      }
+    }
+    return componentCounter;
+  }.property('App.router.clusterController.isHostContentLoaded'),
 
   /**
    * Gets number of current running components that are applied to the cluster
@@ -381,7 +391,7 @@ App.HostComponentView = Em.View.extend({
 
     if (component.get('cardinality') !== '1') {
       if (!this.get('isStart')) {
-        if (this.componentCounter() > 1) {
+        if (this.get('componentCounter') > 1) {
           if (this.runningComponentCounter()) {
             return false;
           }

http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/ambari-web/app/views/main/host/summary.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host/summary.js b/ambari-web/app/views/main/host/summary.js
index 085ec9f..06e3d09 100644
--- a/ambari-web/app/views/main/host/summary.js
+++ b/ambari-web/app/views/main/host/summary.js
@@ -276,19 +276,23 @@ App.MainHostSummaryView = Em.View.extend({
   addableComponents: function () {
     var components = [];
     var self = this;
-    var installedComponents = this.get('content.hostComponents').mapProperty('componentName');
-    var addableToHostComponents = App.StackServiceComponent.find().filterProperty('isAddableToHost');
-    var installedServices = this.get('installedServices');
-
-    addableToHostComponents.forEach(function(addableComponent) {
-      if(installedServices.contains(addableComponent.get('serviceName')) && !installedComponents.contains(addableComponent.get('componentName'))) {
-        if ((addableComponent.get('componentName') === 'OOZIE_SERVER') && !App.router.get('mainHostDetailsController.isOozieServerAddable')) {
-          return;
+    if (this.get('content.hostComponents')) {
+      var installedComponents = this.get('content.hostComponents').mapProperty('componentName');
+      var addableToHostComponents = App.StackServiceComponent.find().filterProperty('isAddableToHost');
+      var installedServices = this.get('installedServices');
+
+      addableToHostComponents.forEach(function (addableComponent) {
+        if (installedServices.contains(addableComponent.get('serviceName')) && !installedComponents.contains(addableComponent.get('componentName'))) {
+          if ((addableComponent.get('componentName') === 'OOZIE_SERVER') && !App.router.get('mainHostDetailsController.isOozieServerAddable')) {
+            return;
+          }
+          components.pushObject(self.addableComponentObject.create({
+            'componentName': addableComponent.get('componentName'),
+            'serviceName': addableComponent.get('serviceName')
+          }));
         }
-        components.pushObject(self.addableComponentObject.create({'componentName': addableComponent.get('componentName'), 'serviceName': addableComponent.get('serviceName')}));
-      }
-    });
-
+      });
+    }
     return components;
   }.property('content.hostComponents.length', 'installableClientComponents', 'App.components.addableToHost.@each'),
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/ambari-web/app/views/main/service/info/configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/configs.js b/ambari-web/app/views/main/service/info/configs.js
index f51baa0..9e73164 100644
--- a/ambari-web/app/views/main/service/info/configs.js
+++ b/ambari-web/app/views/main/service/info/configs.js
@@ -24,7 +24,10 @@ App.MainServiceInfoConfigsView = Em.View.extend({
   templateName: require('templates/main/service/info/configs'),
 
   didInsertElement: function () {
-    this.get('controller').loadStep();
+    var self = this;
+    App.router.get('mainController').isLoading.call(App.router.get('clusterController'), 'isConfigsPropertiesLoaded').done(function () {
+      self.get('controller').loadStep();
+    });
   },
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/ambari-web/app/views/main/service/reassign/step5_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/reassign/step5_view.js b/ambari-web/app/views/main/service/reassign/step5_view.js
index b08df7b..cc7805f 100644
--- a/ambari-web/app/views/main/service/reassign/step5_view.js
+++ b/ambari-web/app/views/main/service/reassign/step5_view.js
@@ -56,7 +56,7 @@ App.ReassignMasterWizardStep5View = Em.View.extend({
     if(!hasSecureConfigs) {
       secureConfigs = [];
     }
-    if (!this.get('controller.content.securityEnabled') || !secureConfigs.length) {
+    if (!App.get('isKerberosEnabled') || !secureConfigs.length) {
       return proceedMsg;
     }
     var formattedText = '<ul>';
@@ -66,5 +66,5 @@ App.ReassignMasterWizardStep5View = Em.View.extend({
     }, this);
     formattedText += '</ul>';
     return Em.I18n.t('services.reassign.step5.body.securityNotice').format(formattedText) + proceedMsg;
-  }.property('controller.content.securityEnabled', 'controller.content.secureConfigs', 'controller.content.reassignHosts.target')
+  }.property('App.isKerberosEnabled','controller.content.secureConfigs', 'controller.content.reassignHosts.target')
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/ambari-web/test/controllers/global/cluster_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/global/cluster_controller_test.js b/ambari-web/test/controllers/global/cluster_controller_test.js
index f734dff..e6a18a0 100644
--- a/ambari-web/test/controllers/global/cluster_controller_test.js
+++ b/ambari-web/test/controllers/global/cluster_controller_test.js
@@ -201,123 +201,6 @@ describe('App.clusterController', function () {
     });
   });
 
-  describe('#setGangliaUrl()', function () {
-    beforeEach(function () {
-      controller.set('gangliaUrl', null);
-    });
-
-    it('testMode = true', function () {
-      App.testMode = true;
-      controller.setGangliaUrl();
-      expect(controller.get('gangliaUrl')).to.equal('http://gangliaserver/ganglia/?t=yes');
-      expect(controller.get('isGangliaUrlLoaded')).to.be.true;
-    });
-    it('Cluster is not loaded', function () {
-      App.testMode = false;
-      controller.set('isLoaded', false);
-      controller.setGangliaUrl();
-      expect(controller.get('gangliaUrl')).to.equal(null);
-    });
-    it('GANGLIA_SERVER component is absent', function () {
-      controller.set('isLoaded', true);
-      App.testMode = false;
-      sinon.stub(App.HostComponent, 'find', function(){
-        return [];
-      });
-      controller.setGangliaUrl();
-      expect(controller.get('gangliaUrl')).to.equal(null);
-      App.HostComponent.find.restore();
-    });
-    it('Ganglia Server host is "GANGLIA_host"', function () {
-      controller.set('isLoaded', true);
-      App.testMode = false;
-      sinon.stub(App.HostComponent, 'find', function(){
-        return [Em.Object.create({
-          componentName: 'GANGLIA_SERVER',
-          hostName: 'GANGLIA_host'
-        })];
-      });
-      sinon.spy(App.ajax, 'send');
-
-      controller.setGangliaUrl();
-      expect(App.ajax.send.calledOnce).to.be.true;
-      expect(controller.get('isGangliaUrlLoaded')).to.be.false;
-
-      App.HostComponent.find.restore();
-      App.ajax.send.restore();
-    });
-  });
-
-  describe('#gangliaWebProtocol', function () {
-    var testCases = [
-      {
-        title: 'if ambariProperties is null then gangliaWebProtocol should be "http"',
-        data: null,
-        result: 'http'
-      },
-      {
-        title: 'if ambariProperties is empty object then gangliaWebProtocol should be "http"',
-        data: {},
-        result: 'http'
-      },
-      {
-        title: 'if ganglia.https is false then gangliaWebProtocol should be "http"',
-        data: {'ganglia.https': false},
-        result: 'http'
-      },
-      {
-        title: 'if ganglia.https is true then gangliaWebProtocol should be "http"',
-        data: {'ganglia.https': true},
-        result: 'https'
-      }
-    ];
-
-    testCases.forEach(function (test) {
-      it(test.title, function () {
-        controller.set('ambariProperties', test.data);
-        expect(controller.get('gangliaWebProtocol')).to.equal(test.result);
-      });
-    });
-  });
-
-
-  describe('#setGangliaUrlSuccessCallback()', function () {
-
-    it('Query return no hosts', function () {
-      controller.setGangliaUrlSuccessCallback({items: []});
-      expect(controller.get('gangliaUrl')).to.equal(null);
-      expect(controller.get('isGangliaUrlLoaded')).to.be.true;
-    });
-    it('App.singleNodeInstall is true', function () {
-      controller.reopen({
-        gangliaWebProtocol: 'http'
-      });
-      App.set('singleNodeInstall', true);
-      App.set('singleNodeAlias', 'localhost');
-      controller.setGangliaUrlSuccessCallback({items: [{
-        Hosts: {
-          public_host_name: 'host1'
-        }
-      }]});
-      expect(controller.get('gangliaUrl')).to.equal('http://localhost:42080/ganglia');
-      expect(controller.get('isGangliaUrlLoaded')).to.be.true;
-    });
-    it('App.singleNodeInstall is false', function () {
-      controller.reopen({
-        gangliaWebProtocol: 'http'
-      });
-      App.set('singleNodeInstall', false);
-      App.set('singleNodeAlias', 'localhost');
-      controller.setGangliaUrlSuccessCallback({items: [{
-        Hosts: {
-          public_host_name: 'host1'
-        }
-      }]});
-      expect(controller.get('gangliaUrl')).to.equal('http://host1/ganglia');
-      expect(controller.get('isGangliaUrlLoaded')).to.be.true;
-    });
-  });
-
   describe("#createKerberosAdminSession()", function() {
     before(function () {
       sinon.stub(App.ajax, 'send', function() {

http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/ambari-web/test/controllers/main/admin/kerberos/step4_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/admin/kerberos/step4_controller_test.js b/ambari-web/test/controllers/main/admin/kerberos/step4_controller_test.js
index e52d8a5..e4abd82 100644
--- a/ambari-web/test/controllers/main/admin/kerberos/step4_controller_test.js
+++ b/ambari-web/test/controllers/main/admin/kerberos/step4_controller_test.js
@@ -284,7 +284,7 @@ describe('App.KerberosWizardStep4Controller', function() {
 
   describe('#loadStep', function() {
 
-    describe('skip "Configure Identities" step', function() {
+    describe('skip "Configure Identities" step. ', function() {
       beforeEach(function() {
         this.controller = App.KerberosWizardStep4Controller.create({});
         this.wizardController = App.AddServiceController.create({});
@@ -305,7 +305,7 @@ describe('App.KerberosWizardStep4Controller', function() {
       var tests = [
         {
           securityEnabled: true,
-          stepSkipped: false,
+          stepSkipped: false
         },
         {
           securityEnabled: false,
@@ -314,10 +314,10 @@ describe('App.KerberosWizardStep4Controller', function() {
       ];
 
       tests.forEach(function(test) {
-        it('security {0} configure identities step should be {1}'.format(!!test.securityEnabled ? 'enabled' : 'disabled', !!test.stepSkipped ? 'skipped' : 'not skipped'), function() {
-          sinon.stub(App.router, 'get').withArgs('mainAdminKerberosController.securityEnabled').returns(test.securityEnabled);
+        it('Security {0} configure identities step should be {1}'.format(!!test.securityEnabled ? 'enabled' : 'disabled', !!test.stepSkipped ? 'skipped' : 'not skipped'), function() {
+          sinon.stub(App, 'get').withArgs('isKerberosEnabled').returns(test.securityEnabled);
           this.wizardController.checkSecurityStatus();
-          App.router.get.restore();
+          App.get.restore();
           this.controller.loadStep();
           expect(App.router.send.calledWith('next')).to.be.eql(test.stepSkipped);
         });

http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/ambari-web/test/controllers/main/host/details_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/host/details_test.js b/ambari-web/test/controllers/main/host/details_test.js
index cd35981..f9c48cf 100644
--- a/ambari-web/test/controllers/main/host/details_test.js
+++ b/ambari-web/test/controllers/main/host/details_test.js
@@ -32,7 +32,8 @@ describe('App.MainHostDetailsController', function () {
 
   beforeEach(function () {
     sinon.stub(App.ajax, 'send').returns({
-      then: Em.K
+      then: Em.K,
+      complete: Em.K
     });
     controller = App.MainHostDetailsController.create({
       content: Em.Object.create()
@@ -578,6 +579,26 @@ describe('App.MainHostDetailsController', function () {
   });
 
   describe('#primary()', function () {
+    beforeEach(function () {
+      sinon.stub(App.StackServiceComponent, 'find', function () {
+        return [
+          Em.Object.create({
+            componentName: 'COMP1',
+            serviceName: 's1'
+          })
+        ]
+      });
+      sinon.stub(App.router, "get").withArgs('updateController').returns({
+        updateComponentsState: function(callback) {
+          return callback();
+        }
+      });
+    });
+    afterEach(function () {
+      App.router.get.restore();
+      App.StackServiceComponent.find.restore();
+    });
+
     it('Query should be sent', function () {
       var component = Em.Object.create({
         componentName: 'COMP1',

http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/ambari-web/test/controllers/main/service/add_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/service/add_controller_test.js b/ambari-web/test/controllers/main/service/add_controller_test.js
index 40f437c..bb30ac5 100644
--- a/ambari-web/test/controllers/main/service/add_controller_test.js
+++ b/ambari-web/test/controllers/main/service/add_controller_test.js
@@ -453,12 +453,12 @@ describe('App.AddServiceController', function() {
     });
 
     afterEach(function () {
-      App.router.get.restore();
+      App.get.restore();
     });
 
     cases.forEach(function (item) {
       it(item.title, function () {
-        sinon.stub(App.router, 'get').withArgs('mainAdminKerberosController.securityEnabled').returns(item.securityEnabled);
+        sinon.stub(App, 'get').withArgs('isKerberosEnabled').returns(item.securityEnabled);
         addServiceController.checkSecurityStatus();
         expect(addServiceController.get('skipConfigureIdentitiesStep')).to.equal(item.skipConfigureIdentitiesStep);
         expect(addServiceController.get('isStepDisabled').findProperty('step', 5).get('value')).to.equal(item.isStep5Disabled);

http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/ambari-web/test/controllers/main/service/item_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/service/item_test.js b/ambari-web/test/controllers/main/service/item_test.js
index b6e969b..46e7512 100644
--- a/ambari-web/test/controllers/main/service/item_test.js
+++ b/ambari-web/test/controllers/main/service/item_test.js
@@ -146,13 +146,11 @@ describe('App.MainServiceItemController', function () {
 
       beforeEach(function () {
         sinon.stub(reassignMasterController, 'saveComponentToReassign', Em.K);
-        sinon.stub(reassignMasterController, 'getSecurityStatus', Em.K);
         sinon.stub(reassignMasterController, 'setCurrentStep', Em.K);
       });
 
       afterEach(function () {
         reassignMasterController.saveComponentToReassign.restore();
-        reassignMasterController.getSecurityStatus.restore();
         reassignMasterController.setCurrentStep.restore();
       });
 
@@ -168,7 +166,6 @@ describe('App.MainServiceItemController', function () {
         });
         mainServiceItemController.reassignMaster(test.componentName);
         expect(reassignMasterController.saveComponentToReassign.calledOnce).to.equal(test.result);
-        expect(reassignMasterController.getSecurityStatus.calledOnce).to.equal(test.result);
         expect(reassignMasterController.setCurrentStep.calledOnce).to.equal(test.result);
         App.HostComponent.find.restore();
         App.router.transitionTo.restore();

http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js b/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js
index 849af6e..7a7b576 100644
--- a/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js
+++ b/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js
@@ -897,34 +897,37 @@ describe('App.ReassignMasterWizardStep4Controller', function () {
   describe('#setSecureConfigs()', function () {
     it('undefined component and security disabled', function () {
       var secureConfigs = [];
-      controller.set('content.securityEnabled', false);
-      controller.set('secureConfigsMap', []);
-      expect(controller.setSecureConfigs(secureConfigs, {}, 'COMP1')).to.be.false;
-      expect(secureConfigs).to.eql([]);
-    });
-    it('undefined component and security enabled', function () {
-      var secureConfigs = [];
-      controller.set('content.securityEnabled', true);
+      sinon.stub(App, 'get').withArgs('isKerberosEnabled').returns(false);
       controller.set('secureConfigsMap', []);
       expect(controller.setSecureConfigs(secureConfigs, {}, 'COMP1')).to.be.false;
       expect(secureConfigs).to.eql([]);
+      App.get.restore();
     });
     it('component exist and security disabled', function () {
       var secureConfigs = [];
-      controller.set('content.securityEnabled', false);
+      sinon.stub(App, 'get').withArgs('isKerberosEnabled').returns(false);
       controller.set('secureConfigsMap', [{
         componentName: 'COMP1'
       }]);
       expect(controller.setSecureConfigs(secureConfigs, {}, 'COMP1')).to.be.false;
       expect(secureConfigs).to.eql([]);
+      App.get.restore();
+    });
+    it('undefined component and security enabled', function () {
+      var secureConfigs = [];
+      sinon.stub(App, 'get').withArgs('isKerberosEnabled').returns(true);
+      controller.set('secureConfigsMap', []);
+      expect(controller.setSecureConfigs(secureConfigs, {}, 'COMP1')).to.be.false;
+      expect(secureConfigs).to.eql([]);
+      App.get.restore();
     });
     it('component exist and security enabled', function () {
       var secureConfigs = [];
+      sinon.stub(App, 'get').withArgs('isKerberosEnabled').returns(true);
       var configs = {'s1': {
         'k1': 'kValue',
         'p1': 'pValue'
       }};
-      controller.set('content.securityEnabled', true);
       controller.set('secureConfigsMap', [{
         componentName: 'COMP1',
         configs: [{
@@ -940,6 +943,7 @@ describe('App.ReassignMasterWizardStep4Controller', function () {
           "principal": "pValue"
         }
       ]);
+      App.get.restore();
     });
   });
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/ambari-web/test/controllers/main/service_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/service_test.js b/ambari-web/test/controllers/main/service_test.js
index 7068112..0b3b40c 100644
--- a/ambari-web/test/controllers/main/service_test.js
+++ b/ambari-web/test/controllers/main/service_test.js
@@ -141,7 +141,7 @@ describe('App.MainServiceController', function () {
     ]).forEach(function(test) {
         it(test.m, function() {
           sinon.stub(App.router, 'get', function(k) {
-            if ('clusterController.isLoaded' === k) return test.isLoaded;
+            if ('clusterController.isClusterDataLoaded' === k) return test.isLoaded;
             return Em.get(App.router, k);
           });
           sinon.stub(App.Cluster, 'find', function() {

http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/ambari-web/test/controllers/wizard/step8_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/wizard/step8_test.js b/ambari-web/test/controllers/wizard/step8_test.js
index a869663..c7cf64a 100644
--- a/ambari-web/test/controllers/wizard/step8_test.js
+++ b/ambari-web/test/controllers/wizard/step8_test.js
@@ -1459,6 +1459,7 @@ describe('App.WizardStep8Controller', function () {
     });
     afterEach(function() {
       installerStep8Controller.submitProceed.restore();
+      App.set('isKerberosEnabled', false);
       App.get('router.mainAdminKerberosController').getKDCSessionState.restore();
     });
     Em.A([
@@ -1479,7 +1480,8 @@ describe('App.WizardStep8Controller', function () {
         }
       ]).forEach(function (test) {
         it(test.controllerName + ' Kerberos enabled - ' + test.securityEnabled.toString() + ' manual kerberos - ' + test.isManualKerberos, function () {
-          installerStep8Controller.reopen({isSubmitDisabled: false, securityEnabled: test.securityEnabled, isManualKerberos: test.isManualKerberos, content: {controllerName: test.controllerName}});
+          App.set('isKerberosEnabled', test.securityEnabled);
+          installerStep8Controller.reopen({isSubmitDisabled: false, isManualKerberos: test.isManualKerberos, content: {controllerName: test.controllerName}});
           installerStep8Controller.submit();
           if (test.securityEnabled) {
             if (test.isManualKerberos) {
@@ -2333,6 +2335,7 @@ describe('App.WizardStep8Controller', function () {
       ];
 
     beforeEach(function () {
+      sinon.stub(App, 'get').withArgs('isKerberosEnabled').returns(false);
       stubbedNames.forEach(function (name) {
         sinon.stub(installerStep8Controller, name, Em.K);
       });
@@ -2345,6 +2348,7 @@ describe('App.WizardStep8Controller', function () {
     });
 
     afterEach(function () {
+      App.get.restore();
       stubbedNames.forEach(function (name) {
         installerStep8Controller[name].restore();
       });

http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/ambari-web/test/mixins/wizard/wizardProgressPageController_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/mixins/wizard/wizardProgressPageController_test.js b/ambari-web/test/mixins/wizard/wizardProgressPageController_test.js
index f0a46cb..a9b8822 100644
--- a/ambari-web/test/mixins/wizard/wizardProgressPageController_test.js
+++ b/ambari-web/test/mixins/wizard/wizardProgressPageController_test.js
@@ -26,7 +26,14 @@ describe('App.wizardProgressPageControllerMixin', function() {
     beforeEach(function() {
       mixedObjectInstance = mixedObject.create({});
       sinon.stub(App.ajax, 'send', function(params) {
-        return params;
+        return $.extend(params,{complete: function(callback){
+          callback();
+        }});
+      });
+      sinon.stub(require('utils/components'), "updateAndCreateServiceComponent").returns({
+        done: function(callback) {
+          return callback();
+        }
       });
       sinon.spy(mixedObjectInstance, 'onCreateComponent');
       sinon.spy(mixedObjectInstance, 'updateComponent');
@@ -63,6 +70,7 @@ describe('App.wizardProgressPageControllerMixin', function() {
     afterEach(function() {
       App.ajax.send.restore();
       App.StackServiceComponent.find.restore();
+      require('utils/components').updateAndCreateServiceComponent.restore();
       mixedObjectInstance.onCreateComponent.restore();
       mixedObjectInstance.updateComponent.restore();
       mixedObjectInstance.checkInstalledComponents.restore();
@@ -81,6 +89,7 @@ describe('App.wizardProgressPageControllerMixin', function() {
     it('no ZooKeeper Servers installed. install on host1, host2. ajax request should be called with appropriate params', function() {
       mixedObjectInstance.createComponent('ZOOKEEPER_SERVER', ['host1', 'host2'], 'ZOOKEEPER');
       var args = App.ajax.send.args[0][0];
+
       var queryObject = JSON.parse(args.data.data);
       expect(args.data.hostName).to.be.eql(['host1', 'host2']);
       expect(queryObject.RequestInfo.query).to.be.eql('Hosts/host_name=host1|Hosts/host_name=host2');

http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/ambari-web/test/router_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/router_test.js b/ambari-web/test/router_test.js
index f5c66a3..1a1e43c 100644
--- a/ambari-web/test/router_test.js
+++ b/ambari-web/test/router_test.js
@@ -24,26 +24,24 @@ describe('App.Router', function () {
   var router = App.Router.create();
 
   describe('#loginSuccessCallback()', function() {
-    it('should log in user and load views', function () {
-      var mainViewsControllerMock = Em.Object.create({
-        loadAmbariViews: sinon.stub()
-      });
-      var userName = 'test';
+
+    beforeEach(function () {
       sinon.stub(App.usersMapper, 'map');
       sinon.stub(router, 'setUserLoggedIn');
-      sinon.stub(App.router, 'get').withArgs('mainViewsController').returns(mainViewsControllerMock);
       sinon.stub(App.ajax, 'send');
+    });
 
-      router.loginSuccessCallback({},{},{loginName: userName});
-
-      expect(mainViewsControllerMock.loadAmbariViews.calledOnce).to.be.true;
-      expect(router.setUserLoggedIn.calledOnce).to.be.true;
-      expect(router.setUserLoggedIn.calledWith(userName)).to.be.true;
-
+    afterEach(function() {
       App.usersMapper.map.restore();
       router.setUserLoggedIn.restore();
-      App.router.get.restore();
       App.ajax.send.restore();
+    });
+
+    it('should log in user and load views', function () {
+      var userName = 'test';
+      router.loginSuccessCallback({},{},{loginName: userName});
+      expect(router.setUserLoggedIn.calledOnce).to.be.true;
+      expect(router.setUserLoggedIn.calledWith(userName)).to.be.true;
     })
   });
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/ambari-web/test/views/main/dashboard/widgets/node_managers_live_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/main/dashboard/widgets/node_managers_live_test.js b/ambari-web/test/views/main/dashboard/widgets/node_managers_live_test.js
index 3f7a4ac..cd1c150 100644
--- a/ambari-web/test/views/main/dashboard/widgets/node_managers_live_test.js
+++ b/ambari-web/test/views/main/dashboard/widgets/node_managers_live_test.js
@@ -25,6 +25,14 @@ require('views/main/dashboard/widgets/node_managers_live');
 
 describe('App.NodeManagersLiveView', function() {
 
+  beforeEach(function () {
+    sinon.stub(App, 'get').withArgs('router.clusterController.isComponentsStateLoaded').returns(true);
+  });
+
+  afterEach(function () {
+    App.get.restore();
+  });
+
   var tests = [
     {
       model: {
@@ -71,7 +79,7 @@ describe('App.NodeManagersLiveView', function() {
   ];
 
   tests.forEach(function(test) {
-    describe('nodeManagerNodes length - ' + test.model.nodeManagersTotal + ' | nodeManagerLiveNodes length - ' + test.model.nodeManagerLiveNodes, function() {
+    describe('nodeManagersTotal length - ' + test.model.nodeManagersTotal + ' | nodeManagerLiveNodes length - ' + test.model.nodeManagerLiveNodes, function() {
       var AppNodeManagersLiveView = App.NodeManagersLiveView.extend({nodeManagersLive: test.model.nodeManagerLiveNodes});
       var nodeManagersLiveView = AppNodeManagersLiveView.create({model_type:null, model: test.model});
       it('content', function() {

http://git-wip-us.apache.org/repos/asf/ambari/blob/508d8db4/ambari-web/test/views/main/host/details/host_component_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/main/host/details/host_component_view_test.js b/ambari-web/test/views/main/host/details/host_component_view_test.js
index e0dcb40..2ddc5e4 100644
--- a/ambari-web/test/views/main/host/details/host_component_view_test.js
+++ b/ambari-web/test/views/main/host/details/host_component_view_test.js
@@ -36,6 +36,7 @@ describe('App.HostComponentView', function() {
       return Em.get(App.router, k);
     });
     hostComponentView = App.HostComponentView.create({
+      componentCounter: 1,
       startBlinking: function(){},
       doBlinking: function(){},
       getDesiredAdminState: function(){return $.ajax({});},
@@ -242,16 +243,12 @@ describe('App.HostComponentView', function() {
   describe('#isDeleteComponentDisabled', function() {
 
     beforeEach(function() {
-      sinon.stub(hostComponentView, 'componentCounter', function() {
-        return 1;
-      });
       sinon.stub(App.StackServiceComponent, 'find', function(component) {
         var min = component == 'comp0' ? 0 : 1;
         return Em.Object.create({minToInstall: min});
       });
     });
     afterEach(function() {
-      hostComponentView.componentCounter.restore();
       App.StackServiceComponent.find.restore();
     });
 
@@ -509,9 +506,7 @@ describe('App.HostComponentView', function() {
         });
       });
 
-      sinon.stub(hostComponentView, 'componentCounter', function() {
-        return 2;
-      });
+      hostComponentView.set('componentCounter', 2);
 
       sinon.stub(hostComponentView, 'runningComponentCounter', function () {
         return 1;
@@ -533,9 +528,7 @@ describe('App.HostComponentView', function() {
         });
       });
 
-      sinon.stub(hostComponentView, 'componentCounter', function() {
-        return 2;
-      });
+      hostComponentView.set('componentCounter', 2);
 
       sinon.stub(hostComponentView, 'runningComponentCounter', function () {
         return 0;
@@ -557,9 +550,7 @@ describe('App.HostComponentView', function() {
         });
       });
 
-      sinon.stub(hostComponentView, 'componentCounter', function() {
-        return 2;
-      });
+      hostComponentView.set('componentCounter', 2);
 
       sinon.stub(hostComponentView, 'runningComponentCounter', function () {
         return 2;
@@ -581,9 +572,7 @@ describe('App.HostComponentView', function() {
         });
       });
 
-      sinon.stub(hostComponentView, 'componentCounter', function() {
-        return 1;
-      });
+      hostComponentView.set('componentCounter', 1);
 
       sinon.stub(hostComponentView, 'runningComponentCounter', function () {
         return 1;
@@ -596,7 +585,6 @@ describe('App.HostComponentView', function() {
     afterEach(function() {
       App.HostComponentActionMap.getMap.restore();
       App.StackServiceComponent.find.restore();
-      hostComponentView.componentCounter.restore();
       hostComponentView.runningComponentCounter.restore();
     });
   });


Mime
View raw message