Skip to content

Commit

Permalink
[pinpoint-apm#4640] Update new UI source
Browse files Browse the repository at this point in the history
  • Loading branch information
denzelsN committed Sep 19, 2018
1 parent 39e2f80 commit 683fea5
Show file tree
Hide file tree
Showing 1,280 changed files with 88,339 additions and 39 deletions.
1,065 changes: 1,051 additions & 14 deletions NOTICE

Large diffs are not rendered by default.

93 changes: 68 additions & 25 deletions web/pom.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
<!--
~ Copyright 2018 NAVER Corp.
~
~ Licensed 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.
-->

<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
Expand Down Expand Up @@ -164,7 +148,7 @@
<artifactId>spring-messaging</artifactId>
<version>${spring.version}</version>
</dependency>

<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
Expand Down Expand Up @@ -372,20 +356,22 @@
<executions>
<execution>
<id>prepare-grunt</id>
<phase>generate-resources</phase>
<goals>
<goal>run</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<target>
<copy todir="${basedir}/target/grunt" failonerror="true" verbose="true">
<fileset dir="${basedir}/src/grunt" />
<fileset dir="${basedir}/src/grunt"/>
</copy>
<copy todir="${basedir}/target/main/webapp" failonerror="true" verbose="true">
<fileset dir="${basedir}/src/main/webapp" />
<fileset dir="${basedir}/src/main/webapp"/>
</copy>
<copy file="${basedir}/src/Gruntfile.js" tofile="${basedir}/target/Gruntfile.js" failonerror="true" verbose="true" />
<copy file="${basedir}/src/package.json" tofile="${basedir}/target/package.json" failonerror="true" verbose="true" />
<copy file="${basedir}/src/Gruntfile.js" tofile="${basedir}/target/Gruntfile.js"
failonerror="true" verbose="true"/>
<copy file="${basedir}/src/package.json" tofile="${basedir}/target/package.json"
failonerror="true" verbose="true"/>
</target>
</configuration>
</execution>
Expand All @@ -394,40 +380,45 @@
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.6</version>
<version>1.5</version>
<configuration>
<workingDirectory>${basedir}/target</workingDirectory>
<srcdir>${basedir}/target/main/webapp</srcdir>
<outputdir>${basedir}/target/main/webapp</outputdir>
<installDirectory>target</installDirectory>
</configuration>
<executions>
<execution>
<id>install node and npm</id>
<phase>prepare-package</phase>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<nodeVersion>v5.11.1</nodeVersion>
<npmVersion>3.9.6</npmVersion>
<workingDirectory>${basedir}/target</workingDirectory>
</configuration>
</execution>
<execution>
<id>npm install</id>
<phase>prepare-package</phase>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>install</arguments>
<workingDirectory>${basedir}/target</workingDirectory>
</configuration>
</execution>
<execution>
<id>grunt build</id>
<phase>prepare-package</phase>
<goals>
<goal>grunt</goal>
</goals>
<configuration>
<arguments>${grunt.build.command}</arguments>
<workingDirectory>${basedir}/target</workingDirectory>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -470,5 +461,57 @@
</plugins>
</build>
</profile>
<profile>
<!-- for ci server -->
<id>v2</id>
<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.5</version>
<configuration>
<installDirectory>target</installDirectory>
</configuration>
<executions>
<execution>
<id>install node and npm v2</id>
<phase>prepare-package</phase>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<nodeVersion>v10.6.0</nodeVersion>
<npmVersion>6.1.0</npmVersion>
<workingDirectory>${basedir}/target/main/webapp/v2</workingDirectory>
</configuration>
</execution>
<execution>
<id>npm install v2</id>
<phase>prepare-package</phase>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>install</arguments>
<workingDirectory>${basedir}/target/main/webapp/v2</workingDirectory>
</configuration>
</execution>
<execution>
<id>npm run build v2</id>
<phase>prepare-package</phase>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
<workingDirectory>${basedir}/target/main/webapp/v2</workingDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
</project>
2 changes: 2 additions & 0 deletions web/src/main/webapp/WEB-INF/rewrite.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
RewriteCond %{REQUEST_URI} ^/v2/(admin|filteredMap|inspector|main|realtime|scatterFullScreenMode|threadDump|transactionDetail|transactionList|transactionView)(/.*)?$
RewriteRule ^/v2/(admin|filteredMap|inspector|main|realtime|scatterFullScreenMode|threadDump|transactionDetail|transactionList|transactionView)(/.*)?$ /v2/index.html
127 changes: 127 additions & 0 deletions web/src/main/webapp/v2/angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 2,
"newProjectRoot": "projects",
"projects": {
"pinpoint": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "pp",
"schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "../../../../target/deploy/v2",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"./node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css",
"./node_modules/ag-grid/dist/styles/ag-grid.css",
"./node_modules/ag-grid/dist/styles/ag-theme-balham.css",
"./node_modules/nouislider/distribute/nouislider.css",
"src/styles.css"
],
"scripts": [
"./node_modules/hammerjs/hammer.min.js"
]
},
"configurations": {
"production": {
"fileReplacements": [{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": false
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "pinpoint:build"
},
"configurations": {
"production": {
"browserTarget": "pinpoint:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "pinpoint:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.css"
],
"scripts": [],
"assets": [
"src/favicon.ico",
"src/assets"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**",
"**/src/app/core/components/angular-split/**"
]
}
}
}
},
"pinpoint-e2e": {
"root": "e2e/",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "pinpoint:serve"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "pinpoint"
}
14 changes: 14 additions & 0 deletions web/src/main/webapp/v2/e2e/app.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { NpuPage } from './app.po';

describe('npu App', function() {
let page: NpuPage;

beforeEach(() => {
page = new NpuPage();
});

it('should display message saying app works', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('app works!');
});
});
11 changes: 11 additions & 0 deletions web/src/main/webapp/v2/e2e/app.po.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { browser, element, by } from 'protractor';

export class NpuPage {
navigateTo() {
return browser.get('/');
}

getParagraphText() {
return element(by.css('app-root h1')).getText();
}
}
19 changes: 19 additions & 0 deletions web/src/main/webapp/v2/e2e/tsconfig.e2e.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"compilerOptions": {
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"es2016"
],
"outDir": "../out-tsc/e2e",
"module": "commonjs",
"target": "es5",
"types":[
"jasmine",
"node"
]
}
}
50 changes: 50 additions & 0 deletions web/src/main/webapp/v2/karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/0.13/config/configuration-file.html

module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', 'angular-cli'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-report'),
require('karma-coverage-istanbul-reporter'),
require('@angular/cli/plugins/karma'),
require('karma-html-live-reporter')
],
client: {
clearContext: false
},
files: [
{ pattern: './src/test.ts', watched: false }
],
preprocessors: {
'./src/test.ts': ['@angular/cli']
},
mime: {
'text/x-typescript': ['ts', 'tsx']
},
coverageIstanbulReporter: {
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
angularCli: {
environment: 'dev'
},
reporters: config.angularCli && config.angularCli.codeCoverage
? ['progress', 'live-html', 'converage-istanbul']
: ['progress', 'live-html', 'kjhtml'],
htmlLiveReporter: { // port: 5060
colorScheme: 'jasmine',
defaultTab: 'summary',
focusMode: true
},
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};
Loading

0 comments on commit 683fea5

Please sign in to comment.