Skip to content

Commit ba2aaaa

Browse files
author
yellowshirt
committed
Internet speed widget added; experimentation with layout
1 parent 3d6eac2 commit ba2aaaa

File tree

9 files changed

+85
-622
lines changed

9 files changed

+85
-622
lines changed

css/pages/dashboard.css

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,4 +320,36 @@ margin-bottom: 26px;}
320320
.shortcuts .shortcut {
321321
width: 48%;
322322
}
323-
}
323+
}
324+
325+
/* ADDED BY AFAQ */
326+
.widget-content{ padding:0px; }
327+
.dataTables_length{display:none;}
328+
.dataTable{ margin-bottom:0px;}
329+
.pulse{
330+
background:#19bc9c;
331+
border:1px solid #19bc9c;
332+
color:white;
333+
}
334+
.pulse-border{
335+
border-color:#19bc9c;
336+
}
337+
.navbar{
338+
position:fixed;
339+
top:0;
340+
z-index:9999999;
341+
width:100%;
342+
}
343+
.subnavbar{
344+
position:fixed;
345+
top:50px;
346+
z-index:9999999;
347+
width:100%;
348+
}
349+
.main{
350+
margin-top:130px;
351+
}
352+
.dataTables_paginate{ width:100%; text-align:center; margin-top:10px; margin-left:-30px;}
353+
.dataTables_paginate a{ margin-left:8px;}
354+
.dataTables_paginate a:hover{ pointer:pointer;}
355+
.navbar-fixed-top{ margin-left:0px;}

index.html

Lines changed: 5 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -16,41 +16,12 @@
1616
<!--[if lt IE 9]>
1717
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
1818
<![endif]-->
19-
<style>
20-
.widget-content{ padding:0px; }
21-
.dataTables_length{display:none;}
22-
.dataTable{ margin-bottom:0px;}
23-
.pulse{
24-
background:#19bc9c;
25-
border:1px solid #19bc9c;
26-
color:white;
27-
}
28-
.pulse-border{
29-
border-color:#19bc9c;
30-
}
31-
.navbar{
32-
position:fixed;
33-
top:0;
34-
z-index:9999999;
35-
width:100%;
36-
}
37-
.subnavbar{
38-
position:fixed;
39-
top:50px;
40-
z-index:9999999;
41-
width:100%;
42-
}
43-
.main{
44-
margin-top:130px;
45-
}
46-
.dataTables_paginate{ width:100%; text-align:center; margin-top:10px; margin-left:-30px;}
47-
.dataTables_paginate a{ margin-left:8px;}
48-
.dataTables_paginate a:hover{ pointer:pointer;}
49-
.navbar-fixed-top{ margin-left:0px;}
50-
</style>
51-
5219
</head>
5320
<body>
21+
22+
<!-- Github Fork Image-->
23+
<a href="https://github.com/afaqurk/linux-dash"><img style="position: absolute; top: 0; right: 0; border: 0;z-index:99999999;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
24+
5425
<div class="navbar navbar-fixed-top" style="">
5526
<div class="navbar-inner">
5627
<div class="container">
@@ -93,10 +64,6 @@
9364

9465
A simple web dashboard to monitor your server.
9566

96-
<div class="">Data refresh in
97-
<span style="color:#19bc9c" id="page_data_refresh">20</span>...
98-
99-
</div>
10067
</div>
10168

10269
<div class="row">
@@ -186,7 +153,7 @@ <h3>Disk Usage</h3>
186153
</div>
187154
<!-- /widget-header -->
188155
<div class="widget-content">
189-
156+
<div class="btn btn-error">Test</div>
190157
<table id="df_dashboard" class="table table-hover table-condensed table-bordered" >
191158
</table>
192159
</div>
@@ -335,7 +302,6 @@ <h3> Processes </h3>
335302
<script src="js/bootstrap.js"></script>
336303
<script src="//cdnjs.cloudflare.com/ajax/libs/datatables/1.9.4/jquery.dataTables.min.js"></script>
337304
<script src="js/odometer.js"></script>
338-
<script src="js/effects.js"></script>
339305
<script src="js/magic_happens_here.js"></script>
340306

341307
</body>

js/base.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,47 @@ $(function () {
1111

1212
});
1313

14+
15+
/* ADDED BY AFAQ */
16+
17+
var pulse_counter; // number of times the element should pulsate
18+
var pulse_interval; // interval (in milliseconds) of pulsating
19+
20+
21+
function pulsate_element(element){
22+
23+
while ( pulse_counter>0){
24+
pulse_counter--;
25+
setTimeout(function(){ element.parent().toggleClass('pulse'); },pulse_interval*pulse_counter);
26+
setTimeout(function(){ element.parent().parent().toggleClass('pulse-boder'); },pulse_interval*pulse_counter);
27+
pulsate_element(element);
28+
}
29+
30+
//if (pulse_counter==0){ pulse_counter=8;}
31+
}
32+
33+
// smooth scrolling for links
34+
$(function() {
35+
$('a[href*=#]:not([href=#])').click(function() {
36+
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
37+
|| location.hostname == this.hostname) {
38+
39+
var target = $(this.hash);
40+
41+
pulse_counter=8; // number of times the element should pulsate
42+
pulse_interval=400; // interval (in milliseconds) of pulsating
43+
pulsate_element(target);
44+
45+
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
46+
if (target.length) {
47+
$('html,body').animate({
48+
scrollTop: target.parent().offset().top-130
49+
}, 1000);
50+
return false;
51+
}
52+
}
53+
});
54+
});
1455

1556

1657
});

0 commit comments

Comments
 (0)