diff --git a/jsx/src/components/ServerDashboard/ServerDashboard.jsx b/jsx/src/components/ServerDashboard/ServerDashboard.jsx index 260ddb7f..4385395d 100644 --- a/jsx/src/components/ServerDashboard/ServerDashboard.jsx +++ b/jsx/src/components/ServerDashboard/ServerDashboard.jsx @@ -45,11 +45,11 @@ const ServerDashboard = (props) => { adminAsc = (e) => e.sort((a) => (a.admin ? 1 : -1)), dateDesc = (e) => e.sort((a, b) => - new Date(a.last_activity) - new Date(b.last_activity) > 0 ? -1 : 1 + new Date(a.last_activity) - new Date(b.last_activity) > 0 ? -1 : 1, ), dateAsc = (e) => e.sort((a, b) => - new Date(a.last_activity) - new Date(b.last_activity) > 0 ? 1 : -1 + new Date(a.last_activity) - new Date(b.last_activity) > 0 ? 1 : -1, ), runningAsc = (e) => e.sort((a) => (a.server == null ? -1 : 1)), runningDesc = (e) => e.sort((a) => (a.server == null ? 1 : -1)); @@ -144,7 +144,7 @@ const ServerDashboard = (props) => { dispatchPageUpdate( data.items, data._pagination, - name_filter + name_filter, ); }) .catch(() => { @@ -188,7 +188,7 @@ const ServerDashboard = (props) => { dispatchPageUpdate( data.items, data._pagination, - name_filter + name_filter, ); }) .catch(() => { @@ -228,7 +228,7 @@ const ServerDashboard = (props) => { dispatchPageUpdate( data.items, data._pagination, - name_filter + name_filter, ); }) .catch(() => { @@ -536,7 +536,7 @@ const ServerDashboard = (props) => { failedServers.length > 1 ? "servers" : "server" }. ${ failedServers.length > 1 ? "Are they " : "Is it " - } already running?` + } already running?`, ); } return res; @@ -547,11 +547,11 @@ const ServerDashboard = (props) => { dispatchPageUpdate( data.items, data._pagination, - name_filter + name_filter, ); }) .catch(() => - setErrorAlert(`Failed to update users list.`) + setErrorAlert(`Failed to update users list.`), ); return res; }) @@ -576,7 +576,7 @@ const ServerDashboard = (props) => { failedServers.length > 1 ? "servers" : "server" }. ${ failedServers.length > 1 ? "Are they " : "Is it " - } already stopped?` + } already stopped?`, ); } return res; @@ -587,11 +587,11 @@ const ServerDashboard = (props) => { dispatchPageUpdate( data.items, data._pagination, - name_filter + name_filter, ); }) .catch(() => - setErrorAlert(`Failed to update users list.`) + setErrorAlert(`Failed to update users list.`), ); return res; }) diff --git a/jsx/src/components/ServerDashboard/ServerDashboard.test.js b/jsx/src/components/ServerDashboard/ServerDashboard.test.js index 04f5a8dc..b70ac2a4 100644 --- a/jsx/src/components/ServerDashboard/ServerDashboard.test.js +++ b/jsx/src/components/ServerDashboard/ServerDashboard.test.js @@ -403,7 +403,7 @@ test("Shows a UI error dialogue when start all servers fails", async () => { /> - + , ); }); @@ -437,7 +437,7 @@ test("Shows a UI error dialogue when stop all servers fails", async () => { /> - + , ); }); @@ -471,7 +471,7 @@ test("Shows a UI error dialogue when start user server fails", async () => { /> - + , ); }); @@ -506,7 +506,7 @@ test("Shows a UI error dialogue when start user server returns an improper statu /> - + , ); }); @@ -541,7 +541,7 @@ test("Shows a UI error dialogue when stop user servers fails", async () => { /> - + , ); }); @@ -575,7 +575,7 @@ test("Shows a UI error dialogue when stop user server returns an improper status /> - + , ); }); @@ -621,7 +621,7 @@ test("Search for user calls updateUsers with name filter", async () => { /> - + , ); }); diff --git a/jsx/src/util/withAPI.js b/jsx/src/util/withAPI.js index abce6a5f..1b49f46a 100644 --- a/jsx/src/util/withAPI.js +++ b/jsx/src/util/withAPI.js @@ -7,11 +7,11 @@ const withAPI = withProps(() => ({ `/users?include_stopped_servers&offset=${offset}&limit=${limit}&name_filter=${ name_filter || "" }`, - "GET" + "GET", ).then((data) => data.json()), updateGroups: (offset, limit) => jhapiRequest(`/groups?offset=${offset}&limit=${limit}`, "GET").then( - (data) => data.json() + (data) => data.json(), ), shutdownHub: () => jhapiRequest("/shutdown", "POST"), startServer: (name, serverName = "") => @@ -22,7 +22,7 @@ const withAPI = withProps(() => ({ jhapiRequest( "/users/" + name + "/servers/" + (serverName || ""), "DELETE", - { remove: true } + { remove: true }, ), startAll: (names) => names.map((e) => jhapiRequest("/users/" + e + "/server", "POST")),