Skip to content

Commit 2e486cb

Browse files
Merge branch 'dev' of https://github.com/KelvinTegelaar/CIPP into dev
2 parents 7eaee18 + 2f0c3c6 commit 2e486cb

File tree

1 file changed

+25
-14
lines changed

1 file changed

+25
-14
lines changed

src/pages/endpoint/MEM/devices/index.js

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
Password,
1010
PasswordOutlined,
1111
Key,
12+
Edit,
1213
Security,
1314
FindInPage,
1415
Shield,
@@ -69,6 +70,25 @@ const Page = () => {
6970
],
7071
confirmText: "Select the User to set as the primary user for this device",
7172
},
73+
{
74+
label: "Rename Device",
75+
type: "POST",
76+
icon: <Edit />,
77+
url: "/api/ExecDeviceAction",
78+
data: {
79+
GUID: "id",
80+
Action: "setDeviceName",
81+
},
82+
confirmText: "Enter the new name for the device",
83+
fields: [
84+
{
85+
type: "textField",
86+
name: "input",
87+
label: "New Device Name",
88+
required: true,
89+
},
90+
],
91+
},
7292
{
7393
label: "Sync Device",
7494
type: "POST",
@@ -180,19 +200,6 @@ const Page = () => {
180200
},
181201
confirmText: "Are you sure you want to generate logs and ship these to MEM?",
182202
},
183-
/*
184-
{
185-
label: "Rename device",
186-
type: "POST",
187-
icon: null,
188-
url: "/api/ExecDeviceAction",
189-
data: {
190-
GUID: "id",
191-
Action: "setDeviceName",
192-
},
193-
confirmText: "Enter the new name for the device",
194-
},
195-
*/
196203
{
197204
label: "Fresh Start (Remove user data)",
198205
type: "POST",
@@ -318,7 +325,11 @@ const Page = () => {
318325
return (
319326
<CippTablePage
320327
title={pageTitle}
321-
apiUrl="/api/ListDevices"
328+
apiUrl="/api/ListGraphRequest"
329+
apiData={{
330+
Endpoint: "deviceManagement/managedDevices",
331+
}}
332+
apiDataKey="Results"
322333
actions={actions}
323334
queryKey={`MEMDevices-${tenantFilter}`}
324335
offCanvas={offCanvas}

0 commit comments

Comments
 (0)