From 96e2707add3afa3f4e4f2c7dc9fba48e19aecdca Mon Sep 17 00:00:00 2001 From: Pavel Zavora Date: Fri, 14 May 2021 05:51:05 +0200 Subject: [PATCH] feat(ui): add collector property to zenoss config --- .../components/config/ZenossConfig.tsx | 17 ++++++++++++++++- ui/src/types/kapacitor.ts | 1 + 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ui/src/kapacitor/components/config/ZenossConfig.tsx b/ui/src/kapacitor/components/config/ZenossConfig.tsx index c8f46b4d5..756908227 100644 --- a/ui/src/kapacitor/components/config/ZenossConfig.tsx +++ b/ui/src/kapacitor/components/config/ZenossConfig.tsx @@ -13,6 +13,7 @@ interface Config { method: string type: string tid: number + collector: string 'severity-map': { ok: string info: string @@ -44,6 +45,7 @@ class ZenossConfig extends PureComponent { private method: HTMLInputElement private type: HTMLInputElement private tid: HTMLInputElement + private collector: HTMLInputElement private ok: HTMLInputElement private info: HTMLInputElement private warning: HTMLInputElement @@ -66,6 +68,7 @@ class ZenossConfig extends PureComponent { method, type, tid, + collector, 'severity-map': {ok, info, warning, critical}, } = this.props.config.options const {testEnabled, enabled} = this.state @@ -105,7 +108,7 @@ class ZenossConfig extends PureComponent { />
- + { onChange={this.disableTest} />
+
+ + (this.collector = r)} + defaultValue={collector || ''} + onChange={this.disableTest} + /> +
@@ -257,6 +271,7 @@ class ZenossConfig extends PureComponent { method: this.method.value, type: this.type.value, tid, + collector: this.collector.value, 'severity-map': { ok: this.ok.value, info: this.info.value, diff --git a/ui/src/types/kapacitor.ts b/ui/src/types/kapacitor.ts index 30546b934..0753d6974 100644 --- a/ui/src/types/kapacitor.ts +++ b/ui/src/types/kapacitor.ts @@ -463,6 +463,7 @@ export interface ZenossProperties { method: string type: string tid: number + collector: string 'severity-map': { ok: string info: string