incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject svn commit: r1390762 [3/3] - in /incubator/ambari/branches/AMBARI-666: ./ ambari-web/app/ ambari-web/app/assets/img/ ambari-web/app/controllers/main/ ambari-web/app/controllers/main/admin/ ambari-web/app/controllers/main/admin/user/ ambari-web/app/cont...
Date Wed, 26 Sep 2012 22:32:51 GMT
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/advanced.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/advanced.js?rev=1390762&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/advanced.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/advanced.js Wed Sep
26 22:32:47 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.MainAdminAdvancedView = Em.View.extend({
+  templateName: require('templates/main/admin/advanced'),
+  params: {keepData: 1}
+});
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/advanced/password.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/advanced/password.js?rev=1390762&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/advanced/password.js
(added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/advanced/password.js
Wed Sep 26 22:32:47 2012
@@ -0,0 +1,27 @@
+/**
+ * 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.MainAdminAdvancedPasswordView = App.Form.extend({
+  fieldsOptions:[
+    { name:"password", displayName:"Password", displayType:"password", disableRequiredOnExistent:true
},
+    { name:"passwordRetype", displayName:"Retype Password", displayType:"passwordRetype",
disableRequiredOnExistent:true }
+  ],
+  fields: []
+});
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/audit.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/audit.js?rev=1390762&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/audit.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/audit.js Wed Sep
26 22:32:47 2012
@@ -0,0 +1,115 @@
+/**
+ * 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');
+var validator = require('utils/validator');
+
+App.GridHeader = Em.View.extend({
+  templateName:require('templates/common/grid/header'),
+  tagName:'th',
+  filterable:true,
+  getGrid:function () {
+    return this.get('grid');
+  },
+  doFilter:function () {
+    console.log(this.get('grid'));
+  },
+  click:function (event) {
+    // will be called when when an instance's
+    // rendered element is clicked
+  }
+});
+
+App.MainAdminAuditView = Em.View.extend({
+  _columns:{},
+  columns:[],
+  initComleted:false,
+  collection:[],
+  templateName:require('templates/main/admin/audit'),
+  fieldNames:[],
+  init:function () {
+    this._super();
+    if (!this.columns.length) { // init completed on this
+      this.prepareColumns();
+      this.prepareFilters();
+      this.prepareCollection();
+    }
+  },
+  prepareCollection:function () {
+    this.set('collection', App.ServiceAudit.find());
+  },
+
+  addColumn:function (options) {
+    options.grid = this;
+    if (validator.empty(options.name)) {
+      throw "define column name";
+    }
+
+    if (this.get('_columns.' + options.name)) {
+      throw "column with this '" + options.name + "' already exists";
+    }
+
+    var field = App.GridHeader.extend(options);
+    this.columns.push(field);
+
+//    console.log("FI:", field.filterable);
+    if (field.filterable || 1) { // .filterable - field not working :(
+      this.fieldNames.push(options.name);
+    }
+  },
+  prepareColumns:function () {
+    this.addColumn({
+      name:"date",
+      label:Em.I18n.t("admin.audit.grid.date")
+    });
+    this.addColumn({
+      name:"operationName",
+      label:Em.I18n.t("admin.audit.grid.operationName")
+    });
+  },
+  prepareFilters:function () {
+    var collection = this.get('collection');
+    var fieldNames = this.get('fieldNames');
+    var options = {};
+
+    if (collection && collection.content && collection.content.length) {
+      collection.forEach(function (i, object) {
+        console.warn("INTO");
+        console.warn(object, object.content);
+        $.each(fieldNames, function (j, field) {
+          if (!options[field]) {
+            options[field] = [];
+          }
+//          var value = object.get(field); repair this
+//          options[field].push({value:value});
+        });
+      })
+
+      console.warn("SORT OPTIONS:", options);
+      this.set('fieldNames', false);
+//      indexOf
+
+//      console.warn("LENGTH:" + collection.content.length);
+//      console.warn("fieldNames:", this.get('fieldNames'));
+    }
+//    var fieldNames = this.get('fieldNames');
+
+//    $.each(this.get('collection'), function(){})
+
+  }.observes('collection')
+});
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/authentication.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/authentication.js?rev=1390762&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/authentication.js
(added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/authentication.js
Wed Sep 26 22:32:47 2012
@@ -0,0 +1,41 @@
+/**
+ * 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.MainAdminAuthenticationView = Em.View.extend({
+  templateName:require('templates/main/admin/authentication'),
+  form:App.AuthenticationForm.create({}),
+  pushAuthenticationToForm:function () {
+    var auth = App.Authentication.find(1);
+    App.router.set('mainAdminAuthenticationController.content', auth);
+    this.form.set('object', auth);
+  },
+  didInsertElement: function (){
+    this._super();
+    this.pushAuthenticationToForm();
+  },
+
+  ldapChecked:function () {
+    return this.get('form.field.method.value');
+  }.property('form.field.method.value'),
+
+  useCredentials:function () {
+    return this.get('form.field.bindMethod.value');
+  }.property('form.field.bindMethod.value')
+});
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/menu.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/menu.js?rev=1390762&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/menu.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/menu.js Wed Sep 26
22:32:47 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.MainAdminMenuView = Em.CollectionView.extend({
+  content:[
+    {
+      route:'user',
+      label:'Users'
+    },
+    {
+      route:'authentication',
+      label:'Authentication'
+    },
+    {
+      route:'security',
+      label:'Security'
+    },
+    {
+      route:'audit',
+      label:'Audit'
+    },
+    {
+      route:'advanced',
+      label:'Advanced'
+    }
+  ],
+  tagName: "ul",
+  classNames: ["nav", "nav-list", "span2"],
+
+  activateView:function (route) {
+    $.each(this._childViews, function () {
+      this.set('active', (this.get('content.route') == route ? "active" : ""));
+    });
+  },
+
+  itemViewClass:Em.View.extend({
+    classNameBindings:["active"],
+    active:"",
+    template:Ember.Handlebars.compile('<a {{action adminNavigate view.content }} href="#">
{{unbound view.content.label}}</a>')
+  })
+});
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/security.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/security.js?rev=1390762&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/security.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/security.js Wed Sep
26 22:32:47 2012
@@ -0,0 +1,23 @@
+/**
+ * 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.MainAdminSecurityView = Em.View.extend({
+  templateName: require('templates/main/admin/security')
+});
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user.js?rev=1390762&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user.js Wed Sep 26
22:32:47 2012
@@ -0,0 +1,40 @@
+/**
+ * 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.MainAdminUserView = Em.View.extend({
+  templateName: require('templates/main/admin/user'),
+  users: App.User.find(),
+//  users: function(){
+//    return App.router.get('mainAdminUserController.content');
+//  }.property('mainAdminUserController.content'),
+  delete: function(event, context){
+    console.log("EVENT:");
+    console.log(event);
+
+    console.log("CONTEXT:");
+    console.log(context);
+  },
+  ldapUser: function(){
+    var auth = App.router.get('mainAdminAuthenticationController.content');
+    return auth.get('method');
+  }.property('App.router.mainAdminAuthenticationController.content')
+
+
+});
\ No newline at end of file

Added: 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=1390762&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user/edit.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user/edit.js Wed
Sep 26 22:32:47 2012
@@ -0,0 +1,43 @@
+/**
+ * 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.MainAdminUserEditView = Em.View.extend({
+  templateName: require('templates/main/admin/user/edit'),
+  userId: false,
+  create: function(event){
+    var form = this.get("userForm");
+    if(form.isValid() && form.save()) {
+      App.router.transitionTo("all");
+    }
+  },
+
+  willInsertElement: function() {
+    this.setFormObject();
+    this._super();
+  },
+
+  setFormObject: function(){
+    console.log("submit new user");
+    var user = App.router.get('mainAdminUserEditController.content');
+    this.userForm.set('object', user);
+  }.observes('App.router.mainAdminUserEditController.content'),
+
+  userForm: App.UserForm.create({})
+});
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user/row.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user/row.js?rev=1390762&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user/row.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user/row.js Wed Sep
26 22:32:47 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.MainAdminUserRowView = Em.View.extend({
+  templateName: require('templates/main/admin/user/row'),
+  disableCheckBoxes: "disabled"
+});
\ No newline at end of file

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=1390762&r1=1390761&r2=1390762&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 Wed Sep 26
22:32:47 2012
@@ -19,8 +19,5 @@
 var App = require('app');
 
 App.MainDashboardView = Em.View.extend({
-  templateName: require('templates/main/dashboard'),
-  services:function(){
-    return App.router.get('mainServiceController.content');
-  }.property('App.router.mainServiceController.content')
+  templateName: require('templates/main/dashboard')
 });
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host.js?rev=1390762&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host.js Wed Sep 26 22:32:47
2012
@@ -0,0 +1,42 @@
+/**
+ * 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.MainHostView = Em.View.extend({
+  templateName: require('templates/main/host'),
+  content: [],
+
+  ComponentCheckboxView: Em.Checkbox.extend({
+    content: null,
+    isChecked: false,
+    change: function(event) {
+      this.set('isChecked', !this.get('isChecked'));
+      App.router.get('mainHostController').setFilters(this.get('isChecked'), this.get('content'));
+    }
+  }),
+  HostCheckboxView: Em.Checkbox.extend({
+    content: null,
+    isChecked: false,
+    change: function(event) {
+      this.set('isChecked', !this.get('content.isChecked'));
+      App.router.get('mainHostController').onHostChecked(this.get('isChecked'), this.get('content.id'));
+    }
+  })
+
+});
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/audit.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/audit.js?rev=1390762&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/audit.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/audit.js Wed Sep 26
22:32:47 2012
@@ -0,0 +1,26 @@
+/**
+ * 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.MainHostAuditView = Em.View.extend({
+  templateName: require('templates/main/host/audit'),
+  content:function(){
+    return App.router.get('mainHostDetailsController.content');
+  }.property('App.router.mainHostDetailsController.content')
+});
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/details.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/details.js?rev=1390762&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/details.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/details.js Wed Sep
26 22:32:47 2012
@@ -0,0 +1,26 @@
+/**
+ * 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.MainHostDetailsView = Em.View.extend({
+  templateName: require('templates/main/host/details'),
+  content:function(){
+    return App.router.get('mainHostDetailsController.content');
+  }.property('App.router.mainHostDetailsController.content')
+});
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/menu.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/menu.js?rev=1390762&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/menu.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/menu.js Wed Sep 26
22:32:47 2012
@@ -0,0 +1,49 @@
+/**
+ * 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.MainHostMenuView = Em.CollectionView.extend({
+  tagName: 'ul',
+  classNames: ["nav", "nav-tabs"],
+  content:[
+    { label:'Summary', routing:'summary'},
+    { label:'Metrics', routing:'metrics'},
+    { label:'Audit', routing:'audit'}
+  ],
+
+  init: function(){ this._super(); this.activateView(); },
+
+  activateView:function () {
+    $.each(this._childViews, function () {
+      this.set('active', (this.get('content.routing') == 'summary' ? "active" : ""));
+    });
+  },
+
+  deactivateChildViews: function() {
+    $.each(this._childViews, function(){
+      this.set('active', "");
+    });
+  },
+
+  itemViewClass: Em.View.extend({
+    classNameBindings: ["active"],
+    active: "",
+    template: Ember.Handlebars.compile('<a {{action hostNavigate view.content.routing
}} href="#"> {{unbound view.content.label}}</a>')
+  })
+});
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics.js?rev=1390762&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics.js Wed Sep
26 22:32:47 2012
@@ -0,0 +1,26 @@
+/**
+ * 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.MainHostMetricsView = Em.View.extend({
+  templateName: require('templates/main/host/metrics'),
+  content:function(){
+    return App.router.get('mainHostDetailsController.content');
+  }.property('App.router.mainHostDetailsController.content')
+});
\ No newline at end of file

Added: 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=1390762&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/summary.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/summary.js Wed Sep
26 22:32:47 2012
@@ -0,0 +1,29 @@
+/**
+ * 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.MainHostSummaryView = Em.View.extend({
+  templateName: require('templates/main/host/summary'),
+  content:function(){
+    return App.router.get('mainHostDetailsController.content');
+  }.property('App.router.mainHostDetailsController.content'),
+  buttonClass: function(){
+    return this.get('startComponents') ? 'success' : 'danger';
+  }.property('startComponents')
+});
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/menu.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/menu.js?rev=1390762&r1=1390761&r2=1390762&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/menu.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/menu.js Wed Sep 26 22:32:47
2012
@@ -18,6 +18,10 @@
 
 var App = require('app');
 
+/**
+ * this menu extended by other with modifying content and itemViewClass.template
+ * @type {*}
+ */
 App.MainMenuView = Em.CollectionView.extend({
   tagName: 'ul',
   classNames: ["nav", "nav-tabs"],
@@ -25,20 +29,25 @@ App.MainMenuView = Em.CollectionView.ext
     { label:'My Cluster', routing:'cluster'},
     { label:'Dashboard', routing:'dashboard', active:"active"},
     { label:'Charts', routing:'charts'},
-    { label:'Services', routing:'service'},
+    { label:'Services', routing:'services'},
     { label:'Hosts', routing:'hosts'},
     { label:'Admin', routing:'admin'}
   ],
 
-  deactivateChildViews: function() {
-    $.each(this._childViews, function(){
-      this.set('active', "");
+  deactivateChildViews:function (content) {
+    $.each(this._childViews, function () {
+      this.set('active', this.get('content') == content ? "active" : "");
     });
   },
 
   itemViewClass: Em.View.extend({
     classNameBindings: ["active"],
     active: "",
-    template: Ember.Handlebars.compile('<a {{action navigate view.content.routing }} href="#">
{{unbound view.content.label}}</a>')
+    alertsCount: function() {
+      if(this.get('content').routing == 'dashboard'){
+        return App.router.get('mainDashboardController.alertsCount');
+      }
+    }.property(),
+    template: Ember.Handlebars.compile('<a {{action navigate view.content}} href="#">
{{unbound view.content.label}}{{#if view.alertsCount}}<span class="label label-important
alerts-count">{{view.alertsCount}}</span>{{/if}}</a>')
   })
 });
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/audit.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/audit.js?rev=1390762&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/audit.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/audit.js Wed
Sep 26 22:32:47 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.MainServiceInfoAuditView = Em.View.extend({
+  templateName: require('templates/main/service/info/audit'),
+  content: App.ServiceAudit.find()
+});
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/configs.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/configs.js?rev=1390762&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/configs.js
(added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/configs.js
Wed Sep 26 22:32:47 2012
@@ -0,0 +1,26 @@
+/**
+ * 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.MainServiceInfoConfigsView = Em.View.extend({
+  templateName: require('templates/main/service/info/configs'),
+  alerts: function(){
+    return App.router.get('mainAlertController.content');
+  }.property('App.router.mainAlertController.content')
+});
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/menu.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/menu.js?rev=1390762&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/menu.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/menu.js Wed
Sep 26 22:32:47 2012
@@ -0,0 +1,50 @@
+/**
+ * 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.MainServiceInfoMenuView = Em.CollectionView.extend({
+  tagName: 'ul',
+  classNames: ["nav", "nav-tabs"],
+  content:[
+    { label:'Summary', routing:'summary', active:"active"},
+    { label:'Metrics', routing:'metrics'},
+    { label:'Configs', routing:'configs'},
+    { label:'Audit', routing:'audit'}
+  ],
+
+  init: function(){ this._super(); this.activateView(); },
+
+  activateView:function () {
+    $.each(this._childViews, function () {
+      this.set('active', (this.get('content.routing') == 'summary' ? "active" : ""));
+    });
+  },
+
+  deactivateChildViews: function() {
+    $.each(this._childViews, function(){
+      this.set('active', "");
+    });
+  },
+
+  itemViewClass: Em.View.extend({
+    classNameBindings: ["active"],
+    active: "",
+    template: Ember.Handlebars.compile('<a {{action showInfo view.content.routing }} href="#">
{{unbound view.content.label}}</a>')
+  })
+});
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics.js?rev=1390762&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics.js
(added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics.js
Wed Sep 26 22:32:47 2012
@@ -0,0 +1,26 @@
+/**
+ * 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.MainServiceInfoMetricsView = Em.View.extend({
+  templateName: require('templates/main/service/info/metrics'),
+  alerts: function(){
+    return App.router.get('mainAlertController.content');
+  }.property('App.router.mainAlertController.content')
+});
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/summary.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/summary.js?rev=1390762&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/summary.js
(added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/summary.js
Wed Sep 26 22:32:47 2012
@@ -0,0 +1,23 @@
+/**
+ * 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.MainServiceInfoSummaryView = Em.View.extend({
+  templateName: require('templates/main/service/info/summary')
+});
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/menu.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/menu.js?rev=1390762&r1=1390761&r2=1390762&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/menu.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/menu.js Wed Sep
26 22:32:47 2012
@@ -26,7 +26,7 @@ App.MainServiceMenuView = Em.CollectionV
   init: function(){ this._super(); this.activateView(); },
 
   tagName:'ul',
-  classNames:["nav", "nav-tabs"],
+  classNames:["nav", "nav-tabs", "nav-services"],
 
   activateView:function () {
     var service = App.router.get('mainServiceItemController.content');
@@ -38,6 +38,6 @@ App.MainServiceMenuView = Em.CollectionV
   itemViewClass:Em.View.extend({
     classNameBindings:["active"],
     active:"",
-    template:Ember.Handlebars.compile('<a {{action showService view.content}} href="#">
{{unbound view.content.label}}</a>')
+    template:Ember.Handlebars.compile('<a {{action showService view.content}} href="#"
class="health-status-{{unbound view.content.healthStatus}}"> {{unbound view.content.label}}</a>')
   })
 });
\ No newline at end of file



Mime
View raw message