-
Notifications
You must be signed in to change notification settings - Fork 512
Conversation
…me only if it doesn't exist and patternLabel is not appended to grokStatement (that now happens in middleware). Changed Stellar panel to Raw JSON.
… local filesystem. Also fixed some corner cases for sensorParserConfigHistoryService (history doesn't exist, deleting a history that doesn't exist, etc). Added context path to integration tests.
# Conflicts: # metron-interface/metron-rest/src/main/java/org/apache/metron/rest/service/SensorParserConfigHistoryService.java
# Conflicts: # pom.xml
…nd switch karma test runner to PhantomJS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initial review (incomplete)
<metron-config-ace-editor [(ngModel)]="newGrokStatement" [ngModelOptions]="{standalone: true}" [type]="'GROK'" [options]="grokFunctionList" [placeHolder]="'Enter Grok statement'"> </metron-config-ace-editor> | ||
|
||
<div class="buttons-bar"> | ||
<button type="submit" class="btn form-enable-disable-button" [disabled]="parseMessageRequest.sampleData.length===0 || newGrokStatement.length===0" (click)="onTestGrokStatement()">TEST</button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this logic be in controller?
<button class="btn btn-primary" type="button" (click)="onEditSensor()" [disabled]="startStopInProgress">EDIT</button> | ||
|
||
<button class="btn btn-primary" type="button" (click)="onStartSensor()" [disabled]="startStopInProgress" [hidden]="(topologyStatus.status != 'Stopped')">START</button> | ||
<button class="btn form-enable-disable-button" type="button" (click)="onStopSensor()" [disabled]="startStopInProgress" [hidden]="((topologyStatus.status != 'Running' && topologyStatus.status != 'Disabled'))">STOP</button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
controller logic?
</div> | ||
</div> | ||
<div class="col-xs-12 form-label threatIntel">{{ getRuleDisplayName() }}</div> | ||
<a *ngIf="rules.length>0" class="collapsed blue-label font-weight-bold col-xs-8 col-xs-push-4" data-toggle="collapse" href="#collapseThreatTriage" aria-expanded="false" aria-controls="collapseThreatTriage" #threatTriageLink (click)="threatTriageLink.text=(threatTriageLink.text==='show more')?'show less':'show more'">show more</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be encapsulated in a controller function?
@@ -0,0 +1,51 @@ | |||
{ | |||
"project": { | |||
"version": "1.0.0-beta.15", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we version this to match Metron versions? It's likely to run lock step with Metron from a release perspective.
disableParser() { | ||
return waitForElementVisibility(this.disableButton).then(() => { | ||
return this.disableButton.click().then(() => { | ||
return waitForElementVisibility(this.enableButton).then(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
promises should be really chained rather than nested... see other instances in this class too.
|
||
</div> | ||
|
||
<br> <br> <br> <br> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better handled with styling css padding rather than linebreaks.
expect(component.globalConfig).toEqual(globalConfigService._config); | ||
})); | ||
|
||
it('should load save config', async(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should report save config?
|
||
})); | ||
|
||
it('should load save config', async(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicate test name
}) | ||
export class GeneralSettingsComponent implements OnInit { | ||
|
||
@ViewChild('globalSettingsForm') globalSettingsForm: any; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type should be limited to the child component type
|
||
private fieldValidations: string; | ||
|
||
constructor(private globalConfigService: GlobalConfigService, private metronAlerts: MetronAlerts, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why this class is serialising to JSON for fieldValidations. Feels like unnecessary overhead.
Contributor Comments
This PR includes the latest version of the Management UI. Instructions for building and installing are located in metron-interface/metron-config/README.md.
Here are the commands I used to deploy to Quick Dev:
The UI should be available at http://node1:4200 (login with user/password).
So far this UI has only been dev tested and there will likely be some bugs found. If reviewers feel they have found a critical bug that should be fixed before this can be accepted, please state that and we will address it ASAP. Otherwise I will create Jiras for bugs/issues that can be done as follow on work.
This is a very large pull request that contains mostly client-side code. The application was built on the Angular 2 framework using Angular CLI.
Changes that are outside of metron-interface/metron-config (Management UI module) include:
There are a couple tasks still outstanding so don't merge until those are complete. These tasks should not affect functional testing or code review. They include:
npm test
in the metron-config directory, they just don't get executed on a top level build yet)I will keep the thread updated as these are completed. Thanks for reviewing!
Pull Request Checklist
Thank you for submitting a contribution to Apache Metron (Incubating).
Please refer to our Development Guidelines for the complete guide to follow for contributions.
Please refer also to our Build Verification Guidelines 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:
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 incubating-metron folder via:
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?
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
: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 recommened that travis-ci is set up for your personal repository such that your branches are built there before submitting a pull request.