Skip to content

Commit

Permalink
add config
Browse files Browse the repository at this point in the history
  • Loading branch information
Milos committed Feb 9, 2024
1 parent 964ab06 commit 9b1f82f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
6 changes: 6 additions & 0 deletions src/config/matomo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const matomo = {
matomoHost: "MATOMO_HOST_PLACEHOLDER",
matomoId: "MATOMO_SITE_ID_PLACEHOLDER"
}

export default matomo
18 changes: 3 additions & 15 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,16 @@ import "bootstrap/dist/css/bootstrap.css"
import "bootstrap-vue-next/dist/bootstrap-vue-next.css"
import "bootstrap"
import "bootstrap-icons/font/bootstrap-icons.css"
import matomo from "./config/matomo.js"

library.add(faSpinner)
library.add(faPencil)
library.add(faTrash)
library.add(faDownload)

let matomoHost = ''
let matomoSiteId = 0
if(window.location.origin === 'http://localhost:8080') {
matomoHost = 'https://matomo.bbmri-eric.eu/'
matomoSiteId = 1
}else if(window.location.origin === 'https://negotiator.acc.bbmri-eric.eu') {
matomoHost = 'https://negotiator.acc.bbmri-eric.eu'
matomoSiteId = 2
}else if(window.location.origin === 'https://negotiator.bbmri-eric.eu') {
matomoHost = 'https://negotiator.bbmri-eric.eu'
matomoSiteId = 3
}

const app = createApp(App).use(VueMatomo, {
host: matomoHost,
siteId: matomoSiteId,
host: matomo.matomoHost,
siteId: matomo.matomoId,
})

app.use(router)
Expand Down
2 changes: 2 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ do
sed -i 's|REDIRECT_URI_PLACEHOLDER|'${REDIRECT_URI}'|g' $file
sed -i 's|LOGOUT_URI_PLACEHOLDER|'${LOGOUT_URI}'|g' $file
sed -i 's|RESOURCES_PLACEHOLDER|'${API_RESOURCES}'|g' $file
sed -i 's|MATOMO_HOST_PLACEHOLDER|'${MATOMO_HOST}'|g' $file
sed -i 's|MATOMO_SITE_ID_PLACEHOLDER|'${MATOMO_SITE_ID}'|g' $file

done

Expand Down

0 comments on commit 9b1f82f

Please sign in to comment.