- |
+ |
{{ 'No addresses' | i18n }}
@@ -132,7 +139,7 @@ export class InterfaceAddressesComponent {
}),
}),
),
- note: await this.getSharedHostNote(),
+ note: this.getSharedHostNote(),
buttons: [
{
text: this.i18n.transform('Save')!,
@@ -191,7 +198,7 @@ export class InterfaceAddressesComponent {
size: 's',
data: {
spec: await configBuilderToSpec(addSpec),
- note: await this.getSharedHostNote(),
+ note: this.getSharedHostNote(),
buttons: [
{
text: this.i18n.transform('Save')!,
@@ -235,26 +242,11 @@ export class InterfaceAddressesComponent {
}
}
- private async getSharedHostNote(): Promise {
- const iface = this.value()
- const pkgId = this.packageId()
- if (!iface || !pkgId) return ''
+ private getSharedHostNote(): string {
+ const names = this.value()?.sharedHostNames
+ if (!names?.length) return ''
- const pkg = await firstValueFrom(
- this.patch.watch$('packageData', pkgId),
- )
- if (!pkg) return ''
-
- const hostId = iface.addressInfo.hostId
- const otherNames = Object.values(pkg.serviceInterfaces)
- .filter(
- si => si.addressInfo.hostId === hostId && si.id !== iface.id,
- )
- .map(si => si.name)
-
- if (!otherNames.length) return ''
-
- return `${this.i18n.transform('This domain will also apply to')} ${otherNames.join(', ')}`
+ return `${this.i18n.transform('This domain will also apply to')} ${names.join(', ')}`
}
private async savePublicDomain(
diff --git a/web/projects/ui/src/app/routes/portal/components/interfaces/addresses/item.component.ts b/web/projects/ui/src/app/routes/portal/components/interfaces/addresses/item.component.ts
index 689a709a4..ca33b6037 100644
--- a/web/projects/ui/src/app/routes/portal/components/interfaces/addresses/item.component.ts
+++ b/web/projects/ui/src/app/routes/portal/components/interfaces/addresses/item.component.ts
@@ -10,7 +10,7 @@ import { ErrorService, i18nPipe, LoadingService } from '@start9labs/shared'
import { TuiObfuscatePipe } from '@taiga-ui/cdk'
import { TuiButton, TuiIcon } from '@taiga-ui/core'
import { FormsModule } from '@angular/forms'
-import { TuiSwitch } from '@taiga-ui/kit'
+import { TuiBadge, TuiSwitch } from '@taiga-ui/kit'
import { ApiService } from 'src/app/services/api/embassy-api.service'
import { GatewayAddress, MappedServiceInterface } from '../interface.service'
import { AddressActionsComponent } from './actions.component'
@@ -36,22 +36,51 @@ import { DomainHealthService } from './domain-health.service'
(ngModelChange)="onToggleEnabled()"
/>
|
-
+ |
- {{ address.type }}
+
+ {{ (address.access === 'public' ? 'Public' : 'Local') | i18n }}
+
+ |
+
+
+ {{ address.type }}
+
|
- {{ address.certificate }}
+
+ @if (address.certificate === 'Root CA') {
+ 
+ } @else if (address.certificate.startsWith("Let's Encrypt")) {
+ 
+ } @else if (
+ address.certificate !== '-' && address.certificate !== 'Self signed'
+ ) {
+
+ }
+ {{ address.certificate }}
+
|
-
- {{ address.url | tuiObfuscate: recipe() }}
-
+ @if (address.masked && currentlyMasked()) {
+ {{ address.url | tuiObfuscate: 'mask' }}
+ } @else {
+
+ @if (urlParts(); as parts) {
+ {{ parts.prefix }}
+ {{ parts.hostname }}
+ {{ parts.suffix }}
+ } @else {
+ {{ address.url }}
+ }
+
+ }
@if (address.masked) {
|