diff --git a/package.json b/package.json
index 02f36ccc..11624049 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@fdm-monster/client",
- "version": "1.1.3",
+ "version": "1.1.4",
"private": false,
"author": "David Zwart",
"license": "AGPL-3.0-or-later",
diff --git a/src/backend/batch.service.ts b/src/backend/batch.service.ts
new file mode 100644
index 00000000..f1d7f98d
--- /dev/null
+++ b/src/backend/batch.service.ts
@@ -0,0 +1,11 @@
+import { BaseService } from "./base.service";
+
+export class BatchService extends BaseService {
+ static async batchConnectUsb(printerIds: string[]) {
+ return await this.postApi("api/batch/connect/usb", { printerIds });
+ }
+
+ static async batchConnectSocket(printerIds: string[]) {
+ return await this.postApi(`api/batch/connect/socket`, { printerIds });
+ }
+}
diff --git a/src/components/Settings/EmergencyCommands.vue b/src/components/Settings/EmergencyCommands.vue
new file mode 100644
index 00000000..23eedb9f
--- /dev/null
+++ b/src/components/Settings/EmergencyCommands.vue
@@ -0,0 +1,110 @@
+
+
+
+
+ settings
+
+ Emergency Commands
+
+
+ Emergency Commands to rectify problematic situations
+
+
+
+ Server commands
+
+ Restart the server
+
+ Restart server
+
+
+
+
+
+
+ Batch USB connect
+
+ Connect all USB devices
+
+
+ usb
+ Connect USBs
+
+ warning
+ This feature is not available, please update the FDM Monster server
+
+
+
+ Connect all Sockets
+
+
+ hub
+ Connect Sockets
+
+
+ warning
+ This feature is not available, please update the FDM Monster server
+
+
+
+
+
+
+
+
diff --git a/src/components/Settings/ServerRelatedSettings.vue b/src/components/Settings/ServerRelatedSettings.vue
deleted file mode 100644
index 677fa1e8..00000000
--- a/src/components/Settings/ServerRelatedSettings.vue
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
-
- settings
-
- Server related
-
-
- Commands and Server Settings
-
-
-
- Server commands
-
- Restart the server
-
- Restart server
-
-
-
-
-
-
-
-
diff --git a/src/components/Settings/SettingsView.vue b/src/components/Settings/SettingsView.vue
index 43baf4e0..4ded2add 100644
--- a/src/components/Settings/SettingsView.vue
+++ b/src/components/Settings/SettingsView.vue
@@ -66,7 +66,7 @@ export default defineComponent({
path: "/settings/user-management",
},
{ title: "FDM Monster settings", icon: "image", path: "/settings/system" },
- { title: "Other", icon: "help", path: "/settings/server-related" },
+ { title: "Emergency Commands", icon: "warning", path: "/settings/emergency-commands" },
],
}),
computed: {},
diff --git a/src/models/batch.model.ts b/src/models/batch.model.ts
new file mode 100644
index 00000000..e4be3665
--- /dev/null
+++ b/src/models/batch.model.ts
@@ -0,0 +1,9 @@
+export interface BatchSingletonModel {
+ success?: boolean;
+ failure?: boolean;
+ printerId: string;
+ time: number;
+ error?: string;
+}
+
+export type BatchModel = BatchSingletonModel[];
diff --git a/src/models/server/features.model.ts b/src/models/server/features.model.ts
index d313f708..f63f2c1d 100644
--- a/src/models/server/features.model.ts
+++ b/src/models/server/features.model.ts
@@ -5,7 +5,13 @@ export interface IFeatureFlag {
export class FeaturesModel {
batchReprintCalls?: IFeatureFlag;
+ batchConnectUsbCalls?: IFeatureFlag;
+ batchConnectSocketCalls?: IFeatureFlag;
}
export type TFeatureFlags = keyof FeaturesModel;
-export const featureFlagsList: TFeatureFlags[] = ["batchReprintCalls"];
+export const featureFlagsList: TFeatureFlags[] = [
+ "batchReprintCalls",
+ "batchConnectUsbCalls",
+ "batchConnectSocketCalls",
+];
diff --git a/src/router/index.ts b/src/router/index.ts
index b2a0bf91..78c1bd6f 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -6,7 +6,7 @@ import Settings from "../components/Settings/SettingsView.vue";
import AboutHelp from "../components/AboutHelp/AboutView.vue";
import PrintStatisticsView from "@/components/PrintStatistics/PrintStatisticsView.vue";
import FdmSettings from "@/components/Settings/FdmSettings.vue";
-import ServerRelatedSettings from "@/components/Settings/ServerRelatedSettings.vue";
+import EmergencyCommands from "../components/Settings/EmergencyCommands.vue";
import UserManagementSettings from "@/components/Settings/UserManagementSettings.vue";
import FloorSettings from "@/components/Settings/FloorSettings.vue";
import GridSettings from "../components/Settings/GridSettings.vue";
@@ -49,8 +49,8 @@ const routes: Array = [
component: FdmSettings,
},
{
- path: "server-related",
- component: ServerRelatedSettings,
+ path: "emergency-commands",
+ component: EmergencyCommands,
},
],
},