From 7eaaa2b873135132087eff5e4c0f20dc79d7f40f Mon Sep 17 00:00:00 2001 From: Martin Weise <martin.weise@tuwien.ac.at> Date: Wed, 17 Aug 2022 14:41:18 +0200 Subject: [PATCH] Fixed the consumer creation --- .jupyter/load_test.py | 18 ++++++- .jupyter/tuple_publish.ipynb | 47 ++++++++++++++-- docker-compose.demo.yml | 1 + docker-compose.prod.yml | 3 ++ docker-compose.yml | 3 -- .../database/table/columns/TableColumn.java | 2 +- fda-ui/.env-docker | 2 - fda-ui/.env.example | 3 ++ fda-ui/Dockerfile | 6 ++- fda-ui/components/TableList.vue | 10 ++-- fda-ui/layouts/default.vue | 18 ++++--- fda-ui/nuxt.config.js | 6 +++ .../database/_database_id/table/create.vue | 13 ----- .../database/_database_id/table/import.vue | 13 ----- fda-ui/pages/index.vue | 48 ++++++++++++----- fda-ui/pages/publications.vue | 54 ------------------- fda-ui/pages/user/index.vue | 1 - 17 files changed, 131 insertions(+), 117 deletions(-) delete mode 100644 fda-ui/.env-docker delete mode 100644 fda-ui/pages/publications.vue diff --git a/.jupyter/load_test.py b/.jupyter/load_test.py index 8fb57c7e7e..3b3afa3705 100644 --- a/.jupyter/load_test.py +++ b/.jupyter/load_test.py @@ -30,7 +30,7 @@ identifier = IdentifierEndpointApi() persistence = PersistenceEndpointApi() unit = DefaultApi() -token = "" # keep +token = "" # keep def create_user(username): @@ -283,6 +283,18 @@ def assign_concept(database_id, table_id, column_id, uri): return response.json() +def download_query_data(container_id, database_id, query_id): + response = query.export1(container_id, database_id, query_id) + print("downloaded query data for query with id %d" % query_id) + return response + + +def download_identifier_metadata(container_id, database_id, identifier_id): + response = identifier.export(container_id, database_id, identifier_id) + print("downloaded identifier metadata for identifier with id %d" % identifier_id) + return response + + if __name__ == '__main__': # # create 1 user and 3 containers (public, private, public) @@ -306,7 +318,9 @@ if __name__ == '__main__': create_query(cid, dbid, "select `date` from `" + tname + "`") qid = create_query(cid, dbid, "select `date`, `location`, `status` from `" + tname + "`").id create_query(cid, dbid, "select `foo` from `" + tname + "`") - create_identifier(cid, dbid, qid) + iid = create_identifier(cid, dbid, qid).id + download_query_data(cid, dbid, qid) + download_identifier_metadata(cid, dbid, iid) # container 2 (=private) cid = create_container().id start_container(cid) diff --git a/.jupyter/tuple_publish.ipynb b/.jupyter/tuple_publish.ipynb index 6c1e40eb95..228ff7dcc4 100644 --- a/.jupyter/tuple_publish.ipynb +++ b/.jupyter/tuple_publish.ipynb @@ -711,11 +711,10 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 19, "metadata": { "pycharm": { - "name": "#%%\n", - "is_executing": true + "name": "#%%\n" } }, "outputs": [ @@ -742,7 +741,47 @@ "{'date': '2021-01-01', 'location': 'Heubeeribüel', 'parameter': 'NO', 'interval': 'h1', 'unit': 'µg/m3', 'value': '0.77', 'status': 'tentative'}\n", "{'date': '2021-01-01', 'location': 'Heubeeribüel', 'parameter': 'NO2', 'interval': 'h1', 'unit': 'µg/m3', 'value': '16.24', 'status': 'tentative'}\n", "{'date': '2021-01-01', 'location': 'Heubeeribüel', 'parameter': 'O3', 'interval': 'h1', 'unit': 'µg/m3', 'value': '33.11', 'status': 'tentative'}\n", - "{'date': '2021-01-01', 'location': 'Rosengartenstrasse', 'parameter': 'NOx', 'interval': 'h1', 'unit': 'ppb', 'value': '36.55', 'status': 'tentative'}\n" + "{'date': '2021-01-01', 'location': 'Rosengartenstrasse', 'parameter': 'NOx', 'interval': 'h1', 'unit': 'ppb', 'value': '36.55', 'status': 'tentative'}\n", + "{'date': '2021-01-01', 'location': 'Rosengartenstrasse', 'parameter': 'NO', 'interval': 'h1', 'unit': 'µg/m3', 'value': '17.2', 'status': 'tentative'}\n", + "{'date': '2021-01-01', 'location': 'Rosengartenstrasse', 'parameter': 'NO2', 'interval': 'h1', 'unit': 'µg/m3', 'value': '43.51', 'status': 'tentative'}\n", + "{'date': '2021-01-01', 'location': 'Rosengartenstrasse', 'parameter': 'O3', 'interval': 'h1', 'unit': 'µg/m3', 'value': '4.38', 'status': 'tentative'}\n", + "{'date': '2021-01-01', 'location': 'Rosengartenstrasse', 'parameter': 'PM10', 'interval': 'h1', 'unit': 'µg/m3', 'value': '74.05', 'status': 'tentative'}\n", + "{'date': '2021-01-01', 'location': 'Rosengartenstrasse', 'parameter': 'PM2.5', 'interval': 'h1', 'unit': 'µg/m3', 'value': '74.11', 'status': 'tentative'}\n", + "{'date': '2021-01-01', 'location': 'Stampfenbachstrasse', 'parameter': 'CO', 'interval': 'h1', 'unit': 'mg/m3', 'value': '0.4', 'status': 'tentative'}\n", + "{'date': '2021-01-01', 'location': 'Stampfenbachstrasse', 'parameter': 'SO2', 'interval': 'h1', 'unit': 'µg/m3', 'value': '5.02', 'status': 'tentative'}\n", + "{'date': '2021-01-01', 'location': 'Stampfenbachstrasse', 'parameter': 'NOx', 'interval': 'h1', 'unit': 'ppb', 'value': '35.47', 'status': 'tentative'}\n", + "{'date': '2021-01-01', 'location': 'Stampfenbachstrasse', 'parameter': 'NO', 'interval': 'h1', 'unit': 'µg/m3', 'value': '16.28', 'status': 'tentative'}\n", + "{'date': '2021-01-01', 'location': 'Stampfenbachstrasse', 'parameter': 'NO2', 'interval': 'h1', 'unit': 'µg/m3', 'value': '42.88', 'status': 'tentative'}\n", + "{'date': '2021-01-01', 'location': 'Stampfenbachstrasse', 'parameter': 'O3', 'interval': 'h1', 'unit': 'µg/m3', 'value': '5.34', 'status': 'tentative'}\n", + "{'date': '2021-01-01', 'location': 'Stampfenbachstrasse', 'parameter': 'PM10', 'interval': 'h1', 'unit': 'µg/m3', 'value': '140.15', 'status': 'tentative'}\n", + "{'date': '2021-01-01', 'location': 'Stampfenbachstrasse', 'parameter': 'PM2.5', 'interval': 'h1', 'unit': 'µg/m3', 'value': '118.87', 'status': 'tentative'}\n", + "{'date': '2021-01-01', 'location': 'Schimmelstrasse', 'parameter': 'NOx', 'interval': 'h1', 'unit': 'ppb', 'value': '39.43', 'status': 'tentative'}\n", + "{'date': '2021-01-01', 'location': 'Schimmelstrasse', 'parameter': 'NO', 'interval': 'h1', 'unit': 'µg/m3', 'value': '20.8', 'status': 'tentative'}\n", + "{'date': '2021-01-01', 'location': 'Schimmelstrasse', 'parameter': 'NO2', 'interval': 'h1', 'unit': 'µg/m3', 'value': '43.51', 'status': 'tentative'}\n", + "{'date': '2021-01-01', 'location': 'Schimmelstrasse', 'parameter': 'O3', 'interval': 'h1', 'unit': 'µg/m3', 'value': '6.93', 'status': 'tentative'}\n", + "{'date': '2021-01-01', 'location': 'Schimmelstrasse', 'parameter': 'PM10', 'interval': 'h1', 'unit': 'µg/m3', 'value': '118.95', 'status': 'tentative'}\n", + "{'date': '2021-01-01', 'location': 'Schimmelstrasse', 'parameter': 'PM2.5', 'interval': 'h1', 'unit': 'µg/m3', 'value': '102.54', 'status': 'tentative'}\n", + "{'date': '2021-01-01', 'location': 'Heubeeribüel', 'parameter': 'NOx', 'interval': 'h1', 'unit': 'ppb', 'value': '5.31', 'status': 'tentative'}\n", + "{'date': '2021-01-01', 'location': 'Heubeeribüel', 'parameter': 'NO', 'interval': 'h1', 'unit': 'µg/m3', 'value': '0.52', 'status': 'tentative'}\n", + "{'date': '2021-01-01', 'location': 'Heubeeribüel', 'parameter': 'NO2', 'interval': 'h1', 'unit': 'µg/m3', 'value': '9.36', 'status': 'tentative'}\n", + "{'date': '2021-01-01', 'location': 'Heubeeribüel', 'parameter': 'O3', 'interval': 'h1', 'unit': 'µg/m3', 'value': '51.36', 'status': 'tentative'}\n", + "{'date': '2021-01-01', 'location': 'Rosengartenstrasse', 'parameter': 'NOx', 'interval': 'h1', 'unit': 'ppb', 'value': '45.83', 'status': 'tentative'}\n", + "{'date': '2021-01-01', 'location': 'Rosengartenstrasse', 'parameter': 'NO', 'interval': 'h1', 'unit': 'µg/m3', 'value': '28.15', 'status': 'tentative'}\n", + "{'date': '2021-01-01', 'location': 'Rosengartenstrasse', 'parameter': 'NO2', 'interval': 'h1', 'unit': 'µg/m3', 'value': '44.48', 'status': 'tentative'}\n" + ] + }, + { + "ename": "AMQPConnectionError", + "evalue": "", + "output_type": "error", + "traceback": [ + "\u001B[0;31m---------------------------------------------------------------------------\u001B[0m", + "\u001B[0;31mAMQPConnectionError\u001B[0m Traceback (most recent call last)", + "Input \u001B[0;32mIn [19]\u001B[0m, in \u001B[0;36m<cell line: 3>\u001B[0;34m()\u001B[0m\n\u001B[1;32m 5\u001B[0m \u001B[38;5;28;01mfor\u001B[39;00m row \u001B[38;5;129;01min\u001B[39;00m csv_reader:\n\u001B[1;32m 6\u001B[0m payload \u001B[38;5;241m=\u001B[39m {\u001B[38;5;124m'\u001B[39m\u001B[38;5;124mdate\u001B[39m\u001B[38;5;124m'\u001B[39m: row[\u001B[38;5;241m0\u001B[39m], \u001B[38;5;124m'\u001B[39m\u001B[38;5;124mlocation\u001B[39m\u001B[38;5;124m'\u001B[39m: row[\u001B[38;5;241m1\u001B[39m], \u001B[38;5;124m'\u001B[39m\u001B[38;5;124mparameter\u001B[39m\u001B[38;5;124m'\u001B[39m: row[\u001B[38;5;241m2\u001B[39m], \u001B[38;5;124m'\u001B[39m\u001B[38;5;124minterval\u001B[39m\u001B[38;5;124m'\u001B[39m: row[\u001B[38;5;241m3\u001B[39m], \u001B[38;5;124m'\u001B[39m\u001B[38;5;124munit\u001B[39m\u001B[38;5;124m'\u001B[39m: row[\u001B[38;5;241m4\u001B[39m],\n\u001B[1;32m 7\u001B[0m \u001B[38;5;124m'\u001B[39m\u001B[38;5;124mvalue\u001B[39m\u001B[38;5;124m'\u001B[39m: row[\u001B[38;5;241m5\u001B[39m], \u001B[38;5;124m'\u001B[39m\u001B[38;5;124mstatus\u001B[39m\u001B[38;5;124m'\u001B[39m: row[\u001B[38;5;241m6\u001B[39m]}\n\u001B[0;32m----> 8\u001B[0m response \u001B[38;5;241m=\u001B[39m \u001B[43mbroker\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43msend\u001B[49m\u001B[43m(\u001B[49m\u001B[43mpayload\u001B[49m\u001B[43m)\u001B[49m\n\u001B[1;32m 9\u001B[0m time\u001B[38;5;241m.\u001B[39msleep(\u001B[38;5;241m1\u001B[39m)\n\u001B[1;32m 10\u001B[0m \u001B[38;5;28mprint\u001B[39m(payload)\n", + "File \u001B[0;32m~/Projects/fda-services/.jupyter/api_broker/BrokerServiceClient.py:17\u001B[0m, in \u001B[0;36mBrokerServiceClient.send\u001B[0;34m(self, data)\u001B[0m\n\u001B[1;32m 15\u001B[0m \u001B[38;5;28;01mdef\u001B[39;00m \u001B[38;5;21msend\u001B[39m(\u001B[38;5;28mself\u001B[39m, data):\n\u001B[1;32m 16\u001B[0m creds \u001B[38;5;241m=\u001B[39m pika\u001B[38;5;241m.\u001B[39mcredentials\u001B[38;5;241m.\u001B[39mPlainCredentials(\u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39musername, \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mpassword)\n\u001B[0;32m---> 17\u001B[0m connection \u001B[38;5;241m=\u001B[39m \u001B[43mpika\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mBlockingConnection\u001B[49m\u001B[43m(\u001B[49m\u001B[43mpika\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mConnectionParameters\u001B[49m\u001B[43m(\u001B[49m\u001B[43mhost\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mhost\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43mcredentials\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mcreds\u001B[49m\u001B[43m)\u001B[49m\u001B[43m)\u001B[49m\n\u001B[1;32m 18\u001B[0m channel \u001B[38;5;241m=\u001B[39m connection\u001B[38;5;241m.\u001B[39mchannel()\n\u001B[1;32m 19\u001B[0m dump \u001B[38;5;241m=\u001B[39m json\u001B[38;5;241m.\u001B[39mdumps(data)\n", + "File \u001B[0;32m~/Projects/fda-services/.jupyter/venv/lib/python3.9/site-packages/pika/adapters/blocking_connection.py:360\u001B[0m, in \u001B[0;36mBlockingConnection.__init__\u001B[0;34m(self, parameters, _impl_class)\u001B[0m\n\u001B[1;32m 358\u001B[0m \u001B[38;5;66;03m# Perform connection workflow\u001B[39;00m\n\u001B[1;32m 359\u001B[0m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_impl \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;01mNone\u001B[39;00m \u001B[38;5;66;03m# so that attribute is created in case below raises\u001B[39;00m\n\u001B[0;32m--> 360\u001B[0m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_impl \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43m_create_connection\u001B[49m\u001B[43m(\u001B[49m\u001B[43mparameters\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43m_impl_class\u001B[49m\u001B[43m)\u001B[49m\n\u001B[1;32m 361\u001B[0m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_impl\u001B[38;5;241m.\u001B[39madd_on_close_callback(\u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_closed_result\u001B[38;5;241m.\u001B[39mset_value_once)\n", + "File \u001B[0;32m~/Projects/fda-services/.jupyter/venv/lib/python3.9/site-packages/pika/adapters/blocking_connection.py:451\u001B[0m, in \u001B[0;36mBlockingConnection._create_connection\u001B[0;34m(self, configs, impl_class)\u001B[0m\n\u001B[1;32m 449\u001B[0m error \u001B[38;5;241m=\u001B[39m on_cw_done_result\u001B[38;5;241m.\u001B[39mvalue\u001B[38;5;241m.\u001B[39mresult\n\u001B[1;32m 450\u001B[0m LOGGER\u001B[38;5;241m.\u001B[39merror(\u001B[38;5;124m'\u001B[39m\u001B[38;5;124mConnection workflow failed: \u001B[39m\u001B[38;5;132;01m%r\u001B[39;00m\u001B[38;5;124m'\u001B[39m, error)\n\u001B[0;32m--> 451\u001B[0m \u001B[38;5;28;01mraise\u001B[39;00m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_reap_last_connection_workflow_error(error)\n\u001B[1;32m 452\u001B[0m \u001B[38;5;28;01melse\u001B[39;00m:\n\u001B[1;32m 453\u001B[0m LOGGER\u001B[38;5;241m.\u001B[39minfo(\u001B[38;5;124m'\u001B[39m\u001B[38;5;124mConnection workflow succeeded: \u001B[39m\u001B[38;5;132;01m%r\u001B[39;00m\u001B[38;5;124m'\u001B[39m,\n\u001B[1;32m 454\u001B[0m on_cw_done_result\u001B[38;5;241m.\u001B[39mvalue\u001B[38;5;241m.\u001B[39mresult)\n", + "\u001B[0;31mAMQPConnectionError\u001B[0m: " ] } ], diff --git a/docker-compose.demo.yml b/docker-compose.demo.yml index 9e9818489f..e57deede5a 100644 --- a/docker-compose.demo.yml +++ b/docker-compose.demo.yml @@ -343,5 +343,6 @@ services: environment: KEY: "${UI_KEY}" CERT: "${UI_CERT}" + SANDBOX: true logging: driver: json-file diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 23c64f2130..210e34c6ca 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -340,5 +340,8 @@ services: condition: service_healthy database-service: condition: service_healthy + environment: + BROKER_USERNAME: ${BROKER_USERNAME} + BROKER_PASSWORD: ${BROKER_PASSWORD} logging: driver: json-file diff --git a/docker-compose.yml b/docker-compose.yml index 92a3d00c49..7be291c5f0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -332,8 +332,5 @@ services: condition: service_healthy fda-database-service: condition: service_healthy - environment: - HOST: 0.0.0.0 - API: http://fda-gateway-service:9095 logging: driver: json-file diff --git a/fda-metadata-db/entities/src/main/java/at/tuwien/entities/database/table/columns/TableColumn.java b/fda-metadata-db/entities/src/main/java/at/tuwien/entities/database/table/columns/TableColumn.java index ead88b6854..16629578e0 100644 --- a/fda-metadata-db/entities/src/main/java/at/tuwien/entities/database/table/columns/TableColumn.java +++ b/fda-metadata-db/entities/src/main/java/at/tuwien/entities/database/table/columns/TableColumn.java @@ -94,7 +94,7 @@ public class TableColumn implements Comparable<TableColumn> { @Column(nullable = false) private Boolean isNullAllowed = true; - @Column + @Column(nullable = false) private Boolean isUnique; @Column diff --git a/fda-ui/.env-docker b/fda-ui/.env-docker deleted file mode 100644 index 1162dbf84a..0000000000 --- a/fda-ui/.env-docker +++ /dev/null @@ -1,2 +0,0 @@ -# GATEWAY SERVICE -API="http://fda-gateway-service:9095" diff --git a/fda-ui/.env.example b/fda-ui/.env.example index 3a7cb6a745..cd48b1313b 100644 --- a/fda-ui/.env.example +++ b/fda-ui/.env.example @@ -2,3 +2,6 @@ # - CORRECT: http://localhost:9095 # - WRONG: http://localhost:9095/ API="http://localhost:9095" +BROKER_USERNAME=fda +BROKER_PASSWORD=fda +SANDBOX=false diff --git a/fda-ui/Dockerfile b/fda-ui/Dockerfile index 3ca5f1d66b..8d99a931eb 100644 --- a/fda-ui/Dockerfile +++ b/fda-ui/Dockerfile @@ -15,7 +15,6 @@ COPY ./yarn.lock ./ RUN yarn install --frozen-lockfile > /dev/null 2>&1 COPY ./nuxt.config.js ./ -COPY ./.env-docker ./.env COPY ./ava.config.cjs ./ COPY ./babel.config.js ./ COPY ./assets ./assets @@ -31,4 +30,9 @@ COPY ./utils ./utils RUN yarn build > /dev/null +ENV API=http://fda-gateway-service:9095 +ENV BROKER_USERNAME=fda +ENV BROKER_PASSWORD=fda +ENV SANDBOX=false + ENTRYPOINT ["yarn", "start"] diff --git a/fda-ui/components/TableList.vue b/fda-ui/components/TableList.vue index ab977f8090..68b2442e5d 100644 --- a/fda-ui/components/TableList.vue +++ b/fda-ui/components/TableList.vue @@ -245,12 +245,16 @@ export default { headers: { Authorization: `Bearer ${this.token}` } } }, + brokerConfig () { + return { + headers: { Authorization: 'Basic ' + btoa(`${this.$config.brokerUsername}:${this.$config.brokerPassword}`) } + } + }, createdUTC () { return formatTimestampUTCLabel(this.tableDetails.created) } }, mounted () { - console.debug('mounted', this.$store.state.table) this.$root.$on('table-create', this.refresh) this.loadDatabase() }, @@ -331,9 +335,7 @@ export default { async consumerDetails (topic) { try { this.loading = true - const res = await this.$axios.get('/api/broker/consumers/%2F', { - headers: { Authorization: 'Basic ZmRhOmZkYQ==' } - }) + const res = await this.$axios.get('/api/broker/consumers/%2F', this.brokerConfig) const consumers = res.data.filter(c => c.queue.name === topic) console.debug('consumers', consumers) const state = res.data.filter(c => c.queue.name === topic && c.active) diff --git a/fda-ui/layouts/default.vue b/fda-ui/layouts/default.vue index 04380873be..91a78486ff 100644 --- a/fda-ui/layouts/default.vue +++ b/fda-ui/layouts/default.vue @@ -76,7 +76,9 @@ <nuxt /> </v-container> </v-main> - <v-footer padless> + <v-footer + v-if="sandbox" + padless> <v-card flat tile @@ -97,7 +99,6 @@ import { mdiFileDelimited, mdiDatabaseSearch, mdiHome, - mdiNewspaperVariantOutline, mdiCog } from '@mdi/js' @@ -121,11 +122,6 @@ export default { title: 'Databases', to: '/container' }, - { - icon: mdiNewspaperVariantOutline, - title: 'Publications', - to: '/publications' - }, { icon: mdiCog, title: 'Privacy', @@ -182,6 +178,14 @@ export default { return { headers: { Authorization: `Bearer ${this.token}` } } + }, + sandbox () { + if (this.$config.sandbox === undefined) { + console.debug('env sandbox not found, default to', false) + return false + } + console.debug('env sandbox found', this.$config.sandbox) + return this.$config.sandbox } }, watch: { diff --git a/fda-ui/nuxt.config.js b/fda-ui/nuxt.config.js index 70287d117f..a03852d240 100644 --- a/fda-ui/nuxt.config.js +++ b/fda-ui/nuxt.config.js @@ -86,6 +86,12 @@ export default { proxy: true }, + publicRuntimeConfig: { + brokerUsername: process.env.BROKER_USERNAME, + brokerPassword: process.env.BROKER_PASSWORD, + sandbox: process.env.SANDBOX + }, + proxy: { '/api': process.env.API }, diff --git a/fda-ui/pages/container/_container_id/database/_database_id/table/create.vue b/fda-ui/pages/container/_container_id/database/_database_id/table/create.vue index 70fb9bd7ff..825b310f66 100644 --- a/fda-ui/pages/container/_container_id/database/_database_id/table/create.vue +++ b/fda-ui/pages/container/_container_id/database/_database_id/table/create.vue @@ -165,19 +165,6 @@ export default { return } this.createTable() - .then(() => this.createConsumer()) - }, - async createConsumer () { - try { - this.loading = true - const res = await this.$axios.post(`/api/container/${this.$route.params.container_id}/database/${this.$route.params.database_id}/table/consumer`, {}, this.config) - console.debug('consumer', res.data) - } catch (err) { - this.error = true - console.error('could not create consumer', err) - this.$toast.error('Could not create consumer') - } - this.loading = false } } } diff --git a/fda-ui/pages/container/_container_id/database/_database_id/table/import.vue b/fda-ui/pages/container/_container_id/database/_database_id/table/import.vue index 4f2992f31c..7c8e38a4b5 100644 --- a/fda-ui/pages/container/_container_id/database/_database_id/table/import.vue +++ b/fda-ui/pages/container/_container_id/database/_database_id/table/import.vue @@ -343,7 +343,6 @@ export default { } this.validStep4 = true this.createTable() - .then(() => this.createConsumer()) }, setOthers (column) { column.null_allowed = false @@ -413,18 +412,6 @@ export default { } this.loading = false this.step = 5 - }, - async createConsumer () { - try { - this.loading = true - const res = await this.$axios.post(`/api/container/${this.$route.params.container_id}/database/${this.$route.params.database_id}/table/consumer`, {}, this.config) - console.debug('consumer', res.data) - } catch (err) { - this.error = true - console.error('could not create consumer', err) - this.$toast.error('Could not create consumer') - } - this.loading = false } } } diff --git a/fda-ui/pages/index.vue b/fda-ui/pages/index.vue index b981eb8b8c..5527e9bc1f 100644 --- a/fda-ui/pages/index.vue +++ b/fda-ui/pages/index.vue @@ -1,23 +1,47 @@ <template> <div> <v-card flat> - <v-card-title>Database Repository</v-card-title> - <v-card-subtitle> - Make Research Data FAIR in Digital Libraries - </v-card-subtitle> <v-card-text> - <div> - <video width="720" height="405" poster="/teaser_image.png" controls> - <source src="/teaser.mp4" type="video/mp4"> - </video> + <div class="mb-2">Important Links</div> + <div class="text--primary"> + <ul> + <li> + <a href="https://dbrepo-docs.ossdip.at/" target="_blank">Online Documentation</a> + </li> + <li> + <a href="https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services" target="_blank">Sourcecode Documentation</a> + </li> + <li> + <a href="https://hub.docker.com/u/dbrepo" target="_blank">Docker Images</a> + </li> + <li> + <a href="https://dbrepo.ossdip.at/" target="_blank">Demo Instance</a> + </li> + </ul> </div> + </v-card-text> + </v-card> + <v-card flat class="mt-4"> + <v-card-text> + <div>Release Notes</div> + <p class="text-h4 text--primary"> + 1.1.1 + </p> + <p> + <a href="https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/blob/master/CHANGELOG.md">Detailed Changelog</a> + </p> + <div class="text--primary"> + In this release we added long-overdue features like user management so each user has their own database (which can also be private) as well as data-insert features directly in the portal. + </div> + </v-card-text> + <v-card-actions> <v-btn - class="mt-2" + class="ml-2 mb-2" color="primary" - to="/publications"> - Read More + to="/container"> + Get Started </v-btn> - </v-card-text> + </v-card-actions> </v-card> </div> </template> diff --git a/fda-ui/pages/publications.vue b/fda-ui/pages/publications.vue deleted file mode 100644 index ce8b908b2d..0000000000 --- a/fda-ui/pages/publications.vue +++ /dev/null @@ -1,54 +0,0 @@ -<template> - <div> - <v-card flat> - <v-card-title>FDA-DBRepo: A Data Preservation Repository Supporting FAIR Principles, Data Versioning and Reproducible Queries</v-card-title> - <v-card-subtitle> - Proceedings of the 17th International Conference on Digital Preservation - </v-card-subtitle> - <v-card-text> - <h3>Authors</h3> - <p> - M. Weise, C. Michlits, M. Staudinger, G. Eva, K. Stytsenko, R. Ganguly, A. Rauber - </p> - <h3>Abstract</h3> - <p> - Database preservation frequently happens post-factum: databases are transferred and migrated into preservation formats and environments after a project has ended. - This increases the risks concerning incompatibility and pushes the preservation burden after the initial lifetime and use of the data. - We propose a database repository infrastructure, where databases are created, used and preserved directly in the data curation environment. This increases the FAIRness of the data curated as professional data stewardship activities accompany the databases right from the onset. We present the FAIR Data Austria Database Repository (FDA-DBRepo) infrastructure and provide a first version of an open-source reference implementation. - </p> - <h3>Venue</h3> - <p>iPRES 2021, Beijing, China; 19.10.2021 - 21.10.2021</p> - <v-btn - color="primary" - href="https://publik.tuwien.ac.at/files/publik_298296.pdf" - target="_blank"> - View PDF - </v-btn> - </v-card-text> - </v-card> - <v-card class="mt-4" flat> - <v-card-title>Better support for research: current cooperation projects</v-card-title> - <v-card-subtitle> - Newspaper article - </v-card-subtitle> - <v-card-text> - <h3>Abstract</h3> - <p> - Currently 35 cooperation projects on digital and social transformation are being carried out at Austrian public universities, which are funded by the Federal Ministry of Education, Science and Research with 50 million euros. Among other things, the University of Vienna is involved in 2 projects of the Research Data Cluster in cooperation with the TU Vienna. - </p> - <v-btn - color="primary" - href="https://zid.univie.ac.at/it-news/artikel/news/cluster-forschungsdaten/" - target="_blank"> - Read More - </v-btn> - </v-card-text> - </v-card> - </div> -</template> - -<script> -export default { - components: {} -} -</script> diff --git a/fda-ui/pages/user/index.vue b/fda-ui/pages/user/index.vue index b95b203dff..58b23989c9 100644 --- a/fda-ui/pages/user/index.vue +++ b/fda-ui/pages/user/index.vue @@ -108,7 +108,6 @@ <v-text-field v-model="user.orcid" :disabled="error" - :rules="[v => !!v || $t('Required')]" maxlength="19" hint="e.g. 0000-0002-1825-0097" label="ORCID" /> -- GitLab