@webiny/app-audit-logs 6.0.0-alpha.3 → 6.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app-audit-logs",
|
|
3
|
-
"version": "6.0.0-alpha.
|
|
3
|
+
"version": "6.0.0-alpha.5",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,18 +12,18 @@
|
|
|
12
12
|
"@apollo/react-hooks": "3.1.5",
|
|
13
13
|
"@emotion/react": "11.10.8",
|
|
14
14
|
"@emotion/styled": "11.10.6",
|
|
15
|
-
"@webiny/admin-ui": "6.0.0-alpha.
|
|
16
|
-
"@webiny/api-audit-logs": "6.0.0-alpha.
|
|
17
|
-
"@webiny/app": "6.0.0-alpha.
|
|
18
|
-
"@webiny/app-aco": "6.0.0-alpha.
|
|
19
|
-
"@webiny/app-admin": "6.0.0-alpha.
|
|
20
|
-
"@webiny/app-security": "6.0.0-alpha.
|
|
21
|
-
"@webiny/form": "6.0.0-alpha.
|
|
22
|
-
"@webiny/icons": "6.0.0-alpha.
|
|
23
|
-
"@webiny/plugins": "6.0.0-alpha.
|
|
24
|
-
"@webiny/react-properties": "6.0.0-alpha.
|
|
25
|
-
"@webiny/react-router": "6.0.0-alpha.
|
|
26
|
-
"@webiny/ui": "6.0.0-alpha.
|
|
15
|
+
"@webiny/admin-ui": "6.0.0-alpha.5",
|
|
16
|
+
"@webiny/api-audit-logs": "6.0.0-alpha.5",
|
|
17
|
+
"@webiny/app": "6.0.0-alpha.5",
|
|
18
|
+
"@webiny/app-aco": "6.0.0-alpha.5",
|
|
19
|
+
"@webiny/app-admin": "6.0.0-alpha.5",
|
|
20
|
+
"@webiny/app-security": "6.0.0-alpha.5",
|
|
21
|
+
"@webiny/form": "6.0.0-alpha.5",
|
|
22
|
+
"@webiny/icons": "6.0.0-alpha.5",
|
|
23
|
+
"@webiny/plugins": "6.0.0-alpha.5",
|
|
24
|
+
"@webiny/react-properties": "6.0.0-alpha.5",
|
|
25
|
+
"@webiny/react-router": "6.0.0-alpha.5",
|
|
26
|
+
"@webiny/ui": "6.0.0-alpha.5",
|
|
27
27
|
"date-fns": "2.29.3",
|
|
28
28
|
"emotion": "10.0.27",
|
|
29
29
|
"graphql-tag": "2.12.6",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/react": "18.2.79",
|
|
37
|
-
"@webiny/project-utils": "6.0.0-alpha.
|
|
37
|
+
"@webiny/project-utils": "6.0.0-alpha.5",
|
|
38
38
|
"execa": "5.1.1",
|
|
39
39
|
"rimraf": "6.0.1",
|
|
40
40
|
"typescript": "5.3.3"
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"build": "node ../cli/bin.js run build",
|
|
48
48
|
"watch": "node ../cli/bin.js run watch"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "b7e120541b093e91f214904a9f13e4c2c4640978"
|
|
51
51
|
}
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { format, addMinutes } from "date-fns";
|
|
3
3
|
import { Grid, Cell } from "@webiny/ui/Grid";
|
|
4
4
|
import { Dialog, DialogContent, DialogTitle, DialogCancel, DialogActions } from "@webiny/ui/Dialog";
|
|
5
|
-
import { CodeEditor } from "@webiny/ui
|
|
5
|
+
import { CodeEditor } from "@webiny/admin-ui";
|
|
6
6
|
import { Tooltip } from "@webiny/ui/Tooltip";
|
|
7
7
|
import { Action } from "../Table";
|
|
8
8
|
import { Text } from "../../../components/Text";
|
|
@@ -78,10 +78,10 @@ export const Preview = ({
|
|
|
78
78
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
79
79
|
use: "overline"
|
|
80
80
|
}, "Payload"), /*#__PURE__*/React.createElement(PayloadWrapper, null, /*#__PURE__*/React.createElement(CodeEditor, {
|
|
81
|
-
|
|
81
|
+
language: "json",
|
|
82
82
|
theme: "chrome",
|
|
83
83
|
value: JSON.stringify(JSON.parse(auditLog.data), null, 2),
|
|
84
|
-
|
|
84
|
+
disabled: true
|
|
85
85
|
}))))), /*#__PURE__*/React.createElement(DialogActions, null, /*#__PURE__*/React.createElement(DialogCancel, {
|
|
86
86
|
onClick: onClose
|
|
87
87
|
}, "Close")));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","format","addMinutes","Grid","Cell","Dialog","DialogContent","DialogTitle","DialogCancel","DialogActions","CodeEditor","Tooltip","Action","Text","PayloadWrapper","previewDialog","Preview","auditLog","onClose","hasAccessToUsers","date","Date","savedOn","createElement","open","className","message","tabIndex","span","use","app","placement","content","getTimezoneOffset","entity","label","link","href","target","entityId","action","value","initiator","id","name","role","
|
|
1
|
+
{"version":3,"names":["React","format","addMinutes","Grid","Cell","Dialog","DialogContent","DialogTitle","DialogCancel","DialogActions","CodeEditor","Tooltip","Action","Text","PayloadWrapper","previewDialog","Preview","auditLog","onClose","hasAccessToUsers","date","Date","savedOn","createElement","open","className","message","tabIndex","span","use","app","placement","content","getTimezoneOffset","entity","label","link","href","target","entityId","action","value","initiator","id","name","role","language","theme","JSON","stringify","parse","data","disabled","onClick"],"sources":["Preview.tsx"],"sourcesContent":["import React from \"react\";\nimport { format, addMinutes } from \"date-fns\";\n\nimport { Grid, Cell } from \"@webiny/ui/Grid\";\nimport { Dialog, DialogContent, DialogTitle, DialogCancel, DialogActions } from \"@webiny/ui/Dialog\";\nimport { CodeEditor } from \"@webiny/admin-ui\";\nimport { Tooltip } from \"@webiny/ui/Tooltip\";\n\nimport { Action } from \"~/views/Logs/Table\";\nimport { Text } from \"~/components/Text\";\nimport type { Entry } from \"~/utils/transformCmsContentEntriesToRecordEntries\";\nimport { PayloadWrapper, previewDialog } from \"./styled\";\n\ntype HeaderProps = {\n auditLog: Entry | null;\n onClose: () => void;\n hasAccessToUsers: boolean;\n};\n\nexport const Preview = ({ auditLog, onClose, hasAccessToUsers }: HeaderProps) => {\n if (!auditLog) {\n return null;\n }\n\n const date = new Date(auditLog.savedOn);\n\n return (\n <Dialog open={!!auditLog} onClose={onClose} className={previewDialog}>\n <DialogTitle>\n {auditLog.message}\n <div className=\"title-actions\" tabIndex={0}></div>\n </DialogTitle>\n\n <DialogContent>\n <Grid>\n <Cell span={6}>\n <Text use=\"overline\">Application</Text>\n <br />\n <Text use=\"subtitle2\">{auditLog.app}</Text>\n </Cell>\n <Cell span={6}>\n <Text use=\"overline\">Date</Text>\n <br />\n <Tooltip\n placement=\"right\"\n content={`UTC: ${format(\n addMinutes(date, date.getTimezoneOffset()),\n \"yyyy-MM-dd HH:mm:ss\"\n )}`}\n >\n <Text use={\"subtitle2\"}>{format(date, \"yyyy-MM-dd HH:mm:ss (O)\")}</Text>\n </Tooltip>\n </Cell>\n <Cell span={6}>\n <Text use=\"overline\">Entity</Text>\n <br />\n <Text use=\"subtitle2\">{auditLog.entity.label}</Text>\n </Cell>\n <Cell span={6}>\n <Text use=\"overline\">Entity Id</Text>\n <br />\n {auditLog.entity.link ? (\n <a href={auditLog.entity.link} target={\"blank\"}>\n <Text use=\"subtitle2\">{auditLog.entityId}</Text>\n </a>\n ) : (\n <Text use=\"subtitle2\">{auditLog.entityId}</Text>\n )}\n </Cell>\n <Cell span={6}>\n <Text use=\"overline\">Action</Text>\n <br />\n <Action label={auditLog.action.label} value={auditLog.action.value} />\n </Cell>\n {hasAccessToUsers && (\n <Cell span={6}>\n <Text use=\"overline\">Initiator</Text>\n <br />\n <a href={`/admin-users?id=${auditLog.initiator.id}`} target={\"blank\"}>\n <Text use={\"subtitle2\"}>{auditLog.initiator.name}</Text>\n </a>\n <Text use={\"body2\"}>{` (${auditLog.initiator.role})`}</Text>\n </Cell>\n )}\n <Cell span={12}>\n <Text use=\"overline\">Payload</Text>\n <PayloadWrapper>\n <CodeEditor\n language=\"json\"\n theme=\"chrome\"\n value={JSON.stringify(JSON.parse(auditLog.data), null, 2)}\n disabled={true}\n />\n </PayloadWrapper>\n </Cell>\n </Grid>\n </DialogContent>\n <DialogActions>\n <DialogCancel onClick={onClose}>Close</DialogCancel>\n </DialogActions>\n </Dialog>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,EAAEC,UAAU,QAAQ,UAAU;AAE7C,SAASC,IAAI,EAAEC,IAAI,QAAQ,iBAAiB;AAC5C,SAASC,MAAM,EAAEC,aAAa,EAAEC,WAAW,EAAEC,YAAY,EAAEC,aAAa,QAAQ,mBAAmB;AACnG,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,OAAO,QAAQ,oBAAoB;AAE5C,SAASC,MAAM;AACf,SAASC,IAAI;AAEb,SAASC,cAAc,EAAEC,aAAa;AAQtC,OAAO,MAAMC,OAAO,GAAGA,CAAC;EAAEC,QAAQ;EAAEC,OAAO;EAAEC;AAA8B,CAAC,KAAK;EAC7E,IAAI,CAACF,QAAQ,EAAE;IACX,OAAO,IAAI;EACf;EAEA,MAAMG,IAAI,GAAG,IAAIC,IAAI,CAACJ,QAAQ,CAACK,OAAO,CAAC;EAEvC,oBACItB,KAAA,CAAAuB,aAAA,CAAClB,MAAM;IAACmB,IAAI,EAAE,CAAC,CAACP,QAAS;IAACC,OAAO,EAAEA,OAAQ;IAACO,SAAS,EAAEV;EAAc,gBACjEf,KAAA,CAAAuB,aAAA,CAAChB,WAAW,QACPU,QAAQ,CAACS,OAAO,eACjB1B,KAAA,CAAAuB,aAAA;IAAKE,SAAS,EAAC,eAAe;IAACE,QAAQ,EAAE;EAAE,CAAM,CACxC,CAAC,eAEd3B,KAAA,CAAAuB,aAAA,CAACjB,aAAa,qBACVN,KAAA,CAAAuB,aAAA,CAACpB,IAAI,qBACDH,KAAA,CAAAuB,aAAA,CAACnB,IAAI;IAACwB,IAAI,EAAE;EAAE,gBACV5B,KAAA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