Skip to content

Commit 7d740f0

Browse files
authored
Merge pull request #34 from vidispine/25.2.2
25.2.2
2 parents 748edf7 + 3ed2b01 commit 7d740f0

File tree

75 files changed

+451
-505
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+451
-505
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vidispine/admin-tool",
3-
"version": "25.2.1",
3+
"version": "25.2.2",
44
"private": true,
55
"dependencies": {
66
"@devbookhq/splitter": "^1.3.2",

src/components/auditlog/AuditLogFilterForm.jsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,17 @@ const queryParams = () => (
4242
label="Wildcard"
4343
/>
4444
<FormControlLabel
45-
control={<Field name="performCount" component={BoolCheckbox} disabled />}
45+
control={<Field name="performCount" component={BoolCheckbox} />}
4646
label="Perform Count"
4747
/>
48+
<FormControl fullWidth>
49+
<InputLabel htmlFor="sort">Sort</InputLabel>
50+
<Field name="sort" component={Select}>
51+
<MenuItem value="desc">Descending</MenuItem>
52+
<MenuItem value="asc">Ascending</MenuItem>
53+
</Field>
54+
</FormControl>
55+
<FormControlLabel control={<Field name="body" component={BoolCheckbox} />} label="Body" />
4856
</>
4957
);
5058

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,44 @@
1+
import { withStyles } from '@material-ui/core';
2+
import Button from '@material-ui/core/Button';
13
import moment from 'moment';
24

35
import TableCell from '../ui/TableCell';
46
import TableRow from '../ui/TableRow';
57
import UnstyledLink from '../ui/UnstyledLink';
68

7-
export default function AuditLogRow({ entry = {} }) {
9+
const styles = () => ({
10+
wordBreak: { wordBreak: 'break-all' },
11+
noBreak: { whiteSpace: 'nowrap' },
12+
});
13+
14+
function AuditLogRow({ classes, entry = {}, onOpenBody }) {
815
return (
916
<TableRow hover>
1017
<TableCell>{entry.timestamp ? moment(entry.timestamp).toString() : ''}</TableCell>
1118
<TableCell>
1219
<UnstyledLink to={`/username/${entry.username}/`}>{entry.username}</UnstyledLink>
1320
</TableCell>
1421
<TableCell>{entry.method}</TableCell>
15-
<TableCell>{entry.path}</TableCell>
16-
<TableCell>{entry.queryParameters}</TableCell>
22+
<TableCell className={classes.wordBreak}>{entry.path}</TableCell>
23+
<TableCell className={classes.wordBreak}>{entry.queryParameters}</TableCell>
24+
<TableCell>{entry.responseCode}</TableCell>
25+
<TableCell>
26+
{entry.body ? (
27+
<Button
28+
onClick={() =>
29+
onOpenBody({
30+
code: entry.body,
31+
variant: entry.contentType ? entry.contentType.split(';')[0] : 'text',
32+
})
33+
}
34+
variant="outlined"
35+
>
36+
Body
37+
</Button>
38+
) : null}
39+
</TableCell>
1740
</TableRow>
1841
);
1942
}
43+
44+
export default withStyles(styles)(AuditLogRow);
Lines changed: 55 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import TableSortLabel from '@material-ui/core/TableSortLabel';
22

3+
import withDialogProps from '../../hoc/withDialogProps';
4+
import CodeModal from '../ui/CodeModal';
35
import Table from '../ui/Table';
46
import TableActions from '../ui/TableActions';
57
import TableBody from '../ui/TableBody';
@@ -11,7 +13,9 @@ import TableRow from '../ui/TableRow';
1113

1214
import AuditLogRow from './AuditLogRow';
1315

14-
export default function AuditLogTable({
16+
const AUDIT_BODY_MODAL = 'AUDIT_BODY_MODAL';
17+
18+
function AuditLogTable({
1519
auditLogDocument,
1620
count = 0,
1721
page = 0,
@@ -20,52 +24,62 @@ export default function AuditLogTable({
2024
onChangeRowsPerPage,
2125
onChangeOrder,
2226
orderDirection,
27+
dialogProps,
28+
onOpen,
2329
}) {
2430
const { entry: entryList = [] } = auditLogDocument;
2531
const rowsPerPageOptions = [100, 250, 500];
2632
if (!rowsPerPageOptions.includes(rowsPerPage)) {
2733
rowsPerPageOptions.push(rowsPerPage);
2834
}
2935
return (
30-
<Table>
31-
<TableHead>
32-
<TableRow>
33-
<TableCell>
34-
<TableSortLabel
35-
active={orderDirection !== undefined}
36-
direction={orderDirection}
37-
onClick={onChangeOrder}
38-
>
39-
Timestamp
40-
</TableSortLabel>
41-
</TableCell>
42-
<TableCell>username</TableCell>
43-
<TableCell>Method</TableCell>
44-
<TableCell>Path</TableCell>
45-
<TableCell>Query Parameters</TableCell>
46-
</TableRow>
47-
</TableHead>
48-
<TableBody>
49-
{entryList.map((entry, index) => (
50-
<AuditLogRow
51-
key={index} // eslint-disable-line react/no-array-index-key
52-
entry={entry}
53-
/>
54-
))}
55-
</TableBody>
56-
<TableFooter>
57-
<TableRow>
58-
<TablePagination
59-
count={count}
60-
page={page}
61-
rowsPerPage={rowsPerPage}
62-
onPageChange={onChangePage}
63-
onRowsPerPageChange={onChangeRowsPerPage}
64-
ActionsComponent={TableActions}
65-
rowsPerPageOptions={rowsPerPageOptions}
66-
/>
67-
</TableRow>
68-
</TableFooter>
69-
</Table>
36+
<>
37+
<Table>
38+
<TableHead>
39+
<TableRow>
40+
<TableCell>
41+
<TableSortLabel
42+
active={orderDirection !== undefined}
43+
direction={orderDirection}
44+
onClick={onChangeOrder}
45+
>
46+
Timestamp
47+
</TableSortLabel>
48+
</TableCell>
49+
<TableCell>username</TableCell>
50+
<TableCell>Method</TableCell>
51+
<TableCell>Path</TableCell>
52+
<TableCell>Query Parameters</TableCell>
53+
<TableCell>Response Code</TableCell>
54+
<TableCell>Body</TableCell>
55+
</TableRow>
56+
</TableHead>
57+
<TableBody>
58+
{entryList.map((entry, index) => (
59+
<AuditLogRow
60+
key={index} // eslint-disable-line react/no-array-index-key
61+
entry={entry}
62+
onOpenBody={onOpen(AUDIT_BODY_MODAL)}
63+
/>
64+
))}
65+
</TableBody>
66+
<TableFooter>
67+
<TableRow>
68+
<TablePagination
69+
count={count}
70+
page={page}
71+
rowsPerPage={rowsPerPage}
72+
onPageChange={onChangePage}
73+
onRowsPerPageChange={onChangeRowsPerPage}
74+
ActionsComponent={TableActions}
75+
rowsPerPageOptions={rowsPerPageOptions}
76+
/>
77+
</TableRow>
78+
</TableFooter>
79+
</Table>
80+
<CodeModal {...dialogProps} dialogName={AUDIT_BODY_MODAL} />
81+
</>
7082
);
7183
}
84+
85+
export default withDialogProps(AuditLogTable);

src/components/collection/CollectionExportForm.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const queryParams = () => (
2929
cacheOptions
3030
isClearable
3131
fullWidth
32+
creatable
3233
/>
3334
<FormControlLabel
3435
control={<Field name="metadata" component={BoolCheckbox} />}
@@ -42,6 +43,7 @@ const queryParams = () => (
4243
cacheOptions
4344
isClearable
4445
fullWidth
46+
creatable
4547
/>
4648
<Field name="notification" component={TextField} fullWidth />
4749
<FieldTypeArray
@@ -86,6 +88,7 @@ const queryParams = () => (
8688
cacheOptions
8789
isClearable
8890
fullWidth
91+
creatable
8992
/>
9093
<Field name="start" label="Start Timecode" component={TextField} fullWidth />
9194
<Field name="end" label="End Timecode" component={TextField} fullWidth />

src/components/deletionlock/DeletionLockListFilterForm.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const queryParams = ({ entityType }) => (
3636
cacheOptions
3737
isClearable
3838
fullWidth
39+
creatable
3940
/>
4041
<Field name="range" component={TextField} fullWidth />
4142
<FormControlLabel

src/components/exportlocation/ExportLocationForm.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ function ExportLocationType() {
2525
isClearable
2626
fullWidth
2727
isMulti
28+
creatable
2829
/>
2930
<Field
3031
name="projection"
@@ -34,6 +35,7 @@ function ExportLocationType() {
3435
cacheOptions
3536
isClearable
3637
fullWidth
38+
creatable
3739
/>
3840
<Field
3941
name="script"

src/components/exportlocation/ExportLocationSelect.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export default function ExportLocationSelect(props) {
3535
loadOptions={loadExportLocationOptions}
3636
cacheOptions
3737
parse={parse}
38+
createable
3839
{...props}
3940
/>
4041
);

src/components/fieldgroup/FieldGroupSelect.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export default function FieldGroupSelect(props) {
3030
loadOptions={loadFieldGroupOptions}
3131
cacheOptions
3232
parse={parse}
33+
createable
3334
{...props}
3435
/>
3536
);

src/components/file/FileEntityForm.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ function FileEntityForm({ error, handleSubmit }) {
5555
isClearable
5656
required
5757
fullWidth
58+
creatable
5859
/>
5960
<FormSection name="fileDocument" component={fileDocument} />
6061
<FormSection name="queryParams" component={queryParams} />

0 commit comments

Comments
 (0)