Skip to content

Commit

Permalink
Closed #1275 The Google Analytics upload script has been changed.
Browse files Browse the repository at this point in the history
  • Loading branch information
glaubervila committed Dec 21, 2020
1 parent 316c0e3 commit ab56151
Show file tree
Hide file tree
Showing 12 changed files with 136 additions and 39 deletions.
65 changes: 65 additions & 0 deletions Docs/exemplo_importacao_coadd_object_dr1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"products": [
{
"display_name": "DR1",
"fields": [],
"releases": [
"dr1"
],
"table": "DR1_MAIN",
"schema": "DES_ADMIN",
"database": "desdr",
"type": "catalog",
"class": "coadd_objects",
"name": "dr1_coadd",
"association": [
{
"ucd": "meta.id;meta.main",
"property": "coadd_object_id"
},
{
"ucd": "pos.eq.ra;meta.main",
"property": "ra"
},
{
"ucd": "pos.eq.dec;meta.main",
"property": "dec"
},
{
"ucd": "phys.size.smajAxis;instr.det;meta.main",
"property": "a_image"
},
{
"ucd": "phys.size.sminAxis;instr.det;meta.main",
"property": "b_image"
},
{
"ucd": "pos.posAng;instr.det;meta.main",
"property": "theta_j2000"
},
{
"ucd": "phot.mag;meta.main;em.opt.g",
"property": "mag_auto_g"
},
{
"ucd": "phot.mag;meta.main;em.opt.r",
"property": "mag_auto_r"
},
{
"ucd": "phot.mag;meta.main;em.opt.i",
"property": "mag_auto_i"
},
{
"ucd": "phot.mag;meta.main;em.opt.z",
"property": "mag_auto_z"
},
{
"ucd": "phot.mag;meta.main;em.opt.Y",
"property": "mag_auto_y"
}
]
}
],
"ticket": "GZY650",
"register_username": "gverde"
}
3 changes: 2 additions & 1 deletion docker-compose-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ services:
- ./archive/django_static:/var/www/django_static
# Diretório de dados da aplicação
- ./archive:/var/www/data

# Google Analytics Script
- ./google-analytics.js:/var/www/ga/google-analytics.js
depends_on:
- backend
- iipserver
Expand Down
2 changes: 2 additions & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,5 @@ COPY --from=eyeballing /app/build /var/www/eyeballing
# Add Landing Page React App to image
COPY --from=landingpage /app/build /var/www/landing_page

# Add Directory where google analytics scripts are located
COPY ./ga /var/www/ga
7 changes: 4 additions & 3 deletions frontend/explorer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="UTF-8">

<!-- Global site tag (gtag.js) - Google Analytics -->
<script src="ga/google-analytics.js"></script>

<link rel="icon" href="favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

Expand Down Expand Up @@ -55,9 +59,6 @@
}
</script>

<!-- Global site tag (gtag.js) - Google Analytics -->
<script src="ga/google-analytics.js"></script>

<!-- The line below must be kept intact for Sencha Cmd to build your application -->
<script id="microloader" data-app="1739eae9-ca05-49a0-800a-3c2bd487fa19" type="text/javascript"
src="bootstrap.js"></script>
Expand Down
7 changes: 4 additions & 3 deletions frontend/eyeballing/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

<head>
<meta charset="utf-8" />

<!-- Global site tag (gtag.js) - Google Analytics -->
<script src="ga/google-analytics.js"></script>

<link rel="icon" href="%PUBLIC_URL%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="theme-color" content="#000000" />
Expand Down Expand Up @@ -33,9 +37,6 @@
<link rel='stylesheet' href="%PUBLIC_URL%/visiomatic/Leaflet/dist/leaflet.css" />
<link rel='stylesheet' href="%PUBLIC_URL%/visiomatic/visiomatic/dist/visiomatic.css" />

<!-- Global site tag (gtag.js) - Google Analytics -->
<script src="ga/google-analytics.js"></script>


<title>Tile Viewer</title>
<!-- <script src="%PUBLIC_URL%/env-config.js"></script> -->
Expand Down
39 changes: 21 additions & 18 deletions frontend/ga/google-analytics.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
// ## EXEMPLO DE GOOGLE ANALYTICS ##
// To enable Google Analytics in one of the environments.
// Create a new file called google-analytics.js copy and paste the template below, replace the ID G-XXXXXXXXXX with the Google Analitcs key.
// In the compose docker mount the file in order to overwrite the template in the /var/www/ga directory.

// COLABORATION
// <!-- Global site tag (gtag.js) - Google Analytics -->
// <script async src="https://www.googletagmanager.com/gtag/js?id=G-EEW8XVF479"></script>
// <script>
// window.dataLayer = window.dataLayer || [];
// function gtag(){dataLayer.push(arguments);}
// gtag('js', new Date());
// GA ID for Colaboration enviroment: G-EEW8XVF479
// GA ID for Public enviroment: G-2JMWE98YJD

