From 267968e0990ccf3db8e4f6a111bd0964bc482214 Mon Sep 17 00:00:00 2001 From: fhanportainer <79428273+fhanportainer@users.noreply.github.com> Date: Thu, 10 Jun 2021 01:34:19 +1200 Subject: [PATCH] fix(aci): fixed aci with persistence or networking issue. (#4996) --- app/azure/models/container_group.js | 6 +++--- .../containerInstanceDetails.html | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/azure/models/container_group.js b/app/azure/models/container_group.js index 1c14f2d0d..2dcda73af 100644 --- a/app/azure/models/container_group.js +++ b/app/azure/models/container_group.js @@ -20,18 +20,18 @@ export function ContainerGroupDefaultModel() { } export function ContainerGroupViewModel(data) { - const addressPorts = data.properties.ipAddress.ports; + const addressPorts = data.properties.ipAddress ? data.properties.ipAddress.ports : []; const container = data.properties.containers.length ? data.properties.containers[0] : {}; const containerPorts = container ? container.properties.ports : []; this.Id = data.id; this.Name = data.name; this.Location = data.location; - this.IPAddress = data.properties.ipAddress.ip; + this.IPAddress = data.properties.ipAddress ? data.properties.ipAddress.ip : ''; this.Ports = addressPorts.length ? addressPorts.map((binding, index) => ({ container: containerPorts[index].port, host: binding.port, protocol: binding.protocol })) : []; this.Image = container.properties.image || ''; this.OSType = data.properties.osType; - this.AllocatePublicIP = data.properties.ipAddress.type === 'Public'; + this.AllocatePublicIP = data.properties.ipAddress && data.properties.ipAddress.type === 'Public'; this.CPU = container.properties.resources.requests.cpu; this.Memory = container.properties.resources.requests.memoryInGB; diff --git a/app/azure/views/containerinstances/container-instance-details/containerInstanceDetails.html b/app/azure/views/containerinstances/container-instance-details/containerInstanceDetails.html index 1b564bd9b..37465bcae 100644 --- a/app/azure/views/containerinstances/container-instance-details/containerInstanceDetails.html +++ b/app/azure/views/containerinstances/container-instance-details/containerInstanceDetails.html @@ -63,7 +63,7 @@ -
+