http://git-wip-us.apache.org/repos/asf/ambari/blob/b8f7369b/ambari-admin/src/main/resources/ui/admin-web/app/assets/fonts/Roboto-Regular-webfont.ttf ---------------------------------------------------------------------- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/assets/fonts/Roboto-Regular-webfont.ttf b/ambari-admin/src/main/resources/ui/admin-web/app/assets/fonts/Roboto-Regular-webfont.ttf new file mode 100644 index 0000000..305f0d5 Binary files /dev/null and b/ambari-admin/src/main/resources/ui/admin-web/app/assets/fonts/Roboto-Regular-webfont.ttf differ
http://git-wip-us.apache.org/repos/asf/ambari/blob/b8f7369b/ambari-admin/src/main/resources/ui/admin-web/app/assets/fonts/Roboto-Regular-webfont.woff ---------------------------------------------------------------------- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/assets/fonts/Roboto-Regular-webfont.woff b/ambari-admin/src/main/resources/ui/admin-web/app/assets/fonts/Roboto-Regular-webfont.woff new file mode 100644 index 0000000..ac7452a Binary files /dev/null and b/ambari-admin/src/main/resources/ui/admin-web/app/assets/fonts/Roboto-Regular-webfont.woff differ http://git-wip-us.apache.org/repos/asf/ambari/blob/b8f7369b/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 52e41f6..e9983aa 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 @@ -44,53 +44,47 @@ <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]--> -<div id="top-nav" ng-controller="MainCtrl"> - <header class="navbar navbar-static-top navbar-inverse"> - <div class="navbar-inner"> - <div class="container"> - <a href="{{fromSiteRoot('/#/main/dashboard')}}" class="logo"><img src="/img/ambari-logo.png" alt="{{'common.apacheAmbari' | translate}}" title="{{'common.apacheAmbari' | translate}}" data-qa="ambari-logo"></a> - <a href="{{fromSiteRoot('/#/main/dashboard')}}" class="brand" title="{{'common.apacheAmbari' | translate}}" data-qa="ambari-title">{{'common.ambari' | translate}}</a> - <ul class="nav navbar-nav navbar-right"> - <li> - <div class="btn-group navbar-views-dropdown" dropdown is-open="viewsdropdown.isopen" ng-mouseover="viewsdropdown.isopen=true" ng-mouseout="viewsdropdown.isopen=false"> - <a href="{{fromSiteRoot('/#/main/views')}}" ng-click="gotoViewsDashboard()" class="dropdown-toggle"><i class="fa fa-th"></i></a> - <ul class="dropdown-menu" role="menu"> - <li ng-repeat="instance in viewInstances"><a href="{{fromSiteRoot('/#/main/views/' + instance.viewUrl)}}" target="_blank">{{instance.label}}</a></li> - <li ng-show="!viewInstances.length" class="disabled"><a>{{'common.noViews' | translate}}</a></li> - </ul> - </div> - </li> - <li> - <div class="btn-group" dropdown is-open="status.isopen"> - <button type="button" class="btn btn-default dropdown-toggle navbar-btn" ng-disabled="disabled"> - <i class="fa fa-user"></i> {{currentUser}} <span class="caret"></span> - </button> - <ul class="dropdown-menu" role="menu"> - <li><a href ng-click="about()">{{'common.about' | translate}}</a></li> - <li class="divider"></li> - <li><a href ng-click="signOut()">{{'common.signOut' | translate}}</a></li> - </ul> - </div> - </li> - </ul> - </div> - </div> - </header> -</div> +<div id="wrapper" ng-controller="AppCtrl"> + <div ng-include="'views/sideNav.html'" ng-controller="SideNavCtrl"></div> -<div class="container"> - <div class="row"> - <div class="col-sm-3"> - <div ng-include="'views/leftNavbar.html'" ng-controller="NavbarCtrl"></div> + <div id="main"> + <div id="top-nav"> + <nav class="navbar navbar-default navbar-static-top"> + <div class="container"> + <div class="navbar-header navbar-nav"> + <ol class="breadcrumb"> + <li ng-repeat="breadcrumb in breadcrumbs" ng-class="$last && 'active'">{{breadcrumb}}</li> + </ol> + </div> + <ul class="nav navbar-nav navbar-right"> + <li> + <p class="navbar-text">{{cluster.Clusters.cluster_name}}</p> + </li> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" ng-disabled="disabled"> + <i class="fa fa-user"></i> {{currentUser}} <span class="caret"></span> + </a> + <ul class="dropdown-menu"> + <li><a href ng-click="about()">{{'common.about' | translate}}</a></li> + <li role="separator" class="divider"></li> + <li><a href ng-click="signOut()">{{'common.signOut' | translate}}</a></li> + </ul> + </li> + </ul> + </div> + </nav> </div> - <div class="col-sm-9"> - <ng-view></ng-view> + <div class="container main-container"> + <div class="row"> + <div class="col-sm-12"> + <ng-view></ng-view> + </div> + </div> </div> </div> </div> - <!-- build:js scripts/vendor.js --> <!-- bower:js --> <script src="bower_components/jquery/dist/jquery.js"></script> @@ -119,6 +113,7 @@ <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> +<script src="scripts/theme/bootstrap-ambari.js"></script> <!-- endbuild --> @@ -127,7 +122,8 @@ <script src="scripts/routes.js"></script> <script src="scripts/i18n.config.js"></script> <script src="scripts/controllers/mainCtrl.js"></script> -<script src="scripts/controllers/NavbarCtrl.js"></script> +<script src="scripts/controllers/AppCtrl.js"></script> +<script src="scripts/controllers/SideNavCtrl.js"></script> <script src="scripts/controllers/authentication/AuthenticationMainCtrl.js"></script> <script src="scripts/controllers/loginActivities/LoginActivitiesMainCtrl.js"></script> <script src="scripts/controllers/loginActivities/LoginMessageMainCtrl.js"></script> http://git-wip-us.apache.org/repos/asf/ambari/blob/b8f7369b/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 new file mode 100644 index 0000000..4ac5b38 --- /dev/null +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/AppCtrl.js @@ -0,0 +1,177 @@ +/** + * 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('AppCtrl',['$scope','$rootScope', '$route', '$window','Auth', 'Alert', '$modal', 'Cluster', '$translate', '$http', 'Settings', 'Utility', '$q', function($scope, $rootScope, $route, $window, Auth, Alert, $modal, Cluster, $translate, $http, Settings, Utility, $q) { + var $t = $translate.instant; + $scope.signOut = function () { + Auth.signout().finally(function () { + $window.location.pathname = Settings.siteRoot; + }); + }; + + //todo replace with breadcrumb service + $scope.$watch(function () { + return $route.current; + }, function (value) { + var breadcrumbs = [$t('common.admin')]; + if (value && value.$$route.label) { + breadcrumbs.push(value.$$route.label); + } + $scope.breadcrumbs = breadcrumbs; + }); + + + $scope.ambariVersion = null; + $rootScope.supports = {}; + $rootScope.authDataLoad = $q.defer(); + + Utility.getUserPref('user-pref-' + Auth.getCurrentUser() + '-supports').then(function (data) { + $rootScope.supports = data.data ? data.data : {}; + }); + + $http.get(Settings.baseUrl + '/users/' + Auth.getCurrentUser() + '/authorizations?fields=*') + .then(function (data) { + var auth = !!data.data && !!data.data.items ? data.data.items.map(function (a) { + return a.AuthorizationInfo.authorization_id; + }) : [], + canPersistData = auth.indexOf('CLUSTER.MANAGE_USER_PERSISTED_DATA') > -1; + $rootScope.authDataLoad.resolve(canPersistData); + if (auth.indexOf('AMBARI.RENAME_CLUSTER') == -1) { + $window.location = $rootScope.fromSiteRoot("/#/main/dashboard"); + } + }); + + $scope.about = function () { + var ambariVersion = $scope.ambariVersion; + var modalInstance = $modal.open({ + templateUrl: 'views/modals/AboutModal.html', + controller: ['$scope', function ($scope) { + $scope.ok = function () { + modalInstance.close(); + }; + $scope.ambariVersion = ambariVersion; + }] + }); + }; + + $scope.currentUser = Auth.getCurrentUser(); + + $scope.cluster = null; + $scope.isLoaded = null; + + function loadAmbariVersion() { + Cluster.getAmbariVersion().then(function (version) { + $scope.ambariVersion = version; + }); + } + + function loadClusterData() { + Cluster.getStatus().then(function (cluster) { + $rootScope.cluster = cluster; + $scope.cluster = cluster; + $scope.isLoaded = true; + if (cluster && cluster.Clusters.provisioning_state === 'INIT') { + setTimeout(loadClusterData, 1000); + } + }).catch(function (data) { + Alert.error($t('common.alerts.cannotLoadClusterStatus'), data.statusText); + }); + } + + loadClusterData(); + loadAmbariVersion(); + + $scope.startInactiveTimeoutMonitoring = function (timeout) { + var TIME_OUT = timeout; + var active = true; + var lastActiveTime = Date.now(); + + var keepActive = function () { + if (active) { + lastActiveTime = Date.now(); + } + }; + + $(window).bind('mousemove', keepActive); + $(window).bind('keypress', keepActive); + $(window).bind('click', keepActive); + + var checkActiveness = function () { + var remainTime = TIME_OUT - (Date.now() - lastActiveTime); + if (remainTime < 0) { + active = false; + $(window).unbind('mousemove', keepActive); + $(window).unbind('keypress', keepActive); + $(window).unbind('click', keepActive); + clearInterval($rootScope.userActivityTimeoutInterval); + $scope.signOut(); + } else if (remainTime < 60000 && !$rootScope.timeoutModal) { + $rootScope.timeoutModal = $modal.open({ + templateUrl: 'views/modals/TimeoutWarning.html', + backdrop: false, + controller: ['$scope', 'Auth', function ($scope, Auth) { + $scope.remainTime = 60; + $scope.title = $t('main.autoLogOut'); + $scope.primaryText = $t('main.controls.remainLoggedIn'); + $scope.secondaryText = $t('main.controls.logOut'); + $scope.remain = function () { + $rootScope.timeoutModal.close(); + delete $rootScope.timeoutModal; + }; + $scope.logout = function () { + $rootScope.timeoutModal.close(); + delete $rootScope.timeoutModal; + Auth.signout().finally(function () { + $window.location.pathname = Settings.siteRoot; + }); + }; + $scope.countDown = function () { + $scope.remainTime--; + $scope.$apply(); + if ($scope.remainTime == 0) { + Auth.signout().finally(function () { + $window.location.pathname = Settings.siteRoot; + }); + } + }; + setInterval($scope.countDown, 1000); + }] + }); + } + }; + $rootScope.userActivityTimeoutInterval = window.setInterval(checkActiveness, 1000); + }; + + // Send noop requests every 10 seconds just to keep backend session alive + $scope.startNoopPolling = function () { + $rootScope.noopPollingInterval = setInterval(Cluster.getAmbariTimeout, 10000); + }; + + if (!$rootScope.userActivityTimeoutInterval) { + Cluster.getAmbariTimeout().then(function (timeout) { + $rootScope.userTimeout = Number(timeout) * 1000; + if ($rootScope.userTimeout > 0) + $scope.startInactiveTimeoutMonitoring($rootScope.userTimeout); + }); + } + if (!$rootScope.noopPollingInterval) { + $scope.startNoopPolling(); + } +}]); http://git-wip-us.apache.org/repos/asf/ambari/blob/b8f7369b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/NavbarCtrl.js ---------------------------------------------------------------------- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/NavbarCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/NavbarCtrl.js deleted file mode 100644 index cbf38e8..0000000 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/NavbarCtrl.js +++ /dev/null @@ -1,106 +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('NavbarCtrl',['$scope', 'Cluster', '$location', 'Alert', 'ROUTES', 'ConfirmationModal', '$rootScope', 'Stack', '$translate', 'Settings', function($scope, Cluster, $location, Alert, ROUTES, ConfirmationModal, $rootScope, Stack, $translate, Settings) { - var $t = $translate.instant; - $scope.cluster = null; - $scope.totalRepos = 0; - $scope.editCluster = { - name : '', - editingName : false - }; - $scope.settings = Settings; - - function loadClusterData() { - Cluster.getStatus().then(function (cluster) { - $scope.cluster = cluster; - Stack.allRepos({version: '', - cluster: { - options: [], - current: null - }}, {}).then(function (repos) { - $scope.totalRepos = repos.itemTotal; - }); - if (cluster && cluster.Clusters.provisioning_state === 'INIT') { - setTimeout(loadClusterData, 1000); - } - }).catch(function (data) { - Alert.error($t('common.alerts.cannotLoadClusterStatus'), data.statusText); - }); - } - loadClusterData(); - - $scope.toggleEditName = function($event) { - if ($event && $event.keyCode !== 27) { - // 27 = Escape key - return false; - } - - $scope.editCluster.name = $scope.cluster.Clusters.cluster_name; - $scope.editCluster.editingName = !$scope.editCluster.editingName; - }; - - $scope.clusterDisplayName = function () { - var name=""; - if($scope.cluster && $scope.cluster.Clusters) - { - name = $scope.cluster.Clusters.cluster_name; - } - return name.length > 13 ? name.substr(0, 13) + "..." : name; - }; - - $scope.confirmClusterNameChange = function() { - ConfirmationModal.show( - $t('common.clusterNameChangeConfirmation.title'), - $t('common.clusterNameChangeConfirmation.message', { - clusterName: $scope.editCluster.name - }) - ) - .then(function() { - $scope.saveClusterName(); - }).catch(function() { - // user clicked cancel - $scope.toggleEditName(); - }); - }; - - $scope.saveClusterName = function() { - var oldClusterName = $scope.cluster.Clusters.cluster_name, - newClusterName = $scope.editCluster.name; - - Cluster.editName(oldClusterName, newClusterName).then(function(data) { - $scope.cluster.Clusters.cluster_name = newClusterName; - Alert.success($t('common.alerts.clusterRenamed', {clusterName: newClusterName})); - }).catch(function(data) { - Alert.error($t('common.alerts.cannotRenameCluster', {clusterName: newClusterName}), data.data.message); - }); - - $scope.toggleEditName(); - }; - - $scope.isActive = function(path) { - var route = ROUTES; - angular.forEach(path.split('.'), function(routeObj) { - route = route[routeObj]; - }); - var r = new RegExp( route.url.replace(/(:\w+)/, '\\w+')); - return r.test($location.path()); - }; -}]); http://git-wip-us.apache.org/repos/asf/ambari/blob/b8f7369b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/SideNavCtrl.js ---------------------------------------------------------------------- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/SideNavCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/SideNavCtrl.js new file mode 100644 index 0000000..558d110 --- /dev/null +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/SideNavCtrl.js @@ -0,0 +1,68 @@ +/** + * 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('SideNavCtrl', ['$scope', '$location', 'ROUTES', '$rootScope', 'Stack', 'Settings', function($scope, $location, ROUTES, $rootScope, Stack, Settings) { + $scope.totalRepos = 0; + $scope.settings = Settings; + + $scope.$watch(function() { + return $rootScope.cluster; + }, function() { + $scope.cluster = $rootScope.cluster; + }, true); + + function loadRepos() { + Stack.allRepos({version: '', + cluster: { + options: [], + current: null + }}, {}).then(function (repos) { + $scope.totalRepos = repos.itemTotal; + }); + } + + function initNavigationBar () { + $('body').on('DOMNodeInserted', '.navigation-bar', function() { + $('.navigation-bar').navigationBar({ + fitHeight: true, + collapseNavBarClass: 'fa-angle-double-left', + expandNavBarClass: 'fa-angle-double-right' + }); + //initTooltips(); + $('body').off('DOMNodeInserted', '.navigation-bar'); + }); + } + + function initTooltips () { + $('[rel="tooltip"]').tooltip(); + } + + initNavigationBar(); + loadRepos(); + + $scope.isActive = function(path) { + var route = ROUTES; + angular.forEach(path.split('.'), function(routeObj) { + route = route[routeObj]; + }); + var r = new RegExp( route.url.replace(/(:\w+)/, '\\w+')); + return r.test($location.path()); + }; +}]); http://git-wip-us.apache.org/repos/asf/ambari/blob/b8f7369b/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 index c945644..30f7568 100644 --- 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 @@ -18,166 +18,10 @@ 'use strict'; angular.module('ambariAdminConsole') -.controller('MainCtrl',['$scope','$rootScope','$window','Auth', 'Alert', '$modal', 'Cluster', 'View', '$translate', '$http', 'Settings', 'Utility', '$q', function($scope, $rootScope, $window, Auth, Alert, $modal, Cluster, View, $translate, $http, Settings, Utility, $q) { - var $t = $translate.instant; - $scope.signOut = function() { - Auth.signout().finally(function() { - $window.location.pathname = Settings.siteRoot; - }); - }; - - $scope.ambariVersion = null; - $rootScope.supports = {}; - $rootScope.authDataLoad = $q.defer(); - - Utility.getUserPref('user-pref-' + Auth.getCurrentUser() + '-supports').then(function(data) { - $rootScope.supports = data.data ? data.data : {}; - }); - - $http.get(Settings.baseUrl + '/users/' + Auth.getCurrentUser() + '/authorizations?fields=*') - .then(function(data) { - var auth = !!data.data && !!data.data.items ? data.data.items.map(function (a) { - return a.AuthorizationInfo.authorization_id; - }) : [], - canPersistData = auth.indexOf('CLUSTER.MANAGE_USER_PERSISTED_DATA') > -1; - $rootScope.authDataLoad.resolve(canPersistData); - if(auth.indexOf('AMBARI.RENAME_CLUSTER') == -1) { - $window.location = $rootScope.fromSiteRoot("/#/main/dashboard"); - } - }); - - $scope.about = function() { - var ambariVersion = $scope.ambariVersion; - var modalInstance = $modal.open({ - templateUrl:'views/modals/AboutModal.html', - controller: ['$scope', function($scope) { - $scope.ok = function() { - modalInstance.close(); - }; - $scope.ambariVersion = ambariVersion; - }] - }); - }; - - $scope.currentUser = Auth.getCurrentUser(); - - $scope.cluster = null; - $scope.isLoaded = null; - - function loadAmbariVersion() { - Cluster.getAmbariVersion().then(function(version){ - $scope.ambariVersion = version; - }); - } - - function loadClusterData(){ - Cluster.getStatus().then(function(cluster) { - $scope.cluster = cluster; - $scope.isLoaded = true; - if(cluster && cluster.Clusters.provisioning_state === 'INIT'){ - setTimeout(loadClusterData, 1000); - } - }).catch(function(data) { - Alert.error($t('common.alerts.cannotLoadClusterStatus'), data.statusText); - }); - } - loadClusterData(); - loadAmbariVersion(); - - $scope.viewInstances = []; - - $scope.updateInstances = function () { - View.getAllVisibleInstance().then(function(instances) { - $scope.viewInstances = instances.map(function(i) { - i.viewUrl = i.view_name + '/' + i.version + '/' + i.instance_name; - return i; - }); - }); - }; - - $scope.gotoViewsDashboard =function() { - window.location = Settings.siteRoot + '#/main/views'; - }; - - $scope.$root.$on('instancesUpdate', function (event, data) { - $scope.updateInstances(); - }); - - $scope.startInactiveTimeoutMonitoring = function(timeout) { - var TIME_OUT = timeout; - var active = true; - var lastActiveTime = Date.now(); - - var keepActive = function() { - if (active) { - lastActiveTime = Date.now(); - } - }; - - $(window).bind('mousemove', keepActive); - $(window).bind('keypress', keepActive); - $(window).bind('click', keepActive); - - var checkActiveness = function() { - var remainTime = TIME_OUT - (Date.now() - lastActiveTime); - if (remainTime < 0) { - active = false; - $(window).unbind('mousemove', keepActive); - $(window).unbind('keypress', keepActive); - $(window).unbind('click', keepActive); - clearInterval($rootScope.userActivityTimeoutInterval); - $scope.signOut(); - } else if (remainTime < 60000 && !$rootScope.timeoutModal) { - $rootScope.timeoutModal = $modal.open({ - templateUrl: 'views/modals/TimeoutWarning.html', - backdrop: false, - controller: ['$scope', 'Auth', function($scope, Auth) { - $scope.remainTime = 60; - $scope.title = $t('main.autoLogOut'); - $scope.primaryText = $t('main.controls.remainLoggedIn'); - $scope.secondaryText = $t('main.controls.logOut'); - $scope.remain = function() { - $rootScope.timeoutModal.close(); - delete $rootScope.timeoutModal; - }; - $scope.logout = function() { - $rootScope.timeoutModal.close(); - delete $rootScope.timeoutModal; - Auth.signout().finally(function() { - $window.location.pathname = Settings.siteRoot; - }); - }; - $scope.countDown = function() { - $scope.remainTime--; - $scope.$apply(); - if ($scope.remainTime == 0) { - Auth.signout().finally(function() { - $window.location.pathname = Settings.siteRoot; - }); - } - }; - setInterval($scope.countDown, 1000); - }] - }); - } - }; - $rootScope.userActivityTimeoutInterval = window.setInterval(checkActiveness, 1000); - }; - - // Send noop requests every 10 seconds just to keep backend session alive - $scope.startNoopPolling = function() { - $rootScope.noopPollingInterval = setInterval(Cluster.getAmbariTimeout, 10000); - }; - - if (!$rootScope.userActivityTimeoutInterval) { - Cluster.getAmbariTimeout().then(function(timeout) { - $rootScope.userTimeout = Number(timeout) * 1000; - if ($rootScope.userTimeout > 0) - $scope.startInactiveTimeoutMonitoring($rootScope.userTimeout); - }); - } - if (!$rootScope.noopPollingInterval) { - $scope.startNoopPolling(); - } - $scope.updateInstances(); +.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/b8f7369b/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 183a276..cb52df1 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 @@ -39,6 +39,7 @@ angular.module('ambariAdminConsole') 'common.versions': 'Versions', 'common.stack': 'Stack', 'common.details': 'Details', + 'common.dashboard': 'Dashboard', 'common.goToDashboard': 'Go to Dashboard', 'common.exportBlueprint': 'Export Blueprint', 'common.blueprint': 'Blueprint', @@ -70,7 +71,6 @@ angular.module('ambariAdminConsole') 'common.renameCluster': 'Rename Cluster', 'common.renameClusterTip': 'Only alpha-numeric characters, up to 80 characters', 'common.clusterCreationInProgress': 'Cluster creation in progress...', - 'common.userGroupManagement': 'User + Group Management', 'common.all': 'All', 'common.group': 'Group', 'common.user': 'User', @@ -96,6 +96,10 @@ angular.module('ambariAdminConsole') 'common.undo': 'Undo', 'common.fromGroupMark': '(from group)', 'common.copy': '_Copy', + 'common.clusterInformation': 'Cluster Information', + 'common.clusterManagement': 'Cluster Management', + 'common.userManagement': 'User Management', + 'common.admin': 'Admin', 'common.clusterNameChangeConfirmation.title': 'Confirm Cluster Name Change', 'common.clusterNameChangeConfirmation.message': 'Are you sure you want to change the cluster name to {{clusterName}}?', @@ -277,7 +281,7 @@ angular.module('ambariAdminConsole') 'clusters.alerts.cannotLoadClusterData': 'Cannot load cluster data', - 'groups.createLocal': 'Create Local Group', + 'groups.createLocal': 'Add Groups', 'groups.name': 'Group name', 'groups.members': 'Members', 'groups.membersPlural': '{{n}} member{{n == 1 ? "" : "s"}}', @@ -298,7 +302,7 @@ angular.module('ambariAdminConsole') 'users.yourPassword': 'Your Password', 'users.newPassword': 'New User Password', 'users.newPasswordConfirmation': 'New User Password Confirmation', - 'users.create': 'Create Local User', + 'users.create': 'Add Users', 'users.active': 'Active', 'users.inactive': 'Inactive', 'users.status': 'Status', @@ -369,6 +373,7 @@ angular.module('ambariAdminConsole') 'versions.installOn': 'Install on...', 'versions.register.title': 'Register Version', + 'versions.add.title': 'Add Version', 'versions.register.error.header': 'Unable to Register', 'versions.register.error.body': 'You are attempting to register a version with a Base URL that is already in use with an existing registered version. You *must* review your Base URLs and confirm they are unique for the version you are trying to register.', http://git-wip-us.apache.org/repos/asf/ambari/blob/b8f7369b/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 a1ca59c..d2d8253 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 @@ -22,7 +22,8 @@ angular.module('ambariAdminConsole') root: { url: '/', templateUrl: 'views/main.html', - controller: 'MainCtrl' + controller: 'MainCtrl', + label: 'Welcome' }, authentication: { main: { @@ -47,122 +48,144 @@ angular.module('ambariAdminConsole') list: { url: '/users', templateUrl: 'views/users/list.html', - controller: 'UsersListCtrl' + controller: 'UsersListCtrl', + label: 'Users' }, edit: { url: '/users/:id/edit', templateUrl: 'views/users/create.html', - controller: 'UsersCreateCtrl' + controller: 'UsersCreateCtrl', + label: 'Users' }, create: { url: '/users/new', templateUrl: 'views/users/create.html', - controller: 'UsersCreateCtrl' + controller: 'UsersCreateCtrl', + label: 'Users' }, show: { url: '/users/:id*', templateUrl: 'views/users/show.html', - controller: 'UsersShowCtrl' + controller: 'UsersShowCtrl', + label: 'Users' } }, groups: { list: { url: '/groups', templateUrl: 'views/groups/list.html', - controller: 'GroupsListCtrl' + controller: 'GroupsListCtrl', + label: 'Groups' }, edit: { url: '/groups/:id/edit', templateUrl: 'views/groups/edit.html', - controller: 'GroupsEditCtrl' + controller: 'GroupsEditCtrl', + label: 'Groups' }, create: { url: '/groups/new', templateUrl: 'views/groups/create.html', - controller: 'GroupsCreateCtrl' + controller: 'GroupsCreateCtrl', + label: 'Groups' } }, views: { list: { url: '/views', templateUrl: 'views/ambariViews/listTable.html', - controller: 'ViewsListCtrl' + controller: 'ViewsListCtrl', + label: 'Views' }, listViewUrls: { url: '/viewUrls', templateUrl: 'views/ambariViews/listUrls.html', - controller: 'ViewsListCtrl' + controller: 'ViewsListCtrl', + label: 'Views' }, createViewUrl:{ url: '/urls/new', templateUrl: 'views/urls/create.html', - controller: 'ViewUrlCtrl' + controller: 'ViewUrlCtrl', + label: 'Views' }, linkViewUrl:{ url: '/urls/link/:viewName/:viewVersion/:viewInstanceName', templateUrl: 'views/urls/create.html', - controller: 'ViewUrlCtrl' + controller: 'ViewUrlCtrl', + label: 'Views' }, editViewUrl:{ url: '/urls/edit/:urlName', templateUrl: 'views/urls/edit.html', - controller: 'ViewUrlEditCtrl' + controller: 'ViewUrlEditCtrl', + label: 'Views' }, clone: { url: '/views/:viewId/versions/:version/instances/:instanceId/clone', templateUrl: 'views/ambariViews/create.html', - controller: 'CreateViewInstanceCtrl' + controller: 'CreateViewInstanceCtrl', + label: 'Views' }, edit: { url: '/views/:viewId/versions/:version/instances/:instanceId/edit', templateUrl: 'views/ambariViews/edit.html', - controller: 'ViewsEditCtrl' + controller: 'ViewsEditCtrl', + label: 'Views' }, create: { url: '/views/:viewId/new', templateUrl: 'views/ambariViews/create.html', - controller: 'CreateViewInstanceCtrl' + controller: 'CreateViewInstanceCtrl', + label: 'Views' } }, stackVersions: { list: { url: '/stackVersions', templateUrl: 'views/stackVersions/list.html', - controller: 'StackVersionsListCtrl' + controller: 'StackVersionsListCtrl', + label: 'Cluster Information' }, create: { url: '/stackVersions/create', templateUrl: 'views/stackVersions/stackVersionPage.html', - controller: 'StackVersionsCreateCtrl' + controller: 'StackVersionsCreateCtrl', + label: 'Cluster Information' }, edit: { url: '/stackVersions/:stackName/:versionId/edit', templateUrl: 'views/stackVersions/stackVersionPage.html', - controller: 'StackVersionsEditCtrl' + controller: 'StackVersionsEditCtrl', + label: 'Cluster Information' } }, remoteClusters: { list: { url: '/remoteClusters', templateUrl: 'views/remoteClusters/list.html', - controller: 'RemoteClustersListCtrl' + controller: 'RemoteClustersListCtrl', + label: 'Remote Clusters' }, create: { url: '/remoteClusters/create', templateUrl: 'views/remoteClusters/remoteClusterPage.html', - controller: 'RemoteClustersCreateCtrl' + controller: 'RemoteClustersCreateCtrl', + label: 'Remote Clusters' }, edit: { url: '/remoteClusters/:clusterName/edit', templateUrl: 'views/remoteClusters/editRemoteClusterPage.html', - controller: 'RemoteClustersEditCtrl' + controller: 'RemoteClustersEditCtrl', + label: 'Remote Clusters' } }, clusters: { manageAccess: { url: '/clusters/:id/manageAccess', templateUrl: 'views/clusters/manageAccess.html', - controller: 'ClustersManageAccessCtrl' + controller: 'ClustersManageAccessCtrl', + label: 'Roles' }, userAccessList: { url: '/clusters/:id/userAccessList', http://git-wip-us.apache.org/repos/asf/ambari/blob/b8f7369b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/theme/bootstrap-ambari.js ---------------------------------------------------------------------- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/theme/bootstrap-ambari.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/theme/bootstrap-ambari.js new file mode 100644 index 0000000..434d1e9 --- /dev/null +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/theme/bootstrap-ambari.js @@ -0,0 +1,269 @@ +/** + * 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'; + +$(document).ready(function () { + var $accordionToggler = $(this).find('[data-toggle="collapseAccordion"]'); + $accordionToggler.off('click').on('click', function (event) { + var $this = $(this); + $this.siblings('.panel-body').slideToggle(500); + $this.children().children('.panel-toggle').toggleClass('fa-angle-down fa-angle-up'); + event.stopPropagation(); + return false; + }); +}); +'use strict'; + +(function ($) { + + /** + * jQuery plugin for navigation bars + * Usage: + * <pre> + * $('.navigation-bar').navigationBar(); + * </pre> + * + * @param {object} options see <code>$.fn.navigationBar.defaults</code> + * @returns {$} + */ + + $.fn.navigationBar = function (options) { + + var settings = $.extend({}, $.fn.navigationBar.defaults, options); + + return this.each(function () { + var _this = this; + + var containerSelector = '.navigation-bar-container'; + var $navigationContainer = $(this).find(containerSelector); + var $sideNavToggler = $(this).find('[data-toggle=' + settings.navBarToggleDataAttr + ']'); + var $subMenuToggler = $(this).find('[data-toggle=' + settings.subMenuNavToggleDataAttr + ']'); + var firstLvlMenuItemsSelector = '.side-nav-menu>li'; + var secondLvlMenuItemsSelector = '.side-nav-menu>li>ul>li'; + var $moreActions = $(this).find('.more-actions'); + var $dropdownMenu = $moreActions.children('.dropdown-menu'); + + $subMenuToggler.each(function (index, toggler) { + return $(toggler).parent().addClass('has-sub-menu'); + }); + + if (settings.fitHeight) { + $(this).addClass('navigation-bar-fit-height'); + + // make scrolling effect on side nav ONLY, i.e. not effected on ambari main contents + $(this).find('.side-nav-menu').on('DOMMouseScroll mousewheel', function (ev) { + var $this = $(this), + scrollTop = this.scrollTop, + scrollHeight = this.scrollHeight, + height = $this.innerHeight(), + delta = ev.originalEvent.wheelDelta, + up = delta > 0; + var prevent = function prevent() { + ev.stopPropagation(); + ev.preventDefault(); + ev.returnValue = false; + return false; + }; + + if (!up && -delta > scrollHeight - height - scrollTop) { + // Scrolling down, but this will take us past the bottom. + $this.scrollTop(scrollHeight); + return prevent(); + } else if (up && delta > scrollTop) { + // Scrolling up, but this will take us past the top. + $this.scrollTop(0); + return prevent(); + } + }); + } + + //set main content left margin based on the width of side-nav + var containerWidth = $navigationContainer.width(); + if (settings.moveLeftContent) { + $(settings.content).css('margin-left', containerWidth); + } + if (settings.moveLeftFooter) { + $(settings.footer).css('margin-left', containerWidth); + } + + function popStateHandler() { + var path = window.location.pathname + window.location.hash; + $navigationContainer.find('li a').each(function (index, link) { + var $link = $(link); + var href = $link.attr('data-href') || $link.attr('href'); + if (path.indexOf(href) !== -1 && ['', '#'].indexOf(href) === -1) { + $link.parent().addClass('active'); + } else { + $link.parent().removeClass('active'); + } + }); + } + + if (settings.handlePopState) { + popStateHandler(); + $(window).bind('popstate', popStateHandler); + } + + function clickHandler(el) { + var $li = $(el).parent(); + var activeClass = settings.activeClass; + + var activeMenuItems = firstLvlMenuItemsSelector + '.' + activeClass; + var activeSubMenuItems = secondLvlMenuItemsSelector + '.' + activeClass; + $navigationContainer.find(activeMenuItems).removeClass(activeClass); + $navigationContainer.find(activeSubMenuItems).removeClass(activeClass); + $li.addClass(activeClass); + } + + /** + * Click on menu item + */ + $(firstLvlMenuItemsSelector + '>a').on('click', function () { + clickHandler(this); + }); + + /** + * Click on sub menu item + */ + $(secondLvlMenuItemsSelector + '>a').on('click', function () { + clickHandler(this); + $(this).parent().parent().parent().addClass(settings.activeClass); + }); + + /** + * Slider for sub menu + */ + $subMenuToggler.off('click').on('click', function (event) { + // ignore click if navigation-bar is collapsed + if ($navigationContainer.hasClass('collapsed')) { + return false; + } + var $this = $(this); + $this.siblings('.sub-menu').slideToggle(600, function () { + var $topMenuItem = $this.parent(); + var $subMenu = $topMenuItem.find('ul'); + return $subMenu.is(':visible') ? $topMenuItem.removeClass('collapsed') : $topMenuItem.addClass('collapsed'); + }); + $this.children('.toggle-icon').toggleClass(settings.menuLeftClass + ' ' + settings.menuDownClass); + event.stopPropagation(); + return false; + }); + + if (settings.fitHeight) { + $moreActions.on('click', function () { + // set actions submenu position + var $moreIcon = $(this); + var $header = $('.side-nav-header'); + $dropdownMenu.css({ + top: $moreIcon.offset().top - $header.offset().top + 20 + 'px', + left: $moreIcon.offset().left + 'px' + }); + }); + } + $dropdownMenu.on('click', function () { + // some action was triggered, should hide this icon + var moreIcon = $(this).parent(); + setTimeout(function () { + moreIcon.hide(); + }, 1000); + }); + $navigationContainer.children('.side-nav-menu').scroll(function () { + $moreActions.removeClass('open'); + }); + + /** + * Expand/collapse navigation bar + */ + $sideNavToggler.click(function () { + + $navigationContainer.toggleClass('collapsed').promise().done(function () { + var subMenuSelector = 'ul.sub-menu'; + var $subMenus = $navigationContainer.find(subMenuSelector); + var $subMenuItems = $navigationContainer.find('.side-nav-menu>li'); + if ($navigationContainer.hasClass('collapsed')) { + // set sub menu invisible when collapsed + $subMenus.hide(); + $moreActions.hide(); + // set the hover effect when collapsed, should show sub-menu on hovering + $subMenuItems.hover(function () { + $(this).find(subMenuSelector).show(); + // set sub-menu position + var $parent = $(this); + var $header = $('.side-nav-header'); + if (settings.fitHeight) { + $(this).find(subMenuSelector).css({ + position: 'fixed', + top: $parent.offset().top - $header.offset().top + 'px', + left: 50 + 'px' + }); + } + }, function () { + $(this).find(subMenuSelector).hide(); + }); + } else { + // keep showing all sub menu + $subMenus.show().each(function (index, item) { + return $(item).parent().removeClass('collapsed'); + }); + $subMenuItems.unbind('mouseenter mouseleave'); + $navigationContainer.find('.toggle-icon').removeClass(settings.menuLeftClass).addClass(settings.menuDownClass); + $moreActions.show(); + // set sub-menu position + if (settings.fitHeight) { + $(_this).find(subMenuSelector).css({ + position: 'relative', + top: 0, + left: 0 + }); + } + } + + $navigationContainer.on('transitionend', function () { + //set main content left margin based on the width of side-nav + var containerWidth = $navigationContainer.width(); + if (settings.moveLeftContent) { + $(settings.content).css('margin-left', containerWidth); + } + if (settings.moveLeftFooter) { + $(settings.footer).css('margin-left', containerWidth); + } + }); + $sideNavToggler.find('span').toggleClass(settings.collapseNavBarClass + ' ' + settings.expandNavBarClass); + }); + return false; + }); + }); + }; + + $.fn.navigationBar.defaults = { + handlePopState: true, + fitHeight: false, + content: '#main', + footer: 'footer', + moveLeftContent: true, + moveLeftFooter: true, + menuLeftClass: 'glyphicon-menu-right', + menuDownClass: 'glyphicon-menu-down', + collapseNavBarClass: 'fa-angle-double-left', + expandNavBarClass: 'fa-angle-double-right', + activeClass: 'active', + navBarToggleDataAttr: 'collapse-side-nav', + subMenuNavToggleDataAttr: 'collapse-sub-menu' + }; +})(jQuery); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/b8f7369b/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 946007d..66f23af 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 @@ -415,79 +415,6 @@ a.gotoinstance{ background-color: #da4f49; color: white; } -/* - Style topnav menu -*/ -.navbar-views-dropdown > a{ - color: #c3c3c3; - font-size: 1.3em; - padding: 10px 25px 18px; - display: block; - box-shadow: none!important; - background: none!important; - text-decoration: none; -} -.navbar-views-dropdown > a:hover{ - color: #fff; -} -.navbar-views-dropdown > a > i{ - display: block; - margin-top: 1px; - margin-bottom: -12px; -} -.navbar-views-dropdown .dropdown-menu, .verison-label-row .dropdown-menu { - margin-top: -2px; -} - -.navbar-views-dropdown .dropdown-menu a:hover{ - background: #666; - color: #fff; -} -.navbar-views-dropdown .dropdown-menu .disabled a:hover{ - background: none; - color: #999; -} -#top-nav .navbar.navbar-static-top{ - min-height: 40px; -} -#top-nav .navbar-inverse{ - background: none; - border: none; -} -#top-nav .navbar.navbar-static-top .navbar-inner { - background-color: #313d54; - -webkit-box-shadow: inset 0 0 0 rgba(0, 0, 0, 0.1), 0 1px 10px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0 0 0 rgba(0, 0, 0, 0.1), 0 1px 10px rgba(0, 0, 0, 0.1); - box-shadow: inset 0 0 0 rgba(0, 0, 0, 0.1), 0 1px 10px rgba(0, 0, 0, 0.1); - max-height: 40px; - height: 40px; -} -#top-nav .dropdown-toggle.navbar-btn{ - margin: 4px 0 0 0; -} -#top-nav .navbar.navbar-static-top .logo { - float: left; - padding-top: 2px; -} -#top-nav .navbar.navbar-static-top .logo img { - height: 32px; -} -#top-nav .navbar.navbar-static-top .brand { - color: #ffffff; - font-size: 16px; - font-weight: normal; - line-height: 32px; - margin-left: 0; - padding: 2px 5px 0 10px; - text-shadow: 0 1px 0 #555555; - display: block; - float: left; - text-decoration: none; - -} -#top-nav .navbar.navbar-static-top .brand.cluster-name{ - margin-left: 10px; -} .create-view-form, .register-version-form, .edit-version-form { padding-bottom: 50px; @@ -579,24 +506,6 @@ a.gotoinstance{ border: 0; } -.container{ - padding-left: 0; - width: 940px; -} - - -@media (min-width: 1200px) { - .container, .navbar-static-top .container, .navbar-fixed-top .container, .navbar-fixed-bottom .container{ - width: 1130px; - } - .container{ - width: 1170px; - } - .mainpage .panel-body #main-operations-boxes .col-sm-5 { - width: 44%; - } -} - ul.nav li > a{ cursor: pointer; } @@ -701,318 +610,6 @@ table.no-border tr td{ /*.login-message-pane .well {height: 74px;} .login-message-pane input {margin-left: 3px;}*/ - -.btn { - display: inline-block; - *display: inline; - padding: 4px 14px; - margin-bottom: 0; - *margin-left: .3em; - font-size: 14px; - line-height: 20px; - *line-height: 20px; - color: #333333; - text-align: center; - text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); - vertical-align: middle; - cursor: pointer; - background-color: #f5f5f5; - *background-color: #e6e6e6; - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); - background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); - background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); - background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); - background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); - background-repeat: repeat-x; - border: 1px solid #bbbbbb; - *border: 0; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - border-color: #e6e6e6 #e6e6e6 #bfbfbf; - border-bottom-color: #a2a2a2; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); - *zoom: 1; - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); -} - -.btn:hover, -.btn:active, -.btn.active, -.btn.disabled, -.btn[disabled] { - color: #333333; - background-color: #e6e6e6; - *background-color: #d9d9d9; -} - -.btn:active, -.btn.active { - background-color: #cccccc \9; -} - -.btn:first-child { - *margin-left: 0; -} - -.btn:hover { - color: #333333; - text-decoration: none; - background-color: #e6e6e6; - *background-color: #d9d9d9; - /* Buttons in IE7 don't get borders, so darken on hover */ - - background-position: 0 -15px; - -webkit-transition: background-position 0.1s linear; - -moz-transition: background-position 0.1s linear; - -o-transition: background-position 0.1s linear; - transition: background-position 0.1s linear; -} - -.btn:focus { - outline: thin dotted #333; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} - -.btn.active, -.btn:active { - background-color: #e6e6e6; - background-color: #d9d9d9 \9; - background-image: none; - outline: 0; - -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); -} - -.btn.disabled, -.btn[disabled] { - cursor: default; - background-color: #e6e6e6; - background-image: none; - opacity: 0.65; - filter: alpha(opacity=65); - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} - - - -.btn-primary.active, -.btn-warning.active, -.btn-danger.active, -.btn-success.active, -.btn-info.active, -.btn-inverse.active { - color: rgba(255, 255, 255, 0.75); -} - -.btn { - border-color: #c5c5c5; - border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25); -} - -.btn-primary { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #006dcc; - *background-color: #0044cc; - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); - background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); - background-image: -o-linear-gradient(top, #0088cc, #0044cc); - background-image: linear-gradient(to bottom, #0088cc, #0044cc); - background-image: -moz-linear-gradient(top, #0088cc, #0044cc); - background-repeat: repeat-x; - border-color: #0044cc #0044cc #002a80; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); -} - -.btn-primary:hover, -.btn-primary:active, -.btn-primary.active, -.btn-primary.disabled, -.btn-primary[disabled], -.btn-primary.disabled:hover, -.btn-primary[disabled]:hover - { - color: #ffffff; - background-color: #0044cc; - *background-color: #003bb3; -} - -.btn-primary:active, -.btn-primary.active { - background-color: #003399 \9; -} - -.btn-warning { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #faa732; - *background-color: #f89406; - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); - background-image: -webkit-linear-gradient(top, #fbb450, #f89406); - background-image: -o-linear-gradient(top, #fbb450, #f89406); - background-image: linear-gradient(to bottom, #fbb450, #f89406); - background-image: -moz-linear-gradient(top, #fbb450, #f89406); - background-repeat: repeat-x; - border-color: #f89406 #f89406 #ad6704; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); -} - -.btn-warning:hover, -.btn-warning:active, -.btn-warning.active, -.btn-warning.disabled, -.btn-warning[disabled] { - color: #ffffff; - background-color: #f89406; - *background-color: #df8505; -} - -.btn-warning:active, -.btn-warning.active { - background-color: #c67605 \9; -} - -.btn-danger { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #da4f49; - *background-color: #bd362f; - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f)); - background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f); - background-image: -o-linear-gradient(top, #ee5f5b, #bd362f); - background-image: linear-gradient(to bottom, #ee5f5b, #bd362f); - background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f); - background-repeat: repeat-x; - border-color: #bd362f #bd362f #802420; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); -} - -.btn-danger:hover, -.btn-danger:active, -.btn-danger.active, -.btn-danger.disabled, -.btn-danger[disabled] { - color: #ffffff; - background-color: #bd362f; - *background-color: #a9302a; -} - -.btn-danger:active, -.btn-danger.active { - background-color: #942a25 \9; -} - -.btn-success { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #5bb75b; - *background-color: #51a351; - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351)); - background-image: -webkit-linear-gradient(top, #62c462, #51a351); - background-image: -o-linear-gradient(top, #62c462, #51a351); - background-image: linear-gradient(to bottom, #62c462, #51a351); - background-image: -moz-linear-gradient(top, #62c462, #51a351); - background-repeat: repeat-x; - border-color: #51a351 #51a351 #387038; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); -} - -.btn-success:hover, -.btn-success:active, -.btn-success.active, -.btn-success.disabled, -.btn-success[disabled] { - color: #ffffff; - background-color: #51a351; - *background-color: #499249; -} - -.btn-success:active, -.btn-success.active { - background-color: #408140 \9; -} - -.btn-info { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #49afcd; - *background-color: #2f96b4; - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4)); - background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4); - background-image: -o-linear-gradient(top, #5bc0de, #2f96b4); - background-image: linear-gradient(to bottom, #5bc0de, #2f96b4); - background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4); - background-repeat: repeat-x; - border-color: #2f96b4 #2f96b4 #1f6377; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); -} - -.btn-info:hover, -.btn-info:active, -.btn-info.active, -.btn-info.disabled, -.btn-info[disabled] { - color: #ffffff; - background-color: #2f96b4; - *background-color: #2a85a0; -} - -.btn-info:active, -.btn-info.active { - background-color: #24748c \9; -} - -.btn-inverse { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #363636; - *background-color: #222222; - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222)); - background-image: -webkit-linear-gradient(top, #444444, #222222); - background-image: -o-linear-gradient(top, #444444, #222222); - background-image: linear-gradient(to bottom, #444444, #222222); - background-image: -moz-linear-gradient(top, #444444, #222222); - background-repeat: repeat-x; - border-color: #222222 #222222 #000000; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); -} - -.btn-inverse:hover, -.btn-inverse:active, -.btn-inverse.active, -.btn-inverse.disabled, -.btn-inverse[disabled] { - color: #ffffff; - background-color: #222222; - *background-color: #151515; -} - -.btn-inverse:active, -.btn-inverse.active { - background-color: #080808 \9; -} - button.btn, input[type="submit"].btn { *padding-top: 3px; @@ -1050,6 +647,10 @@ button.btn.btn-xs{ border-radius: 3px; } +a.btn-primary { + color: #fff; +} + .clusterDisplayName { display:inline-block; width:90%; @@ -1872,4 +1473,28 @@ legend { .ellipsis-overflow { overflow: hidden; text-overflow: ellipsis; -} \ No newline at end of file +} + +.pull-right { + float: right; +} + +body { + height: 100%; + background-color: #f0f0f0; +} + +#main { + transition: .5s ease; + overflow: visible; + min-width: 980px; +} + +#side-nav .ambari-header-link:hover { + text-decoration: none; +} + +.main-container { + background-color: #fff; + padding: 15px; +}
