You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2012/12/09 14:43:12 UTC
svn commit: r1418952 [12/12] - in
/incubator/ambari/branches/AMBARI-666/ambari-web/app: ./
assets/data/apps/jobs/ assets/data/dashboard/ assets/data/wizard/deploy/
controllers/main/ controllers/main/admin/ controllers/main/admin/user/
controllers/main/...
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/admin/user.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/admin/user.js?rev=1418952&r1=1418951&r2=1418952&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/admin/user.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/admin/user.js Sun Dec 9 13:43:07 2012
@@ -21,6 +21,7 @@ var App = require('app');
App.MainAdminUserController = Em.Controller.extend({
name:'mainAdminUserController',
deleteRecord:function (event) {
+ var self = this;
if (event.context.get('userName') == App.get('router').getLoginName()) {
App.ModalPopup.show({
header:Em.I18n.t('admin.users.delete.yourself.header'),
@@ -36,35 +37,63 @@ App.MainAdminUserController = Em.Control
;
App.ModalPopup.show({
- itemToDelete:event.context,
header:Em.I18n.t('admin.users.delete.header').format(event.context.get('userName')),
body:Em.I18n.t('question.sure'),
primary:Em.I18n.t('yes'),
secondary:Em.I18n.t('no'),
- controller:this.controllers.mainAdminUserEditController,
- onPrimary:function (event) {
- //TODO: change sendCommandToServer parametrs for proper API request
- this.get('controller').sendCommandToServer('/users/delete/' + this.get('itemToDelete').context.get("userName"), {
- Users:{ /* password: form.getValues().password, roles: form.getValues().roles*/ }
- },
+ onPrimary:function () {
+ self.sendCommandToServer('/users/' + event.context.get("userName"),"DELETE" ,{},
function (requestId) {
if (!requestId) {
return;
}
- this.get('itemToDelete').context.deleteRecord();
+ event.context.deleteRecord();
+
try {
App.store.commit()
} catch (err) {
+
}
- ;
})
+ this.hide();
},
- onSecondary:function (event) {
+ onSecondary:function () {
this.hide();
}
});
+ },
+ sendCommandToServer : function(url, method, postData, callback){
+ var url = (App.testMode) ?
+ '/data/wizard/deploy/poll_1.json' : //content is the same as ours
+ '/api/' + url;
+
+ var method = App.testMode ? 'GET' : method;
+
+ $.ajax({
+ type: method,
+ url: url,
+ data: JSON.stringify(postData),
+ dataType: 'json',
+ timeout: 5000,
+ success: function(data){
+ if(data && data.Requests){
+ callback(data.Requests.id);
+ } else{
+ callback(null);
+ console.log('cannot get request id from ', data);
+ }
+ },
+
+ error: function (request, ajaxOptions, error) {
+ //do something
+ callback(null);
+ console.log('error on change component host status')
+ },
+
+ statusCode: require('data/statusCodes')
+ });
}
})
\ No newline at end of file
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/admin/user/create.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/admin/user/create.js?rev=1418952&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/admin/user/create.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/admin/user/create.js Sun Dec 9 13:43:07 2012
@@ -0,0 +1,24 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+App.MainAdminUserCreateController = Em.Controller.extend({
+ name:'mainAdminUserCreateController',
+ content:false
+})
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/admin/user/edit.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/admin/user/edit.js?rev=1418952&r1=1418951&r2=1418952&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/admin/user/edit.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/admin/user/edit.js Sun Dec 9 13:43:07 2012
@@ -20,36 +20,5 @@ var App = require('app');
App.MainAdminUserEditController = Em.Controller.extend({
name:'mainAdminUserEditController',
- sendCommandToServer : function(url, postData, callback){
- var url = (App.testMode) ?
- '/data/wizard/deploy/poll_1.json' : //content is the same as ours
- '/api/clusters/' + App.router.getClusterName() + url;
-
- var method = App.testMode ? 'GET' : 'PUT';
-
- $.ajax({
- type: method,
- url: url,
- data: JSON.stringify(postData),
- dataType: 'json',
- timeout: 5000,
- success: function(data){
- if(data && data.Requests){
- callback(data.Requests.id);
- } else{
- callback(null);
- console.log('cannot get request id from ', data);
- }
- },
-
- error: function (request, ajaxOptions, error) {
- //do something
- callback(null);
- console.log('error on change component host status')
- },
-
- statusCode: require('data/statusCodes')
- });
- },
content:false
})
\ No newline at end of file
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host.js?rev=1418952&r1=1418951&r2=1418952&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host.js Sun Dec 9 13:43:07 2012
@@ -30,8 +30,8 @@ App.MainHostController = Em.ArrayControl
componentsForFilter:App.Component.find(),
totalBinding:'fullContent.length',
filters:{components:[]},
- pageSize:3,
- pageSizeRange:[1, 3, 5, 'all'],
+ pageSize: 25,
+ pageSizeRange:[10, 25, 50, 100, 'all'],
rangeStart:0,
allChecked:false,
selectedHostsIds:[],
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/service/item.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/service/item.js?rev=1418952&r1=1418951&r2=1418952&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/service/item.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/service/item.js Sun Dec 9 13:43:07 2012
@@ -26,12 +26,12 @@ App.MainServiceItemController = Em.Contr
* @param url
* @param data Object to send
*/
- sendCommandToServer : function(url, postData, callback){
+ sendCommandToServer : function(url, method,postData, callback){
var url = (App.testMode) ?
'/data/wizard/deploy/poll_1.json' : //content is the same as ours
'/api/clusters/' + App.router.getClusterName() + url;
- var method = App.testMode ? 'GET' : 'PUT';
+ method = App.testMode ? 'GET' : method;
$.ajax({
type: method,
@@ -74,7 +74,7 @@ App.MainServiceItemController = Em.Contr
primary: 'Yes',
secondary: 'No',
onPrimary: function () {
- self.sendCommandToServer('/services/' + self.get('content.serviceName').toUpperCase(), {
+ self.sendCommandToServer('/services/' + self.get('content.serviceName').toUpperCase(), "PUT", {
ServiceInfo: {
state: 'STARTED'
}
@@ -128,7 +128,7 @@ App.MainServiceItemController = Em.Contr
primary: 'Yes',
secondary: 'No',
onPrimary: function() {
- self.sendCommandToServer('/services/' + self.get('content.serviceName').toUpperCase(),{
+ self.sendCommandToServer('/services/' + self.get('content.serviceName').toUpperCase(), "PUT",{
ServiceInfo:{
state: 'INSTALLED'
}
@@ -208,7 +208,7 @@ App.MainServiceItemController = Em.Contr
var serviceName = self.get('content.serviceName').toUpperCase();
var smokeName = serviceName + "_SERVICE_CHECK";
- self.sendCommandToServer('/services/' + serviceName + '/actions/' + smokeName,
+ self.sendCommandToServer('/services/' + serviceName + '/actions/' + smokeName, "POST",
null,
function (requestId) {
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step8_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step8_controller.js?rev=1418952&r1=1418951&r2=1418952&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step8_controller.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step8_controller.js Sun Dec 9 13:43:07 2012
@@ -597,7 +597,6 @@ App.WizardStep8Controller = Em.Controlle
* Onclick handler for <code>next</code> button
*/
submit: function () {
- debugger;
if (App.testMode) {
// App.router.send('next');
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step9_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step9_controller.js?rev=1418952&r1=1418951&r2=1418952&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step9_controller.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step9_controller.js Sun Dec 9 13:43:07 2012
@@ -399,7 +399,7 @@ App.WizardStep9Controller = Em.Controlle
} else {
clusterStatus.status = 'INSTALLED';
this.set('progress', '34');
- this.launchStartServices(); //TODO: uncomment after the actual hookup
+ this.launchStartServices();
}
this.setTasksPerHost();
App.router.get(this.get('content.controllerName')).saveInstalledHosts(this);
@@ -471,7 +471,7 @@ App.WizardStep9Controller = Em.Controlle
this.onSuccessPerHost(actionsPerHost, _host); // every action should be a success
this.onWarningPerHost(actionsPerHost, _host); // any action should be a faliure
this.onInProgressPerHost(actionsPerHost, _host); // current running action for a host
- totalProgress = self.progressPerHost(actionsPerHost, _host);
+ totalProgress += self.progressPerHost(actionsPerHost, _host);
}
}, this);
totalProgress = Math.floor(totalProgress / this.hosts.length);
@@ -505,10 +505,10 @@ App.WizardStep9Controller = Em.Controlle
this.POLL_INTERVAL = 1;
this.numPolls++;
if (this.numPolls == 5) {
- // url = 'data/wizard/deploy/poll_5.json';
- url = 'data/wizard/deploy/poll_5_failed.json';
+ url = 'data/wizard/deploy/multi_5.json';
+ //url = 'data/wizard/deploy/poll_5_failed.json';
} else {
- url = 'data/wizard/deploy/poll_' + this.numPolls + '.json';
+ url = 'data/wizard/deploy/multi_' + this.numPolls + '.json';
}
debugger;
}
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/hosts_mapper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/hosts_mapper.js?rev=1418952&r1=1418951&r2=1418952&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/hosts_mapper.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/hosts_mapper.js Sun Dec 9 13:43:07 2012
@@ -28,6 +28,11 @@ App.hostsMapper = App.QuickDataMapper.cr
components: {
item : 'HostRoles.component_name'
},
+ host_components_key: 'host_components',
+ host_components_type: 'array',
+ host_components: {
+ item: 'id'
+ },
cpu : 'Hosts.cpu_count',
memory : 'Hosts.total_mem',
disk_info: 'Hosts.disk_info',
@@ -42,6 +47,25 @@ App.hostsMapper = App.QuickDataMapper.cr
os_arch : 'Hosts.os_arch',
os_type : 'Hosts.os_type',
ip : 'Hosts.ip'
+ },
+ map: function (json) {
+ if (!this.get('model')) {
+ return;
+ }
+
+ if (json.items) {
+ var result = [];
+
+ json.items.forEach(function (item) {
+ item.host_components.forEach(function(host_component){
+ host_component.id = host_component.HostRoles.component_name + "_" + host_component.HostRoles.host_name;
+ }, this);
+ result.push(this.parseIt(item, this.config));
+ }, this);
+
+ //console.log(this.get('model'), result);
+ App.store.loadMany(this.get('model'), result);
+ }
}
});
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/jobs_mapper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/jobs_mapper.js?rev=1418952&r1=1418951&r2=1418952&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/jobs_mapper.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/jobs_mapper.js Sun Dec 9 13:43:07 2012
@@ -19,40 +19,68 @@
var App = require('app');
App.jobsMapper = App.QuickDataMapper.create({
- model : App.Job,
- map : function(json) {
- if(!this.get('model')) {
+ model:App.Job,
+ map:function (json) {
+ if (!this.get('model')) {
return;
}
- if(json.jobs) {
+ if (json.jobs) {
var result = [];
- json.jobs.forEach(function(item) {
+ json.jobs.forEach(function (item) {
result.push(this.parseIt(item, this.config));
}, this);
App.store.loadMany(this.get('model'), result);
}
},
- config : {
- id : 'jobId',
- run_id : 'workflowId',
- job_name : 'jobName',
- workflow_entity_name : 'workflowEntityName',
- user_name : 'userName',
- $queue : 'default',
- $acls : 5,
- conf_path : 'confPath',
- submit_time : 'submitTime',
- maps : 'maps',
- reduces : 'reduces',
- status : 'status',
- $priority : null,
- $failed_maps : 3,
- $failed_reduces : 3,
- $job_counters : 3,
- input : 'inputBytes',
- output : 'outputBytes',
- elapsed_time: 'elapsedTime',
+ config:{
+ id:'jobId',
+ run_id:'workflowId',
+ job_name:'jobName',
+ workflow_entity_name:'workflowEntityName',
+ user_name:'userName',
+ $queue:'default',
+ $acls:5,
+ conf_path:'confPath',
+ submit_time:'submitTime',
+ maps:'maps',
+ reduces:'reduces',
+ status:'status',
+ $priority:null,
+ $failed_maps:3,
+ $failed_reduces:3,
+ $job_counters:3,
+ input:'inputBytes',
+ output:'outputBytes',
+ elapsed_time:'elapsedTime',
$job_time_line:'[[{"x":0,"y":0},{"x":1,"y":0},{"x":2,"y":0},{"x":3,"y":0},{"x":4,"y":0},{"x":5,"y":0},{"x":6,"y":0},{"x":7,"y":0},{"x":8,"y":0},{"x":9,"y":0},{"x":10,"y":0},{"x":11,"y":0},{"x":12,"y":0},{"x":13,"y":0},{"x":14,"y":0},{"x":15,"y":0},{"x":16,"y":0},{"x":17,"y":0},{"x":18,"y":0},{"x":19,"y":0},{"x":20,"y":0},{"x":21,"y":0},{"x":22,"y":0},{"x":23,"y":0},{"x":24,"y":0},{"x":25,"y":0},{"x":26,"y":0},{"x":27,"y":0},{"x":28,"y":0},{"x":29,"y":0},{"x":30,"y":0},{"x":31,"y":0},{"x":32,"y":0},{"x":33,"y":0},{"x":34,"y":0},{"x":35,"y":0},{"x":36,"y":0},{"x":37,"y":0},{"x":38,"y":0},{"x":39,"y":0},{"x":40,"y":0},{"x":41,"y":0},{"x":42,"y":0},{"x":43,"y":0},{"x":44,"y":0},{"x":45,"y":0},{"x":46,"y":0},{"x":47,"y":0},{"x":48,"y":0},{"x":49,"y":0},{"x":50,"y":0},{"x":51,"y":0},{"x":52,"y":0},{"x":53,"y":0},{"x":54,"y":0},{"x":55,"y":0},{"x":56,"y":0},{"x":57,"y":0},{"x":58,"y":0},{"x":59,"y":0},{"x":60,"y":0},{"x":61,"y":0},{"x":62,"y":0},{"x":63,"y":0},{"x":64,"y":0},{"
x":65,"y":0},{"x":66,"y":0},{"x":67,"y":0},{"x":68,"y":0},{"x":69,"y":0},{"x":70,"y":0},{"x":71,"y":0},{"x":72,"y":0},{"x":73,"y":0},{"x":74,"y":0},{"x":75,"y":0},{"x":76,"y":0},{"x":77,"y":0},{"x":78,"y":0},{"x":79,"y":0},{"x":80,"y":0},{"x":81,"y":0},{"x":82,"y":0},{"x":83,"y":0},{"x":84,"y":0},{"x":85,"y":0},{"x":86,"y":0},{"x":87,"y":0},{"x":88,"y":0},{"x":89,"y":0},{"x":90,"y":0},{"x":91,"y":0},{"x":92,"y":0},{"x":93,"y":0},{"x":94,"y":0},{"x":95,"y":0},{"x":96,"y":0},{"x":97,"y":0},{"x":98,"y":0},{"x":99,"y":0},{"x":100,"y":0},{"x":101,"y":0},{"x":102,"y":0},{"x":103,"y":0},{"x":104,"y":0},{"x":105,"y":0},{"x":106,"y":0},{"x":107,"y":0},{"x":108,"y":0},{"x":109,"y":0},{"x":110,"y":0},{"x":111,"y":0},{"x":112,"y":0},{"x":113,"y":0},{"x":114,"y":0},{"x":115,"y":0},{"x":116,"y":0},{"x":117,"y":0},{"x":118,"y":0},{"x":119,"y":0},{"x":120,"y":0},{"x":121,"y":0},{"x":122,"y":0},{"x":123,"y":0},{"x":124,"y":0},{"x":125,"y":0},{"x":126,"y":0},{"x":127,"y":0},{"x":128,"y":0},{"
x":129,"y":0},{"x":130,"y":0},{"x":131,"y":0},{"x":132,"y":0},{"x":133,"y":0},{"x":134,"y":0},{"x":135,"y":0},{"x":136,"y":0},{"x":137,"y":0},{"x":138,"y":0},{"x":139,"y":0},{"x":140,"y":0},{"x":141,"y":0},{"x":142,"y":2},{"x":143,"y":2},{"x":144,"y":2},{"x":145,"y":2},{"x":146,"y":2},{"x":147,"y":2},{"x":148,"y":2},{"x":149,"y":2},{"x":150,"y":2},{"x":151,"y":2},{"x":152,"y":2},{"x":153,"y":2},{"x":154,"y":2},{"x":155,"y":2},{"x":156,"y":2},{"x":157,"y":2},{"x":158,"y":2},{"x":159,"y":2},{"x":160,"y":2},{"x":161,"y":2},{"x":162,"y":2},{"x":163,"y":2},{"x":164,"y":2},{"x":165,"y":2},{"x":166,"y":2},{"x":167,"y":2},{"x":168,"y":2},{"x":169,"y":2},{"x":170,"y":2},{"x":171,"y":2},{"x":172,"y":2},{"x":173,"y":2},{"x":174,"y":2},{"x":175,"y":2},{"x":176,"y":2},{"x":177,"y":2},{"x":178,"y":2},{"x":179,"y":2},{"x":180,"y":2},{"x":181,"y":2},{"x":182,"y":2},{"x":183,"y":2},{"x":184,"y":2},{"x":185,"y":2},{"x":186,"y":2},{"x":187,"y":2},{"x":188,"y":2},{"x":189,"y":2},{"x":190,"y":2}
,{"x":191,"y":2},{"x":192,"y":2},{"x":193,"y":2},{"x":194,"y":2},{"x":195,"y":2},{"x":196,"y":2},{"x":197,"y":2},{"x":198,"y":2},{"x":199,"y":2},{"x":200,"y":2},{"x":201,"y":2},{"x":202,"y":2},{"x":203,"y":2},{"x":204,"y":2},{"x":205,"y":2},{"x":206,"y":2},{"x":207,"y":2},{"x":208,"y":2},{"x":209,"y":2},{"x":210,"y":2},{"x":211,"y":2},{"x":212,"y":2},{"x":213,"y":2},{"x":214,"y":2},{"x":215,"y":2},{"x":216,"y":2},{"x":217,"y":2},{"x":218,"y":2},{"x":219,"y":2},{"x":220,"y":2},{"x":221,"y":2},{"x":222,"y":2},{"x":223,"y":2},{"x":224,"y":2},{"x":225,"y":2},{"x":226,"y":2},{"x":227,"y":2},{"x":228,"y":2},{"x":229,"y":2},{"x":230,"y":2},{"x":231,"y":2},{"x":232,"y":2},{"x":233,"y":2},{"x":234,"y":0},{"x":235,"y":0},{"x":236,"y":0},{"x":237,"y":0},{"x":238,"y":0},{"x":239,"y":0},{"x":240,"y":0},{"x":241,"y":0},{"x":242,"y":0},{"x":243,"y":0},{"x":244,"y":0},{"x":245,"y":0},{"x":246,"y":0},{"x":247,"y":0},{"x":248,"y":0},{"x":249,"y":0},{"x":250,"y":0},{"x":251,"y":0},{"x":252,"y"
:0},{"x":253,"y":0},{"x":254,"y":0},{"x":255,"y":0},{"x":256,"y":0},{"x":257,"y":0},{"x":258,"y":0},{"x":259,"y":0},{"x":260,"y":0},{"x":261,"y":0},{"x":262,"y":0},{"x":263,"y":0},{"x":264,"y":0},{"x":265,"y":0},{"x":266,"y":0},{"x":267,"y":0},{"x":268,"y":0},{"x":269,"y":0},{"x":270,"y":0},{"x":271,"y":0},{"x":272,"y":0},{"x":273,"y":0},{"x":274,"y":0},{"x":275,"y":0},{"x":276,"y":0},{"x":277,"y":0},{"x":278,"y":0},{"x":279,"y":0},{"x":280,"y":0},{"x":281,"y":0},{"x":282,"y":0},{"x":283,"y":0},{"x":284,"y":0},{"x":285,"y":0},{"x":286,"y":0},{"x":287,"y":0},{"x":288,"y":0},{"x":289,"y":0},{"x":290,"y":0},{"x":291,"y":0},{"x":292,"y":0},{"x":293,"y":0},{"x":294,"y":0},{"x":295,"y":0},{"x":296,"y":0},{"x":297,"y":0},{"x":298,"y":0},{"x":299,"y":0},{"x":300,"y":0},{"x":301,"y":0},{"x":302,"y":0},{"x":303,"y":0},{"x":304,"y":0},{"x":305,"y":0},{"x":306,"y":0},{"x":307,"y":0},{"x":308,"y":0},{"x":309,"y":0},{"x":310,"y":0},{"x":311,"y":0},{"x":312,"y":0},{"x":313,"y":0},{"x":314,
"y":0},{"x":315,"y":0},{"x":316,"y":0},{"x":317,"y":0},{"x":318,"y":0},{"x":319,"y":0},{"x":320,"y":0},{"x":321,"y":0},{"x":322,"y":0},{"x":323,"y":0},{"x":324,"y":0},{"x":325,"y":0},{"x":326,"y":0},{"x":327,"y":0},{"x":328,"y":0},{"x":329,"y":0},{"x":330,"y":0},{"x":331,"y":0},{"x":332,"y":0},{"x":333,"y":0},{"x":334,"y":0},{"x":335,"y":0},{"x":336,"y":0},{"x":337,"y":0},{"x":338,"y":0},{"x":339,"y":0},{"x":340,"y":0},{"x":341,"y":0},{"x":342,"y":0},{"x":343,"y":0},{"x":344,"y":0},{"x":345,"y":0},{"x":346,"y":0},{"x":347,"y":0},{"x":348,"y":0},{"x":349,"y":0},{"x":350,"y":0},{"x":351,"y":0},{"x":352,"y":0},{"x":353,"y":0},{"x":354,"y":0},{"x":355,"y":0},{"x":356,"y":0},{"x":357,"y":0},{"x":358,"y":0},{"x":359,"y":0},{"x":360,"y":0},{"x":361,"y":0},{"x":362,"y":0},{"x":363,"y":0},{"x":364,"y":0},{"x":365,"y":0},{"x":366,"y":0},{"x":367,"y":0},{"x":368,"y":0},{"x":369,"y":0},{"x":370,"y":0},{"x":371,"y":0},{"x":372,"y":0},{"x":373,"y":0},{"x":374,"y":0},{"x":375,"y":0},{"x":3
76,"y":0},{"x":377,"y":0},{"x":378,"y":0},{"x":379,"y":0},{"x":380,"y":0},{"x":381,"y":0},{"x":382,"y":0},{"x":383,"y":0},{"x":384,"y":0},{"x":385,"y":0},{"x":386,"y":0},{"x":387,"y":0},{"x":388,"y":0},{"x":389,"y":0},{"x":390,"y":0},{"x":391,"y":0},{"x":392,"y":0},{"x":393,"y":0},{"x":394,"y":0},{"x":395,"y":0},{"x":396,"y":0},{"x":397,"y":0},{"x":398,"y":0},{"x":399,"y":0},{"x":400,"y":0},{"x":401,"y":0},{"x":402,"y":0},{"x":403,"y":0},{"x":404,"y":0},{"x":405,"y":0},{"x":406,"y":0},{"x":407,"y":0},{"x":408,"y":0},{"x":409,"y":0},{"x":410,"y":0},{"x":411,"y":0},{"x":412,"y":0},{"x":413,"y":0},{"x":414,"y":0},{"x":415,"y":0},{"x":416,"y":0},{"x":417,"y":0},{"x":418,"y":0},{"x":419,"y":0},{"x":420,"y":0},{"x":421,"y":0},{"x":422,"y":0},{"x":423,"y":0},{"x":424,"y":0},{"x":425,"y":0},{"x":426,"y":0},{"x":427,"y":0},{"x":428,"y":0},{"x":429,"y":0},{"x":430,"y":0},{"x":431,"y":0},{"x":432,"y":0},{"x":433,"y":0},{"x":434,"y":0},{"x":435,"y":0},{"x":436,"y":0},{"x":437,"y":0},{"x
":438,"y":0},{"x":439,"y":0},{"x":440,"y":0},{"x":441,"y":0},{"x":442,"y":0},{"x":443,"y":0},{"x":444,"y":0},{"x":445,"y":0},{"x":446,"y":0},{"x":447,"y":0},{"x":448,"y":0},{"x":449,"y":0},{"x":450,"y":0},{"x":451,"y":0},{"x":452,"y":0},{"x":453,"y":0},{"x":454,"y":0},{"x":455,"y":0},{"x":456,"y":0},{"x":457,"y":0},{"x":458,"y":0},{"x":459,"y":0},{"x":460,"y":0},{"x":461,"y":0},{"x":462,"y":0},{"x":463,"y":0},{"x":464,"y":0},{"x":465,"y":0},{"x":466,"y":0},{"x":467,"y":0},{"x":468,"y":0},{"x":469,"y":0},{"x":470,"y":0},{"x":471,"y":0},{"x":472,"y":0},{"x":473,"y":0},{"x":474,"y":0},{"x":475,"y":0},{"x":476,"y":0},{"x":477,"y":0},{"x":478,"y":0},{"x":479,"y":0},{"x":480,"y":0},{"x":481,"y":0},{"x":482,"y":0},{"x":483,"y":0},{"x":484,"y":0},{"x":485,"y":0},{"x":486,"y":0},{"x":487,"y":0},{"x":488,"y":0},{"x":489,"y":0},{"x":490,"y":0},{"x":491,"y":0},{"x":492,"y":0},{"x":493,"y":0},{"x":494,"y":0},{"x":495,"y":0},{"x":496,"y":0},{"x":497,"y":0},{"x":498,"y":0},{"x":499,"y":0}]
,[{"x":0,"y":0},{"x":1,"y":0},{"x":2,"y":0},{"x":3,"y":0},{"x":4,"y":0},{"x":5,"y":0},{"x":6,"y":0},{"x":7,"y":0},{"x":8,"y":0},{"x":9,"y":0},{"x":10,"y":0},{"x":11,"y":0},{"x":12,"y":0},{"x":13,"y":0},{"x":14,"y":0},{"x":15,"y":0},{"x":16,"y":0},{"x":17,"y":0},{"x":18,"y":0},{"x":19,"y":0},{"x":20,"y":0},{"x":21,"y":0},{"x":22,"y":0},{"x":23,"y":0},{"x":24,"y":0},{"x":25,"y":0},{"x":26,"y":0},{"x":27,"y":0},{"x":28,"y":0},{"x":29,"y":0},{"x":30,"y":0},{"x":31,"y":0},{"x":32,"y":0},{"x":33,"y":0},{"x":34,"y":0},{"x":35,"y":0},{"x":36,"y":0},{"x":37,"y":0},{"x":38,"y":0},{"x":39,"y":0},{"x":40,"y":0},{"x":41,"y":0},{"x":42,"y":0},{"x":43,"y":0},{"x":44,"y":0},{"x":45,"y":0},{"x":46,"y":0},{"x":47,"y":0},{"x":48,"y":0},{"x":49,"y":0},{"x":50,"y":0},{"x":51,"y":0},{"x":52,"y":0},{"x":53,"y":0},{"x":54,"y":0},{"x":55,"y":0},{"x":56,"y":0},{"x":57,"y":0},{"x":58,"y":0},{"x":59,"y":0},{"x":60,"y":0},{"x":61,"y":0},{"x":62,"y":0},{"x":63,"y":0},{"x":64,"y":0},{"x":65,"y":0},{"x":66
,"y":0},{"x":67,"y":0},{"x":68,"y":0},{"x":69,"y":0},{"x":70,"y":0},{"x":71,"y":0},{"x":72,"y":0},{"x":73,"y":0},{"x":74,"y":0},{"x":75,"y":0},{"x":76,"y":0},{"x":77,"y":0},{"x":78,"y":0},{"x":79,"y":0},{"x":80,"y":0},{"x":81,"y":0},{"x":82,"y":0},{"x":83,"y":0},{"x":84,"y":0},{"x":85,"y":0},{"x":86,"y":0},{"x":87,"y":0},{"x":88,"y":0},{"x":89,"y":0},{"x":90,"y":0},{"x":91,"y":0},{"x":92,"y":0},{"x":93,"y":0},{"x":94,"y":0},{"x":95,"y":0},{"x":96,"y":0},{"x":97,"y":0},{"x":98,"y":0},{"x":99,"y":0},{"x":100,"y":0},{"x":101,"y":0},{"x":102,"y":0},{"x":103,"y":0},{"x":104,"y":0},{"x":105,"y":0},{"x":106,"y":0},{"x":107,"y":0},{"x":108,"y":0},{"x":109,"y":0},{"x":110,"y":0},{"x":111,"y":0},{"x":112,"y":0},{"x":113,"y":0},{"x":114,"y":0},{"x":115,"y":0},{"x":116,"y":0},{"x":117,"y":0},{"x":118,"y":0},{"x":119,"y":0},{"x":120,"y":0},{"x":121,"y":0},{"x":122,"y":0},{"x":123,"y":0},{"x":124,"y":0},{"x":125,"y":0},{"x":126,"y":0},{"x":127,"y":0},{"x":128,"y":0},{"x":129,"y":0},{"x":1
30,"y":0},{"x":131,"y":0},{"x":132,"y":0},{"x":133,"y":0},{"x":134,"y":0},{"x":135,"y":0},{"x":136,"y":0},{"x":137,"y":0},{"x":138,"y":0},{"x":139,"y":0},{"x":140,"y":0},{"x":141,"y":0},{"x":142,"y":0},{"x":143,"y":0},{"x":144,"y":0},{"x":145,"y":0},{"x":146,"y":0},{"x":147,"y":0},{"x":148,"y":0},{"x":149,"y":0},{"x":150,"y":0},{"x":151,"y":0},{"x":152,"y":0},{"x":153,"y":0},{"x":154,"y":0},{"x":155,"y":0},{"x":156,"y":0},{"x":157,"y":0},{"x":158,"y":0},{"x":159,"y":0},{"x":160,"y":0},{"x":161,"y":0},{"x":162,"y":0},{"x":163,"y":0},{"x":164,"y":0},{"x":165,"y":0},{"x":166,"y":0},{"x":167,"y":0},{"x":168,"y":0},{"x":169,"y":0},{"x":170,"y":0},{"x":171,"y":0},{"x":172,"y":0},{"x":173,"y":0},{"x":174,"y":0},{"x":175,"y":0},{"x":176,"y":0},{"x":177,"y":0},{"x":178,"y":0},{"x":179,"y":0},{"x":180,"y":0},{"x":181,"y":0},{"x":182,"y":0},{"x":183,"y":0},{"x":184,"y":0},{"x":185,"y":0},{"x":186,"y":0},{"x":187,"y":0},{"x":188,"y":0},{"x":189,"y":0},{"x":190,"y":0},{"x":191,"y":0},{"x
":192,"y":0},{"x":193,"y":0},{"x":194,"y":0},{"x":195,"y":0},{"x":196,"y":0},{"x":197,"y":0},{"x":198,"y":0},{"x":199,"y":0},{"x":200,"y":0},{"x":201,"y":0},{"x":202,"y":0},{"x":203,"y":0},{"x":204,"y":0},{"x":205,"y":0},{"x":206,"y":0},{"x":207,"y":0},{"x":208,"y":0},{"x":209,"y":0},{"x":210,"y":0},{"x":211,"y":0},{"x":212,"y":0},{"x":213,"y":0},{"x":214,"y":0},{"x":215,"y":0},{"x":216,"y":0},{"x":217,"y":0},{"x":218,"y":0},{"x":219,"y":0},{"x":220,"y":0},{"x":221,"y":0},{"x":222,"y":0},{"x":223,"y":0},{"x":224,"y":0},{"x":225,"y":0},{"x":226,"y":0},{"x":227,"y":0},{"x":228,"y":0},{"x":229,"y":0},{"x":230,"y":0},{"x":231,"y":0},{"x":232,"y":0},{"x":233,"y":0},{"x":234,"y":0},{"x":235,"y":0},{"x":236,"y":0},{"x":237,"y":0},{"x":238,"y":0},{"x":239,"y":0},{"x":240,"y":0},{"x":241,"y":0},{"x":242,"y":0},{"x":243,"y":0},{"x":244,"y":0},{"x":245,"y":0},{"x":246,"y":0},{"x":247,"y":0},{"x":248,"y":0},{"x":249,"y":0},{"x":250,"y":0},{"x":251,"y":0},{"x":252,"y":0},{"x":253,"y":0},
{"x":254,"y":0},{"x":255,"y":0},{"x":256,"y":0},{"x":257,"y":0},{"x":258,"y":0},{"x":259,"y":0},{"x":260,"y":0},{"x":261,"y":0},{"x":262,"y":1},{"x":263,"y":1},{"x":264,"y":1},{"x":265,"y":1},{"x":266,"y":1},{"x":267,"y":1},{"x":268,"y":1},{"x":269,"y":1},{"x":270,"y":1},{"x":271,"y":1},{"x":272,"y":1},{"x":273,"y":1},{"x":274,"y":1},{"x":275,"y":1},{"x":276,"y":1},{"x":277,"y":1},{"x":278,"y":1},{"x":279,"y":1},{"x":280,"y":1},{"x":281,"y":1},{"x":282,"y":1},{"x":283,"y":1},{"x":284,"y":1},{"x":285,"y":1},{"x":286,"y":1},{"x":287,"y":1},{"x":288,"y":1},{"x":289,"y":1},{"x":290,"y":1},{"x":291,"y":1},{"x":292,"y":1},{"x":293,"y":1},{"x":294,"y":1},{"x":295,"y":1},{"x":296,"y":1},{"x":297,"y":1},{"x":298,"y":1},{"x":299,"y":1},{"x":300,"y":1},{"x":301,"y":1},{"x":302,"y":1},{"x":303,"y":1},{"x":304,"y":1},{"x":305,"y":1},{"x":306,"y":1},{"x":307,"y":1},{"x":308,"y":1},{"x":309,"y":1},{"x":310,"y":1},{"x":311,"y":1},{"x":312,"y":1},{"x":313,"y":1},{"x":314,"y":1},{"x":315,"y":
1},{"x":316,"y":1},{"x":317,"y":1},{"x":318,"y":1},{"x":319,"y":1},{"x":320,"y":1},{"x":321,"y":1},{"x":322,"y":1},{"x":323,"y":1},{"x":324,"y":1},{"x":325,"y":1},{"x":326,"y":1},{"x":327,"y":1},{"x":328,"y":1},{"x":329,"y":1},{"x":330,"y":1},{"x":331,"y":1},{"x":332,"y":1},{"x":333,"y":1},{"x":334,"y":1},{"x":335,"y":1},{"x":336,"y":1},{"x":337,"y":1},{"x":338,"y":1},{"x":339,"y":1},{"x":340,"y":1},{"x":341,"y":1},{"x":342,"y":1},{"x":343,"y":1},{"x":344,"y":1},{"x":345,"y":1},{"x":346,"y":1},{"x":347,"y":1},{"x":348,"y":1},{"x":349,"y":1},{"x":350,"y":1},{"x":351,"y":1},{"x":352,"y":1},{"x":353,"y":1},{"x":354,"y":1},{"x":355,"y":1},{"x":356,"y":1},{"x":357,"y":1},{"x":358,"y":1},{"x":359,"y":1},{"x":360,"y":1},{"x":361,"y":1},{"x":362,"y":1},{"x":363,"y":1},{"x":364,"y":1},{"x":365,"y":1},{"x":366,"y":1},{"x":367,"y":1},{"x":368,"y":1},{"x":369,"y":1},{"x":370,"y":1},{"x":371,"y":1},{"x":372,"y":1},{"x":373,"y":1},{"x":374,"y":1},{"x":375,"y":0},{"x":376,"y":0},{"x":377,"
y":0},{"x":378,"y":0},{"x":379,"y":0},{"x":380,"y":0},{"x":381,"y":0},{"x":382,"y":0},{"x":383,"y":0},{"x":384,"y":0},{"x":385,"y":0},{"x":386,"y":0},{"x":387,"y":0},{"x":388,"y":0},{"x":389,"y":0},{"x":390,"y":0},{"x":391,"y":0},{"x":392,"y":0},{"x":393,"y":0},{"x":394,"y":0},{"x":395,"y":0},{"x":396,"y":0},{"x":397,"y":0},{"x":398,"y":0},{"x":399,"y":0},{"x":400,"y":0},{"x":401,"y":0},{"x":402,"y":0},{"x":403,"y":0},{"x":404,"y":0},{"x":405,"y":0},{"x":406,"y":0},{"x":407,"y":0},{"x":408,"y":0},{"x":409,"y":0},{"x":410,"y":0},{"x":411,"y":0},{"x":412,"y":0},{"x":413,"y":0},{"x":414,"y":0},{"x":415,"y":0},{"x":416,"y":0},{"x":417,"y":0},{"x":418,"y":0},{"x":419,"y":0},{"x":420,"y":0},{"x":421,"y":0},{"x":422,"y":0},{"x":423,"y":0},{"x":424,"y":0},{"x":425,"y":0},{"x":426,"y":0},{"x":427,"y":0},{"x":428,"y":0},{"x":429,"y":0},{"x":430,"y":0},{"x":431,"y":0},{"x":432,"y":0},{"x":433,"y":0},{"x":434,"y":0},{"x":435,"y":0},{"x":436,"y":0},{"x":437,"y":0},{"x":438,"y":0},{"x":43
9,"y":0},{"x":440,"y":0},{"x":441,"y":0},{"x":442,"y":0},{"x":443,"y":0},{"x":444,"y":0},{"x":445,"y":0},{"x":446,"y":0},{"x":447,"y":0},{"x":448,"y":0},{"x":449,"y":0},{"x":450,"y":0},{"x":451,"y":0},{"x":452,"y":0},{"x":453,"y":0},{"x":454,"y":0},{"x":455,"y":0},{"x":456,"y":0},{"x":457,"y":0},{"x":458,"y":0},{"x":459,"y":0},{"x":460,"y":0},{"x":461,"y":0},{"x":462,"y":0},{"x":463,"y":0},{"x":464,"y":0},{"x":465,"y":0},{"x":466,"y":0},{"x":467,"y":0},{"x":468,"y":0},{"x":469,"y":0},{"x":470,"y":0},{"x":471,"y":0},{"x":472,"y":0},{"x":473,"y":0},{"x":474,"y":0},{"x":475,"y":0},{"x":476,"y":0},{"x":477,"y":0},{"x":478,"y":0},{"x":479,"y":0},{"x":480,"y":0},{"x":481,"y":0},{"x":482,"y":0},{"x":483,"y":0},{"x":484,"y":0},{"x":485,"y":0},{"x":486,"y":0},{"x":487,"y":0},{"x":488,"y":0},{"x":489,"y":0},{"x":490,"y":0},{"x":491,"y":0},{"x":492,"y":0},{"x":493,"y":0},{"x":494,"y":0},{"x":495,"y":0},{"x":496,"y":0},{"x":497,"y":0},{"x":498,"y":0},{"x":499,"y":0}],[{"x":0,"y":0},{"x"
:1,"y":0},{"x":2,"y":0},{"x":3,"y":0},{"x":4,"y":0},{"x":5,"y":0},{"x":6,"y":0},{"x":7,"y":0},{"x":8,"y":0},{"x":9,"y":0},{"x":10,"y":0},{"x":11,"y":0},{"x":12,"y":0},{"x":13,"y":0},{"x":14,"y":0},{"x":15,"y":0},{"x":16,"y":0},{"x":17,"y":0},{"x":18,"y":0},{"x":19,"y":0},{"x":20,"y":0},{"x":21,"y":0},{"x":22,"y":0},{"x":23,"y":0},{"x":24,"y":0},{"x":25,"y":0},{"x":26,"y":0},{"x":27,"y":0},{"x":28,"y":0},{"x":29,"y":0},{"x":30,"y":0},{"x":31,"y":0},{"x":32,"y":0},{"x":33,"y":0},{"x":34,"y":0},{"x":35,"y":0},{"x":36,"y":0},{"x":37,"y":0},{"x":38,"y":0},{"x":39,"y":0},{"x":40,"y":0},{"x":41,"y":0},{"x":42,"y":0},{"x":43,"y":0},{"x":44,"y":0},{"x":45,"y":0},{"x":46,"y":0},{"x":47,"y":0},{"x":48,"y":0},{"x":49,"y":0},{"x":50,"y":0},{"x":51,"y":0},{"x":52,"y":0},{"x":53,"y":0},{"x":54,"y":0},{"x":55,"y":0},{"x":56,"y":0},{"x":57,"y":0},{"x":58,"y":0},{"x":59,"y":0},{"x":60,"y":0},{"x":61,"y":0},{"x":62,"y":0},{"x":63,"y":0},{"x":64,"y":0},{"x":65,"y":0},{"x":66,"y":0},{"x":67,"y":
0},{"x":68,"y":0},{"x":69,"y":0},{"x":70,"y":0},{"x":71,"y":0},{"x":72,"y":0},{"x":73,"y":0},{"x":74,"y":0},{"x":75,"y":0},{"x":76,"y":0},{"x":77,"y":0},{"x":78,"y":0},{"x":79,"y":0},{"x":80,"y":0},{"x":81,"y":0},{"x":82,"y":0},{"x":83,"y":0},{"x":84,"y":0},{"x":85,"y":0},{"x":86,"y":0},{"x":87,"y":0},{"x":88,"y":0},{"x":89,"y":0},{"x":90,"y":0},{"x":91,"y":0},{"x":92,"y":0},{"x":93,"y":0},{"x":94,"y":0},{"x":95,"y":0},{"x":96,"y":0},{"x":97,"y":0},{"x":98,"y":0},{"x":99,"y":0},{"x":100,"y":0},{"x":101,"y":0},{"x":102,"y":0},{"x":103,"y":0},{"x":104,"y":0},{"x":105,"y":0},{"x":106,"y":0},{"x":107,"y":0},{"x":108,"y":0},{"x":109,"y":0},{"x":110,"y":0},{"x":111,"y":0},{"x":112,"y":0},{"x":113,"y":0},{"x":114,"y":0},{"x":115,"y":0},{"x":116,"y":0},{"x":117,"y":0},{"x":118,"y":0},{"x":119,"y":0},{"x":120,"y":0},{"x":121,"y":0},{"x":122,"y":0},{"x":123,"y":0},{"x":124,"y":0},{"x":125,"y":0},{"x":126,"y":0},{"x":127,"y":0},{"x":128,"y":0},{"x":129,"y":0},{"x":130,"y":0},{"x":131,"
y":0},{"x":132,"y":0},{"x":133,"y":0},{"x":134,"y":0},{"x":135,"y":0},{"x":136,"y":0},{"x":137,"y":0},{"x":138,"y":0},{"x":139,"y":0},{"x":140,"y":0},{"x":141,"y":0},{"x":142,"y":0},{"x":143,"y":0},{"x":144,"y":0},{"x":145,"y":0},{"x":146,"y":0},{"x":147,"y":0},{"x":148,"y":0},{"x":149,"y":0},{"x":150,"y":0},{"x":151,"y":0},{"x":152,"y":0},{"x":153,"y":0},{"x":154,"y":0},{"x":155,"y":0},{"x":156,"y":0},{"x":157,"y":0},{"x":158,"y":0},{"x":159,"y":0},{"x":160,"y":0},{"x":161,"y":0},{"x":162,"y":0},{"x":163,"y":0},{"x":164,"y":0},{"x":165,"y":0},{"x":166,"y":0},{"x":167,"y":0},{"x":168,"y":0},{"x":169,"y":0},{"x":170,"y":0},{"x":171,"y":0},{"x":172,"y":0},{"x":173,"y":0},{"x":174,"y":0},{"x":175,"y":0},{"x":176,"y":0},{"x":177,"y":0},{"x":178,"y":0},{"x":179,"y":0},{"x":180,"y":0},{"x":181,"y":0},{"x":182,"y":0},{"x":183,"y":0},{"x":184,"y":0},{"x":185,"y":0},{"x":186,"y":0},{"x":187,"y":0},{"x":188,"y":0},{"x":189,"y":0},{"x":190,"y":0},{"x":191,"y":0},{"x":192,"y":0},{"x":19
3,"y":0},{"x":194,"y":0},{"x":195,"y":0},{"x":196,"y":0},{"x":197,"y":0},{"x":198,"y":0},{"x":199,"y":0},{"x":200,"y":0},{"x":201,"y":0},{"x":202,"y":0},{"x":203,"y":0},{"x":204,"y":0},{"x":205,"y":0},{"x":206,"y":0},{"x":207,"y":0},{"x":208,"y":0},{"x":209,"y":0},{"x":210,"y":0},{"x":211,"y":0},{"x":212,"y":0},{"x":213,"y":0},{"x":214,"y":0},{"x":215,"y":0},{"x":216,"y":0},{"x":217,"y":0},{"x":218,"y":0},{"x":219,"y":0},{"x":220,"y":0},{"x":221,"y":0},{"x":222,"y":0},{"x":223,"y":0},{"x":224,"y":0},{"x":225,"y":0},{"x":226,"y":0},{"x":227,"y":0},{"x":228,"y":0},{"x":229,"y":0},{"x":230,"y":0},{"x":231,"y":0},{"x":232,"y":0},{"x":233,"y":0},{"x":234,"y":0},{"x":235,"y":0},{"x":236,"y":0},{"x":237,"y":0},{"x":238,"y":0},{"x":239,"y":0},{"x":240,"y":0},{"x":241,"y":0},{"x":242,"y":0},{"x":243,"y":0},{"x":244,"y":0},{"x":245,"y":0},{"x":246,"y":0},{"x":247,"y":0},{"x":248,"y":0},{"x":249,"y":0},{"x":250,"y":0},{"x":251,"y":0},{"x":252,"y":0},{"x":253,"y":0},{"x":254,"y":0},{"x"
:255,"y":0},{"x":256,"y":0},{"x":257,"y":0},{"x":258,"y":0},{"x":259,"y":0},{"x":260,"y":0},{"x":261,"y":0},{"x":262,"y":0},{"x":263,"y":0},{"x":264,"y":0},{"x":265,"y":0},{"x":266,"y":0},{"x":267,"y":0},{"x":268,"y":0},{"x":269,"y":0},{"x":270,"y":0},{"x":271,"y":0},{"x":272,"y":0},{"x":273,"y":0},{"x":274,"y":0},{"x":275,"y":0},{"x":276,"y":0},{"x":277,"y":0},{"x":278,"y":0},{"x":279,"y":0},{"x":280,"y":0},{"x":281,"y":0},{"x":282,"y":0},{"x":283,"y":0},{"x":284,"y":0},{"x":285,"y":0},{"x":286,"y":0},{"x":287,"y":0},{"x":288,"y":0},{"x":289,"y":0},{"x":290,"y":0},{"x":291,"y":0},{"x":292,"y":0},{"x":293,"y":0},{"x":294,"y":0},{"x":295,"y":0},{"x":296,"y":0},{"x":297,"y":0},{"x":298,"y":0},{"x":299,"y":0},{"x":300,"y":0},{"x":301,"y":0},{"x":302,"y":0},{"x":303,"y":0},{"x":304,"y":0},{"x":305,"y":0},{"x":306,"y":0},{"x":307,"y":0},{"x":308,"y":0},{"x":309,"y":0},{"x":310,"y":0},{"x":311,"y":0},{"x":312,"y":0},{"x":313,"y":0},{"x":314,"y":0},{"x":315,"y":0},{"x":316,"y":0},{
"x":317,"y":0},{"x":318,"y":0},{"x":319,"y":0},{"x":320,"y":0},{"x":321,"y":0},{"x":322,"y":0},{"x":323,"y":0},{"x":324,"y":0},{"x":325,"y":0},{"x":326,"y":0},{"x":327,"y":0},{"x":328,"y":0},{"x":329,"y":0},{"x":330,"y":0},{"x":331,"y":0},{"x":332,"y":0},{"x":333,"y":0},{"x":334,"y":0},{"x":335,"y":0},{"x":336,"y":0},{"x":337,"y":0},{"x":338,"y":0},{"x":339,"y":0},{"x":340,"y":0},{"x":341,"y":0},{"x":342,"y":0},{"x":343,"y":0},{"x":344,"y":0},{"x":345,"y":0},{"x":346,"y":0},{"x":347,"y":0},{"x":348,"y":0},{"x":349,"y":0},{"x":350,"y":0},{"x":351,"y":0},{"x":352,"y":0},{"x":353,"y":0},{"x":354,"y":0},{"x":355,"y":0},{"x":356,"y":0},{"x":357,"y":0},{"x":358,"y":0},{"x":359,"y":0},{"x":360,"y":0},{"x":361,"y":0},{"x":362,"y":0},{"x":363,"y":0},{"x":364,"y":0},{"x":365,"y":0},{"x":366,"y":0},{"x":367,"y":0},{"x":368,"y":0},{"x":369,"y":0},{"x":370,"y":0},{"x":371,"y":0},{"x":372,"y":0},{"x":373,"y":0},{"x":374,"y":0},{"x":375,"y":1},{"x":376,"y":1},{"x":377,"y":1},{"x":378,"y":1
},{"x":379,"y":1},{"x":380,"y":1},{"x":381,"y":1},{"x":382,"y":1},{"x":383,"y":1},{"x":384,"y":1},{"x":385,"y":1},{"x":386,"y":1},{"x":387,"y":1},{"x":388,"y":1},{"x":389,"y":1},{"x":390,"y":1},{"x":391,"y":1},{"x":392,"y":1},{"x":393,"y":1},{"x":394,"y":1},{"x":395,"y":1},{"x":396,"y":1},{"x":397,"y":1},{"x":398,"y":1},{"x":399,"y":1},{"x":400,"y":1},{"x":401,"y":1},{"x":402,"y":1},{"x":403,"y":1},{"x":404,"y":1},{"x":405,"y":1},{"x":406,"y":1},{"x":407,"y":1},{"x":408,"y":1},{"x":409,"y":1},{"x":410,"y":1},{"x":411,"y":1},{"x":412,"y":1},{"x":413,"y":1},{"x":414,"y":0},{"x":415,"y":0},{"x":416,"y":0},{"x":417,"y":0},{"x":418,"y":0},{"x":419,"y":0},{"x":420,"y":0},{"x":421,"y":0},{"x":422,"y":0},{"x":423,"y":0},{"x":424,"y":0},{"x":425,"y":0},{"x":426,"y":0},{"x":427,"y":0},{"x":428,"y":0},{"x":429,"y":0},{"x":430,"y":0},{"x":431,"y":0},{"x":432,"y":0},{"x":433,"y":0},{"x":434,"y":0},{"x":435,"y":0},{"x":436,"y":0},{"x":437,"y":0},{"x":438,"y":0},{"x":439,"y":0},{"x":440,"y
":0},{"x":441,"y":0},{"x":442,"y":0},{"x":443,"y":0},{"x":444,"y":0},{"x":445,"y":0},{"x":446,"y":0},{"x":447,"y":0},{"x":448,"y":0},{"x":449,"y":0},{"x":450,"y":0},{"x":451,"y":0},{"x":452,"y":0},{"x":453,"y":0},{"x":454,"y":0},{"x":455,"y":0},{"x":456,"y":0},{"x":457,"y":0},{"x":458,"y":0},{"x":459,"y":0},{"x":460,"y":0},{"x":461,"y":0},{"x":462,"y":0},{"x":463,"y":0},{"x":464,"y":0},{"x":465,"y":0},{"x":466,"y":0},{"x":467,"y":0},{"x":468,"y":0},{"x":469,"y":0},{"x":470,"y":0},{"x":471,"y":0},{"x":472,"y":0},{"x":473,"y":0},{"x":474,"y":0},{"x":475,"y":0},{"x":476,"y":0},{"x":477,"y":0},{"x":478,"y":0},{"x":479,"y":0},{"x":480,"y":0},{"x":481,"y":0},{"x":482,"y":0},{"x":483,"y":0},{"x":484,"y":0},{"x":485,"y":0},{"x":486,"y":0},{"x":487,"y":0},{"x":488,"y":0},{"x":489,"y":0},{"x":490,"y":0},{"x":491,"y":0},{"x":492,"y":0},{"x":493,"y":0},{"x":494,"y":0},{"x":495,"y":0},{"x":496,"y":0},{"x":497,"y":0},{"x":498,"y":0},{"x":499,"y":0}]]',
[... 33 lines stripped ...]
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/services_mapper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/services_mapper.js?rev=1418952&r1=1418951&r2=1418952&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/services_mapper.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/services_mapper.js Sun Dec 9 13:43:07 2012
@@ -5,9 +5,9 @@
* 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
@@ -26,12 +26,22 @@ App.servicesMapper = App.QuickDataMapper
components_key: 'components',
components_type: 'array',
components: {
- item: 'ServiceComponentInfo.component_name'
+ item: 'ServiceComponentInfo.component_name',
+ host_components_key: 'host_components',
+ host_components_type: 'array',
+ host_components: {
+ item: 'HostRoles.component_name'
+ }
+ },
+ host_components_key: 'components[0].host_components',
+ host_components_type: 'array',
+ host_components: {
+ item: 'id'
}
},
-
- hdfsConfig : {
- version : 'nameNodeComponent.ServiceComponentInfo.Version',
+
+ hdfsConfig: {
+ version: 'nameNodeComponent.ServiceComponentInfo.Version',
name_node_id: 'nameNodeComponent.host_components[0].HostRoles.host_name',
sname_node_id: 'snameNodeComponent.host_components[0].HostRoles.host_name',
data_nodes: 'data_nodes',
@@ -51,7 +61,7 @@ App.servicesMapper = App.QuickDataMapper
upgrade_status: 'nameNodeComponent.ServiceComponentInfo.UpgradeFinalized',
safe_mode_status: 'nameNodeComponent.ServiceComponentInfo.Safemode'
},
-
+
mapReduceConfig: {
version: 'jobTrackerComponent.ServiceComponentInfo.Version',
job_tracker_id: 'jobTrackerComponent.host_components[0].HostRoles.host_name',
@@ -76,7 +86,7 @@ App.servicesMapper = App.QuickDataMapper
reduces_waiting: 'jobTrackerComponent.host_components[0].metrics.mapred.jobtracker.waiting_reduces',
trackers_decommisioned: 'jobTrackerComponent.host_components[0].metrics.mapred.jobtracker.trackers_decommissioned'
},
-
+
hbaseConfig: {
version: 'masterComponent.ServiceComponentInfo.Version',
master_id: 'masterComponent.host_components[0].HostRoles.host_name',
@@ -99,6 +109,14 @@ App.servicesMapper = App.QuickDataMapper
host_id: 'host_components[0].HostRoles.host_name',
$decommissioned: false
},
+ model3: App.HostComponent,
+ config3: {
+ id: 'id',
+ work_status: 'HostRoles.state',
+ component_name: 'HostRoles.component_name',
+ host: 'HostRoles.host_name',
+ service: 'component[0].ServiceComponentInfo.service_name'
+ },
map: function (json) {
if (!this.get('model')) {
@@ -109,6 +127,11 @@ App.servicesMapper = App.QuickDataMapper
var result = [];
json.items.forEach(function (item) {
var finalConfig = jQuery.extend({}, this.config);
+ item.components.forEach(function (component) {
+ component.host_components.forEach(function (host_component) {
+ host_component.id = host_component.HostRoles.component_name + "_" + host_component.HostRoles.host_name;
+ }, this)
+ }, this);
if (item && item.ServiceInfo && item.ServiceInfo.service_name == "HDFS") {
// Change the JSON so that it is easy to map
var hdfsConfig = this.hdfsConfig;
@@ -123,13 +146,13 @@ App.servicesMapper = App.QuickDataMapper
item.live_data_nodes = [];
item.dead_data_nodes = [];
item.decommision_data_nodes = [];
- for(var ln in liveNodesJson){
+ for (var ln in liveNodesJson) {
item.live_data_nodes.push(ln);
}
- for(var dn in deadNodesJson){
+ for (var dn in deadNodesJson) {
item.dead_data_nodes.push(dn);
}
- for(var dcn in decommisionNodesJson){
+ for (var dcn in decommisionNodesJson) {
item.decommision_data_nodes.push(dcn);
}
}
@@ -137,11 +160,11 @@ App.servicesMapper = App.QuickDataMapper
item.snameNodeComponent = component;
}
if (component.ServiceComponentInfo && component.ServiceComponentInfo.component_name == "DATANODE") {
- if(!item.data_nodes){
+ if (!item.data_nodes) {
item.data_nodes = [];
}
- if(component.host_components){
- component.host_components.forEach(function(hc){
+ if (component.host_components) {
+ component.host_components.forEach(function (hc) {
item.data_nodes.push(hc.HostRoles.host_name);
});
}
@@ -152,60 +175,60 @@ App.servicesMapper = App.QuickDataMapper
result.push(finalJson);
App.store.load(App.HDFSService, finalJson);
} else if (item && item.ServiceInfo && item.ServiceInfo.service_name == "MAPREDUCE") {
- // Change the JSON so that it is easy to map
- var mapReduceConfig = this.mapReduceConfig;
- item.components.forEach(function (component) {
- if (component.ServiceComponentInfo && component.ServiceComponentInfo.component_name == "JOBTRACKER") {
- item.jobTrackerComponent = component;
- finalConfig = jQuery.extend(finalConfig, mapReduceConfig);
- // Get the live, gray & black nodes from string json
- item.map_slots = 0;
- item.reduce_slots = 0;
- var liveNodesJson = jQuery.parseJSON(component.ServiceComponentInfo.AliveNodes);
- var grayNodesJson = jQuery.parseJSON(component.ServiceComponentInfo.GrayListedNodes);
- var blackNodesJson = jQuery.parseJSON(component.ServiceComponentInfo.BlackListedNodes);
- item.alive_trackers = [];
- item.gray_list_trackers = [];
- item.black_list_trackers = [];
- if (liveNodesJson != null) {
- liveNodesJson.forEach(function(nj){
- item.alive_trackers.push(nj.hostname);
- if(nj.slots && nj.slots.map_slots)
- item.map_slots += nj.slots.map_slots;
- if(nj.slots && nj.slots.map_slots_used)
- item.map_slots_used += nj.slots.map_slots_used;
- if(nj.slots && nj.slots.reduce_slots)
- item.reduce_slots += nj.slots.reduce_slots;
- if(nj.slots && nj.slots.reduce_slots_used)
- item.reduce_slots_used += nj.slots.reduce_slots_used;
- });
- }
- if (grayNodesJson != null) {
- grayNodesJson.forEach(function(nj){
- item.gray_list_trackers.push(nj.hostname);
- });
- }
- if (blackNodesJson != null) {
- blackNodesJson.forEach(function(nj){
- item.black_list_trackers.push(nj.hostname);
- });
- }
- }
- if (component.ServiceComponentInfo && component.ServiceComponentInfo.component_name == "TASKTRACKER") {
- if(!item.task_trackers){
- item.task_trackers = [];
- }
- if(component.host_components){
- component.host_components.forEach(function(hc){
- item.task_trackers.push(hc.HostRoles.host_name);
- });
- }
- }
- });
- // Map
- finalJson = this.parseIt(item, finalConfig);
- result.push(finalJson);
- App.store.load(App.MapReduceService, finalJson);
+ // Change the JSON so that it is easy to map
+ var mapReduceConfig = this.mapReduceConfig;
+ item.components.forEach(function (component) {
+ if (component.ServiceComponentInfo && component.ServiceComponentInfo.component_name == "JOBTRACKER") {
+ item.jobTrackerComponent = component;
+ finalConfig = jQuery.extend(finalConfig, mapReduceConfig);
+ // Get the live, gray & black nodes from string json
+ item.map_slots = 0;
+ item.reduce_slots = 0;
+ var liveNodesJson = jQuery.parseJSON(component.ServiceComponentInfo.AliveNodes);
+ var grayNodesJson = jQuery.parseJSON(component.ServiceComponentInfo.GrayListedNodes);
+ var blackNodesJson = jQuery.parseJSON(component.ServiceComponentInfo.BlackListedNodes);
+ item.alive_trackers = [];
+ item.gray_list_trackers = [];
+ item.black_list_trackers = [];
+ if (liveNodesJson != null) {
+ liveNodesJson.forEach(function (nj) {
+ item.alive_trackers.push(nj.hostname);
+ if (nj.slots && nj.slots.map_slots)
+ item.map_slots += nj.slots.map_slots;
+ if (nj.slots && nj.slots.map_slots_used)
+ item.map_slots_used += nj.slots.map_slots_used;
+ if (nj.slots && nj.slots.reduce_slots)
+ item.reduce_slots += nj.slots.reduce_slots;
+ if (nj.slots && nj.slots.reduce_slots_used)
+ item.reduce_slots_used += nj.slots.reduce_slots_used;
+ });
+ }
+ if (grayNodesJson != null) {
+ grayNodesJson.forEach(function (nj) {
+ item.gray_list_trackers.push(nj.hostname);
+ });
+ }
+ if (blackNodesJson != null) {
+ blackNodesJson.forEach(function (nj) {
+ item.black_list_trackers.push(nj.hostname);
+ });
+ }
+ }
+ if (component.ServiceComponentInfo && component.ServiceComponentInfo.component_name == "TASKTRACKER") {
+ if (!item.task_trackers) {
+ item.task_trackers = [];
+ }
+ if (component.host_components) {
+ component.host_components.forEach(function (hc) {
+ item.task_trackers.push(hc.HostRoles.host_name);
+ });
+ }
+ }
+ });
+ // Map
+ finalJson = this.parseIt(item, finalConfig);
+ result.push(finalJson);
+ App.store.load(App.MapReduceService, finalJson);
} else if (item && item.ServiceInfo && item.ServiceInfo.service_name == "HBASE") {
// Change the JSON so that it is easy to map
var hbaseConfig = this.hbaseConfig;
@@ -220,8 +243,8 @@ App.servicesMapper = App.QuickDataMapper
if (!item.region_servers) {
item.region_servers = [];
}
- if(component.host_components){
- component.host_components.forEach(function(hc){
+ if (component.host_components) {
+ component.host_components.forEach(function (hc) {
item.region_servers.push(hc.HostRoles.host_name);
});
}
@@ -236,6 +259,7 @@ App.servicesMapper = App.QuickDataMapper
}
}, this);
+
App.store.loadMany(this.get('model'), result);
result = [];
@@ -246,6 +270,16 @@ App.servicesMapper = App.QuickDataMapper
}, this);
App.store.loadMany(this.get('model2'), result);
+
+ result = [];
+ json.items.forEach(function (item) {
+ item.components.forEach(function (component) {
+ component.host_components.forEach(function (host_component) {
+ result.push(this.parseIt(host_component, this.config3));
+ }, this)
+ }, this)
+ }, this);
+ App.store.loadMany(this.get('model3'), result);
}
}
});
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/models.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/models.js?rev=1418952&r1=1418951&r2=1418952&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/models.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/models.js Sun Dec 9 13:43:07 2012
@@ -41,3 +41,4 @@ require('models/job');
require('models/run');
require('models/app');
require('models/background_operation');
+require('models/host_component');
\ No newline at end of file
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/models/form.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/models/form.js?rev=1418952&r1=1418951&r2=1418952&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/models/form.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/models/form.js Sun Dec 9 13:43:07 2012
@@ -35,13 +35,10 @@ App.Form = Em.View.extend({
init:function () {
var thisForm = this;
- console.warn("FIELDS LEN:", this.fields.length);
-
if (!this.fields.length) {
this.fieldsOptions.forEach(
function (options) {
var field = App.FormField.create(options);
- console.warn("CREATED FIELD VALUE:", field.get('value'));
field.set('form', thisForm);
thisForm.fields.push(field);
thisForm.set("field." + field.get('name'), field);
@@ -290,7 +287,7 @@ App.FormField = Em.Object.extend({ // tr
if (!isError) {
this.set('errorMessage', '');
}
- }.observes('value'),
+ },
isHiddenField:function () {
return this.get('displayType') == 'hidden';
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/models/host.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/models/host.js?rev=1418952&r1=1418951&r2=1418952&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/models/host.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/models/host.js Sun Dec 9 13:43:07 2012
@@ -24,6 +24,7 @@ App.Host = DS.Model.extend({
hostName: DS.attr('string'),
cluster: DS.belongsTo('App.Cluster'),
components: DS.hasMany('App.Component'),
+ hostComponents: DS.hasMany('App.HostComponent'),
cpu: DS.attr('string'),
memory: DS.attr('string'),
diskUsage: DS.attr('string'),
@@ -39,11 +40,12 @@ App.Host = DS.Model.extend({
osType: DS.attr("string"),
diskInfo: DS.attr('string'),
+
/**
* formatted bytes to appropriate value
*/
memoryFormatted: function () {
- return misc.formatBandwidth(this.get('memory'));
+ return misc.formatBandwidth(this.get('memory') * 1000);
}.property('memory'),
/**
* Return true if host not heartbeating last 180 seconds
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/models/host_component.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/models/host_component.js?rev=1418952&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/models/host_component.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/models/host_component.js Sun Dec 9 13:43:07 2012
@@ -0,0 +1,57 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+App.HostComponent = DS.Model.extend({
+ workStatus: DS.attr('string'),
+ componentName: DS.attr('string'),
+ host: DS.belongsTo('App.Host'),
+ service: DS.belongsTo('App.Service'),
+
+ isRunning: function(){
+ return (this.get('workStatus') == 'STARTED' || this.get('workStatus') == 'STARTING');
+ }.property('workStatus'),
+ displayName: function () { console.log('model',this.get('isLoaded'));
+ return App.format.role(this.get('componentName'));
+ }.property('componentName')
+})
+
+App.HostComponent.Status = {
+ started: "STARTED",
+ starting: "STARTING",
+ stopped: "INSTALLED",
+ stopping: "STOPPING",
+
+ getKeyName:function(value){
+ switch(value){
+ case this.started:
+ return 'started';
+ case this.starting:
+ return 'starting';
+ case this.stopped:
+ return 'installed';
+ case this.stopping:
+ return 'stopping';
+ }
+ return 'none';
+ }
+}
+
+App.HostComponent.FIXTURES = [];
+
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/models/run.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/models/run.js?rev=1418952&r1=1418951&r2=1418952&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/models/run.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/models/run.js Sun Dec 9 13:43:07 2012
@@ -96,7 +96,7 @@ App.Run = DS.Model.extend({
return 'Hive';
}
if (this.get('id').indexOf('mr_') === 0) {
- return 'mapReduce';
+ return 'MapReduce';
}
}.property('id')
});
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/models/service.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/models/service.js?rev=1418952&r1=1418951&r2=1418952&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/models/service.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/models/service.js Sun Dec 9 13:43:07 2012
@@ -28,9 +28,29 @@ App.Service = DS.Model.extend({
alerts: DS.hasMany('App.Alert'),
quickLinks: DS.hasMany('App.QuickLinks'),
components: DS.hasMany('App.Component'),
+ hostComponents: DS.hasMany('App.HostComponent'),
+ isRunning: function(){
+ var workStatus = this.get('workStatus');
+ if([App.Service.Health.live, App.Service.Health.starting].contains(workStatus) ){
+ return true;
+ }
+ return false;
+ }.property('workStatus'),
+
+ healthStatus: function(){
+ var components = this.get('components').filterProperty('isMaster', true);
+ if(components.everyProperty('workStatus', App.Component.Status.started)){
+ return 'green';
+ } else if(components.someProperty('workStatus', App.Component.Status.stopped)){
+ return 'red';
+ } else if(components.someProperty('workStatus', App.Component.Status.starting)){
+ return 'green-blinking';
+ }
+ return 'red-blinking';
+ }.property('components.@each.workStatus'),
displayName: function () {
- switch (this.get('serviceName')) {
+ switch (this.get('serviceName').toLowerCase()) {
case 'hdfs':
return 'HDFS';
case 'mapreduce':
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/models/user.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/models/user.js?rev=1418952&r1=1418951&r2=1418952&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/models/user.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/models/user.js Sun Dec 9 13:43:07 2012
@@ -34,7 +34,7 @@ App.User = DS.Model.extend({
}.property('userName')
});
-App.UserForm = App.Form.extend({
+App.EditUserForm = App.Form.extend({
className:App.User,
object:function () {
return App.router.get('mainAdminUserEditController.content');
@@ -42,6 +42,71 @@ App.UserForm = App.Form.extend({
fieldsOptions:[
{ name:"userName", displayName:"Username" },
+ { name:"old_password", displayName:"Old Password", displayType:"password", isRequired: function(){ return this.get('form.isObjectNew'); }.property('form.isObjectNew') },
+ { name:"new_password", displayName:"New Password", displayType:"password", isRequired: false },
+ { name:"admin", displayName:"Admin", displayType:"checkbox", isRequired:false },
+ { name:"roles", displayName:"Role", isRequired:false, isHidden:true }
+ ],
+ fields:[],
+ disableUsername:function () {
+ var field = this.getField("userName");
+ if (field) field.set("disabled", this.get('isObjectNew') ? false : "disabled");
+ }.observes('isObjectNew'),
+ disableAdminCheckbox:function () {
+ if (!this.get('isObjectNew')) {
+ var object = this.get('object');
+ var field = this.getField("admin");
+ if (field) {
+ field.set("disabled", (object.get('userName') == App.get('router').getLoginName()) ? "disabled" : false);
+ }
+ }
+ }.observes('isObjectNew'),
+
+ getValues:function () {
+ var values = this._super();
+ values.type = ['local'];
+ return values;
+ },
+
+ isValid:function () {
+
+ var isValid = this._super();
+ thisForm = this;
+
+ var passField = this.get('field.password');
+ var passRetype = this.get('field.passwordRetype');
+
+ if (!validator.empty(passField.get('value'))) {
+ if (passField.get('value') != passRetype.get('value')) {
+ passRetype.set('errorMessage', "Passwords are different");
+ isValid = false;
+ }
+ }
+
+ if (isValid && this.get('isObjectNew')) {
+ var users = App.User.find();
+ var userNameField = this.getField('userName');
+ var userName = userNameField.get('value');
+
+ users.forEach(function (user) {
+ if (userName == user.get('userName')) {
+ userNameField.set('errorMessage', 'User with the same name is already exists');
+ return isValid = false;
+ }
+ });
+ }
+
+ return isValid;
+ }
+});
+App.CreateUserForm = App.Form.extend({
+ className:App.User,
+ object:function () {
+ return App.router.get('mainAdminUserCreateController.content');
+ }.property('App.router.mainAdminUserCreateController.content'),
+
+ fieldsOptions:[
+ { name:"userName", displayName:"Username" },
{ name:"password", displayName:"Password", displayType:"password", isRequired: function(){ return this.get('form.isObjectNew'); }.property('form.isObjectNew') },
{ name:"passwordRetype", displayName:"Retype Password", displayType:"password", validator:"passwordRetype", isRequired: false },
{ name:"admin", displayName:"Admin", displayType:"checkbox", isRequired:false },
@@ -68,6 +133,7 @@ App.UserForm = App.Form.extend({
return values;
},
+
isValid:function () {
var isValid = this._super();
thisForm = this;
@@ -99,33 +165,4 @@ App.UserForm = App.Form.extend({
}
});
App.User.FIXTURES = [];
-/*
- App.User.FIXTURES = [
- {
- id:1,
- user_name:'admin',
- password:'admin',
- admin:1
- },
- {
- id:2,
- user_name:'vrossi',
- admin:1
- },
- {
- id:3,
- user_name:'casey.stoner',
- admin:0
- },
- {
- id:4,
- user_name:'danip',
- admin:0
- },
- {
- id:5,
- user_name:'test',
- password:'test',
- admin:0
- }
- ];*/
+
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/main.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/main.js?rev=1418952&r1=1418951&r2=1418952&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/main.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/main.js Sun Dec 9 13:43:07 2012
@@ -188,7 +188,7 @@ module.exports = Em.Route.extend({
createUser:Em.Route.extend({
route:'/create',
connectOutlets:function (router) {
- router.get('mainAdminController').connectOutlet('mainAdminUserEdit', {});
+ router.get('mainAdminController').connectOutlet('mainAdminUserCreate', {});
}
}),
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less?rev=1418952&r1=1418951&r2=1418952&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less Sun Dec 9 13:43:07 2012
@@ -545,6 +545,12 @@ a:focus {
text-align: right;
}
+/*
+ td {
+ border-top: 1px solid #eee;
+ }
+*/
+
tr td:first-child {
text-align: right;
}
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/admin/user/create.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/admin/user/create.hbs?rev=1418952&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/admin/user/create.hbs (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/admin/user/create.hbs Sun Dec 9 13:43:07 2012
@@ -0,0 +1,38 @@
+{{!
+* 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.
+}}
+
+<form class="form-horizontal">
+ {{#each field in view.userForm.fields}}
+ {{#unless field.isHidden}}
+ <div {{bindAttr class="field.errorMessage:error :control-group"}}>
+ <label class="control-label" for="input{{unbound field.name}}">{{unbound field.displayName}}</label>
+ <div class="controls">
+ {{view field.viewClass valueBinding="field.value" disabledBinding="field.disabled"}}
+ <span class="help-inline">{{field.errorMessage}}</span>
+ </div>
+ </div>
+ {{/unless}}
+ {{/each}}
+ <div class="control-group">
+ <div class="controls">
+ <button type="submit" class="btn" {{action gotoUsers}}>{{t form.cancel}}</button>
+ <button type="submit"
+ class="btn btn-primary" {{action create target="view"}}>{{view.userForm.saveButtonText}}</button>
+ </div>
+ </div>
+</form>
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/admin/user/edit.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/admin/user/edit.hbs?rev=1418952&r1=1418951&r2=1418952&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/admin/user/edit.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/admin/user/edit.hbs Sun Dec 9 13:43:07 2012
@@ -19,7 +19,7 @@
<form class="form-horizontal">
{{#each field in view.userForm.fields}}
{{#unless field.isHidden}}
- <div class="control-group">
+ <div {{bindAttr class="field.errorMessage:error :control-group"}}>
<label class="control-label" for="input{{unbound field.name}}">{{unbound field.displayName}}</label>
<div class="controls">
{{view field.viewClass valueBinding="field.value" disabledBinding="field.disabled"}}
@@ -32,7 +32,7 @@
<div class="controls">
<button type="submit" class="btn" {{action gotoUsers}}>{{t form.cancel}}</button>
<button type="submit"
- class="btn btn-primary" {{action create target="view"}}>{{view.userForm.saveButtonText}}</button>
+ class="btn btn-primary" {{action edit target="view"}}>{{view.userForm.saveButtonText}}</button>
</div>
</div>
</form>
\ No newline at end of file
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host.hbs?rev=1418952&r1=1418951&r2=1418952&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host.hbs Sun Dec 9 13:43:07 2012
@@ -19,16 +19,6 @@
<div id="hosts" class="box">
<div class="box-header">
<div class="button-section">
- <div>
- <div class="span3">
- {{view view.RackCombobox}}
- </div>
- <div class="span">
- <button {{bindAttr disabled="view.assignRackButtonDisabled"}} class="btn" {{action assignHostsToRack target="App.router.mainHostController"}}>
- Assign
- </button>
- </div>
- </div>
<button class="btn btn-inverse add-host-button" {{action addHost}}>
<i class="icon-plus icon-white"></i>
Add New Hosts
@@ -149,7 +139,7 @@
<hr/>
<div class="footer-pagination">
<ul class="nav nav-pills">
- <li class="disabled">Show Hosts</li>
+ <li class="disabled">Show: </li>
<li class="dropdown">
{{view Em.Select contentBinding="pageSizeRange"
selectionBinding="pageSize"
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/service/item.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/service/item.hbs?rev=1418952&r1=1418951&r2=1418952&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/service/item.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/service/item.hbs Sun Dec 9 13:43:07 2012
@@ -32,12 +32,12 @@
{{/each}}
</ul>
</div>
- <a href="javascript:void(null)" {{bindAttr class=":btn controller.content.workStatus:disabled:btn-success" }}
+ <a href="javascript:void(null)" {{bindAttr class=":btn controller.content.isRunning:disabled:btn-success" }}
data-toggle="modal" {{action "startService" target="controller"}}>
<i class="icon-play"></i>
Start
</a>
- <a href="javascript:void(null)" {{bindAttr class=":btn controller.content.workStatus:btn-danger:disabled" }}
+ <a href="javascript:void(null)" {{bindAttr class=":btn controller.content.isRunning:btn-danger:disabled" }}
data-toggle="modal" {{action "stopService" target="controller"}}>
<i class="icon-stop icon-white"></i>
Stop
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/helper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/helper.js?rev=1418952&r1=1418951&r2=1418952&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/helper.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/helper.js Sun Dec 9 13:43:07 2012
@@ -220,10 +220,6 @@ App.format = {
return 'Templeton Server';
case 'TEMPLETON_SERVICE_CHECK':
return 'Templeton Service Check';
- case 'DASHBOARD':
- return 'Dashboard';
- case 'DASHBOARD_SERVICE_CHECK':
- return 'Dashboard Service Check';
case 'NAGIOS_SERVER':
return 'Nagios Server';
case 'GANGLIA_SERVER':
@@ -234,8 +230,6 @@ App.format = {
return 'Gmond Service Check'
case 'GMETAD_SERVICE_CHECK':
return 'Gmetad Service Check';
- case 'MONTOR_WEBSERVER':
- return 'Monitor Webserver'
case 'DECOMMISSION_DATANODE':
return 'Decommission DataNode';
}
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views.js?rev=1418952&r1=1418951&r2=1418952&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views.js Sun Dec 9 13:43:07 2012
@@ -58,6 +58,7 @@ require('views/main/admin/authentication
require('views/main/admin/menu');
require('views/main/admin/security');
require('views/main/admin/user');
+require('views/main/admin/user/create');
require('views/main/admin/user/edit');
require('views/main/admin/user/row');
require('views/main/dashboard');
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user/create.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user/create.js?rev=1418952&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user/create.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user/create.js Sun Dec 9 13:43:07 2012
@@ -0,0 +1,58 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+App.MainAdminUserCreateView = Em.View.extend({
+ templateName: require('templates/main/admin/user/create'),
+ userId: false,
+ create: function(event){
+ var parent_controller=this.get("controller").controllers.mainAdminUserController;
+ var form = this.get("userForm");
+ if(form.isValid()) {
+ if(form.getValues().admin === "" || form.getValues().admin == true) {
+ form.getField("roles").set("value","admin");
+ form.getField("admin").set("value","true");
+ } else{
+ form.getField("roles").set("value","user");
+ }
+
+ parent_controller.sendCommandToServer('users/' + form.getValues().userName, "POST" , {
+ Users: {
+ password: form.getValues().password,
+ roles: form.getValues().roles
+ }
+ }, function (requestId) {
+
+ if (!requestId) {
+ return;
+ }
+
+ form.save();
+
+ App.router.transitionTo("allUsers");
+ })
+ }
+ },
+
+ userForm: App.CreateUserForm.create({}),
+
+ didInsertElement: function(){
+ this.get('userForm').propertyDidChange('object');
+ }
+});
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user/edit.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user/edit.js?rev=1418952&r1=1418951&r2=1418952&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user/edit.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user/edit.js Sun Dec 9 13:43:07 2012
@@ -21,41 +21,43 @@ var App = require('app');
App.MainAdminUserEditView = Em.View.extend({
templateName: require('templates/main/admin/user/edit'),
userId: false,
- create: function(event){
+ edit: function(event){
+ var parent_controller=this.get("controller").controllers.mainAdminUserController;
var form = this.get("userForm");
if(form.isValid()) {
- var controller = this.get('controller');
+ var Users={};
if(form.getValues().admin === "" || form.getValues().admin == true) {
- form.field.roles.set('value',"admin");
- form.field.admin.set('value',"true");
+ form.getField("roles").set("value","admin");
+ form.getField("admin").set("value","true");
} else{
- form.field.roles.set('value',"user");
+ form.getField("roles").set("value","user");
}
- controller.sendCommandToServer('/users/' + form.getValues().userName, {
- Users: {
- password: form.getValues().password,
- roles: form.getValues().roles
- }
+
+ Users.roles = form.getValues().roles;
+
+ if(form.getValues().new_password != "" && form.getValues().old_password != ""){
+ Users.password=form.getValues().new_password;
+ Users.old_password=form.getValues().old_password;
+ }
+
+ parent_controller.sendCommandToServer('users/' + form.getValues().userName, "PUT" , {
+ Users:Users
}, function (requestId) {
if (!requestId) {
return;
}
- if(App.testMode) form.save();
+ form.save();
App.router.transitionTo("allUsers");
})
-
-
}
},
- userForm: App.UserForm.create({}),
-
+ userForm: App.EditUserForm.create({}),
didInsertElement: function(){
this.get('userForm').propertyDidChange('object');
}
-
});
\ No newline at end of file
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/apps/item/bar_view.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/apps/item/bar_view.js?rev=1418952&r1=1418951&r2=1418952&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/apps/item/bar_view.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/apps/item/bar_view.js Sun Dec 9 13:43:07 2012
@@ -20,44 +20,74 @@ var App = require('app');
var graph = require('utils/graph');
App.MainAppsItemBarView = Em.View.extend({
- elementId: 'bars',
- templateName: require('templates/main/apps/item/bar'),
- content:function(){
- return this.get('controller.content.jobs');
- }.property('controller.content.jobs'),
- firstJob: function() {
- return this.get('content').get('firstObject');
- }.property('content'),
- activeJob:null,
- selectJob: function(event) {
- this.set('activeJob', event.context);
-
- },
- onLoad:function () {
- if(!this.get('controller.content.loadAllJobs') || this.get('activeJob')){
- return;
- }
-
- this.set('activeJob', this.get('firstJob'));
- }.observes('controller.content.loadAllJobs'),
- didInsertElement: function(){
- this.onLoad();
- },
- draw: function() {
- if(!this.get('activeJob')){
- return;//when job is not defined
- }
- width = 300;
- height = 210;
- var desc1 = $('#graph1_desc');
- var desc2 = $('#graph2_desc');
- $('.rickshaw_graph, .rickshaw_legend, .rickshaw_annotation_timeline').html('');
- if (null == desc1.html() || null == desc2.html()) return;
- desc1.css('display','block');
- desc2.css('display','block');
- graph.drawJobTimeLine(this.get('activeJob').get('jobTimeLine'), width, height, '#chart', 'legend', 'timeline1');
- graph.drawJobTasks(this.get('activeJob').get('jobTaskView'), width, height, '#job_tasks', 'tasks_legend', 'timeline2');
- }.observes('activeJob')
+ elementId:'bars',
+ templateName:require('templates/main/apps/item/bar'),
+ width:300,
+ height:210,
+ content:function () {
+ return this.get('controller.content.jobs');
+ }.property('controller.content.jobs'),
+ firstJob:function () {
+ return this.get('content').get('firstObject');
+ }.property('content'),
+ activeJob:null,
+ selectJob:function (event) {
+ this.set('activeJob', event.context);
+
+ },
+ onLoad:function () {
+ if (!this.get('controller.content.loadAllJobs') || this.get('activeJob')) {
+ return;
+ }
+
+ this.set('activeJob', this.get('firstJob'));
+ }.observes('controller.content.loadAllJobs'),
+ didInsertElement:function () {
+ this.onLoad();
+ },
+ draw:function () {
+ var self = this;
+ if (!this.get('activeJob')) {
+ return;//when job is not defined
+ }
+
+ var desc1 = $('#graph1_desc');
+ var desc2 = $('#graph2_desc');
+ $('.rickshaw_graph, .rickshaw_legend, .rickshaw_annotation_timeline').html('');
+ if (null == desc1.html() || null == desc2.html()) return;
+ desc1.css('display', 'block');
+ desc2.css('display', 'block');
+
+ this.propertyDidChange('getChartData');
+
+ }.observes('activeJob'),
+
+ jobTimeLine:false,
+ jobTaskView:false,
+
+ updateTimeLine:function () {
+ var url = App.testMode ? '/data/apps/jobs/timeline.json' : "urlTBD" + this.get('activeJob').get('jobName');
+ var mapper = App.jobTimeLineMapper;
+ mapper.set('model', this);
+ App.HttpClient.get(url, mapper);
+ }.observes('getChartData'),
+
+ updateTasksView:function () {
+ var url = App.testMode ? '/data/apps/jobs/taskview.json' : "urlTBD" + this.get('activeJob').get('jobName');
+ var mapper = App.jobTasksMapper;
+ mapper.set('model', this);
+ App.HttpClient.get(url, mapper);
+ }.observes('getChartData'),
+
+ drawJobTimeline:function () {
+ var timeline = JSON.stringify(this.get('jobTimeLine'));
+ graph.drawJobTimeLine(timeline, this.get('width'), this.get('height'), '#chart', 'legend', 'timeline1');
+ }.observes('jobTimeLine'),
+
+ drawJobTasks:function () {
+ var taskview = JSON.stringify(this.get('jobTaskView'));
+ graph.drawJobTasks(taskview, this.get('width'), this.get('height'), '#job_tasks', 'tasks_legend', 'timeline2');
+ }.observes('jobTaskView')
});
\ No newline at end of file
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/apps_view.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/apps_view.js?rev=1418952&r1=1418951&r2=1418952&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/apps_view.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/apps_view.js Sun Dec 9 13:43:07 2012
@@ -452,7 +452,7 @@ App.MainAppsView = Em.View.extend({
typeSelectView: Em.Select.extend({
classNames: ['input-small'],
selected: 'Any',
- content:['Any', 'Pig', 'Hive', 'mapReduce'],
+ content:['Any', 'Pig', 'Hive', 'MapReduce'],
change:function(event){
if(this.get('selection') === 'Any') {
this.$().closest('th').addClass('notActive');
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard.js?rev=1418952&r1=1418951&r2=1418952&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard.js Sun Dec 9 13:43:07 2012
@@ -20,8 +20,15 @@ var App = require('app');
App.MainDashboardView = Em.View.extend({
templateName: require('templates/main/dashboard'),
+ didInsertElement: function() {
+ this.services();
+ },
content : [],
services:function(){
+ if( this.get('content').length > 0)
+ {
+ return false;
+ }
var services = App.Service.find();
services.forEach(function(item){
var vName;
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service.js?rev=1418952&r1=1418951&r2=1418952&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service.js Sun Dec 9 13:43:07 2012
@@ -33,10 +33,6 @@ App.MainDashboardServiceHealthView = Em.
*/
showOnlyRows: false,
- status: function () {
- return this.get('service.workStatus');
- }.property('service.workStatus'),
-
startBlink: function () {
this.set('blink', true);
},
@@ -55,26 +51,30 @@ App.MainDashboardServiceHealthView = Em.
},
healthStatus: function () {
- var status = this.get('status');
+ var status = this.get('service.healthStatus');
switch (status) {
- case App.Service.Health.start:
+ case 'green':
+ status = App.Service.Health.live;
+ this.stopBlink();
+ break;
+ case 'green-blinking':
status = App.Service.Health.live;
this.startBlink();
break;
- case App.Service.Health.stop:
+ case 'red-blinking':
status = App.Service.Health.dead;
this.startBlink();
break;
default:
+ status = App.Service.Health.dead;
this.stopBlink();
break;
}
return 'health-status-' + status + " span";
- }.property('status'),
+ }.property('service.healthStatus'),
didInsertElement: function () {
- this._super();
this.doBlink(); // check for blink availability
}
});
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service/hbase.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service/hbase.js?rev=1418952&r1=1418951&r2=1418952&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service/hbase.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service/hbase.js Sun Dec 9 13:43:07 2012
@@ -25,7 +25,9 @@ App.MainDashboardServiceHbaseView = App.
var heapUsed = this.get('service').get('heapMemoryUsed');
var heapMax = this.get('service').get('heapMemoryMax');
var percent = heapMax > 0 ? 100 * heapUsed / heapMax : 0;
- return this.t('dashboard.services.hbase.masterServerHeap.summary').format(heapUsed.bytesToSize(1, "parseFloat"), heapMax.bytesToSize(1, "parseFloat"), percent.toFixed(1));
+ var heapString = heapUsed>0 ? heapUsed.bytesToSize(1, "parseFloat") : 0;
+ var heapMaxString = heapMax>0 ? heapMax.bytesToSize(1, "parseFloat") : 0;
+ return this.t('dashboard.services.hbase.masterServerHeap.summary').format(heapString, heapMaxString, percent.toFixed(1));
}.property('service'),
summaryHeader: function () {
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/summary.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/summary.js?rev=1418952&r1=1418951&r2=1418952&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/summary.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/summary.js Sun Dec 9 13:43:07 2012
@@ -87,7 +87,10 @@ App.MainHostSummaryView = Em.View.extend
* Shows whether we need to show health status
*/
isClient: function() {
- return this.get('content.componentName').substr(-7) === '_CLIENT';
+ var componentName = this.get('content.componentName');
+ return componentName.substr(-7) === '_CLIENT' ||
+ componentName === 'PIG' ||
+ componentName === 'SQOOP';
}.property('content')
})