web/index.html
added navigation bar menu with the demo sites
Costa Tsaousis (ktsaou) committed
Apr 23, 2016 at 03:53 UTC
b6abe19b5b678786052ec9ab31557079e14c4747
1 file changed
+28
-3
web/index.html
+28
-3
@@ -330,7 +330,7 @@
330
</script>
331
332
<!-- load the dashboard manager - it will do the rest -->
333
- <script type="text/javascript" src="dashboard.js?v33"></script>
333
+ <script type="text/javascript" src="dashboard.js?v34"></script>
334
</head>
335
336
<body data-spy="scroll" data-target="#sidebar">
@@ -345,6 +345,20 @@
345
</button>
346
<a href="/" class="navbar-brand" id="hostname">netdata</a>
347
</div>
348
+ <nav id="demosites_nav" class="collapse navbar-collapse navbar-left" role="navigation">
349
+ <ul class="nav navbar-nav">
350
+ <li class="dropdown">
351
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" id="current_view">demo sites <strong class="caret"></strong></a>
352
+ <ul class="dropdown-menu scrollable-menu inpagemenu" role="menu">
353
+ <li id="demo_eu"><a href="//netdata.firehol.org?nowelcome">EU - London (DigitalOcean.com)</a></li>
354
+ <li id="demo_us"><a href="//netdata2.firehol.org?nowelcome">US - Atlanta (CDN77.com)</a></li>
355
+ <li role="separator" class="divider"></li>
356
+ <li id="demo_tv"><a href="tv.html">TV Dashboard for 2 servers</a></li>
357
+ <li id="demosites"><a href="demosites.html">Dashboard for monitoring netdata demo sites</a></li>
358
+ </ul>
359
+ </li>
360
+ </ul>
361
+ </nav>
362
<nav class="collapse navbar-collapse navbar-right" role="navigation">
363
<ul class="nav navbar-nav">
364
<li><a href="#" class="btn" data-toggle="modal" data-target="#optionsModal"><i class="fa fa-cog"></i> settings</a></li>
@@ -783,8 +797,19 @@ function isdemo() {
797
this_is_demo = false;
798
799
try {
786
- if(typeof document.location.hostname === 'string')
787
- this_is_demo = document.location.hostname.endsWith('.firehol.org');
800
+ if(typeof document.location.hostname === 'string') {
801
+ if(document.location.hostname === 'netdata.firehol.org') {
802
+ document.getElementById("demo_eu").className = "active";
803
+ this_is_demo = true;
804
+ }
805
+ else if(document.location.hostname === 'netdata2.firehol.org') {
806
+ document.getElementById("demo_us").className = "active";
807
+ this_is_demo = true;
808
+ }
809
+ }
810
+
811
+ if(!this_is_demo)
812
+ document.getElementById("demosites_nav").style.visibility = "hidden";
813
}
814
catch(error) {
815
;