zrhoffman commented on code in PR #7459: URL: https://github.com/apache/trafficcontrol/pull/7459#discussion_r1187929921
########## experimental/traffic-portal/src/app/api/cdn.service.ts: ########## @@ -109,4 +109,16 @@ export class CDNService extends APIService { return this.put<ResponseCDN>(`cdns/${id}`, body).toPromise(); } + + /** + * Queues or dequeues updates on a CDN's servers. + * + * @param cdn The CDN to queue or dequeue updates on. + * @param action The action to perform on the CDN, either "queue" or "dequeue". + */ + public async queueCDNUpdates(cdn: ResponseCDN, action: "queue" | "dequeue"): Promise<CDNQueueResponse> { Review Comment: I know what you mean, but accepting both and checking for either both ID and `ResponseCDN` iinstance in all places is not the way to do it, IMO, because it is extra work, and the point of Typescript is to eliminate ambiguities like that one. Maybe a future improvement having it take a new `CDN` type that *can* have as much info as `ResponseCDN` but only requires an `ID`, and it's only resolved by the API (or some other way to defer its resolution)? If something like that is acceptable, then IMO we should do that in the places we're currently accepting either an object or ID. ########## experimental/traffic-portal/src/app/core/cdns/cdn-table/cdn-table.component.html: ########## @@ -0,0 +1,28 @@ +<!-- +Licensed 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. +--> +<mat-card class="table-page-content"> + <div class="search-container"> + <input type="search" name="fuzzControl" aria-label="Fuzzy Search CDNs" rowSelection="single" autofocus inputmode="search" role="search" accesskey="/" placeholder="Fuzzy Search" [formControl]="fuzzControl" (input)="updateURL()"/> Review Comment: Whoops, removed in 1eea64d6ba -- 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...@trafficcontrol.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org