Small INT app and UI improvements
[INT App]
- Load INT report config when activate the app
- Remove config listener and config factory from app when deactivate
- Check INT intent map before remove a INT intent
- Add more check to check the input from frontend UI
- Change log level of UI message handler from info to debug
[GUI1]
- Reformat CSS code
- Remove '$scope.sendIntConfigString' which breaks the UI
- Fix regular expression that matches IP prefix
- Remove "required" attribute from all field
- Add additional check to prevent sending invalid input to backend
- Use 'let' instead of 'var' to limit the scope of variable
- Make INT button aligned with other elements
- Show message if any field is invalid
[GUI2]
- Remove INT collector config panel
- Reformat HTML code
- Fix regular expression which matches the IP prefix
[API]
- Add default value '0' for all fields in INT device config
- Skip checking the metadata types when building the IntObjective since
some pipeline won't need it
Change-Id: I3f37c3fd385bf4df067393717e1afc5fe58cb8b0
diff --git a/apps/inbandtelemetry/intApp-gui2/intApp/lib/intapp/intapp.component.ts b/apps/inbandtelemetry/intApp-gui2/intApp/lib/intapp/intapp.component.ts
index ea2a328..c4f9ba4 100644
--- a/apps/inbandtelemetry/intApp-gui2/intApp/lib/intapp/intapp.component.ts
+++ b/apps/inbandtelemetry/intApp-gui2/intApp/lib/intapp/intapp.component.ts
@@ -28,10 +28,7 @@
// constants
const intIntentAddReq = 'intIntentAddRequest';
const intIntentDelReq = 'intIntentDelRequest';
-const intConfigAddReq = 'intConfigAddRequest';
-const regColIp = '^([0-9]{1,3}\\.){3}[0-9]{1,3}$';
-const regColPort = '^[0-9]{0,5}$';
-const regSendIp = '^([0-9]{1,3}\\.){3}[0-9]{1,3}(/[0-9]{1,2})?$'
+const regSendIp = '^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/[0-9]{1,2})?$'
const regSendPort ='^[0-9]{0,5}$'
export interface Metadata {
@@ -86,10 +83,6 @@
l4DstPort: new FormControl(null, [ Validators.pattern(regSendPort)]),
protocol: new FormControl(),
});
- this.formConf = this.fb.group({
- colIp: new FormControl(null, [Validators.required, Validators.pattern(regColIp)]),
- colPort: new FormControl( null, [Validators.required, Validators.pattern(regColPort)])
- });
this.log.debug('IntAppComponent initialized');
}
@@ -117,17 +110,6 @@
}
}
- sendIntConfigString() {
- if (this.formConf.invalid) {
- return;
- }
- let configObjectNode = {
- "collectorIp": this.formConf.value.colIp,
- "collectorPort": this.formConf.value.colPort
- };
- this.wss.sendEvent(intConfigAddReq, configObjectNode);
- }
-
sendIntIntentString() {
if (this.formSend.invalid) {
return;