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/09/05 04:39:12 UTC
svn commit: r1380953 [1/8] - in /incubator/ambari/branches/AMBARI-666: ./
ambari-web/ ambari-web/app/ ambari-web/app/assets/
ambari-web/app/assets/img/ ambari-web/app/assets/licenses/
ambari-web/app/controllers/ ambari-web/app/models/ ambari-web/app/ro...
Author: yusaku
Date: Wed Sep 5 02:39:09 2012
New Revision: 1380953
URL: http://svn.apache.org/viewvc?rev=1380953&view=rev
Log:
AMBARI-697. Ambari Web (browser-based UI) skeleton (Contributed by Jaimin Jetly and Yusaku Sako)
Added:
incubator/ambari/branches/AMBARI-666/ambari-web/
incubator/ambari/branches/AMBARI-666/ambari-web/app/
incubator/ambari/branches/AMBARI-666/ambari-web/app/app.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/
incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/
incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/glyphicons-halflings-white.png (with props)
incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/glyphicons-halflings.png (with props)
incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/logo-micro.gif (with props)
incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/logo-small.gif (with props)
incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/index.html
incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/licenses/
incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/licenses/NOTICE.txt
incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/
incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/application.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/login.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/initialize.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/messages.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/models/
incubator/ambari/branches/AMBARI-666/ambari-web/app/models.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/models/cluster.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/models/user.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/router.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/
incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/installer.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/main.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/
incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/app.css
incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/application.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step1.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step2.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step3.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step4.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step5.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step6.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step7.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step8.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/login.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/
incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/db.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/
incubator/ambari/branches/AMBARI-666/ambari-web/app/views.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/application.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step1.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step2.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step3.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step4.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step5.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step6.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step7.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step8.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/login.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main.js
incubator/ambari/branches/AMBARI-666/ambari-web/config.coffee
incubator/ambari/branches/AMBARI-666/ambari-web/package.json
incubator/ambari/branches/AMBARI-666/ambari-web/test/
incubator/ambari/branches/AMBARI-666/ambari-web/test/spec.coffee
incubator/ambari/branches/AMBARI-666/ambari-web/vendor/
incubator/ambari/branches/AMBARI-666/ambari-web/vendor/scripts/
incubator/ambari/branches/AMBARI-666/ambari-web/vendor/scripts/bootstrap.js
incubator/ambari/branches/AMBARI-666/ambari-web/vendor/scripts/console-helper.js
incubator/ambari/branches/AMBARI-666/ambari-web/vendor/scripts/ember-data-latest.js
incubator/ambari/branches/AMBARI-666/ambari-web/vendor/scripts/ember-latest.js
incubator/ambari/branches/AMBARI-666/ambari-web/vendor/scripts/handlebars-1.0.0.beta.6.js
incubator/ambari/branches/AMBARI-666/ambari-web/vendor/scripts/jquery-1.7.2.min.js
incubator/ambari/branches/AMBARI-666/ambari-web/vendor/scripts/sinon-1.4.2.js
incubator/ambari/branches/AMBARI-666/ambari-web/vendor/styles/
incubator/ambari/branches/AMBARI-666/ambari-web/vendor/styles/bootstrap.css
Modified:
incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
Modified: incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt?rev=1380953&r1=1380952&r2=1380953&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt (original)
+++ incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt Wed Sep 5 02:39:09 2012
@@ -12,6 +12,8 @@ AMBARI-666 branch (unreleased changes)
NEW FEATURES
+ AMBARI-697. Ambari Web (browser-based UI) skeleton. (Jaimin Jetly and yusaku)
+
AMBARI-695. More basic class restructuring for new design. (hitesh)
AMBARI-694. Class to encapsulate stage. (jitendra)
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/app.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/app.js?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/app.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/app.js Wed Sep 5 02:39:09 2012
@@ -0,0 +1,59 @@
+/**
+ * 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.
+ */
+
+// Application bootstrapper
+
+module.exports = Em.Application.create({
+ name: 'Ambari Web',
+
+ store: DS.Store.create({
+ revision: 4,
+ adapter: DS.FixtureAdapter.create()
+ //adapter: DS.RESTAdapter.create({
+ // bulkCommit: false
+ // namespace: '/api/v1'
+ // })
+ /*
+ adapter: DS.Adapter.create({
+ find: function(store, type, id) {
+ //var url = type.url;
+ //url = url.fmt(id);
+
+ if (type.toString() === 'App.Cluster') {
+ store.load(type, { id: id, hosts: [ { hostname: 'host1' }, { hostname: 'host2' } ], services: []});
+ }
+ debugger;
+
+ //jQuery.getJSON(url, function(data) {
+ // data is a Hash of key/value pairs. If your server returns a
+ // root, simply do something like:
+ // store.load(type, id, data.person)
+ // store.load(type, id, data);
+ //});
+ },
+ findAll: function(store, type, id) {
+ debugger;
+ },
+ findMany: function(store, type, id) {
+ debugger;
+ }
+ })
+ */
+ })
+
+});
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/glyphicons-halflings-white.png
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/glyphicons-halflings-white.png?rev=1380953&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/glyphicons-halflings-white.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/glyphicons-halflings.png
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/glyphicons-halflings.png?rev=1380953&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/glyphicons-halflings.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/logo-micro.gif
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/logo-micro.gif?rev=1380953&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/logo-micro.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/logo-small.gif
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/logo-small.gif?rev=1380953&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/logo-small.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/index.html
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/index.html?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/index.html (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/index.html Wed Sep 5 02:39:09 2012
@@ -0,0 +1,36 @@
+<!--
+* 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.
+-->
+
+
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <link rel="stylesheet" href="stylesheets/app.css">
+ <script src="javascripts/vendor.js"></script>
+ <script src="javascripts/app.js"></script>
+ <script>require('initialize');</script>
+ <title>Ambari</title>
+ <link rel="shortcut icon" href="/img/logo-micro.gif">
+</head>
+<body>
+ <!-- ApplicationView -->
+</body>
+</html>
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/licenses/NOTICE.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/licenses/NOTICE.txt?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/licenses/NOTICE.txt (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/licenses/NOTICE.txt Wed Sep 5 02:39:09 2012
@@ -0,0 +1,22 @@
+Apache Ambari Web
+Copyright 2012 The Apache Software Foundation
+
+This product includes software developed by The Apache Software Foundation (http://www.apache.org/).
+
+This product includes jQuery (http://jquery.org - MIT license)
+Copyright (c) 2012, John Resig.
+
+This product includes Ember.js (http://emberjs.com - https://github.com/emberjs/ember.js/blob/master/LICENSE)
+Copyright (c) 2011, Yehuda Katz, Tom Dale, Charles Jolley and Ember.js contributors
+
+This product was generated using Brunch (https://github.com/brunch/brunch/blob/master/LICENSE)
+Copyright (c) 2011, Allan Berger, Jan Monschke, Martin Schürrer, Thomas Schranz, Nik Graf, Paul Miller
+
+This product includes Twitter Bootstrap 2 (http://twitter.github.com/bootstrap/ - Apache License v2.0.)
+
+This product, as part of Twitter Bootstrap 2, includes GLYPHICONS FREE (http://glyphicons.com - Apache License v2.0.)
+
+This product includes LESS (http://lesscss.org - Apache License v2.0.)
+
+This product includes Sinon.JS (http://sinonjs.org - BSD license)
+Copyright (c) 2010-2012, Christian Johansen.
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers.js?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers.js Wed Sep 5 02:39:09 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.
+ */
+
+
+// load all controllers here
+
+require('controllers/application');
+require('controllers/login');
+require('controllers/installer');
\ No newline at end of file
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/application.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/application.js?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/application.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/application.js Wed Sep 5 02:39:09 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.ApplicationController = Em.Controller.extend({
+
+ name: 'applicationController'
+
+});
\ No newline at end of file
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer.js?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer.js Wed Sep 5 02:39:09 2012
@@ -0,0 +1,86 @@
+/**
+ * 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.InstallerController = Em.Controller.extend({
+
+ name: 'installerController',
+
+ clusterName: '',
+
+ prevInstallStatus: function () {
+ console.log('Inside the prevInstallStep function: The name is ' + App.router.get('loginController.loginName'));
+ if (localStorage.getItem(App.router.get('loginController.loginName') + 'Installer' + 'isCompleted') == '1') {
+ return true;
+ }
+ }.property('App.router.loginController.loginName'),
+
+ currentStep: function () {
+ return App.get('router').getInstallerCurrentStep();
+ }.property(),
+
+ clusters: null,
+
+ init: function () {
+ this.clusters = App.Cluster.find();
+ },
+
+ isStep1: function () {
+ return this.get('currentStep') == '1';
+ }.property('currentStep'),
+
+ isStep2: function () {
+ return this.get('currentStep') == '2';
+ }.property('currentStep'),
+
+ isStep3: function () {
+ return this.get('currentStep') == '3';
+ }.property('currentStep'),
+
+ isStep4: function () {
+ return this.get('currentStep') == '4';
+ }.property('currentStep'),
+
+ isStep5: function () {
+ return this.get('currentStep') == '5';
+ }.property('currentStep'),
+
+ isStep6: function () {
+ return this.get('currentStep') == '6';
+ }.property('currentStep'),
+
+ isStep7: function () {
+ return this.get('currentStep') == '7';
+ }.property('currentStep'),
+
+ isStep8: function () {
+ return this.get('currentStep') == '8';
+ }.property('currentStep'),
+
+
+ /**
+ *
+ * @param cluster ClusterModel
+ */
+ createCluster: function (cluster) {
+ alert('created cluster ' + cluster.name);
+ }
+
+});
\ No newline at end of file
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/login.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/login.js?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/login.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/login.js Wed Sep 5 02:39:09 2012
@@ -0,0 +1,46 @@
+/**
+ * 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.
+ */
+
+App.LoginController = Em.Object.extend({
+
+ name: 'loginController',
+ loginName: '',
+ password: '',
+ errorMessage: '',
+
+ submit: function (e) {
+ console.log('Login: ' + this.get('loginName') + ' Password: ' + this.get('password'));
+
+ this.set('errorMessage', '');
+
+ if (this.validateCredentials()) {
+ console.log("Logging in as: " + this.get('loginName'));
+ App.get('router').login(this.get('loginName'));
+ } else {
+ console.log("Failed to login as: " + this.get('loginName'));
+ this.set('errorMessage', App.messages.login_error);
+ }
+
+ },
+
+ validateCredentials: function () {
+ //TODO: REST api that validates the login
+ return (this.get('loginName').trim() !== '' && this.get('loginName') === this.get('password'));
+ }
+
+})
\ No newline at end of file
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/initialize.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/initialize.js?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/initialize.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/initialize.js Wed Sep 5 02:39:09 2012
@@ -0,0 +1,34 @@
+/**
+ * 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.
+ */
+
+
+window.App = require('app');
+
+require('messages');
+require('templates');
+require('models');
+require('controllers');
+require('views');
+require('router');
+
+App.initialize();
+
+console.log('after initialize');
+console.log('localStorage:Ambari.authenticated=' + localStorage.getItem('Ambari' + 'authenticated'));
+console.log('localStorage:currentStep=' + localStorage.getItem(App.get('router').getLoginName() + 'Installer' + 'currentStep'));
+console.log('router.authenticated=' + App.get('router.loggedIn'));
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/messages.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/messages.js?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/messages.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/messages.js Wed Sep 5 02:39:09 2012
@@ -0,0 +1,54 @@
+/**
+ * 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.messages = {
+ "app_name": "Ambari",
+ "page_title": "Ambari",
+ "installer_welcome": "Welcome to Ambari installation wizard",
+ "login_error": "Invalid username/password combination.",
+ "login_header": "Ambari Login",
+ "username_label": "Username",
+ "password_label": "Password",
+ "login_button": "Login",
+
+ "step1_header": "Welcome",
+ "step2_header": "Install Options",
+ "step3_header": "Confirm Hosts",
+ "step4_header": "Choose Services",
+ "step5_header": "Assign Services",
+ "step6_header": "Customize Services",
+ "step7_header": "Review",
+ "step8_header": "Install, Start and Test",
+ "step9_header": "Summary",
+ "page_footer_body": "<a href = \"http://www.apache.org/licenses/LICENSE-2.0\" target = \"_blank\">Licensed under the Apache License, Version 2.0</a>.<br><a href = \"/licenses/NOTICE.txt\" target = \"_blank\">See third-party tools/resources that Ambari uses and their respective authors</a>",
+
+ "topnav_help_link": "http://incubator.apache.org/ambari/install.html",
+ "welcome_header": "Welcome to Ambari!",
+ "welcome_body": "<p>Ambari makes it easy for you to install, configure, and manage your Hadoop cluster.<br>First, we will walk you through setting up your cluster with a step-by-step wizard.</p>",
+ "welcome_note": "Before you proceed, make sure you have performed all the pre-installation steps.",
+ "welcome_submit_label": "Get started",
+ "installFailed_header": "Cluster installation failed",
+ "installFailed_body": "Cluster installation failed. To continue, you will need to uninstall the cluster first and re-install the cluster.",
+ "installFailed_submit_label": "Start the uninstall process",
+ "uninstallFailed_header": "Cluster uninstallation failed",
+ "uninstallFailed_body": "Failed to uninstall the cluster"
+};
+
Added: 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=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/models.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/models.js Wed Sep 5 02:39:09 2012
@@ -0,0 +1,22 @@
+/**
+ * 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.
+ */
+
+
+// load all models here
+
+require('models/cluster');
\ No newline at end of file
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/models/cluster.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/models/cluster.js?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/models/cluster.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/models/cluster.js Wed Sep 5 02:39:09 2012
@@ -0,0 +1,97 @@
+/**
+ * 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.User = Em.Object.extend({
+ username: null
+});
+
+App.ClusterModel = Em.Object.extend({
+ clusterName: null,
+ hosts: [],
+ services: []
+
+});
+
+// uncomment if column names are camelized in JSON (or fixture), rather than _ separated
+/*
+DS.Model.reopen({
+ namingConvention: {
+ keyToJSONKey: function(key) {
+ return key;
+ },
+
+ foreignKey: function(key) {
+ return key;
+ }
+ }
+});
+*/
+
+App.Host = DS.Model.extend({
+ hostName: DS.attr('string'),
+ cluster: DS.belongsTo('App.Cluster')
+});
+
+App.Host.FIXTURES = [
+ {
+ id: 1,
+ host_name: 'host1',
+ cluster_id: 1
+ },
+ {
+ id: 2,
+ host_name: 'host2',
+ cluster_id: 1
+ },
+ {
+ id: 3,
+ host_name: 'host3',
+ cluster_id: 2
+ },
+ {
+ id: 4,
+ host_name: 'host4',
+ cluster_id: 2
+ }
+];
+
+App.Cluster = DS.Model.extend({
+ clusterName: DS.attr('string'),
+ stackName: DS.attr('string'),
+ hosts: DS.hasMany('App.Host')
+});
+
+App.Cluster.FIXTURES = [
+ {
+ id: 1,
+ cluster_name: 'cluster1',
+ stack_name: 'HDP',
+ hosts: [1, 2]
+ },
+
+ {
+ id: 2,
+ cluster_name: 'cluster2',
+ stack_name: 'BigTop',
+ hosts: [3]
+ }
+];
+
Added: 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=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/models/user.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/models/user.js Wed Sep 5 02:39:09 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.userModel = Em.Object.extend({
+
+ firstName : null,
+ id : 0
+
+});
\ No newline at end of file
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/router.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/router.js?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/router.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/router.js Wed Sep 5 02:39:09 2012
@@ -0,0 +1,129 @@
+/**
+ * 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.
+ */
+
+App.Router = Em.Router.extend({
+
+ enableLogging: true,
+
+ setInstallerCurrentStep: function (currentStep, completed) {
+ var loginName = this.getLoginName();
+ localStorage.setItem(loginName + 'Installer' + 'currentStep', currentStep);
+ localStorage.setItem(loginName + 'Installer' + 'completed', completed);
+ this.set('installerController.currentStep', currentStep);
+ },
+
+ getInstallerCurrentStep: function () {
+ var loginName = this.getLoginName();
+ var currentStep = localStorage.getItem(loginName + 'Installer' + 'currentStep');
+ console.log('getInstallerCurrentStep: loginName=' + loginName + ", currentStep=" + currentStep);
+ if (!currentStep) {
+ currentStep = '1';
+ }
+ console.log('returning currentStep=' + currentStep);
+ return currentStep;
+ },
+
+ loggedIn: false,
+
+ getAuthenticated: function () {
+ // TODO: this needs to be hooked up with server authentication
+ var auth = localStorage.getItem('Ambari' + 'authenticated');
+ var authResp = (auth && auth === 'true');
+ this.set('loggedIn', authResp);
+ return authResp;
+ },
+
+ setAuthenticated: function (authenticated) {
+ // TODO: this needs to be hooked up with server authentication
+ localStorage.setItem('Ambari' + 'authenticated', authenticated);
+ this.set('loggedIn', authenticated);
+ },
+
+ getLoginName: function () {
+ // TODO: this needs to be hooked up with server authentication
+ return localStorage.getItem('Ambari' + 'loginName');
+ },
+
+ setLoginName: function (loginName) {
+ // TODO: this needs to be hooked up with server authentication
+ localStorage.setItem('Ambari' + 'loginName', loginName);
+ },
+
+ login: function (loginName) {
+ // TODO: this needs to be hooked up with server authentication
+ this.setAuthenticated(true);
+ this.setLoginName(loginName);
+ this.transitionTo(this.getSection());
+ },
+
+ defaultSection: 'installer',
+
+ getSection: function () {
+ var section = localStorage.getItem(this.getLoginName() + 'section');
+ return section || this.defaultSection;
+ },
+
+ setSection: function(section) {
+ localStorage.setItem(this.getLoginName() + 'section', section);
+ },
+
+ root: Em.Route.extend({
+ index: Em.Route.extend({
+ route: '/',
+ redirectsTo: 'login'
+ }),
+
+ login: Em.Route.extend({
+ route: '/login',
+
+ /**
+ * If the user is already logged in, redirect to where the user was previously
+ */
+ enter: function (router, context) {
+ if (router.getAuthenticated()) {
+ Ember.run.next(function () {
+ console.log(router.getLoginName() + ' already authenticated. Redirecting...');
+ router.transitionTo(router.getSection(), context);
+ });
+ }
+ },
+
+ connectOutlets: function (router, context) {
+ console.log('/login:connectOutlet');
+ console.log('currentStep is: ' + router.getInstallerCurrentStep());
+ console.log('authenticated is: ' + router.getAuthenticated());
+
+ router.get('applicationController').connectOutlet('login', App.LoginView);
+ }
+ }),
+
+ installer: require('routes/installer'),
+
+ main: require('routes/main'),
+
+ logoff: function (router, context) {
+ console.log('logging off');
+ router.setAuthenticated(false);
+ router.setLoginName('');
+ router.set('loginController.loginName', '');
+ router.set('loginController.password', '');
+ router.transitionTo('login', context);
+ }
+
+ })
+})
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/installer.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/installer.js?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/installer.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/installer.js Wed Sep 5 02:39:09 2012
@@ -0,0 +1,147 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+module.exports = Em.Route.extend({
+ route: '/installer',
+
+ enter: function (router) {
+ console.log('in /installer:enter');
+
+ if (router.getAuthenticated()) {
+ Ember.run.next(function () {
+ router.transitionTo('step' + router.getInstallerCurrentStep());
+ });
+ } else {
+ Ember.run.next(function () {
+ router.transitionTo('login');
+ });
+ }
+ },
+
+ connectOutlets: function (router, context) {
+ console.log('in /installer:connectOutlets');
+ router.get('applicationController').connectOutlet('installer');
+ },
+
+ step1: Em.Route.extend({
+ route: '/step1',
+ connectOutlets: function (router, context) {
+ console.log('in installer.step1:connectOutlets');
+ router.setInstallerCurrentStep('1', false);
+ router.get('installerController').connectOutlet('installerStep1');
+ },
+ next: Em.Router.transitionTo('step2')
+ }),
+
+ step2: Em.Route.extend({
+ route: '/step2',
+ connectOutlets: function (router, context) {
+ router.setInstallerCurrentStep('2', false);
+ router.get('installerController').connectOutlet('installerStep2');
+ },
+ back: Em.Router.transitionTo('step1'),
+ next: Em.Router.transitionTo('step3')
+ }),
+
+ step3: Em.Route.extend({
+ route: '/step3',
+ connectOutlets: function (router, context) {
+ router.setInstallerCurrentStep('3', false);
+ router.get('installerController').connectOutlet('installerStep3');
+ },
+ back: Em.Router.transitionTo('step2'),
+ next: Em.Router.transitionTo('step4')
+ }),
+
+ step4: Em.Route.extend({
+ route: '/step4',
+ connectOutlets: function (router, context) {
+ router.setInstallerCurrentStep('4', false);
+ router.get('installerController').connectOutlet('installerStep4');
+ },
+ back: Em.Router.transitionTo('step3'),
+ next: Em.Router.transitionTo('step5')
+ }),
+
+ step5: Em.Route.extend({
+ route: '/step5',
+ connectOutlets: function (router, context) {
+ router.setInstallerCurrentStep('5', false);
+ router.get('installerController').connectOutlet('installerStep5');
+ },
+ back: Em.Router.transitionTo('step4'),
+ next: Em.Router.transitionTo('step6')
+ }),
+
+ step6: Em.Route.extend({
+ route: '/step6',
+ connectOutlets: function (router, context) {
+ router.setInstallerCurrentStep('6', false);
+ router.get('installerController').connectOutlet('installerStep6');
+ },
+ back: Em.Router.transitionTo('step5'),
+ next: Em.Router.transitionTo('step7')
+ }),
+
+ step7: Em.Route.extend({
+ route: '/step7',
+ connectOutlets: function (router, context) {
+ router.setInstallerCurrentStep('7', false);
+ router.get('installerController').connectOutlet('installerStep7');
+ },
+ back: Em.Router.transitionTo('step6'),
+ next: Em.Router.transitionTo('step8')
+ }),
+
+ step8: Em.Route.extend({
+ route: '/step8',
+ connectOutlets: function (router, context) {
+ router.setInstallerCurrentStep('8', false);
+ router.get('installerController').connectOutlet('installerStep8');
+ },
+
+ back: Em.Router.transitionTo('step7'),
+
+ complete: function (router, context) {
+ if (true) { // this function will be moved to installerController where it will validate
+ router.setInstallerCurrentStep('1', true);
+ router.setSection('main');
+ router.transitionTo('main');
+ } else {
+ console.log('cluster installation failure');
+ }
+ }
+ }),
+
+ gotoStep1: Em.Router.transitionTo('step1'),
+
+ gotoStep2: Em.Router.transitionTo('step2'),
+
+ gotoStep3: Em.Router.transitionTo('step3'),
+
+ gotoStep4: Em.Router.transitionTo('step4'),
+
+ gotoStep5: Em.Router.transitionTo('step5'),
+
+ gotoStep6: Em.Router.transitionTo('step6'),
+
+ gotoStep7: Em.Router.transitionTo('step7'),
+
+ gotoStep8: Em.Router.transitionTo('step8')
+
+});
\ No newline at end of file
Added: 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=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/main.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/main.js Wed Sep 5 02:39:09 2012
@@ -0,0 +1,56 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+
+module.exports = Em.Route.extend({
+
+ route: '/main',
+
+ enter: function (router) {
+
+ console.log('in /main:enter');
+
+ if (router.getAuthenticated()) {
+ // TODO: redirect to last known state
+ /*
+ Ember.run.next(function () {
+ router.transitionTo('step' + router.getInstallerCurrentStep());
+ });
+ */
+ } else {
+ Ember.run.next(function () {
+ router.transitionTo('login');
+ });
+ }
+ },
+
+ connectOutlets: function (router, context) {
+ router.get('applicationController').connectOutlet('main');
+ }
+
+ // TODO: create new routes here
+ // dashboard
+ // charts
+ // hosts
+ // hosts/:hostname
+ // admin
+ // etc...
+
+
+});
\ No newline at end of file
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/app.css
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/app.css?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/app.css (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/app.css Wed Sep 5 02:39:09 2012
@@ -0,0 +1,87 @@
+/**
+ * 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.
+ */
+
+
+.navbar {
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+}
+
+.navbar .brand {
+ color: #666666;
+ display: block;
+ font-size: 16px;
+ font-weight: normal;
+ line-height: 1;
+ margin-left: 0;
+ margin-right: 40px;
+ margin-top: 3px;
+ padding: 14px 10px;
+}
+
+.navbar-inner {
+ background: linear-gradient(#FAFAFA, #EAEAEA) repeat scroll 0 0 transparent;
+ background: -moz-linear-gradient(#FAFAFA, #EAEAEA) repeat scroll 0 0 transparent;
+ background: -webkit-linear-gradient(#FAFAFA, #EAEAEA) repeat scroll 0 0 transparent;
+ border-radius: 0;
+ border: 1px solid #bbb;
+ border-width: 0 0 1px 0;
+}
+
+.navbar .nav {
+ float: none;
+ overflow: hidden;
+}
+
+.navbar .nav .active > a, .navbar .nav .active > a:hover {
+ background-color: #999999;
+ color: #FFFFFF;
+ text-decoration: none;
+}
+
+.navbar .nav > li > a {
+ border-radius: 8px;
+ -webkit-border-radius: 8px;
+ -moz-border-radius: 8px;
+ font-size: 13px;
+ font-weight: bold;
+ line-height: 19px;
+ margin: 6px 10px 6px 0;
+ padding: 8px 14px;
+ text-decoration: none;
+ text-shadow: none;
+}
+
+.navbar .nav > li > a:hover {
+ background-color: transparent;
+ color: #999999;
+ text-decoration: none;
+}
+
+.navbar .brand {
+ margin-right: 40px;
+}
+
+.navbar #logo {
+ float: left;
+ padding-top: 7px;
+ height: 36px;
+}
+
+.navbar .nav > li.right {
+ float: right;
+}
Added: 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=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less Wed Sep 5 02:39:09 2012
@@ -0,0 +1,32 @@
+/**
+ * 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.
+ */
+
+
+@green: #69BE28;
+
+h1 {
+ color: @green;
+}
+
+footer {
+ margin-top: 40px;
+}
+
+.login h2 {
+ margin-bottom: 20px;
+}
\ No newline at end of file
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates.js?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates.js Wed Sep 5 02:39:09 2012
@@ -0,0 +1,33 @@
+/**
+ * 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.
+ */
+
+
+// load all templates here
+
+require('templates/application');
+require('templates/login');
+require('templates/main');
+require('templates/installer');
+require('templates/installer/step1');
+require('templates/installer/step2');
+require('templates/installer/step3');
+require('templates/installer/step4');
+require('templates/installer/step5');
+require('templates/installer/step6');
+require('templates/installer/step7');
+require('templates/installer/step8');
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/application.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/application.hbs?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/application.hbs (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/application.hbs Wed Sep 5 02:39:09 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.
+-->
+
+<div class="container">
+ <div class="navbar">
+ <a {{action gotoStep1}}><img id="logo" src="/img/logo-small.gif"></a>
+ <a class="brand" href="javascript:void 0">{{App.messages.app_name}}</a>
+ <ul class="nav">
+ <li class="right"><a class="help" href="{{App.messages.topnav_help_link}}" target="_blank">Help</a></li>
+ {{#if App.router.loggedIn}}
+ <li class="right"><a class="help" href="" {{action logoff}}>Sign out</a></li>
+ {{/if}}
+ <li class="right">{{loginName}}</li>
+ </ul>
+ </div>
+</div>
+
+<div class ="container">
+ <div>
+ {{outlet}}
+ </div>
+ <footer>
+ {{{App.messages.page_footer_body}}}
+ </footer>
+</div>
+
+
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer.hbs?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer.hbs (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer.hbs Wed Sep 5 02:39:09 2012
@@ -0,0 +1,55 @@
+<!--
+* 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.
+-->
+
+
+<div class="container">
+ <div class="container-fluid">
+ <div class="row-fluid">
+ <div class="span3">
+ <!--Sidebar content-->
+ <div class="well">
+ <ul class="nav nav-pills nav-stacked">
+ <li {{bindAttr class="isStep1:active"}}><a {{action gotoStep1}}>{{App.messages.step1_header}}</a></li>
+ <li {{bindAttr class="isStep2:active"}}><a {{action gotoStep2}}>{{App.messages.step2_header}}</a></li>
+ <li {{bindAttr class="isStep3:active"}}><a {{action gotoStep3}}>{{App.messages.step3_header}}</a></li>
+ <li {{bindAttr class="isStep4:active"}}><a {{action gotoStep4}}>{{App.messages.step4_header}}</a></li>
+ <li {{bindAttr class="isStep5:active"}}><a {{action gotoStep5}}>{{App.messages.step5_header}}</a></li>
+ <li {{bindAttr class="isStep6:active"}}><a {{action gotoStep6}}>{{App.messages.step6_header}}</a></li>
+ <li {{bindAttr class="isStep7:active"}}><a {{action gotoStep7}}>{{App.messages.step7_header}}</a></li>
+ <li {{bindAttr class="isStep8:active"}}><a {{action gotoStep8}}>{{App.messages.step8_header}}</a></li>
+ </ul>
+ </div>
+ </div>
+ <div class="span9">
+ <!--Body content-->
+ <div>
+ {{#unless currentStep}}
+ <h4> {{App.messages.installer_welcome}} </h4>
+
+ <!-- below gotoStep1 call should be replaced by a function in installerController that checks
+ the existing incomplete installation and cleans all the local stored data related to it -->
+
+ <a class="btn btn-success" {{action "gotoStep1"}}>New cluster</a>
+
+ {{/unless}}
+ {{outlet}}
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
\ No newline at end of file
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step1.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step1.hbs?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step1.hbs (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step1.hbs Wed Sep 5 02:39:09 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.
+-->
+
+
+<h2>{{App.messages.step1_header}}</h2>
+<div>
+ Name of your cluster
+</div>
+{{view Ember.TextField valueBinding="clusterName" target="controller"}}
+<div>
+<a class="btn btn-success" {{action submit target="view"}}>Next</a>
+</div>
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step2.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step2.hbs?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step2.hbs (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step2.hbs Wed Sep 5 02:39:09 2012
@@ -0,0 +1,22 @@
+<!--
+* 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.
+-->
+
+
+<h2>{{App.messages.step2_header}}</h2>
+<a class="btn" {{action back}}>Back</a>
+<a class="btn btn-success" {{action next}}>Next</a>
\ No newline at end of file
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step3.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step3.hbs?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step3.hbs (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step3.hbs Wed Sep 5 02:39:09 2012
@@ -0,0 +1,22 @@
+<!--
+* 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.
+-->
+
+
+<h2>{{App.messages.step3_header}} </h2>
+<a class="btn" {{action back}}>Back</a>
+<a class="btn btn-success" {{action next}}>Next</a>
\ No newline at end of file
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step4.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step4.hbs?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step4.hbs (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step4.hbs Wed Sep 5 02:39:09 2012
@@ -0,0 +1,22 @@
+<!--
+* 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.
+-->
+
+
+<h2>{{App.messages.step4_header}}</h2>
+<a class="btn" {{action back}}>Back</a>
+<a class="btn btn-success" {{action next}}>Next</a>
\ No newline at end of file
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step5.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step5.hbs?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step5.hbs (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step5.hbs Wed Sep 5 02:39:09 2012
@@ -0,0 +1,22 @@
+<!--
+* 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.
+-->
+
+
+<h2>{{App.messages.step5_header}}</h2>
+<a class="btn" {{action back}}>Back</a>
+<a class="btn btn-success" {{action next}}>Next</a>
\ No newline at end of file
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step6.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step6.hbs?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step6.hbs (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step6.hbs Wed Sep 5 02:39:09 2012
@@ -0,0 +1,22 @@
+<!--
+* 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.
+-->
+
+
+<h2>{{App.messages.step6_header}}</h2>
+<a class="btn" {{action back}}>Back</a>
+<a class="btn btn-success" {{action next}}>Next</a>
\ No newline at end of file
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step7.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step7.hbs?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step7.hbs (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step7.hbs Wed Sep 5 02:39:09 2012
@@ -0,0 +1,22 @@
+<!--
+* 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.
+-->
+
+
+<h2>{{App.messages.step7_header}}</h2>
+<a class="btn" {{action back}}>Back</a>
+<a class="btn btn-success" {{action next}}>Next</a>
\ No newline at end of file
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step8.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step8.hbs?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step8.hbs (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step8.hbs Wed Sep 5 02:39:09 2012
@@ -0,0 +1,21 @@
+<!--
+* 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.
+-->
+
+<h2>{{App.messages.step8_header}}</h2>
+<a class="btn" {{action back}}>Back</a>
+<a class="btn btn-success" {{action complete}}>Complete</a>
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/login.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/login.hbs?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/login.hbs (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/login.hbs Wed Sep 5 02:39:09 2012
@@ -0,0 +1,39 @@
+<!--
+* 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.
+-->
+
+<div class="well login">
+<h2>{{App.messages.login_header}}</h2>
+{{#if errorMessage}}
+<div class="alert alert-error">
+ {{errorMessage}}
+</div>
+{{/if}}
+<div>
+ {{App.messages.username_label}}
+</div>
+{{view Ember.TextField valueBinding="loginName"}}
+<div>
+ {{App.messages.password_label}}
+</div>
+{{view Ember.TextField type="password" valueBinding="password"}}
+<div>
+</div>
+<div>
+ <a class="btn btn-success" {{action "submit" target="controller"}}>{{App.messages.login_button}}</a>
+</div>
+</div>
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main.hbs?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main.hbs (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main.hbs Wed Sep 5 02:39:09 2012
@@ -0,0 +1,20 @@
+<!--
+* 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.
+-->
+
+
+<h2>Main Application</h2>
\ No newline at end of file
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/db.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/db.js?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/db.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/db.js Wed Sep 5 02:39:09 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');
+
+
+
+Storage.prototype.setObject = function(key, value) {
+ this.setItem(key, JSON.stringify(value));
+}
+
+Storage.prototype.getObject = function(key) {
+ var value = this.getItem(key);
+ return value && JSON.parse(value);
+}
+
+App.DB = {
+ name: '',
+ work_id: ''
+}
+
+App.storage = Ember.Object.extend ({
+
+ /*
+ getter methods
+ */
+
+
+ setInitialVal: function() {
+
+ },
+ getAuthVal: function() {
+
+ }
+
+
+ /*
+ setter methods
+ */
+
+
+
+});
Added: 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=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views.js Wed Sep 5 02:39:09 2012
@@ -0,0 +1,34 @@
+/**
+ * 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.
+ */
+
+
+
+// load all views here
+
+require('views/application');
+require('views/login');
+require('views/main');
+require('views/installer');
+require('views/installer/step1');
+require('views/installer/step2');
+require('views/installer/step3');
+require('views/installer/step4');
+require('views/installer/step5');
+require('views/installer/step6');
+require('views/installer/step7');
+require('views/installer/step8');
\ No newline at end of file
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/application.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/application.js?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/application.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/application.js Wed Sep 5 02:39:09 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.ApplicationView = Em.View.extend({
+ templateName: require('templates/application')
+});
\ No newline at end of file
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer.js?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer.js Wed Sep 5 02:39:09 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.InstallerView = Em.View.extend({
+
+ templateName: require('templates/installer')
+
+});
\ No newline at end of file
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step1.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step1.js?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step1.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step1.js Wed Sep 5 02:39:09 2012
@@ -0,0 +1,30 @@
+/**
+ * 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.InstallerStep1View = Em.View.extend({
+
+ templateName: require('templates/installer/step1'),
+
+ submit: function(e) {
+ //alert(this.get('controller.clusterName'));
+ App.router.transitionTo('step2');
+ }
+});
\ No newline at end of file
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step2.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step2.js?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step2.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step2.js Wed Sep 5 02:39:09 2012
@@ -0,0 +1,30 @@
+/**
+ * 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.InstallerStep2View = Em.View.extend({
+
+ templateName: require('templates/installer/step2'),
+
+ submit: function(router, event) {
+ alert('form2 submitted');
+ }
+
+});
\ No newline at end of file
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step3.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step3.js?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step3.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step3.js Wed Sep 5 02:39:09 2012
@@ -0,0 +1,30 @@
+/**
+ * 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.InstallerStep3View = Em.View.extend({
+
+ templateName: require('templates/installer/step3'),
+
+ submit: function(router, event) {
+ alert('form3 submitted');
+ }
+
+});
\ No newline at end of file
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step4.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step4.js?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step4.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step4.js Wed Sep 5 02:39:09 2012
@@ -0,0 +1,31 @@
+/**
+ * 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.InstallerStep4View = Em.View.extend({
+
+ templateName: require('templates/installer/step4'),
+
+ submit: function(e) {
+ alert(this.get('controller.clusterName'));
+ App.router.transitionTo('step5');
+ }
+
+});
\ No newline at end of file
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step5.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step5.js?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step5.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step5.js Wed Sep 5 02:39:09 2012
@@ -0,0 +1,31 @@
+/**
+ * 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.InstallerStep5View = Em.View.extend({
+
+ templateName: require('templates/installer/step5'),
+
+ submit: function(e) {
+ alert(this.get('controller.clusterName'));
+ App.router.transitionTo('step6');
+ }
+
+});
\ No newline at end of file
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step6.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step6.js?rev=1380953&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step6.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step6.js Wed Sep 5 02:39:09 2012
@@ -0,0 +1,31 @@
+/**
+ * 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.InstallerStep6View = Em.View.extend({
+
+ templateName: require('templates/installer/step6'),
+
+ submit: function(e) {
+ alert(this.get('controller.clusterName'));
+ App.router.transitionTo('step7');
+ }
+
+});
\ No newline at end of file