Skip to content

Commit b602e71

Browse files
committed
Add first version of a vuetify view #426
1 parent ed98f45 commit b602e71

10 files changed

+44
-6
lines changed

.dockerignore

+2
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ venv
44
application/src/tira/frontend/node_modules
55
src/tira/frontend/node_modules
66
.git
7+
**/venv/
8+
**/node_modules/

application/.dockerignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
venv/
2+
**/node_modules/

application/Dockerfile.application

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
#Build Vuitify in first stage: Only change in case of new / updated dependencies
2+
FROM webis/tira-application:build-vuetify-0.0.60
3+
4+
COPY application/src/tira/frontend-vuetify /src/tira/frontend-vuetify
5+
6+
RUN mv /vuetify-dependencies-node-modules node_modules \
7+
&& yarn build
8+
9+
110
# Only change in case of new / updated dependencies
211
FROM webis/tira-application:basis-0.0.47
312

@@ -19,9 +28,12 @@ RUN cd /tira/application/src/tira/frontend/ && \
1928
chmod +x /tira/application/src/tira/endpoints/aha && \
2029
cp /tira/application/src/tira/management/commands/irds_cli.sh /irds_cli.sh && \
2130
rm -f ./config/settings.yml ./config/config.yml ./config/tira-application-config.dev.yml && \
31+
rm -R tira/static/tira/frontend-vuetify/ && \
2232
apk add sudo && \
2333
echo '%podman ALL=(ALL) ALL' > /etc/sudoers.d/podman
2434

35+
COPY --from=0 /src/tira/static/tira/frontend-vuetify/ /tira/application/src/tira/static/tira/frontend-vuetify/
36+
2537
RUN cd /tira/application/ && \
2638
./test/run_all_tests.sh
2739

application/Dockerfile.basis

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
FROM nginx:1.24-alpine
1+
FROM nginx:1.18-alpine
22
# 1. setup user and system software
33

44
RUN apk update &&\
55
apk add --no-cache gcc linux-headers make musl-dev python3-dev build-base libxml2 libxslt libxml2-dev libxslt-dev pcre-dev &&\
66
apk add --no-cache g++ &&\
7-
apk add --update --no-cache python3 py-pip zip py3-virtualenv mariadb-dev npm git openssh-client libc6-compat
7+
apk add --update --no-cache python3 py-pip zip py3-virtualenv mariadb-dev npm git openssh-client libc6-compat pandas
88

99

1010
# NOTE: We'll install it here, so rebuilding the image when testing application code is faster.

application/Dockerfile.vuetify

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM node:lts
2+
3+
COPY src/tira/frontend-vuetify /src/tira/frontend-vuetify
4+
5+
WORKDIR /src/tira/frontend-vuetify
6+
7+
RUN yarn install \
8+
&& yarn build \
9+
&& mv node_modules /vuetify-dependencies-node-modules \
10+
&& rm -Rf *
11+

application/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ docker-publish:
9494
docker push webis/tira-application-grpc:${VERSION_GRPC}
9595

9696
build-docker-basis:
97+
docker build --tag webis/tira-application:build-vuetify-${VERSION_APPLICATION} -f Dockerfile.vuetify .
9798
docker build --tag webis/tira-application:basis-${VERSION_APPLICATION} -f Dockerfile.basis ..
9899

99100
clean:

application/src/tira/urls.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
path('task/<str:task_id>/user/<str:vm_id>', views.software_detail, name='software-detail'),
1919
path('task/<str:task_id>/user/<str:vm_id>/dataset/<str:dataset_id>/run/<str:run_id>', views.review, name='review'),
2020

21-
path('t-v2/lp', views.landing_page, name='landing_page'),
21+
path('frontend-vuetify', views.veutify_page, name='veutify_page'),
2222

2323
path('request_vm', views.request_vm, name='request_vm'),
2424
path('login', views.login, name='login'),
@@ -101,7 +101,6 @@
101101

102102
path('diffir/<str:task_id>/<str:run_id_1>/<str:run_id_2>', diffir_api.diffir, name='diffir'),
103103
path('serp/<str:task_id>/user/<str:vm_id>/dataset/<str:dataset_id>/<str:run_id>', serp_api.serp, name='serp'),
104-
105104
]
106105

107106
app_name = 'tira'

application/src/tira/views.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ def background_jobs(request, context, task_id, job_id):
6363

6464

6565
@add_context
66-
def landing_page(request, context):
67-
return render(request, 'tira/landing_page.html', context)
66+
def veutify_page(request, context):
67+
return render(request, 'tira/veutify_page.html', context)
6868

6969

7070
@check_permissions

application/test/api_access_matrix.py

+11
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,17 @@
3434
ORGANIZER_WRONG_TASK: 200,
3535
},
3636
),
37+
route_to_test(
38+
url_pattern='frontend-vuetify',
39+
params=None,
40+
group_to_expected_status_code={
41+
ADMIN: 200,
42+
GUEST: 200,
43+
PARTICIPANT: 200,
44+
ORGANIZER: 200,
45+
ORGANIZER_WRONG_TASK: 200,
46+
},
47+
),
3748
route_to_test(
3849
url_pattern='tasks',
3950
params=None,

0 commit comments

Comments
 (0)