[GitHub] metron issue #1096: METRON-1476: Update Angular in Alerts UI
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1096 Reviewed +1 ---
[GitHub] metron pull request #1103: Feature/metron 1554 pcap query panel
GitHub user tiborm opened a pull request: https://github.com/apache/metron/pull/1103 Feature/metron 1554 pcap query panel ## Contributor Comments This PR contains the latest Alert UI changes from Ryan's pcapdemo branch. I cherry picked only the UI related commits. In case of one commit which contained boot UI and back-end changes, I resolved conflicts to keep the java files untouched. But please doublecheck, this PR intended to contain only the latest version of the PCAP UI. ## Pull Request Checklist Thank you for submitting a contribution to Apache Metron. Please refer to our [Development Guidelines](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61332235) for the complete guide to follow for contributions. Please refer also to our [Build Verification Guidelines](https://cwiki.apache.org/confluence/display/METRON/Verifying+Builds?show-miniview) for complete smoke testing guides. In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following: ### For all changes: - [ ] Is there a JIRA ticket associated with this PR? If not one needs to be created at [Metron Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel). - [ ] Does your PR title start with METRON- where is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)? ### For code changes: - [ ] Have you included steps to reproduce the behavior or problem that is being changed or addressed? - [ ] Have you included steps or a guide to how the change may be verified and tested manually? - [ ] Have you ensured that the full suite of tests and checks have been executed in the root metron folder via: ``` mvn -q clean integration-test install && dev-utilities/build-utils/verify_licenses.sh ``` - [ ] Have you written or updated unit tests and or integration tests to verify your changes? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [ ] Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent? ### For documentation related changes: - [ ] Have you ensured that format looks appropriate for the output in which it is rendered by building and verifying the site-book? If not then run the following commands and the verify changes via `site-book/target/site/index.html`: ``` cd site-book mvn site ``` Note: Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible. It is also recommended that [travis-ci](https://travis-ci.org) is set up for your personal repository such that your branches are built there before submitting a pull request. You can merge this pull request into a Git repository by running: $ git pull https://github.com/tiborm/metron feature/METRON-1554-pcap-query-panel Alternatively you can review and apply these changes as the patch at: https://github.com/apache/metron/pull/1103.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1103 commit 872d1b1ee13e358c18956945d71d3667d19fca8a Author: merrimanr Date: 2018-04-12T14:57:48Z Merge branch 'pcap-front' of https://github.com/simonellistonball/metron into pcaprest Conflicts: metron-interface/metron-alerts/src/app/app.module.ts commit b1b6a7dabea1a1d0d132482c8d97af29c0ac2683 Author: merrimanr Date: 2018-04-13T15:00:15Z initial commit Conflicts: metron-interface/metron-rest/src/main/java/org/apache/metron/rest/MetronRestApplication.java metron-interface/metron-rest/src/main/java/org/apache/metron/rest/controller/PcapQueryController.java metron-interface/metron-rest/src/main/java/org/apache/metron/rest/util/pcapQueryThread.java commit 55cf2d945a4fcff1e7e2e47a234037ed6f394b2e Author: merrimanr Date: 2018-04-18T15:52:56Z added license headers ---
[GitHub] metron pull request #1103: METRON-1554: Initial PCAP UI
Github user tiborm closed the pull request at: https://github.com/apache/metron/pull/1103 ---
[GitHub] metron pull request #1103: METRON-1554: Initial PCAP UI
GitHub user tiborm reopened a pull request: https://github.com/apache/metron/pull/1103 METRON-1554: Initial PCAP UI ## Contributor Comments This PR contains the initial cut of PCAP UI. https://user-images.githubusercontent.com/2437400/42747095-28d510bc-88db-11e8-8501-98c82f6ec521.png";> https://user-images.githubusercontent.com/2437400/42747099-2cbd9db6-88db-11e8-8be8-7f2bb2971fe3.png";> ## Pull Request Checklist Thank you for submitting a contribution to Apache Metron. Please refer to our [Development Guidelines](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61332235) for the complete guide to follow for contributions. Please refer also to our [Build Verification Guidelines](https://cwiki.apache.org/confluence/display/METRON/Verifying+Builds?show-miniview) for complete smoke testing guides. In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following: ### For all changes: - [x] Is there a JIRA ticket associated with this PR? If not one needs to be created at [Metron Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel). - [x] Does your PR title start with METRON- where is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [x] Has your PR been rebased against the latest commit within the target branch (typically master)? ### For code changes: - [x] Have you included steps to reproduce the behavior or problem that is being changed or addressed? - [x] Have you included steps or a guide to how the change may be verified and tested manually? - [x] Have you ensured that the full suite of tests and checks have been executed in the root metron folder via: ``` mvn -q clean integration-test install && dev-utilities/build-utils/verify_licenses.sh ``` - [x] Have you written or updated unit tests and or integration tests to verify your changes? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [x] Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent? ### For documentation related changes: - [ ] Have you ensured that format looks appropriate for the output in which it is rendered by building and verifying the site-book? If not then run the following commands and the verify changes via `site-book/target/site/index.html`: ``` cd site-book mvn site ``` Note: Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible. It is also recommended that [travis-ci](https://travis-ci.org) is set up for your personal repository such that your branches are built there before submitting a pull request. You can merge this pull request into a Git repository by running: $ git pull https://github.com/tiborm/metron feature/METRON-1554-pcap-query-panel Alternatively you can review and apply these changes as the patch at: https://github.com/apache/metron/pull/1103.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1103 commit 872d1b1ee13e358c18956945d71d3667d19fca8a Author: merrimanr Date: 2018-04-12T14:57:48Z Merge branch 'pcap-front' of https://github.com/simonellistonball/metron into pcaprest Conflicts: metron-interface/metron-alerts/src/app/app.module.ts commit b1b6a7dabea1a1d0d132482c8d97af29c0ac2683 Author: merrimanr Date: 2018-04-13T15:00:15Z initial commit Conflicts: metron-interface/metron-rest/src/main/java/org/apache/metron/rest/MetronRestApplication.java metron-interface/metron-rest/src/main/java/org/apache/metron/rest/controller/PcapQueryController.java metron-interface/metron-rest/src/main/java/org/apache/metron/rest/util/pcapQueryThread.java commit 55cf2d945a4fcff1e7e2e47a234037ed6f394b2e Author: merrimanr Date: 2018-04-18T15:52:56Z added license headers ---
[GitHub] metron issue #1103: METRON-1671: Initial PCAP UI
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1103 @mmiklavc The 10k+ line spec file is a working unit test which contains mock data as well. Unfortunately, some other unit tests failing in this PR. We already to a separate ticket for fixing and enriching unit tests. @justinleet managed to make UI unit tests part of our Travis build. He opens a PR for that soon. ---
[GitHub] metron issue #1109: METRON-1674: Create REST endpoint for job status abstrac...
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1109 Is it necessary to have /{user}/{jobType}/ in the output url? Right now our UI calling this: /apps/metron/pcap/output/{jobId}/{pageId} On our side, pageId is a simple int at the moment. Is "page-*" at the end of the URL pattern means the service expecting something like "page-5"? ---
[GitHub] metron issue #1109: METRON-1674: Create REST endpoint for job status abstrac...
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1109 I see, thanks. Is there an endpoint for the PDML output? Or it is out of the scope of this PR? ---
[GitHub] metron pull request #1116: METRON-1676: Adding download link for PCAP page f...
GitHub user tiborm opened a pull request: https://github.com/apache/metron/pull/1116 METRON-1676: Adding download link for PCAP page files ## Contributor Comments PR contains the implementation of the PCAP download button. https://user-images.githubusercontent.com/2437400/42957053-cd694afa-8b81-11e8-91d9-48bd63ff9892.png";> The download button refers to and makes a GET request to the page file which selected by the pagination. ## Pull Request Checklist Thank you for submitting a contribution to Apache Metron. Please refer to our [Development Guidelines](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61332235) for the complete guide to follow for contributions. Please refer also to our [Build Verification Guidelines](https://cwiki.apache.org/confluence/display/METRON/Verifying+Builds?show-miniview) for complete smoke testing guides. In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following: ### For all changes: - [ ] Is there a JIRA ticket associated with this PR? If not one needs to be created at [Metron Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel). - [ ] Does your PR title start with METRON- where is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)? ### For code changes: - [ ] Have you included steps to reproduce the behavior or problem that is being changed or addressed? - [ ] Have you included steps or a guide to how the change may be verified and tested manually? - [ ] Have you ensured that the full suite of tests and checks have been executed in the root metron folder via: ``` mvn -q clean integration-test install && dev-utilities/build-utils/verify_licenses.sh ``` - [ ] Have you written or updated unit tests and or integration tests to verify your changes? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [ ] Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent? ### For documentation related changes: - [ ] Have you ensured that format looks appropriate for the output in which it is rendered by building and verifying the site-book? If not then run the following commands and the verify changes via `site-book/target/site/index.html`: ``` cd site-book mvn site ``` Note: Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible. It is also recommended that [travis-ci](https://travis-ci.org) is set up for your personal repository such that your branches are built there before submitting a pull request. You can merge this pull request into a Git repository by running: $ git pull https://github.com/tiborm/metron METRON-1676 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/metron/pull/1116.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1116 commit 872d1b1ee13e358c18956945d71d3667d19fca8a Author: merrimanr Date: 2018-04-12T14:57:48Z Merge branch 'pcap-front' of https://github.com/simonellistonball/metron into pcaprest Conflicts: metron-interface/metron-alerts/src/app/app.module.ts commit b1b6a7dabea1a1d0d132482c8d97af29c0ac2683 Author: merrimanr Date: 2018-04-13T15:00:15Z initial commit Conflicts: metron-interface/metron-rest/src/main/java/org/apache/metron/rest/MetronRestApplication.java metron-interface/metron-rest/src/main/java/org/apache/metron/rest/controller/PcapQueryController.java metron-interface/metron-rest/src/main/java/org/apache/metron/rest/util/pcapQueryThread.java commit 55cf2d945a4fcff1e7e2e47a234037ed6f394b2e Author: merrimanr Date: 2018-04-18T15:52:56Z added license headers commit 70696d047c6ef4b8ce5fcda03588474ff5b2c506 Author: tiborm Date: 2018-07-11T14:58:56Z METRON-1662: adding download button to pcap tab commit 4a83d46259736d8c721fb9f640b6ad522f91a559 Author: tiborm Date: 2018-07-12T07:09:14Z METRON-1662: removing unused function from the first iteration commit 9f57724597240a05d1caeec73882a4ed50aadd9a Author: tiborm Date: 2018-07-12T08:36:15Z METRON-1662: changing download bu
[GitHub] metron pull request #1117: METRON-1676: Adding date range selector to PCAP f...
GitHub user tiborm opened a pull request: https://github.com/apache/metron/pull/1117 METRON-1676: Adding date range selector to PCAP filter bar ## Contributor Comments PR adding the missing date range selector to the PCAP filter bar. https://user-images.githubusercontent.com/2437400/42957374-c71fdbae-8b82-11e8-9338-818ca861f3ca.png";> ## Pull Request Checklist Thank you for submitting a contribution to Apache Metron. Please refer to our [Development Guidelines](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61332235) for the complete guide to follow for contributions. Please refer also to our [Build Verification Guidelines](https://cwiki.apache.org/confluence/display/METRON/Verifying+Builds?show-miniview) for complete smoke testing guides. In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following: ### For all changes: - [ ] Is there a JIRA ticket associated with this PR? If not one needs to be created at [Metron Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel). - [ ] Does your PR title start with METRON- where is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)? ### For code changes: - [ ] Have you included steps to reproduce the behavior or problem that is being changed or addressed? - [ ] Have you included steps or a guide to how the change may be verified and tested manually? - [ ] Have you ensured that the full suite of tests and checks have been executed in the root metron folder via: ``` mvn -q clean integration-test install && dev-utilities/build-utils/verify_licenses.sh ``` - [ ] Have you written or updated unit tests and or integration tests to verify your changes? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [ ] Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent? ### For documentation related changes: - [ ] Have you ensured that format looks appropriate for the output in which it is rendered by building and verifying the site-book? If not then run the following commands and the verify changes via `site-book/target/site/index.html`: ``` cd site-book mvn site ``` Note: Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible. It is also recommended that [travis-ci](https://travis-ci.org) is set up for your personal repository such that your branches are built there before submitting a pull request. You can merge this pull request into a Git repository by running: $ git pull https://github.com/tiborm/metron METRON-1676 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/metron/pull/1117.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1117 commit 165c0e716342d743460123a9de6303178ed32830 Author: merrimanr Date: 2018-06-26T15:18:01Z METRON-1555 Update REST to run YARN and MR jobs (merrimanr) closes apache/metron#1019 commit 4e586ac553daed1eb8322b2bbc4d83fcbdfb89d8 Author: rmerriman Date: 2018-06-26T15:35:55Z Merge branch 'master' into feature/METRON-1554-pcap-query-panel commit 9cee51eb2c428eb7bf3aa791f5ec1293ed36c43a Author: mmiklavc Date: 2018-07-11T01:24:58Z METRON-1641: Enable Pcap jobs to be submitted asynchronously (mmiklavc via mmiklavc) closes apache/metron#1081 commit f30e9cc1fb9b6985e7ad7582c764d035b5cb0e1e Author: Michael Miklavcic Date: 2018-07-11T01:31:56Z Resolve merge conflicts with master. commit 872d1b1ee13e358c18956945d71d3667d19fca8a Author: merrimanr Date: 2018-04-12T14:57:48Z Merge branch 'pcap-front' of https://github.com/simonellistonball/metron into pcaprest Conflicts: metron-interface/metron-alerts/src/app/app.module.ts commit b1b6a7dabea1a1d0d132482c8d97af29c0ac2683 Author: merrimanr Date: 2018-04-13T15:00:15Z initial commit Conflicts: metron-interface/metron-rest/src/main/java/org/apache/metron/rest/MetronRestApplication.java metron-interface/metron-rest/src/main/java/org/apache/metron/rest/controller/PcapQueryController.java metron-interface/metron-rest/src/main/java/org/apache
[GitHub] metron pull request #1116: METRON-1676: Adding download link for PCAP page f...
Github user tiborm closed the pull request at: https://github.com/apache/metron/pull/1116 ---
[GitHub] metron pull request #1117: METRON-1676: Adding date range selector to PCAP f...
Github user tiborm closed the pull request at: https://github.com/apache/metron/pull/1117 ---
[GitHub] metron pull request #1118: Metron 1662
GitHub user tiborm opened a pull request: https://github.com/apache/metron/pull/1118 Metron 1662 ## Contributor Comments PR contains the implementation of the PCAP download button. https://user-images.githubusercontent.com/2437400/42957053-cd694afa-8b81-11e8-91d9-48bd63ff9892.png";> The download button refers to and makes a GET request to the page file which selected by the pagination. ## Pull Request Checklist Thank you for submitting a contribution to Apache Metron. Please refer to our [Development Guidelines](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61332235) for the complete guide to follow for contributions. Please refer also to our [Build Verification Guidelines](https://cwiki.apache.org/confluence/display/METRON/Verifying+Builds?show-miniview) for complete smoke testing guides. In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following: ### For all changes: - [ ] Is there a JIRA ticket associated with this PR? If not one needs to be created at [Metron Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel). - [ ] Does your PR title start with METRON- where is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)? ### For code changes: - [ ] Have you included steps to reproduce the behavior or problem that is being changed or addressed? - [ ] Have you included steps or a guide to how the change may be verified and tested manually? - [ ] Have you ensured that the full suite of tests and checks have been executed in the root metron folder via: ``` mvn -q clean integration-test install && dev-utilities/build-utils/verify_licenses.sh ``` - [ ] Have you written or updated unit tests and or integration tests to verify your changes? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [ ] Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent? ### For documentation related changes: - [ ] Have you ensured that format looks appropriate for the output in which it is rendered by building and verifying the site-book? If not then run the following commands and the verify changes via `site-book/target/site/index.html`: ``` cd site-book mvn site ``` Note: Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible. It is also recommended that [travis-ci](https://travis-ci.org) is set up for your personal repository such that your branches are built there before submitting a pull request. You can merge this pull request into a Git repository by running: $ git pull https://github.com/tiborm/metron METRON-1662 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/metron/pull/1118.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1118 commit 872d1b1ee13e358c18956945d71d3667d19fca8a Author: merrimanr Date: 2018-04-12T14:57:48Z Merge branch 'pcap-front' of https://github.com/simonellistonball/metron into pcaprest Conflicts: metron-interface/metron-alerts/src/app/app.module.ts commit b1b6a7dabea1a1d0d132482c8d97af29c0ac2683 Author: merrimanr Date: 2018-04-13T15:00:15Z initial commit Conflicts: metron-interface/metron-rest/src/main/java/org/apache/metron/rest/MetronRestApplication.java metron-interface/metron-rest/src/main/java/org/apache/metron/rest/controller/PcapQueryController.java metron-interface/metron-rest/src/main/java/org/apache/metron/rest/util/pcapQueryThread.java commit 55cf2d945a4fcff1e7e2e47a234037ed6f394b2e Author: merrimanr Date: 2018-04-18T15:52:56Z added license headers commit 70696d047c6ef4b8ce5fcda03588474ff5b2c506 Author: tiborm Date: 2018-07-11T14:58:56Z METRON-1662: adding download button to pcap tab commit 4a83d46259736d8c721fb9f640b6ad522f91a559 Author: tiborm Date: 2018-07-12T07:09:14Z METRON-1662: removing unused function from the first iteration commit 9f57724597240a05d1caeec73882a4ed50aadd9a Author: tiborm Date: 2018-07-12T08:36:15Z METRON-1662: changing download button label from pdml to pcap commit 49385eeab612d4f02882888f45defe5cca61f0b9 A
[GitHub] metron pull request #1119: METRON-1676: Adding date range selector to PCAP f...
GitHub user tiborm opened a pull request: https://github.com/apache/metron/pull/1119 METRON-1676: Adding date range selector to PCAP filter bar ## Contributor Comments PR adding the missing date range selector to the PCAP filter bar. https://user-images.githubusercontent.com/2437400/42957374-c71fdbae-8b82-11e8-9338-818ca861f3ca.png";>tc.] ## Pull Request Checklist Thank you for submitting a contribution to Apache Metron. Please refer to our [Development Guidelines](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61332235) for the complete guide to follow for contributions. Please refer also to our [Build Verification Guidelines](https://cwiki.apache.org/confluence/display/METRON/Verifying+Builds?show-miniview) for complete smoke testing guides. In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following: ### For all changes: - [ ] Is there a JIRA ticket associated with this PR? If not one needs to be created at [Metron Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel). - [ ] Does your PR title start with METRON- where is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)? ### For code changes: - [ ] Have you included steps to reproduce the behavior or problem that is being changed or addressed? - [ ] Have you included steps or a guide to how the change may be verified and tested manually? - [ ] Have you ensured that the full suite of tests and checks have been executed in the root metron folder via: ``` mvn -q clean integration-test install && dev-utilities/build-utils/verify_licenses.sh ``` - [ ] Have you written or updated unit tests and or integration tests to verify your changes? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [ ] Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent? ### For documentation related changes: - [ ] Have you ensured that format looks appropriate for the output in which it is rendered by building and verifying the site-book? If not then run the following commands and the verify changes via `site-book/target/site/index.html`: ``` cd site-book mvn site ``` Note: Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible. It is also recommended that [travis-ci](https://travis-ci.org) is set up for your personal repository such that your branches are built there before submitting a pull request. You can merge this pull request into a Git repository by running: $ git pull https://github.com/tiborm/metron METRON-1676 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/metron/pull/1119.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1119 commit 872d1b1ee13e358c18956945d71d3667d19fca8a Author: merrimanr Date: 2018-04-12T14:57:48Z Merge branch 'pcap-front' of https://github.com/simonellistonball/metron into pcaprest Conflicts: metron-interface/metron-alerts/src/app/app.module.ts commit b1b6a7dabea1a1d0d132482c8d97af29c0ac2683 Author: merrimanr Date: 2018-04-13T15:00:15Z initial commit Conflicts: metron-interface/metron-rest/src/main/java/org/apache/metron/rest/MetronRestApplication.java metron-interface/metron-rest/src/main/java/org/apache/metron/rest/controller/PcapQueryController.java metron-interface/metron-rest/src/main/java/org/apache/metron/rest/util/pcapQueryThread.java commit 55cf2d945a4fcff1e7e2e47a234037ed6f394b2e Author: merrimanr Date: 2018-04-18T15:52:56Z added license headers commit 70696d047c6ef4b8ce5fcda03588474ff5b2c506 Author: tiborm Date: 2018-07-11T14:58:56Z METRON-1662: adding download button to pcap tab commit 4a83d46259736d8c721fb9f640b6ad522f91a559 Author: tiborm Date: 2018-07-12T07:09:14Z METRON-1662: removing unused function from the first iteration commit 9f57724597240a05d1caeec73882a4ed50aadd9a Author: tiborm Date: 2018-07-12T08:36:15Z METRON-1662: changing download button label from pdml to pcap commit 49385eeab612d4f02882888f45defe5cca61f0b9 Author: tiborm Date: 2018-07-16T15:00:55Z M
[GitHub] metron pull request #1103: METRON-1671: Initial PCAP UI
GitHub user tiborm reopened a pull request: https://github.com/apache/metron/pull/1103 METRON-1671: Initial PCAP UI ## Contributor Comments This PR contains the initial cut of PCAP UI. https://user-images.githubusercontent.com/2437400/42747095-28d510bc-88db-11e8-8501-98c82f6ec521.png";> The user is able to submit a PCAP process job by the search button (magnifier icon) at the top of the page. In the same filter bar User is able to narrow the result set by filtering to the following fields: - IP Source Address - IP Source Port - IP Dest Address - IP Dest Port - Protocol - Include Reverse Traffic - Free text filtering While the PCAP job is in progress a progress bar shows up below the filter bar. (Sorry, having no screenshot about it.) https://user-images.githubusercontent.com/2437400/42747099-2cbd9db6-88db-11e8-8be8-7f2bb2971fe3.png";> The result of the PCAP processing is visualized in a grid. User able to open each record to get access to the details of the packet. # Running tests If you like to run the unit tests run: npm install npm test For addition info please check the readme.md in metron-alerts. ## Pull Request Checklist Thank you for submitting a contribution to Apache Metron. Please refer to our [Development Guidelines](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61332235) for the complete guide to follow for contributions. Please refer also to our [Build Verification Guidelines](https://cwiki.apache.org/confluence/display/METRON/Verifying+Builds?show-miniview) for complete smoke testing guides. In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following: ### For all changes: - [x] Is there a JIRA ticket associated with this PR? If not one needs to be created at [Metron Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel). - [x] Does your PR title start with METRON- where is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [x] Has your PR been rebased against the latest commit within the target branch (typically master)? ### For code changes: - [x] Have you included steps to reproduce the behavior or problem that is being changed or addressed? - [x] Have you included steps or a guide to how the change may be verified and tested manually? - [x] Have you ensured that the full suite of tests and checks have been executed in the root metron folder via: ``` mvn -q clean integration-test install && dev-utilities/build-utils/verify_licenses.sh ``` - [x] Have you written or updated unit tests and or integration tests to verify your changes? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [x] Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent? ### For documentation related changes: - [ ] Have you ensured that format looks appropriate for the output in which it is rendered by building and verifying the site-book? If not then run the following commands and the verify changes via `site-book/target/site/index.html`: ``` cd site-book mvn site ``` Note: Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible. It is also recommended that [travis-ci](https://travis-ci.org) is set up for your personal repository such that your branches are built there before submitting a pull request. You can merge this pull request into a Git repository by running: $ git pull https://github.com/tiborm/metron feature/METRON-1554-pcap-query-panel Alternatively you can review and apply these changes as the patch at: https://github.com/apache/metron/pull/1103.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1103 ---
[GitHub] metron pull request #1103: METRON-1671: Initial PCAP UI
Github user tiborm closed the pull request at: https://github.com/apache/metron/pull/1103 ---
[GitHub] metron issue #1103: METRON-1671: Initial PCAP UI
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1103 @mmiklavc We had to update a package-lock.json file because of the original one contained a package collision. npm ci command just failed on that. ---
[GitHub] metron issue #1119: METRON-1676: Adding date range selector to PCAP filter b...
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1119 @mmiklavc test instructions added to the PR description and the jira ticket as well ---
[GitHub] metron issue #1119: METRON-1676: Adding date range selector to PCAP filter b...
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1119 @justinleet User able to select a year or month by opening the time selector drop-down and clicking on the year of month values on the top. We reused metron's date-picker component. This behavior should be the same in other parts of the UI. ---
[GitHub] metron issue #1103: METRON-1671: Initial PCAP UI
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1103 @cestella We added the license headers for all new files. ---
[GitHub] metron issue #1103: METRON-1671: Initial PCAP UI
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1103 @mmiklavc The list of the sequential PR's in order are the following: METRON-1671: Initial PCAP UI https://github.com/apache/metron/pull/1103 METRON-1662: Adding download button https://github.com/apache/metron/pull/1118 METRON-1676: Adding date range selector to PCAP filter bar https://github.com/apache/metron/pull/1119 METRON-1675: Add Pagination to PCAP https://github.com/apache/metron/pull/1121 METRON-1683: Fix the download progress bar in PCAP UI https://github.com/apache/metron/pull/1122 ---
[GitHub] metron issue #1118: METRON-1662: Adding download button
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1118 @cestella license headers added. ---
[GitHub] metron issue #1118: METRON-1662: Adding download button
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1118 @mmiklavc I updated the JIRA ticket with instructions for testing. https://issues.apache.org/jira/browse/METRON-1662 ---
[GitHub] metron pull request #1103: METRON-1671: Initial PCAP UI
Github user tiborm commented on a diff in the pull request: https://github.com/apache/metron/pull/1103#discussion_r205714876 --- Diff: metron-interface/metron-alerts/src/app/pcap/pcap-filters/pcap-filters.component.spec.ts --- @@ -0,0 +1,29 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; --- End diff -- Thanks, we added license headers. ---
[GitHub] metron pull request #1103: METRON-1671: Initial PCAP UI
Github user tiborm commented on a diff in the pull request: https://github.com/apache/metron/pull/1103#discussion_r205714935 --- Diff: metron-interface/metron-alerts/src/app/pcap/pcap-filters/pcap-filters.component.ts --- @@ -0,0 +1,24 @@ +import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; --- End diff -- Thanks, we added license headers. ---
[GitHub] metron pull request #1103: METRON-1671: Initial PCAP UI
Github user tiborm commented on a diff in the pull request: https://github.com/apache/metron/pull/1103#discussion_r205715003 --- Diff: metron-interface/metron-alerts/src/app/pcap/pcap-list/pcap-list.component.spec.ts --- @@ -0,0 +1,53 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; --- End diff -- Thanks, we added license headers. ---
[GitHub] metron pull request #1103: METRON-1671: Initial PCAP UI
Github user tiborm commented on a diff in the pull request: https://github.com/apache/metron/pull/1103#discussion_r205721365 --- Diff: metron-interface/metron-alerts/src/app/pcap/pcap-packet/pcap-packet.component.ts --- @@ -0,0 +1,22 @@ +import { Component, OnInit, Input } from '@angular/core'; --- End diff -- Thanks, we added license headers. ---
[GitHub] metron pull request #1103: METRON-1671: Initial PCAP UI
Github user tiborm commented on a diff in the pull request: https://github.com/apache/metron/pull/1103#discussion_r205721981 --- Diff: metron-interface/metron-alerts/src/app/pcap/pcap-panel/pcap-panel.component.spec.ts --- @@ -0,0 +1,51 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; --- End diff -- Thanks, we added license headers. ---
[GitHub] metron pull request #1103: METRON-1671: Initial PCAP UI
Github user tiborm commented on a diff in the pull request: https://github.com/apache/metron/pull/1103#discussion_r205722021 --- Diff: metron-interface/metron-alerts/src/app/pcap/pcap-panel/pcap-panel.component.ts --- @@ -0,0 +1,65 @@ +import { Component, OnInit, Input } from '@angular/core'; --- End diff -- Thanks, we added license headers. ---
[GitHub] metron pull request #1103: METRON-1671: Initial PCAP UI
Github user tiborm commented on a diff in the pull request: https://github.com/apache/metron/pull/1103#discussion_r205723106 --- Diff: metron-interface/metron-alerts/src/app/pcap/pcap-panel/pcap-panel.component.ts --- @@ -0,0 +1,78 @@ +/** + * 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. + */ +import { Component, OnInit, Input } from '@angular/core'; + +import { PcapService, PcapStatusResponse } from '../service/pcap.service' +import { PcapRequest } from '../model/pcap.request' +import { Pdml } from '../model/pdml' +import {Subscription} from "rxjs/Rx"; + +@Component({ + selector: 'app-pcap-panel', + templateUrl: './pcap-panel.component.html', + styleUrls: ['./pcap-panel.component.scss'] +}) +export class PcapPanelComponent implements OnInit { + + @Input() pdml: Pdml = null; + + @Input() pcapRequest: PcapRequest; + + statusSubscription: Subscription; + queryRunning: boolean = false; + progressWidth: number = 0; + selectedPage: number = 1; + + constructor(private pcapService: PcapService ) { } + + ngOnInit() { + } + + onSearch(pcapRequest) { +console.log(pcapRequest); +this.pdml = null; +this.progressWidth = 0; +this.pcapService.submitRequest(pcapRequest).subscribe(id => { + this.queryRunning = true; + this.statusSubscription = this.pcapService.pollStatus(id).subscribe((statusResponse: PcapStatusResponse) => { +if ('SUCCEEDED' === statusResponse.jobStatus) { + this.statusSubscription.unsubscribe(); + this.queryRunning = false; + this.pcapService.getPackets(id, this.selectedPage).toPromise().then(pdml => { +this.pdml = pdml; + }); +} else if (this.progressWidth < 100) { + this.progressWidth = Math.trunc(statusResponse.percentComplete); +} + }); +}); + +// this.pcapService.getTestPackets(this.pcapRequest).subscribe(response => { --- End diff -- Commented code removed. ---
[GitHub] metron pull request #1103: METRON-1671: Initial PCAP UI
Github user tiborm commented on a diff in the pull request: https://github.com/apache/metron/pull/1103#discussion_r205723353 --- Diff: metron-interface/metron-alerts/src/app/pcap/pcap-panel/pcap-panel.component.ts --- @@ -0,0 +1,78 @@ +/** + * 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. + */ +import { Component, OnInit, Input } from '@angular/core'; + +import { PcapService, PcapStatusResponse } from '../service/pcap.service' +import { PcapRequest } from '../model/pcap.request' +import { Pdml } from '../model/pdml' +import {Subscription} from "rxjs/Rx"; + +@Component({ + selector: 'app-pcap-panel', + templateUrl: './pcap-panel.component.html', + styleUrls: ['./pcap-panel.component.scss'] +}) +export class PcapPanelComponent implements OnInit { + + @Input() pdml: Pdml = null; + + @Input() pcapRequest: PcapRequest; + + statusSubscription: Subscription; + queryRunning: boolean = false; + progressWidth: number = 0; + selectedPage: number = 1; + + constructor(private pcapService: PcapService ) { } + + ngOnInit() { + } + + onSearch(pcapRequest) { +console.log(pcapRequest); +this.pdml = null; +this.progressWidth = 0; +this.pcapService.submitRequest(pcapRequest).subscribe(id => { + this.queryRunning = true; + this.statusSubscription = this.pcapService.pollStatus(id).subscribe((statusResponse: PcapStatusResponse) => { +if ('SUCCEEDED' === statusResponse.jobStatus) { --- End diff -- FAILED status handling added. KILLED status is out of scope of the current PR. ---
[GitHub] metron pull request #1103: METRON-1671: Initial PCAP UI
Github user tiborm commented on a diff in the pull request: https://github.com/apache/metron/pull/1103#discussion_r205732629 --- Diff: metron-interface/metron-alerts/src/app/pcap/pcap-packet-line/pcap-packet-line.component.ts --- @@ -0,0 +1,55 @@ +/** + * 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. + */ +import { Component, OnInit, Input } from '@angular/core'; +import { PdmlPacket, PdmlProto, PdmlField } from '../model/pdml' + +@Component({ + selector: '[app-pcap-packet-line]', + templateUrl: './pcap-packet-line.component.html', + styleUrls: ['./pcap-packet-line.component.scss'] +}) +export class PcapPacketLineComponent implements OnInit { + + @Input() packet: PdmlPacket + + ip: { +timestamp: PdmlField, +ip_src_addr: PdmlField, ip_src_port: PdmlField, +ip_dest_addr: PdmlField, ip_dest_port: PdmlField, +protocol: PdmlField + } + + constructor() { } + + ngOnInit() { +let gen_proto: PdmlProto = this.packet.protos.filter(p => p.name == "geninfo")[0] --- End diff -- Thanks @merrimanr! I addressed this in a new commit. ---
[GitHub] metron issue #1103: METRON-1671: Initial PCAP UI
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1103 @mmiklavc Thanks for the comment! I extended the JIRA ticket with user story like test scenarios. Also added a short description of to the PR description about how to spin up a full dev with pcap. ---
[GitHub] metron issue #1103: METRON-1671: Initial PCAP UI
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1103 As part of the latest commits I removed commented code blocks, and fixed the variable naming issues in pcap-packet-line.component.ts. This PR and the followup ones are updated by the latest changes from the base branch. ---
[GitHub] metron issue #1122: METRON-1683: Fix the download progress bar in PCAP UI
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1122 Opened a PR for pcap-packet-line.component.spec.ts. Component covered with unit test. Size of test data aligned to the needs of the unit tests and shared across pcap-packet and pcap-packet-line components. ---
[GitHub] metron pull request #1103: METRON-1671: Initial PCAP UI
Github user tiborm closed the pull request at: https://github.com/apache/metron/pull/1103 ---
[GitHub] metron issue #1103: METRON-1671: Initial PCAP UI
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1103 Thanks to everyone for the feedback and comments! ---
[GitHub] metron pull request #1118: METRON-1662: Adding download button
Github user tiborm commented on a diff in the pull request: https://github.com/apache/metron/pull/1118#discussion_r207506822 --- Diff: metron-interface/metron-alerts/src/app/pcap/pcap-panel/pcap-panel.component.ts --- @@ -22,33 +22,35 @@ import { PcapRequest } from '../model/pcap.request' import { Pdml } from '../model/pdml' import {Subscription} from "rxjs/Rx"; +class Query { --- End diff -- Thanks Ryan! It's dead code left there from some previous state of impl. Removed. ---
[GitHub] metron pull request #1118: METRON-1662: Adding download button
Github user tiborm commented on a diff in the pull request: https://github.com/apache/metron/pull/1118#discussion_r207506818 --- Diff: metron-interface/metron-alerts/src/app/pcap/pcap-panel/pcap-panel.component.ts --- @@ -22,33 +22,35 @@ import { PcapRequest } from '../model/pcap.request' import { Pdml } from '../model/pdml' import {Subscription} from "rxjs/Rx"; +class Query { + id: String +} + @Component({ selector: 'app-pcap-panel', templateUrl: './pcap-panel.component.html', styleUrls: ['./pcap-panel.component.scss'] }) -export class PcapPanelComponent implements OnInit { +export class PcapPanelComponent { @Input() pdml: Pdml = null; - @Input() pcapRequest: PcapRequest; statusSubscription: Subscription; queryRunning: boolean = false; + queryId: string; progressWidth: number = 0; selectedPage: number = 1; errorMsg: string; - constructor(private pcapService: PcapService ) { } - - ngOnInit() { - } + constructor(private pcapService: PcapService ) {} onSearch(pcapRequest) { console.log(pcapRequest); this.pdml = null; this.progressWidth = 0; this.pcapService.submitRequest(pcapRequest).subscribe(id => { + this.queryId = id; --- End diff -- Nice catch, thanks! Turned this into PcapStatusResponse. ---
[GitHub] metron pull request #1118: METRON-1662: Adding download button
Github user tiborm closed the pull request at: https://github.com/apache/metron/pull/1118 ---
[GitHub] metron issue #1118: METRON-1662: Adding download button
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1118 Thanks Guys! ---
[GitHub] metron issue #1119: METRON-1676: Adding date range selector to PCAP filter b...
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1119 @merrimanr I fixed the license header typo. It's a copy/paste issue so we'll try to find where is it comes from. Thanks! ---
[GitHub] metron issue #1119: METRON-1676: Adding date range selector to PCAP filter b...
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1119 Thanks Ryan! ---
[GitHub] metron pull request #1119: METRON-1676: Adding date range selector to PCAP f...
Github user tiborm closed the pull request at: https://github.com/apache/metron/pull/1119 ---
[GitHub] metron pull request #1142: Metron-1712: Input validation
GitHub user tiborm opened a pull request: https://github.com/apache/metron/pull/1142 Metron-1712: Input validation ## Contributor Comments This PR contains the input validation for ipSrcAdr, ipSrcPort, ipDestAdr, ipDestPort fiels. Please find the details in the https://issues.apache.org/jira/browse/METRON-1724 ticket. There is a followup ticket on this: Date rage validation https://issues.apache.org/jira/browse/METRON-1724 We'll open a separated PR when it's done. ## Pull Request Checklist Thank you for submitting a contribution to Apache Metron. Please refer to our [Development Guidelines](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61332235) for the complete guide to follow for contributions. Please refer also to our [Build Verification Guidelines](https://cwiki.apache.org/confluence/display/METRON/Verifying+Builds?show-miniview) for complete smoke testing guides. In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following: ### For all changes: - [ ] Is there a JIRA ticket associated with this PR? If not one needs to be created at [Metron Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel). - [ ] Does your PR title start with METRON- where is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)? ### For code changes: - [ ] Have you included steps to reproduce the behavior or problem that is being changed or addressed? - [ ] Have you included steps or a guide to how the change may be verified and tested manually? - [ ] Have you ensured that the full suite of tests and checks have been executed in the root metron folder via: ``` mvn -q clean integration-test install && dev-utilities/build-utils/verify_licenses.sh ``` - [ ] Have you written or updated unit tests and or integration tests to verify your changes? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [ ] Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent? ### For documentation related changes: - [ ] Have you ensured that format looks appropriate for the output in which it is rendered by building and verifying the site-book? If not then run the following commands and the verify changes via `site-book/target/site/index.html`: ``` cd site-book mvn site ``` Note: Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible. It is also recommended that [travis-ci](https://travis-ci.org) is set up for your personal repository such that your branches are built there before submitting a pull request. You can merge this pull request into a Git repository by running: $ git pull https://github.com/tiborm/metron METRON-1712-input-validation Alternatively you can review and apply these changes as the patch at: https://github.com/apache/metron/pull/1142.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1142 commit 872d1b1ee13e358c18956945d71d3667d19fca8a Author: merrimanr Date: 2018-04-12T14:57:48Z Merge branch 'pcap-front' of https://github.com/simonellistonball/metron into pcaprest Conflicts: metron-interface/metron-alerts/src/app/app.module.ts commit b1b6a7dabea1a1d0d132482c8d97af29c0ac2683 Author: merrimanr Date: 2018-04-13T15:00:15Z initial commit Conflicts: metron-interface/metron-rest/src/main/java/org/apache/metron/rest/MetronRestApplication.java metron-interface/metron-rest/src/main/java/org/apache/metron/rest/controller/PcapQueryController.java metron-interface/metron-rest/src/main/java/org/apache/metron/rest/util/pcapQueryThread.java commit 55cf2d945a4fcff1e7e2e47a234037ed6f394b2e Author: merrimanr Date: 2018-04-18T15:52:56Z added license headers commit 70696d047c6ef4b8ce5fcda03588474ff5b2c506 Author: tiborm Date: 2018-07-11T14:58:56Z METRON-1662: adding download button to pcap tab commit 4a83d46259736d8c721fb9f640b6ad522f91a559 Author: tiborm Date: 2018-07-12T07:09:14Z METRON-1662: removing unused function from the first iteration commit 9f57724597240a05d1caeec73882a4ed50aadd9a Author: tiborm Date: 2018-07-12T08:36:15Z
[GitHub] metron pull request #1143: METRON-1713: Adding "cancel query" button
GitHub user tiborm opened a pull request: https://github.com/apache/metron/pull/1143 METRON-1713: Adding "cancel query" button ## Contributor Comments This PR contains the implementation of the cancel button of a running pcap query. https://user-images.githubusercontent.com/2437400/43787738-fccb8d46-9a6b-11e8-8f0b-2e2e2a638779.png";> Please find more detail about it in https://issues.apache.org/jira/browse/METRON-1713 ## Pull Request Checklist Thank you for submitting a contribution to Apache Metron. Please refer to our [Development Guidelines](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61332235) for the complete guide to follow for contributions. Please refer also to our [Build Verification Guidelines](https://cwiki.apache.org/confluence/display/METRON/Verifying+Builds?show-miniview) for complete smoke testing guides. In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following: ### For all changes: - [ ] Is there a JIRA ticket associated with this PR? If not one needs to be created at [Metron Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel). - [ ] Does your PR title start with METRON- where is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)? ### For code changes: - [ ] Have you included steps to reproduce the behavior or problem that is being changed or addressed? - [ ] Have you included steps or a guide to how the change may be verified and tested manually? - [ ] Have you ensured that the full suite of tests and checks have been executed in the root metron folder via: ``` mvn -q clean integration-test install && dev-utilities/build-utils/verify_licenses.sh ``` - [ ] Have you written or updated unit tests and or integration tests to verify your changes? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [ ] Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent? ### For documentation related changes: - [ ] Have you ensured that format looks appropriate for the output in which it is rendered by building and verifying the site-book? If not then run the following commands and the verify changes via `site-book/target/site/index.html`: ``` cd site-book mvn site ``` Note: Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible. It is also recommended that [travis-ci](https://travis-ci.org) is set up for your personal repository such that your branches are built there before submitting a pull request. You can merge this pull request into a Git repository by running: $ git pull https://github.com/tiborm/metron METRON-1713-cancel-query-button Alternatively you can review and apply these changes as the patch at: https://github.com/apache/metron/pull/1143.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1143 commit 872d1b1ee13e358c18956945d71d3667d19fca8a Author: merrimanr Date: 2018-04-12T14:57:48Z Merge branch 'pcap-front' of https://github.com/simonellistonball/metron into pcaprest Conflicts: metron-interface/metron-alerts/src/app/app.module.ts commit b1b6a7dabea1a1d0d132482c8d97af29c0ac2683 Author: merrimanr Date: 2018-04-13T15:00:15Z initial commit Conflicts: metron-interface/metron-rest/src/main/java/org/apache/metron/rest/MetronRestApplication.java metron-interface/metron-rest/src/main/java/org/apache/metron/rest/controller/PcapQueryController.java metron-interface/metron-rest/src/main/java/org/apache/metron/rest/util/pcapQueryThread.java commit 55cf2d945a4fcff1e7e2e47a234037ed6f394b2e Author: merrimanr Date: 2018-04-18T15:52:56Z added license headers commit 70696d047c6ef4b8ce5fcda03588474ff5b2c506 Author: tiborm Date: 2018-07-11T14:58:56Z METRON-1662: adding download button to pcap tab commit 4a83d46259736d8c721fb9f640b6ad522f91a559 Author: tiborm Date: 2018-07-12T07:09:14Z METRON-1662: removing unused function from the first iteration commit 9f57724597240a05d1caeec73882a4ed50aadd9a Author: tiborm Date: 2018-07-12T08:36:15Z METRON-1662: changing d
[GitHub] metron issue #1142: METRON-1712: PCAP UI Input validation
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1142 Thanks, Justin! I replaced the regexp for IP validation and added new tests to cover that functionality. Nice catch! I was unable to reproduce the port validation issue you reported. However, I replaced the regexp and double checked the tests. They seem working fine. ---
[GitHub] metron issue #1143: METRON-1713: PCAP UI - Add a way to kill a pcap job
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1143 Thanks, Justin! I updated the PR with a small fix. ---
[GitHub] metron issue #1142: METRON-1712: PCAP UI Input validation
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1142 You're right. Copy paste issue. Fixed. Thanks! ---
[GitHub] metron pull request #1142: METRON-1712: PCAP UI Input validation
Github user tiborm commented on a diff in the pull request: https://github.com/apache/metron/pull/1142#discussion_r208695454 --- Diff: metron-interface/metron-alerts/src/app/pcap/pcap-filters/pcap-filters.component.spec.ts --- @@ -331,13 +337,60 @@ describe('PcapFiltersComponent', () => { validValues.forEach((value) => { const els = getFieldWithSubmit('ip-dest-port'); +expect(isFieldInvalid(els.field)).toBe(false, 'the field should be valid without ' + value); +expect(isSubmitDisabled(els.submit)).toBe(false, 'the submit button should be enabled without ' + value); + +setFieldValue(els.field, value); + expect(isFieldInvalid(els.field)).toBe(false, 'the field should be valid with ' + value); expect(isSubmitDisabled(els.submit)).toBe(false, 'the submit button should be enabled with ' + value); +tearDown(els.field); + }); +}); + + +it('should disable the form if the ip source field is invalid', () => { + const invalidValues = [ +'tst', +0o0, +0, +'111.111.111', +'222.222.222.222.222', +'333.333.333.333', + ]; + + invalidValues.forEach((value) => { +const els = getFieldWithSubmit('ip-src-addr'); +expect(isFieldInvalid(els.field)).toBe(false, 'the field should be valid without ' + value); +expect(isSubmitDisabled(els.submit)).toBe(false, 'the submit button should be enabled without ' + value); + setFieldValue(els.field, value); -expect(isFieldInvalid(els.field)).toBe(false, 'the field should be valid with ' + value); + +expect(isFieldInvalid(els.field)).toBe(true, 'the field should be invalid with ' + value); +expect(isSubmitDisabled(els.submit)).toBe(true, 'the submit button should be disabled with ' + value); +tearDown(els.field); + }); +}); + +it('should keep the form enabled if the ip source field is valid', () => { + const invalidValues = [ --- End diff -- Fixed. Thanks! ---
[GitHub] metron issue #1143: METRON-1713: PCAP UI - Add a way to kill a pcap job
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1143 @merrimanr Yes, it contains the latest state of METRON-1712 and feature/METRON-1554-pcap-query-panel. ---
[GitHub] metron pull request #1142: METRON-1712: PCAP UI Input validation
Github user tiborm closed the pull request at: https://github.com/apache/metron/pull/1142 ---
[GitHub] metron issue #1142: METRON-1712: PCAP UI Input validation
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1142 Thanks for the review! ---
[GitHub] metron pull request #1156: METRON-1702: Reload a running job in the UI
Github user tiborm commented on a diff in the pull request: https://github.com/apache/metron/pull/1156#discussion_r208919679 --- Diff: metron-interface/metron-alerts/src/app/pcap/pcap-panel/pcap-panel.component.ts --- @@ -44,7 +44,23 @@ export class PcapPanelComponent { savedPcapRequest: {}; errorMsg: string; - constructor(private pcapService: PcapService) { } + constructor(private pcapService: PcapService ) { } --- End diff -- There is an extra space after the type. Is it intentional? ---
[GitHub] metron pull request #1143: METRON-1713: PCAP UI - Add a way to kill a pcap j...
Github user tiborm closed the pull request at: https://github.com/apache/metron/pull/1143 ---
[GitHub] metron pull request #1165: METRON-1724: Date/time validation missing in PCAP...
GitHub user tiborm opened a pull request: https://github.com/apache/metron/pull/1165 METRON-1724: Date/time validation missing in PCAP query ## Contributor Comments This PR contains date range validation. We also added validation messages with hints for the user how to correct a particular input problem. https://user-images.githubusercontent.com/2437400/44151039-9f5ced76-a0a1-11e8-9655-c11765987b28.png";> For more details please check the following Jira ticket: https://issues.apache.org/jira/browse/METRON-1724 ## Pull Request Checklist Thank you for submitting a contribution to Apache Metron. Please refer to our [Development Guidelines](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61332235) for the complete guide to follow for contributions. Please refer also to our [Build Verification Guidelines](https://cwiki.apache.org/confluence/display/METRON/Verifying+Builds?show-miniview) for complete smoke testing guides. In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following: ### For all changes: - [ ] Is there a JIRA ticket associated with this PR? If not one needs to be created at [Metron Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel). - [ ] Does your PR title start with METRON- where is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)? ### For code changes: - [ ] Have you included steps to reproduce the behavior or problem that is being changed or addressed? - [ ] Have you included steps or a guide to how the change may be verified and tested manually? - [ ] Have you ensured that the full suite of tests and checks have been executed in the root metron folder via: ``` mvn -q clean integration-test install && dev-utilities/build-utils/verify_licenses.sh ``` - [ ] Have you written or updated unit tests and or integration tests to verify your changes? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [ ] Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent? ### For documentation related changes: - [ ] Have you ensured that format looks appropriate for the output in which it is rendered by building and verifying the site-book? If not then run the following commands and the verify changes via `site-book/target/site/index.html`: ``` cd site-book mvn site ``` Note: Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible. It is also recommended that [travis-ci](https://travis-ci.org) is set up for your personal repository such that your branches are built there before submitting a pull request. You can merge this pull request into a Git repository by running: $ git pull https://github.com/tiborm/metron METRON-1724 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/metron/pull/1165.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1165 commit 872d1b1ee13e358c18956945d71d3667d19fca8a Author: merrimanr Date: 2018-04-12T14:57:48Z Merge branch 'pcap-front' of https://github.com/simonellistonball/metron into pcaprest Conflicts: metron-interface/metron-alerts/src/app/app.module.ts commit b1b6a7dabea1a1d0d132482c8d97af29c0ac2683 Author: merrimanr Date: 2018-04-13T15:00:15Z initial commit Conflicts: metron-interface/metron-rest/src/main/java/org/apache/metron/rest/MetronRestApplication.java metron-interface/metron-rest/src/main/java/org/apache/metron/rest/controller/PcapQueryController.java metron-interface/metron-rest/src/main/java/org/apache/metron/rest/util/pcapQueryThread.java commit 55cf2d945a4fcff1e7e2e47a234037ed6f394b2e Author: merrimanr Date: 2018-04-18T15:52:56Z added license headers commit 70696d047c6ef4b8ce5fcda03588474ff5b2c506 Author: tiborm Date: 2018-07-11T14:58:56Z METRON-1662: adding download button to pcap tab commit 4a83d46259736d8c721fb9f640b6ad522f91a559 Author: tiborm Date: 2018-07-12T07:09:14Z METRON-1662: removing unused function from the first iteration commit 9f57724597240a05d1caeec73882a4ed50aadd9a Author: tiborm Date: 2
[GitHub] metron issue #1165: METRON-1724: Date/time validation missing in PCAP query
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1165 Thanks for reviewing! Please test this PR carefully becasue of the large amount of merge conflicts we solved part of this. We tested manually too, but it would be great to double check. All the unit tests are green. ---
[GitHub] metron pull request #1165: METRON-1724: Date/time validation missing in PCAP...
Github user tiborm commented on a diff in the pull request: https://github.com/apache/metron/pull/1165#discussion_r210379924 --- Diff: metron-interface/metron-alerts/src/app/pcap/model/pcap.request.ts --- @@ -17,13 +17,13 @@ */ export class PcapRequest { - startTimeMs: number = 0; - endTimeMs: number = 15; - ipSrcAddr: string = ''; - ipSrcPort: number; - ipDstAddr: string = ''; - ipDstPort: number; - protocol: string = ''; - packetFilter: string = ''; - includeReverse: boolean = false; + startTimeMs = 0; + endTimeMs = 15; + ipSrcAddr = ''; + ipSrcPort = 0; --- End diff -- These default values was part of the handovered implementation. It haven't caused issues till now. Anyway these defaults makes no sense to me eigther. I'll fix it retest against the latest full dev. ---
[GitHub] metron issue #1159: METRON-1734: Src and Dst port filters are incorrect afte...
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1159 Thanks guys for the reviews! It seems too many issue with the PR with it's current state. I close it and open another one later we solved bad merges etc. ---
[GitHub] metron pull request #1165: METRON-1724: Date/time validation missing in PCAP...
Github user tiborm closed the pull request at: https://github.com/apache/metron/pull/1165 ---
[GitHub] metron issue #1165: METRON-1724: Date/time validation missing in PCAP query
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1165 Thank you guys for the reivew! It seems there is too many issue with the PR. I'm going to close it and open a new one after we fixed the merge issues etc. ---
[GitHub] metron pull request #1172: METRON-1724: Date/time validation missing in PCAP...
GitHub user tiborm opened a pull request: https://github.com/apache/metron/pull/1172 METRON-1724: Date/time validation missing in PCAP query ## Contributor Comments This PR contains date range validation. We added validation messages with hints also, to help the user correct a particular input problem. https://user-images.githubusercontent.com/2437400/44151039-9f5ced76-a0a1-11e8-9655-c11765987b28.png";> As a part of this changeset, we refactored pcap-filter.component to make it more aligned with some Angular best practices. We introduced ReactiveFormsModule to make form handling similar to other observable based solutions in Angular. ReactiveFormsModule also helped us to remove validation logic from the HTML template, make it part of component logic and handle more complex validations like in case of the date range. For more details please check the following Jira ticket: https://issues.apache.org/jira/browse/METRON-1724 ## Pull Request Checklist Thank you for submitting a contribution to Apache Metron. Please refer to our [Development Guidelines](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61332235) for the complete guide to follow for contributions. Please refer also to our [Build Verification Guidelines](https://cwiki.apache.org/confluence/display/METRON/Verifying+Builds?show-miniview) for complete smoke testing guides. In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following: ### For all changes: - [x] Is there a JIRA ticket associated with this PR? If not one needs to be created at [Metron Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel). - [x] Does your PR title start with METRON- where is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [x] Has your PR been rebased against the latest commit within the target branch (typically master)? ### For code changes: - [x] Have you included steps to reproduce the behavior or problem that is being changed or addressed? - [x] Have you included steps or a guide to how the change may be verified and tested manually? - [x] Have you ensured that the full suite of tests and checks have been executed in the root metron folder via: ``` mvn -q clean integration-test install && dev-utilities/build-utils/verify_licenses.sh ``` - [x] Have you written or updated unit tests and or integration tests to verify your changes? - [x] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [x] Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent? ### For documentation related changes: - [x] Have you ensured that format looks appropriate for the output in which it is rendered by building and verifying the site-book? If not then run the following commands and the verify changes via `site-book/target/site/index.html`: ``` cd site-book mvn site ``` Note: Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible. It is also recommended that [travis-ci](https://travis-ci.org) is set up for your personal repository such that your branches are built there before submitting a pull request. You can merge this pull request into a Git repository by running: $ git pull https://github.com/tiborm/metron METRON-1724 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/metron/pull/1172.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1172 commit 79b327fa96d6be8aea0f9bcf07f3f58ccd699581 Author: tiborm Date: 2018-08-22T10:17:12Z making date picker compatible with ReactiveFormsModule commit 89310c608ba1c2354aea74c946aa94c9f15b4978 Author: tiborm Date: 2018-08-22T10:18:01Z fixing tslint warnings commit cf3b1a7e802aaa803efe97b3df239f539c9d44e9 Author: tiborm Date: 2018-08-22T10:27:24Z merging udpPort handlig and tslint fixes togheter commit 3394575f4ec110c884b0ef825bed8c5a70a47749 Author: tiborm Date: 2018-08-22T10:27:46Z adding ReactiveFormsModule commit 6670581654f04f340f01cddb65022ef147eb6afd Author: tiborm Date: 2018-08-22T10:28:08Z extending pcap-panel tests commit e0a1b25db93f475a918c8b1b4e4b71f692c8effc Author: tiborm Date: 2018-08-22T10:28:29Z fixing
[GitHub] metron pull request #1172: METRON-1724: Date/time validation missing in PCAP...
Github user tiborm commented on a diff in the pull request: https://github.com/apache/metron/pull/1172#discussion_r211979831 --- Diff: metron-interface/metron-alerts/src/app/pcap/pcap-filters/pcap-filters.component.ts --- @@ -15,63 +15,116 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {Component, Input, Output, EventEmitter, OnInit, OnChanges, SimpleChanges} from '@angular/core'; +import {Component, Input, Output, EventEmitter, OnChanges, SimpleChanges} from '@angular/core'; +import { FormGroup, FormControl, Validators, ValidationErrors } from '@angular/forms'; + import * as moment from 'moment/moment'; import { DEFAULT_TIMESTAMP_FORMAT } from '../../utils/constants'; import { PcapRequest } from '../model/pcap.request'; +const DEFAULT_END_TIME = new Date(); --- End diff -- I think the DEFAULT_START_TIME and DEFAULT_END_TIME as all uppercase variables are a bit miss leading. These are not static finals like in java. These are actually private constants. I suggest to rename them to normal camelCase. DEFAULT_END_TIME might be reusable somewhere else but DEFAULT_START_TIME in its current form really belongs to the filtering. I think the same true to the validator and the transform functions too. Validator might be reusable if we turn our other forms reactive too in the future. For me, the question is how much we like to prepare our current code to an imagined future. And how much it supports the understanding of the existing functionality. I would leave it as it is right now but opened to refactor it if we see value in it. ---
[GitHub] metron pull request #1172: METRON-1724: Date/time validation missing in PCAP...
Github user tiborm commented on a diff in the pull request: https://github.com/apache/metron/pull/1172#discussion_r211989622 --- Diff: metron-interface/metron-alerts/src/app/pcap/model/pcap.request.ts --- @@ -17,13 +17,13 @@ */ export class PcapRequest { - startTimeMs: number = 0; - endTimeMs: number = 15; - ipSrcAddr: string = ''; - ipSrcPort: number; - ipDstAddr: string = ''; - ipDstPort: number; - protocol: string = ''; - packetFilter: string = ''; - includeReverse: boolean = false; + startTimeMs = 0; + endTimeMs = 15; --- End diff -- I agree. These default values should be fixed. Do we needs to assign value to the dates here? ---
[GitHub] metron pull request #1172: METRON-1724: Date/time validation missing in PCAP...
Github user tiborm commented on a diff in the pull request: https://github.com/apache/metron/pull/1172#discussion_r211990573 --- Diff: metron-interface/metron-alerts/src/app/pcap/model/pcap.request.ts --- @@ -17,13 +17,13 @@ */ export class PcapRequest { - startTimeMs: number = 0; - endTimeMs: number = 15; - ipSrcAddr: string = ''; - ipSrcPort: number; - ipDstAddr: string = ''; - ipDstPort: number; - protocol: string = ''; - packetFilter: string = ''; - includeReverse: boolean = false; + startTimeMs = 0; + endTimeMs = 15; --- End diff -- I think it would be better to leave them undefined here and let this file to be a simple type definition. ---
[GitHub] metron pull request #1172: METRON-1724: Date/time validation missing in PCAP...
Github user tiborm commented on a diff in the pull request: https://github.com/apache/metron/pull/1172#discussion_r212196734 --- Diff: metron-interface/metron-alerts/src/app/pcap/pcap-filters/pcap-filters.component.ts --- @@ -15,63 +15,116 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {Component, Input, Output, EventEmitter, OnInit, OnChanges, SimpleChanges} from '@angular/core'; +import {Component, Input, Output, EventEmitter, OnChanges, SimpleChanges} from '@angular/core'; +import { FormGroup, FormControl, Validators, ValidationErrors } from '@angular/forms'; + import * as moment from 'moment/moment'; import { DEFAULT_TIMESTAMP_FORMAT } from '../../utils/constants'; import { PcapRequest } from '../model/pcap.request'; +const DEFAULT_END_TIME = new Date(); --- End diff -- @sardell @ruffle1986 I'll refactor out the whole PcapRequest related code from the filter. It was part of the original implementation but I think it does not belongs to here. Filter component should produce a filter output instead of a request object. ---
[GitHub] metron issue #1172: METRON-1724: Date/time validation missing in PCAP query
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1172 @sardell @ruffle1986 I made the following changes based on your feedback: - default values for the timestamps removed - DEFAULT_START_TIME and DEFAULT_END_TIME moved to constants.ts (theoretically these values are reusable) - transform functions moved to utils.ts to make the filter component cleaner I think this is cleaner and more aligned with the other parts of the code. ---
[GitHub] metron pull request #1172: METRON-1724: Date/time validation missing in PCAP...
Github user tiborm commented on a diff in the pull request: https://github.com/apache/metron/pull/1172#discussion_r212369764 --- Diff: metron-interface/metron-alerts/src/app/pcap/pcap-packet-line/pcap-packet-line.component.spec.ts --- @@ -143,38 +132,4 @@ describe('PcapPacketLineComponent', () => { "protos": null }); }); - - it('should extract UDP ipSrcPort fields', () => { --- End diff -- Merge issue. I checked these and the related code change too. Got no idea how could I missed these. Fixing. ---
[GitHub] metron pull request #1172: METRON-1724: Date/time validation missing in PCAP...
Github user tiborm commented on a diff in the pull request: https://github.com/apache/metron/pull/1172#discussion_r212383664 --- Diff: metron-interface/metron-alerts/src/app/pcap/pcap-filters/pcap-filters.component.spec.ts --- @@ -179,19 +172,6 @@ describe('PcapFiltersComponent', () => { component.onSubmit(); }); - it('Port fields should be removed from request when set to empty', () => { --- End diff -- It was intentional. We changed back the port type to string so this behavior not needed anymore. ---
[GitHub] metron issue #1172: METRON-1724: Date/time validation missing in PCAP query
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1172 As a result of the followup discussion about the placing of the transform functions, I moved them back to the filter component. ---
[GitHub] metron issue #1172: METRON-1724: Date/time validation missing in PCAP query
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1172 @merrimanr Tha bug you find was very interesting. We tried two different approaches to fix, but I think @ruffle1986 solution is more suitable and elegant here. I merged it. Please take a look and give a +1 if it's good to go. ---
[GitHub] metron pull request #1172: METRON-1724: Date/time validation missing in PCAP...
GitHub user tiborm reopened a pull request: https://github.com/apache/metron/pull/1172 METRON-1724: Date/time validation missing in PCAP query ## Contributor Comments This PR contains date range validation. We added validation messages with hints also, to help the user correct a particular input problem. https://user-images.githubusercontent.com/2437400/44151039-9f5ced76-a0a1-11e8-9655-c11765987b28.png";> As a part of this changeset, we refactored pcap-filter.component to make it more aligned with some Angular best practices. We introduced ReactiveFormsModule to make form handling similar to other observable based solutions in Angular. ReactiveFormsModule also helped us to remove validation logic from the HTML template, make it part of component.ts and handle more complex validations like in case of the date range. For more details please check the following Jira ticket: https://issues.apache.org/jira/browse/METRON-1724 ## Pull Request Checklist Thank you for submitting a contribution to Apache Metron. Please refer to our [Development Guidelines](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61332235) for the complete guide to follow for contributions. Please refer also to our [Build Verification Guidelines](https://cwiki.apache.org/confluence/display/METRON/Verifying+Builds?show-miniview) for complete smoke testing guides. In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following: ### For all changes: - [x] Is there a JIRA ticket associated with this PR? If not one needs to be created at [Metron Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel). - [x] Does your PR title start with METRON- where is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [x] Has your PR been rebased against the latest commit within the target branch (typically master)? ### For code changes: - [x] Have you included steps to reproduce the behavior or problem that is being changed or addressed? - [x] Have you included steps or a guide to how the change may be verified and tested manually? - [x] Have you ensured that the full suite of tests and checks have been executed in the root metron folder via: ``` mvn -q clean integration-test install && dev-utilities/build-utils/verify_licenses.sh ``` - [x] Have you written or updated unit tests and or integration tests to verify your changes? - [x] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [x] Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent? ### For documentation related changes: - [x] Have you ensured that format looks appropriate for the output in which it is rendered by building and verifying the site-book? If not then run the following commands and the verify changes via `site-book/target/site/index.html`: ``` cd site-book mvn site ``` Note: Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible. It is also recommended that [travis-ci](https://travis-ci.org) is set up for your personal repository such that your branches are built there before submitting a pull request. You can merge this pull request into a Git repository by running: $ git pull https://github.com/tiborm/metron METRON-1724 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/metron/pull/1172.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1172 commit 79b327fa96d6be8aea0f9bcf07f3f58ccd699581 Author: tiborm Date: 2018-08-22T10:17:12Z making date picker compatible with ReactiveFormsModule commit 89310c608ba1c2354aea74c946aa94c9f15b4978 Author: tiborm Date: 2018-08-22T10:18:01Z fixing tslint warnings commit cf3b1a7e802aaa803efe97b3df239f539c9d44e9 Author: tiborm Date: 2018-08-22T10:27:24Z merging udpPort handlig and tslint fixes togheter commit 3394575f4ec110c884b0ef825bed8c5a70a47749 Author: tiborm Date: 2018-08-22T10:27:46Z adding ReactiveFormsModule commit 6670581654f04f340f01cddb65022ef147eb6afd Author: tiborm Date: 2018-08-22T10:28:08Z extending pcap-panel tests commit e0a1b25db93f475a918c8b1b4e4b71f692c8effc Author: tiborm Date: 2018-08-22T10:28:29Z fixing
[GitHub] metron pull request #1172: METRON-1724: Date/time validation missing in PCAP...
Github user tiborm closed the pull request at: https://github.com/apache/metron/pull/1172 ---
[GitHub] metron issue #1096: METRON-1476: Update angular
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1096 Tested against full dev. With all the fixes you guys made seems good to me. Huge improvement and great job! Thanks +1 ---
[GitHub] metron pull request #1180: removing missleading and unnecessary @Input annot...
GitHub user tiborm opened a pull request: https://github.com/apache/metron/pull/1180 removing missleading and unnecessary @Input annotations ## Contributor Comments The following fields are annotated as inputs fields in pcap-panel, but actually, they don't. @Input pdml:Pdml=null; @Input pcapRequest:PcapRequest; @Input resetPaginationForSearch:boolean; The current state of the code is misleading and makes harder to understand the actual behaviour of the panel component. ## Pull Request Checklist Thank you for submitting a contribution to Apache Metron. Please refer to our [Development Guidelines](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61332235) for the complete guide to follow for contributions. Please refer also to our [Build Verification Guidelines](https://cwiki.apache.org/confluence/display/METRON/Verifying+Builds?show-miniview) for complete smoke testing guides. In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following: ### For all changes: - [ ] Is there a JIRA ticket associated with this PR? If not one needs to be created at [Metron Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel). - [ ] Does your PR title start with METRON- where is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)? ### For code changes: - [ ] Have you included steps to reproduce the behavior or problem that is being changed or addressed? - [ ] Have you included steps or a guide to how the change may be verified and tested manually? - [ ] Have you ensured that the full suite of tests and checks have been executed in the root metron folder via: ``` mvn -q clean integration-test install && dev-utilities/build-utils/verify_licenses.sh ``` - [ ] Have you written or updated unit tests and or integration tests to verify your changes? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [ ] Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent? ### For documentation related changes: - [ ] Have you ensured that format looks appropriate for the output in which it is rendered by building and verifying the site-book? If not then run the following commands and the verify changes via `site-book/target/site/index.html`: ``` cd site-book mvn site ``` Note: Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible. It is also recommended that [travis-ci](https://travis-ci.org) is set up for your personal repository such that your branches are built there before submitting a pull request. You can merge this pull request into a Git repository by running: $ git pull https://github.com/tiborm/metron METRON-1759-wrong-input-anotations Alternatively you can review and apply these changes as the patch at: https://github.com/apache/metron/pull/1180.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1180 commit 412d8b4ea1d320aa7960cedd98226944257a78b2 Author: tiborm Date: 2018-08-31T08:37:04Z removing missleading and unnecessary @Input annotations ---
[GitHub] metron issue #1096: METRON-1476: Update angular
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1096 @justinleet @sardell Just to double check I made a full dev rebuild after fix for metron.spec added. UI builds fine and looks healthy. ---
[GitHub] metron issue #1096: METRON-1476: Update angular
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1096 @sardell Checked your latest updates and looks straightforward to me. Still good to go from my side. ---
[GitHub] metron issue #1208: METRON-1790: Unsubscribe from every observable in the pc...
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1208 Checked and tested. Looks good to me. +1 ---
[GitHub] metron pull request #1223: METRON-1797: Add PCAP UI test implemented in Cypr...
Github user tiborm closed the pull request at: https://github.com/apache/metron/pull/1223 ---
[GitHub] metron pull request #1223: METRON-1797: Add PCAP UI test implemented in Cypr...
GitHub user tiborm reopened a pull request: https://github.com/apache/metron/pull/1223 METRON-1797: Add PCAP UI test implemented in Cypress.js ## Contributor Comments [DISCUSS] thread on the dev mailing list: https://lists.apache.org/thread.html/b6a0272c7809c05e8b7aff20171720e8ec76f8a0e9481169c37a4a4a@%3Cdev.metron.apache.org%3E JIRA Ticket: https://issues.apache.org/jira/browse/METRON-1797 This PR adds Cypress.io to our project. It makes us able to run E2E tests, UI integration tests. Also higher level UI tests with mocked services. As part of this PR I also added tests to cover the following functionalities of PCAP UI panel: - checking running jobs on navigating to PCAP tab - submitting PCAP job request - requesting job status - process status in percentage - getting PCAP JSON - rendering PCAP table - showing PCAP details - navigating across pages - downloading PDML - cancelli PCAP query job - showing filter validation messages - showing date validation messages Please consider while reviewing that these tests are not meant to cover all the details of the functionalities above. The aim here is to extend the test coverage build up by a large number of Unit Tests with higher level UI tests. ## Integration folder That contains the actual Cypress tests. The folder name comes from the Cypress naming convention, however, no real integration tests implemented here yet (at least no other than the integration of UI components to a whole application). We could change the name of the folder anytime we like to, but only one folder applicable. ## Fixture folder The tests are running on mocked data. This makes us able to integrate them with Travis without the need to having PCAP related services available from our CI. Each file in the Fixture folder represents a response to a particular request. This makes it fairly easy to create and maintain. # How to run To run Cypress tests locally please do the following: 1. pull this branch to your workspace 2. move to metron-interface/metron-alerts folder 3. run: npm ci 4. run: scripts/start-server-for-e2e.sh 5. run: node_modules/cypress/bin/cypress run or run: node_modules/cypress/bin/cypress open if you like to use the dashboard. ## Pull Request Checklist Thank you for submitting a contribution to Apache Metron. Please refer to our [Development Guidelines](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61332235) for the complete guide to follow for contributions. Please refer also to our [Build Verification Guidelines](https://cwiki.apache.org/confluence/display/METRON/Verifying+Builds?show-miniview) for complete smoke testing guides. In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following: ### For all changes: - [x] Is there a JIRA ticket associated with this PR? If not one needs to be created at [Metron Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel). - [x] Does your PR title start with METRON- where is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [x] Has your PR been rebased against the latest commit within the target branch (typically master)? ### For code changes: - [x] Have you included steps to reproduce the behavior or problem that is being changed or addressed? - [x] Have you included steps or a guide to how the change may be verified and tested manually? - [x] Have you ensured that the full suite of tests and checks have been executed in the root metron folder via: ``` mvn -q clean integration-test install && dev-utilities/build-utils/verify_licenses.sh ``` - [x] Have you written or updated unit tests and or integration tests to verify your changes? - [x] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [x] Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent? ### For documentation related changes: - [x] Have you ensured that format looks appropriate for the output in which it is rendered by building and verifying the site-book? If not then run the following commands and the verify changes via `site-book/target/site/index.html`: ``` cd site-book mvn site ``` Note: Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as p
[GitHub] metron pull request #1223: METRON-1797: Add PCAP UI test implemented in Cypr...
Github user tiborm closed the pull request at: https://github.com/apache/metron/pull/1223 ---
[GitHub] metron pull request #1225: METRON-1803: Integrate Cypress with Travis
GitHub user tiborm opened a pull request: https://github.com/apache/metron/pull/1225 METRON-1803: Integrate Cypress with Travis ## Contributor Comments [DISCUSS] thread on the dev mailing list: https://lists.apache.org/thread.html/b6a0272c7809c05e8b7aff20171720e8ec76f8a0e9481169c37a4a4a@%3Cdev.metron.apache.org%3E JIRA Ticket: https://issues.apache.org/jira/browse/METRON-1803 This PR adds Cypress.io to our project. It makes us able to run E2E tests, UI integration tests. Also higher level UI tests with mocked services. As part of this PR I also added tests to cover the following functionalities of PCAP UI panel: - checking running jobs on navigating to PCAP tab - submitting PCAP job request - requesting job status - process status in percentage - getting PCAP JSON - rendering PCAP table - showing PCAP details - navigating across pages - downloading PDML - cancelli PCAP query job - showing filter validation messages - showing date validation messages Please consider while reviewing that these tests are not meant to cover all the details of the functionalities above. The aim here is to extend the test coverage build up by a large number of Unit Tests with higher level UI tests. ### New folders Integration folder That contains the actual Cypress tests. The folder name comes from the Cypress naming convention, however, no real integration tests implemented here yet (at least no other than the integration of UI components to a whole application). We could change the name of the folder anytime we like to, but only one folder applicable. Fixture folder The tests are running on mocked data. This makes us able to integrate them with Travis without the need to having PCAP related services available from our CI. Each file in the Fixture folder represents a response to a particular request. This makes it fairly easy to create and maintain. ### How to run tests on your local machine To run Cypress tests locally please do the following: 1. pull this branch to your workspace 2. move to metron-interface/metron-alerts folder 3. run: npm ci 4. run: scripts/start-server-for-e2e.sh 5. run: node_modules/cypress/bin/cypress run or run: node_modules/cypress/bin/cypress open if you like to use the dashboard. ### Travis integration As part of this PR modified the package.json script block in metron-alert to make Cypress tests running in Travis. If you like to see the integration working please check to logs of build step #3 (mvn test --projects metron-interface/metron-config,metron-interface/metron-alerts) Failing Cypress tests brakes the build. Example of build broken by failing Cypress test: https://travis-ci.com/tiborm/metron/builds/86869264 ## Pull Request Checklist Thank you for submitting a contribution to Apache Metron. Please refer to our [Development Guidelines](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61332235) for the complete guide to follow for contributions. Please refer also to our [Build Verification Guidelines](https://cwiki.apache.org/confluence/display/METRON/Verifying+Builds?show-miniview) for complete smoke testing guides. In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following: ### For all changes: - [ ] Is there a JIRA ticket associated with this PR? If not one needs to be created at [Metron Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel). - [ ] Does your PR title start with METRON- where is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)? ### For code changes: - [ ] Have you included steps to reproduce the behavior or problem that is being changed or addressed? - [ ] Have you included steps or a guide to how the change may be verified and tested manually? - [ ] Have you ensured that the full suite of tests and checks have been executed in the root metron folder via: ``` mvn -q clean integration-test install && dev-utilities/build-utils/verify_licenses.sh ``` - [ ] Have you written or updated unit tests and or integration tests to verify your changes? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [ ] Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment
[GitHub] metron pull request #1225: METRON-1803: Integrate Cypress with Travis
Github user tiborm closed the pull request at: https://github.com/apache/metron/pull/1225 ---
[GitHub] metron pull request #1226: METRON-1803: Integrate Cypress with Travis
GitHub user tiborm opened a pull request: https://github.com/apache/metron/pull/1226 METRON-1803: Integrate Cypress with Travis ## Contributor Comments [DISCUSS] thread on the dev mailing list: https://lists.apache.org/thread.html/b6a0272c7809c05e8b7aff20171720e8ec76f8a0e9481169c37a4a4a@%3Cdev.metron.apache.org%3E JIRA Ticket: https://issues.apache.org/jira/browse/METRON-1803 This PR adds Cypress.io to our project. It makes us able to run E2E tests, UI integration tests. Also higher level UI tests with mocked services. As part of this PR I added tests to cover the following functionalities of PCAP UI panel: - checking running jobs on navigating to PCAP tab - submitting PCAP job request - requesting job status - process status in percentage - getting PCAP JSON - rendering PCAP table - showing PCAP details - navigating across pages - downloading PDML - cancelli PCAP query job - showing filter validation messages - showing date validation messages Please consider while reviewing that these tests are not meant to cover all the details of the functionalities above. The aim here is to extend the test coverage build up by a large number of Unit Tests with higher level UI tests. ### New folders Cypress files sit in cypress folder. Some of them might look like an empty placeholder but cypress actively uses all files in this PR. Integration folder That contains the actual Cypress tests. The folder name comes from the Cypress naming convention, however, no real integration tests implemented here yet (at least no other than the integration of UI components to a whole application). We could change the name of the folder anytime we like to, but only one folder applicable. Fixture folder The tests are running on mocked data. This makes us able to integrate them with Travis without the need to having PCAP related services available from our CI. Each file in the Fixture folder represents a response to a particular request. This makes it fairly easy to create and maintain. ### How to run tests on your local machine To run Cypress tests locally please do the following: 1. pull this branch to your workspace 2. move to metron-interface/metron-alerts folder 3. run: npm ci 4. run: scripts/start-server-for-e2e.sh 5. run: node_modules/cypress/bin/cypress run or run: node_modules/cypress/bin/cypress open if you like to use the dashboard. ### Travis integration As part of this PR I modified the package.json in metron-alert to make Cypress running in Travis. If you like to see the integration working please check to logs of build step #3. Failing Cypress tests brakes the build. Example of build broken by failing Cypress test: https://travis-ci.com/tiborm/metron/builds/86869264 ## Pull Request Checklist Thank you for submitting a contribution to Apache Metron. Please refer to our [Development Guidelines](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61332235) for the complete guide to follow for contributions. Please refer also to our [Build Verification Guidelines](https://cwiki.apache.org/confluence/display/METRON/Verifying+Builds?show-miniview) for complete smoke testing guides. In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following: ### For all changes: - [x] Is there a JIRA ticket associated with this PR? If not one needs to be created at [Metron Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel). - [x] Does your PR title start with METRON- where is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [x] Has your PR been rebased against the latest commit within the target branch (typically master)? ### For code changes: - [x] Have you included steps to reproduce the behavior or problem that is being changed or addressed? - [x] Have you included steps or a guide to how the change may be verified and tested manually? - [x] Have you ensured that the full suite of tests and checks have been executed in the root metron folder via: ``` mvn -q clean integration-test install && dev-utilities/build-utils/verify_licenses.sh ``` - [x] Have you written or updated unit tests and or integration tests to verify your changes? - [x] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [x] Have you verified the basic functionality of the build by building and running locally
[GitHub] metron issue #1219: METRON-1796: [UI] Migrate off moment.js
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1219 Thanks, Tamas! Reviewed and tested. +1 ---
[GitHub] metron issue #1217: METRON-1749: Update Angular to latest release in Managem...
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1217 Great improvement! Thanks, Shane! +1 ---
[GitHub] metron issue #1208: METRON-1790: Unsubscribe from every observable in the pc...
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1208 @nickwallen The concept here is observable is a stream of events. The basic rule is to unsubscribe when you no longer want to know about new values from a particular stream. (RxJs/Angular handling observables like streams, even if we know that there will be just one value. It's highly recommended to ignore that.) An error is just a possible new value from a stream. It could be followed by an actual value and then an error again. Actually, you are right with your concerns. The original implementation here gives no chance to handle events in a reactive way. In my opinion, our real streams here are the following: - the stream of clicks on query button (leads to a request) - the stream of clicks on the cancel button (leads to a cancel request) - the stream of PCAP values (leads to rendering table) - a stream of status changes (leads to updating several UI controls) - a stream of percentages (leads to updating progress bar) And we only want to unsubscribe from these streams when the user navigates away to the alert tab. If an error occurs, the job fails, user click cancel we like to continue observing them. Unfortunately, the implementation creates new observables on every click instead of observing the stream of clicks. This leads to the fact that we unsubscribing and resubscribing all the time. Also makes this code hard to understand and explain any change or small improvement. However, IMHO unsubscribe implemented in this PR is an improvement, still not the perfect state of this code part. I suggest @ruffle1986 to create a followup ticket which is about "Implementing proper reactive event handling in PCAP". And another about "Refactor out PCAP querying logic from PCAP panel and move it to the service". That would also make things way clearer here, hence right now the panel contains all the query logic. ---
[GitHub] metron pull request #1226: METRON-1803: Integrate Cypress with Travis
Github user tiborm commented on a diff in the pull request: https://github.com/apache/metron/pull/1226#discussion_r224759531 --- Diff: metron-interface/metron-alerts/cypress/support/commands.js --- @@ -0,0 +1,43 @@ +/** --- End diff -- Some files look like placeholders but cypress needs them. Cypress regenerates all at a run if we remove them. I think it's easier to keep them in Git instead of cleaning them every time we running tests locally. ---
[GitHub] metron pull request #1226: METRON-1803: Integrate Cypress with Travis
Github user tiborm commented on a diff in the pull request: https://github.com/apache/metron/pull/1226#discussion_r224761311 --- Diff: metron-interface/metron-alerts/cypress/integration/pcap/pcap.spec.js --- @@ -0,0 +1,228 @@ +/// --- End diff -- This turns on cypress specific intellisense in VSCode and some other editors. I have removed it at first but code completion etc. are way more intelligent with this setup. You can read more about it here https://docs.cypress.io/guides/tooling/intelligent-code-completion.html#Triple-slash-directives ---
[GitHub] metron issue #1226: METRON-1803: Integrate Cypress with Travis
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1226 @mmiklavc The log output with multiple errors looks exactly as you described. The test file size is like that because it contains the copy of a full response. This makes the mock creation and maintenance very easy. (Just copy/pasting within seconds.) It's also closer to the actual behaviour of the app. A test might pass with 1 or 2 records but could fail if we have 50. The response files are reused across tests. ---
[GitHub] metron issue #1226: METRON-1803: Integrate Cypress with Travis
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1226 I just made some more improvement on this: - I was able to remove one big fixture file - removed unused support and plugin files (also found configs to prevent cypress to regenerate them) ---
[GitHub] metron pull request #1226: METRON-1803: Integrate Cypress with Travis
Github user tiborm commented on a diff in the pull request: https://github.com/apache/metron/pull/1226#discussion_r225446653 --- Diff: metron-interface/metron-alerts/package.json --- @@ -5,12 +5,14 @@ "angular-cli": {}, "scripts": { "build": "./node_modules/@angular/cli/bin/ng build --prod", -"start": "ng serve", +"start": "ng serve --aot", --- End diff -- Thanks @ruffle1986 for checking this! We've got the ahead of time compilation turned on in our start scripts too. It's needed because of the lazy loading of the PCAP UI. ---
[GitHub] metron issue #1226: METRON-1803: Integrate Cypress with Travis
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1226 @mmiklavc Yes, that's the main file. Cypress.conf.json contains 4 line of configs and package.json 3 lines of changes required by the integration. Anything else is test response data. ---
[GitHub] metron pull request #1240: METRON-1830: Re-implement Alerts dialog box witho...
Github user tiborm commented on a diff in the pull request: https://github.com/apache/metron/pull/1240#discussion_r226589952 --- Diff: metron-interface/metron-alerts/src/app/alerts/alerts-list/table-view/table-view.component.ts --- @@ -259,19 +259,25 @@ export class TableViewComponent implements OnInit, OnChanges, OnDestroy { } deleteOneAlertFromMetaAlert($event, alert: Alert, metaAlertIndex: number) { -this.metronDialogBox.showConfirmationMessage('Do you wish to remove the alert from the meta alert?').subscribe(response => { - if (response) { +let confirmedSubscription = this.dialogService.confirm('Do you wish to remove the alert from the meta alert?').subscribe(r => { --- End diff -- I would use const here (and all the other places) too. ---
[GitHub] metron pull request #1240: METRON-1830: Re-implement Alerts dialog box witho...
Github user tiborm commented on a diff in the pull request: https://github.com/apache/metron/pull/1240#discussion_r226597603 --- Diff: metron-interface/metron-alerts/src/app/alerts/alerts-list/table-view/table-view.component.ts --- @@ -259,19 +259,25 @@ export class TableViewComponent implements OnInit, OnChanges, OnDestroy { } deleteOneAlertFromMetaAlert($event, alert: Alert, metaAlertIndex: number) { -this.metronDialogBox.showConfirmationMessage('Do you wish to remove the alert from the meta alert?').subscribe(response => { - if (response) { +let confirmedSubscription = this.dialogService.confirm('Do you wish to remove the alert from the meta alert?').subscribe(r => { + if (r === 'Confirmed') { this.doDeleteOneAlertFromMetaAlert(alert, metaAlertIndex); } + if (r !== 'Initial') { --- End diff -- What if we remove the if statement and simply unsubscribe at the end of this function? With that, I think we could be able to remove 'Initial' value from ConfirmationType and the dispatching of 'Initial' from the first line of DialogService.confirm function. Could we keep the same functionality with this simplification? Also, we can call variable 'r' like 'action' if we remove the coco egg. ---
[GitHub] metron pull request #1240: METRON-1830: Re-implement Alerts dialog box witho...
Github user tiborm commented on a diff in the pull request: https://github.com/apache/metron/pull/1240#discussion_r226576832 --- Diff: metron-interface/metron-alerts/src/app/alerts/alert-details/alert-details.component.ts --- @@ -249,8 +249,8 @@ export class AlertDetailsComponent implements OnInit { commentText += ' \'' + this.alertCommentsWrapper[index].alertComment.comment + '\''; } - this.metronDialogBox.showConfirmationMessage(commentText).subscribe(response => { - if (response) { +let confirmedSubscription = this.dialogService.confirm(commentText).subscribe(r => { --- End diff -- Could we use const here instead of let? It might be better to move the logic inside this subscription to a function like in saved-serches.component.ts #67 or in table-view.component.ts #428 ---
[GitHub] metron pull request #1240: METRON-1830: Re-implement Alerts dialog box witho...
Github user tiborm commented on a diff in the pull request: https://github.com/apache/metron/pull/1240#discussion_r226589395 --- Diff: metron-interface/metron-alerts/src/app/alerts/alerts-list/table-view/table-view.component.ts --- @@ -72,15 +72,15 @@ export class TableViewComponent implements OnInit, OnChanges, OnDestroy { @Output() onSelectedAlertsChange = new EventEmitter< Alert[]>(); constructor(searchService: SearchService, - metronDialogBox: MetronDialogBox, updateService: UpdateService, metaAlertService: MetaAlertService, - globalConfigService: GlobalConfigService) { + globalConfigService: GlobalConfigService, + dialogService: DialogService) { this.searchService = searchService; -this.metronDialogBox = metronDialogBox; this.updateService = updateService; this.metaAlertService = metaAlertService; this.globalConfigService = globalConfigService; +this.dialogService = dialogService; --- End diff -- In other places, you haven't assigning injected dialogService to a field but relying on Angular automagic. I see you tried to stay consistent with the original constructor impl, but might worth considering to building up a consistency on an application level. ---
[GitHub] metron pull request #1240: METRON-1830: Re-implement Alerts dialog box witho...
Github user tiborm commented on a diff in the pull request: https://github.com/apache/metron/pull/1240#discussion_r226597922 --- Diff: metron-interface/metron-alerts/src/app/alerts/alerts-list/tree-view/tree-view.component.ts --- @@ -421,10 +423,13 @@ export class TreeViewComponent extends TableViewComponent implements OnInit, OnC if (this.canCreateMetaAlert(group.total)) { let confirmationMsg = 'Do you wish to create a meta alert with ' + (group.total === 1 ? ' alert' : group.total + ' selected alerts') + '?'; - this.metronDialogBox.showConfirmationMessage(confirmationMsg).subscribe((response) => { -if (response) { + let confirmedSubscription = this.dialogService.confirm(confirmationMsg).subscribe(r => { +if (r === 'Confirmed') { --- End diff -- I suggest to use (r === ConfirmationType.Confirmed) instead of the string literal. ---
[GitHub] metron issue #1240: METRON-1830: Re-implement Alerts dialog box without jQue...
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1240 Thanks, Shane. +1 ---
[GitHub] metron issue #1226: METRON-1803: Integrate Cypress with Travis
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1226 @mmiklavc @justinleet I created a ticket to track the migration of protractor tests to cypress. https://issues.apache.org/jira/browse/METRON-1848 All the existing tests are collected and listed for migration. As part of the migration, my plan is to keep E2E nature of the existing tests. This means I will ensure the tests are able to run against an actual service if available. Otherwise, the runner turns the mocks responses on. ---
[GitHub] metron issue #1226: METRON-1803: Integrate Cypress with Travis
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1226 You are right @mmiklavc, this is an additional step to our build process. So it makes our build slightly slower. However, the two minutes come from the nature of PCAP. It has a built-in 10-second delay every time we check the job status. What makes these particular tests slower. With mocking out the time I was able to speed them up by 50%. I think it's also a good practice for the upcoming tests to keep them fast with this trick. ---