Skip to content

Commit

Permalink
Merge pull request #69 from cloudera/CYB-201
Browse files Browse the repository at this point in the history
  • Loading branch information
vpavlenko-cv authored Apr 20, 2024
2 parents 97aaef0 + 3a451e1 commit 1cbd0f0
Show file tree
Hide file tree
Showing 146 changed files with 13,719 additions and 8,174 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,26 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-
- name: Build and Test with Maven
run: mvn -B package --file flink-cyber/pom.xml
run: mvn -P '!add-depebdencies-for-IDEA,!full-build,!include-front-end' -B package --file flink-cyber/pom.xml

# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
uses: advanced-security/maven-dependency-submission-action@v3
with:
directory: /home/runner/work/cybersec/cybersec/flink-cyber
build_and_test_angular:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install Angular CLI
run: npm install -g @angular/cli
- name: Install dependencies
run: npm install
working-directory: ./flink-cyber/metron-parser-chain/parser-chains-config-service/frontend/parser-chains-client
- name: Run test
run: npm run test:headless
working-directory: ./flink-cyber/metron-parser-chain/parser-chains-config-service/frontend/parser-chains-client
1 change: 0 additions & 1 deletion flink-cyber/flink-commands/json-commands/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
<version>${log4j.version}</version>
<scope>provided</scope>
</dependency>

</dependencies>

<build>
Expand Down
5 changes: 5 additions & 0 deletions flink-cyber/flink-commands/scoring-commands/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
<artifactId>scoring-commands</artifactId>

<dependencies>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-java</artifactId>
<version>${flink.version}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.util.StringUtils;
import org.apache.commons.lang3.StringUtils;

@Data
@NoArgsConstructor
Expand Down Expand Up @@ -43,12 +43,15 @@ public String getRawKafkaName(){
}

public String getPath() {
return StringUtils.hasText(path)
? (path.equals(".") ? "" : path)
: "extensions";
if (StringUtils.isEmpty(path)) {
return "extensions";
} else if (path.equals(".")) {
return "";
}
return path;
}

public Boolean getIsMap() {
public boolean getIsMap() {
return isMap == null ? path == null : isMap;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,44 @@
"ignorePatterns": [
"projects/**/*"
],
"rules": {
"valid-jsdoc" : "off"
},
"overrides": [
{

"files": ["*.actions.ts"],
"parserOptions": {
"project": [
"tsconfig.json",
"e2e/tsconfig.json"
],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/ng-cli-compat",
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "class",
"format": ["PascalCase"],
"custom": {
"regex": "Action$",
"match": true
}
}
]
}
},
{
"files": [
"*.ts"
],
"excludedFiles": ["*.actions.ts", "*.spec.ts"],
"parserOptions": {
"project": [
"tsconfig.json",
Expand All @@ -16,10 +49,74 @@
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/ng-cli-compat",
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"no-unused-vars": "off",
"jsdoc/check-alignment": "off",
"jsdoc/check-param-names": "off",
"@typescript-eslint/adjacent-overload-signatures": "off",
"jsdoc/newline-after-description": "off",
"eslint-plugin/require-meta-fixable": "off",
"prefer-arrow/prefer-arrow-functions": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/prefer-enum-initializers": "off",
"indent": "off",
"simple-import-sort/imports": "off",
"array-bracket-spacing": "off",
"no-underscore-dangle": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
],
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "objectLiteralProperty",
"format": null
},
{
"selector": "enumMember",
"format": ["UPPER_CASE"]
},
{
"selector": "classProperty",
"modifiers": ["static"],
"format": ["UPPER_CASE"]
},
{
"selector": "variable",
"format": ["camelCase", "UPPER_CASE", "PascalCase"],
"leadingUnderscore": "allow",
"trailingUnderscore": "allow"
},
{
"selector": "function",
"format": ["camelCase", "PascalCase"]
},
{
"selector": "typeLike",
"format": ["PascalCase"]
},
{
"selector": "memberLike",
"format": ["camelCase"],
"leadingUnderscore": "forbid"
},
{
"selector": "memberLike",
"modifiers": ["private"],
"format": ["camelCase"],
"leadingUnderscore": "require"
}
],
"@angular-eslint/component-selector": [
"error",
{
Expand All @@ -36,7 +133,7 @@
"type": "attribute"
}
],
"@angular-eslint/no-empty-lifecycle-method": "off"
"@angular-eslint/no-empty-lifecycle-method": "error"
}
},
{
Expand All @@ -46,7 +143,53 @@
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {}
"rules": {
"@angular-eslint/template/no-negated-async": "warn",
"@angular-eslint/template/eqeqeq": "off"
}
},
{
"files": [
"*.spec.ts"
],
"parserOptions": {
"project": [
"tsconfig.json",
"e2e/tsconfig.json"
],
"createDefaultProgram": true
},
"plugins": [
"jasmine"
],
"extends": [
"plugin:jasmine/recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"simple-import-sort/imports": "off",
"jasmine/new-line-before-expect": "off",
"@typescript-eslint/naming-convention": "off",
"jasmine/no-unsafe-spy": "off",
"no-restricted-globals": [
"error",
"event"
],
"@typescript-eslint/no-shadow": "warn",
"no-underscore-dangle": "off",
"no-useless-escape": "off",
"@angular-eslint/prefer-on-push-component-change-detection": "off",
"jasmine/prefer-toHaveBeenCalledWith": "off",
"jasmine/no-spec-dupes": [
"error",
"branch"
],
"jasmine/no-suite-dupes": [
"error",
"branch"
],
"jasmine/no-global-setup": "off"
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
{
"glob": "**/*",
"input": "node_modules/ngx-monaco-editor-v2",
"output": "/assets/monaco-editor/"
"output": "/assets/monaco-editor/min"
}
]
}
Expand Down Expand Up @@ -239,5 +239,6 @@
}
}
}
}
},
"defaultProject": "parser-chaining"
}
Loading

0 comments on commit 1cbd0f0

Please sign in to comment.