This is an automated email from the ASF dual-hosted git repository.
ocket8888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
The following commit(s) were added to refs/heads/master by this push:
new f98c1536b7 Add TPv2 to CDN in a Box (#7389)
f98c1536b7 is described below
commit f98c1536b744da2ffaac9b44bad98ca5bf89f5d0
Author: Steve Hamrick <[email protected]>
AuthorDate: Tue Mar 14 08:06:51 2023 -0600
Add TPv2 to CDN in a Box (#7389)
* Rename current-user folder
* Add TPv2 to CDN in a Box
* Tabs
* Fix server details sidebar entry
* Code review feedback
---
.../tests/deliveryServices/ds.details.spec.ts | 8 +--
.../tests/deliveryServices/ds.invalidate.spec.ts | 12 ++--
.../nightwatch/tests/login/login.spec.ts | 10 ++--
.../nightwatch/tests/users/tenant/detail.spec.ts | 10 ++--
.../traffic-portal/src/app/app.component.spec.ts | 2 +-
.../traffic-portal/src/app/app.component.ts | 2 +-
.../asns/table/asns-table.component.ts | 2 +-
.../cache-group-table.component.ts | 2 +-
.../divisions/table/divisions-table.component.ts | 2 +-
.../regions/table/regions-table.component.ts | 2 +-
.../traffic-portal/src/app/core/core.module.ts | 2 +-
.../core/currentuser/currentuser.component.spec.ts | 2 +-
.../app/core/currentuser/currentuser.component.ts | 2 +-
.../update-password-dialog.component.spec.ts | 2 +-
.../update-password-dialog.component.ts | 2 +-
.../app/core/dashboard/dashboard.component.spec.ts | 2 +-
.../src/app/core/dashboard/dashboard.component.ts | 2 +-
.../deliveryservice.component.spec.ts | 2 +-
.../invalidation-jobs.component.spec.ts | 2 +-
.../new-delivery-service.component.spec.ts | 2 +-
.../new-delivery-service.component.ts | 2 +-
.../phys-loc/table/phys-loc-table.component.ts | 2 +-
.../server-details.component.spec.ts | 2 +-
.../servers-table/servers-table.component.spec.ts | 2 +-
.../app/core/types/table/types-table.component.ts | 2 +-
.../core/users/tenants/tenants.component.spec.ts | 2 +-
.../app/core/users/tenants/tenants.component.ts | 2 +-
.../user-details/user-details.component.spec.ts | 4 +-
.../users/user-details/user-details.component.ts | 2 +-
.../user-registration-dialog.component.spec.ts | 2 +-
.../user-registration-dialog.component.ts | 2 +-
.../src/app/core/users/users.component.spec.ts | 2 +-
.../src/app/core/users/users.component.ts | 2 +-
.../src/app/guards/authenticated-guard.service.ts | 2 +-
.../src/app/guards/authenticated.guard.spec.ts | 2 +-
.../src/app/login/login.component.spec.ts | 2 +-
.../src/app/login/login.component.ts | 2 +-
.../current-user.service.spec.ts | 0
.../current-user.service.ts | 0
.../current-user.testing-service.spec.ts | 0
.../shared/navigation/navigation.service.spec.ts | 2 +-
.../app/shared/navigation/navigation.service.ts | 2 +-
.../tp-header/tp-header.component.spec.ts | 2 +-
.../tp-sidebar/tp-sidebar.component.html | 2 +-
.../tp-sidebar/tp-sidebar.component.spec.ts | 2 +-
.../ssh-cell-renderer.component.spec.ts | 2 +-
.../ssh-cell-renderer.component.ts | 2 +-
.../shared/theme-manager/theme-manager.service.ts | 12 ++--
infrastructure/cdn-in-a-box/Makefile | 19 ++++--
.../cdn-in-a-box/docker-compose.expose-ports.yml | 3 +
infrastructure/cdn-in-a-box/docker-compose.yml | 19 ++++++
.../cdn-in-a-box/traffic_ops/to-access.sh | 2 +-
infrastructure/cdn-in-a-box/traffic_portal/run.sh | 2 +-
.../cdn-in-a-box/traffic_portal_v2/Dockerfile | 69 ++++++++++++++++++++++
.../{traffic_portal => traffic_portal_v2}/run.sh | 29 ++++-----
55 files changed, 187 insertions(+), 90 deletions(-)
diff --git
a/experimental/traffic-portal/nightwatch/tests/deliveryServices/ds.details.spec.ts
b/experimental/traffic-portal/nightwatch/tests/deliveryServices/ds.details.spec.ts
index d248a77c91..8aefdfe27e 100644
---
a/experimental/traffic-portal/nightwatch/tests/deliveryServices/ds.details.spec.ts
+++
b/experimental/traffic-portal/nightwatch/tests/deliveryServices/ds.details.spec.ts
@@ -43,10 +43,10 @@ describe("DS Detail Spec", () => {
time = `${(+time.split(":")[0] -
now.getTimezoneOffset()/60).toString().padStart(2, "0")}:${time.split(":")[1]}`;
page.section.dateInputForm
- .assert.value("@fromDate", date)
- .assert.value("@fromTime", "00:00")
- .assert.value("@toDate", date)
- .assert.value("@toTime", time);
+ .assert.valueEquals("@fromDate", date)
+ .assert.valueEquals("@fromTime", "00:00")
+ .assert.valueEquals("@toDate", date)
+ .assert.valueEquals("@toTime", time);
});
it("Is steering target test", (): void => {
diff --git
a/experimental/traffic-portal/nightwatch/tests/deliveryServices/ds.invalidate.spec.ts
b/experimental/traffic-portal/nightwatch/tests/deliveryServices/ds.invalidate.spec.ts
index ce40722ae1..6d2c039575 100644
---
a/experimental/traffic-portal/nightwatch/tests/deliveryServices/ds.invalidate.spec.ts
+++
b/experimental/traffic-portal/nightwatch/tests/deliveryServices/ds.invalidate.spec.ts
@@ -36,11 +36,11 @@ describe("DS Invalidation Jobs Spec", () => {
const startDate = new Date();
startDate.setDate(startDate.getDate() + 1);
browser.waitForElementVisible("tp-new-invalidation-job-dialog")
- .assert.value("input[name='startDate']",
startDate.toLocaleDateString())
+ .assert.valueEquals("input[name='startDate']",
startDate.toLocaleDateString())
.setValue("input[name='regexp']", "/invalidateMe")
.click("button#submit");
common
- .assert.containsText("@snackbarEle", "created")
+ .assert.textContains("@snackbarEle", "created")
.click("simple-snack-bar button");
page.assert.visible({index: 0, selector:
"div.invalidation-job"})
.assert.enabled({index: 0, selector:
"div.invalidation-job button"})
@@ -48,16 +48,16 @@ describe("DS Invalidation Jobs Spec", () => {
page
.click({index: 0, selector: "div.invalidation-job
button"});
browser.waitForElementVisible("tp-new-invalidation-job-dialog")
- .assert.value("input[name='startDate']",
startDate.toLocaleDateString())
- .assert.value("input[name='regexp']", "invalidateMe")
+ .assert.valueEquals("input[name='startDate']",
startDate.toLocaleDateString())
+ .assert.valueEquals("input[name='regexp']",
"invalidateMe")
.setValue("input[name='regexp']", "/invalidateMe2")
.click("button#submit");
common
- .assert.containsText("@snackbarEle", "created")
+ .assert.textContains("@snackbarEle", "created")
.click("simple-snack-bar button");
page
.click({index: 1, selector: "div.invalidation-job
button"});
common
- .assert.containsText("@snackbarEle", "was deleted");
+ .assert.textContains("@snackbarEle", "was deleted");
});
});
diff --git a/experimental/traffic-portal/nightwatch/tests/login/login.spec.ts
b/experimental/traffic-portal/nightwatch/tests/login/login.spec.ts
index f8ae5ad224..781fcec46f 100644
--- a/experimental/traffic-portal/nightwatch/tests/login/login.spec.ts
+++ b/experimental/traffic-portal/nightwatch/tests/login/login.spec.ts
@@ -19,17 +19,17 @@ describe("Login Spec", () => {
.navigate().section.loginForm
.fillOut("test", "asdf")
.click("@clearBtn")
- .assert.containsText("@usernameTxt", "")
- .assert.containsText("@passwordTxt", "");
+ .assert.textContains("@usernameTxt", "")
+ .assert.textContains("@passwordTxt", "");
});
it("Incorrect password test", () => {
browser.page.login()
.navigate().section.loginForm
.login("test", "asdf")
- .assert.value("@usernameTxt", "test")
- .assert.value("@passwordTxt", "asdf");
+ .assert.valueEquals("@usernameTxt", "test")
+ .assert.valueEquals("@passwordTxt", "asdf");
browser.page.common()
- .assert.containsText("@snackbarEle", "Invalid");
+ .assert.textContains("@snackbarEle", "Invalid");
});
it("Login test", () => {
browser.page.login()
diff --git
a/experimental/traffic-portal/nightwatch/tests/users/tenant/detail.spec.ts
b/experimental/traffic-portal/nightwatch/tests/users/tenant/detail.spec.ts
index 812f4603f7..c3e8a2e44f 100644
--- a/experimental/traffic-portal/nightwatch/tests/users/tenant/detail.spec.ts
+++ b/experimental/traffic-portal/nightwatch/tests/users/tenant/detail.spec.ts
@@ -22,8 +22,8 @@ describe("Tenant Detail Spec", () => {
.assert.not.enabled("@name")
.assert.not.enabled("@parent")
.assert.not.enabled("@saveBtn")
- .assert.value("@name", "root")
- .assert.value("@active", "on");
+ .assert.valueEquals("@name", "root")
+ .assert.valueEquals("@active", "on");
});
});
@@ -48,9 +48,9 @@ describe("Tenant Detail Spec", () => {
.assert.enabled("@name")
.assert.enabled("@parent")
.assert.enabled("@saveBtn")
- .assert.containsText("@name", "")
- .assert.value("@active", "on")
- .assert.value("@parent", "");
+ .assert.textContains("@name", "")
+ .assert.valueEquals("@active", "on")
+ .assert.valueEquals("@parent", "");
});
});
});
diff --git a/experimental/traffic-portal/src/app/app.component.spec.ts
b/experimental/traffic-portal/src/app/app.component.spec.ts
index 9f0c3abebe..25a3a14f00 100644
--- a/experimental/traffic-portal/src/app/app.component.spec.ts
+++ b/experimental/traffic-portal/src/app/app.component.spec.ts
@@ -19,7 +19,7 @@ import { Router } from "@angular/router";
import { RouterTestingModule } from "@angular/router/testing";
import { of } from "rxjs";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
import { AppComponent } from "./app.component";
diff --git a/experimental/traffic-portal/src/app/app.component.ts
b/experimental/traffic-portal/src/app/app.component.ts
index 3561ad4224..55007fd29e 100644
--- a/experimental/traffic-portal/src/app/app.component.ts
+++ b/experimental/traffic-portal/src/app/app.component.ts
@@ -16,7 +16,7 @@ import {Component, OnInit} from "@angular/core";
import { Router } from "@angular/router";
import { ResponseCurrentUser } from "trafficops-types";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
/**
* The most basic component that contains everything else. This should be kept
pretty simple.
diff --git
a/experimental/traffic-portal/src/app/core/cache-groups/asns/table/asns-table.component.ts
b/experimental/traffic-portal/src/app/core/cache-groups/asns/table/asns-table.component.ts
index 68bccc40dd..ca335228a9 100644
---
a/experimental/traffic-portal/src/app/core/cache-groups/asns/table/asns-table.component.ts
+++
b/experimental/traffic-portal/src/app/core/cache-groups/asns/table/asns-table.component.ts
@@ -20,7 +20,7 @@ import { BehaviorSubject } from "rxjs";
import type { ResponseASN } from "trafficops-types";
import { CacheGroupService } from "src/app/api";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
import { DecisionDialogComponent } from
"src/app/shared/dialogs/decision-dialog/decision-dialog.component";
import type { ContextMenuActionEvent, ContextMenuItem } from
"src/app/shared/generic-table/generic-table.component";
import { NavigationService } from
"src/app/shared/navigation/navigation.service";
diff --git
a/experimental/traffic-portal/src/app/core/cache-groups/cache-group-table/cache-group-table.component.ts
b/experimental/traffic-portal/src/app/core/cache-groups/cache-group-table/cache-group-table.component.ts
index 0192dc4062..3c91deffd5 100644
---
a/experimental/traffic-portal/src/app/core/cache-groups/cache-group-table/cache-group-table.component.ts
+++
b/experimental/traffic-portal/src/app/core/cache-groups/cache-group-table/cache-group-table.component.ts
@@ -28,7 +28,7 @@ import {
import { CacheGroupService, CDNService } from "src/app/api";
import { AlertService } from "src/app/shared/alert/alert.service";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
import {
CollectionChoiceDialogComponent,
type CollectionChoiceDialogData
diff --git
a/experimental/traffic-portal/src/app/core/cache-groups/divisions/table/divisions-table.component.ts
b/experimental/traffic-portal/src/app/core/cache-groups/divisions/table/divisions-table.component.ts
index a0fbd2b785..1931b00f80 100644
---
a/experimental/traffic-portal/src/app/core/cache-groups/divisions/table/divisions-table.component.ts
+++
b/experimental/traffic-portal/src/app/core/cache-groups/divisions/table/divisions-table.component.ts
@@ -20,7 +20,7 @@ import { BehaviorSubject } from "rxjs";
import { ResponseDivision } from "trafficops-types";
import { CacheGroupService } from "src/app/api";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
import { DecisionDialogComponent } from
"src/app/shared/dialogs/decision-dialog/decision-dialog.component";
import type { ContextMenuActionEvent, ContextMenuItem } from
"src/app/shared/generic-table/generic-table.component";
import { NavigationService } from
"src/app/shared/navigation/navigation.service";
diff --git
a/experimental/traffic-portal/src/app/core/cache-groups/regions/table/regions-table.component.ts
b/experimental/traffic-portal/src/app/core/cache-groups/regions/table/regions-table.component.ts
index d0877f12a7..519c12a60c 100644
---
a/experimental/traffic-portal/src/app/core/cache-groups/regions/table/regions-table.component.ts
+++
b/experimental/traffic-portal/src/app/core/cache-groups/regions/table/regions-table.component.ts
@@ -20,7 +20,7 @@ import { BehaviorSubject } from "rxjs";
import type { Region, ResponseRegion } from "trafficops-types";
import { CacheGroupService } from "src/app/api";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
import { DecisionDialogComponent } from
"src/app/shared/dialogs/decision-dialog/decision-dialog.component";
import type { ContextMenuActionEvent, ContextMenuItem } from
"src/app/shared/generic-table/generic-table.component";
import { NavigationService } from
"src/app/shared/navigation/navigation.service";
diff --git a/experimental/traffic-portal/src/app/core/core.module.ts
b/experimental/traffic-portal/src/app/core/core.module.ts
index 73a48c51ff..32289cc806 100644
--- a/experimental/traffic-portal/src/app/core/core.module.ts
+++ b/experimental/traffic-portal/src/app/core/core.module.ts
@@ -66,7 +66,7 @@ export const ROUTES: Routes = [
{ component: UsersComponent, path: "users" },
{ component: UserDetailsComponent, path: "users/:id"},
{ component: ServersTableComponent, path: "servers" },
- { component: ServerDetailsComponent, path: "server/:id" },
+ { component: ServerDetailsComponent, path: "servers/:id" },
{ component: DeliveryserviceComponent, path: "deliveryservice/:id" },
{ component: InvalidationJobsComponent, path:
"deliveryservice/:id/invalidation-jobs" },
{ component: CurrentuserComponent, path: "me" },
diff --git
a/experimental/traffic-portal/src/app/core/currentuser/currentuser.component.spec.ts
b/experimental/traffic-portal/src/app/core/currentuser/currentuser.component.spec.ts
index 1dfc89081c..851d6d3476 100644
---
a/experimental/traffic-portal/src/app/core/currentuser/currentuser.component.spec.ts
+++
b/experimental/traffic-portal/src/app/core/currentuser/currentuser.component.spec.ts
@@ -21,7 +21,7 @@ import { ResponseCurrentUser } from "trafficops-types";
import { UserService } from "src/app/api";
import { APITestingModule } from "src/app/api/testing";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
import { NavigationService } from
"src/app/shared/navigation/navigation.service";
import { TpHeaderComponent } from
"src/app/shared/navigation/tp-header/tp-header.component";
diff --git
a/experimental/traffic-portal/src/app/core/currentuser/currentuser.component.ts
b/experimental/traffic-portal/src/app/core/currentuser/currentuser.component.ts
index 57c27efd6e..1e69ddfc9c 100644
---
a/experimental/traffic-portal/src/app/core/currentuser/currentuser.component.ts
+++
b/experimental/traffic-portal/src/app/core/currentuser/currentuser.component.ts
@@ -18,7 +18,7 @@ import { faEdit } from "@fortawesome/free-solid-svg-icons";
import { ResponseCurrentUser } from "trafficops-types";
import { UserService } from "src/app/api";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
import { NavigationService } from
"src/app/shared/navigation/navigation.service";
import {ThemeManagerService} from
"src/app/shared/theme-manager/theme-manager.service";
diff --git
a/experimental/traffic-portal/src/app/core/currentuser/update-password-dialog/update-password-dialog.component.spec.ts
b/experimental/traffic-portal/src/app/core/currentuser/update-password-dialog/update-password-dialog.component.spec.ts
index 4719cda4ad..f1cc86b668 100644
---
a/experimental/traffic-portal/src/app/core/currentuser/update-password-dialog/update-password-dialog.component.spec.ts
+++
b/experimental/traffic-portal/src/app/core/currentuser/update-password-dialog/update-password-dialog.component.spec.ts
@@ -18,7 +18,7 @@ import { RouterTestingModule } from "@angular/router/testing";
import { ResponseCurrentUser } from "trafficops-types";
import { APITestingModule } from "src/app/api/testing";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
import { UpdatePasswordDialogComponent } from
"./update-password-dialog.component";
diff --git
a/experimental/traffic-portal/src/app/core/currentuser/update-password-dialog/update-password-dialog.component.ts
b/experimental/traffic-portal/src/app/core/currentuser/update-password-dialog/update-password-dialog.component.ts
index 561b30d825..d524b76c15 100644
---
a/experimental/traffic-portal/src/app/core/currentuser/update-password-dialog/update-password-dialog.component.ts
+++
b/experimental/traffic-portal/src/app/core/currentuser/update-password-dialog/update-password-dialog.component.ts
@@ -15,7 +15,7 @@ import { Component } from "@angular/core";
import { MatDialogRef } from "@angular/material/dialog";
import { Subject } from "rxjs";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
/**
* This is the controller for the "Update Password" dialog box/form.
diff --git
a/experimental/traffic-portal/src/app/core/dashboard/dashboard.component.spec.ts
b/experimental/traffic-portal/src/app/core/dashboard/dashboard.component.spec.ts
index 313af88c4e..fc28891a58 100644
---
a/experimental/traffic-portal/src/app/core/dashboard/dashboard.component.spec.ts
+++
b/experimental/traffic-portal/src/app/core/dashboard/dashboard.component.spec.ts
@@ -23,7 +23,7 @@ import { CDNService, DeliveryServiceService, TypeService,
UserService } from "sr
import { APITestingModule } from "src/app/api/testing";
import { AlertService } from "src/app/shared/alert/alert.service";
import { LinechartDirective } from "src/app/shared/charts/linechart.directive";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
import { LoadingComponent } from "src/app/shared/loading/loading.component";
import { NavigationService } from
"src/app/shared/navigation/navigation.service";
import { TpHeaderComponent } from
"src/app/shared/navigation/tp-header/tp-header.component";
diff --git
a/experimental/traffic-portal/src/app/core/dashboard/dashboard.component.ts
b/experimental/traffic-portal/src/app/core/dashboard/dashboard.component.ts
index dc2f013ba2..4c9c3cd3b4 100644
--- a/experimental/traffic-portal/src/app/core/dashboard/dashboard.component.ts
+++ b/experimental/traffic-portal/src/app/core/dashboard/dashboard.component.ts
@@ -17,7 +17,7 @@ import { ActivatedRoute, Router } from "@angular/router";
import { ResponseDeliveryService } from "trafficops-types";
import { DeliveryServiceService } from "src/app/api";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
import { NavigationService } from
"src/app/shared/navigation/navigation.service";
import { orderBy, fuzzyScore } from "src/app/utils/index";
diff --git
a/experimental/traffic-portal/src/app/core/deliveryservice/deliveryservice.component.spec.ts
b/experimental/traffic-portal/src/app/core/deliveryservice/deliveryservice.component.spec.ts
index 1e56a05df1..cdd1f494a4 100644
---
a/experimental/traffic-portal/src/app/core/deliveryservice/deliveryservice.component.spec.ts
+++
b/experimental/traffic-portal/src/app/core/deliveryservice/deliveryservice.component.spec.ts
@@ -22,7 +22,7 @@ import { CDNService, DeliveryServiceService, TypeService,
UserService } from "sr
import { APITestingModule } from "src/app/api/testing";
import { AlertService } from "src/app/shared/alert/alert.service";
import { LinechartDirective } from "src/app/shared/charts/linechart.directive";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
import { NavigationService } from
"src/app/shared/navigation/navigation.service";
import { TpHeaderComponent } from
"src/app/shared/navigation/tp-header/tp-header.component";
diff --git
a/experimental/traffic-portal/src/app/core/deliveryservice/invalidation-jobs/invalidation-jobs.component.spec.ts
b/experimental/traffic-portal/src/app/core/deliveryservice/invalidation-jobs/invalidation-jobs.component.spec.ts
index e4014ab5fe..e887ed0415 100644
---
a/experimental/traffic-portal/src/app/core/deliveryservice/invalidation-jobs/invalidation-jobs.component.spec.ts
+++
b/experimental/traffic-portal/src/app/core/deliveryservice/invalidation-jobs/invalidation-jobs.component.spec.ts
@@ -23,7 +23,7 @@ import { GeoLimit, GeoProvider, JobType,
ResponseInvalidationJob } from "traffic
import { CDNService, DeliveryServiceService, InvalidationJobService,
TypeService, UserService } from "src/app/api";
import { APITestingModule } from "src/app/api/testing";
import { InvalidationJobsComponent } from
"src/app/core/deliveryservice/invalidation-jobs/invalidation-jobs.component";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
import { NavigationService } from
"src/app/shared/navigation/navigation.service";
import { TpHeaderComponent } from
"src/app/shared/navigation/tp-header/tp-header.component";
import { CustomvalidityDirective } from
"src/app/shared/validation/customvalidity.directive";
diff --git
a/experimental/traffic-portal/src/app/core/deliveryservice/new-delivery-service/new-delivery-service.component.spec.ts
b/experimental/traffic-portal/src/app/core/deliveryservice/new-delivery-service/new-delivery-service.component.spec.ts
index 164214d900..e58f1acd0a 100644
---
a/experimental/traffic-portal/src/app/core/deliveryservice/new-delivery-service/new-delivery-service.component.spec.ts
+++
b/experimental/traffic-portal/src/app/core/deliveryservice/new-delivery-service/new-delivery-service.component.spec.ts
@@ -27,7 +27,7 @@ import { ReplaySubject } from "rxjs";
import { Protocol } from "trafficops-types";
import { APITestingModule } from "src/app/api/testing";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
import { NavigationService } from
"src/app/shared/navigation/navigation.service";
import { TpHeaderComponent } from
"src/app/shared/navigation/tp-header/tp-header.component";
diff --git
a/experimental/traffic-portal/src/app/core/deliveryservice/new-delivery-service/new-delivery-service.component.ts
b/experimental/traffic-portal/src/app/core/deliveryservice/new-delivery-service/new-delivery-service.component.ts
index 8ff915c561..dd3a3cd04d 100644
---
a/experimental/traffic-portal/src/app/core/deliveryservice/new-delivery-service/new-delivery-service.component.ts
+++
b/experimental/traffic-portal/src/app/core/deliveryservice/new-delivery-service/new-delivery-service.component.ts
@@ -30,7 +30,7 @@ import {
} from "trafficops-types";
import { CDNService, DeliveryServiceService } from "src/app/api";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
import { NavigationService } from
"src/app/shared/navigation/navigation.service";
/**
diff --git
a/experimental/traffic-portal/src/app/core/servers/phys-loc/table/phys-loc-table.component.ts
b/experimental/traffic-portal/src/app/core/servers/phys-loc/table/phys-loc-table.component.ts
index 25a542f832..2834803dbd 100644
---
a/experimental/traffic-portal/src/app/core/servers/phys-loc/table/phys-loc-table.component.ts
+++
b/experimental/traffic-portal/src/app/core/servers/phys-loc/table/phys-loc-table.component.ts
@@ -19,7 +19,7 @@ import { BehaviorSubject } from "rxjs";
import type { ResponsePhysicalLocation } from "trafficops-types";
import { PhysicalLocationService } from "src/app/api";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
import { DecisionDialogComponent } from
"src/app/shared/dialogs/decision-dialog/decision-dialog.component";
import type { ContextMenuActionEvent, ContextMenuItem } from
"src/app/shared/generic-table/generic-table.component";
import { NavigationService } from
"src/app/shared/navigation/navigation.service";
diff --git
a/experimental/traffic-portal/src/app/core/servers/server-details/server-details.component.spec.ts
b/experimental/traffic-portal/src/app/core/servers/server-details/server-details.component.spec.ts
index d42604b8f8..6aa18221fc 100644
---
a/experimental/traffic-portal/src/app/core/servers/server-details/server-details.component.spec.ts
+++
b/experimental/traffic-portal/src/app/core/servers/server-details/server-details.component.spec.ts
@@ -25,7 +25,7 @@ import { of } from "rxjs";
import { ServerService } from "src/app/api";
import { APITestingModule } from "src/app/api/testing";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
import { SharedModule } from "src/app/shared/shared.module";
import { ServerDetailsComponent } from "./server-details.component";
diff --git
a/experimental/traffic-portal/src/app/core/servers/servers-table/servers-table.component.spec.ts
b/experimental/traffic-portal/src/app/core/servers/servers-table/servers-table.component.spec.ts
index 3ead6b34dd..055c3ac191 100644
---
a/experimental/traffic-portal/src/app/core/servers/servers-table/servers-table.component.spec.ts
+++
b/experimental/traffic-portal/src/app/core/servers/servers-table/servers-table.component.spec.ts
@@ -22,7 +22,7 @@ import type { ResponseServer } from "trafficops-types";
import { ServerService } from "src/app/api";
import { APITestingModule } from "src/app/api/testing";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
import { NavigationService } from
"src/app/shared/navigation/navigation.service";
import { TpHeaderComponent } from
"src/app/shared/navigation/tp-header/tp-header.component";
diff --git
a/experimental/traffic-portal/src/app/core/types/table/types-table.component.ts
b/experimental/traffic-portal/src/app/core/types/table/types-table.component.ts
index da25511616..d74414e9a1 100644
---
a/experimental/traffic-portal/src/app/core/types/table/types-table.component.ts
+++
b/experimental/traffic-portal/src/app/core/types/table/types-table.component.ts
@@ -20,7 +20,7 @@ import { BehaviorSubject } from "rxjs";
import { TypeFromResponse } from "trafficops-types";
import { TypeService } from "src/app/api";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
import { DecisionDialogComponent } from
"src/app/shared/dialogs/decision-dialog/decision-dialog.component";
import type { ContextMenuActionEvent, ContextMenuItem } from
"src/app/shared/generic-table/generic-table.component";
import { NavigationService } from
"src/app/shared/navigation/navigation.service";
diff --git
a/experimental/traffic-portal/src/app/core/users/tenants/tenants.component.spec.ts
b/experimental/traffic-portal/src/app/core/users/tenants/tenants.component.spec.ts
index c3fb5e20ea..ad10f61c4d 100644
---
a/experimental/traffic-portal/src/app/core/users/tenants/tenants.component.spec.ts
+++
b/experimental/traffic-portal/src/app/core/users/tenants/tenants.component.spec.ts
@@ -15,7 +15,7 @@ import { ComponentFixture, fakeAsync, TestBed, tick } from
"@angular/core/testin
import { BehaviorSubject } from "rxjs";
import { APITestingModule } from "src/app/api/testing";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
import { TenantsComponent } from "./tenants.component";
diff --git
a/experimental/traffic-portal/src/app/core/users/tenants/tenants.component.ts
b/experimental/traffic-portal/src/app/core/users/tenants/tenants.component.ts
index e5d1aabd4f..06ff5a2959 100644
---
a/experimental/traffic-portal/src/app/core/users/tenants/tenants.component.ts
+++
b/experimental/traffic-portal/src/app/core/users/tenants/tenants.component.ts
@@ -19,7 +19,7 @@ import { BehaviorSubject, type Subscription } from "rxjs";
import { ResponseTenant } from "trafficops-types";
import { UserService } from "src/app/api";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
import type { ContextMenuActionEvent, ContextMenuItem } from
"src/app/shared/generic-table/generic-table.component";
import { NavigationService } from
"src/app/shared/navigation/navigation.service";
diff --git
a/experimental/traffic-portal/src/app/core/users/user-details/user-details.component.spec.ts
b/experimental/traffic-portal/src/app/core/users/user-details/user-details.component.spec.ts
index 71f4166ed8..6c57059963 100644
---
a/experimental/traffic-portal/src/app/core/users/user-details/user-details.component.spec.ts
+++
b/experimental/traffic-portal/src/app/core/users/user-details/user-details.component.spec.ts
@@ -18,8 +18,8 @@ import { RouterTestingModule } from "@angular/router/testing";
import { UserService } from "src/app/api";
import { APITestingModule } from "src/app/api/testing";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
-import { CurrentUserTestingService } from
"src/app/shared/currentUser/current-user.testing-service.spec";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
+import { CurrentUserTestingService } from
"src/app/shared/current-user/current-user.testing-service.spec";
import { UserDetailsComponent } from "./user-details.component";
diff --git
a/experimental/traffic-portal/src/app/core/users/user-details/user-details.component.ts
b/experimental/traffic-portal/src/app/core/users/user-details/user-details.component.ts
index b645b6a7b1..511143e626 100644
---
a/experimental/traffic-portal/src/app/core/users/user-details/user-details.component.ts
+++
b/experimental/traffic-portal/src/app/core/users/user-details/user-details.component.ts
@@ -18,7 +18,7 @@ import { ActivatedRoute } from "@angular/router";
import type { PostRequestUser, ResponseRole, ResponseTenant, ResponseUser,
User } from "trafficops-types";
import { UserService } from "src/app/api";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
/**
* UserDetailsComponent is the controller for the page for viewing/editing a
diff --git
a/experimental/traffic-portal/src/app/core/users/user-registration-dialog/user-registration-dialog.component.spec.ts
b/experimental/traffic-portal/src/app/core/users/user-registration-dialog/user-registration-dialog.component.spec.ts
index e54785af03..a8201b1136 100644
---
a/experimental/traffic-portal/src/app/core/users/user-registration-dialog/user-registration-dialog.component.spec.ts
+++
b/experimental/traffic-portal/src/app/core/users/user-registration-dialog/user-registration-dialog.component.spec.ts
@@ -15,7 +15,7 @@ import { ComponentFixture, fakeAsync, TestBed, tick } from
"@angular/core/testin
import { MatDialogRef } from "@angular/material/dialog";
import { APITestingModule } from "src/app/api/testing";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
import { UserRegistrationDialogComponent } from
"./user-registration-dialog.component";
diff --git
a/experimental/traffic-portal/src/app/core/users/user-registration-dialog/user-registration-dialog.component.ts
b/experimental/traffic-portal/src/app/core/users/user-registration-dialog/user-registration-dialog.component.ts
index bc105cbdda..b02294a6dd 100644
---
a/experimental/traffic-portal/src/app/core/users/user-registration-dialog/user-registration-dialog.component.ts
+++
b/experimental/traffic-portal/src/app/core/users/user-registration-dialog/user-registration-dialog.component.ts
@@ -16,7 +16,7 @@ import { MatDialogRef } from "@angular/material/dialog";
import { ResponseRole, ResponseTenant } from "trafficops-types";
import { UserService } from "src/app/api";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
/**
* Controller for a dialog that opens to register a new user.
diff --git
a/experimental/traffic-portal/src/app/core/users/users.component.spec.ts
b/experimental/traffic-portal/src/app/core/users/users.component.spec.ts
index c09dedbf97..315978e45e 100644
--- a/experimental/traffic-portal/src/app/core/users/users.component.spec.ts
+++ b/experimental/traffic-portal/src/app/core/users/users.component.spec.ts
@@ -19,7 +19,7 @@ import { RouterTestingModule } from "@angular/router/testing";
import type { ValueFormatterParams } from "ag-grid-community";
import { APITestingModule } from "src/app/api/testing";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
import { isAction } from
"src/app/shared/generic-table/generic-table.component";
import { LoadingComponent } from "src/app/shared/loading/loading.component";
import { TpHeaderComponent } from
"src/app/shared/navigation/tp-header/tp-header.component";
diff --git a/experimental/traffic-portal/src/app/core/users/users.component.ts
b/experimental/traffic-portal/src/app/core/users/users.component.ts
index 564adda1b9..1fa3195c13 100644
--- a/experimental/traffic-portal/src/app/core/users/users.component.ts
+++ b/experimental/traffic-portal/src/app/core/users/users.component.ts
@@ -20,7 +20,7 @@ import { BehaviorSubject } from "rxjs";
import { ResponseUser } from "trafficops-types";
import { UserService } from "src/app/api";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
import type { ContextMenuItem } from
"src/app/shared/generic-table/generic-table.component";
import { NavigationService } from
"src/app/shared/navigation/navigation.service";
import { orderBy } from "src/app/utils";
diff --git
a/experimental/traffic-portal/src/app/guards/authenticated-guard.service.ts
b/experimental/traffic-portal/src/app/guards/authenticated-guard.service.ts
index c985a4319f..7b0c3f188e 100644
--- a/experimental/traffic-portal/src/app/guards/authenticated-guard.service.ts
+++ b/experimental/traffic-portal/src/app/guards/authenticated-guard.service.ts
@@ -14,7 +14,7 @@
import { Injectable } from "@angular/core";
import type { CanActivate, CanLoad } from "@angular/router";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
/**
* AuthenticationGuard ensures that the user is logged in.
diff --git
a/experimental/traffic-portal/src/app/guards/authenticated.guard.spec.ts
b/experimental/traffic-portal/src/app/guards/authenticated.guard.spec.ts
index 5a85a97493..57f2c6ce2d 100644
--- a/experimental/traffic-portal/src/app/guards/authenticated.guard.spec.ts
+++ b/experimental/traffic-portal/src/app/guards/authenticated.guard.spec.ts
@@ -13,7 +13,7 @@
*/
import { TestBed } from "@angular/core/testing";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
import { AuthenticatedGuard } from "./authenticated-guard.service";
diff --git a/experimental/traffic-portal/src/app/login/login.component.spec.ts
b/experimental/traffic-portal/src/app/login/login.component.spec.ts
index 2cbe8f2941..593c7d32a6 100644
--- a/experimental/traffic-portal/src/app/login/login.component.spec.ts
+++ b/experimental/traffic-portal/src/app/login/login.component.spec.ts
@@ -20,7 +20,7 @@ import { Router } from "@angular/router";
import { RouterTestingModule } from "@angular/router/testing";
import { ReplaySubject } from "rxjs";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
import { NavigationService } from
"src/app/shared/navigation/navigation.service";
import { LoginComponent } from "./login.component";
diff --git a/experimental/traffic-portal/src/app/login/login.component.ts
b/experimental/traffic-portal/src/app/login/login.component.ts
index 10a037972c..a70a5b0b5f 100644
--- a/experimental/traffic-portal/src/app/login/login.component.ts
+++ b/experimental/traffic-portal/src/app/login/login.component.ts
@@ -15,7 +15,7 @@ import { Component, OnInit } from "@angular/core";
import { MatDialog } from "@angular/material/dialog";
import { Router, ActivatedRoute, DefaultUrlSerializer } from "@angular/router";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
import { NavigationService } from
"src/app/shared/navigation/navigation.service";
import { AutocompleteValue } from "../utils";
diff --git
a/experimental/traffic-portal/src/app/shared/currentUser/current-user.service.spec.ts
b/experimental/traffic-portal/src/app/shared/current-user/current-user.service.spec.ts
similarity index 100%
rename from
experimental/traffic-portal/src/app/shared/currentUser/current-user.service.spec.ts
rename to
experimental/traffic-portal/src/app/shared/current-user/current-user.service.spec.ts
diff --git
a/experimental/traffic-portal/src/app/shared/currentUser/current-user.service.ts
b/experimental/traffic-portal/src/app/shared/current-user/current-user.service.ts
similarity index 100%
rename from
experimental/traffic-portal/src/app/shared/currentUser/current-user.service.ts
rename to
experimental/traffic-portal/src/app/shared/current-user/current-user.service.ts
diff --git
a/experimental/traffic-portal/src/app/shared/currentUser/current-user.testing-service.spec.ts
b/experimental/traffic-portal/src/app/shared/current-user/current-user.testing-service.spec.ts
similarity index 100%
rename from
experimental/traffic-portal/src/app/shared/currentUser/current-user.testing-service.spec.ts
rename to
experimental/traffic-portal/src/app/shared/current-user/current-user.testing-service.spec.ts
diff --git
a/experimental/traffic-portal/src/app/shared/navigation/navigation.service.spec.ts
b/experimental/traffic-portal/src/app/shared/navigation/navigation.service.spec.ts
index d19962bed9..7ba4122312 100644
---
a/experimental/traffic-portal/src/app/shared/navigation/navigation.service.spec.ts
+++
b/experimental/traffic-portal/src/app/shared/navigation/navigation.service.spec.ts
@@ -20,7 +20,7 @@ import { of } from "rxjs";
import { UserService } from "src/app/api";
import { APITestingModule } from "src/app/api/testing";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
import { HeaderNavigation, NavigationService } from
"src/app/shared/navigation/navigation.service";
import { type TpHeaderComponent } from
"src/app/shared/navigation/tp-header/tp-header.component";
diff --git
a/experimental/traffic-portal/src/app/shared/navigation/navigation.service.ts
b/experimental/traffic-portal/src/app/shared/navigation/navigation.service.ts
index 090ec2c87c..215f528323 100644
---
a/experimental/traffic-portal/src/app/shared/navigation/navigation.service.ts
+++
b/experimental/traffic-portal/src/app/shared/navigation/navigation.service.ts
@@ -15,7 +15,7 @@ import { Injectable } from "@angular/core";
import { ReplaySubject } from "rxjs";
import { UserService } from "src/app/api";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
/**
* Defines the type of the header nav
diff --git
a/experimental/traffic-portal/src/app/shared/navigation/tp-header/tp-header.component.spec.ts
b/experimental/traffic-portal/src/app/shared/navigation/tp-header/tp-header.component.spec.ts
index 43fdf1dcc1..d7fee1e2f9 100644
---
a/experimental/traffic-portal/src/app/shared/navigation/tp-header/tp-header.component.spec.ts
+++
b/experimental/traffic-portal/src/app/shared/navigation/tp-header/tp-header.component.spec.ts
@@ -18,7 +18,7 @@ import { RouterTestingModule } from "@angular/router/testing";
import {of, ReplaySubject} from "rxjs";
import { APITestingModule } from "src/app/api/testing";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
import {HeaderNavigation, NavigationService} from
"src/app/shared/navigation/navigation.service";
import { TpHeaderComponent } from
"src/app/shared/navigation/tp-header/tp-header.component";
diff --git
a/experimental/traffic-portal/src/app/shared/navigation/tp-sidebar/tp-sidebar.component.html
b/experimental/traffic-portal/src/app/shared/navigation/tp-sidebar/tp-sidebar.component.html
index de0c1838a9..19ebaaf8f0 100644
---
a/experimental/traffic-portal/src/app/shared/navigation/tp-sidebar/tp-sidebar.component.html
+++
b/experimental/traffic-portal/src/app/shared/navigation/tp-sidebar/tp-sidebar.component.html
@@ -13,7 +13,7 @@ limitations under the License.
-->
<mat-sidenav-container [autosize]="true">
- <mat-sidenav #sidenav mode="side" opened>
+ <mat-sidenav #sidenav mode="side" opened [hidden]="hidden">
<mat-tree [dataSource]="dataSource" [treeControl]="treeCtrl">
<mat-tree-node *matTreeNodeDef="let node"
matTreeNodeToggle>
<a class="mat-tree-node" mat-menu-item
[routerLink]="node.href" [routerLinkActive]="['boldNode']">
diff --git
a/experimental/traffic-portal/src/app/shared/navigation/tp-sidebar/tp-sidebar.component.spec.ts
b/experimental/traffic-portal/src/app/shared/navigation/tp-sidebar/tp-sidebar.component.spec.ts
index e88a1192ee..9a3425f3b2 100644
---
a/experimental/traffic-portal/src/app/shared/navigation/tp-sidebar/tp-sidebar.component.spec.ts
+++
b/experimental/traffic-portal/src/app/shared/navigation/tp-sidebar/tp-sidebar.component.spec.ts
@@ -18,7 +18,7 @@ import { RouterTestingModule } from "@angular/router/testing";
import { of, ReplaySubject } from "rxjs";
import { APITestingModule } from "src/app/api/testing";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
import { NavigationService, TreeNavNode } from
"src/app/shared/navigation/navigation.service";
import { TpSidebarComponent } from "./tp-sidebar.component";
diff --git
a/experimental/traffic-portal/src/app/shared/table-components/ssh-cell-renderer/ssh-cell-renderer.component.spec.ts
b/experimental/traffic-portal/src/app/shared/table-components/ssh-cell-renderer/ssh-cell-renderer.component.spec.ts
index 8913b3009e..15ff48333a 100644
---
a/experimental/traffic-portal/src/app/shared/table-components/ssh-cell-renderer/ssh-cell-renderer.component.spec.ts
+++
b/experimental/traffic-portal/src/app/shared/table-components/ssh-cell-renderer/ssh-cell-renderer.component.spec.ts
@@ -16,7 +16,7 @@ import { waitForAsync, type ComponentFixture, TestBed } from
"@angular/core/test
import { RouterTestingModule } from "@angular/router/testing";
import type { ICellRendererParams } from "ag-grid-community";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
import { SSHCellRendererComponent } from "./ssh-cell-renderer.component";
diff --git
a/experimental/traffic-portal/src/app/shared/table-components/ssh-cell-renderer/ssh-cell-renderer.component.ts
b/experimental/traffic-portal/src/app/shared/table-components/ssh-cell-renderer/ssh-cell-renderer.component.ts
index 98d702cf62..785cad27cb 100644
---
a/experimental/traffic-portal/src/app/shared/table-components/ssh-cell-renderer/ssh-cell-renderer.component.ts
+++
b/experimental/traffic-portal/src/app/shared/table-components/ssh-cell-renderer/ssh-cell-renderer.component.ts
@@ -17,7 +17,7 @@ import { DomSanitizer, SafeUrl } from
"@angular/platform-browser";
import { ICellRendererAngularComp } from "ag-grid-angular";
import { ICellRendererParams } from "ag-grid-community";
-import { CurrentUserService } from
"src/app/shared/currentUser/current-user.service";
+import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
/**
* SSHCellRendererComponent is an AG-Grid cell renderer that provides ssh://
links as content.
diff --git
a/experimental/traffic-portal/src/app/shared/theme-manager/theme-manager.service.ts
b/experimental/traffic-portal/src/app/shared/theme-manager/theme-manager.service.ts
index 6fca540382..ff7cb1e518 100644
---
a/experimental/traffic-portal/src/app/shared/theme-manager/theme-manager.service.ts
+++
b/experimental/traffic-portal/src/app/shared/theme-manager/theme-manager.service.ts
@@ -91,9 +91,9 @@ export class ThemeManagerService {
* @param theme Theme to be stored
*/
private storeTheme(theme: Theme): void {
- if(typeof(window) !== "undefined") {
+ if(this.document.defaultView) {
try {
- window.localStorage.setItem(this.storageKey,
JSON.stringify(theme));
+
this.document.defaultView.localStorage.setItem(this.storageKey,
JSON.stringify(theme));
} catch (e) {
console.error(`Unable to store theme into local
storage: ${e}`);
}
@@ -106,9 +106,9 @@ export class ThemeManagerService {
* @returns The stored theme name or null
*/
private loadStoredTheme(): Theme | null {
- if(typeof(window) !== "undefined") {
+ if(this.document.defaultView) {
try {
- return
JSON.parse(window.localStorage.getItem(this.storageKey) ?? "null");
+ return
JSON.parse(this.document.defaultView.localStorage.getItem(this.storageKey) ??
"null");
} catch (e) {
console.error(`Unable to load theme from local
storage: ${e}`);
}
@@ -120,8 +120,8 @@ export class ThemeManagerService {
* Clears theme saved in local storage
*/
private clearStoredTheme(): void {
- if(typeof(window) !== "undefined") {
- window.localStorage.removeItem(this.storageKey);
+ if(this.document.defaultView) {
+
this.document.defaultView.localStorage.removeItem(this.storageKey);
}
}
diff --git a/infrastructure/cdn-in-a-box/Makefile
b/infrastructure/cdn-in-a-box/Makefile
index e91a3a0231..1c94d94915 100644
--- a/infrastructure/cdn-in-a-box/Makefile
+++ b/infrastructure/cdn-in-a-box/Makefile
@@ -41,8 +41,7 @@ PKG_COMMAND := $(TC_DIR)/pkg
PKG_FLAGS := -v -$(RHEL_VERSION)
BUILD_SUFFIX := _build
BUILD_NUMBER := $(shell git rev-list HEAD 2>/dev/null | wc -l | tr -d
'[[:space:]]').$(shell git rev-parse --short=8 HEAD)
-# no --rm on the docker command to speed up reuse for shell completion
-BUILD_ARCH := $(shell docker run
--name=ciab-get-$(BASE_IMAGE)-$(RHEL_VERSION)-arch
$(BASE_IMAGE):$(RHEL_VERSION) rpm --eval %_arch)
+BUILD_ARCH := $(shell docker run
--name=ciab-get-$(BASE_IMAGE)-$(RHEL_VERSION)-arch --rm
$(BASE_IMAGE):$(RHEL_VERSION) rpm --eval %_arch )
TC_VERSION := $(shell cat "$(TC_DIR)/VERSION")
TOMCAT_VERSION := $(shell grep '^\s*TOMCAT_VERSION='
"$(TC_DIR)/traffic_router/build/build_rpm.sh" | cut -d= -f2)
TOMCAT_RELEASE := $(shell grep '^\s*TOMCAT_RELEASE='
"$(TC_DIR)/traffic_router/build/build_rpm.sh" | cut -d= -f2)
@@ -64,6 +63,7 @@ ORT_SOURCE:= $(wildcard $(TC_DIR)/cache-config/**)
ORT_SOURCE+= $(wildcard $(TC_DIR)/lib/**.go)
TM_SOURCE := $(wildcard $(TC_DIR)/traffic_monitor/**)
TP_SOURCE := $(wildcard $(TC_DIR)/traffic_portal/**)
+TP2_SOURCE := $(wildcard $(TC_DIR)/experimental/traffic-portal/**)
TR_SOURCE := $(wildcard $(TC_DIR)/traffic_router/**)
TS_SOURCE := $(wildcard $(TC_DIR)/traffic_stats/**)
@@ -71,6 +71,7 @@ ATS_RPM := cache/trafficserver.rpm
TM_RPM := traffic_monitor/traffic_monitor.rpm
TO_RPM := traffic_ops/traffic_ops.rpm
TP_RPM := traffic_portal/traffic_portal.rpm
+TP2_RPM := traffic_portal_v2/traffic_portal_v2.rpm
TR_RPM := traffic_router/traffic_router.rpm
TOMCAT_RPM := traffic_router/tomcat.rpm
TS_RPM := traffic_stats/traffic_stats.rpm
@@ -80,6 +81,7 @@ ATS_RPM_RELATIVE := $(CIAB_DIR_RELATIVE)$(ATS_RPM)
TM_RPM_RELATIVE := $(CIAB_DIR_RELATIVE)$(TM_RPM)
TO_RPM_RELATIVE := $(CIAB_DIR_RELATIVE)$(TO_RPM)
TP_RPM_RELATIVE := $(CIAB_DIR_RELATIVE)$(TP_RPM)
+TP2_RPM_RELATIVE := $(CIAB_DIR_RELATIVE)$(TP2_RPM)
TR_RPM_RELATIVE := $(CIAB_DIR_RELATIVE)$(TR_RPM)
TOMCAT_RPM_RELATIVE := $(CIAB_DIR_RELATIVE)$(TOMCAT_RPM)
TS_RPM_RELATIVE := $(CIAB_DIR_RELATIVE)$(TS_RPM)
@@ -89,6 +91,7 @@ ATS_RPM_ABSOLUTE := $(CIAB_DIR_ABSOLUTE)/$(ATS_RPM)
TM_RPM_ABSOLUTE := $(CIAB_DIR_ABSOLUTE)/$(TM_RPM)
TO_RPM_ABSOLUTE := $(CIAB_DIR_ABSOLUTE)/$(TO_RPM)
TP_RPM_ABSOLUTE := $(CIAB_DIR_ABSOLUTE)/$(TP_RPM)
+TP2_RPM_ABSOLUTE := $(CIAB_DIR_ABSOLUTE)/$(TP2_RPM)
TR_RPM_ABSOLUTE := $(CIAB_DIR_ABSOLUTE)/$(TR_RPM)
TOMCAT_RPM_ABSOLUTE := $(CIAB_DIR_ABSOLUTE)/$(TOMCAT_RPM)
TS_RPM_ABSOLUTE := $(CIAB_DIR_ABSOLUTE)/$(TS_RPM)
@@ -98,6 +101,7 @@ ATS_DIST_RPM := $(TC_DIR)/dist/trafficserver-$(SPECIAL_SYRUP)
TM_DIST_RPM := $(TC_DIR)/dist/traffic_monitor-$(SPECIAL_SAUCE)
TO_DIST_RPM := $(TC_DIR)/dist/traffic_ops-$(SPECIAL_SAUCE)
TP_DIST_RPM := $(TC_DIR)/dist/traffic_portal-$(SPECIAL_SAUCE)
+TP2_DIST_RPM := $(TC_DIR)/dist/traffic_portal_v2-$(SPECIAL_SAUCE)
TR_DIST_RPM := $(TC_DIR)/dist/traffic_router-$(SPECIAL_SAUCE_NOARCH)
TOMCAT_DIST_RPM := $(TC_DIR)/dist/tomcat-$(SPECIAL_SEASONING)
TS_DIST_RPM := $(TC_DIR)/dist/traffic_stats-$(SPECIAL_SAUCE)
@@ -106,7 +110,7 @@ ORT_DIST_RPM :=
$(TC_DIR)/dist/trafficcontrol-cache-config-$(SPECIAL_SAUCE)
.PHONY: all build-builders clean debug native nearly-all pull-builders
very-clean
# Default target; builds all pre-requisite rpms from source trees
-all: $(ATS_RPM_RELATIVE) $(ORT_RPM_RELATIVE) $(TM_RPM_RELATIVE)
$(TP_RPM_RELATIVE) $(TO_RPM_RELATIVE) $(TR_RPM_RELATIVE) $(TOMCAT_RPM_RELATIVE)
$(TS_RPM_RELATIVE)
+all: $(ATS_RPM_RELATIVE) $(ORT_RPM_RELATIVE) $(TM_RPM_RELATIVE)
$(TP_RPM_RELATIVE) $(TP2_RPM_RELATIVE) $(TO_RPM_RELATIVE) $(TR_RPM_RELATIVE)
$(TOMCAT_RPM_RELATIVE) $(TS_RPM_RELATIVE)
ifneq ($(filter build-builders,$(MAKECMDGOALS)),)
PKG_FLAGS += -b
@@ -160,6 +164,8 @@ $(TO_RPM_RELATIVE): $(TO_DIST_RPM)
cp -f "$?" "$@"
$(TP_RPM_RELATIVE): $(TP_DIST_RPM)
cp -f "$?" "$@"
+$(TP2_RPM_RELATIVE): $(TP2_DIST_RPM)
+ cp -f "$?" "$@"
$(TR_RPM_RELATIVE): $(TR_DIST_RPM)
cp -f "$?" "$@"
$(TOMCAT_RPM_RELATIVE): $(TOMCAT_DIST_RPM)
@@ -178,6 +184,8 @@ $(TO_RPM_ABSOLUTE): $(TO_DIST_RPM)
cp -f "$?" "$@"
$(TP_RPM_ABSOLUTE): $(TP_DIST_RPM)
cp -f "$?" "$@"
+$(TP2_RPM_ABSOLUTE): $(TP2_DIST_RPM)
+ cp -f "$?" "$@"
$(TR_RPM_ABSOLUTE): $(TR_DIST_RPM)
cp -f "$?" "$@"
$(TOMCAT_RPM_ABSOLUTE): $(TOMCAT_DIST_RPM)
@@ -200,6 +208,9 @@ $(TO_DIST_RPM): $(TO_SOURCE)
$(TP_DIST_RPM): $(TP_SOURCE)
"$(PKG_COMMAND)" $(PKG_FLAGS) traffic_portal$(BUILD_SUFFIX)
+$(TP2_DIST_RPM): $(TP2_SOURCE)
+ "$(PKG_COMMAND)" $(PKG_FLAGS) traffic_portal_v2$(BUILD_SUFFIX)
+
$(TR_DIST_RPM) $(TOMCAT_DIST_RPM): $(TR_SOURCE)
"$(PKG_COMMAND)" $(PKG_FLAGS) traffic_router$(BUILD_SUFFIX)
@@ -211,7 +222,7 @@ $(ORT_DIST_RPM): $(ORT_SOURCE)
clean:
cd "$(CIAB_DIR_RELATIVE)"
- $(RM) $(TM_RPM_RELATIVE) $(TO_RPM_RELATIVE) $(TP_RPM_RELATIVE)
$(TR_RPM_RELATIVE) $(TOMCAT_RPM_RELATIVE) $(ORT_RPM_RELATIVE) $(TS_RPM_RELATIVE)
+ $(RM) $(TM_RPM_RELATIVE) $(TO_RPM_RELATIVE) $(TP_RPM_RELATIVE)
$(TP2_RPM_RELATIVE) $(TR_RPM_RELATIVE) $(TOMCAT_RPM_RELATIVE)
$(ORT_RPM_RELATIVE) $(TS_RPM_RELATIVE)
very-clean: clean
$(warning This will destroy ALL OUTPUT RPMS IN 'dist'. Please be sure
this is what you want)
diff --git a/infrastructure/cdn-in-a-box/docker-compose.expose-ports.yml
b/infrastructure/cdn-in-a-box/docker-compose.expose-ports.yml
index a6bf9b592f..07527928cb 100644
--- a/infrastructure/cdn-in-a-box/docker-compose.expose-ports.yml
+++ b/infrastructure/cdn-in-a-box/docker-compose.expose-ports.yml
@@ -30,6 +30,9 @@ services:
trafficops:
ports:
- "6443:443"
+ trafficportal-v2:
+ ports:
+ - "8443:443"
trafficportal:
ports:
- "443:443"
diff --git a/infrastructure/cdn-in-a-box/docker-compose.yml
b/infrastructure/cdn-in-a-box/docker-compose.yml
index d7fc31ac8b..c89e10b8ea 100644
--- a/infrastructure/cdn-in-a-box/docker-compose.yml
+++ b/infrastructure/cdn-in-a-box/docker-compose.yml
@@ -99,6 +99,25 @@ services:
volumes:
- shared:/shared
+ trafficportal-v2:
+ build:
+ context: .
+ dockerfile: traffic_portal_v2/Dockerfile
+ args:
+ # Change BASE_IMAGE to centos when RHEL_VERSION=7
+ BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
+ RHEL_VERSION: ${RHEL_VERSION:-8}
+ TRAFFIC_PORTAL_RPM: traffic_portal_v2/traffic_portal_v2.rpm
+ depends_on:
+ - enroller
+ domainname: infra.ciab.test
+ env_file:
+ - variables.env
+ hostname: trafficportalv2
+ image: trafficportalv2
+ volumes:
+ - shared:/shared
+
# trafficmonitor is an HTTP service that monitors the caches in a CDN for a
variety of metrics
trafficmonitor:
build:
diff --git a/infrastructure/cdn-in-a-box/traffic_ops/to-access.sh
b/infrastructure/cdn-in-a-box/traffic_ops/to-access.sh
index 333f16560e..510c59a590 100755
--- a/infrastructure/cdn-in-a-box/traffic_ops/to-access.sh
+++ b/infrastructure/cdn-in-a-box/traffic_ops/to-access.sh
@@ -239,7 +239,7 @@ to-enroll() {
export MY_PROFILE="TRAFFIC_ROUTER"
export MY_STATUS="ONLINE"
;;
- "tp" )
+ "tp" | "tpv2" )
export MY_TYPE="TRAFFIC_PORTAL"
export MY_PROFILE="TRAFFIC_PORTAL"
export MY_STATUS="ONLINE"
diff --git a/infrastructure/cdn-in-a-box/traffic_portal/run.sh
b/infrastructure/cdn-in-a-box/traffic_portal/run.sh
index 36c53e4db2..7c2007e6b0 100755
--- a/infrastructure/cdn-in-a-box/traffic_portal/run.sh
+++ b/infrastructure/cdn-in-a-box/traffic_portal/run.sh
@@ -68,4 +68,4 @@ to-enroll "tp" ALL || (while true; do echo "enroll failed.";
sleep 3 ; done)
# Add node to the path for situations in which the environment is passed.
./$INIT_DIR/traffic_portal start
-tail -f /dev/null
+tail -f /var/log/traffic_portal/traffic_portal.log
diff --git a/infrastructure/cdn-in-a-box/traffic_portal_v2/Dockerfile
b/infrastructure/cdn-in-a-box/traffic_portal_v2/Dockerfile
new file mode 100644
index 0000000000..fc16109fc5
--- /dev/null
+++ b/infrastructure/cdn-in-a-box/traffic_portal_v2/Dockerfile
@@ -0,0 +1,69 @@
+# 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.
+
+############################################################
+# Dockerfile to build Traffic Portal container images
+# Based on Rocky Linux 8
+############################################################
+
+ # Change BASE_IMAGE to centos when RHEL_VERSION=7
+ARG BASE_IMAGE=rockylinux \
+ RHEL_VERSION=8
+FROM ${BASE_IMAGE}:${RHEL_VERSION}
+ARG RHEL_VERSION=8
+
+RUN if [[ "${RHEL_VERSION%%.*}" -eq 7 ]]; then \
+ yum -y install dnf || exit 1; \
+ fi
+
+RUN set -o pipefail && \
+ curl -sLf https://rpm.nodesource.com/setup_16.x | bash
+
+# Override TRAFFIC_PORTAL_RPM arg to use a different one using --build-arg
TRAFFIC_PORTAL_RPM=... Can be local file or http://...
+ARG TRAFFIC_PORTAL_RPM=traffic_portal_v2/traffic_portal_v2.rpm
+
+ARG TO_HOST=$TO_HOST
+
+# Install and delete the TRAFFIC_PORTAL_RPM when finished
+RUN dnf install -y epel-release && \
+ dnf install -y \
+ jq \
+ nodejs \
+ openssl \
+ procps-ng \
+ # find is required by to-access.sh
+ findutils \
+ gettext \
+ bind-utils \
+ net-tools && \
+ dnf clean all
+
+ADD $TRAFFIC_PORTAL_RPM /
+RUN rpm -Uvh /$(basename $TRAFFIC_PORTAL_RPM) && \
+ rm /$(basename $TRAFFIC_PORTAL_RPM)
+
+ADD enroller/server_template.json \
+ traffic_portal_v2/run.sh \
+ traffic_ops/to-access.sh /
+
+COPY dns/set-dns.sh \
+ dns/insert-self-into-dns.sh \
+ /usr/local/sbin/
+
+EXPOSE 443
+
+CMD /run.sh
diff --git a/infrastructure/cdn-in-a-box/traffic_portal/run.sh
b/infrastructure/cdn-in-a-box/traffic_portal_v2/run.sh
similarity index 69%
copy from infrastructure/cdn-in-a-box/traffic_portal/run.sh
copy to infrastructure/cdn-in-a-box/traffic_portal_v2/run.sh
index 36c53e4db2..cbb622b5e1 100755
--- a/infrastructure/cdn-in-a-box/traffic_portal/run.sh
+++ b/infrastructure/cdn-in-a-box/traffic_portal_v2/run.sh
@@ -15,6 +15,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
+set -e
INIT_DIR="/etc/init.d"
@@ -47,25 +48,19 @@ key=$X509_INFRA_KEY_FILE
cert=$X509_INFRA_CERT_FILE
ca=/etc/pki/tls/certs/ca-bundle.crt
-# set configs to point to TO_FQDN
-sed -i -e "/^\s*base_url:/ s@'.*'@'https://$TO_FQDN:$TO_PORT/api/'@"
/etc/traffic_portal/conf/config.js
-sed -i -e "/^\s*cert:/ s@'.*'@'$cert'@" /etc/traffic_portal/conf/config.js
-sed -i -e "/^\s*key:/ s@'.*'@'$key'@" /etc/traffic_portal/conf/config.js
-
-props=/opt/traffic_portal/public/traffic_portal_properties.json
-tmp=$(mktemp)
-
-echo "TO_HOST: $TO_HOST"
-echo "TO_HOST: $TO_PORT"
-echo "TO_FQDN: $TO_FQDN"
-
-jq --arg TO_FQDN "$TO_FQDN:$TO_PORT" '.properties.api.baseUrl =
"https://"+$TO_FQDN' <$props >$tmp
-mv $tmp $props
+echo "$(jq "$(<<JQ_FILTERS cat
+ .trafficOps = "https://$TO_FQDN:$TO_PORT/api" |
+ .certPath = "$cert" |
+ .keyPath = "$key" |
+ .port = 443 |
+ .insecure = true
+JQ_FILTERS
+)" /etc/traffic-portal/config.json )" > /etc/traffic-portal/config.json
# Enroll the Traffic Portal
-to-enroll "tp" ALL || (while true; do echo "enroll failed."; sleep 3 ; done)
+to-enroll "tpv2" ALL
# Add node to the path for situations in which the environment is passed.
-./$INIT_DIR/traffic_portal start
+./$INIT_DIR/traffic-portal start
-tail -f /dev/null
+tail -f /var/log/traffic-portal/traffic-portal.log