diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9af81cd684778744b11832a90b3a798fd1da9927..f1b83a2b293a65be5dd0f976379a6e0646d03c4e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -58,7 +58,7 @@ light-deploy-testing: <<: *ssh_setup environment: Testing script: - - ssh -oStrictHostKeyChecking=accept-new apiserver@$TESTING_DOMAIN "cd /home/apiserver/datacatalog && sudo git stash && sudo git pull --all && sudo git checkout -f $CI_COMMIT_TAG && sudo git stash clear" + - ssh -oStrictHostKeyChecking=accept-new apiserver@$TESTING_DOMAIN "cd /home/apiserver/datacatalog && sudo git stash && sudo git checkout master && sudo git pull --all && sudo git checkout -f $CI_COMMIT_TAG && sudo git stash clear" - ssh -oStrictHostKeyChecking=accept-new apiserver@$TESTING_DOMAIN "sudo /home/apiserver/datacatalog/deploy_scripts/deployment.sh /home/apiserver/datacatalog $TESTING_URL $TESTING_DOMAIN" light-deploy-production: @@ -72,7 +72,7 @@ light-deploy-production: <<: *ssh_setup environment: Production script: - - ssh -oStrictHostKeyChecking=accept-new apiserver@$PRODUCTION_DOMAIN "cd /home/apiserver/datacatalog && sudo git stash && sudo git pull --all && sudo git checkout -f $CI_COMMIT_TAG && sudo git stash clear" + - ssh -oStrictHostKeyChecking=accept-new apiserver@$PRODUCTION_DOMAIN "cd /home/apiserver/datacatalog && sudo git stash && sudo git checkout master && sudo git pull --all && sudo git checkout -f $CI_COMMIT_TAG && sudo git stash clear" - ssh -oStrictHostKeyChecking=accept-new apiserver@$PRODUCTION_DOMAIN "sudo SECRETS_ENCRYPTION_KEY=$SECRETS_ENCRYPTION_KEY, /home/apiserver/datacatalog/deploy_scripts/deployment.sh /home/apiserver/datacatalog $PRODUCTION_URL $PRODUCTION_DOMAIN" full-deploy-production: @@ -96,10 +96,11 @@ full-deploy-production: - sleep 10 # ensure that next command reaches the new server, prevents host key problems # TODO move local zip of certificate-docker-volume to server once startup is complete - openstack server add volume $INSTANCE_ID $VOLUME_ID - - ssh -oStrictHostKeyChecking=accept-new apiserver@$PRODUCTION_DOMAIN "sudo mkdir -p /mnt" - - ssh -oStrictHostKeyChecking=accept-new apiserver@$PRODUCTION_DOMAIN "sudo mount /dev/vdb1 /mnt" + - sleep 20 # apparently it may take some time until the volume is available to the OS + - ssh -oStrictHostKeyChecking=accept-new apiserver@$PRODUCTION_DOMAIN "sudo mkdir -p /app/mnt" + - ssh -oStrictHostKeyChecking=accept-new apiserver@$PRODUCTION_DOMAIN "sudo mount /dev/vdb1 /app/mnt" - until ssh -oStrictHostKeyChecking=accept-new apiserver@$PRODUCTION_DOMAIN ls /finished_cloudinit >/dev/null 2>&1; do sleep 30; done # wait until cloudinit script is complete - - SECRETS_ENCRYPTION_KEY=$SECRETS_ENCRYPTION_KEY, /home/apiserver/datacatalog/deploy_scripts/deployment.sh /home/apiserver/datacatalog $PRODUCTION_URL $PRODUCTION_DOMAIN + - ssh -oStrictHostKeyChecking=accept-new apiserver@$PRODUCTION_DOMAIN "sudo SECRETS_ENCRYPTION_KEY=$SECRETS_ENCRYPTION_KEY, /home/apiserver/datacatalog/deploy_scripts/deployment.sh /home/apiserver/datacatalog $PRODUCTION_URL $PRODUCTION_DOMAIN" full-deploy-testing: stage: deploy @@ -121,7 +122,7 @@ full-deploy-testing: - sleep 10 # ensure that next command reaches the new server, prevents host key problems # TODO move local zip of certificate-docker-volume to server once startup is complete - until ssh -oStrictHostKeyChecking=accept-new apiserver@$TESTING_DOMAIN ls /finished_cloudinit >/dev/null 2>&1; do sleep 30; done # wait until cloudinit script is complete - - /home/apiserver/datacatalog/deploy_scripts/deployment.sh /home/apiserver/datacatalog $TESTING_URL $TESTING_DOMAIN + - ssh -oStrictHostKeyChecking=accept-new apiserver@$PRODUCTION_DOMAIN "sudo /home/apiserver/datacatalog/deploy_scripts/deployment.sh /home/apiserver/datacatalog $TESTING_URL $TESTING_DOMAIN" cleanup-failed-full-deployment: @@ -246,9 +247,9 @@ publishgit-do: - apt-get install -y git - (git remote -v | grep gith) || git remote add gith "https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/eflows4hpc/datacatalog.git" - git remote -v - - git show-ref - - export - - git push gith $CI_COMMIT_REF_NAME + - git fetch --unshallow origin + - git push gith +HEAD:refs/heads/master + # This is an automatic push of the docker image into gitLab container repository diff --git a/apiserver/main.py b/apiserver/main.py index ff7e1e460bcaba3d29908cceece69a09d95e1e1d..5b81c44bd909a2d4f99c7bf8c9e082d995ba53a4 100644 --- a/apiserver/main.py +++ b/apiserver/main.py @@ -187,6 +187,15 @@ async def get_dataset_secret(location_data_type: LocationDataType, log.debug("Authenticed User: '%s' listed the secret %s of /%s/%s", user.username, key, location_data_type.value, dataset_id) return adapter.get_secret(location_data_type, dataset_id, key, user) +# differs from .../secrets by also returning the values in a dict +@app.get("/{location_data_type}/{dataset_id}/secrets_values") +@secrets_required +async def list_dataset_secrets(location_data_type: LocationDataType, dataset_id: UUID4, user: User = Depends(my_user)): + """list the secrets and valuesof a specific dataset""" + log.debug("Authenticed User: '%s' listed the secrets (key and value) of /%s/%s", user.username, location_data_type.value, dataset_id) + return adapter.get_secret_values(location_data_type, dataset_id, user) + + @app.post("/{location_data_type}/{dataset_id}/secrets") @secrets_required async def add_update_dataset_secret(location_data_type: LocationDataType, diff --git a/frontend/css/footer.css b/frontend/css/footer.css index 6f3fa2b3c04e49fd11aae718de0e4d114545327a..0c49256d21bd03cc578f34d8796450bc7add8a54 100644 --- a/frontend/css/footer.css +++ b/frontend/css/footer.css @@ -5,13 +5,13 @@ bottom: 0; width: 100%; height: auto; - background-image: url('../img/Barra-gris-footer.png'); + background-image: url('../img/grey-bar-footer.png'); background-repeat: no-repeat; background-size: cover; } div.eflows-line { - background-image: url('../img/barra-3-color-8.png') !important; + background-image: url('../img/colourful-bar.png') !important; height: 15px; width: 100%; background-repeat: no-repeat; diff --git a/frontend/img/BMBF_gefoerdert_2017_en.jpg b/frontend/img/BMBF_gefoerdert_2017_en.jpg new file mode 100644 index 0000000000000000000000000000000000000000..97913aaca5bf44ccc412602549a565e6a42c9d5e Binary files /dev/null and b/frontend/img/BMBF_gefoerdert_2017_en.jpg differ diff --git a/frontend/img/barra-3-color-8.png b/frontend/img/colourful-bar.png similarity index 100% rename from frontend/img/barra-3-color-8.png rename to frontend/img/colourful-bar.png diff --git a/frontend/img/eu-flag.png b/frontend/img/eu-flag.png new file mode 100644 index 0000000000000000000000000000000000000000..e49721f94249d757a61ba46fd70e57381f48b64b Binary files /dev/null and b/frontend/img/eu-flag.png differ diff --git a/frontend/img/Barra-gris-footer.png b/frontend/img/grey-bar-footer.png similarity index 100% rename from frontend/img/Barra-gris-footer.png rename to frontend/img/grey-bar-footer.png diff --git a/frontend/templates/base.html.jinja b/frontend/templates/base.html.jinja index 1f0851f111abbe47df1db9a70357e1f29b401026..ac46838ba264214ef59bb310dba2e24f5288b012 100644 --- a/frontend/templates/base.html.jinja +++ b/frontend/templates/base.html.jinja @@ -16,50 +16,51 @@ {% block extraheader %}{% endblock %} </head> {% block body %} + <div class="d-flex flex-column min-vh-100"> <!--BIG TITLE WITH LOGO--> <div class="jumbotron text-center" style="margin-bottom:0"> <h1>eFlows4HPC Data Catalog</h1> </div> <!--NAVBAR--> - <nav class="navbar navbar-expand-lg navbar-dark bg-primary"> - <a class="navbar-brand" href="#"></a> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - - <div class="collapse navbar-collapse" id="navbarSupportedContent"> - <ul class="navbar-nav mr-auto"> - <li class="nav-item {% if home is true %}active{% endif %}"><a class="nav-link" href="./index.html">Home</a></li> - <li class="nav-item {% if storage is true %}active{% endif %}"><a class="nav-link" href="./storage.html?type=dataset">Storage</a></li> - <li class="nav-item {% if login is true %}active{% endif %}"><a class="nav-link" href="./login.html" id="loginOutText">Log In</a></li> <!--If token is found in local storage, replace with logged in username and log-out option (i.e. delete local token)--> - </ul> - </div> -</nav> + <nav class="navbar navbar-expand-lg navbar-dark bg-primary"> + <a class="navbar-brand" href="#"></a> + <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + <div class="collapse navbar-collapse" id="navbarSupportedContent"> + <ul class="navbar-nav mr-auto"> + <li class="nav-item {% if home is true %}active{% endif %}"><a class="nav-link" href="./index.html">Home</a></li> + <li class="nav-item {% if storage is true %}active{% endif %}"><a class="nav-link" href="./storage.html?type=dataset">Storage</a></li> + <li class="nav-item {% if login is true %}active{% endif %}"><a class="nav-link" href="./login.html" id="loginOutText">Log In</a></li> <!--If token is found in local storage, replace with logged in username and log-out option (i.e. delete local token)--> + </ul> + </div> + </nav> - <ul class="nav navbar-nav"> - </ul> + <ul class="nav navbar-nav"> + </ul> <!--SPECIFIC PAGE CONTENT--> - <div class="d-flex flex-column min-vh-75"> - {% block content%} - {% endblock %} - </div> + {% block content%} + {% endblock %} + + <div class="flex-grow-1"></div> <!--FOOTER--> {% block footer %} {% include 'footer.html.jinja' %} {% endblock %} + </div> - <!--SHARED JAVASCRIPT--> - <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script> - <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx" crossorigin="anonymous"></script> + <!--SHARED JAVASCRIPT--> + <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script> + <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx" crossorigin="anonymous"></script> - <script src="js/auth.js"></script> - <script src="js/apicalls.js"></script> + <script src="js/auth.js"></script> + <script src="js/apicalls.js"></script> - <!--EXTRA JAVASCRIPT--> - {% block scripts %} - {% endblock %} + <!--EXTRA JAVASCRIPT--> + {% block scripts %} + {% endblock %} {% endblock %} \ No newline at end of file diff --git a/frontend/templates/footer.html.jinja b/frontend/templates/footer.html.jinja index 1d1e24d1a7f668ef7b046aad0946e4484a4de449..3a34da666462ee7f04b6831f09f9f2e16a615360 100644 --- a/frontend/templates/footer.html.jinja +++ b/frontend/templates/footer.html.jinja @@ -3,7 +3,7 @@ {% endblock %} {% block footer %} -<footer class="footer d-inlign-flex"> +<footer class="footer mt-auto flex-shrink-0 d-inlign-flex"> <div class="container-fluid p-0"> <div class="eflows-line"></div> <div class="row mt-2 px-3"> @@ -17,10 +17,15 @@ <a href="https://github.com/eflows4hpc/datacatalog"><i class="fa fa-github-square mr-2 fa-2x text-white"></i></a> </p> </div> - <div class="col-lg-6 col-12 d-inlign-flex"> + <div class="col-lg-1 col-6 d-inlign-flex"> + <p class="text-center align-self-center"> + <img loading="lazy" src="img/BMBF_gefoerdert_2017_en.jpg" alt="Funded by BMBF" style="max-height:100px"> + </p> + </div> + <div class="col-lg-5 col-12 d-inlign-flex"> <p class="m-2 align-self-center text-white"> <span class="mr-3 mt-1 float-left"> - <img loading="lazy" src="https://eflows4hpc.eu/wp-content/uploads/2021/01/bandera-8.png" alt="" style="max-width:52px; max-height:34px"> + <img loading="lazy" src="img/eu-flag.png" alt="" style="max-width:52px; max-height:34px"> </span> <small style="display: flow-root">This work has been supported by the eFlows4HPC project, contract #955558. This project has received funding from the European High-Performance Computing Joint Undertaking (JU) under grant agreement No 955558.<br>The JU receives support from the European Union’s Horizon 2020 research and innovation programme and Spain, Germany, France, Italy, Poland, Switzerland, Norway. <strong>