aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-ui')
-rw-r--r--catalog-ui/karma.conf.js43
-rw-r--r--catalog-ui/package.json32
-rw-r--r--catalog-ui/pom.xml22
-rw-r--r--catalog-ui/protractor.conf.js32
-rw-r--r--catalog-ui/src/app/view-models/onboard-vendor/onboard-vendor-view-model.ts7
-rw-r--r--catalog-ui/src/app/view-models/onboard-vendor/onboard-vendor-view.html6
-rw-r--r--catalog-ui/src/app/view-models/workspace/workspace-view-model.ts2
-rw-r--r--catalog-ui/src/assets/styles/images/welcome/002.pngbin854953 -> 224306 bytes
-rw-r--r--catalog-ui/src/index.html39
-rw-r--r--catalog-ui/src/main.ts4
-rw-r--r--catalog-ui/webpack.common.js3
-rw-r--r--catalog-ui/webpack.production.js29
12 files changed, 52 insertions, 167 deletions
diff --git a/catalog-ui/karma.conf.js b/catalog-ui/karma.conf.js
deleted file mode 100644
index 1f2613a346..0000000000
--- a/catalog-ui/karma.conf.js
+++ /dev/null
@@ -1,43 +0,0 @@
-// 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-remap-istanbul'),
- require('angular-cli/plugins/karma')
- ],
- files: [
- { pattern: './src/test.ts', watched: false }
- ],
- preprocessors: {
- './src/test.ts': ['angular-cli']
- },
- mime: {
- 'text/x-typescript': ['ts','tsx']
- },
- remapIstanbulReporter: {
- reports: {
- html: 'coverage',
- lcovonly: './coverage/coverage.lcov'
- }
- },
- angularCli: {
- config: './angular-cli.json',
- environment: 'dev'
- },
- reporters: config.angularCli && config.angularCli.codeCoverage
- ? ['progress', 'karma-remap-istanbul']
- : ['progress'],
- port: 9876,
- colors: true,
- logLevel: config.LOG_INFO,
- autoWatch: true,
- browsers: ['Chrome'],
- singleRun: false
- });
-};
diff --git a/catalog-ui/package.json b/catalog-ui/package.json
index 4fd1f46734..6e86b46dd0 100644
--- a/catalog-ui/package.json
+++ b/catalog-ui/package.json
@@ -17,18 +17,17 @@
"start": "webpack-dev-server",
"build": "webpack --config webpack.config.js",
"build:prod": "webpack --config webpack.production.js",
- "test": "karma start ./karma.conf.js",
"lint": "ng lint",
- "e2e": "protractor ./protractor.conf.js",
"pree2e": "webdriver-manager update --standalone false --gecko false --quiet"
},
"devDependencies": {
+ "@angular/compiler": "^2.4.8",
+ "@angular/compiler-cli": "^2.4.8",
"apache-server-configs": "^2.7.1",
"autoprefixer": "^6.5.3",
"copy-webpack-plugin": "^4.0.1",
"cors": "2.7.1",
"css-loader": "^0.26.1",
- "cssnano": "^3.10.0",
"exports-loader": "^0.6.3",
"express": "^4.14.0",
"extract-text-webpack-plugin": "^2.1.0",
@@ -36,24 +35,11 @@
"html-loader": "^0.4.5",
"html-webpack-plugin": "^2.28.0",
"http-proxy-middleware": "^0.14.0",
- "istanbul-instrumenter-loader": "^2.0.0",
- "jasmine-core": "2.5.2",
"jshint-stylish": "2.2.1",
"json-loader": "^0.5.4",
- "karma": "1.4.0",
- "karma-chrome-launcher": "0.2.2",
- "karma-coverage": "1.1.1",
- "karma-jasmine": "1.1.0",
- "karma-junit-reporter": "0.3.8",
- "karma-mocha-reporter": "2.2.2",
- "karma-ng-html2js-preprocessor": "1.0.0",
- "karma-ng-scenario": "1.0.0",
- "karma-phantomjs-launcher": "0.2.1",
- "karma-sourcemap-loader": "^0.3.7",
"less": "^2.7.2",
"less-loader": "^2.2.3",
"load-grunt-tasks": "3.5.2",
- "phantomjs": "2.1.7",
"postcss-loader": "^0.13.0",
"postcss-url": "^5.1.2",
"raw-loader": "^0.5.1",
@@ -61,8 +47,6 @@
"script-loader": "^0.7.0",
"source-map-loader": "^0.1.5",
"style-loader": "^0.13.1",
- "stylus-loader": "^2.4.0",
- "time-grunt": "1.4.0",
"url-loader": "^0.5.7",
"webpack-dev-middleware": "^1.10.1",
"webpack-dev-server": "~2.3.0"
@@ -73,8 +57,6 @@
"dependencies": {
"@angular/cli": "^1.0.0-rc.1",
"@angular/common": "^2.4.8",
- "@angular/compiler": "^2.4.8",
- "@angular/compiler-cli": "^2.4.8",
"@angular/core": "^2.4.8",
"@angular/forms": "^2.4.8",
"@angular/http": "^2.4.8",
@@ -113,17 +95,15 @@
"checklist-model": "^0.11.0",
"class-transformer": "^0.1.6",
"clean-webpack-plugin": "^0.1.16",
- "codelyzer": "^2.0.1",
+ "compression": "^1.6.2",
+ "compression-webpack-plugin": "^0.4.0",
"core-js": "^2.4.1",
"cytoscape": "^2.7.15",
"cytoscape.js-undo-redo": "^1.0.1",
- "express": "4.14.0",
"jquery": "^2.2.4",
"jqueryui": "^1.11.1",
"js-md5": "^0.4.2",
"lodash": "^4.17.2",
- "multer": "1.2.1",
- "ng-html2js": "2.0.0",
"ng-infinite-scroll": "^1.3.0",
"ng2-interceptors": "^1.3.0-1",
"perfect-scrollbar": "^0.6.16",
@@ -132,13 +112,11 @@
"restangular": "^1.6.1",
"rxjs": "^5.2.0",
"sdc-angular-dragdrop": "^1.0.14",
- "ts-helpers": "^1.1.2",
- "ts-node": "^2.1.0",
- "tslint": "^4.4.2",
"typescript": "2.3.4",
"typings": "^2.1.0",
"underscore": "^1.8.3",
"webpack": "^2.2.1",
+ "webpack-bundle-analyzer": "^2.8.2",
"webpack-dev-server": "^2.4.1",
"webpack-merge": "^4.0.0",
"zone.js": "^0.7.7"
diff --git a/catalog-ui/pom.xml b/catalog-ui/pom.xml
index 737ed33a41..80d534c669 100644
--- a/catalog-ui/pom.xml
+++ b/catalog-ui/pom.xml
@@ -254,28 +254,6 @@
</profile>
- <profile>
- <id>Fortify</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
-
- <build>
- <plugins>
- <plugin>
- <groupId>com.fortify.ps.maven.plugin</groupId>
- <artifactId>sca-maven-plugin</artifactId>
- <version>4.30</version>
- <configuration>
- <source>1.8</source>
- <buildId>${project.parent.artifactId}</buildId>
- <toplevelArtifactId>${project.parent.artifactId}</toplevelArtifactId>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
-
<profile>
<id>not-minified</id>
<activation>
diff --git a/catalog-ui/protractor.conf.js b/catalog-ui/protractor.conf.js
deleted file mode 100644
index ffded70180..0000000000
--- a/catalog-ui/protractor.conf.js
+++ /dev/null
@@ -1,32 +0,0 @@
-// Protractor configuration file, see link for more information
-// https://github.com/angular/protractor/blob/master/lib/config.ts
-
-/*global jasmine */
-var SpecReporter = require('jasmine-spec-reporter');
-
-exports.config = {
- allScriptsTimeout: 11000,
- specs: [
- './e2e/**/*.e2e-spec.ts'
- ],
- capabilities: {
- 'browserName': 'chrome'
- },
- directConnect: true,
- baseUrl: 'http://localhost:4200/',
- framework: 'jasmine',
- jasmineNodeOpts: {
- showColors: true,
- defaultTimeoutInterval: 30000,
- print: function() {}
- },
- useAllAngular2AppRoots: true,
- beforeLaunch: function() {
- require('ts-node').register({
- project: 'e2e'
- });
- },
- onPrepare: function() {
- jasmine.getEnv().addReporter(new SpecReporter());
- }
-};
diff --git a/catalog-ui/src/app/view-models/onboard-vendor/onboard-vendor-view-model.ts b/catalog-ui/src/app/view-models/onboard-vendor/onboard-vendor-view-model.ts
index 6d4e6d3c68..37b9b9db9c 100644
--- a/catalog-ui/src/app/view-models/onboard-vendor/onboard-vendor-view-model.ts
+++ b/catalog-ui/src/app/view-models/onboard-vendor/onboard-vendor-view-model.ts
@@ -48,6 +48,7 @@ export interface IOnboardVendorViewModelScope extends ng.IScope {
topNavRootMenu:MenuItemGroup;
user:IUserProperties;
version:string;
+ isLoading: boolean;
}
export class OnboardVendorViewModel {
@@ -63,6 +64,12 @@ export class OnboardVendorViewModel {
private $q:ng.IQService,
private cacheService:CacheService) {
+ this.$scope.isLoading = true;
+
+ $.getScript("/onboarding/punch-outs_en.js", () => {
+ this.$scope.isLoading = false;
+ });
+
this.$scope.vendorData = {
breadcrumbs: {
selectedKeys: []
diff --git a/catalog-ui/src/app/view-models/onboard-vendor/onboard-vendor-view.html b/catalog-ui/src/app/view-models/onboard-vendor/onboard-vendor-view.html
index 734fb93daf..56a36863e1 100644
--- a/catalog-ui/src/app/view-models/onboard-vendor/onboard-vendor-view.html
+++ b/catalog-ui/src/app/view-models/onboard-vendor/onboard-vendor-view.html
@@ -1,10 +1,6 @@
<div class="sdc-catalog-container">
- <loader data-display="gui.isLoading"></loader>
-<!--
- <ecomp-header menu-data="menuItems" version="{{version}}"></ecomp-header>
--->
-
+ <loader ng-init="isLoading=true" data-display="isLoading"></loader>
<div class="w-sdc-main-container">
<punch-out name="'onboarding/vendor'" data="vendorData" user="user" on-event="onVendorEvent"></punch-out>
</div>
diff --git a/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts b/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts
index ec8b04dbdb..f529e79fa7 100644
--- a/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts
+++ b/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts
@@ -636,7 +636,7 @@ export class WorkspaceViewModel {
this.$scope.reload = (component:Component):void => {
this.$state.go(this.$state.current.name,{id:component.uniqueId},{reload:true});
};
-
+
};
private initAfterScope = ():void => {
diff --git a/catalog-ui/src/assets/styles/images/welcome/002.png b/catalog-ui/src/assets/styles/images/welcome/002.png
index e76c480ad8..d4fdae694a 100644
--- a/catalog-ui/src/assets/styles/images/welcome/002.png
+++ b/catalog-ui/src/assets/styles/images/welcome/002.png
Binary files differ
diff --git a/catalog-ui/src/index.html b/catalog-ui/src/index.html
index c41532e01c..3a66d4da45 100644
--- a/catalog-ui/src/index.html
+++ b/catalog-ui/src/index.html
@@ -1,26 +1,29 @@
<!doctype html>
<html>
<head>
- <meta charset="utf-8">
- <title>SDC</title>
- <base href="/">
- <meta name="viewport" content="width=device-width, initial-scale=1">
-
- <link rel="icon" type="image/x-icon" href="favicon.ico">
+ <meta charset="utf-8">
+ <title>SDC</title>
+ <base href="/">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+
+ <link rel="icon" type="image/x-icon" href="favicon.ico">
+
</head>
<body data-ng-class="bodyClass">
- <!--<h1>Index.html</h1>-->
- <app-root>Loading...</app-root>
- <!--<h2>Before ui-view</h2>-->
- <div ui-view style="height:100%"></div>
- <!--<h2>After ui-view</h2>-->
- <script type="text/javascript" src="/sdc1/scripts/inline.bundle.js"></script>
- <script type="text/javascript" src="/sdc1/scripts/polyfills.bundle.js"></script>
- <script type="text/javascript" src="/sdc1/scripts/vendor.bundle.js"></script>
- <script type="text/javascript" src="/dcae/dcae-bundle.js"></script>
- <script type="text/javascript" src="/sdc1/scripts/main.bundle.js"></script>
- <script type="text/javascript" src="/sdc1/scripts/styles.bundle.js"></script></body>
- <script type="text/javascript" src="/onboarding/punch-outs_en.js" async></script>
+<!--<h1>Index.html</h1>-->
+<app-root>Loading...</app-root>
+<!--<h2>Before ui-view</h2>-->
+<div ui-view style="height:100%"></div>
+<!--<h2>After ui-view</h2>-->
+<script src="/sdc1/scripts/inline.bundle.js"></script>
+<script src="/sdc1/scripts/polyfills.bundle.js"></script>
+<script src="/sdc1/scripts/vendor.bundle.js"></script>
+<script src="/dcae/dcae-bundle.js" async></script>
+<script id="main-bundle" src="/sdc1/scripts/main.bundle.js"></script>
+<script src="/sdc1/scripts/styles.bundle.js"></script>
+
+</body>
</html>
+
diff --git a/catalog-ui/src/main.ts b/catalog-ui/src/main.ts
index 20e4352901..9d25a34169 100644
--- a/catalog-ui/src/main.ts
+++ b/catalog-ui/src/main.ts
@@ -38,10 +38,10 @@ if (__ENV__==='prod') {
// Ugliy fix because the cookie recieved from webseal change his value after some seconds.
declare var __ENV__: string;
-let timeout:number = 5000;
+let timeout:number = 0;
if (__ENV__==='dev'){
timeout=0;
-}
+}
window.setTimeout(()=>{
platformBrowserDynamic().bootstrapModule(AppModule).then(platformRef => {
const upgrade = platformRef.injector.get(UpgradeModule) as UpgradeModule;
diff --git a/catalog-ui/webpack.common.js b/catalog-ui/webpack.common.js
index fc2f5a4387..4482d0e014 100644
--- a/catalog-ui/webpack.common.js
+++ b/catalog-ui/webpack.common.js
@@ -9,7 +9,7 @@ const postcssUrl = require('postcss-url');
const {GlobCopyWebpackPlugin, BaseHrefWebpackPlugin} = require('@angular/cli/plugins/webpack');
const {CommonsChunkPlugin} = require('webpack').optimize;
const {AotPlugin} = require('@ngtools/webpack');
-
+var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const nodeModules = path.join(process.cwd(), 'node_modules');
const bundledScripts = [
@@ -196,6 +196,7 @@ module.exports = function(params) {
}),
new webpack.NoEmitOnErrorsPlugin(),
new ProgressPlugin(),
+ // new BundleAnalyzerPlugin(),
// new HtmlWebpackPlugin({
// template: "./src/index.html",
// filename: "./index.html",
diff --git a/catalog-ui/webpack.production.js b/catalog-ui/webpack.production.js
index db33a94f3e..a593e37119 100644
--- a/catalog-ui/webpack.production.js
+++ b/catalog-ui/webpack.production.js
@@ -7,20 +7,10 @@ const ServerConfig = require('./webpack.server');
const webpackCommonConfig = require('./webpack.common');
const {GlobCopyWebpackPlugin, BaseHrefWebpackPlugin} = require('@angular/cli/plugins/webpack');
const CopyWebpackPlugin = require('copy-webpack-plugin');
-
+var CompressionPlugin = require('compression-webpack-plugin');
var currentTime = new Date().getTime();
-const params = {
- // entryPoints: [
- // '/sdc1/scripts/inline',
- // '/sdc1/scripts/polyfills',
- // '/sdc1/scripts/vendor',
- // '/sdc1/scripts/main',
- // '/sdc1/scripts/sw-register',
- // '/sdc1/scripts/scripts',
- // '/sdc1/scripts/styles'
- // ]
-};
+const params = {};
const webpackProdConfig = {
module: {
@@ -29,7 +19,7 @@ const webpackProdConfig = {
{
test: /\.(jpg|png|gif|otf|ttf|woff|woff2|cur|ani)$/,
loader: "url-loader?name=/scripts/images/[name].[hash:20].[ext]&limit=10000"
- }
+ }
]
},
output: {
@@ -47,9 +37,10 @@ const webpackProdConfig = {
new CopyWebpackPlugin([
{
from: './src/index.html', transform: function (content, path) {
- content = (content + '').replace(/\.bundle/g, '.' + currentTime + '.bundle');
- return content;
- }
+ content = (content + '').replace(/\.bundle.js/g, '.' + currentTime + '.bundle.jsgz');
+
+ return content;
+ }
}
]),
new webpack.optimize.UglifyJsPlugin({
@@ -63,6 +54,12 @@ const webpackProdConfig = {
screw_ie8: true
},
comments: false
+ }),
+ new webpack.optimize.AggressiveMergingPlugin(),//Merge chunks
+ new CompressionPlugin({
+ asset: "[path]gz",
+ algorithm: "gzip",
+ test: /\.js$|\.css$|\.html$/
})
]
};