Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngel Avila2015-09-22 12:30:30 -0400
committerRyan D. Brooks2015-09-22 12:30:30 -0400
commit130a88d09b431f266b64d76ad30e1fcf67eba1b1 (patch)
treebae7bf366fcd36ac39567bcc8ea7f559d97a1bbc /plugins/org.eclipse.osee.web.ui
parentc2a741d3c9501b2e411804db02e09b7a9bfe410d (diff)
downloadorg.eclipse.osee-130a88d09b431f266b64d76ad30e1fcf67eba1b1.tar.gz
org.eclipse.osee-130a88d09b431f266b64d76ad30e1fcf67eba1b1.tar.xz
org.eclipse.osee-130a88d09b431f266b64d76ad30e1fcf67eba1b1.zip
bug: Temporarily disable OAuth on Coverage
Diffstat (limited to 'plugins/org.eclipse.osee.web.ui')
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/coverage/ui/index.html20
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/js/dispoApp.js4
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/js/mainController.js27
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/js/userController.js2
4 files changed, 46 insertions, 7 deletions
diff --git a/plugins/org.eclipse.osee.web.ui/src/coverage/ui/index.html b/plugins/org.eclipse.osee.web.ui/src/coverage/ui/index.html
index 65c73d7af4..6deebff1c3 100644
--- a/plugins/org.eclipse.osee.web.ui/src/coverage/ui/index.html
+++ b/plugins/org.eclipse.osee.web.ui/src/coverage/ui/index.html
@@ -49,10 +49,28 @@
</head>
<body ng-app="dispoApp">
<div ng-controller="indexController">
- <osee
+ <!osee
redirect-uri="../coverage/ui/index.html"
links="links">
</osee>
+ <nav ng-controller="mainController" class="navbar navbar-default" role="navigation">
+ <div class="container-fluid">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <a class="navbar-brand" href="#/user">Coverage</a>
+ </div>
+ <p ng-dblclick="resetUserName()" class="navbar-text">Signed in as {{ cachedName }}</p>
+ <div class="collapse navbar-collapse">
+ <ul class="nav navbar-nav navbar-right">
+ <button id="helpButton" class="btn btn-info" ng-click="showHelpModal()">Help</button>
+ </ul>
+ </div>
+ </div>
+ </nav>
</div>
<div ng-view></div>
</body>
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/js/dispoApp.js b/plugins/org.eclipse.osee.web.ui/src/dispo/js/dispoApp.js
index 631cc8387f..185b291553 100644
--- a/plugins/org.eclipse.osee.web.ui/src/dispo/js/dispoApp.js
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/js/dispoApp.js
@@ -7,8 +7,8 @@ app.config(['$routeProvider',
function($routeProvider) {
$routeProvider.when('/', {
- templateUrl: '/dispo/views/main.html',
- controller: 'mainController'
+ templateUrl: '/dispo/views/user.html',
+ controller: 'userController'
}).when('/user', {
templateUrl: '/dispo/views/user.html',
controller: 'userController'
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/js/mainController.js b/plugins/org.eclipse.osee.web.ui/src/dispo/js/mainController.js
index d988229c9b..39e821f9d9 100644
--- a/plugins/org.eclipse.osee.web.ui/src/dispo/js/mainController.js
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/js/mainController.js
@@ -1,5 +1,26 @@
-app.controller("mainController", ["$scope", "$rootScope",
- function($scope, $rootScope) {
+app.controller("mainController", ["$scope", "$rootScope", "$localStorage",
+ function($scope, $rootScope, $localStorage) {
$scope.links = [ { ref: '', name: 'Home'}, { ref: 'user', name: 'User'}, { ref: 'admin', name: 'Admin'}];
- $rootScope.type = "test_script";
+
+ $rootScope.setUserName = function() {
+ $rootScope.attempts = 0;
+ while(($rootScope.cachedName == null || $rootScope.cachedName == "") && $rootScope.attempts < 5) {
+ var nameEnter=prompt("Please enter your name","");
+ $localStorage.cachedName = nameEnter;
+ $rootScope.cachedName = nameEnter;
+ $rootScope.attempts++;
+ }
+ if($rootScope>=5) {
+ $rootScope.cachedName = "Need To Log In";
+ }
+
+ }
+
+ $rootScope.cachedName = $localStorage.cachedName;
+ $rootScope.setUserName();
+
+ $rootScope.resetUserName = function() {
+ $rootScope.cachedName = null;
+ $rootScope.setUserName();
+ }
}]); \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/js/userController.js b/plugins/org.eclipse.osee.web.ui/src/dispo/js/userController.js
index 9ee3d7c530..51dfcee63f 100644
--- a/plugins/org.eclipse.osee.web.ui/src/dispo/js/userController.js
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/js/userController.js
@@ -21,7 +21,7 @@ app.controller('userController', [
$scope.isMulitEditRequest = false;
$scope.loading = false;
$scope.isSearchView = false;
- $rootScope.cachedName = $cookieStore.get("name");
+// $rootScope.cachedName = $cookieStore.get("name");
$scope.getDispoType = function() {
if($rootScope.type == 'codeCoverage') {

Back to the top