答案 0 :(得分:3)
您可以向 @ViewChild("elementToTrack") el: ElementRef;
@HostListener("window:scroll", ["$event"])
onWindowScroll() {
if (this.el.nativeElement.getBoundingClientRect().bottom == window.innerHeight) {
//do your thing
}
}
发送GET
请求,其中/process-groups/{id}/variable-registry
是您感兴趣的进程组ID。您将收到类似于以下内容的JSON响应:
{id}
所有内容都记录在{em>进程组下的Apache NiFi REST API page中。您还可以使用浏览器的开发人员工具面板检查NiFi UI在与UI交互时向服务器发出的请求,以观察进行了哪些调用。
答案 1 :(得分:1)
您还可以使用Community NiFi Python Client: NiPyApi
轻松获取它们Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 03:03:55)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
>> import nipyapi
# Get your ProcessGroup object
>> pg = nipyapi.canvas.get_process_group('myProcessGroup')
# Get the VariableRegistry for that ProcessGroup
>> vars = nipyapi.canvas.get_variable_registry(pg)
>> vars.variable_registry.variables
[{'can_write': True,
'variable': {'affected_components': [],
'name': 'foo',
'process_group_id': 'fb88a5cb-0164-1000-d5ce-d89ad0e93df2',
'value': 'bar'}}]