metron-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nickal...@apache.org
Subject [13/21] metron git commit: METRON-1476 Update to Angular 6.1.3 (sardell via nickwallen) closes apache/metron#1096
Date Tue, 18 Sep 2018 14:54:54 GMT
METRON-1476 Update to Angular 6.1.3 (sardell via nickwallen) closes apache/metron#1096


Project: http://git-wip-us.apache.org/repos/asf/metron/repo
Commit: http://git-wip-us.apache.org/repos/asf/metron/commit/33792c24
Tree: http://git-wip-us.apache.org/repos/asf/metron/tree/33792c24
Diff: http://git-wip-us.apache.org/repos/asf/metron/diff/33792c24

Branch: refs/heads/feature/METRON-1699-create-batch-profiler
Commit: 33792c2411099d530998ee827c2cd5dc7ba5e4a0
Parents: a97e575
Author: sardell <sardell@hortonworks.com>
Authored: Thu Sep 13 15:23:22 2018 -0400
Committer: nickallen <nickallen@apache.org>
Committed: Thu Sep 13 15:23:22 2018 -0400

----------------------------------------------------------------------
 .gitignore                                      |     8 +
 .../docker/rpm-docker/SPECS/metron.spec         |     4 +-
 metron-interface/metron-alerts/.gitignore       |    49 +-
 metron-interface/metron-alerts/.nvmrc           |     1 +
 metron-interface/metron-alerts/README.md        |    16 +-
 metron-interface/metron-alerts/angular-cli.json |    65 -
 metron-interface/metron-alerts/angular.json     |   153 +
 .../metron-alerts/e2e/tsconfig.json             |    17 +-
 metron-interface/metron-alerts/karma.conf.js    |    18 +-
 .../metron-alerts/package-lock.json             | 24238 ++++++++++++-----
 metron-interface/metron-alerts/package.json     |    65 +-
 metron-interface/metron-alerts/pom.xml          |     6 +-
 .../metron-alerts/protractor.conf.js            |    12 +-
 .../scripts/prepend_license_header.sh           |     2 +-
 .../metron-alerts/scripts/start-dev.sh          |     2 +-
 .../scripts/start-server-for-e2e.sh             |     2 +-
 .../alert-details/alert-details.component.ts    |     2 +-
 .../alerts/alerts-list/alerts-list.component.ts |     6 +-
 .../table-view/table-view.component.spec.ts     |    21 +-
 .../table-view/table-view.component.ts          |     2 +-
 .../alerts-list/tree-view/tree-group-data.ts    |     2 +-
 .../tree-view/tree-view.component.spec.ts       |     6 +-
 .../tree-view/tree-view.component.ts            |     2 +-
 .../configure-table.component.ts                |     4 +-
 .../alerts/meta-alerts/meta-alerts.component.ts |     2 +-
 .../saved-searches.component.spec.ts            |     9 +-
 .../saved-searches/saved-searches.component.ts  |     5 +-
 .../metron-alerts/src/app/app-routing.module.ts |     2 +-
 .../metron-alerts/src/app/app.component.spec.ts |     4 +-
 .../metron-alerts/src/app/app.module.ts         |     8 +-
 .../default-headers.interceptor.ts              |    34 +
 .../src/app/login/login.component.spec.ts       |     4 +-
 .../metron-alerts/src/app/model/rest-error.ts   |     4 +-
 .../pcap/pcap-filters/pcap-filters.component.ts |     5 +-
 .../pcap-panel/pcap-panel.component.spec.ts     |     9 +-
 .../app/pcap/pcap-panel/pcap-panel.component.ts |     4 +-
 .../metron-alerts/src/app/pcap/pcap.module.ts   |    14 +-
 .../src/app/pcap/service/pcap.service.spec.ts   |   236 +-
 .../src/app/pcap/service/pcap.service.ts        |   115 +-
 .../src/app/service/alerts.service.ts           |    17 +-
 .../src/app/service/authentication.service.ts   |    44 +-
 .../src/app/service/cluster-metadata.service.ts |     9 +-
 .../src/app/service/column-names.service.ts     |     6 +-
 .../src/app/service/configure-table.service.ts  |     8 +-
 .../src/app/service/data-source.ts              |     7 +-
 .../service/elasticsearch-localstorage-impl.ts  |    36 +-
 .../src/app/service/global-config.service.ts    |    21 +-
 .../src/app/service/meta-alert.service.ts       |    43 +-
 .../src/app/service/save-search.service.ts      |     8 +-
 .../src/app/service/search.service.ts           |    54 +-
 .../src/app/service/update.service.ts           |    41 +-
 .../metron-alerts/src/app/shared/auth-guard.ts  |     2 +-
 .../metron-alerts/src/app/shared/index.ts       |    18 -
 .../src/app/utils/elasticsearch-utils.ts        |     4 +-
 .../metron-alerts/src/app/utils/httpUtil.ts     |    21 +-
 .../metron-alerts/src/global-shim.ts            |    18 +
 metron-interface/metron-alerts/src/main.ts      |     5 +-
 metron-interface/metron-alerts/src/polyfills.ts |     2 +
 .../metron-alerts/src/tsconfig.app.json         |     3 +
 .../metron-alerts/src/tsconfig.spec.json        |     3 +-
 metron-interface/metron-config/README.md        |     5 +-
 61 files changed, 17563 insertions(+), 7970 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/metron/blob/33792c24/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 12fd7cd..a0b9691 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,3 +23,11 @@ temp/**
 temp/**/*
 metron-interface/metron-alerts/node/
 repodata/
