From b7e6acb24e234d1d2d330a0a30ce7aa9096966ae Mon Sep 17 00:00:00 2001 From: bbassie Date: Tue, 16 Nov 2021 23:44:07 +0100 Subject: [PATCH] Added instance deleted alert and updated not found --- .../src/components/InstanceViewPage.jsx | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/packages/web_ui/src/components/InstanceViewPage.jsx b/packages/web_ui/src/components/InstanceViewPage.jsx index 58384ab4..4559839c 100644 --- a/packages/web_ui/src/components/InstanceViewPage.jsx +++ b/packages/web_ui/src/components/InstanceViewPage.jsx @@ -1,6 +1,6 @@ import React, { useContext, useState } from "react"; import { useHistory, useParams } from "react-router-dom"; -import { Button, Descriptions, Popconfirm, Space, Spin, Typography } from "antd"; +import { Alert, Button, Descriptions, Popconfirm, Space, Spin, Typography } from "antd"; import DeleteOutlined from "@ant-design/icons/DeleteOutlined"; import { libLink } from "@clusterio/lib"; @@ -41,10 +41,22 @@ export default function InstanceViewPage(props) { return ; } - if (instance.missing) { + if (instance.missing || instance["status"] === "deleted") { return -

Instance not found

-

Instance with id {instanceId} was not found on the master server.

+ Instance with id {instanceId} was not found on the master server.} + type="warning" + action={ + + } + />
; }