Skip to content

Commit 4a82f14

Browse files
authored
Merge pull request #27 from vidispine/24.3.0
24.3.0
2 parents 0cdaa2a + 2f232de commit 4a82f14

34 files changed

+5110
-728
lines changed

.github/workflows/docker-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ jobs:
3333
run: npm install
3434
shell: bash
3535
- name: Build the Docker image
36-
run: npm run docker:buildx:push
36+
run: PUBLIC_URL=/admin-tool npm run docker:buildx:push
3737
shell: bash
3838

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
FROM nginx
2-
COPY build /usr/share/nginx/html
2+
ARG PUBLIC_URL
3+
COPY build /usr/share/nginx/html${PUBLIC_URL}
4+
COPY build/index.html /usr/share/nginx/html/
35
COPY proxy.template /etc/nginx/conf.d/proxy.template
46
ENV VIDISPINE_URL=http://localhost:8080
57
CMD ["/bin/bash", "-c", "NGINX_RESOLVER=${NGINX_RESOLVER+resolver ${NGINX_RESOLVER};} && envsubst '$VIDISPINE_URL,$NGINX_RESOLVER' < /etc/nginx/conf.d/proxy.template > /etc/nginx/conf.d/default.conf && envsubst < /usr/share/nginx/html/index.html > /tmp/_index.html && mv -f /tmp/_index.html /usr/share/nginx/html/index.html && nginx -g 'daemon off;'"]

package-lock.json

