Re: [PR] [NIFI-12504] Remaining views on Summary page [nifi]
mcgilman merged PR #8174: URL: https://github.com/apache/nifi/pull/8174 -- 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: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [NIFI-12504] Remaining views on Summary page [nifi]
rfellows commented on PR #8174: URL: https://github.com/apache/nifi/pull/8174#issuecomment-1867852929 recheck -- 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: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [NIFI-12504] Remaining views on Summary page [nifi]
rfellows commented on code in PR #8174: URL: https://github.com/apache/nifi/pull/8174#discussion_r1434145848 ## nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/summary/ui/common/port-status-table/port-status-table.component.ts: ## @@ -0,0 +1,281 @@ +/* + * 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 { MatSortModule, Sort, SortDirection } from '@angular/material/sort'; +import { MultiSort } from '../index'; +import { MatTableDataSource, MatTableModule } from '@angular/material/table'; +import { PortStatusSnapshot, PortStatusSnapshotEntity } from '../../../state/summary-listing'; +import { SummaryTableFilterModule } from '../summary-table-filter/summary-table-filter.module'; +import { +SummaryTableFilterArgs, +SummaryTableFilterColumn +} from '../summary-table-filter/summary-table-filter.component'; +import { ComponentType } from '../../../../../state/shared'; +import { RouterLink } from '@angular/router'; +import { NiFiCommon } from '../../../../../service/nifi-common.service'; + +export type SupportedColumns = 'name' | 'runStatus' | 'in' | 'out'; + +@Component({ +selector: 'port-status-table', +standalone: true, +imports: [CommonModule, SummaryTableFilterModule, MatSortModule, MatTableModule, RouterLink], +templateUrl: './port-status-table.component.html', +styleUrls: ['./port-status-table.component.scss', '../../../../../../assets/styles/listing-table.scss'] +}) +export class PortStatusTable { +private _initialSortColumn: SupportedColumns = 'name'; +private _initialSortDirection: SortDirection = 'asc'; +private _portType!: 'input' | 'output'; + +filterableColumns: SummaryTableFilterColumn[] = [{ key: 'name', label: 'name' }]; + +totalCount: number = 0; +filteredCount: number = 0; + +multiSort: MultiSort = { +active: this._initialSortColumn, +direction: this._initialSortDirection, +sortValueIndex: 0, +totalValues: 2 +}; + +displayedColumns: string[] = []; + +dataSource: MatTableDataSource = new MatTableDataSource(); + +constructor(private nifiCommon: NiFiCommon) {} + +@Input() set portType(type: 'input' | 'output') { +if (type === 'input') { +this.displayedColumns = ['moreDetails', 'name', 'runStatus', 'in', 'actions']; +} else { +this.displayedColumns = ['moreDetails', 'name', 'runStatus', 'out', 'actions']; +} +this._portType = type; +} + +get portType() { +return this._portType; +} + +@Input() selectedPortId!: string; + +@Input() set initialSortColumn(initialSortColumn: SupportedColumns) { +this._initialSortColumn = initialSortColumn; +this.multiSort = { ...this.multiSort, active: initialSortColumn }; +} + +get initialSortColumn() { +return this._initialSortColumn; +} + +@Input() set initialSortDirection(initialSortDirection: SortDirection) { +this._initialSortDirection = initialSortDirection; +this.multiSort = { ...this.multiSort, direction: initialSortDirection }; +} + +get initialSortDirection() { +return this._initialSortDirection; +} + +@Input() set ports(ports: PortStatusSnapshotEntity[]) { +if (ports) { +this.dataSource.data = this.sortEntities(ports, this.multiSort); +this.dataSource.filterPredicate = (data: PortStatusSnapshotEntity, filter: string) => { +const filterArray: string[] = filter.split('|'); Review Comment: Good catch. I'll come up with a solution -- 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: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [NIFI-12504] Remaining views on Summary page [nifi]
mcgilman commented on code in PR #8174: URL: https://github.com/apache/nifi/pull/8174#discussion_r1434084192 ## nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/summary/ui/connection-status-listing/connection-status-table/connection-status-table.component.html: ## @@ -0,0 +1,205 @@ + + + + + + + + + + + + + + + + + +Name + + +{{ formatName(item) }} + + + + + + + +Queue +(Size) +5 min + + + +{{ formatQueue(item) }} + + + + + + Review Comment: This title is not accurate ## nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/summary/ui/common/port-status-table/port-status-table.component.ts: ## @@ -0,0 +1,281 @@ +/* + * 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 { MatSortModule, Sort, SortDirection } from '@angular/material/sort'; +import { MultiSort } from '../index'; +import { MatTableDataSource, MatTableModule } from '@angular/material/table'; +import { PortStatusSnapshot, PortStatusSnapshotEntity } from '../../../state/summary-listing'; +import { SummaryTableFilterModule } from '../summary-table-filter/summary-table-filter.module'; +import { +SummaryTableFilterArgs, +SummaryTableFilterColumn +} from '../summary-table-filter/summary-table-filter.component'; +import { ComponentType } from '../../../../../state/shared'; +import { RouterLink } from '@angular/router'; +import { NiFiCommon } from '../../../../../service/nifi-common.service'; + +export type SupportedColumns = 'name' | 'runStatus' | 'in' | 'out'; + +@Component({ +selector: 'port-status-table', +standalone: true, +imports: [CommonModule, SummaryTableFilterModule, MatSortModule, MatTableModule, RouterLink], +templateUrl: './port-status-table.component.html', +styleUrls: ['./port-status-table.component.scss', '../../../../../../assets/styles/listing-table.scss'] +}) +export class PortStatusTable { +private _initialSortColumn: SupportedColumns = 'name'; +private _initialSortDirection: SortDirection = 'asc'; +private _portType!: 'input' | 'output'; + +filterableColumns: SummaryTableFilterColumn[] = [{ key: 'name', label: 'name' }]; + +totalCount: number = 0; +filteredCount: number = 0; + +multiSort: MultiSort = { +active: this._initialSortColumn, +direction: this._initialSortDirection, +sortValueIndex: 0, +totalValues: 2 +}; + +displayedColumns: string[] = []; + +dataSource: MatTableDataSource = new MatTableDataSource(); + +constructor(private nifiCommon: NiFiCommon) {} + +@Input() set portType(type: 'input' | 'output') { +if (type === 'input') { +this.displayedColumns = ['moreDetails', 'name', 'runStatus', 'in', 'actions']; +} else { +this.displayedColumns = ['moreDetails', 'name', 'runStatus', 'out', 'actions']; +} +this._portType = type; +} + +get portType() { +return this._portType; +} + +@Input() selectedPortId!: string; + +@Input() set initialSortColumn(initialSortColumn: SupportedColumns) { +this._initialSortColumn = initialSortColumn; +this.multiSort = { ...this.multiSort, active: initialSortColumn }; +} + +get initialSortColumn() { +return this._initialSortColumn; +} + +@Input() set initialSortDirection(initialSortDirection:
Re: [PR] [NIFI-12504] Remaining views on Summary page [nifi]
mcgilman commented on PR #8174: URL: https://github.com/apache/nifi/pull/8174#issuecomment-1865036921 Will review... -- 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: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org