浏览代码

AMBARI-2449. Remove unnecessary mock data files. (Andrii Tkach via yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1495641 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako 12 年之前
父节点
当前提交
7ac80e482c
共有 28 个文件被更改,包括 32 次插入1189 次删除
  1. 1 19
      ambari-web/app/assets/data/wizard/reassign/step14PolledData/tasks_poll1.json
  2. 1 19
      ambari-web/app/assets/data/wizard/reassign/step14PolledData/tasks_poll2.json
  3. 1 19
      ambari-web/app/assets/data/wizard/reassign/step14PolledData/tasks_poll3.json
  4. 1 19
      ambari-web/app/assets/data/wizard/reassign/step14PolledData/tasks_poll4.json
  5. 1 19
      ambari-web/app/assets/data/wizard/reassign/step14PolledData/tasks_poll5.json
  6. 21 22
      ambari-web/app/controllers/wizard/step14_controller.js
  7. 0 30
      ambari-web/app/controllers/wizard/step3_controller.js
  8. 2 3
      ambari-web/app/controllers/wizard/step9_controller.js
  9. 0 35
      ambari-web/app/data/mock/hosts.js
  10. 0 76
      ambari-web/app/data/mock/master_component_hosts.js
  11. 0 63
      ambari-web/app/data/mock/slave_component_hosts.js
  12. 0 99
      ambari-web/app/data/mock/step3_hosts.js
  13. 0 99
      ambari-web/app/data/mock/step3_pollData.js
  14. 0 26
      ambari-web/app/data/mock/step3_single_host.js
  15. 0 60
      ambari-web/app/data/mock/step9PolledData/pollData_1.js
  16. 0 60
      ambari-web/app/data/mock/step9PolledData/pollData_2.js
  17. 0 60
      ambari-web/app/data/mock/step9PolledData/pollData_3.js
  18. 0 60
      ambari-web/app/data/mock/step9PolledData/pollData_4.js
  19. 0 60
      ambari-web/app/data/mock/step9PolledData/pollData_5.js
  20. 0 60
      ambari-web/app/data/mock/step9PolledData/pollData_6.js
  21. 0 60
      ambari-web/app/data/mock/step9PolledData/pollData_7.js
  22. 0 60
      ambari-web/app/data/mock/step9PolledData/pollData_8.js
  23. 0 60
      ambari-web/app/data/mock/step9PolledData/pollData_9.js
  24. 0 87
      ambari-web/app/data/mock/step9_hosts.js
  25. 0 2
      ambari-web/app/messages.js
  26. 1 0
      ambari-web/app/models/cluster_states.js
  27. 0 10
      ambari-web/app/templates/wizard/step3.hbs
  28. 3 2
      ambari-web/app/utils/ajax.js

+ 1 - 19
ambari-web/app/data/mock/step14PolledData/tasks_poll1.js → ambari-web/app/assets/data/wizard/reassign/step14PolledData/tasks_poll1.json

@@ -1,22 +1,4 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-module.exports = {
+{
   "href": "http://localhost:8080/api/clusters/mycluster/requests/1",
   "Requests": {
     "id": 1

+ 1 - 19
ambari-web/app/data/mock/step14PolledData/tasks_poll2.js → ambari-web/app/assets/data/wizard/reassign/step14PolledData/tasks_poll2.json

@@ -1,22 +1,4 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-module.exports = {
+{
   "href": "http://localhost:8080/api/clusters/mycluster/requests/1",
   "Requests": {
     "id": 1

+ 1 - 19
ambari-web/app/data/mock/step14PolledData/tasks_poll3.js → ambari-web/app/assets/data/wizard/reassign/step14PolledData/tasks_poll3.json

@@ -1,22 +1,4 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-module.exports = {
+{
   "href": "http://localhost:8080/api/clusters/mycluster/requests/1",
   "Requests": {
     "id": 1

+ 1 - 19
ambari-web/app/data/mock/step14PolledData/tasks_poll4.js → ambari-web/app/assets/data/wizard/reassign/step14PolledData/tasks_poll4.json

@@ -1,22 +1,4 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-module.exports = {
+{
   "href": "http://localhost:8080/api/clusters/mycluster/requests/1",
   "Requests": {
     "id": 1

+ 1 - 19
ambari-web/app/data/mock/step14PolledData/tasks_poll5.js → ambari-web/app/assets/data/wizard/reassign/step14PolledData/tasks_poll5.json

@@ -1,22 +1,4 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-module.exports = {
+{
   "href": "http://localhost:8080/api/clusters/mycluster/requests/1",
   "Requests": {
     "id": 1

+ 21 - 22
ambari-web/app/controllers/wizard/step14_controller.js

@@ -775,38 +775,37 @@ App.WizardStep14Controller = Em.Controller.extend({
   },
 
   POLL_INTERVAL: 4000,
-  dataPollCounter: 1,
+  dataPollCounter: 0,
 
   getLogsByRequest: function () {
     this.set('logs', []);
-    if (App.testMode) {
-      var data = require('data/mock/step14PolledData/tasks_poll' + this.get('dataPollCounter'));
-      this.set('dataPollCounter', this.get('dataPollCounter') + 1);
-      if (this.get('dataPollCounter') == 6) {
-        this.set('dataPollCounter', 1);
-      }
-      this.onGetLogsByRequestSuccess(data);
-    } else {
-      var requestIds = this.get('currentRequestId');
-      requestIds.forEach(function (requestId) {
-        App.ajax.send({
-          name: 'reassign.get_logs',
-          sender: this,
-          data: {
-            requestId: requestId
-          },
-          success: 'onGetLogsByRequestSuccess',
-          error: 'onGetLogsByRequestError'
-        });
-      }, this);
+    var requestIds = this.get('currentRequestId');
+
+    if (this.get('dataPollCounter') == 5) {
+      this.set('dataPollCounter', 0);
     }
+    this.set('dataPollCounter', this.get('dataPollCounter') + 1);
+
+    requestIds.forEach(function (requestId) {
+      App.ajax.send({
+        name: 'reassign.get_logs',
+        sender: this,
+        data: {
+          requestId: requestId,
+          pollCounter: this.get('dataPollCounter')
+        },
+        success: 'onGetLogsByRequestSuccess',
+        error: 'onGetLogsByRequestError'
+      });
+    }, this);
+
   },
 
   logs: [],
 
   onGetLogsByRequestSuccess: function (data) {
     this.get('logs').push(data);
-    if (this.get('logs.length') == this.get('currentRequestId.length') || App.testMode) {
+    if (this.get('logs.length') == this.get('currentRequestId.length')) {
       this.parseLogs(this.get('logs'))
     }
   },

+ 0 - 30
ambari-web/app/controllers/wizard/step3_controller.js

@@ -94,9 +94,6 @@ App.WizardStep3Controller = Em.Controller.extend({
 
   isRetryDisabled: true,
 
-  mockData: require('data/mock/step3_hosts'),
-  mockRetryData: require('data/mock/step3_pollData'),
-
   navigateStep: function () {
     this.loadStep();
     if (this.get('content.installOptions.manualInstall') !== true) {
@@ -938,33 +935,6 @@ App.WizardStep3Controller = Em.Controller.extend({
     })
   },
 
-  // TODO: dummy button. Remove this after the hook up with actual REST API.
-  mockBtn: function () {
-    this.set('isSubmitDisabled', false);
-    this.hosts.clear();
-    var hostInfo = this.mockData;
-    this.renderHosts(hostInfo);
-  },
-
-  pollBtn: function () {
-    if (this.get('isSubmitDisabled')) {
-      return;
-    }
-    var hosts = this.get('visibleHosts');
-    var selectedHosts = hosts.filterProperty('isChecked', true);
-    selectedHosts.forEach(function (_host) {
-      console.log('Retrying:  ' + _host.name);
-    });
-
-    var mockHosts = this.mockRetryData;
-    mockHosts.forEach(function (_host) {
-      console.log('Retrying:  ' + _host.name);
-    });
-    if (this.parseHostInfo(mockHosts, selectedHosts)) {
-      // this.saveHostInfoToDb();
-    }
-  },
-
   back: function () {
     if (this.get('isInstallInProgress')) {
       return;

+ 2 - 3
ambari-web/app/controllers/wizard/step9_controller.js

@@ -38,7 +38,6 @@ App.WizardStep9Controller = Em.Controller.extend({
     }
   }.observes('content.cluster.status', 'content.controllerName'),
 
-  mockHostData: require('data/mock/step9_hosts'),
   mockDataPrefix: '/data/wizard/deploy/5_hosts',
   pollDataCounter: 0,
   polledData: [],
@@ -186,7 +185,7 @@ App.WizardStep9Controller = Em.Controller.extend({
     this.set('status', 'info');
     this.set('progress', '0');
     this.set('isStepCompleted', false);
-    this.numPolls = 0;
+    this.numPolls = 1;
   },
 
   loadStep: function () {
@@ -667,7 +666,7 @@ App.WizardStep9Controller = Em.Controller.extend({
     this.doPolling();
   },
 
-  numPolls: 0,
+  numPolls: 1,
 
   getUrl: function (requestId) {
     var clusterName = this.get('content.cluster.name');

+ 0 - 35
ambari-web/app/data/mock/hosts.js

@@ -1,35 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-module.exports = [
-  {
-    hostname: 'host0001.company.com'
-  },
-  {
-    hostname: 'host0002.company.com'
-  },
-  {
-    hostname: 'host0003.company.com'
-  },
-  {
-    hostname: 'host0004.company.com'
-  },
-  {
-    hostname: 'host0005.company.com'
-  }
-];

+ 0 - 76
ambari-web/app/data/mock/master_component_hosts.js

@@ -1,76 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-module.exports = [
-  {
-    componentName: 'NameNode',
-    hosts: [
-      'host0001.company.com'
-    ]
-  },
-  {
-    componentName: 'SNameNode',
-    hosts: [
-      'host0002.company.com'
-    ]
-  },
-  {
-    componentName: 'JobTracker',
-    hosts: [
-      'host0003.company.com'
-    ]
-  },
-  {
-    componentName: 'Hive Metastore',
-    hosts: [
-      'host0003.company.com'
-    ]
-  },
-  {
-    componentName: 'HBase Master',
-    hosts: [
-      'host0003.company.com'
-    ]
-  },
-  {
-    componentName: 'Oozie Server',
-    hosts: [
-      'host0002.company.com'
-    ]
-  },
-  {
-    componentName: 'Nagios Server',
-    hosts: [
-      'host0002.company.com'
-    ]
-  },
-  {
-    componentName: 'Ganglia Collector',
-    hosts: [
-      'host0002.company.com'
-    ]
-  },
-  {
-    componentName: 'ZooKeeper Server',
-    hosts: [
-      'host0001.company.com',
-      'host0002.company.com',
-      'host0003.company.com'
-    ]
-  }
-]

+ 0 - 63
ambari-web/app/data/mock/slave_component_hosts.js

@@ -1,63 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-module.exports = [
-  {
-    componentName: 'DataNode',
-    hosts: [
-      {
-        hostname: 'host0001.company.com',
-        group: 'Default'
-      },
-      {
-        hostname: 'host0002.company.com',
-        group: 'Default'
-      },
-      {
-        hostname: 'host0003.company.com',
-        group: 'Default'
-      }
-    ]
-  },
-  {
-    componentName: 'RegionServer',
-    hosts: [
-      {
-        hostname: 'host0001.company.com',
-        group: 'Default'
-      },
-      {
-        hostname: 'host0002.company.com',
-        group: 'Default'
-      }
-    ]
-  },
-  {
-    componentName: 'TaskTracker',
-    hosts: [
-      {
-        hostname: 'host0002.company.com',
-        group: 'Default'
-      },
-      {
-        hostname: 'host0003.company.com',
-        group: 'Default'
-      }
-    ]
-  }
-]

+ 0 - 99
ambari-web/app/data/mock/step3_hosts.js

@@ -1,99 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-module.exports = new Ember.Set([
-  {
-    name: '192.168.1.1',
-    bootStatus: 'pending',
-    cpu: '2',
-    memory: '2'
-  },
-  {
-    name: '192.168.1.2',
-    bootStatus: 'success',
-    cpu: '4',
-    memory: '4'
-  },
-  {
-    name: '192.168.1.3',
-    bootStatus: 'pending',
-    cpu: '2',
-    memory: '2'
-  },
-  {
-    name: '192.168.1.4',
-    bootStatus: 'pending',
-    cpu: '2',
-    memory: '4'
-  },
-  {
-    name: '192.168.1.5',
-    bootStatus: 'success',
-    cpu: '2',
-    memory: '4'
-  },
-  {
-    name: '192.168.1.6',
-    bootStatus: 'pending',
-    cpu: '4',
-    memory: '8'
-  },
-  {
-    name: '192.168.1.7',
-    bootStatus: 'success',
-    cpu: '4',
-    memory: '4'
-
-  },
-  {
-    name: '192.168.1.8',
-    bootStatus: 'success',
-    cpu: '4',
-    memory: '2'
-  },
-  {
-    name: '192.168.1.9',
-    bootStatus: 'success',
-    cpu: '2',
-    memory: '4'
-  },
-  {
-    name: '192.168.1.10',
-    bootStatus: 'pending',
-    cpu: '4',
-    memory: '2'
-  },
-  {
-    name: '192.168.1.11',
-    bootStatus: 'success',
-    cpu: '2',
-    memory: '2'
-  },
-  {
-    name: '192.168.1.12',
-    bootStatus: 'pending',
-    cpu: '2',
-    memory: '4'
-  },
-  {
-    name: '192.168.1.13',
-    bootStatus: 'success',
-    cpu: '4',
-    memory: '8'
-  }
-]);

+ 0 - 99
ambari-web/app/data/mock/step3_pollData.js

@@ -1,99 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-module.exports = new Ember.Set([
-  {
-    name: '192.168.1.1',
-    status: 'error',
-    cpu: '2',
-    memory: '2'
-  },
-  {
-    name: '192.168.1.2',
-    status: 'success',
-    cpu: '4',
-    memory: '4'
-  },
-  {
-    name: '192.168.1.3',
-    status: 'error',
-    cpu: '2',
-    memory: '2'
-  },
-  {
-    name: '192.168.1.4',
-    status: 'success',
-    cpu: '2',
-    memory: '4'
-  },
-  {
-    name: '192.168.1.5',
-    status: 'success',
-    cpu: '2',
-    memory: '4'
-  },
-  {
-    name: '192.168.1.6',
-    status: 'success',
-    cpu: '4',
-    memory: '8'
-  },
-  {
-    name: '192.168.1.7',
-    status: 'success',
-    cpu: '4',
-    memory: '4'
-
-  },
-  {
-    name: '192.168.1.8',
-    status: 'success',
-    cpu: '4',
-    memory: '2'
-  },
-  {
-    name: '192.168.1.9',
-    status: 'success',
-    cpu: '2',
-    memory: '4'
-  },
-  {
-    name: '192.168.1.10',
-    status: 'success',
-    cpu: '4',
-    memory: '2'
-  },
-  {
-    name: '192.168.1.11',
-    status: 'success',
-    cpu: '2',
-    memory: '2'
-  },
-  {
-    name: '192.168.1.12',
-    status: 'success',
-    cpu: '2',
-    memory: '4'
-  },
-  {
-    name: '192.168.1.13',
-    status: 'success',
-    cpu: '4',
-    memory: '8'
-  }
-]);

+ 0 - 26
ambari-web/app/data/mock/step3_single_host.js

@@ -1,26 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-module.exports = new Ember.Set([
-  {
-    name: '192.168.1.2',
-    bootStatus: 'success',
-    cpu: '4',
-    memory: '4'
-  }
-]);

+ 0 - 60
ambari-web/app/data/mock/step9PolledData/pollData_1.js

@@ -1,60 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-
-module.exports = {
-  "href" : "http://localhost:8080/api/clusters/mycluster/requests/1",
-  "Requests" : {
-    "id" : 1
-  },
-  "tasks" : [
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/1",
-      "Tasks" : {
-        "id" : "1",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "PENDING",
-        "command" : "INSTALL",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "localhost.localdomain",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/2",
-      "Tasks" : {
-        "id" : "2",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "PENDING",
-        "command" : "INSTALL",
-        "start_time" : "-1",
-        "role" : "NAMENODE",
-        "stderr" : "",
-        "host_name" : "localhost.localdomain",
-        "stage_id" : "1"
-      }
-    }
-  ]
-}

+ 0 - 60
ambari-web/app/data/mock/step9PolledData/pollData_2.js

@@ -1,60 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-
-module.exports = {
-  "href" : "http://localhost:8080/api/clusters/mycluster/requests/1",
-  "Requests" : {
-    "id" : 1
-  },
-  "tasks" : [
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/1",
-      "Tasks" : {
-        "id" : "1",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "QUEUED",
-        "command" : "INSTALL",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "localhost.localdomain",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/2",
-      "Tasks" : {
-        "id" : "2",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "QUEUED",
-        "command" : "INSTALL",
-        "start_time" : "-1",
-        "role" : "NAMENODE",
-        "stderr" : "",
-        "host_name" : "localhost.localdomain",
-        "stage_id" : "1"
-      }
-    }
-  ]
-}

+ 0 - 60
ambari-web/app/data/mock/step9PolledData/pollData_3.js

@@ -1,60 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-
-module.exports = {
-  "href" : "http://localhost:8080/api/clusters/mycluster/requests/1",
-  "Requests" : {
-    "id" : 1
-  },
-  "tasks" : [
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/1",
-      "Tasks" : {
-        "id" : "1",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "QUEUED",
-        "command" : "INSTALL",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "localhost.localdomain",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/2",
-      "Tasks" : {
-        "id" : "2",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "IN_PROGRESS",
-        "command" : "INSTALL",
-        "start_time" : "-1",
-        "role" : "NAMENODE",
-        "stderr" : "",
-        "host_name" : "localhost.localdomain",
-        "stage_id" : "1"
-      }
-    }
-  ]
-}

+ 0 - 60
ambari-web/app/data/mock/step9PolledData/pollData_4.js

@@ -1,60 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-
-module.exports = {
-  "href" : "http://localhost:8080/api/clusters/mycluster/requests/1",
-  "Requests" : {
-    "id" : 1
-  },
-  "tasks" : [
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/1",
-      "Tasks" : {
-        "id" : "1",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "IN_PROGRESS",
-        "command" : "INSTALL",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "localhost.localdomain",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/2",
-      "Tasks" : {
-        "id" : "2",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "COMPLETED",
-        "command" : "INSTALL",
-        "start_time" : "-1",
-        "role" : "NAMENODE",
-        "stderr" : "",
-        "host_name" : "localhost.localdomain",
-        "stage_id" : "1"
-      }
-    }
-  ]
-}

+ 0 - 60
ambari-web/app/data/mock/step9PolledData/pollData_5.js

@@ -1,60 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-
-module.exports = {
-  "href" : "http://localhost:8080/api/clusters/mycluster/requests/1",
-  "Requests" : {
-    "id" : 1
-  },
-  "tasks" : [
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/1",
-      "Tasks" : {
-        "id" : "1",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "COMPLETED",
-        "command" : "INSTALL",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "localhost.localdomain",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/2",
-      "Tasks" : {
-        "id" : "2",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "COMPLETED",
-        "command" : "INSTALL",
-        "start_time" : "-1",
-        "role" : "NAMENODE",
-        "stderr" : "",
-        "host_name" : "localhost.localdomain",
-        "stage_id" : "1"
-      }
-    }
-  ]
-}

+ 0 - 60
ambari-web/app/data/mock/step9PolledData/pollData_6.js

@@ -1,60 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-
-module.exports = {
-  "href" : "http://localhost:8080/api/clusters/mycluster/requests/1",
-  "Requests" : {
-    "id" : 1
-  },
-  "tasks" : [
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/1",
-      "Tasks" : {
-        "id" : "1",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "QUEUED",
-        "command" : "START",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "localhost.localdomain",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/2",
-      "Tasks" : {
-        "id" : "2",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "QUEUED",
-        "command" : "START",
-        "start_time" : "-1",
-        "role" : "NAMENODE",
-        "stderr" : "",
-        "host_name" : "localhost.localdomain",
-        "stage_id" : "1"
-      }
-    }
-  ]
-}

+ 0 - 60
ambari-web/app/data/mock/step9PolledData/pollData_7.js

@@ -1,60 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-
-module.exports = {
-  "href" : "http://localhost:8080/api/clusters/mycluster/requests/1",
-  "Requests" : {
-    "id" : 1
-  },
-  "tasks" : [
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/1",
-      "Tasks" : {
-        "id" : "1",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "QUEUED",
-        "command" : "START",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "localhost.localdomain",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/2",
-      "Tasks" : {
-        "id" : "2",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "IN_PROGRESS",
-        "command" : "START",
-        "start_time" : "-1",
-        "role" : "NAMENODE",
-        "stderr" : "",
-        "host_name" : "localhost.localdomain",
-        "stage_id" : "1"
-      }
-    }
-  ]
-}

+ 0 - 60
ambari-web/app/data/mock/step9PolledData/pollData_8.js

@@ -1,60 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-
-module.exports = {
-  "href" : "http://localhost:8080/api/clusters/mycluster/requests/1",
-  "Requests" : {
-    "id" : 1
-  },
-  "tasks" : [
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/1",
-      "Tasks" : {
-        "id" : "1",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "IN_PROGRESS",
-        "command" : "START",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "localhost.localdomain",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/2",
-      "Tasks" : {
-        "id" : "2",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "COMPLETED",
-        "command" : "START",
-        "start_time" : "-1",
-        "role" : "NAMENODE",
-        "stderr" : "",
-        "host_name" : "localhost.localdomain",
-        "stage_id" : "1"
-      }
-    }
-  ]
-}

+ 0 - 60
ambari-web/app/data/mock/step9PolledData/pollData_9.js

@@ -1,60 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-
-module.exports = {
-  "href" : "http://localhost:8080/api/clusters/mycluster/requests/1",
-  "Requests" : {
-    "id" : 1
-  },
-  "tasks" : [
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/1",
-      "Tasks" : {
-        "id" : "1",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "COMPLETED",
-        "command" : "START",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "localhost.localdomain",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/2",
-      "Tasks" : {
-        "id" : "2",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "COMPLETED",
-        "command" : "START",
-        "start_time" : "-1",
-        "role" : "NAMENODE",
-        "stderr" : "",
-        "host_name" : "localhost.localdomain",
-        "stage_id" : "1"
-      }
-    }
-  ]
-}

+ 0 - 87
ambari-web/app/data/mock/step9_hosts.js

@@ -1,87 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-
-module.exports = new Ember.Set([
-  {
-    name: '192.168.1.1',
-    progress: '0',
-    message: 'starting'
-  },
-  {
-    name: '192.168.1.2',
-    progress: '0',
-    message: 'starting'
-  },
-  {
-    name: '192.168.1.3',
-    progress: '0',
-    message: 'starting'
-  },
-  {
-    name: '192.168.1.4',
-    progress: '0',
-    message: 'starting'
-  },
-  {
-    name: '192.168.1.5',
-    progress: '0',
-    message: 'starting'
-  },
-  {
-    name: '192.168.1.6',
-    progress: '0',
-    message: 'starting'
-  },
-  {
-    name: '192.168.1.7',
-    progress: '0',
-    message: 'starting'
-  },
-  {
-    name: '192.168.1.8',
-    progress: '0',
-    message: 'starting'
-  },
-  {
-    name: '192.168.1.9',
-    progress: '0',
-    message: 'starting'
-  },
-  {
-    name: '192.168.1.10',
-    progress: '0',
-    message: 'starting'
-  },
-  {
-    name: '192.168.1.11',
-    progress: '0',
-    message: 'starting'
-  },
-  {
-    name: '192.168.1.12',
-    progress: '0',
-    message: 'starting'
-  },
-  {
-    name: '192.168.1.13',
-    progress: '0',
-    message: 'starting'
-  }
-]);

+ 0 - 2
ambari-web/app/messages.js

@@ -214,8 +214,6 @@ Em.I18n.translations = {
   'installer.header':'Cluster Install Wizard',
   'installer.navigation.warning.header':'Navigation Warning',
 
-  'installer.mockData':'mockData',
-  'installer.pollData':'pollData',
   'installer.noHostsAssigned':'No host assigned',
   'installer.slaveComponentHosts.selectHosts':'select hosts for this group',
   'installer.slaveComponentHostsPopup.header':'Select which hosts should belong to which {0} group',

+ 1 - 0
ambari-web/app/models/cluster_states.js

@@ -73,6 +73,7 @@ App.clusterStatus = Ember.Object.create({
    * @return {*}
    */
   setClusterStatus: function(newValue){
+    if(App.testMode) return false;
     if (newValue) {
       //setter
       if (newValue.clusterState) {

+ 0 - 10
ambari-web/app/templates/wizard/step3.hbs

@@ -35,16 +35,6 @@
           {{t installer.step3.retryFailed}}
         </a>
         {{/unless}}
-        {{#if App.testMode}}
-            <a class="btn btn-info"
-               href="#" {{action mockBtn target="controller"}}>
-              {{t installer.mockData}}
-            </a>
-            <a class="btn btn-info"
-               href="#" {{action pollBtn target="controller"}}>
-                {{t installer.pollData}}
-            </a>
-        {{/if}}
 
         <div id="host-filter" class="pull-right">
           <ul class="clearfix">

+ 3 - 2
ambari-web/app/utils/ajax.js

@@ -173,6 +173,7 @@ var urls = {
   },
   'reassign.get_logs': {
     'real': '/clusters/{clusterName}/requests/{requestId}?fields=tasks/*',
+    'mock': '/data/wizard/reassign/step14PolledData/tasks_poll{pollCounter}.json',
     'type': 'GET'
 
   },
@@ -603,9 +604,9 @@ var urls = {
   'wizard.install_services.installer_controller.is_retry': {
     'real': '/clusters/{cluster}/host_components?HostRoles/state=INSTALLED',
     'mock': '/data/wizard/deploy/2_hosts/poll_1.json',
+    'type': 'PUT',
     'format': function (data, opt) {
       return {
-        type: 'PUT',
         async: false,
         data: data.data
       };
@@ -614,9 +615,9 @@ var urls = {
   'wizard.install_services.installer_controller.not_is_retry': {
     'real': '/clusters/{cluster}/services?ServiceInfo/state=INIT',
     'mock': '/data/wizard/deploy/2_hosts/poll_1.json',
+    'type': 'PUT',
     'format': function (data, opt) {
       return {
-        type: 'PUT',
         async: false,
         data: data.data
       };