diff options
author | AvinashS <avinash.s@huawei.com> | 2017-08-30 18:39:12 +0530 |
---|---|---|
committer | AvinashS <avinash.s@huawei.com> | 2017-08-31 11:35:26 +0530 |
commit | 8e30fbf41dabee082aafb60fe0639b504497674d (patch) | |
tree | 5b715fa6a11f770f59af4ba6f474b558a85156a3 /alarm-analysis/src/main/webapp/config | |
parent | 31dfadf9c4cb7ef2cc0f1af625bc9bd0097f0d94 (diff) |
vnfsdk market place seed code refactoring
cleanup the package names and a test file
correction
Change-Id: Icc5a3b48189824dfe5cb84f05ce2c496bcfa3eab
IssueId: VNFSDK-74
Signed-off-by: AvinashS <avinash.s@huawei.com>
Diffstat (limited to 'alarm-analysis/src/main/webapp/config')
-rw-r--r-- | alarm-analysis/src/main/webapp/config/helpers.js | 21 | ||||
-rw-r--r-- | alarm-analysis/src/main/webapp/config/karma-test-shim.js | 35 | ||||
-rw-r--r-- | alarm-analysis/src/main/webapp/config/karma.conf.js | 51 | ||||
-rw-r--r-- | alarm-analysis/src/main/webapp/config/webpack.common.js | 115 | ||||
-rw-r--r-- | alarm-analysis/src/main/webapp/config/webpack.dev.js | 153 | ||||
-rw-r--r-- | alarm-analysis/src/main/webapp/config/webpack.prod.js | 109 | ||||
-rw-r--r-- | alarm-analysis/src/main/webapp/config/webpack.test.js | 51 |
7 files changed, 0 insertions, 535 deletions
diff --git a/alarm-analysis/src/main/webapp/config/helpers.js b/alarm-analysis/src/main/webapp/config/helpers.js deleted file mode 100644 index e30af8b3..00000000 --- a/alarm-analysis/src/main/webapp/config/helpers.js +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright 2017 ZTE Corporation.
- *
- *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.
- */
-var path = require('path');
-var _root = path.resolve(__dirname, '..');
-function root(args) {
- args = Array.prototype.slice.call(arguments, 0);
- return path.join.apply(path, [_root].concat(args));
-}
-exports.root = root;
diff --git a/alarm-analysis/src/main/webapp/config/karma-test-shim.js b/alarm-analysis/src/main/webapp/config/karma-test-shim.js deleted file mode 100644 index 3f77315c..00000000 --- a/alarm-analysis/src/main/webapp/config/karma-test-shim.js +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2017 ZTE Corporation.
- *
- *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.
- */
-Error.stackTraceLimit = Infinity;
-
-require('core-js/es6');
-require('reflect-metadata');
-
-require('zone.js/dist/zone');
-require('zone.js/dist/long-stack-trace-zone');
-require('zone.js/dist/proxy');
-require('zone.js/dist/sync-test');
-require('zone.js/dist/jasmine-patch');
-require('zone.js/dist/async-test');
-require('zone.js/dist/fake-async-test');
-
-var appContext = require.context('../alarm', true, /\.spec\.ts/);
-
-appContext.keys().forEach(appContext);
-
-var testing = require('@angular/core/testing');
-var browser = require('@angular/platform-browser-dynamic/testing');
-
-testing.TestBed.initTestEnvironment(browser.BrowserDynamicTestingModule, browser.platformBrowserDynamicTesting());
diff --git a/alarm-analysis/src/main/webapp/config/karma.conf.js b/alarm-analysis/src/main/webapp/config/karma.conf.js deleted file mode 100644 index 0b02ca11..00000000 --- a/alarm-analysis/src/main/webapp/config/karma.conf.js +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright 2017 ZTE Corporation.
- *
- *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.
- */
-var webpackConfig = require('./webpack.test');
-
-module.exports = function (config) {
- var _config = {
- basePath: '',
-
- frameworks: ['jasmine'],
-
- files: [
- {pattern: './config/karma-test-shim.js', watched: false}
- ],
-
- preprocessors: {
- './config/karma-test-shim.js': ['webpack', 'sourcemap']
- },
-
- webpack: webpackConfig,
-
- webpackMiddleware: {
- stats: 'errors-only'
- },
-
- webpackServer: {
- noInfo: true
- },
-
- reporters: ['progress'],
- port: 9876,
- colors: true,
- logLevel: config.LOG_INFO,
- autoWatch: false,
- browsers: ['PhantomJS'],
- singleRun: true
- };
-
- config.set(_config);
-};
diff --git a/alarm-analysis/src/main/webapp/config/webpack.common.js b/alarm-analysis/src/main/webapp/config/webpack.common.js deleted file mode 100644 index 642e1664..00000000 --- a/alarm-analysis/src/main/webapp/config/webpack.common.js +++ /dev/null @@ -1,115 +0,0 @@ -/* Copyright 2017 ZTE Corporation.
- *
- *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.
- */
-const ContextReplacementPlugin = require('webpack/lib/ContextReplacementPlugin');
-const CheckerPlugin = require('awesome-typescript-loader').CheckerPlugin;
-const CopyWebpackPlugin = require('copy-webpack-plugin');
-const HtmlWebpackPlugin = require('html-webpack-plugin');
-const LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin');
-
-const webpack = require('webpack');
-const helpers = require('./helpers');
-const path = require('path');
-
-
-
-
-
-module.exports = {
- entry: {
- 'main': './alarm/main.browser.ts',
- 'vendor': './alarm/vendor.ts',
- 'polyfills': './alarm/polyfills.browser.ts'
- },
- resolve: {
-
- extensions: ['.js', '.ts', '.json'],
- },
- module: {
-
- rules: [
- {
- test: /\.ts$/,
- use: [
-
- {
- loader: 'awesome-typescript-loader',
- options: {
- }
- },
- {
- loader: 'angular2-template-loader'
- }
- ],
- exclude: [/\.(spec|e2e)\.ts$/]
- },
-
- {
- test: /\.json$/,
- use: 'json-loader'
- },
- {
- test: /\.css$/,
- use: ['to-string-loader', 'css-loader?sourceMap'],
- include: helpers.root('alarm', 'app'),
- exclude: [helpers.root('alarm/assets'), helpers.root('public')]
- },
- {
- test: /\.html$/,
- use: 'raw-loader',
- include: [helpers.root('alarm/app')],
- exclude: [helpers.root('alarm/index.html')]
- },
-
-
- {
- test: /\.(png|jpe?g|gif|ico|svg)$/,
- include: [helpers.root('public')
- ],
- use: 'file-loader?name=assets/images/[name].[hash].[ext]'
- },
-
-
- {
- test: /\.(eot|woff2?|svg|ttf)([\?]?.*)$/,
- include: [helpers.root('public', 'thirdparty')
- ],
- use: 'file-loader?name=assets/fonts/[name].[hash].[ext]'
- }
-
- ],
-
- },
-
- plugins: [
-
- new CheckerPlugin(),
-
- new ContextReplacementPlugin(
- /angular(\\|\/)core(\\|\/)alarm(\\|\/)linker/,
- helpers.root('alarm'),
- {
- }
- ),
-
- new HtmlWebpackPlugin({
- template: 'alarm/index.html',
- }),
-
- new webpack.optimize.CommonsChunkPlugin({
- name: ['main', 'vendor', 'polyfills']
- }),
-
- ]
-};
diff --git a/alarm-analysis/src/main/webapp/config/webpack.dev.js b/alarm-analysis/src/main/webapp/config/webpack.dev.js deleted file mode 100644 index 3028c2d5..00000000 --- a/alarm-analysis/src/main/webapp/config/webpack.dev.js +++ /dev/null @@ -1,153 +0,0 @@ -/* Copyright 2017 ZTE Corporation.
- *
- *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.
- */
-const webpackMerge = require('webpack-merge');
-const commonConfig = require('./webpack.common.js');
-const helpers = require('./helpers');
-
-
-/**
- * Webpack Plugins
- */
-const DefinePlugin = require('webpack/lib/DefinePlugin');
-const ExtractTextPlugin = require('extract-text-webpack-plugin');
-const LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin');
-const CopyWebpackPlugin = require('copy-webpack-plugin');
-
-
-module.exports = webpackMerge(commonConfig, {
-
-
-
-
- devtool: 'source-map',
-
-
-
- output: {
-
-
-
- path: helpers.root('holmes'),
-
-
- filename: '[name].bundle.js',
-
-
- sourceMapFilename: '[name].map',
-
-
- chunkFilename: '[id].chunk.js'
- },
-
-
-
- module: {
-
- rules: [
- {
- test: /\.ts$/,
- use: [
- {
- loader: 'tslint-loader',
- options: {
- configFile: 'tslint.json',
- fileOutput: {
- dir: './foo/',
-
- ext: 'xml',
-
- clean: true,
-
- header: '<?xml version="1.0" encoding="utf-8"?>\n<checkstyle version="5.7">',
-
- footer: '</checkstyle>'
- }
- }
- }
- ],
- exclude: [/\.(spec|e2e)\.ts$/]
- },
-
- {
- test: /\.css$/,
- use: ['to-string-loader', 'style-loader', 'css-loader'],
- include: [helpers.root('alarm/assets'), helpers.root('public')]
- },
-
- ]
-
- },
-
-
-
- plugins: [
-
-
- new CopyWebpackPlugin([
- { from: helpers.root('public/thirdparty/js/jquery_1.12.4.min.js'), to: helpers.root('holmes/public/js') },
- { from: helpers.root('public/common/js/popModal.js'), to: helpers.root('holmes/public/js') },
- { from: helpers.root('public/common/js/jQuery-File-Upload/js/jquery.ui.widget.js'), to: helpers.root('holmes/public/js') },
- { from: helpers.root('public/common/js/jQuery-File-Upload/js/vendor/jquery.ui.widget.js'), to: helpers.root('holmes/public/js') },
- { from: helpers.root('public/common/js/jQuery-File-Upload/js/jquery.iframe-transport.js'), to: helpers.root('holmes/public/js') },
- { from: helpers.root('public/common/js/jQuery-File-Upload/js/jquery.fileupload.js'), to: helpers.root('holmes/public/js') },
- { from: helpers.root('i18n'), to: helpers.root('holmes/i18n') },
- { from: helpers.root('public/thirdparty/images/'), to: helpers.root('holmes/public/thirdparty/images') }
- ]),
-
-
-
- new DefinePlugin({
- VERSION: JSON.stringify('version'),
- CONST2: JSON.stringify('CONST2')
- }),
-
-
- ],
-
-
-
-
-
- devServer: {
-
- port: 9528,
-
- host: '10.74.24.20',
-
- historyApiFallback: true,
-
- inline: true,
-
- progress: true,
-
- colors: true,
-
- watch: false
- },
-
-
- node: {
- global: true,
- console: true,
- crypto: 'empty',
- process: true,
- module: false,
- clearImmediate: false,
- setImmediate: false
- }
-
-
-
-});
diff --git a/alarm-analysis/src/main/webapp/config/webpack.prod.js b/alarm-analysis/src/main/webapp/config/webpack.prod.js deleted file mode 100644 index d6ddc420..00000000 --- a/alarm-analysis/src/main/webapp/config/webpack.prod.js +++ /dev/null @@ -1,109 +0,0 @@ -/* Copyright 2017 ZTE Corporation.
- *
- *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.
- */
-const ExtractTextPlugin = require('extract-text-webpack-plugin');
-const DefinePlugin = require('webpack/lib/DefinePlugin');
-const CopyWebpackPlugin = require('copy-webpack-plugin');
-const UglifyJsPlugin = require('webpack/lib/optimize/UglifyJsPlugin');
-const LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin');
-
-
-const webpack = require('webpack');
-const commonConfig = require('./webpack.common.js');
-const webpackMerge = require('webpack-merge');
-const helpers = require('./helpers');
-
-
-module.exports = webpackMerge(commonConfig, {
-
-
- devtool: 'source-map',
-
-
- output: {
-
- path: helpers.root('holmes'),
-
- filename: '[name].[chunkhash].bundle.js',//'[name].[hash].js',
-
- sourceMapFilename: '[name].[chunkhash].bundle.map',
-
-
- chunkFilename: '[id].[chunkhash].chunk.js'//'[id].[hash].chunk.js'
- },
-
-
-
-
- module: {
-
- rules: [
-
- {
- test: /\.css$/,
- loader: ExtractTextPlugin.extract({
- fallback: 'style-loader',
- use: {
- loader: 'css-loader',
- options: {
- sourceMap: true,
- minimize: true
- }
- }
- }),
- include: [helpers.root('alarm/assets'), helpers.root('public'),helpers.root('alarm/app')]
- },
- ]
-
- },
-
- plugins: [
-
- new webpack.NoErrorsPlugin(),
-
- new webpack.optimize.DedupePlugin(),
-
- new webpack.optimize.UglifyJsPlugin({
- sourceMap: true,
- mangle: {
- keep_fnames: true
- }
- }),
-
-
- new ExtractTextPlugin('[name].[contenthash].css'),
-
- new DefinePlugin({
- 'CONST': true,
- }),
-
-
- new LoaderOptionsPlugin({
- minimize: true,
- debug: false,
- })
- ],
-
-
- node: {
- global: true,
- crypto: 'empty',
- process: false,
- module: false,
- clearImmediate: false,
- setImmediate: false
- }
-
-
-});
diff --git a/alarm-analysis/src/main/webapp/config/webpack.test.js b/alarm-analysis/src/main/webapp/config/webpack.test.js deleted file mode 100644 index 8a4faeef..00000000 --- a/alarm-analysis/src/main/webapp/config/webpack.test.js +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright 2017 ZTE Corporation.
- *
- *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.
- */
-var helpers = require('./helpers');
-
-module.exports = {
- devtool: 'inline-source-map',
-
- resolve: {
- extensions: ['', '.ts', '.js']
- },
-
- module: {
- loaders: [
- {
- test: /\.ts$/,
- loaders: ['awesome-typescript-loader', 'angular2-template-loader']
- },
- {
- test: /\.html$/,
- loader: 'html'
-
- },
- {
- test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/,
- loader: 'null'
- },
- {
- test: /\.css$/,
- exclude: helpers.root('src', 'app'),
- loader: 'null'
- },
- {
- test: /\.css$/,
- include: helpers.root('src', 'app'),
- loader: 'raw'
- }
- ]
- }
-};
|