You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2014/07/24 20:05:25 UTC
[2/2] git commit: AMBARI-6589. Management Console: UI Layout,
Basic Routing and Create User Management Page (with mock data).
(jaimin)
AMBARI-6589. Management Console: UI Layout, Basic Routing and Create User Management Page (with mock data). (jaimin)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/31242e8f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/31242e8f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/31242e8f
Branch: refs/heads/trunk
Commit: 31242e8f7db2ddf4c116213fbca3cc19acbbe389
Parents: ec85841
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Thu Jul 24 11:04:56 2014 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Thu Jul 24 11:05:05 2014 -0700
----------------------------------------------------------------------
ambari-admin/pom.xml | 139 ++++++++++++++++--
.../src/main/resources/ui/admin-web/.bowerrc | 3 +
.../src/main/resources/ui/admin-web/.gitignore | 10 ++
.../src/main/resources/ui/admin-web/.jshintrc | 24 +++
.../main/resources/ui/admin-web/app/index.html | 124 ++++++++++++++++
.../resources/ui/admin-web/app/scripts/app.js | 32 ++++
.../controllers/ambariViews/ViewsEditCtrl.js | 22 +++
.../controllers/ambariViews/ViewsListCtrl.js | 22 +++
.../clusters/ClustersManageAccessCtrl.js | 62 ++++++++
.../controllers/groups/GroupsListCtrl.js | 22 +++
.../app/scripts/controllers/mainCtrl.js | 22 +++
.../controllers/users/UsersCreateCtrl.js | 35 +++++
.../scripts/controllers/users/UsersListCtrl.js | 52 +++++++
.../scripts/controllers/users/UsersShowCtrl.js | 91 ++++++++++++
.../app/scripts/directives/PasswordVerify.js | 36 +++++
.../app/scripts/directives/linkToDir.js | 40 +++++
.../ui/admin-web/app/scripts/routes.js | 104 +++++++++++++
.../ui/admin-web/app/scripts/services/User.js | 62 ++++++++
.../resources/ui/admin-web/app/styles/main.css | 78 ++++++++++
.../admin-web/app/views/ambariViews/edit.html | 99 +++++++++++++
.../admin-web/app/views/ambariViews/list.html | 123 ++++++++++++++++
.../app/views/clusters/manageAccess.html | 63 ++++++++
.../ui/admin-web/app/views/groups/list.html | 59 ++++++++
.../ui/admin-web/app/views/groupsAdmin.html | 17 +++
.../ui/admin-web/app/views/leftNavbar.html | 53 +++++++
.../resources/ui/admin-web/app/views/main.html | 21 +++
.../ui/admin-web/app/views/users/create.html | 64 ++++++++
.../ui/admin-web/app/views/users/list.html | 62 ++++++++
.../app/views/users/modals/changePassword.html | 52 +++++++
.../users/modals/deleteUserConfirmation.html | 24 +++
.../ui/admin-web/app/views/users/show.html | 103 +++++++++++++
.../src/main/resources/ui/admin-web/bower.json | 12 ++
.../src/main/resources/ui/admin-web/gulpfile.js | 145 +++++++++++++++++++
.../src/main/resources/ui/admin-web/mock.js | 67 +++++++++
.../main/resources/ui/admin-web/package.json | 32 ++++
.../main/resources/ui/admin-web/test/.bowerrc | 3 +
.../main/resources/ui/admin-web/test/bower.json | 9 ++
.../main/resources/ui/admin-web/test/index.html | 44 ++++++
.../resources/ui/admin-web/test/spec/test.js | 30 ++++
ambari-web/app/messages.js | 1 +
ambari-web/app/templates/application.hbs | 1 +
41 files changed, 2049 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-admin/pom.xml b/ambari-admin/pom.xml
index 559a13d..6f70b43 100644
--- a/ambari-admin/pom.xml
+++ b/ambari-admin/pom.xml
@@ -59,6 +59,72 @@
</executions>
</plugin>
<plugin>
+ <groupId>com.github.eirslett</groupId>
+ <artifactId>frontend-maven-plugin</artifactId>
+ <version>0.0.14</version>
+ <configuration>
+ <nodeVersion>v0.10.26</nodeVersion>
+ <npmVersion>1.4.3</npmVersion>
+ <workingDirectory>src/main/resources/ui/admin-web/</workingDirectory>
+ </configuration>
+ <executions>
+ <execution>
+ <id>install node and npm</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>install-node-and-npm</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>npm install</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>npm</goal>
+ </goals>
+ <configuration>
+ <arguments>install --unsafe-perm</arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>exec-maven-plugin</artifactId>
+ <groupId>org.codehaus.mojo</groupId>
+ <executions>
+ <execution>
+ <id>Bower install</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <workingDirectory>${basedir}/src/main/resources/ui/admin-web</workingDirectory>
+ <executable>node/node</executable>
+ <arguments>
+ <argument>node_modules/bower/bin/bower</argument>
+ <argument>install</argument>
+ <argument>--allow-root</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ <execution>
+ <id>Gulp build</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <workingDirectory>${basedir}/src/main/resources/ui/admin-web</workingDirectory>
+ <executable>node/node</executable>
+ <arguments>
+ <argument>node_modules/gulp/bin/gulp</argument>
+ <argument>build</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
</plugin>
@@ -71,22 +137,65 @@
</configuration>
</plugin>
<plugin>
- <groupId>org.vafer</groupId>
- <artifactId>jdeb</artifactId>
- <version>1.0.1</version>
- <executions>
- <execution>
- <phase>none</phase>
- <goals>
- <goal>jdeb</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <skip>true</skip>
- <submodules>false</submodules>
- </configuration>
+ <groupId>org.vafer</groupId>
+ <artifactId>jdeb</artifactId>
+ <version>1.0.1</version>
+ <executions>
+ <execution>
+ <phase>none</phase>
+ <goals>
+ <goal>jdeb</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <skip>true</skip>
+ <submodules>false</submodules>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>src/main/resources/ui/admin-web/bower_components/**</exclude>
+ <exclude>src/main/resources/ui/admin-web/dist/**</exclude>
+ <exclude>src/main/resources/ui/admin-web/node/**</exclude>
+ <exclude>src/main/resources/ui/admin-web/node_modules/**</exclude>
+ <exclude>src/main/resources/ui/admin-web/app/bower_components/**</exclude>
+ <exclude>src/main/resources/ui/admin-web/test/bower_components/**</exclude>
+ <exclude>src/main/resources/ui/admin-web/mock.js</exclude>
+ <exclude>src/main/resources/ui/admin-web/bower.json</exclude>
+ <exclude>src/main/resources/ui/admin-web/test/bower.json</exclude>
+ <exclude>src/main/resources/ui/admin-web/test/.bowerrc</exclude>
+ <exclude>src/main/resources/ui/admin-web/.bowerrc</exclude>
+ <exclude>src/main/resources/ui/admin-web/package.json</exclude>
+ <exclude>src/main/resources/ui/admin-web/.jshintrc</exclude>
+ </excludes>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>test</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
</plugin>
</plugins>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>false</filtering>
+ <includes>
+ <include>META-INF/**/*</include>
+ <include>view.xml</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>src/main/resources/ui/admin-web/dist</directory>
+ <filtering>false</filtering>
+ </resource>
+ </resources>
</build>
</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/.bowerrc
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/.bowerrc b/ambari-admin/src/main/resources/ui/admin-web/.bowerrc
new file mode 100644
index 0000000..d0f0b6f
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/.bowerrc
@@ -0,0 +1,3 @@
+{
+ "directory": "app/bower_components"
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/.gitignore
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/.gitignore b/ambari-admin/src/main/resources/ui/admin-web/.gitignore
new file mode 100644
index 0000000..a0e4caf
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/.gitignore
@@ -0,0 +1,10 @@
+node_modules
+public
+.tmp
+.sass-cache
+app/bower_components
+test/bower_components
+heroku
+/views
+dist
+node
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/.jshintrc
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/.jshintrc b/ambari-admin/src/main/resources/ui/admin-web/.jshintrc
new file mode 100644
index 0000000..dfda519
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/.jshintrc
@@ -0,0 +1,24 @@
+{
+ "node": true,
+ "browser": true,
+ "esnext": true,
+ "bitwise": true,
+ "camelcase": true,
+ "curly": true,
+ "eqeqeq": true,
+ "immed": true,
+ "indent": 2,
+ "latedef": true,
+ "newcap": true,
+ "noarg": true,
+ "quotmark": "single",
+ "regexp": true,
+ "undef": true,
+ "unused": false,
+ "strict": true,
+ "trailing": true,
+ "smarttabs": true,
+ "globals": {
+ "angular": false
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/app/index.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/index.html b/ambari-admin/src/main/resources/ui/admin-web/app/index.html
new file mode 100644
index 0000000..6b1f58c
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/index.html
@@ -0,0 +1,124 @@
+<!--
+* 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 class="no-js">
+ <head>
+ <meta charset="utf-8">
+ <title>AdminConsole</title>
+ <meta name="description" content="">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
+
+ <!-- build:css styles/vendor.css -->
+ <!-- bower:css -->
+ <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" />
+ <!-- endbower -->
+ <!-- endbuild -->
+
+ <!-- build:css styles/main.css -->
+ <link rel="stylesheet" href="styles/main.css">
+ <!-- endbuild -->
+
+ </head>
+ <body ng-app="ambariAdminConsole">
+ <!--[if lt IE 10]>
+ <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
+ <![endif]-->
+
+ <header class="navbar navbar-static-top navbar-inverse">
+ <div class="navbar-inner">
+ <div class="container">
+ <div class="navbar-header">
+ <a href="/#/main/dashboard" class="navbar-brand">Ambari Admin Console</a>
+ </div>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <div class="btn-group" dropdown is-open="status.isopen">
+ <button type="button" class="btn btn-default dropdown-toggle navbar-btn" ng-disabled="disabled">
+ Admin <span class="caret"></span>
+ </button>
+ <ul class="dropdown-menu" role="menu">
+ <li><a href="#">About</a></li>
+ <li><a href="#">Settings</a></li>
+ <li><a href="#">Manage Ambari</a></li>
+ <li class="divider"></li>
+ <li><a href="#">Sign Out</a></li>
+ </ul>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+
+ </header>
+ <div class="container">
+ <div class="row">
+ <div class="col-sm-3">
+ <div ng-include="'views/leftNavbar.html'"></div>
+ </div>
+ <div class="col-sm-9">
+ <ng-view></ng-view>
+ </div>
+ </div>
+ </div>
+
+
+ <!-- build:js scripts/vendor.js -->
+ <!-- bower:js -->
+ <script src="bower_components/jquery/dist/jquery.js"></script>
+ <script src="bower_components/bootstrap/dist/js/bootstrap.js"></script>
+ <script src="bower_components/angular/angular.js"></script>
+ <script src="bower_components/angular-route/angular-route.js"></script>
+ <script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
+ <script src="bower_components/lodash/dist/lodash.compat.js"></script>
+ <script src="bower_components/restangular/dist/restangular.js"></script>
+ <!-- endbower -->
+ <!-- endbuild -->
+
+ <!-- build:js scripts/plugins.js -->
+ <script src="bower_components/bootstrap/js/affix.js"></script>
+ <script src="bower_components/bootstrap/js/alert.js"></script>
+ <script src="bower_components/bootstrap/js/dropdown.js"></script>
+ <script src="bower_components/bootstrap/js/tooltip.js"></script>
+ <script src="bower_components/bootstrap/js/modal.js"></script>
+ <script src="bower_components/bootstrap/js/transition.js"></script>
+ <script src="bower_components/bootstrap/js/button.js"></script>
+ <script src="bower_components/bootstrap/js/popover.js"></script>
+ <script src="bower_components/bootstrap/js/carousel.js"></script>
+ <script src="bower_components/bootstrap/js/scrollspy.js"></script>
+ <script src="bower_components/bootstrap/js/collapse.js"></script>
+ <script src="bower_components/bootstrap/js/tab.js"></script>
+ <!-- endbuild -->
+
+ <!-- build:js scripts/main.js -->
+ <script src="scripts/app.js"></script>
+ <script src="scripts/routes.js"></script>
+ <script src="scripts/controllers/mainCtrl.js"></script>
+ <script src="scripts/controllers/users/UsersCreateCtrl.js"></script>
+ <script src="scripts/controllers/users/UsersListCtrl.js"></script>
+ <script src="scripts/controllers/users/UsersShowCtrl.js"></script>
+ <script src="scripts/controllers/groups/GroupsListCtrl.js"></script>
+ <script src="scripts/controllers/ambariViews/ViewsListCtrl.js"></script>
+ <script src="scripts/controllers/ambariViews/ViewsEditCtrl.js"></script>
+ <script src="scripts/controllers/clusters/ClustersManageAccessCtrl.js"></script>
+ <script src="scripts/directives/linkToDir.js"></script>
+ <script src="scripts/directives/PasswordVerify.js"></script>
+ <script src="scripts/services/User.js"></script>
+ <!-- endbuild -->
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js
new file mode 100644
index 0000000..2979e6e
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js
@@ -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.
+ */
+'use strict';
+
+angular.module('ambariAdminConsole', [
+ 'ngRoute',
+ 'ui.bootstrap',
+ 'restangular'
+])
+.config(['RestangularProvider', '$httpProvider', function(RestangularProvider, $httpProvider) {
+ // Config Ajax-module
+ RestangularProvider.setBaseUrl('/api/v1');
+ RestangularProvider.setDefaultHeaders({'X-Requested-By':'ambari'});
+
+ $httpProvider.defaults.headers.post['Content-Type'] = 'plain/text';
+ $httpProvider.defaults.headers.put['Content-Type'] = 'plain/text';
+}]);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsEditCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsEditCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsEditCtrl.js
new file mode 100644
index 0000000..1817686
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsEditCtrl.js
@@ -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.
+ */
+'use strict';
+
+angular.module('ambariAdminConsole')
+.controller('ViewsEditCtrl', ['$scope', function($scope) {
+}]);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsListCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsListCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsListCtrl.js
new file mode 100644
index 0000000..6ece721
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsListCtrl.js
@@ -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.
+ */
+'use strict';
+
+angular.module('ambariAdminConsole')
+.controller('ViewsListCtrl',['$scope', function($scope) {
+}]);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/ClustersManageAccessCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/ClustersManageAccessCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/ClustersManageAccessCtrl.js
new file mode 100644
index 0000000..b6524ee
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/ClustersManageAccessCtrl.js
@@ -0,0 +1,62 @@
+/**
+ * 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.
+ */
+'use strict';
+
+angular.module('ambariAdminConsole')
+.controller('ClustersManageAccessCtrl', ['$scope', function($scope) {
+ $scope.isEditMode = false;
+ $scope.permissions = {
+ read:{
+ users: ['bill', 'kat'],
+ groups: ['users', 'contractors']
+ },
+ operate:{
+ users: ['jeff', 'tom', 'john', 'mike', 'steve'],
+ groups: ['sysadmins', 'hadoopadmins']
+ }
+ };
+
+ var processInput = function(obj) {
+ var result = [], item;
+ if(typeof obj === 'string'){
+ obj = obj.split(',');
+ } else if(!Array.isArray(obj)){
+ throw 'processInput:: argument must be Array or string!';
+ }
+ // Remove doubles
+ for(var i=0, max = obj.length; i < max; i++){
+ item = obj[i];
+ if(item != false && result.indexOf(item) < 0){
+
+ result.push(item);
+ }
+ }
+ return result;
+ };
+
+ $scope.toggleEditMode = function() {
+ if($scope.isEditMode){
+ $scope.permissions.read.users = processInput($scope.permissions.read.users);
+ $scope.permissions.read.groups = processInput($scope.permissions.read.groups);
+
+ $scope.permissions.operate.users = processInput($scope.permissions.operate.users);
+ $scope.permissions.operate.groups = processInput($scope.permissions.operate.groups);
+ }
+ $scope.isEditMode = !$scope.isEditMode;
+ };
+}]);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/groups/GroupsListCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/groups/GroupsListCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/groups/GroupsListCtrl.js
new file mode 100644
index 0000000..1ae597f
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/groups/GroupsListCtrl.js
@@ -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.
+ */
+'use strict';
+
+angular.module('ambariAdminConsole')
+.controller('GroupsListCtrl',['$scope', function($scope) {
+}]);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/mainCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/mainCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/mainCtrl.js
new file mode 100644
index 0000000..0755c09
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/mainCtrl.js
@@ -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.
+ */
+'use strict';
+
+angular.module('ambariAdminConsole')
+.controller('MainCtrl',[function() {
+}]);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/users/UsersCreateCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/users/UsersCreateCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/users/UsersCreateCtrl.js
new file mode 100644
index 0000000..6765ce1
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/users/UsersCreateCtrl.js
@@ -0,0 +1,35 @@
+/**
+ * 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.
+ */
+'use strict';
+
+angular.module('ambariAdminConsole')
+.controller('UsersCreateCtrl',['$scope', '$routeParams', 'User', '$location', function($scope, $routeParams, User, $location) {
+ $scope.user = {};
+
+ $scope.createUser = function() {
+ $scope.form.submitted = true;
+ if ($scope.form.$valid){
+ User.create({
+ 'Users/user_name': $scope.user.user_name,
+ 'Users/password': $scope.user.password
+ }).then(function() {
+ $location.path('/users');
+ });
+ }
+ };
+}]);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/users/UsersListCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/users/UsersListCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/users/UsersListCtrl.js
new file mode 100644
index 0000000..2f43fa7
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/users/UsersListCtrl.js
@@ -0,0 +1,52 @@
+/**
+ * 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.
+ */
+'use strict';
+
+angular.module('ambariAdminConsole')
+.controller('UsersListCtrl',['$scope', 'User', function($scope, User) {
+ $scope.users = [];
+ User.list().then(function(data) {
+ $scope.users = data.items;
+ });
+
+ $scope.actvieFilterOptions = ['All', 'Active', 'Inactive'];
+ $scope.currentActiveFilter = 'All';
+ $scope.activeFilter = function(user) {
+ var af = $scope.currentActiveFilter;
+ if (af === 'All') {
+ return user;
+ } else if(af === 'Active' && user.Users.active){
+ return user;
+ } else if(af === 'Inactive' && !user.Users.active){
+ return user;
+ }
+ };
+
+ $scope.typeFilterOptions = ['All', 'Local', 'LDAP'];
+ $scope.currentTypeFilter = 'All';
+ $scope.typeFilter = function(user) {
+ var tf = $scope.currentTypeFilter;
+ if (tf === 'All') {
+ return user;
+ } else if(tf === 'Local' && !user.Users.ldap_user){
+ return user;
+ } else if(tf === 'LDAP' && user.Users.ldap_user){
+ return user;
+ }
+ };
+}]);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/users/UsersShowCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/users/UsersShowCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/users/UsersShowCtrl.js
new file mode 100644
index 0000000..c918c29
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/users/UsersShowCtrl.js
@@ -0,0 +1,91 @@
+/**
+ * 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.
+ */
+'use strict';
+
+angular.module('ambariAdminConsole')
+.controller('UsersShowCtrl', ['$scope', '$routeParams', 'User', '$modal', '$location', function($scope, $routeParams, User, $modal, $location) {
+ $scope.user = {};
+
+ $scope.isGroupEditing = false;
+ $scope.enableGroupEditing = function() {
+ $scope.isGroupEditing = true;
+ $scope.editingGroupsList = $scope.user.user_groups.join();
+ };
+
+ $scope.updateGroups = function() {
+ $scope.user.user_groups = $scope.editingGroupsList.split(',');
+ $scope.isGroupEditing = false;
+ };
+
+ $scope.openChangePwdDialog = function() {
+ var modalInstance = $modal.open({
+ templateUrl: 'views/users/modals/changePassword.html',
+ controller: function($scope) {
+ $scope.passwordData = {
+ password: ''
+ };
+
+ $scope.form = {};
+
+ $scope.ok = function() {
+ $scope.form.passwordChangeForm.submitted = true;
+ if($scope.form.passwordChangeForm.$valid){
+ modalInstance.close($scope.passwordData.password, $scope.passwordData.currentUserPassword);
+ }
+ };
+ $scope.cancel = function() {
+ modalInstance.dismiss('cancel');
+ };
+ }
+ });
+
+ modalInstance.result.then(function(newPassword, currentUserPassword) {
+ User.setPassword($scope.user, newPassword, currentUserPassword);
+ });
+ };
+
+ $scope.toggleUserActive = function() {
+ $scope.user.active = !$scope.user.active;
+ User.setActive($scope.user.user_name, $scope.user.active);
+ };
+
+ User.get($routeParams.id).then(function(data) {
+ $scope.user = data.Users;
+ });
+
+ $scope.deleteUser = function() {
+ var modalInstance = $modal.open({
+ templateUrl: 'views/users/modals/deleteUserConfirmation.html',
+ controller: function($scope) {
+ $scope.delete = function() {
+ modalInstance.close();
+ };
+
+ $scope.cancel = function() {
+ modalInstance.dismiss('cancel');
+ };
+ }
+ });
+
+ modalInstance.result.then(function() {
+ User.delete($scope.user.user_name).then(function() {
+ $location.path('/users');
+ });
+ });
+ };
+}]);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/PasswordVerify.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/PasswordVerify.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/PasswordVerify.js
new file mode 100644
index 0000000..134ce7e
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/PasswordVerify.js
@@ -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.
+ */
+'use strict';
+
+angular.module('ambariAdminConsole')
+.directive('passwordVerify', function() {
+ return {
+ require: 'ngModel',
+ restrict: 'A',
+ scope: {
+ passwordVerify: '='
+ },
+ link: function(scope, elem, attrs, ctrl) {
+ scope.$watch(function() {
+ return (ctrl.$pristine && angular.isUndefined(ctrl.$modelValue)) || scope.passwordVerify === ctrl.$modelValue;
+ }, function(currentValue) {
+ ctrl.$setValidity('passwordVerify', currentValue);
+ })
+ }
+ }
+});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/linkToDir.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/linkToDir.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/linkToDir.js
new file mode 100644
index 0000000..72f8a8c
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/linkToDir.js
@@ -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.
+ */
+'use strict';
+
+angular.module('ambariAdminConsole')
+.directive('linkTo', function() {
+ return {
+ restrict: 'E',
+ transclude: true,
+ replace: true,
+ scope: {
+ route: '@',
+ id: '@'
+ },
+
+ template: '<a href="#{{href}}" ng-transclude></a>',
+ controller: ['$scope', 'ROUTES', function($scope, ROUTES) {
+ var route = ROUTES;
+ angular.forEach($scope.route.split('.'), function(routeObj) {
+ route = route[routeObj];
+ });
+ $scope.href = route.url.replace(':id', $scope.id);
+ }]
+ };
+});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/app/scripts/routes.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/routes.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/routes.js
new file mode 100644
index 0000000..d0b502a
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/routes.js
@@ -0,0 +1,104 @@
+/**
+ * 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.
+ */
+'use strict';
+
+angular.module('ambariAdminConsole')
+.constant('ROUTES', {
+ root: {
+ url: '/',
+ templateUrl: 'views/main.html',
+ controller: 'MainCtrl'
+ },
+ users: {
+ list: {
+ url: '/users',
+ templateUrl: 'views/users/list.html',
+ controller: 'UsersListCtrl'
+ },
+ edit: {
+ url: '/users/:id/edit',
+ templateUrl: 'views/users/create.html',
+ controller: 'UsersCreateCtrl'
+ },
+ create: {
+ url: '/users/new',
+ templateUrl: 'views/users/create.html',
+ controller: 'UsersCreateCtrl'
+ },
+ show: {
+ url: '/users/:id',
+ templateUrl: 'views/users/show.html',
+ controller: 'UsersShowCtrl'
+ }
+ },
+ groups: {
+ list: {
+ url: '/groups',
+ templateUrl: 'views/groups/list.html',
+ controller: 'GroupsListCtrl'
+ },
+ edit: {
+ url: '/groups/:id/edit',
+ templateUrl: 'views/groups/create.html',
+ controller: 'GroupsCreateCtrl'
+ },
+ create: {
+ url: '/groups/new',
+ templateUrl: 'views/groups/create.html',
+ controller: 'GroupsCreateCtrl'
+ }
+ },
+ views: {
+ list: {
+ url: '/views',
+ templateUrl: 'views/ambariViews/list.html',
+ controller: 'ViewsListCtrl',
+ },
+ edit: {
+ url: '/views/:id/edit',
+ templateUrl: 'views/ambariViews/edit.html',
+ controller: 'ViewsEditCtrl'
+ },
+ create: {
+ url: '/views/new',
+ templateUrl: 'views/ambariViews/create.html',
+ controller: 'ViewsCreateCtrl'
+ }
+ },
+ clusters:{
+ manageAccess: {
+ url: '/clusters/:id/manageAccess',
+ templateUrl: 'views/clusters/manageAccess.html',
+ controller: 'ClustersManageAccessCtrl'
+ }
+ }
+})
+.config(['$routeProvider', '$locationProvider', 'ROUTES', function($routeProvider, $locationProvider, ROUTES) {
+ var createRoute = function(routeObj) {
+ if(routeObj.url){
+ $routeProvider.when(routeObj.url, routeObj);
+ } else {
+ angular.forEach(routeObj, createRoute);
+ }
+ };
+ angular.forEach(ROUTES, createRoute);
+}])
+.run(['$rootScope', 'ROUTES', function($rootScope, ROUTES) {
+ // Make routes available in every template and controller
+ $rootScope.ROUTES = ROUTES;
+}]);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/User.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/User.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/User.js
new file mode 100644
index 0000000..4f3e51c
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/User.js
@@ -0,0 +1,62 @@
+/**
+ * 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.
+ */
+'use strict';
+
+angular.module('ambariAdminConsole')
+.factory('User', ['Restangular', function(Restangular) {
+ Restangular.addResponseInterceptor(function(data, operation, what, url, response, deferred) {
+ var extractedData;
+ if(operation === 'getList'){
+ extractedData = data.items;
+ } else {
+ extractedData = data;
+ }
+
+ return extractedData;
+ });
+
+ var Users = Restangular.all('users');
+
+ return {
+ list: function(cb) {
+ return Users.customGET('', {
+ fields: 'Users/ldap_user,Users/active'
+ });
+ },
+ get: function(userId) {
+ return Restangular.one('users', userId).get();
+ },
+ create: function(userObj) {
+ return Restangular.all('users').post(userObj);
+ },
+ setActive: function(userId, isActive) {
+ return Restangular.one('users', userId).customPUT({'Users/active':isActive});
+ },
+ setPassword: function(user, password, currentUserPassword) {
+
+ return Restangular.one('users', user.user_name).customPUT({
+ 'Users/password': password,
+ 'Users/old_password': currentUserPassword,
+ 'Users/roles': user.roles[0] || 'user'
+ });
+ },
+ delete: function(userId) {
+ return Restangular.one('users', userId).remove();
+ }
+ };
+}]);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css b/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
new file mode 100644
index 0000000..5993f79
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
@@ -0,0 +1,78 @@
+/**
+ * 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.
+ */
+
+
+ul.nav li > a{
+ cursor: pointer;
+}
+
+.top-buffer{
+ padding-top: 20px;
+}
+.bottom-buffer{
+ padding-bottom: 20px;
+}
+.right-buffer{
+ padding-right: 20px;
+}
+.right-margin{
+ margin-right: 20px;
+}
+.bottom-margin{
+ margin-bottom: 10px;
+}
+.top-margin{
+ margin-top: 10px;
+}
+.text-left{
+ text-align: left !important;
+}
+.text-center{
+ text-align: center!important;
+}
+.padding-top-7{
+ padding-top: 7px;
+}
+.no-margin-bottom{
+ margin-bottom: 0!important;
+}
+table.no-border tr td{
+ border: none;
+}
+.no-border{
+ border: none !important;
+}
+
+.groups-pane table ul{
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+}
+.groups-pane table ul li {
+ margin: 0;
+ padding: 0;
+}
+
+.views-list-pane{}
+.views-list-pane .panel-body table{
+ margin-bottom: 0;
+}
+.views-list-pane .panel-body table tbody td{
+ border-top: none;
+ vertical-align: middle;
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/edit.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/edit.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/edit.html
new file mode 100644
index 0000000..b621c17
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/edit.html
@@ -0,0 +1,99 @@
+<!--
+* 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>Edit PIG_CT: Pig for CT Cluster</h2>
+<hr>
+<div class="panel panel-default">
+ <div class="panel-heading">
+ <h3 class="panel-title">Settings</h3>
+ </div>
+ <div class="panel-body">
+ <form class="form-horizontal">
+ <div class="form-group">
+ <label for="" class="col-sm-2 control-label">Instance ID</label>
+ <label for="" class="col-sm-10 control-label text-left">PIG_CT</label>
+ </div>
+ <div class="form-group">
+ <label for="" class="col-sm-2 control-label">Display Name</label>
+ <div class="col-sm-10"><input type="text" class="form-control" placeholder="Display Name"></div>
+ </div>
+ <div class="form-group">
+ <div class="col-sm-offset-2 col-sm-10">
+ <div class="checkbox">
+ <label>
+ <input type="checkbox"> Visible
+ </label>
+ </div>
+ </div>
+ </div>
+ </form>
+ </div>
+</div>
+
+<div class="panel panel-default">
+ <div class="panel-heading">
+ <h3 class="panel-title">Permissions</h3>
+ </div>
+ <div class="panel-body">
+
+ <form class="form-horizontal">
+ <div class="form-group">
+ <div class="col-sm-2"></div>
+ <label class="col-sm-5 control-label text-left">Users</label>
+ <label class="col-sm-5 control-label text-left">Groups</label>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-2 control-label">USE</label>
+ <div class="col-sm-5"><textarea name="" id="" cols="30" rows="4" class="form-control"></textarea></div>
+ <div class="col-sm-5"><textarea name="" id="" cols="30" rows="4" class="form-control"></textarea></div>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-2 control-label">EDIT_SCRIPT</label>
+ <div class="col-sm-5"><textarea name="" id="" cols="30" rows="4" class="form-control"></textarea></div>
+ <div class="col-sm-5"><textarea name="" id="" cols="30" rows="4" class="form-control"></textarea></div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-sm-2">EXECUTE_SCRIPT</label>
+ <div class="col-sm-5"><textarea name="" id="" cols="30" rows="4" class="form-control"></textarea></div>
+ <div class="col-sm-5"><textarea name="" id="" cols="30" rows="4" class="form-control"></textarea></div>
+ </div>
+ </form>
+
+ </div>
+</div>
+
+<div class="panel panel-default">
+ <div class="panel-heading">
+ <h3 class="panel-title">Configuration</h3>
+ </div>
+ <div class="panel-body">
+ <form action="" class="form-horizontal">
+ <div class="form-group">
+ <label for="" class="control-label col-sm-2">WebHCat URL</label>
+ <div class="col-sm-10"><input type="text" class="form-control"></div>
+ </div>
+ <div class="form-group">
+ <label for="" class="control-label col-sm-2">Other Prop</label>
+ <div class="col-sm-10"><input type="text" class="form-control"></div>
+ </div>
+ <div class="form-group">
+ <label for="" class="control-label col-sm-2">Required Prop</label>
+ <div class="col-sm-10"><input type="text" class="form-control"></div>
+ </div>
+ </form>
+ </div>
+</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/list.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/list.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/list.html
new file mode 100644
index 0000000..c3cc53e
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/list.html
@@ -0,0 +1,123 @@
+<!--
+* 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="views-list-pane">
+ <div class="clearfix">
+ <h3 class="pull-left">Views management</h3>
+ <div class="pull-right top-buffer col-sm-4">
+ <div class="input-group">
+ <input type="text" class="form-control" placeholder="Search">
+ <span class="input-group-addon">
+ <span class="glyphicon glyphicon-search"></span>
+ </span>
+ </div>
+ </div>
+ </div>
+ <hr>
+ <accordion>
+ <accordion-group>
+ <accordion-heading>
+ <div class="row">
+ <div class="col-sm-3">Pig</div>
+ <div class="col-sm-3">0.1.0, 0.2.0</div>
+ <div class="col-sm-3">v 3 instances</div>
+ <div class="col-sm-3">This is a description</div>
+ </div>
+ </accordion-heading>
+ <table class="table">
+ <tbody>
+ <tr>
+ <td class="col-sm-3"></td>
+ <td class="col-sm-3">0.1.0</td>
+ <td class="col-sm-3">PIG_CT: Pig for CT CLuster</td>
+ <td class="col-sm-3">
+ <link-to route="views.edit" id="1" class="btn btn-default"><span class="glyphicon glyphicon-cog"></span> Edit</link-to>
+ <a href="" class="btn btn-default">
+ <span class="glyphicon glyphicon-trash"></span> Delete
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td class="col-sm-3"></td>
+ <td class="col-sm-3">0.2.0</td>
+ <td class="col-sm-3">PIG_CT: Pig for CT CLuster</td>
+ <td class="col-sm-3">
+ <a href="" class="btn btn-default">
+ <span class="glyphicon glyphicon-cog"></span> Edit
+ </a>
+ <a href="" class="btn btn-default">
+ <span class="glyphicon glyphicon-trash"></span> Delete
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td class="col-sm-3"></td>
+ <td class="col-sm-3">0.1.0</td>
+ <td class="col-sm-3">PIG_CT: Pig for CT CLuster</td>
+ <td class="col-sm-3">
+ <a href="" class="btn btn-default">
+ <span class="glyphicon glyphicon-cog"></span> Edit
+ </a>
+ <a href="" class="btn btn-default">
+ <span class="glyphicon glyphicon-trash"></span> Delete
+ </a>
+ </td>
+ </tr>
+ </tbody>
+ <tfoot>
+ <tr>
+ <td class="col-sm-3"></td>
+ <td class="col-sm-3"></td>
+ <td class="col-sm-3"></td>
+ <td class="col-sm-3">
+ <a href="" class="btn btn-default">
+ <span class="glyphicon glyphicon-plus"></span> Create Instance
+ </a>
+ </td>
+ </tr>
+ </tfoot>
+ </table>
+ </accordion-group>
+ <accordion-group>
+ <accordion-heading>
+ <div class="row">
+ <div class="col-sm-3">File Browser</div>
+ <div class="col-sm-3">0.1.0, 0.2.0</div>
+ <div class="col-sm-3">> No instances</div>
+ <div class="col-sm-3">This is a description</div>
+ </div>
+ </accordion-heading>
+ <table class="table">
+ <tbody>
+ </tbody>
+ <tfoot>
+ <tr>
+ <td class="col-sm-3"></td>
+ <td class="col-sm-3"></td>
+ <td class="col-sm-3"></td>
+ <td class="col-sm-3">
+ <a href="" class="btn btn-default">
+ <span class="glyphicon glyphicon-plus"></span> Create Instance
+ </a>
+ </td>
+ </tr>
+ </tfoot>
+ </table>
+ </accordion-group>
+
+ </accordion>
+</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/app/views/clusters/manageAccess.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/clusters/manageAccess.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/clusters/manageAccess.html
new file mode 100644
index 0000000..89e495d
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/clusters/manageAccess.html
@@ -0,0 +1,63 @@
+<!--
+* 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="cluster-manage-access-pane">
+ <div class="clearfix">
+ <h3 class="pull-left">My Cluster Permissions</h3>
+ <div class="pull-right top-buffer">
+ <a href class="btn btn-primary" ng-click="toggleEditMode()"><span class="glyphicon glyphicon-pencil"></span> Edit</a>
+ </div>
+ </div>
+ <hr>
+ <form class="form-horizontal">
+ <div class="form-group">
+ <div class="col-sm-2"></div>
+ <label class="col-sm-5 control-label text-left">Users</label>
+ <label class="col-sm-5 control-label text-left">Groups</label>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-2 control-label">READ</label>
+ <div class="col-sm-5" ng-switch="isEditMode">
+ <textarea ng-switch-when="true" name="" id="" cols="30" rows="4" class="form-control" ng-model="permissions.read.users"></textarea>
+ <div class="well" ng-switch-default>
+ <a href="#" ng-repeat="user in permissions.read.users">{{user}}{{$last ? '' :', '}}</a>
+ </div>
+ </div>
+ <div class="col-sm-5" ng-switch="isEditMode">
+ <textarea ng-switch-when="true" name="" id="" cols="30" rows="4" class="form-control" ng-model="permissions.read.groups"></textarea>
+ <div class="well" ng-switch-default>
+ <a href="#" ng-repeat="group in permissions.read.groups">{{group}}{{$last ? '' :', '}}</a>
+ </div>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-2 control-label">OPERATE</label>
+ <div class="col-sm-5" ng-switch="isEditMode">
+ <textarea ng-switch-when="true" name="" id="" cols="30" rows="4" class="form-control" ng-model="permissions.operate.users"></textarea>
+ <div class="well" ng-switch-default>
+ <a href="#" ng-repeat="user in permissions.operate.users">{{user}}{{$last ? '' :', '}}</a>
+ </div>
+ </div>
+ <div class="col-sm-5" ng-switch="isEditMode">
+ <textarea ng-switch-when="true" name="" id="" cols="30" rows="4" class="form-control" ng-model="permissions.operate.groups"></textarea>
+ <div class="well" ng-switch-default>
+ <a href="#" ng-repeat="group in permissions.operate.groups">{{group}}{{$last ? '' :', '}}</a>
+ </div>
+ </div>
+ </div>
+</div>
+
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/app/views/groups/list.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/groups/list.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/groups/list.html
new file mode 100644
index 0000000..4001c0b
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/groups/list.html
@@ -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.
+-->
+<div class="groups-pane">
+ <div class="clearfix">
+ <h3 class="pull-left">Groups management</h3>
+ <div class="pull-right top-buffer">
+ <a href="#{{ROUTES.groups.new}}" class="btn btn-primary"><span class="glyphicon glyphicon-plus"></span> Create Local Group</a>
+ <button class="btn btn-default ">Sync LDAP</button>
+ </div>
+ </div>
+ <hr>
+ <table class="table table-striped table-hover">
+ <thead>
+ <tr>
+ <th>Group name</th>
+ <th>Type</th>
+ <th>Members</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>operators</td>
+ <td>Local</td>
+ <td>
+ <ul>
+ <li>v 2 members</li>
+ <li>admin</li>
+ <li>usaku</li>
+ </ul>
+ </td>
+ <td>
+ <a href="" class="btn btn-default">edit</a> <a href="" class="btn btn-danger">delete</a>
+ </td>
+ </tr>
+ <tr>
+ <td>sysadmins</td>
+ <td>LDAP</td>
+ <td>> 20 members</td>
+ <td><a href="" class="btn btn-default">edit</a> <a href="" class="btn btn-danger">delete</a></td>
+ </tr>
+ </tbody>
+ </table>
+</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/app/views/groupsAdmin.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/groupsAdmin.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/groupsAdmin.html
new file mode 100644
index 0000000..6aaf1f6
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/groupsAdmin.html
@@ -0,0 +1,17 @@
+<!--
+* 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.
+-->
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
new file mode 100644
index 0000000..0b32dbf
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
@@ -0,0 +1,53 @@
+<!--
+* 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="panel panel-default">
+ <div class="panel-heading"><span class="glyphicon glyphicon-cloud"></span> Clusters</div>
+ <div class="panel-body">
+ <h5>My cluster</h5>
+ <ul class="nav nav-pills nav-stacked">
+ <li>
+ <link-to route="clusters.manageAccess" id="1">Manage Access</link-to>
+ </li>
+ <li><a href="/#/main/dashboard">Go to Dashboard</a></li>
+ </ul>
+ <hr>
+ <button type="button" class="btn btn-primary btn-block">
+ <span class="glyphicon glyphicon-plus"></span>
+ Create a Cluster
+ </button>
+ </div>
+</div>
+
+<div class="panel panel-default">
+ <div class="panel-heading"><span class="glyphicon glyphicon-th"></span> Views</div>
+ <div class="panel-body">
+ <ul class="nav nav-pills nav-stacked">
+ <li><link-to route="views.list">Manage Views</link-to></li>
+ </ul>
+ </div>
+</div>
+
+<div class="panel panel-default">
+ <div class="panel-heading"><span class="glyphicon glyphicon-user"></span> Users + Groups</div>
+ <div class="panel-body">
+ <ul class="nav nav-pills nav-stacked">
+ <li><link-to route="users.list">Manage Users</link-to></li>
+ <li><link-to route="groups.list">Manage Groups</link-to></li>
+ </ul>
+ </div>
+</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/app/views/main.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/main.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/main.html
new file mode 100644
index 0000000..1a19420
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/main.html
@@ -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.
+-->
+<div class="jumbotron">
+ <h2>Ambari Admin Console</h2>
+ <p class="lead">Some information about admin console.</p>
+</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/app/views/users/create.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/users/create.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/users/create.html
new file mode 100644
index 0000000..6aaf654
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/users/create.html
@@ -0,0 +1,64 @@
+<!--
+* 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>Create local user</h2>
+<hr>
+<form class="form-horizontal" role="form" novalidate name="form">
+ <div class="form-group" ng-class="{'has-error' : form.user_name.$error.required && form.submitted}">
+ <label for="username" class="col-sm-2 control-label">User name:</label>
+ <div class="col-sm-10">
+ <input type="text" id="username" class="form-control" name="user_name" placeholder="User name" ng-model="user.user_name" required>
+ <div class="alert alert-danger top-margin" ng-show="form.user_name.$error.required && form.submitted">
+ Required
+ </div>
+ </div>
+ </div>
+ <div class="form-group">
+ <label for="" class="col-sm-2 control-label">Type:</label>
+ <div class="col-sm-10">
+ <label for="" class="control-label">Local</label>
+ </div>
+ </div>
+ <div class="form-group">
+ <label for="" class="col-sm-2 control-label">Status</label>
+ <div class="col-sm-10">
+ <div class="btn btn-success">Active</div>
+ </div>
+ </div>
+ <div class="form-group" ng-class="{'has-error' : (form.password.$error.required && form.submitted) || form.confirmPassword.$error.passwordVerify}">
+ <label for="password" class="col-sm-2 control-label">Password:</label>
+ <div class="col-sm-10">
+ <input type="password" class="form-control bottom-margin" name="password" placeholder="Password" required ng-model="user.password">
+ <input type="password" class="form-control bottom-margin" name="confirmPassword" placeholder="Password confirmation" required ng-model="user.passwordConfirmation"
+ password-verify="user.password">
+
+ <div class="alert alert-danger" ng-show='form.confirmPassword.$error.passwordVerify'>
+ Password must match!
+ </div>
+ <div class="alert alert-danger" ng-show='form.password.$error.required && form.submitted'>
+ Password required!
+ </div>
+
+ </div>
+ </div>
+ <div class="form-group">
+ <div class="col-sm-offset-2 col-sm-10">
+ <button class="btn btn-primary" ng-click="createUser()">Create</button>
+ </div>
+ </div>
+
+</form>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/app/views/users/list.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/users/list.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/users/list.html
new file mode 100644
index 0000000..8f62aca
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/users/list.html
@@ -0,0 +1,62 @@
+<!--
+* 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="users-pane">
+ <div class="clearfix">
+ <h3 class="pull-left">Users management</h3>
+ <div class="pull-right top-buffer">
+ <link-to route="users.create" class="btn btn-primary"><span class="glyphicon glyphicon-plus"></span> Create Local User</link-to>
+ <button class="btn btn-default ">Sync LDAP</button>
+ </div>
+ </div>
+ <hr>
+ <table class="table table-striped table-hover">
+ <thead>
+ <tr>
+ <th>
+ <label for="">Username</label>
+ <input type="text" class="form-control" ng-model="currentNameFilter">
+ </th>
+ <th>
+ <label for="">Type</label>
+ <select class="form-control"
+ ng-model="currentTypeFilter"
+ ng-options="item for item in typeFilterOptions">
+ </select>
+
+ </th>
+ <th>
+ <label for="">Status</label>
+ <select class="form-control"
+ ng-model="currentActiveFilter"
+ ng-options="item for item in actvieFilterOptions">
+
+ </select>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr ng-repeat="user in users | filter:activeFilter | filter:typeFilter | filter:currentNameFilter">
+ <td>
+ <link-to route="users.show" id="{{user.Users.user_name}}">{{user.Users.user_name}}</link-to>
+ </td>
+ <td>{{user.Users.ldap_user ? 'LDAP' : 'Local'}}</td>
+ <td><span ng-class="user.Users.active ? 'text-success' : 'text-danger'">{{user.Users.active ? 'Active' : 'Inactive'}}</span></td>
+ </tr>
+ </tbody>
+ </table>
+</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/app/views/users/modals/changePassword.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/users/modals/changePassword.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/users/modals/changePassword.html
new file mode 100644
index 0000000..5e9926d
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/users/modals/changePassword.html
@@ -0,0 +1,52 @@
+<!--
+* 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="modal-header">
+ <h3 class="modal-title">Change Password</h3>
+</div>
+<div class="modal-body">
+ <form class="form-horizontal" novalidate name="form.passwordChangeForm" role="form" >
+ <div class="form-group" ng-class="{'has-error' : (form.passwordChangeForm.currentPassword.$error.required && form.passwordChangeForm.submitted)}">
+ <label for="" class="col-sm-4 control-label" >Your Password</label>
+ <div class="col-sm-8">
+ <input type="password" name="currentPassword" class="form-control bottom-margin" placeholder="Your password" required ng-model="passwordData.currentUserPassword">
+ <div class="alert alert-danger no-margin-bottom" ng-show='form.passwordChangeForm.password.$error.required && form.passwordChangeForm.submitted'>
+ Password required!
+ </div>
+ </div>
+ </div>
+ <div class="form-group no-margin-bottom" ng-class="{'has-error' : (form.passwordChangeForm.password.$error.required && form.passwordChangeForm.submitted) || form.passwordChangeForm.confirmPassword.$error.passwordVerify}">
+ <label for="" class="col-sm-4 control-label">New Password:</label>
+ <div class="col-sm-8">
+ <input type="password" class="form-control bottom-margin" name="password" placeholder="Password" required ng-model="passwordData.password">
+ <input type="password" class="form-control bottom-margin" name="confirmPassword" placeholder="Password confirmation" required ng-model="passwordData.passwordConfirmation"
+ password-verify="passwordData.password">
+ <div class="alert alert-danger no-margin-bottom" ng-show='form.passwordChangeForm.confirmPassword.$error.passwordVerify'>
+ Password must match!
+ </div>
+ <div class="alert alert-danger no-margin-bottom" ng-show='form.passwordChangeForm.password.$error.required && form.passwordChangeForm.submitted'>
+ Password required!
+ </div>
+ </div>
+
+ </div>
+ </form>
+</div>
+<div class="modal-footer">
+ <button class="btn btn-primary" ng-click="ok()">OK</button>
+ <button class="btn btn-warning" ng-click="cancel()">Cancel</button>
+</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/app/views/users/modals/deleteUserConfirmation.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/users/modals/deleteUserConfirmation.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/users/modals/deleteUserConfirmation.html
new file mode 100644
index 0000000..b87a670
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/users/modals/deleteUserConfirmation.html
@@ -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.
+-->
+<div class="modal-header no-border">
+ <h3 class="modal-title">Are you sure?</h3>
+</div>
+<div class="modal-footer">
+ <button class="btn btn-primary" ng-click="delete()">Delete</button>
+ <button class="btn btn-warning" ng-click="cancel()">Cancel</button>
+</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/app/views/users/show.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/users/show.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/users/show.html
new file mode 100644
index 0000000..6b36192
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/users/show.html
@@ -0,0 +1,103 @@
+<!--
+* 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 ng-show="user.user_name">
+ <div class="clearfix">
+ <h3 class="pull-left">{{user.user_name}}</h3>
+ <div class="pull-right top-buffer">
+ <button class="btn btn-danger" ng-click="deleteUser()">Delete User</button>
+ </div>
+ </div>
+ <hr>
+ <form class="form-horizontal" role="form" >
+ <div class="form-group">
+ <label for="" class="col-sm-2 control-label">Type:</label>
+ <div class="col-sm-10">
+ <label for="" class="control-label">Local</label>
+ </div>
+ </div>
+ <div class="form-group">
+ <label for="" class="col-sm-2 control-label">Status</label>
+ <div class="col-sm-10">
+ <div class="btn" ng-class="user.active ? 'btn-success' : 'btn-danger'">
+ <span ng-show="user.active">Active</span>
+ <span ng-show="!user.active">Inactive</span>
+ </div>
+ <a href ng-click="toggleUserActive()">Make User {{user.active ? 'Inactive' : 'Active'}}</a>
+ </div>
+ </div>
+ <div class="form-group">
+ <label for="password" class="col-sm-2 control-label">Password:</label>
+ <div class="col-sm-10">
+ <a href ng-click="openChangePwdDialog()" class="btn btn-default">Change Password</a>
+ </div>
+ </div>
+ <div class="form-group">
+ <label for="groups" class="col-sm-2 control-label">Groups:</label>
+ <div class="col-sm-10">
+ <div class="row" ng-hide="isGroupEditing">
+ <div class="col-sm-10">
+ <div class="well">
+ <a href ng-repeat="group in user.user_groups">{{group}}{{$last ? '' : ', '}}</a>
+ </div>
+ </div>
+ <div class="col-sm-2">
+ <a href ng-click="enableGroupEditing()"><span class="glyphicon glyphicon-cog"></span> Edit</a>
+ </div>
+ </div>
+ <div class="row" ng-show="isGroupEditing">
+ <div class="col-sm-12">
+ <textarea name="groups" id="" cols="30" rows="5" class="form-control bottom-margin" ng-model="editingGroupsList"></textarea>
+ <a href class="btn btn-primary pull-right" ng-click="updateGroups()">Update</a>
+ </div>
+
+ </div>
+ </div>
+
+ </div>
+ <div class="form-group">
+ <label for="" class="col-sm-2 control-label">Clusters</label>
+ <div class="col-sm-10">
+ <div class="control-label text-left">
+ <a href="#">My Cluster</a> OPERATOR
+ </div>
+ </div>
+ </div>
+ <div class="form-group">
+ <label for="" class="col-sm-2 control-label">Views</label>
+ <div class="col-sm-10 padding-top-7">
+ <div ng-repeat="view in user.views" class="row">
+ <div class="col-sm-4">
+ <a href="#">Some limk to some view</a>
+ </div>
+ <div class="col-sm-5">
+ USE, EDIT_SCRIPT
+ </div>
+ </div>
+ <div class="row">
+ <div class="col-sm-4">
+ <a href="#">Some limk to some view</a>
+ </div>
+ <div class="col-sm-5">
+ USE, EDIT_SCRIPT
+ </div>
+ </div>
+ </div>
+ </div>
+ </form>
+</div>
+
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/31242e8f/ambari-admin/src/main/resources/ui/admin-web/bower.json
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/bower.json b/ambari-admin/src/main/resources/ui/admin-web/bower.json
new file mode 100644
index 0000000..1030988
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/bower.json
@@ -0,0 +1,12 @@
+{
+ "name": "adminconsole",
+ "private": true,
+ "dependencies": {
+ "bootstrap": "~3.1.1",
+ "angular": "~1.2.18",
+ "angular-route": "~1.2.18",
+ "angular-bootstrap": "~0.11.0",
+ "restangular": "~1.4.0"
+ },
+ "devDependencies": {}
+}