diff options
29 files changed, 576 insertions, 19 deletions
diff --git a/features/org.eclipse.osee.x.server.feature/feature.xml b/features/org.eclipse.osee.x.server.feature/feature.xml index 59cda442677..ee7a3b93ac8 100644 --- a/features/org.eclipse.osee.x.server.feature/feature.xml +++ b/features/org.eclipse.osee.x.server.feature/feature.xml @@ -68,4 +68,10 @@ version="0.0.0" unpack="false"/> + <plugin + id="org.eclipse.osee.web.ui" + download-size="0" + install-size="0" + version="0.0.0"/> + </feature> diff --git a/features/org.eclipse.osee.x.server.feature/pom.xml b/features/org.eclipse.osee.x.server.feature/pom.xml index 024654e8dc3..0c3e80570e9 100644 --- a/features/org.eclipse.osee.x.server.feature/pom.xml +++ b/features/org.eclipse.osee.x.server.feature/pom.xml @@ -10,4 +10,28 @@ <artifactId>org.eclipse.osee.x.server.feature</artifactId> <packaging>eclipse-feature</packaging> <name>OSEE X Server Feature - (Incubation)</name> + + <build> + <plugins> + <plugin> + <groupId>org.eclipse.tycho.extras</groupId> + <artifactId>tycho-source-feature-plugin</artifactId> + <executions> + <execution> + <phase>package</phase> + <id>source-feature</id> + <goals> + <goal>source-feature</goal> + </goals> + <configuration> + <excludes> + <plugin id="org.eclipse.osee.web.ui" /> + </excludes> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + </project>
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.parent/pom.xml b/plugins/org.eclipse.osee.parent/pom.xml index 60afe3e7734..e54bcfbb8ce 100644 --- a/plugins/org.eclipse.osee.parent/pom.xml +++ b/plugins/org.eclipse.osee.parent/pom.xml @@ -47,6 +47,8 @@ <jaxb2-maven-version>1.5</jaxb2-maven-version> + <jasmine-version>1.3.1.0</jasmine-version> + <platform-version-name>kepler</platform-version-name> <orbit-version>R20130517111416</orbit-version> <xtext-version>2.0.0</xtext-version> @@ -116,8 +118,9 @@ <format>'v'yyyyMMddHHmm'${build-alias}'</format> <archiveSite>true</archiveSite> <environments> - <!-- <environment> <os>macosx</os> <ws>carbon</ws> <arch>x86</arch> </environment> <environment> <os>macosx</os> <ws>cocoa</ws> - <arch>x86</arch> </environment> --> + <!-- <environment> <os>macosx</os> <ws>carbon</ws> <arch>x86</arch> + </environment> <environment> <os>macosx</os> <ws>cocoa</ws> <arch>x86</arch> + </environment> --> <environment> <os>macosx</os> <ws>cocoa</ws> @@ -161,8 +164,9 @@ </filters> <resolver>p2</resolver> <environments> - <!-- <environment> <os>macosx</os> <ws>carbon</ws> <arch>x86</arch> </environment> <environment> <os>macosx</os> <ws>cocoa</ws> - <arch>x86</arch> </environment> --> + <!-- <environment> <os>macosx</os> <ws>carbon</ws> <arch>x86</arch> + </environment> <environment> <os>macosx</os> <ws>cocoa</ws> <arch>x86</arch> + </environment> --> <environment> <os>macosx</os> <ws>cocoa</ws> @@ -327,6 +331,39 @@ <artifactId>build-helper-maven-plugin</artifactId> <version>${build-helper-maven-plugin-version}</version> </plugin> + <plugin> + <groupId>com.github.searls</groupId> + <artifactId>jasmine-maven-plugin</artifactId> + <version>${jasmine-version}</version> + <executions> + <execution> + <goals> + <goal>test</goal> + </goals> + </execution> + </executions> + <!-- <configuration> + <preloadSources> + <source>${project.basedir}/src/main/resources/ui/javascript/require.js</source> + </preloadSources> + <jsSrcDir>${project.basedir}/src</jsSrcDir> + <sourceIncludes> + <include>**/*.js</include> + <include>**/*.coffee</include> + </sourceIncludes> + <sourceExcludes> + <exclude>${project.basedir}/src/main/resources/ui/javascript/require.js</exclude> + </sourceExcludes> + <jsTestSrcDir>${project.basedir}/src/test/javascript</jsTestSrcDir> + <specIncludes> + <include>**/SpecHelper.js</include> + <include>**/*.js</include> + <include>**/*.coffee</include> + </specIncludes> + <customRunnerTemplate>${project.basedir}/src/main/resources/jasmine-templates/RequireJsSpecRunner.htmltemplate</customRunnerTemplate> + <format>progress</format> + </configuration> --> + </plugin> </plugins> </pluginManagement> </build> @@ -533,8 +570,9 @@ <append>true</append> </configuration> </execution> - <!-- <execution> <id>create-coverage-reports</id> <phase>verify</phase> <goals> <goal>report</goal> </goals> <configuration> - <dataFile>${sonar.jacoco.reportPath}</dataFile> <includes>*.osee.*</includes> <outputDirectory>${coverage.reportPath}</outputDirectory> + <!-- <execution> <id>create-coverage-reports</id> <phase>verify</phase> + <goals> <goal>report</goal> </goals> <configuration> <dataFile>${sonar.jacoco.reportPath}</dataFile> + <includes>*.osee.*</includes> <outputDirectory>${coverage.reportPath}</outputDirectory> <outputEncoding>UTF-8</outputEncoding> </configuration> </execution> --> </executions> </plugin> @@ -607,7 +645,8 @@ <layout>p2</layout> <url>${nebula-site}</url> </repository> - <!--<repository> <id>wikitext</id> <layout>p2</layout> <url>${wikitext-site}</url> </repository> --> + <!--<repository> <id>wikitext</id> <layout>p2</layout> <url>${wikitext-site}</url> + </repository> --> <repository> <id>polarion</id> <layout>p2</layout> @@ -618,7 +657,8 @@ <layout>p2</layout> <url>${subversive-site}</url> </repository> - <!-- <repository> <id>egit</id> <layout>p2</layout> <url>${egit-site}</url> </repository> --> + <!-- <repository> <id>egit</id> <layout>p2</layout> <url>${egit-site}</url> + </repository> --> </repositories> </profile> diff --git a/plugins/org.eclipse.osee.web.ui.parent/.project b/plugins/org.eclipse.osee.web.ui.parent/.project deleted file mode 100644 index 9682149083f..00000000000 --- a/plugins/org.eclipse.osee.web.ui.parent/.project +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>org.eclipse.osee.web.ui.parent</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - </buildSpec> - <natures> - </natures> -</projectDescription> diff --git a/plugins/org.eclipse.osee.web.ui.test/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.web.ui.test/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..42c18bf9b0f --- /dev/null +++ b/plugins/org.eclipse.osee.web.ui.test/META-INF/MANIFEST.MF @@ -0,0 +1,6 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: OSEE Web UI Test +Bundle-SymbolicName: org.eclipse.osee.web.ui.test +Bundle-Version: 0.21.0.qualifier +Fragment-Host: org.eclipse.osee.web.ui diff --git a/plugins/org.eclipse.osee.web.ui.test/build.properties b/plugins/org.eclipse.osee.web.ui.test/build.properties new file mode 100644 index 00000000000..b84ad5cd336 --- /dev/null +++ b/plugins/org.eclipse.osee.web.ui.test/build.properties @@ -0,0 +1,3 @@ +bin.includes = META-INF/,\ + .,\ + src/ diff --git a/plugins/org.eclipse.osee.web.ui.test/pom.xml b/plugins/org.eclipse.osee.web.ui.test/pom.xml new file mode 100644 index 00000000000..ebe03239580 --- /dev/null +++ b/plugins/org.eclipse.osee.web.ui.test/pom.xml @@ -0,0 +1,33 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.eclipse.osee</groupId> + <artifactId>org.eclipse.osee.x.server.parent</artifactId> + <version>0.21.0-SNAPSHOT</version> + <relativePath>../../plugins/org.eclipse.osee.x.server.parent</relativePath> + </parent> + + <artifactId>org.eclipse.osee.web.ui.test</artifactId> + <packaging>eclipse-plugin</packaging> + <name>OSEE Web UI Test - (Incubation)</name> + + <build> + <plugins> + <plugin> + <groupId>com.github.searls</groupId> + <artifactId>jasmine-maven-plugin</artifactId> + <version>${jasmine-version}</version> + <configuration> + <jsSrcDir>../org.eclipse.osee.web.ui/src</jsSrcDir> + <jsTestSrcDir>src</jsTestSrcDir> + <preloadSources> + <source>../../../org.eclipse.ip/org.eclipse.oss.ajax/src/*</source> + </preloadSources> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/plugins/org.eclipse.osee.web.ui.test/src/placeholder.txt b/plugins/org.eclipse.osee.web.ui.test/src/placeholder.txt new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/plugins/org.eclipse.osee.web.ui.test/src/placeholder.txt diff --git a/plugins/org.eclipse.osee.web.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.web.ui/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..0c678786589 --- /dev/null +++ b/plugins/org.eclipse.osee.web.ui/META-INF/MANIFEST.MF @@ -0,0 +1,8 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: OSEE Web UI (Incubation) +Bundle-SymbolicName: org.eclipse.osee.web.ui +Bundle-Version: 0.21.0.qualifier +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Bundle-Vendor: Eclipse Open System Engineering Environment +Osee-JaxRs-Resource: /src/*;path=/;secure=false diff --git a/plugins/org.eclipse.osee.web.ui/build.properties b/plugins/org.eclipse.osee.web.ui/build.properties new file mode 100644 index 00000000000..b84ad5cd336 --- /dev/null +++ b/plugins/org.eclipse.osee.web.ui/build.properties @@ -0,0 +1,3 @@ +bin.includes = META-INF/,\ + .,\ + src/ diff --git a/plugins/org.eclipse.osee.web.ui/pom.xml b/plugins/org.eclipse.osee.web.ui/pom.xml new file mode 100644 index 00000000000..a735e5df459 --- /dev/null +++ b/plugins/org.eclipse.osee.web.ui/pom.xml @@ -0,0 +1,17 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.eclipse.osee</groupId> + <artifactId>org.eclipse.osee.x.server.parent</artifactId> + <version>0.21.0-SNAPSHOT</version> + <relativePath>../../plugins/org.eclipse.osee.x.server.parent</relativePath> + </parent> + + <artifactId>org.eclipse.osee.web.ui</artifactId> + <packaging>eclipse-plugin</packaging> + <name>OSEE Web UI - (Incubation)</name> + +</project>
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.web.ui/src/account/js/signInApp.js b/plugins/org.eclipse.osee.web.ui/src/account/js/signInApp.js new file mode 100644 index 00000000000..8741d82e177 --- /dev/null +++ b/plugins/org.eclipse.osee.web.ui/src/account/js/signInApp.js @@ -0,0 +1,48 @@ +(function() { + + var app = angular.module('signInApp', [ 'ngRoute' ]); + + app.controller('signInController', [ + '$http', + '$location', + function($http, $location) { + var store = this; + + store.formData = {}; + store.params = {}; + + var getUrl = function() { + var splitted = $location.absUrl().split('?'); + var url = splitted[0]; + var continueTo = decodeURIComponent(splitted[1]); + + if (splitted.length > 2) { + var paramsForContinue = decodeURIComponent("?" + + splitted[2]); + continueTo += paramsForContinue; + } + + return continueTo.replace("continueTo=",""); + } + + store.continueTo = getUrl(); + + this.submit = function() { + var header = { + Accept : 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', + Authorization : 'Basic ' + + btoa(store.formData.username + ':' + store.formData.password) + } + $http({ + url : store.continueTo, + method : 'GET', + headers : header + }).success(function(data, status, headers, config) { + location.assign(store.continueTo); + }).error(function(data, status, headers, config) { + alert("Failed to Log in") + }); + }; + + } ]); +})();
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.web.ui/src/account/ui/login.html b/plugins/org.eclipse.osee.web.ui/src/account/ui/login.html new file mode 100644 index 00000000000..eec2b66907c --- /dev/null +++ b/plugins/org.eclipse.osee.web.ui/src/account/ui/login.html @@ -0,0 +1,77 @@ +<!DOCTYPE html> +<html lang="en"> +<head> +<meta charset="UTF-8"></meta> +<meta http-equiv="X-UA-Compatible" content="IE=edge"></meta> +<meta name="viewport" content="width=device-width, initial-scale=1"></meta> + +<link rel="stylesheet" type="text/css" + href="/ajax/libs/bootstrap/3.3.2/css/bootstrap.min.css"></link> + +<title>OSEE - Login</title> +<style> +html,body,.container { + height: 80%; +} + +.container { + display: table; + vertical-align: middle; +} + +.vertical-center-row { + display: table-cell; + vertical-align: middle; +} + +.text-center-row { + text-align: center; +} +</style> + +<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> +<!--[if lt IE 9]> + <script src="/ajax/libs/html5shiv/3.7.2/html5shiv.min.js"></script> + <script src="/ajax/libs/respond/1.4.2/respond.min.js"></script> + <![endif]--> +</head> +<body ng-app="signInApp" ng-controller="signInController as cntrl"> + <div class="container"> + <div class="row vertical-center-row"> + <div class="col-lg-12"> + <div class="row"> + <div class="col-md-4 col-md-offset-4"> + <div class="text-center-row"> + <div class="media-body lead"> + <h1 class="media-heading">OSEE</h1> + <i>Sign-in with your OSEE Account </i> + </div> + </div> + <div class="well"> + <form name="form" ng-submit="cntrl.submit()"> + <div class="form-group"> + <input type="text" class="form-control" id="username" + name="username" placeholder="Username" ng-model="cntrl.formData.username" + ng-model-options="{updateOn: 'blur'}" required> + </div> + <div class="form-group" + ng-class="{'has-error': form.password.$invalid && submitted}"> + <input type="password" class="form-control" id="password" + name="password" placeholder="Password" ng-model="cntrl.formData.password" + ng-model-options="{updateOn: 'blur'}" required> + </div> + <button type="submit" class="btn btn-primary btn-block">Login</button> + </form> + </div> + </div> + </div> + </div> + </div> + </div> + <script src="/ajax/libs/jquery/2.1.3/jquery.min.js"></script> + <script src="/ajax/libs/angularjs/1.3.11/angular.min.js"></script> + <script src="/ajax/libs/angularjs/1.3.11/angular-route.min.js"></script> + + <script src="/account/js/signInApp.js"></script> +</body> +</html>
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.web.ui/src/account/ui/logout.html b/plugins/org.eclipse.osee.web.ui/src/account/ui/logout.html new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/plugins/org.eclipse.osee.web.ui/src/account/ui/logout.html diff --git a/plugins/org.eclipse.osee.web.ui/src/libs/images/osee.ico b/plugins/org.eclipse.osee.web.ui/src/libs/images/osee.ico Binary files differnew file mode 100644 index 00000000000..632cdf92891 --- /dev/null +++ b/plugins/org.eclipse.osee.web.ui/src/libs/images/osee.ico diff --git a/plugins/org.eclipse.osee.web.ui/src/libs/images/osee_16x16.png b/plugins/org.eclipse.osee.web.ui/src/libs/images/osee_16x16.png Binary files differnew file mode 100644 index 00000000000..ba7a40d7c5b --- /dev/null +++ b/plugins/org.eclipse.osee.web.ui/src/libs/images/osee_16x16.png diff --git a/plugins/org.eclipse.osee.web.ui/src/libs/images/osee_32x32.png b/plugins/org.eclipse.osee.web.ui/src/libs/images/osee_32x32.png Binary files differnew file mode 100644 index 00000000000..81b939be4ef --- /dev/null +++ b/plugins/org.eclipse.osee.web.ui/src/libs/images/osee_32x32.png diff --git a/plugins/org.eclipse.osee.web.ui/src/libs/images/osee_48x48.png b/plugins/org.eclipse.osee.web.ui/src/libs/images/osee_48x48.png Binary files differnew file mode 100644 index 00000000000..8122af0c1f0 --- /dev/null +++ b/plugins/org.eclipse.osee.web.ui/src/libs/images/osee_48x48.png diff --git a/plugins/org.eclipse.osee.web.ui/src/libs/js/oseeAuth/oseeAuth.js b/plugins/org.eclipse.osee.web.ui/src/libs/js/oseeAuth/oseeAuth.js new file mode 100644 index 00000000000..1d55327a267 --- /dev/null +++ b/plugins/org.eclipse.osee.web.ui/src/libs/js/oseeAuth/oseeAuth.js @@ -0,0 +1,154 @@ +var app = angular.module('oseeProvider', [ 'osee.directive' ]); + +// ---------------------------------------------------------------------------------------------------- + +'use strict' + +var directives = angular.module('osee.directive', []); + +directives.directive('osee', [ + '$rootScope', + '$compile', + '$http', + '$location', + '$templateCache', + 'AccessToken', + 'Profile', + 'Endpoint', + '$localStorage', + '$sessionStorage', + function($rootScope, $compile, $http, $location, $templateCache, AccessToken, Profile, Endpoint, $localStorage, $sessionStorage) { + var definition = { + restrict : 'E', + replace : true, + scope : { + site : '@', + redirectUri : '@', + links : '=' + } + }; + + definition.link = function postLink(scope, element, attrs, controller) { + scope.$watch('client', function(value) { + init(); // sets defaults + compile(); // compiles the desired + }); + + var init = function() { + scope.anonymousUser = { + email : 'anonymous@anonymous.com', + name : 'Anonymous' + }; + scope.profileUri ="/accounts/self"; + scope.show = 'none'; + scope.template = '/libs/js/oseeAuth/views/header.html'; + scope.profile = scope.anonymousUser; + + scope.getNgClass = function(link) { + var toReturn = { + active : scope.isActive(link) + }; + return toReturn; + } + + scope.isActive = function(viewLocation) { + var toCompare = "/" + viewLocation.ref; + return toCompare === $location.path(); + }; + } + + var compile = function() { + $http.get(scope.template, { + cache : $templateCache + }).success(function(html) { + element.html(html); + $compile(element.contents())(scope); + }); + }; + + // Stop user from bring up a view other than "home" if they're not logged in + // Either the page is initialized with a path other than home (case 1) or user tried to change the view (case 2) + // case 1 + // Check if we're coming from a redirect from Oauth + if($location.absUrl().indexOf('#!#') > -1){ + scope.paramMap = {}; + var splitted = $location.absUrl().split('#!#'); + var queryParams = splitted[1]; + + if(queryParams ) + var params = queryParams.split('&'); + + + for(var i = 0 ; i < params.length; i++) { + var paramPair = params[i].split('='); + scope.paramMap[paramPair[0]] = decodeURIComponent(paramPair[1] || ''); + } + } else if(!$sessionStorage.token) { + // If we're not coming from an oAuth redirect check if the user is trying to access anything other than the home page of the application + var continueTo = $location.path(); + if(continueTo.match("(^$|^\/$|^/index.html)")) { + // Do nothing + } else { + $localStorage.continueTo = $location.path(); + $sessionStorage.needToLogin = true; + } + } + + // case 2 router event + $rootScope.$on('$routeChangeStart', function(event, next, current) { + if (!$sessionStorage.token) { + var nextRoute = next.$$route; + // route to default page + if(nextRoute === undefined) { + // Do nothing + } else if(nextRoute.originalPath.match("^\/$") ||(nextRoute.redirectTo && nextRoute.redirectTo.match("^\/$"))) { + // Do nothing + } else { + // save the view they wanted to get to + $localStorage.continueTo = $location.path(); + $sessionStorage.needToLogin = true; + if(Endpoint.get()) { + delete $sessionStorage.needToLogin; + Endpoint.redirect(); + } //else watch Endpoint.get() and kickoff login once it's populated + } + } + }); + + // Have to wait for Endpoint url to get populated + scope.$watch(function() { + return Endpoint.get() + }, function() { + if($sessionStorage.needToLogin && !(Endpoint.get() === undefined)) { + // Kick off oauth flow which will prompt login + delete $sessionStorage.needToLogin; + Endpoint.redirect(); + } + }); + // END + + scope.$on("oauth:authorized", function(event, token) { + Profile.find(scope.profileUri).success(function(response) { + scope.profile = response + }); + if($localStorage.continueTo) { + // Change the state to the continueTo we caught when User first tried to get into page + $location.path($localStorage.continueTo); + delete $localStorage.continueTo; + } + }) + scope.$on("oauth:logout", function() { + AccessToken.destroy(); + scope.profile = scope.anonymousUser; + $location.path("/"); + }) + scope.$on("oauth:denied", function(event, token) { + scope.profile = scope.anonymousUser; + AccessToken.destroy(); + }); + + } + + return definition; + + } ]);
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.web.ui/src/libs/js/oseeAuth/views/default.html b/plugins/org.eclipse.osee.web.ui/src/libs/js/oseeAuth/views/default.html new file mode 100644 index 00000000000..9fbb0a1aa92 --- /dev/null +++ b/plugins/org.eclipse.osee.web.ui/src/libs/js/oseeAuth/views/default.html @@ -0,0 +1,16 @@ +<div> + <ul class="nav navbar-nav navbar-right"> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">{{ $parent.profile.name }}<span class="caret"></span></a> + <ul class="dropdown-menu" role="menu"> + <li><a href="#" ng-show="show=='logged-out'" ng-click="login()"><span class="glyphicon glyphicon-pencil"></span>Sign In</a></li> + <li><a href="#" ng-show="show=='denied'" ng-click="login()"><span class="glyphicon glyphicon-ban-circle"></span>Access denied. Try again.</a></li> + <li><a href="#" ng-show="show=='logged-out'" ng-click="$parent.createAccount()"><span class="glyphicon glyphicon-list-alt"></span>Create Account</a></li> + <li><a href="#" ng-show="show=='logged-in'" ng-click="$parent.gotoAccount()"><span class="glyphicon glyphicon-user"></span>Profile</a></li> + <li><a href="#" ng-click="$parent.gotoSettings()"><span class="glyphicon glyphicon-cog"></span>Settings</a></li> + <li class="divider" ng-show="show=='logged-in'"></li> + <li ng-show="show=='logged-in'" ng-click="logout()"><a href="#"><span class="glyphicon glyphicon-off"></span>Logout</a></li> + </ul> + </li> + </ul> +</div>
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.web.ui/src/libs/js/oseeAuth/views/header.html b/plugins/org.eclipse.osee.web.ui/src/libs/js/oseeAuth/views/header.html new file mode 100644 index 00000000000..3999daf5b4a --- /dev/null +++ b/plugins/org.eclipse.osee.web.ui/src/libs/js/oseeAuth/views/header.html @@ -0,0 +1,26 @@ +<nav class="navbar navbar-default"> + <div class="container-fluid"> + <!-- Brand and toggle get grouped for better mobile display --> + <div class="navbar-header"> + <a class="navbar-brand brand-image" href="#"> + <img alt="OSEE" src="/libs/images/osee_32x32.png" /> + </a> + </div> + <!-- Collect the nav links, forms, and other content for toggling --> + <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> + <ul class="nav navbar-nav"> + <li ng-repeat="link in links" ng-class='getNgClass(link)'><a href='{{ link.ref }}'>{{ link.name }}</a></li> + </ul> + <oauth class="ng-isolate-scope" site='{{ site }}' + client-id="b48d7a3462f66a42718ce3c914a2519" + redirect-uri='{{ redirectUri }}' + scope="public" + template="/libs/js/oseeAuth/views/default.html" + authorize-path="/oauth2/authorize-implicit" + response-type="token"> + </oauth> + </div> + <!-- /.navbar-collapse --> + </div> + <!-- /.container-fluid --> +</nav>
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.web.ui/src/libs/js/support/linkRewrite.js b/plugins/org.eclipse.osee.web.ui/src/libs/js/support/linkRewrite.js new file mode 100644 index 00000000000..bb30c00f1b0 --- /dev/null +++ b/plugins/org.eclipse.osee.web.ui/src/libs/js/support/linkRewrite.js @@ -0,0 +1,30 @@ +(function(window,angular) +{ + 'use strict'; + + var module; + + module = angular.module('aLinkRewrite',[]); + module.config + ( + [ + '$provide','$locationProvider', + function (p,lp) + { // (decorator is undocumented... *sigh*) + p.decorator( // decorate the + '$sniffer', // sniffer service + [ + '$delegate', // obtain a delegate object to modify the sniffer + function(d) // which we will call 'd' + { + d.history = false; // tell angular that we don't have html5 history capabilities + return d; + } + ] + ); + + lp.html5Mode(true).hashPrefix('!'); // HTML5 mode + } + ] + ).run(['$location',function($location){}]); // inject $location into the browser +})(window,window.angular);
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.web.ui/src/osee/js/oseeApp.js b/plugins/org.eclipse.osee.web.ui/src/osee/js/oseeApp.js new file mode 100644 index 00000000000..f372f43d849 --- /dev/null +++ b/plugins/org.eclipse.osee.web.ui/src/osee/js/oseeApp.js @@ -0,0 +1,26 @@ +var app = angular.module('oseeApp', ['oauth', 'oseeProvider', 'ngRoute', 'aLinkRewrite']); + ++app.config(['$routeProvider', + function($routeProvider) { + + $routeProvider.when('/', { + templateUrl: '../views/home.html', + controller: 'indexController' + }).when('/wiki', { + templateUrl: '../views/wiki.html', + controller: 'indexController' + }).when('/about', { + templateUrl: '../views/about.html', + controller: 'indexController' + }).when('/contactUs', { + templateUrl: '../views/contactUs.html', + controller: 'indexController' + }).when('/redirect', { + templateUrl: '../views/home.html', + controller: 'indexController' + }) + .otherwise({ + redirectTo: "/" + }); + } + ]);
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.web.ui/src/osee/ui/index.html b/plugins/org.eclipse.osee.web.ui/src/osee/ui/index.html new file mode 100644 index 00000000000..6a5bf7e8dcf --- /dev/null +++ b/plugins/org.eclipse.osee.web.ui/src/osee/ui/index.html @@ -0,0 +1,44 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <base href="/osee/ui/index.html"> + <meta charset="UTF-8"> + </meta> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + </meta> + <meta name="viewport" content="width=device-width, initial-scale=1"> + </meta> + <link rel="stylesheet" href="/ajax/libs/bootstrap/3.3.2/css/bootstrap.min.css"> + </link> + <script src="/ajax/libs/jquery/2.1.3/jquery.min.js"></script> + <script src="/ajax/libs/angularjs/1.3.11/angular.js"></script> + <script src="/ajax/libs/angularjs/1.3.11/angular-route.min.js"></script> + <script src="/ajax/libs/angularjs/1.3.11/angular-resource.min.js"></script> + <script src="/ajax/libs/bootstrap/3.3.2/js/bootstrap.min.js"></script> + <script src="/ajax/libs/ui-bootstrap/0.12.0/ui-bootstrap-tpls-0.12.0.min.js"></script> + <script src="/ajax/libs/ngStorage/0.3.0/ngStorage.min.js"></script> + <script src="/ajax/libs/oauth-ng/0.3.8/oauth-ng.js"></script> + <script src="/libs/js/oseeAuth/oseeAuth.js"></script> + <script src="/libs/js/support/linkRewrite.js"></script> + <script src="../js/oseeApp.js"></script> + <link rel="icon" type="image/x-icon" href="images/osee.ico" /> + <link rel="shortcut icon" type="image/x-icon" href="/libs/images/osee.ico" /> + <title>OSEE</title> + </head> + <body ng-app="oseeApp"> + <div ng-controller="indexController"> + <osee + redirect-uri="../osee/ui/index.html" + links="links"> + </osee> + </div> + <div ng-view></div> + </body> + <script> + app.controller("indexController", [ + "$scope", '$location', '$window', + function($scope, $location, $window) { + $scope.links = [ { ref: '', name: 'Home'}, { ref: 'about', name: 'About'}, { ref: 'wiki', name: 'Wiki'}, { ref: 'contactUs', name: 'Contact Us'}]; + }]); + </script> +</html>
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.web.ui/src/osee/views/about.html b/plugins/org.eclipse.osee.web.ui/src/osee/views/about.html new file mode 100644 index 00000000000..b0efea4c109 --- /dev/null +++ b/plugins/org.eclipse.osee.web.ui/src/osee/views/about.html @@ -0,0 +1 @@ +This is some info about OSEE.
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.web.ui/src/osee/views/contactUs.html b/plugins/org.eclipse.osee.web.ui/src/osee/views/contactUs.html new file mode 100644 index 00000000000..1af8f3f0764 --- /dev/null +++ b/plugins/org.eclipse.osee.web.ui/src/osee/views/contactUs.html @@ -0,0 +1 @@ +Any questions or issues with OSEE please email us at: GRP CEE Support
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.web.ui/src/osee/views/home.html b/plugins/org.eclipse.osee.web.ui/src/osee/views/home.html new file mode 100644 index 00000000000..ef9c080d8c4 --- /dev/null +++ b/plugins/org.eclipse.osee.web.ui/src/osee/views/home.html @@ -0,0 +1 @@ +Welcome To OSEE WEB!
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.web.ui/src/osee/views/wiki.html b/plugins/org.eclipse.osee.web.ui/src/osee/views/wiki.html new file mode 100644 index 00000000000..b85ccf9c7de --- /dev/null +++ b/plugins/org.eclipse.osee.web.ui/src/osee/views/wiki.html @@ -0,0 +1 @@ +Link To <a href="https://wiki.eclipse.org/OSEE">Wiki</a>>
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.x.server.parent/pom.xml b/plugins/org.eclipse.osee.x.server.parent/pom.xml index 997d2df64cb..e8fd3c89ba4 100644 --- a/plugins/org.eclipse.osee.x.server.parent/pom.xml +++ b/plugins/org.eclipse.osee.x.server.parent/pom.xml @@ -29,6 +29,9 @@ <module>../../plugins/org.eclipse.osee.framework.core.server.test</module> <module>../../plugins/org.eclipse.osee.framework.manager.servlet</module> + <module>../../plugins/org.eclipse.osee.web.ui</module> + <!-- <module>../../plugins/org.eclipse.osee.web.ui.test</module> --> + <module>../../features/org.eclipse.osee.x.server.legacy.feature</module> <module>../../features/org.eclipse.osee.x.server.feature</module> |