@cryptotaxi247 / netdata-1 / commits / d4189f59e

fix width of demosites.html; added google analytics to demosites.html and index.html (but only when running on the demo sites)

Costa Tsaousis (ktsaou) committed May 3, 2016 at 21:30 UTC d4189f59e1ecd6afc26a1e9393f99f3946c0c881
2 files changed +52 -18
web/demosites.html
+31 -10
@@ -75,7 +75,7 @@ body {
75 display: inline-block;
76 min-height: 50px;
77 width: 100%;
78 - height: 8vw;
78 + height: 8vmax;
79 text-align: left;
80 }
81
@@ -86,18 +86,18 @@ body {
86 left: 10px;
87 bottom: 0;
88 right: 0;
89 - font-size: 1vw;
89 + font-size: 1vmax;
90 z-index: 1;
91 }
92
93 .mysparkline-overchart-value {
94 position: absolute;
95 display: block;
96 - top: 1.1vw;
96 + top: 1.1vmax;
97 left: 10px;
98 bottom: 0;
99 right: 0;
100 - font-size: 5vw;
100 + font-size: 5vmax;
101 z-index: 2;
102 text-shadow: #333 0px 0px 2px;
103 }
@@ -106,7 +106,7 @@ body {
106 position: relative;
107 display: inline-block;
108 width: 100%;
109 - height: 15vw;
109 + height: 14vmax;
110 min-height: 150px;
111 text-align: left;
112 }
@@ -145,6 +145,16 @@ body {
145 font-size: 1.5vw;
146 }
147
148 +@media only screen and (min-width : 992px) {
149 + .container {
150 + width: 90%;
151 + }
152 +}
153 +@media only screen and (max-width : 992px) {
154 + .container {
155 + width: 100%;
156 + }
157 +}
158 </style>
159
160 </head>
@@ -165,7 +175,7 @@ body {
175 pick a <b>netdata</b> demo server
176 </div>
177 <div class="mycontent">
168 - these demo servers is what you will get by installing <b>netdata</b>
178 + these demo servers show what you will get by installing <b>netdata</b>
179 </div>
180
181 <div style="width: 100%; text-align: center; padding-top: 2vw;">
@@ -687,14 +697,25 @@ body {
697 <div style="padding-top: 6vw; width: 100%; text-align: center; font-size: 2vw;">
698 want to know more?
699 <br/>
690 - jump to <a href="https://github.com/firehol/netdata/">the netdata page at github</a>!
691 - <br/>
692 - <b>netdata</b> monitors 1.000 - 5.000 metrics out of the box
700 + jump to <a href="https://github.com/firehol/netdata/">the netdata page at github</a>
701 <br/>
694 - and it needs just 3 mins to be installed!
702 + it needs just 3 mins to be installed on your servers!
703 <br/>
704 &nbsp;
705 </div>
706 </div>
707 </body>
708 +<script>
709 + // google analytics when this is used for the home page of the demo sites
710 + // you don't need this if you customize this dashboard for your needs
711 + setTimeout(function() {
712 + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
713 + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
714 + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
715 + })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
716 +
717 + ga('create', 'UA-64295674-3', 'auto');
718 + ga('send', 'pageview');
719 + }, 2000);
720 +</script>
721 </html>
web/index.html
+21 -8
@@ -2007,17 +2007,30 @@ function finalizePage() {
2007 location.reload();
2008 });
2009
2010 - if(!nowelcome && isdemo()) {
2011 - setTimeout(function() {
2012 - $('#welcomeModal').modal();
2013 - }, 1000);
2014 - }
2015 - else
2016 - notifyForUpdate();
2017 -
2010 $('#updateModal').on('shown.bs.modal', function() {
2011 notifyForUpdate(true);
2012 });
2013 +
2014 + if(isdemo()) {
2015 + if(!nowelcome) {
2016 + setTimeout(function() {
2017 + $('#welcomeModal').modal();
2018 + }, 1000);
2019 + }
2020 +
2021 + // google analytics when this is used for the home page of the demo sites
2022 + // this does not run on user's installations
2023 + setTimeout(function() {
2024 + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
2025 + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
2026 + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
2027 + })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
2028 +
2029 + ga('create', 'UA-64295674-3', 'auto');
2030 + ga('send', 'pageview');
2031 + }, 2000);
2032 + }
2033 + else notifyForUpdate();
2034 }
2035
2036 function resetDashboardOptions() {