mcgilman commented on code in PR #8399: URL: https://github.com/apache/nifi/pull/8399#discussion_r1489650071
########## nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-configuration-history/ui/flow-configuration-history-listing/flow-configuration-history-listing.component.scss: ########## @@ -0,0 +1,26 @@ +/*! + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +.flow-configuration-history-listing { + .mdc-text-field__input::-webkit-calendar-picker-indicator { + display: block; + } + + .purge > button { + margin-top: 12px; Review Comment: Any reason to not use `mt-3`? ########## nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-configuration-history/ui/flow-configuration-history-listing/flow-configuration-history-listing.component.ts: ########## @@ -0,0 +1,288 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Component, DestroyRef, inject, OnDestroy, OnInit } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import * as HistoryActions from '../../state/flow-configuration-history-listing/flow-configuration-history-listing.actions'; +import { loadHistory } from '../../state/flow-configuration-history-listing/flow-configuration-history-listing.actions'; +import { + ActionEntity, + FlowConfigurationHistoryListingState, + HistoryQueryRequest +} from '../../state/flow-configuration-history-listing'; +import { Store } from '@ngrx/store'; +import { + selectFlowConfigurationHistoryListingState, + selectedHistoryItem, + selectHistoryQuery +} from '../../state/flow-configuration-history-listing/flow-configuration-history-listing.selectors'; +import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; +import { initialHistoryState } from '../../state/flow-configuration-history-listing/flow-configuration-history-listing.reducer'; +import { MatPaginatorModule, PageEvent } from '@angular/material/paginator'; +import { FlowConfigurationHistoryTable } from './flow-configuration-history-table/flow-configuration-history-table.component'; +import { Sort } from '@angular/material/sort'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { isDefinedAndNotNull } from '../../../../state/shared'; +import { FormBuilder, FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatInputModule } from '@angular/material/input'; +import { MatOptionModule } from '@angular/material/core'; +import { MatSelectModule } from '@angular/material/select'; +import { MatDatepickerModule } from '@angular/material/datepicker'; +import { selectAbout } from '../../../../state/about/about.selectors'; +import { loadAbout } from '../../../../state/about/about.actions'; +import { debounceTime } from 'rxjs'; +import { NiFiCommon } from '../../../../service/nifi-common.service'; +import { MatButtonModule } from '@angular/material/button'; +import { selectCurrentUser } from '../../../../state/current-user/current-user.selectors'; + +interface FilterableColumn { + key: string; + label: string; +} + +@Component({ + selector: 'flow-configuration-history-listing', + standalone: true, + imports: [ + CommonModule, + NgxSkeletonLoaderModule, + MatPaginatorModule, + FlowConfigurationHistoryTable, + ReactiveFormsModule, + MatFormFieldModule, + MatInputModule, + MatOptionModule, + MatSelectModule, + MatDatepickerModule, + MatButtonModule + ], + templateUrl: './flow-configuration-history-listing.component.html', + styleUrls: ['./flow-configuration-history-listing.component.scss'] +}) +export class FlowConfigurationHistoryListing implements OnInit, OnDestroy { + private static readonly DEFAULT_START_TIME: string = '00:00:00'; + private static readonly DEFAULT_END_TIME: string = '23:59:59'; + private static readonly TIME_REGEX = /^([0-1]\d|2[0-3]):([0-5]\d):([0-5]\d)$/; + private destroyRef = inject(DestroyRef); + + historyListingState$ = this.store.select(selectFlowConfigurationHistoryListingState); + historyQuery$ = this.store.select(selectHistoryQuery); Review Comment: This is unused and the same selection as `queryRequest$` below. ########## nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-configuration-history/ui/flow-configuration-history-listing/flow-configuration-history-table/flow-configuration-history-table.component.ts: ########## @@ -0,0 +1,110 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Component, EventEmitter, Input, Output } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { MatTableDataSource, MatTableModule } from '@angular/material/table'; +import { MatSortModule, Sort } from '@angular/material/sort'; +import { ActionEntity } from '../../../state/flow-configuration-history-listing'; +import { NiFiCommon } from '../../../../../service/nifi-common.service'; + +@Component({ + selector: 'flow-configuration-history-table', + standalone: true, + imports: [CommonModule, MatTableModule, MatSortModule], + templateUrl: './flow-configuration-history-table.component.html', + styleUrls: ['./flow-configuration-history-table.component.scss'] +}) +export class FlowConfigurationHistoryTable { + @Input() selectedHistoryActionId: number | null = null; Review Comment: Does this need to be an `@Input` and saved in the state. We have a few other cases of table selection scenarios where we are not deep linking and the component just internally manages the selected row. -- 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]
