You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by am...@apache.org on 2017/11/22 11:16:59 UTC
[04/50] [abbrv] ambari git commit: AMBARI-22400 Ambari 3.0: Implement
new design for Admin View: Cluster Information page. (atkach)
AMBARI-22400 Ambari 3.0: Implement new design for Admin View: Cluster Information page. (atkach)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/430dcbf1
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/430dcbf1
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/430dcbf1
Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 430dcbf1224996c76276a8c40fb58eb54addd10a
Parents: e968b12
Author: Andrii Tkach <at...@apache.org>
Authored: Thu Nov 9 16:13:29 2017 +0200
Committer: Andrii Tkach <at...@apache.org>
Committed: Thu Nov 9 16:53:02 2017 +0200
----------------------------------------------------------------------
.../main/resources/ui/admin-web/app/index.html | 3 +-
.../app/scripts/controllers/AppCtrl.js | 2 +-
.../controllers/ClusterInformationCtrl.js | 65 +++++++++++
.../controllers/clusters/ExportBlueprintCtrl.js | 58 ----------
.../app/scripts/controllers/mainCtrl.js | 27 -----
.../ui/admin-web/app/scripts/i18n.config.js | 13 +--
.../ui/admin-web/app/scripts/routes.js | 59 +++++-----
.../app/styles/cluster-information.css | 59 ++++++++++
.../resources/ui/admin-web/app/styles/main.css | 98 -----------------
.../admin-web/app/views/clusterInformation.html | 66 ++++++++++++
.../app/views/clusters/exportBlueprint.html | 40 -------
.../ui/admin-web/app/views/groups/list.html | 3 +-
.../resources/ui/admin-web/app/views/main.html | 107 -------------------
.../app/views/remoteClusters/list.html | 3 +-
.../ui/admin-web/app/views/sideNav.html | 19 ++--
.../admin-web/app/views/stackVersions/list.html | 3 +-
.../ui/admin-web/app/views/users/list.html | 3 +-
.../test/unit/services/Utility_test.js | 2 +-
18 files changed, 240 insertions(+), 390 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/430dcbf1/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
index 41cc60f..2b350f0 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/index.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/index.html
@@ -121,7 +121,7 @@
<script src="scripts/app.js"></script>
<script src="scripts/routes.js"></script>
<script src="scripts/i18n.config.js"></script>
-<script src="scripts/controllers/mainCtrl.js"></script>
+<script src="scripts/controllers/ClusterInformationCtrl.js"></script>
<script src="scripts/controllers/AppCtrl.js"></script>
<script src="scripts/controllers/SideNavCtrl.js"></script>
<script src="scripts/controllers/authentication/AuthenticationMainCtrl.js"></script>
@@ -142,7 +142,6 @@
<script src="scripts/controllers/ambariViews/CloneViewInstanceCtrl.js"></script>
<script src="scripts/controllers/clusters/ClustersManageAccessCtrl.js"></script>
<script src="scripts/controllers/clusters/UserAccessListCtrl.js"></script>
-<script src="scripts/controllers/clusters/ExportBlueprintCtrl.js"></script>
<script src="scripts/controllers/stackVersions/StackVersionsCreateCtrl.js"></script>
<script src="scripts/controllers/stackVersions/StackVersionsListCtrl.js"></script>
<script src="scripts/controllers/stackVersions/StackVersionsEditCtrl.js"></script>
http://git-wip-us.apache.org/repos/asf/ambari/blob/430dcbf1/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/AppCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/AppCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/AppCtrl.js
index 4ac5b38..eb9a9b0 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/AppCtrl.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/AppCtrl.js
@@ -31,7 +31,7 @@ angular.module('ambariAdminConsole')
return $route.current;
}, function (value) {
var breadcrumbs = [$t('common.admin')];
- if (value && value.$$route.label) {
+ if (value && value.$$route && value.$$route.label) {
breadcrumbs.push(value.$$route.label);
}
$scope.breadcrumbs = breadcrumbs;
http://git-wip-us.apache.org/repos/asf/ambari/blob/430dcbf1/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ClusterInformationCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ClusterInformationCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ClusterInformationCtrl.js
new file mode 100644
index 0000000..60a610c
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ClusterInformationCtrl.js
@@ -0,0 +1,65 @@
+/**
+ * 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('ClusterInformationCtrl', ['$scope', '$http', '$location', 'Cluster', '$routeParams', '$translate', '$rootScope',
+function($scope, $http, $location, Cluster, $routeParams, $translate, $rootScope) {
+ var $t = $translate.instant;
+ $scope.isDataLoaded = false;
+
+ $scope.$watch(function() {
+ return $rootScope.cluster;
+ }, function() {
+ $scope.cluster = $rootScope.cluster;
+ if ($scope.cluster) {
+ $scope.getBlueprint();
+ }
+ }, true);
+
+ $scope.getBlueprint = function () {
+ Cluster.getBlueprint({
+ clusterName: $scope.cluster.Clusters.cluster_name
+ }).then(function (data) {
+ console.debug($t('exportBlueprint.dataLoaded'), data);
+ $scope.isDataLoaded = true;
+ var response = JSON.stringify(data, null, 4),
+ lt = /</g,
+ gt = />/g,
+ ap = /'/g,
+ ic = /"/g;
+ $scope.blueprint = response ? response.toString().replace(lt, "<").replace(gt, ">").replace(ap, "'").replace(ic, '"') : "";
+ });
+ };
+
+ $scope.downloadBlueprint = function () {
+ if (window.navigator.msSaveOrOpenBlob) {
+ var blob = new Blob([decodeURIComponent(encodeURI($scope.blueprint))], {
+ type: "text/csv;charset=utf-8;"
+ });
+ navigator.msSaveBlob(blob, 'blueprint.json');
+ } else {
+ var a = document.createElement('a');
+ a.href = 'data:attachment/csv;charset=utf-8,' + encodeURI($scope.blueprint);
+ a.target = '_blank';
+ a.download = 'blueprint.json';
+ document.body.appendChild(a);
+ a.click();
+ }
+ };
+}]);
http://git-wip-us.apache.org/repos/asf/ambari/blob/430dcbf1/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/ExportBlueprintCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/ExportBlueprintCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/ExportBlueprintCtrl.js
deleted file mode 100644
index 6b74b40..0000000
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/ExportBlueprintCtrl.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-'use strict';
-
-angular.module('ambariAdminConsole')
-.controller('ExportBlueprintCtrl', ['$scope', '$http', '$location', 'Cluster', '$routeParams', '$translate', function($scope, $http, $location, Cluster, $routeParams, $translate) {
- var $t = $translate.instant;
- $scope.identity = angular.identity;
-
- $scope.isDataLoaded = false;
- $scope.clusterName = $routeParams.id;
-
- $scope.getBlueprint = function() {
- Cluster.getBlueprint({
- clusterName: $scope.clusterName
- }).then(function(data) {
- console.debug($t('exportBlueprint.dataLoaded'), data);
- $scope.isDataLoaded = true;
- var response = JSON.stringify(data, null, 4),
- lt = /</g,
- gt = />/g,
- ap = /'/g,
- ic = /"/g;
- $scope.blueprint = response ? response.toString().replace(lt, "<").replace(gt, ">").replace(ap, "'").replace(ic, '"') : "";
- });
- };
-
- $scope.downloadBlueprint = function() {
- if (window.navigator.msSaveOrOpenBlob) {
- var blob = new Blob([decodeURIComponent(encodeURI($scope.blueprint))], {
- type: "text/csv;charset=utf-8;"
- });
- navigator.msSaveBlob(blob, 'blueprint.json');
- } else {
- var a = document.createElement('a');
- a.href = 'data:attachment/csv;charset=utf-8,' + encodeURI($scope.blueprint);
- a.target = '_blank';
- a.download = 'blueprint.json';
- document.body.appendChild(a);
- a.click();
- }
- };
-}]);
http://git-wip-us.apache.org/repos/asf/ambari/blob/430dcbf1/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
deleted file mode 100644
index 30f7568..0000000
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/mainCtrl.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-'use strict';
-
-angular.module('ambariAdminConsole')
-.controller('MainCtrl',['$scope','$rootScope', function($scope, $rootScope) {
- $scope.$watch(function() {
- return $rootScope.cluster;
- }, function() {
- $scope.cluster = $rootScope.cluster;
- }, true);
-}]);
http://git-wip-us.apache.org/repos/asf/ambari/blob/430dcbf1/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
index 73ab064..4ef3ee9 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
@@ -41,7 +41,6 @@ angular.module('ambariAdminConsole')
'common.dashboard': 'Dashboard',
'common.goToDashboard': 'Go to Dashboard',
'common.exportBlueprint': 'Export Blueprint',
- 'common.blueprint': 'Blueprint',
'common.download': 'Download',
'common.noClusters': 'No Clusters',
'common.noViews': 'No Views',
@@ -168,23 +167,12 @@ angular.module('ambariAdminConsole')
'main.title': 'Welcome to Apache Ambari',
'main.noClusterDescription': 'Provision a cluster, manage who can access the cluster, and customize views for Ambari users.',
- 'main.hasClusterDescription': 'Monitor your cluster resources, manage who can access the cluster, and customize views for Ambari users.',
'main.autoLogOut': 'Automatic Logout',
- 'main.operateCluster.title': 'Operate Your Cluster',
- 'main.operateCluster.description': 'Manage the configuration of your cluster and monitor the health of your services',
- 'main.operateCluster.manageRoles': 'Manage Roles',
-
'main.createCluster.title': 'Create a Cluster',
'main.createCluster.description': 'Use the Install Wizard to select services and configure your cluster',
'main.createCluster.launchInstallWizard': 'Launch Install Wizard',
- 'main.manageUsersAndGroups.title': 'Manage Users + Groups',
- 'main.manageUsersAndGroups.description': 'Manage the users and groups that can access Ambari',
-
- 'main.deployViews.title': 'Deploy Views',
- 'main.deployViews.description': 'Create view instances and grant permissions',
-
'main.controls.remainLoggedIn': 'Remain Logged In',
'main.controls.logOut': 'Log Out Now',
@@ -284,6 +272,7 @@ angular.module('ambariAdminConsole')
'clusters.assignRoles': 'Assign roles to these {{term}}',
'clusters.alerts.cannotLoadClusterData': 'Cannot load cluster data',
+ 'clusters.devBlueprint': 'Dev Blueprint',
'groups.createLocal': 'Add Groups',
'groups.name': 'Group name',
http://git-wip-us.apache.org/repos/asf/ambari/blob/430dcbf1/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
index 2cb077a..486e598 100644
--- 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
@@ -19,12 +19,6 @@
angular.module('ambariAdminConsole')
.constant('ROUTES', {
- root: {
- url: '/',
- templateUrl: 'views/main.html',
- controller: 'MainCtrl',
- label: 'Welcome'
- },
authentication: {
main: {
url: '/authentication',
@@ -33,7 +27,7 @@ angular.module('ambariAdminConsole')
}
},
loginActivities: {
- loginMessage:{
+ loginMessage: {
url: '/loginMessage',
templateUrl: 'views/loginActivities/main.html',
controller: 'LoginActivitiesMainCtrl'
@@ -109,19 +103,19 @@ angular.module('ambariAdminConsole')
controller: 'ViewsEditCtrl',
label: 'Views'
},
- createViewUrl:{
+ createViewUrl: {
url: '/urls/new',
templateUrl: 'views/urls/create.html',
controller: 'ViewUrlCtrl',
label: 'Views'
},
- linkViewUrl:{
+ linkViewUrl: {
url: '/urls/link/:viewName/:viewVersion/:viewInstanceName',
templateUrl: 'views/urls/create.html',
controller: 'ViewUrlCtrl',
label: 'Views'
},
- editViewUrl:{
+ editViewUrl: {
url: '/urls/edit/:urlName',
templateUrl: 'views/urls/edit.html',
controller: 'ViewUrlEditCtrl',
@@ -133,19 +127,19 @@ angular.module('ambariAdminConsole')
url: '/stackVersions',
templateUrl: 'views/stackVersions/list.html',
controller: 'StackVersionsListCtrl',
- label: 'Cluster Information'
+ label: 'Versions'
},
create: {
url: '/stackVersions/create',
templateUrl: 'views/stackVersions/stackVersionPage.html',
controller: 'StackVersionsCreateCtrl',
- label: 'Cluster Information'
+ label: 'Versions'
},
edit: {
url: '/stackVersions/:stackName/:versionId/edit',
templateUrl: 'views/stackVersions/stackVersionPage.html',
controller: 'StackVersionsEditCtrl',
- label: 'Cluster Information'
+ label: 'Versions'
}
},
remoteClusters: {
@@ -161,12 +155,12 @@ angular.module('ambariAdminConsole')
controller: 'RemoteClustersCreateCtrl',
label: 'Remote Clusters'
},
- edit: {
- url: '/remoteClusters/:clusterName/edit',
- templateUrl: 'views/remoteClusters/editRemoteClusterPage.html',
- controller: 'RemoteClustersEditCtrl',
- label: 'Remote Clusters'
- }
+ edit: {
+ url: '/remoteClusters/:clusterName/edit',
+ templateUrl: 'views/remoteClusters/editRemoteClusterPage.html',
+ controller: 'RemoteClustersEditCtrl',
+ label: 'Remote Clusters'
+ }
},
clusters: {
manageAccess: {
@@ -180,31 +174,36 @@ angular.module('ambariAdminConsole')
templateUrl: 'views/clusters/userAccessList.html',
controller: 'UserAccessListCtrl'
},
- exportBlueprint: {
- url: '/clusters/:id/exportBlueprint',
- templateUrl: 'views/clusters/exportBlueprint.html',
- controller: 'ExportBlueprintCtrl'
+ clusterInformation: {
+ url: '/clusterInformation',
+ templateUrl: 'views/clusterInformation.html',
+ controller: 'ClusterInformationCtrl',
+ label: 'Cluster Information'
}
},
- dashboard:{
+ dashboard: {
url: '/dashboard',
- controller: ['$window', function($window) {
+ controller: ['$window', function ($window) {
$window.location.replace('/#/main/dashboard');
}],
template: ''
}
})
-.config(['$routeProvider', '$locationProvider', 'ROUTES', function($routeProvider, $locationProvider, ROUTES) {
- var createRoute = function(routeObj) {
- if(routeObj.url){
+.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);
}
};
+ var rootUrl = ROUTES['clusters']['clusterInformation'].url;
angular.forEach(ROUTES, createRoute);
+ $routeProvider.otherwise({
+ redirectTo: rootUrl
+ });
}])
-.run(['$rootScope', 'ROUTES', 'Settings', function($rootScope, ROUTES, Settings) {
+.run(['$rootScope', 'ROUTES', 'Settings', function ($rootScope, ROUTES, Settings) {
// Make routes available in every template and controller
$rootScope.ROUTES = ROUTES;
$rootScope.$on('$locationChangeStart', function (e, nextUrl) {
@@ -226,7 +225,7 @@ angular.module('ambariAdminConsole')
* @param {string} url
* @returns {string}
*/
- $rootScope.fromSiteRoot = function(url) {
+ $rootScope.fromSiteRoot = function (url) {
var path = url[0] === '/' ? url.substring(1) : url;
return Settings.siteRoot + path;
};
http://git-wip-us.apache.org/repos/asf/ambari/blob/430dcbf1/ambari-admin/src/main/resources/ui/admin-web/app/styles/cluster-information.css
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/styles/cluster-information.css b/ambari-admin/src/main/resources/ui/admin-web/app/styles/cluster-information.css
new file mode 100644
index 0000000..63f4150
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/styles/cluster-information.css
@@ -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.
+ */
+
+#cluster-information .cluster-name label {
+ font-weight: normal;
+}
+
+#cluster-information .dev-blueprint {
+ line-height: 35px;
+}
+
+#cluster-information .dev-blueprint span {
+ vertical-align: text-top;
+}
+
+#cluster-information .cluster-name label {
+ font-weight: normal;
+}
+
+#cluster-information .dev-blueprint {
+ line-height: 35px;
+}
+
+#cluster-information .dev-blueprint span {
+ vertical-align: text-top;
+}
+
+
+#cluster-information .welcome-header {
+ margin: -15px;
+ padding: 15px 15px 40px 15px;
+ background-color: #f0f0f0;
+ text-align: center;
+}
+
+#cluster-information .create-cluster-section {
+ text-align: center;
+ padding: 30px;
+}
+
+#cluster-information .fa-cloud {
+ font-size: 150px;
+ color: #f0f0f0;
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/430dcbf1/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
index bd06bc0..4224f62 100644
--- 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
@@ -123,14 +123,6 @@
transition: none;
}
-.cluster-installation-progress-label{
- display: block;
- color: #888;
- text-align: center;
- padding: 10px 0;
- cursor: default;
-}
-
.add-item-input span{
display: block;
outline: none;
@@ -236,96 +228,6 @@
.paginator{
margin: 0;
}
-.mainpage .panel-body{
- padding: 20px;
- height: 620px;
-}
-.mainpage h1{
- font-size: 24px;
- margin-top: 10px;
-}
-.mainpage .panel-body #main-operations-boxes {
- padding: 10px;
-}
-.mainpage .panel-body #main-operations-boxes .thumbnail{
- display: block;
- height: 230px;
- padding: 8px;
- background-color: #eeeeee;
- margin-bottom: 20px;
- margin-left: 20px;
- margin-right: 10px;
- border: none;
- border-radius: 0;
-}
-.mainpage .panel-body #main-operations-boxes .thumbnail .title,
-.mainpage .panel-body #main-operations-boxes .thumbnail .description,
-.mainpage .panel-body #main-operations-boxes .thumbnail .buttons {
- text-align: center;
- line-height: 1.5;
-}
-.mainpage .panel-body #main-operations-boxes .thumbnail .buttons .btn{
- width: 200px;
- margin: 5px;
-}
-.mainpage .panel-body #main-operations-boxes .thumbnail .buttons .btn.userslist-button,
-.mainpage .panel-body #main-operations-boxes .thumbnail .buttons .btn.groupslist-button {
- width: 100px;
-}
-.mainpage .panel-body #main-operations-boxes .thumbnail .glyphicon {
- font-size: 50px;
- text-align: center;
- display: block;
- line-height: 1.5;
-}
-.mainpage .panel-body #main-operations-boxes .col-sm-5 {
- width: 43.5%;
-}
-
-.views-list-table .panel{
- border-radius: 0;
- border: none;
- margin-top: 0;
-}
-.views-list-table h4{
- font-size: 14px;
-}
-.views-list-table .panel-group .panel + .panel{
- margin-top: 0;
-}
-.views-list-table .panel-group .panel .panel-heading{
- border-radius: 0;
- border-top: 1px solid #ddd;
-}
-.views-list-table .panel-group .panel .panel-heading{
- background: #f9f9f9;
-}
-.views-list-table .panel-group .panel:nth-child(even) .panel-heading{
- background: none;
-}
-.views-list-table .panel-group .panel .panel-heading .panel-title{
- font-size: 14px;
- font-weight: normal;
- cursor: pointer;
-}
-.views-list-table .panel-group .panel .panel-body{
- padding-top: 0;
- padding-bottom: 0;
-}
-.views-list-table .panel-group .panel .panel-body table tr:first-child td{
- border-top: none;
-}
-.views-list-table .glyphicon.glyphicon-chevron-right{
- -webkit-transition: all 0.3s;
- -o-transition: all 0.3s;
- transition: all 0.3s;
-}
-.views-list-table .glyphicon.glyphicon-chevron-right.opened{
- -webkit-transform: rotateZ(90deg);
- -ms-transform: rotateZ(90deg);
- -o-transform: rotateZ(90deg);
- transform: rotateZ(90deg);
-}
a.gotoinstance{
font-size: 12px;
http://git-wip-us.apache.org/repos/asf/ambari/blob/430dcbf1/ambari-admin/src/main/resources/ui/admin-web/app/views/clusterInformation.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/clusterInformation.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/clusterInformation.html
new file mode 100644
index 0000000..6334d06
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/clusterInformation.html
@@ -0,0 +1,66 @@
+<!--
+* 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 id="cluster-information">
+ <div ng-show="cluster.Clusters.provisioning_state !== 'INSTALLED'">
+ <div class="welcome-header">
+ <h1>{{'main.title' | translate}}</h1>
+ <span>{{'main.noClusterDescription' | translate}}</span>
+ </div>
+ <div class="create-cluster-section">
+ <h2>{{'main.createCluster.title' | translate}}</h2>
+ <div>
+ <span>
+ {{'main.createCluster.description' | translate}}
+ </span>
+ </div>
+ <div><i class="fa fa-cloud" aria-hidden="true"></i></div>
+ <div>
+ <a href="{{fromSiteRoot('/#/installer/step0')}}" class="btn btn-primary">
+ {{'main.createCluster.launchInstallWizard' | translate}}
+ </a>
+ </div>
+ </div>
+ </div>
+
+ <div ng-show="cluster.Clusters.provisioning_state === 'INSTALLED'">
+ <div class="row">
+ <div class="form-group col-xs-3 cluster-name">
+ <label for="clusterName">{{'views.clusterName' | translate}}*</label>
+ <input type="text" class="form-control" id="clusterName" ng-model="cluster.Clusters.cluster_name">
+ </div>
+ </div>
+ <div>
+ <div class="row dev-blueprint">
+ <div class="col-sm-11"><span>{{'clusters.devBlueprint' | translate}}</span></div>
+ <div class="col-sm-1">
+ <div class="btn btn-default pull-right" ng-click="downloadBlueprint()">{{"common.download" | translate}}
+ </div>
+ </div>
+ </div>
+ <textarea type="text"
+ rows="20"
+ class="form-control"
+ name="blueprint_text"
+ ng-model="blueprint"
+ ng-disabled="true"
+ ng-readonly="true">
+ </textarea>
+ </div>
+ </div>
+</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/430dcbf1/ambari-admin/src/main/resources/ui/admin-web/app/views/clusters/exportBlueprint.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/clusters/exportBlueprint.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/clusters/exportBlueprint.html
deleted file mode 100644
index 6ccbffe..0000000
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/clusters/exportBlueprint.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!--
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
--->
-<div class="cluster-manage-access-pane" data-ng-init="getBlueprint()" ng-controller="ExportBlueprintCtrl">
- <div class="clearfix">
- <ol class="breadcrumb pull-left">
- <li class="active">{{clusterName}} {{'common.blueprint' | translate}}</li>
- </ol>
- <div class="pull-right top-margin-4">
- <div class="pull-right top-margin-4">
- <div class="btn btn-default" ng-click="downloadBlueprint()">{{"common.download" | translate}}</div>
- </div>
- </div>
- </div>
- <hr>
- <div>
- <textarea type="text"
- rows="20"
- class="form-control"
- name="blueprint_text"
- ng-model="blueprint"
- ng-disabled="true"
- ng-readonly="true">
- </textarea>
- </div>
-</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/430dcbf1/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
index 5271ceb..b39f55d 100644
--- 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
@@ -26,7 +26,6 @@
</link-to>
</div>
</div>
- <hr>
<table class="table table-striped table-hover col-sm-12">
<thead>
<tr>
@@ -63,7 +62,7 @@
<div ng-if="isLoading" class="spinner-container">
<i class="fa fa-2x fa-spinner fa-spin" aria-hidden="true"></i>
</div>
- <div class="alert alert-info col-sm-12" ng-show="!groups.length && !isLoading">
+ <div class="alert empty-table-alert col-sm-12" ng-show="!groups.length && !isLoading">
{{'common.alerts.nothingToDisplay' | translate: '{term: constants.groups}'}}
</div>
<div class="col-sm-12 table-bar">
http://git-wip-us.apache.org/repos/asf/ambari/blob/430dcbf1/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
deleted file mode 100644
index 3c382af..0000000
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/main.html
+++ /dev/null
@@ -1,107 +0,0 @@
-<!--
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
--->
-<div class="panel panel-default mainpage">
- <div class="panel-body">
- <h1>{{'main.title' | translate}}</h1>
-
- <div id="main-operations-boxes" class="row thumbnails">
- <p ng-hide="cluster">{{'main.noClusterDescription' | translate}}</p>
-
- <p ng-show="cluster">{{'main.hasClusterDescription' | translate}}</p>
-
- <!--Clusters-->
- <div ng-show="cluster" class="col-sm-11 thumbnail">
- <h4 class="title">{{'main.operateCluster.title' | translate}}</h4>
-
- <div class="description">{{'main.operateCluster.description' | translate}}</div>
- <div class="glyphicon glyphicon-cloud"></div>
- <div class="buttons">
- <span ng-class="{active: isActive('clusters.manageAccess')}">
- <a ng-show="cluster.Clusters.provisioning_state != 'INSTALLED'" href
- class="btn btn-primary permission-button"
- ng-disabled="cluster.Clusters.provisioning_state != 'INSTALLED' ">
- {{'main.operateCluster.manageRoles' | translate}}
- </a>
- <a ng-show="cluster.Clusters.provisioning_state == 'INSTALLED'"
- href="#/clusters/{{cluster.Clusters.cluster_name}}/userAccessList"
- class="btn btn-primary permission-button"
- ng-disabled="cluster.Clusters.provisioning_state != 'INSTALLED' ">
- {{'main.operateCluster.manageRoles' | translate}}
- </a>
- </span>
- <span>
- <a ng-show="cluster.Clusters.provisioning_state != 'INSTALLED'" href
- class="btn btn-primary go-dashboard-button"
- ng-disabled="cluster.Clusters.provisioning_state != 'INSTALLED' ">
- {{'common.goToDashboard' | translate}}
- </a>
- <a ng-show="cluster.Clusters.provisioning_state == 'INSTALLED'"
- href="{{fromSiteRoot('/#/main/dashboard/metrics')}}" class="btn btn-primary go-dashboard-button"
- ng-disabled="cluster.Clusters.provisioning_state != 'INSTALLED' ">
- {{'common.goToDashboard' | translate}}
- </a>
- </span>
- </div>
- </div>
- <div ng-hide="cluster" class="col-sm-11 thumbnail">
- <h4 class="title">{{'main.createCluster.title' | translate}}</h4>
-
- <div class="description">{{'main.createCluster.description' | translate}}</div>
- <div class="glyphicon glyphicon-cloud"></div>
- <div class="buttons">
- <a href="{{fromSiteRoot('/#/installer/step0')}}" class="btn btn-primary create-cluster-button">
- {{'main.createCluster.launchInstallWizard' | translate}}
- </a>
- </div>
- </div>
-
- <!--Manage Users and groups-->
- <div class="col-sm-5 thumbnail">
- <h4 class="title">{{'main.manageUsersAndGroups.title' | translate}}</h4>
-
- <div class="description">{{'main.manageUsersAndGroups.description' | translate}}</div>
- <div class="glyphicon glyphicon-user"></div>
- <div class="buttons">
- <span ng-class="{active: isActive('users.list')}">
- <link-to route="users.list" class="btn btn-primary userslist-button">
- {{'common.users' | translate}}
- </link-to>
- </span>
- <span ng-class="{active: isActive('groups.list')}">
- <link-to route="groups.list" class="btn btn-primary groupslist-button">
- {{'common.groups' | translate}}
- </link-to>
- </span>
- </div>
- </div>
-
- <!--Deploy Views-->
- <div class="col-sm-5 thumbnail">
- <h4 class="title">{{'main.deployViews.title' | translate}}</h4>
-
- <div class="description">{{'main.deployViews.description' | translate}}</div>
- <div class="glyphicon glyphicon-th"></div>
- <div ng-class="{active: isActive('views.list')}" class="buttons">
- <link-to route="views.list" class="btn btn-primary viewslist-button">
- {{'common.views' | translate}}
- </link-to>
- </div>
- </div>
- </div>
- </div>
-</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/430dcbf1/ambari-admin/src/main/resources/ui/admin-web/app/views/remoteClusters/list.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/remoteClusters/list.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/remoteClusters/list.html
index e3e11d5..8bb6632 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/remoteClusters/list.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/remoteClusters/list.html
@@ -27,7 +27,6 @@
</a>
</div>
</div>
- <hr>
<table class="table table-striped table-hover">
<thead>
<tr>
@@ -62,7 +61,7 @@
<div ng-if="isLoading" class="spinner-container">
<i class="fa fa-2x fa-spinner fa-spin" aria-hidden="true"></i>
</div>
- <div class="alert alert-info col-sm-12" ng-show="!remoteClusters.length && !isLoading">
+ <div class="alert empty-table-alert col-sm-12" ng-show="!remoteClusters.length && !isLoading">
{{'common.alerts.noRemoteClusterDisplay' | translate}}
</div>
<div class="col-sm-12 table-bar">
http://git-wip-us.apache.org/repos/asf/ambari/blob/430dcbf1/ambari-admin/src/main/resources/ui/admin-web/app/views/sideNav.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/sideNav.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/sideNav.html
index 09b4cd9..97dc5d3 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/sideNav.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/sideNav.html
@@ -33,36 +33,43 @@
</li>
</ul>
<ul class="nav side-nav-menu nav-pills nav-stacked">
- <li class="mainmenu-li active">
+ <li class="mainmenu-li active" ng-show="cluster.Clusters.provisioning_state === 'INSTALLED'">
<a title="{{'common.dashboard' | translate}}" rel="tooltip" data-placement="right" href="{{fromSiteRoot('/#/dashboard')}}" class="gotodashboard">
<i class="navigation-icon fa fa-tachometer" aria-hidden="true"></i>
<span class="navigation-menu-item">{{'common.dashboard' | translate}}</span>
</a>
</li>
- <li class="mainmenu-li dropdown has-sub-menu" ng-show="cluster.Clusters.provisioning_state === 'INSTALLED' ">
+ <li class="mainmenu-li dropdown has-sub-menu">
<a title="{{'common.clusterManagement' | translate}}" data-toggle="collapse-sub-menu" rel="tooltip" data-placement="right">
<span class="toggle-icon glyphicon glyphicon-menu-down pull-right"></span>
<i class="navigation-icon fa fa-cloud" aria-hidden="true"></i>
<span class="navigation-menu-item">{{'common.clusterManagement' | translate}}</span>
</a>
<ul class="sub-menu nav nav-pills nav-stacked">
+ <li class="submenu-li" ng-class="{active: isActive('clusters.clusterInformation')}">
+ <a href="#/clusterInformation" class="clusterInformation">
+ {{'common.clusterInformation' | translate}}
+ </a>
+ </li>
<li class="submenu-li" ng-class="{active: isActive('stackVersions.list')}" ng-show="cluster && totalRepos > 0">
- <a href="#/stackVersions">{{'common.clusterInformation' | translate}}</a>
+ <a href="#/stackVersions">{{'common.versions' | translate}}</a>
</li>
<li class="submenu-li" ng-class="{active: isActive('remoteClusters.list')}">
<a href="#/remoteClusters">{{'common.remoteClusters' | translate}}</a>
</li>
</ul>
</li>
- <li class="mainmenu-li dropdown has-sub-menu" ng-show="cluster.Clusters.provisioning_state === 'INSTALLED' ">
+ <li class="mainmenu-li dropdown has-sub-menu">
<a title="{{'common.userManagement' | translate}}" rel="tooltip" data-placement="right" data-toggle="collapse-sub-menu">
<span class="toggle-icon glyphicon glyphicon-menu-down pull-right"></span>
<i class="navigation-icon fa fa-users" aria-hidden="true"></i>
<span class="navigation-menu-item">{{'common.userManagement' | translate}}</span>
</a>
<ul class="sub-menu nav nav-pills nav-stacked">
- <li class="submenu-li" ng-class="{active: isActive('clusters.manageAccess') || isActive('clusters.userAccessList')}">
- <a href="#/clusters/{{cluster.Clusters.cluster_name}}/manageAccess" class="roles">Roles</a>
+ <li class="submenu-li"
+ ng-class="{active: isActive('clusters.manageAccess') || isActive('clusters.userAccessList')}"
+ ng-show="cluster.Clusters.provisioning_state === 'INSTALLED'">
+ <a href="#/clusters/{{cluster.Clusters.cluster_name}}/manageAccess" class="roles">{{'common.roles' | translate}}</a>
</li>
<li class="submenu-li" ng-class="{active: isActive('users.list')}">
<link-to route="users.list" class="userslist-link">{{'common.users' | translate}}</link-to>
http://git-wip-us.apache.org/repos/asf/ambari/blob/430dcbf1/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/list.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/list.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/list.html
index f6b6ee9..99f9ac0 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/list.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/list.html
@@ -27,7 +27,6 @@
</a>
</div>
</div>
- <hr/>
<table class="table table-striped table-hover">
<thead>
<tr>
@@ -119,7 +118,7 @@
<div ng-if="isLoading" class="spinner-container">
<i class="fa fa-2x fa-spinner fa-spin" aria-hidden="true"></i>
</div>
- <div class="alert alert-info col-sm-12" ng-show="!repos.length && !isLoading">
+ <div class="alert empty-table-alert col-sm-12" ng-show="!repos.length && !isLoading">
{{'common.alerts.nothingToDisplay' | translate: '{term: getConstant("common.version")}'}}
</div>
<div class="col-sm-12 table-bar">
http://git-wip-us.apache.org/repos/asf/ambari/blob/430dcbf1/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
index 7b8e12a..12227c3 100644
--- 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
@@ -27,7 +27,6 @@
</link-to>
</div>
</div>
- <hr>
<table class="table table-striped table-hover">
<thead>
<tr>
@@ -80,7 +79,7 @@
<div ng-if="isLoading" class="spinner-container">
<i class="fa fa-2x fa-spinner fa-spin" aria-hidden="true"></i>
</div>
- <div class="alert alert-info col-sm-12" ng-show="!users.length && !isLoading">
+ <div class="alert empty-table-alert col-sm-12" ng-show="!users.length && !isLoading">
{{'common.alerts.nothingToDisplay' | translate: '{term: constants.users}'}}
</div>
<div class="col-sm-12 table-bar">
http://git-wip-us.apache.org/repos/asf/ambari/blob/430dcbf1/ambari-admin/src/main/resources/ui/admin-web/test/unit/services/Utility_test.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/test/unit/services/Utility_test.js b/ambari-admin/src/main/resources/ui/admin-web/test/unit/services/Utility_test.js
index d17747b..1b76dcf 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/test/unit/services/Utility_test.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/test/unit/services/Utility_test.js
@@ -54,7 +54,7 @@ describe('Utility Service', function () {
httpBackend.whenGET(/\/api\/v1\/views.+/).respond(200, {
items: []
});
- httpBackend.whenGET("views/main.html").respond(200, {});
+ httpBackend.whenGET("views/clusterInformation.html").respond(200, {});
});
});