Added public_address field to lists

- InstanceList
- SlavesPage
Added public_address field to messages
- slaveProperties
- instanceProperties
This commit is contained in:
bbassie committed 2021-11-04 01:39:28 +01:00
1 parent c3a1b420ea
commit 83b720eade
8 files changed
+37 -3

No files matched your search

+11 -2
View File
@@ -1,6 +1,6 @@
import React, { useContext, useRef, useState } from "react";
import { useHistory } from "react-router-dom";
import { Button, Form, Input, Modal, PageHeader, Table } from "antd";
import { Button, Form, Input, Modal, PageHeader, Table, Tag } from "antd";
import { libLink } from "@clusterio/lib";
@@ -104,10 +104,19 @@ export default function SlavesPage() {
dataIndex: "version",
sorter: (a, b) => strcmp(a["version"], b["version"]),
},
{
title: "Public address",
dataIndex: "public_address",
sorter: (a, b) => strcmp(a["public_address"], b["public_address"]),
},
{
title: "Connected",
key: "connected",
render: slave => slave["connected"] && "Yes",
render: slave => <Tag
color={slave["connected"] ? "#389e0d" : "#cf1322"}
>
{slave["connected"] ? "Connected" : "Disconnected"}
</Tag>,
sorter: (a, b) => a["connected"] - b["connected"],
},
]}