Commit 2eb85154 authored by Kenzo-Hugo Hillion's avatar Kenzo-Hugo Hillion
Browse files

Merge branch '42-commit-number-footer-frontend' into 'dev'

Add build number based on commit hash

Closes #42

See merge request !54
parents 4d0cafe3 8d9a32b8
Pipeline #31831 passed with stages
in 3 minutes and 7 seconds
#!/bin/sh
docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
docker build -t "$CI_REGISTRY_IMAGE/frontend:${CI_COMMIT_REF_NAME}" frontend/
docker build -t "$CI_REGISTRY_IMAGE/frontend:${CI_COMMIT_REF_NAME}" --build-arg VUE_APP_GIT_COMMIT=${CI_COMMIT_SHORT_SHA} frontend/
docker tag "$CI_REGISTRY_IMAGE/frontend:${CI_COMMIT_REF_NAME}" "$CI_REGISTRY_IMAGE/frontend:latest"
docker push "$CI_REGISTRY_IMAGE/frontend:${CI_COMMIT_REF_NAME}"
......@@ -44,7 +44,8 @@ services:
- backend
- postgresql
environment:
- NODE_ENV=development
NODE_ENV: development
VUE_APP_GIT_COMMIT: "local-dev-env"
nginx:
image: nginx:1.13.12-alpine
......
......@@ -2,10 +2,15 @@
<v-app>
<Navbar/>
<v-content class="ma-3">
<keep-alive>
<keep-alive :exclude="/gene-detail.*/">
<router-view></router-view>
</keep-alive>
</v-content>
<v-footer class="pa-3">
<v-spacer></v-spacer>
<div>Some footer (<span class="font-italic font-weight-light">{{commitHash}}</span>)</div>
</v-footer>
</v-app>
</template>
......@@ -20,5 +25,10 @@ export default {
//
};
},
computed: {
commitHash() {
return process.env.VUE_APP_GIT_COMMIT;
},
}
};
</script>
......@@ -7,13 +7,10 @@
<span>DB</span>
</v-toolbar-title>
<v-spacer></v-spacer>
<v-btn flat>
<span>Sign in</span>
<v-icon right>exit_to_app</v-icon>
</v-btn>
<v-btn flat>
<span>Help</span>
<v-icon right>help</v-icon>
<Help/>
<v-btn href="https://gitlab.pasteur.fr/metagenomics/metagenedb" flat target="_blank" class="ma-0 pa-2">
<span>GitLab</span>
<v-icon class="ml-1">fab fa-gitlab</v-icon>
</v-btn>
</v-toolbar>
......@@ -24,9 +21,10 @@
<script>
import Drawer from '@/components/Drawer.vue';
import Help from '@/components/help/help.vue';
export default {
components: { Drawer },
components: { Drawer, Help },
data() {
return {
drawer: false,
......
<div class="help">
<v-dialog v-model="dialog" fullscreen hide-overlay transition="dialog-bottom-transition">
<template v-slot:activator="{ on }">
<v-btn flat v-on="on">Help<v-icon>help</v-icon></v-btn>
</template>
<v-card>
<v-toolbar dark color="primary">
<v-btn icon dark @click="dialog = false">
<v-icon>close</v-icon>
</v-btn>
<v-toolbar-title>Help</v-toolbar-title>
</v-toolbar>
<v-list two-line subheader>
<template v-for="(item, index) in help_links">
<v-list-tile :key="item.title">
<v-list-tile-avatar>
<v-icon class="primary lighten-2" dark>
{{ item.icon }}
</v-icon>
</v-list-tile-avatar>
<v-list-tile-content>
<v-list-tile-title><a :href="item.url" target="_blank">{{ item.title }}</a></v-list-tile-title>
<v-list-tile-sub-title><a :href="item.url" target="_blank">{{ item.info }}</a></v-list-tile-sub-title>
</v-list-tile-content>
<v-list-tile-avatar>
<v-btn :href="item.url" flat icon target="_blank">
<v-icon class="tertiary--text">
open_in_new
</v-icon>
</v-btn>
</v-list-tile-avatar>
</v-list-tile>
</template>
</v-list>
</v-card>
</v-dialog>
</div>
\ No newline at end of file
export default {
data () {
return {
dialog: false,
}
},
computed: {
help_links() {
return [
{
title: 'API documentation',
info: 'Documentation about different endpoints of metageneDB API',
icon: 'fas fa-code',
url: '/api/swagger',
},
{
title: 'GitLab repository',
info: 'Access to source code of the project',
icon: 'fab fa-gitlab',
url: 'https://gitlab.pasteur.fr/metagenomics/metagenedb',
},
];
},
}
}
\ No newline at end of file
a {
text-decoration: none;
color: inherit;
}
\ No newline at end of file
<template src="./help.html" lang="html"></template>
<script src="./help.js" lang="js"></script>
<style src="./help.scss" lang="scss" scoped></style>
\ No newline at end of file
<div class="compare">
<v-flex>
<v-toolbar class="secondary darken-1 white--text" dense>
<v-icon class="white--text">far fa-chart-bar</v-icon>
<v-icon class="white--text">far fa-clone</v-icon>
<v-toolbar-title>Taxonomy comparison</v-toolbar-title>
<v-spacer/>
<v-flex xs3 md2>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment