rfellows commented on code in PR #8652:
URL: https://github.com/apache/nifi/pull/8652#discussion_r1567379493
##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/service/property-table-helper.service.ts:
##########
@@ -37,20 +38,30 @@ import { Client } from './client.service';
import { NiFiState } from '../state';
import { Store } from '@ngrx/store';
import { snackBarError } from '../state/error/error.actions';
-import { HttpErrorResponse } from '@angular/common/http';
+import { HttpClient, HttpErrorResponse } from '@angular/common/http';
import { LARGE_DIALOG, SMALL_DIALOG } from '../index';
@Injectable({
providedIn: 'root'
})
export class PropertyTableHelperService {
+ private static readonly API: string = '../nifi-api';
+
constructor(
+ private httpClient: HttpClient,
private dialog: MatDialog,
private store: Store<NiFiState>,
private extensionTypesService: ExtensionTypesService,
private client: Client
) {}
+ getComponentHistory(componentId: string):
Observable<ComponentHistoryEntity> {
+ console.log('fetching component history from', componentId);
Review Comment:
Should remove this `console.log`
##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/ui/common/property-table/property-table.component.ts:
##########
@@ -396,7 +398,8 @@ export class PropertyTable implements AfterViewInit,
ControlValueAccessor {
getPropertyTipData(item: PropertyItem): PropertyTipInput {
return {
- descriptor: item.descriptor
+ descriptor: item.descriptor,
+ propertyHistory:
this.propertyHistory?.propertyHistory[item.property]
Review Comment:
Not really an issue with this code exactly, but the closest place to make
the comment contextual...
We only display the tooltip if the property `hasInfo`. In my case, I have a
CS with a dynamic property and it fails that test so the history is
inaccessible via tooltip. I think we might want to add a new boolean helper
like:
```
hasHistory(item: PropertyItem): boolean {
return !!this.propertyHistory?.propertyHistory[item.property];
}
```
then update the logic in the template to be something like:
```
<div>
@if (hasInfo(item.descriptor) ||
hasHistory(item)) {
<div
class="fa fa-question-circle
primary-color"
nifiTooltip
[tooltipComponentType]="PropertyTip"
[tooltipInputData]="getPropertyTipData(item)"
[delayClose]="false"></div>
}
</div>
```
It looks like this will solve the same issue for all of the various
Controller Settings configuration dialogs
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]