ocket8888 commented on code in PR #7407: URL: https://github.com/apache/trafficcontrol/pull/7407#discussion_r1142343904
########## experimental/traffic-portal/src/app/api/cache-group.service.ts: ########## @@ -428,10 +429,31 @@ export class CacheGroupService extends APIService { } /** - * Deletes an existing asn. + * Replaces the current definition of a ASN with the one given. * - * @param asnOrId Id of the asn to delete. - * @returns The deleted asn. + * @param asn The new ASN. + * @returns The updated ASN. + */ + public async updateASN(asn: ResponseASN): Promise<ResponseASN> { + const path = `asns/${asn.id}`; + return this.put<ResponseASN>(path, asn).toPromise(); + } + + /** + * Creates a new ASN. + * + * @param asn The ASN to create. + * @returns The created ASN. + */ + public async createASN(asn: RequestASN): Promise<ResponseASN> { + return this.post<ResponseASN>("asns", asn).toPromise(); + } + + /** + * Deletes an existing ASN. + * + * @param asnOrId Id of the ASN to delete. Review Comment: It's *either* the ASN *or* its ID. Also, nit: "ID" not "Id" ########## experimental/traffic-portal/src/app/core/cache-groups/asns/detail/asn-detail.component.scss: ########## @@ -0,0 +1,26 @@ +/* +* 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 { + margin: 1em auto; + width: 80%; + min-width: 350px; + + mat-card-content { + display: grid; + grid-template-columns: 1fr; + grid-row-gap: 2em; Review Comment: `grid-row-gap` is deprecated; use `row-gap` instead -- 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