+
+# IDE - VSCode
+.vscode
+.vscode/*
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json

http://git-wip-us.apache.org/repos/asf/metron/blob/33792c24/metron-deployment/packaging/docker/rpm-docker/SPECS/metron.spec
----------------------------------------------------------------------
diff --git a/metron-deployment/packaging/docker/rpm-docker/SPECS/metron.spec b/metron-deployment/packaging/docker/rpm-docker/SPECS/metron.spec
index 1e63473..fca0949 100644
--- a/metron-deployment/packaging/docker/rpm-docker/SPECS/metron.spec
+++ b/metron-deployment/packaging/docker/rpm-docker/SPECS/metron.spec
@@ -519,7 +519,7 @@ This package installs the Metron Alerts UI %{metron_home}
 %attr(0755,root,root) %{metron_home}/web/expressjs/alerts-server.js
 %attr(0644,root,root) %{metron_home}/web/alerts-ui/favicon.ico
 %attr(0644,root,root) %{metron_home}/web/alerts-ui/index.html
-%attr(0644,root,root) %{metron_home}/web/alerts-ui/*.bundle.css
+%attr(0644,root,root) %{metron_home}/web/alerts-ui/styles.*.css
 %attr(0644,root,root) %{metron_home}/web/alerts-ui/*.js
 %attr(0644,root,root) %{metron_home}/web/alerts-ui/*.ttf
 %attr(0644,root,root) %{metron_home}/web/alerts-ui/*.svg
@@ -546,6 +546,8 @@ chkconfig --del metron-management-ui
 chkconfig --del metron-alerts-ui
 
 %changelog
+* Thu Aug 30 2018 Apache Metron <dev@metron.apache.org> - 0.5.1
+- Update compiled css file name for Alerts UI
 * Thu Feb 1 2018 Apache Metron <dev@metron.apache.org> - 0.4.3
 - Add Solr install script to Solr RPM
 * Tue Sep 25 2017 Apache Metron <dev@metron.apache.org> - 0.4.2

http://git-wip-us.apache.org/repos/asf/metron/blob/33792c24/metron-interface/metron-alerts/.gitignore
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/.gitignore b/metron-interface/metron-alerts/.gitignore
index 703c7a9..2e62490 100644
--- a/metron-interface/metron-alerts/.gitignore
+++ b/metron-interface/metron-alerts/.gitignore
@@ -1,6 +1,45 @@
-# Created by .ignore support plugin (hsz.mobi)
-.idea/
+# See http://help.github.com/ignore-files/ for more about ignoring files.
+
+# compiled output
+/dist
+/dist-server
+/tmp
+/out-tsc
+
+# dependencies
+/node_modules
+
+# IDEs and editors
+/.idea
+.project
+.classpath
+.c9/
+*.launch
+.settings/
+*.sublime-workspace
+
+# IDE - VSCode
+.vscode/*
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
+
+# misc
+/.sass-cache
+/connect.lock
+/coverage
+/libpeerconnection.log
 metron-alerts.iml
-node_modules/
-/dist/
-coverage
+npm-debug.log
+yarn-error.log
+testem.log
+/typings
+
+# e2e
+/e2e/*.js
+/e2e/*.map
+
+# System Files
+.DS_Store
+Thumbs.db

http://git-wip-us.apache.org/repos/asf/metron/blob/33792c24/metron-interface/metron-alerts/.nvmrc
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/.nvmrc b/metron-interface/metron-alerts/.nvmrc
new file mode 100644
index 0000000..0a7b8bc
--- /dev/null
+++ b/metron-interface/metron-alerts/.nvmrc
@@ -0,0 +1 @@
+v9.11.1

http://git-wip-us.apache.org/repos/asf/metron/blob/33792c24/metron-interface/metron-alerts/README.md
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/README.md b/metron-interface/metron-alerts/README.md
index 528878c..9699903 100644
--- a/metron-interface/metron-alerts/README.md
+++ b/metron-interface/metron-alerts/README.md
@@ -44,8 +44,8 @@ Alerts that are contained in a a meta alert are generally excluded from
search r
 * Elasticsearch or Solr should have some alerts populated by Metron topologies, depending
on which real-time store is enabled
 * The Management UI should be installed (which includes [Express](https://expressjs.com/))
 * The alerts can be populated using Full Dev or any other setup
-* UI is developed using angular4 and uses angular-cli
-* node.JS >= 7.8.0
+* UI is developed using Angular 6 and uses Angular CLI. 
+* nvm (or a similar node verison manager) should be installed. The node version required
for this project is listed in the [.nvmrc](https://github.com/creationix/nvm#nvmrc) file.
 
 ## Installation
 
@@ -122,11 +122,19 @@ The application will be available at http://host:4201 assuming the port
is set t
 
 ## Development Setup
 
-1. Install all the dependent node_modules using the following command
+1. Switch to the correct node version and install all the dependent node_modules using the
following commands
     ```
     cd metron/metron-interface/metron-alerts
-    npm install
+    nvm use
+    npm ci
     ```
+
+    You're probably wondering why we use the `ci` command instead of `install`. By design,
`npm install` will change the lock file every time it is ran. This happens whether or not
dependencies have a new release or not because `npm install` still updates a unique identifier
within the lock file.
+
+    To prevent the lock file from being changed, run the `ci` command. This installs the
modules listed in the lock file without updating it. The only case when you should run `npm
install` is when you want to add a new dependency to the application. You can update dependencies
with the `npm update` command.
+
+    `nvm use` will ensure your local node version matches the one specified in the `.nvmrc`
file. It doesn't necessarily mean that you'll have an npm version installed which includes
the `ci` command. Make sure you have the latest npm version which comes with the `ci` command.
+
 1. UI can be run by using the following command
     ```
     ./scripts/start-dev.sh

http://git-wip-us.apache.org/repos/asf/metron/blob/33792c24/metron-interface/metron-alerts/angular-cli.json
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/angular-cli.json b/metron-interface/metron-alerts/angular-cli.json
deleted file mode 100644
index 833a778..0000000
--- a/metron-interface/metron-alerts/angular-cli.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
-  "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
-  "project": {
-    "name": "metron-alerts"
-  },
-  "apps": [
-    {
-      "root": "src",
-      "outDir": "dist",
-      "assets": [
-        "assets",
-        "favicon.ico"
-      ],
-      "index": "index.html",
-      "main": "main.ts",
-      "polyfills": "polyfills.ts",
-      "test": "test.ts",
-      "tsconfig": "tsconfig.app.json",
-      "testTsconfig": "tsconfig.spec.json",
-      "prefix": "app",
-      "styles": [
-        "../node_modules/font-awesome/css/font-awesome.css",
-        "../node_modules/dragula/dist/dragula.css",
-        "vendor.scss",
-        "styles.scss"
-      ],
-      "scripts": [
-        "../node_modules/jquery/dist/jquery.js",
-        "../node_modules/tether/dist/js/tether.js",
-        "../node_modules/ace-builds/src-noconflict/ace.js"
-      ],
-      "environmentSource": "environments/environment.ts",
-      "environments": {
-        "dev": "environments/environment.ts",
-        "prod": "environments/environment.prod.ts",
-        "e2e": "environments/environment.e2e.ts"
-      }
-    }
-  ],
-  "e2e": {
-    "protractor": {
-      "config": "./protractor.conf.js"
-    }
-  },
-  "lint": [
-    {
-      "project": "src/tsconfig.app.json"
-    },
-    {
-      "project": "src/tsconfig.spec.json"
-    },
-    {
-      "project": "e2e/tsconfig.e2e.json"
-    }
-  ],
-  "test": {
-    "karma": {
-      "config": "./karma.conf.js"
-    }
-  },
-  "defaults": {
-    "styleExt": "scss",
-    "component": {}
-  }
-}

http://git-wip-us.apache.org/repos/asf/metron/blob/33792c24/metron-interface/metron-alerts/angular.json
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/angular.json b/metron-interface/metron-alerts/angular.json
new file mode 100644
index 0000000..0cad417
--- /dev/null
+++ b/metron-interface/metron-alerts/angular.json
@@ -0,0 +1,153 @@
+{
+  "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
+  "version": 1,
+  "newProjectRoot": "projects",
+  "projects": {
+    "metron-alerts": {
+      "root": "",
+      "sourceRoot": "src",
+      "projectType": "application",
+      "architect": {
+        "build": {
+          "builder": "@angular-devkit/build-angular:browser",
+          "options": {
+            "outputPath": "dist",
+            "index": "src/index.html",
+            "main": "src/main.ts",
+            "tsConfig": "src/tsconfig.app.json",
+            "polyfills": "src/polyfills.ts",
+            "assets": [
+              "src/assets",
+              "src/favicon.ico"
+            ],
+            "styles": [
+              "node_modules/font-awesome/css/font-awesome.css",
+              "node_modules/dragula/dist/dragula.css",
+              "src/vendor.scss",
+              "src/styles.scss"
+            ],
+            "scripts": [
+              "node_modules/jquery/dist/jquery.js",
+              "node_modules/tether/dist/js/tether.js",
+              "node_modules/ace-builds/src-noconflict/ace.js"
+            ]
+          },
+          "configurations": {
+            "production": {
+              "optimization": true,
+              "outputHashing": "all",
+              "sourceMap": false,
+              "extractCss": true,
+              "namedChunks": false,
+              "aot": true,
+              "extractLicenses": true,
+              "vendorChunk": false,
+              "buildOptimizer": true,
+              "fileReplacements": [
+                {
+                  "replace": "src/environments/environment.ts",
+                  "with": "src/environments/environment.prod.ts"
+                }
+              ]
+            },
+            "e2e": {
+              "fileReplacements": [
+                {
+                  "replace": "src/environments/environment.ts",
+                  "with": "src/environments/environment.e2e.ts"
+                }
+              ]
+            }
+          }
+        },
+        "serve": {
+          "builder": "@angular-devkit/build-angular:dev-server",
+          "options": {
+            "browserTarget": "metron-alerts:build"
+          },
+          "configurations": {
+            "production": {
+              "browserTarget": "metron-alerts:build:production"
+            },
+            "e2e": {
+              "browserTarget": "metron-alerts:build:e2e"
+            }
+          }
+        },
+        "extract-i18n": {
+          "builder": "@angular-devkit/build-angular:extract-i18n",
+          "options": {
+            "browserTarget": "metron-alerts:build"
+          }
+        },
+        "test": {
+          "builder": "@angular-devkit/build-angular:karma",
+          "options": {
+            "main": "src/test.ts",
+            "karmaConfig": "./karma.conf.js",
+            "polyfills": "src/polyfills.ts",
+            "tsConfig": "src/tsconfig.spec.json",
+            "scripts": [
+              "node_modules/jquery/dist/jquery.js",
+              "node_modules/tether/dist/js/tether.js",
+              "node_modules/ace-builds/src-noconflict/ace.js"
+            ],
+            "styles": [
+              "node_modules/font-awesome/css/font-awesome.css",
+              "node_modules/dragula/dist/dragula.css",
+              "src/vendor.scss",
+              "src/styles.scss"
+            ],
+            "assets": [
+              "src/assets",
+              "src/favicon.ico"
+            ]
+          }
+        },
+        "lint": {
+          "builder": "@angular-devkit/build-angular:tslint",
+          "options": {
+            "tsConfig": [
+              "src/tsconfig.app.json",
+              "src/tsconfig.spec.json"
+            ],
+            "exclude": []
+          }
+        }
+      }
+    },
+    "metron-alerts-e2e": {
+      "root": "",
+      "sourceRoot": "e2e",
+      "projectType": "application",
+      "architect": {
+        "e2e": {
+          "builder": "@angular-devkit/build-angular:protractor",
+          "options": {
+            "protractorConfig": "./protractor.conf.js",
+            "devServerTarget": "metron-alerts:serve"
+          }
+        },
+        "lint": {
+          "builder": "@angular-devkit/build-angular:tslint",
+          "options": {
+            "tsConfig": [
+              "e2e/tsconfig.e2e.json"
+            ],
+            "exclude": []
+          }
+        }
+      }
+    }
+  },
+  "defaultProject": "metron-alerts",
+  "schematics": {
+    "@schematics/angular:component": {
+      "prefix": "app",
+      "styleext": "scss"
+    },
+    "@schematics/angular:directive": {
+      "prefix": "app"
+    }
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/metron/blob/33792c24/metron-interface/metron-alerts/e2e/tsconfig.json
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/e2e/tsconfig.json b/metron-interface/metron-alerts/e2e/tsconfig.json
index 656bdb1..74c2bca 100644
--- a/metron-interface/metron-alerts/e2e/tsconfig.json
+++ b/metron-interface/metron-alerts/e2e/tsconfig.json
@@ -1,16 +1,19 @@
 {
-  "compileOnSave": false,
   "compilerOptions": {
+    "sourceMap": true,
     "declaration": false,
+    "moduleResolution": "node",
     "emitDecoratorMetadata": true,
     "experimentalDecorators": true,
-    "module": "commonjs",
-    "moduleResolution": "node",
+    "lib": [
+      "es2016"
+    ],
     "outDir": "../dist/out-tsc-e2e",
-    "sourceMap": true,
-    "target": "es5",
-    "typeRoots": [
-      "../node_modules/@types"
+    "module": "commonjs",
+    "target": "es6",
+    "types":[
+      "jasmine",
+      "node"
     ]
   }
 }

http://git-wip-us.apache.org/repos/asf/metron/blob/33792c24/metron-interface/metron-alerts/karma.conf.js
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/karma.conf.js b/metron-interface/metron-alerts/karma.conf.js
index 7f29c92..c17fbe3 100644
--- a/metron-interface/metron-alerts/karma.conf.js
+++ b/metron-interface/metron-alerts/karma.conf.js
@@ -23,33 +23,35 @@ process.env.CHROME_BIN = require('puppeteer').executablePath()
 module.exports = function (config) {
   config.set({
     basePath: '',
-    frameworks: ['jasmine', '@angular/cli'],
+    frameworks: ['jasmine', '@angular-devkit/build-angular'],
     plugins: [
       require('karma-jasmine'),
       require('karma-chrome-launcher'),
       require('karma-jasmine-html-reporter'),
       require('karma-coverage-istanbul-reporter'),
-      require('@angular/cli/plugins/karma')
+      require('@angular-devkit/build-angular/plugins/karma')
     ],
     client:{
       clearContext: false // leave Jasmine Spec Runner output visible in browser
     },
     files: [
-      { pattern: './src/test.ts', watched: false }
+
     ],
     preprocessors: {
-      './src/test.ts': ['@angular/cli']
+
     },
     mime: {
       'text/x-typescript': ['ts','tsx']
     },
     coverageIstanbulReporter: {
-      reports: [ 'html', 'lcovonly', 'text-summary' ],
+      dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly', 'text-summary'
],
       fixWebpackSourcePaths: true
     },
-    angularCli: {
-      environment: 'dev'
-    },
+    captureTimeout: 30000,
+    browserDisconnectTolerance: 3,
+    browserDisconnectTimeout : 30000,
+    browserNoActivityTimeout : 30000,
+
     reporters: config.angularCli && config.angularCli.codeCoverage
       ? ['progress', 'coverage-istanbul']
       : ['progress', 'kjhtml'],


Mime
View raw message