Lines changed: 4025 additions & 379 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
22
"name": "@vidispine/admin-tool",
3-
"version": "24.2.0",
3+
"version": "24.3.0",
44
"private": true,
55
"dependencies": {
66
"@devbookhq/splitter": "^1.3.2",
77
"@fontsource/open-sans": "4.5.2",
88
"@material-ui/core": "4.12.3",
99
"@material-ui/icons": "4.11.2",
10-
"@vidispine/vdt-api": "23.4.0",
11-
"@vidispine/vdt-js": "23.4.0",
10+
"@vidispine/vdt-api": "24.3.0-pre.3",
11+
"@vidispine/vdt-js": "24.3.0-pre.3",
1212
"clsx": "1.1.1",
1313
"codemirror": "5.65.9",
14-
"d3-graphviz": "2.6.1",
14+
"d3-graphviz": "5.4.0",
1515
"events": "^3.3.0",
1616
"history": "5.1.0",
1717
"immutability-helper": "3.1.1",
@@ -30,24 +30,35 @@
3030
"react-select": "5.2.1",
3131
"redux": "4.1.2",
3232
"redux-form": "^8.3.10",
33-
"stringify-object": "^5.0.0"
33+
"stringify-object": "^5.0.0",
34+
"swagger-ui-react": "5.17.14"
3435
},
3536
"resolutions": {
3637
"codemirror": "5.65.9",
3738
"eslint": "7.11.0",
38-
"axios": ">=0.27.2",
39+
"axios": ">=0.28.1",
3940
"d3-color": ">=3.1.0"
4041
},
42+
"overrides": {
43+
"swagger-ui-react": {
44+
"react": "$react",
45+
"react-dom": "$react-dom",
46+
"react-redux": "^8"
47+
},
48+
"@vidispine/vdt-api": {
49+
"axios": ">=0.28.1"
50+
}
51+
},
4152
"scripts": {
4253
"start": "vite",
4354
"build": "vite build",
4455
"postbuild": "cp build/index.html build/404.html",
4556
"gh-pages-clean": "gh-pages-clean",
4657
"gh-pages": "gh-pages",
47-
"predocker:build": "PUBLIC_URL=/ GENERATE_SOURCEMAP=false npm run build",
48-
"predocker:buildx:push": "PUBLIC_URL=/ GENERATE_SOURCEMAP=false npm run build",
49-
"docker:build": "docker build --platform=linux/amd64,linux/arm64 -t \"${npm_package_name:1}:latest\" -t \"${npm_package_name:1}:${npm_package_version}\" .",
50-
"docker:buildx:push": "docker buildx build --platform=linux/amd64,linux/arm64 -t \"${npm_package_name:1}:latest\" -t \"${npm_package_name:1}:${npm_package_version}\" --push .",
58+
"predocker:buildx": "GENERATE_SOURCEMAP=false npm run build",
59+
"predocker:buildx:push": "GENERATE_SOURCEMAP=false npm run build",
60+
"docker:buildx": "docker buildx build --build-arg PUBLIC_URL --platform=linux/amd64,linux/arm64 -t \"${npm_package_name:1}:latest\" -t \"${npm_package_name:1}:${npm_package_version}\" .",
61+
"docker:buildx:push": "docker buildx build --platform=linux/amd64,linux/arm64 --build-arg PUBLIC_URL -t \"${npm_package_name:1}:latest\" -t \"${npm_package_name:1}:${npm_package_version}\" --push .",
5162
"docker:push": "docker push \"${npm_package_name:1}:${npm_package_version}\" && docker push \"${npm_package_name:1}:latest\"",
5263
"docker:run": "docker run --name \"${npm_package_name/@vidispine\\//vidispine_}\" --rm -dti -e VIDISPINE_URL=$VIDISPINE_URL -e NGINX_RESOLVER=1.1.1.1 -p 80:80 \"${npm_package_name:1}:${npm_package_version}\"",
5364
"docker:stop": "docker stop \"${npm_package_name/@vidispine\\//vidispine_}\""
@@ -60,9 +71,9 @@
6071
"eslint-plugin-jsx-a11y": "6.4.1",
6172
"eslint-plugin-react": "7.21.5",
6273
"eslint-plugin-react-hooks": "1.7.0",
63-
"gh-pages": "3.2.3",
74+
"gh-pages": "6.1.1",
6475
"sass": "^1.64.2",
65-
"vite": "^4.4.9"
76+
"vite": "4.5.5"
6677
},
6778
"browserslist": [
6879
">0.2%",

proxy.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ server {
2929
add_header "Pragma" "cache";
3030
}
3131

32-
location /static/ {
32+
location ~ ^(/[^/]+)?/static/ {
3333
add_header "Cache-Control" "public";
3434
expires 30d;
3535
add_header "Pragma" "cache";
3636
}
3737

38-
location /assets/ {
38+
location ~ ^(/[^/]+)?/assets/ {
3939
add_header "Cache-Control" "public";
4040
expires 30d;
4141
add_header "Pragma" "cache";

src/components/auditlog/AuditLogTable.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import AuditLogRow from './AuditLogRow';
1111
import TableActions from '../ui/TableActions';
1212
import TablePagination from '../ui/TablePagination';
1313

14-
export default function FileListTable({
14+
export default function AuditLogTable({
1515
auditLogDocument,
1616
count = 0,
1717
page = 0,

src/components/file/FileListCard.jsx

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 77 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,91 @@
11
import React from 'react';
2-
import TableSortLabel from '@material-ui/core/TableSortLabel';
2+
import Table from '@material-ui/core/Table';
3+
import TableRow from '@material-ui/core/TableRow';
4+
import TableBody from '@material-ui/core/TableBody';
5+
import TableHead from '@material-ui/core/TableHead';
6+
import TableFooter from '@material-ui/core/TableFooter';
7+
import TablePagination from '@material-ui/core/TablePagination';
38

4-
import Table from '../ui/Table';
5-
import TableBody from '../ui/TableBody';
6-
import TableFooter from '../ui/TableFooter';
7-
import TableCell from '../ui/TableCell';
8-
import TableHead from '../ui/TableHead';
9-
import TableRow from '../ui/TableRow';
10-
import FileRow from './FileRow';
119
import TableActions from '../ui/TableActions';
12-
import TablePagination from '../ui/TablePagination';
10+
import TableHeadCell from '../ui/TableHeadCell';
11+
import FileRow from './FileRow';
1312

14-
export default function FileListTable({
13+
function FileListTable({
1514
fileListDocument,
16-
count = 0,
17-
page = 0,
18-
rowsPerPage = 10,
1915
onChangePage,
2016
onChangeRowsPerPage,
17+
rowsPerPageOptions,
18+
page,
19+
rowsPerPage,
2120
onChangeOrder,
2221
orderBy,
2322
orderDirection,
2423
}) {
25-
const { file: fileList = [] } = fileListDocument;
26-
const rowsPerPageOptions = [10, 100, 250];
27-
if (!rowsPerPageOptions.includes(rowsPerPage)) { rowsPerPageOptions.push(rowsPerPage); }
24+
if (fileListDocument === undefined) {
25+
return null;
26+
}
27+
const { file: fileList = [], hits: count = 0 } = fileListDocument;
2828
return (
29-
<Table>
30-
<TableHead>
31-
<TableRow>
32-
<TableCell>
33-
<TableSortLabel
34-
active={orderBy === 'filename'}
35-
direction={orderDirection}
36-
onClick={onChangeOrder ? onChangeOrder('filename') : undefined}
37-
>
38-
Path
39-
</TableSortLabel>
40-
</TableCell>
41-
<TableCell>
42-
<TableSortLabel
43-
active={orderBy === 'fileId'}
44-
direction={orderDirection}
45-
onClick={onChangeOrder ? onChangeOrder('fileId') : undefined}
46-
>
47-
ID
48-
</TableSortLabel>
49-
</TableCell>
50-
<TableCell>
51-
<TableSortLabel
52-
active={orderBy === 'state'}
53-
direction={orderDirection}
54-
onClick={onChangeOrder ? onChangeOrder('state') : undefined}
55-
>
56-
State
57-
</TableSortLabel>
58-
</TableCell>
59-
<TableCell>Storage</TableCell>
60-
<TableCell>
61-
<TableSortLabel
62-
active={orderBy === 'size'}
63-
direction={orderDirection}
64-
onClick={onChangeOrder ? onChangeOrder('size') : undefined}
65-
>
66-
Size
67-
</TableSortLabel>
68-
</TableCell>
69-
<TableCell>
70-
<TableSortLabel
71-
active={orderBy === 'timestamp'}
72-
direction={orderDirection}
73-
onClick={onChangeOrder ? onChangeOrder('timestamp') : undefined}
74-
>
75-
Timestamp
76-
</TableSortLabel>
77-
</TableCell>
78-
</TableRow>
79-
</TableHead>
80-
<TableBody>
81-
{fileList.map((fileDocument) => (
82-
<FileRow
83-
key={fileDocument.id}
84-
fileDocument={fileDocument}
85-
/>
86-
))}
87-
</TableBody>
88-
{onChangePage && (
89-
<TableFooter>
90-
<TableRow>
91-
<TablePagination
92-
count={count}
93-
page={page}
94-
rowsPerPage={rowsPerPage}
95-
onPageChange={onChangePage}
96-
onRowsPerPageChange={onChangeRowsPerPage}
97-
ActionsComponent={TableActions}
98-
rowsPerPageOptions={rowsPerPageOptions}
99-
/>
100-
</TableRow>
101-
</TableFooter>
102-
)}
103-
</Table>
29+
<>
30+
<Table>
31+
<TableHead>
32+
<TableRow>
33+
<TableHeadCell
34+
name="filename"
35+
onChangeOrder={onChangeOrder}
36+
orderBy={orderBy}
37+
orderDirection={orderDirection}
38+
/>
39+
<TableHeadCell
40+
name="fileId"
41+
onChangeOrder={onChangeOrder}
42+
orderBy={orderBy}
43+
orderDirection={orderDirection}
44+
/>
45+
<TableHeadCell
46+
name="state"
47+
onChangeOrder={onChangeOrder}
48+
orderBy={orderBy}
49+
orderDirection={orderDirection}
50+
/>
51+
<TableHeadCell name="Storage" />
52+
<TableHeadCell
53+
name="size"
54+
onChangeOrder={onChangeOrder}
55+
orderBy={orderBy}
56+
orderDirection={orderDirection}
57+
/>
58+
<TableHeadCell
59+
name="timestamp"
60+
onChangeOrder={onChangeOrder}
61+
orderBy={orderBy}
62+
orderDirection={orderDirection}
63+
/>
64+
</TableRow>
65+
</TableHead>
66+
<TableBody>
67+
{fileList.map((fileDocument) => (
68+
<FileRow key={fileDocument.id} fileDocument={fileDocument} />
69+
))}
70+
</TableBody>
71+
{onChangePage && onChangeRowsPerPage && (
72+
<TableFooter>
73+
<TableRow>
74+
<TablePagination
75+
count={count}
76+
page={page}
77+
rowsPerPage={rowsPerPage}
78+
onPageChange={onChangePage}
79+
onRowsPerPageChange={onChangeRowsPerPage}
80+
ActionsComponent={TableActions}
81+
rowsPerPageOptions={rowsPerPageOptions}
82+
/>
83+
</TableRow>
84+
</TableFooter>
85+
)}
86+
</Table>
87+
</>
10488
);
10589
}
90+
91+
export default FileListTable;

0 commit comments

Comments
 (0)