// gtag('config', 'G-EEW8XVF479');
// </script>
// Global site tag(gtag.js) - Google Analytics
// NOTE: Uncomment the script below

// PUBLIC
// <!-- Global site tag (gtag.js) - Google Analytics -->
// <script async src="https://www.googletagmanager.com/gtag/js?id=G-2JMWE98YJD"></script>
// <script>
// window.dataLayer = window.dataLayer || [];
// function gtag(){dataLayer.push(arguments);}
// gtag('js', new Date());
// function loadGoogleAnalytics() {
// var ga = document.createElement('script');
// ga.type = 'text/javascript';
// ga.async = true;
// ga.src = 'https://www.googletagmanager.com/gtag/js?id=G-EEW8XVF479';
// var s = document.getElementsByTagName('script')[0];
// s.parentNode.insertBefore(ga, s);
// }

// gtag('config', 'G-2JMWE98YJD');
// </script>
// loadGoogleAnalytics();

// window.dataLayer = window.dataLayer || [];
// function gtag() { dataLayer.push(arguments); }
// gtag('js', new Date());
// gtag('config', 'G-EEW8XVF479');
8 changes: 6 additions & 2 deletions frontend/landing_page/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@

<head>
<meta charset="utf-8" />

<!-- Global site tag (gtag.js) - Google Analytics -->
<script src="ga/google-analytics.js"></script>

<link rel="icon" href="%PUBLIC_URL%/favicon.png" />
<script src="https://kit.fontawesome.com/10636d4c83.js" crossorigin="anonymous"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="LIneA Science Server" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Oxanium|Roboto:300,400,500,700&display=swap" />
<!-- Global site tag (gtag.js) - Google Analytics -->
<script src="ga/google-analytics.js"></script>


<title>LIneA Science Server</title>
</head>

Expand Down
9 changes: 9 additions & 0 deletions frontend/nginx-proxy-develop.conf
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ server {
autoindex off;
}

# Diretório com os arquivos de google analytics
location /ga {
alias /var/www/ga/;
try_files $uri $uri/ /index.html;
autoindex off;
}

# Frontend Development with Sencha app Watch
location /sky/ {
proxy_pass http://sky:1841$request_uri;
Expand Down Expand Up @@ -144,4 +151,6 @@ server {
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Real-IP $remote_addr;
}


}
14 changes: 11 additions & 3 deletions frontend/nginx-proxy.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
upstream iipsrv {
server iipserver:9000;
}
# upstream iipsrv {
# server iipserver:9000;
# }

server {
listen 8080;
Expand Down Expand Up @@ -112,4 +112,12 @@ server {
try_files $uri $uri/ /index.html;
autoindex off;
}

# Diretório com os arquivos de google analytics
location /ga {
alias /var/www/ga/;
try_files $uri $uri/ /index.html;
autoindex off;
}

}
8 changes: 4 additions & 4 deletions frontend/sky/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="UTF-8">

<!-- Global site tag (gtag.js) - Google Analytics -->
<script src="ga/google-analytics.js"></script>

<link rel="icon" href="favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<script src="./google-analytics.js"></script>
Expand Down Expand Up @@ -55,10 +59,6 @@
}
</script>

<!-- Global site tag (gtag.js) - Google Analytics -->
<script src="ga/google-analytics.js"></script>


<!-- The line below must be kept intact for Sencha Cmd to build your application -->
<script id="microloader" data-app="23e8d35d-093f-4581-a508-3922dc20fcbf" type="text/javascript"
src="bootstrap.js"></script>
Expand Down
7 changes: 4 additions & 3 deletions frontend/target/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="UTF-8">

<!-- Global site tag (gtag.js) - Google Analytics -->
<script src="ga/google-analytics.js"></script>

<link rel="icon" href="favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

Expand Down Expand Up @@ -62,9 +66,6 @@
}
</script>

<!-- Global site tag (gtag.js) - Google Analytics -->
<script src="ga/google-analytics.js"></script>

<!-- The line below must be kept intact for Sencha Cmd to build your application -->
<script id="microloader" data-app="85a0e2c2-ad9b-4f4a-84ed-649bd3f711fd" type="text/javascript"
src="bootstrap.js"></script>
Expand Down
6 changes: 4 additions & 2 deletions frontend/userquery/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="UTF-8">

<!-- Global site tag (gtag.js) - Google Analytics -->
<script src="ga/google-analytics.js"></script>

<link rel="icon" href="favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

Expand Down Expand Up @@ -53,8 +57,6 @@
linea_logo.style.display = 'none';
}
</script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script src="ga/google-analytics.js"></script>

<!-- The line below must be kept intact for Sencha Cmd to build your application -->
<script id="microloader" data-app="ec311b0b-1ca2-4f2f-b672-f7e9bf9f9023" type="text/javascript"
Expand Down

0 comments on commit ab56151

Please sign in to comment.