@castlabs/ui 7.19.0 → 7.19.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- /* @castlabs/ui v7.19.0 */
1
+ /* @castlabs/ui v7.19.2 */
2
2
 
3
3
  /*!
4
4
  * Bootstrap v5.3.8 (https://getbootstrap.com/)
@@ -510,8 +510,7 @@ const APPS = {
510
510
  title: SERVICE.CPS,
511
511
  services: [SERVICE.CPS_URN],
512
512
  roles: [ROLE.CP_USER_URN],
513
- urlManage: (env, oid) =>
514
- `https://platform.content-stag.castlabs.com/#/o/${oid ?? ''}`,
513
+ urlManage: (env, oid) => `https://platform.content-stag.castlabs.com/#/o/${oid ?? ''}`,
515
514
  urlPlan: (env, oid) => urlCS(env, oid),
516
515
  sidenav: false
517
516
  },
@@ -653,8 +652,7 @@ const APPS = {
653
652
  title: SERVICE.VTKS,
654
653
  services: [SERVICE.VTKS_URN],
655
654
  roles: [ROLE.VTK_USER_URN],
656
- urlManage: (env, oid) =>
657
- `https://vtks.castlabs.com/${oid}/jobs/`,
655
+ urlManage: (env, oid) => `https://vtks.castlabs.com/${oid}/jobs/`,
658
656
  urlPlan: (env, oid) => urlCS(env, oid, '/plans/vtk'),
659
657
  sidenav: false
660
658
  }
@@ -963,11 +961,12 @@ function getDomainCookieJson (name) {
963
961
  }
964
962
 
965
963
  function getDomain () {
966
- if (window.location.hostname.match(/^[0-9]+.[0-9]+.[0-9]+.[0-9]+$/)) {
964
+ const hostname = window.location.hostname ?? 'unknown'
965
+ if (hostname.match(/^[0-9]+.[0-9]+.[0-9]+.[0-9]+$/)) {
967
966
  // IP domain
968
- return window.location.hostname
967
+ return hostname
969
968
  }
970
- const parts = window.location.hostname.split('.').reverse()
969
+ const parts = hostname.split('.').reverse()
971
970
  if (parts.length > 1) {
972
971
  // regular multi-part domain name
973
972
  return `.${parts[1]}.${parts[0]}`