Skip to content

Commit

Permalink
KNOX-1705 - Integrate gateway-admin-ui into Maven build
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Risden <[email protected]>
  • Loading branch information
risdenk committed Dec 21, 2018
1 parent 89fcabe commit 1d107f2
Show file tree
Hide file tree
Showing 131 changed files with 10,141 additions and 672 deletions.
24 changes: 0 additions & 24 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,34 +37,10 @@ velocity.log
*.py~
*.patch

# ui compiled output
dist
tmp

# ui dependencies
node_modules
bower_components

# other IDEs and editors
.vscode
.c9/
*.launch

# ui misc
.sass-cache
connect.lock
coverage/*
libpeerconnection.log
npm-debug.log
testem.log
typings

# e2e and app
e2e/*.js
e2e/*.map
gateway-admin-ui/src/app/**/*.js
gateway-admin-ui/src/app/**/*.map
gateway-admin-ui/package-lock.json

#System Files
Thumbs.db
24 changes: 0 additions & 24 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -443,28 +443,4 @@ Release build file for the Apache Knox Gateway
<target name="start-test-servers" depends="start-test-ldap,start-test-gateway" description="Start test LDAP and test gateway servers."/>
<target name="stop-test-servers" depends="stop-test-gateway,stop-test-ldap" description="Stop test LDAP server and gateway servers."/>
<target name="restart-test-servers" depends="stop-test-servers,start-test-servers" description="Restart test LDAP and gateway servers."/>

<target name="build-admin-ui" description="Use the 'ng' command to make a production build of the Admin UI project">
<exec executable="ng" dir="gateway-admin-ui">
<arg value="build"/>
<arg value="--prod"/>
</exec>
</target>

<target name="install-test-admin-ui" depends="build-admin-ui" description="Install the Admin UI build into the test gateway home installation">
<delete dir="${install.dir}/${gateway-artifact}-${gateway-version}/data/applications/admin-ui/app/" quiet="true"/>
<mkdir dir="${install.dir}/${gateway-artifact}-${gateway-version}/data/applications/admin-ui/app/"/>
<copy todir="${install.dir}/${gateway-artifact}-${gateway-version}/data/applications/admin-ui/app/">
<fileset dir="gateway-admin-ui/dist"/>
</copy>
<touch file="${install.dir}/${gateway-artifact}-${gateway-version}/conf/topologies/manager.xml"/>
</target>

<target name="promote-admin-ui" depends="build-admin-ui" description="Copy the build artifacts of the admin UI to the applications module for check-in">
<delete dir="gateway-applications/src/main/resources/applications/admin-ui/app/" quiet="true"/>
<mkdir dir="gateway-applications/src/main/resources/applications/admin-ui/app/"/>
<copy todir="gateway-applications/src/main/resources/applications/admin-ui/app/">
<fileset dir="gateway-admin-ui/dist"/>
</copy>
</target>
</project>
11 changes: 11 additions & 0 deletions gateway-admin-ui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# ui dependencies
node_modules
bower_components

# ui misc
.sass-cache
connect.lock
coverage/*
libpeerconnection.log
npm-debug.log
testem.log
56 changes: 18 additions & 38 deletions gateway-admin-ui/README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,26 @@

<!---
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.
--->
# NgKnoxUi

This project was generated with [Angular CLI](https://cli.angular.io/) version 1.6.5.

## Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
Run `./npm run start` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.

## Code scaffolding

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive/pipe/service/class`.

## Build

### Using ant
Run `ant build-admin-ui`

### For direct Angular builds:
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.

## Install (Debug)
Install the Admin UI build into the test gateway home installation

Run `ant install-test-admin-ui`

## Checkin / Release
Copy the build artifacts of the admin UI to the applications module for check-in

Run `ant promote-admin-ui`

## Running unit tests

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Running end-to-end tests

Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
Before running the tests make sure you are serving the app via `ng serve`.

## Deploying to Github Pages

Run `ng github-pages:deploy` to deploy to Github Pages.

## Further help

To get more help on the `angular-cli` use `ng --help` or go check out the [Angular-CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
`mvn package`
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/
import { Component, Injectable, OnInit } from '@angular/core';
import { ResourceTypesService } from '../resourcetypes/resourcetypes.service';
import { ResourceTypesService } from './resourcetypes.service';

@Component({
selector: 'app-resourcetypes',
Expand Down
File renamed without changes.
File renamed without changes.
17 changes: 17 additions & 0 deletions gateway-admin-ui/admin-ui/assets/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
##########################################################################
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##########################################################################
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"baseUrl": "src",
"baseUrl": "admin-ui",
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions gateway-admin-ui/angular-cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
},
"apps": [
{
"root": "src",
"outDir": "dist",
"root": "admin-ui",
"outDir": "target/classes/admin-ui/app",
"assets": [
"assets",
"favicon.ico"
Expand All @@ -21,10 +21,10 @@
"styles.css"
],
"scripts": [
"../node_modules/ace-builds/src-min/ace.js",
"../node_modules/ace-builds/src-min/theme-monokai.js"
"../node_modules/ace-builds/src-min/ace.js",
"../node_modules/ace-builds/src-min/theme-monokai.js"
],
"environmentSource": "environments/environment.ts",
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
Expand Down
14 changes: 0 additions & 14 deletions gateway-admin-ui/e2e/app.e2e-spec.ts

This file was deleted.

11 changes: 0 additions & 11 deletions gateway-admin-ui/e2e/app.po.ts

This file was deleted.

16 changes: 0 additions & 16 deletions gateway-admin-ui/e2e/tsconfig.json

This file was deleted.

43 changes: 0 additions & 43 deletions gateway-admin-ui/karma.conf.js

This file was deleted.

20 changes: 20 additions & 0 deletions gateway-admin-ui/npm
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
#
# 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.

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
PATH="$DIR/target/node/":$PATH
node "$DIR/target/node/node_modules/npm/bin/npm-cli.js" --prefix "$DIR" "$@"
Loading

0 comments on commit 1d107f2

Please sign in to comment.