diff --git a/easytier-web/frontend/src/components/DeviceList.vue b/easytier-web/frontend/src/components/DeviceList.vue
index 2b6bd613..9198eb08 100644
--- a/easytier-web/frontend/src/components/DeviceList.vue
+++ b/easytier-web/frontend/src/components/DeviceList.vue
@@ -27,7 +27,7 @@ const loadDevices = async () => {
public_ip: device.client_url,
running_network_instances: device.info?.running_network_instances.map((instance: any) => Utils.UuidToStr(instance)),
running_network_count: device.info?.running_network_instances.length,
- report_time: device.info?.report_time,
+ report_time: new Date(device.info?.report_time).toLocaleString(),
easytier_version: device.info?.easytier_version,
machine_id: Utils.UuidToStr(device.info?.machine_id),
});
diff --git a/easytier-web/frontend/src/components/DeviceManagement.vue b/easytier-web/frontend/src/components/DeviceManagement.vue
index 2c185c68..b69b0960 100644
--- a/easytier-web/frontend/src/components/DeviceManagement.vue
+++ b/easytier-web/frontend/src/components/DeviceManagement.vue
@@ -210,9 +210,20 @@ const loadDeviceInfo = async () => {
}
const exportConfig = async () => {
- let ret = await props.api?.get_network_config(deviceId.value, instanceId.value);
- delete ret.instance_id;
- exportJsonFile(JSON.stringify(ret, null, 2),instanceId.value +'.json');
+ if (!deviceId.value || !instanceId.value) {
+ toast.add({ severity: 'error', summary: 'Error', detail: 'No network instance selected', life: 2000 });
+ return;
+ }
+
+ try {
+ let ret = await props.api?.get_network_config(deviceId.value, instanceId.value);
+ delete ret.instance_id;
+ exportJsonFile(JSON.stringify(ret, null, 2),instanceId.value +'.json');
+ } catch (e: any) {
+ console.error(e);
+ toast.add({ severity: 'error', summary: 'Error', detail: 'Failed to export network config, error: ' + JSON.stringify(e.response.data), life: 2000 });
+ return;
+ }
}
const importConfig = () => {
@@ -316,9 +327,9 @@ onUnmounted(() => {