ocket8888 commented on code in PR #7497:
URL: https://github.com/apache/trafficcontrol/pull/7497#discussion_r1192755249
##########
experimental/traffic-portal/src/app/api/cdn.service.ts:
##########
@@ -78,6 +78,30 @@ export class CDNService extends APIService {
return this.post<ResponseCDN>("cdns", cdn).toPromise();
}
+ /**
+ * Queue updates to servers by a CDN
+ *
+ * @param cdn The CDN or ID to queue from
+ */
+ public async queueServerUpdates(cdn: ResponseCDN | number):
Promise<CDNQueueResponse> {
+ const id = typeof cdn === "number" ? cdn : cdn.id;
+ const path = `cdns/${id}/queue_update`;
+ const action = {action: "queue"};
+ return this.post<CDNQueueResponse>(path, action).toPromise();
+ }
+
+ /**
+ * Dequeue updates to servers by a CDN
+ *
+ * @param cdn The CDN or ID to dequeue from
+ */
+ public async dequeueServerUpdates(cdn: ResponseCDN | number):
Promise<CDNQueueResponse> {
+ const id = typeof cdn === "number" ? cdn : cdn.id;
+ const path = `cdns/${id}/queue_update`;
+ const action = {action: "dequeue"};
+ return this.post<CDNQueueResponse>(path, action).toPromise();
+ }
+
Review Comment:
These need tests
##########
experimental/traffic-portal/src/styles.scss:
##########
@@ -100,7 +102,122 @@ body {
overflow-x: hidden;
}
-.mat-mdc-button-base {
+:root {
+ --toolbar-height: 3em;
+ --sidebar-max-width: 25vw;
+ --content-max-width: calc(100vw - 5vw - var(--sidebar-max-width));
+}
+
+.small-icon-button {
+ width: 24px !important;
+ height: 24px !important;
+ padding: 0px !important;
+ align-items: center;
+ justify-content: center;
+ display: inline-flex !important;
+
+ & > *[role=img] {
+ width: 16px !important;
+ height: 16px !important;
+ font-size: 16px !important;
+
+ svg {
+ width: 16px !important;
+ height: 16px !important;
+ }
+ }
+
+ .mat-mdc-button-touch-target {
+ width: 24px !important;
+ height: 24px !important;
+ }
+}
Review Comment:
gosh that's an awful lot of `!important` - is that really necessary? And if
so: why?
##########
experimental/traffic-portal/src/app/api/testing/server.service.ts:
##########
@@ -41,7 +41,7 @@ function serverCheck(server: ResponseServer): Servercheck {
cacheGroup: server.cachegroup ?? "SERVER HAD NO CACHE GROUP",
hostName: server.hostName ?? "SERVER HAD NO HOST NAME",
id: server.id,
- profile: server.profile ?? "SERVER HAD NO PROFILE",
+ profile: server.profileNames.length > 0 ?
server.profileNames[0] : "SERVER HAD NO PROFILE",
Review Comment:
We don't have `noUncheckedIndexedAccess` enabled, so fwiw you can just do
`server.profileNames[0] ?? "SERVER HAD NO PROFILE"`
--
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]