Add "munstrap4" template.
This template is based on the original munstrap template, updated to use bootstrap4 and fixing some of the navigation issues the author had with the original project. Key Features: * Most pages use lazy-loaded images to cut down network usage. * Graph Catergory per node is directly linkable * Modal based graph zoom (requires working munin-graph-cgi * JavaScript implemented search feature to quickly jump to the desired display.
This commit is contained in:
parent
3693adb343
commit
bc2dc914b3
|
@ -0,0 +1,339 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
{description}
|
||||
Copyright (C) {year} {fullname}
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
{signature of Ty Coon}, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
|
@ -0,0 +1,114 @@
|
|||
# Munstrap4
|
||||
|
||||
Alternative Munin 2.x templates based on Twitter Bootstrap 4.
|
||||
|
||||
Based on "Munstrap" by [Jonny McCullagh](https://github.com/jonnymccullagh), [munin-monitoring/contrib](https://github.com/munin-monitoring/contrib/tree/master/templates/munstrap) repo.
|
||||
|
||||
#### Overview Sample Image
|
||||
<a href="https://jtsage.dev/munstrap4/sample-home.png"><img src="https://jtsage.dev/munstrap4/sample-home.png" style="max-width: 1229px; display:block; margin-left: auto; margin-right: auto; width: 75%" /></a>
|
||||
|
||||
|
||||
#### [Semi-Live Demo](https://jtsage.dev/munin-demo/)
|
||||
Zoom functionality for this demo has been disabled, and the data will never update, but it's a decent visual reference.
|
||||
|
||||
---
|
||||
|
||||
## Installation
|
||||
|
||||
### 1. Clone the munin-monitoring/contrib repo to a temporary location:
|
||||
|
||||
```
|
||||
$ cd /opt
|
||||
$ git clone https://github.com/munin-monitoring/contrib.git
|
||||
```
|
||||
|
||||
### 2. Place the template in an appropriate safe place
|
||||
|
||||
Ubuntu shown - other distros may prefer ```/usr/local/share/munin/...```
|
||||
|
||||
```
|
||||
$ mkdir /usr/share/munin/template
|
||||
$ mkdir /usr/share/munin/template/munstrap4
|
||||
```
|
||||
__NOTE__: If this step fails, your munin installation may use ```/usr/local/share/munin/...``` instead!
|
||||
|
||||
```
|
||||
$ cp -r /opt/contrib/templates/munstrap4/templates /usr/share/munin/template/munstrap4/
|
||||
$ cp -r /opt/contrib/templates/munstrap4/static /usr/share/munin/template/munstrap4/
|
||||
```
|
||||
|
||||
### 3. Edit your ```munin.conf``` file.
|
||||
|
||||
Typically located at ```/etc/munin.conf```
|
||||
|
||||
__FIND AND CHANGE:__ (near the top of the file)
|
||||
|
||||
```
|
||||
# Where to look for the HTML templates
|
||||
#
|
||||
#tmpldir /etc/munin/templates
|
||||
|
||||
# Where to look for the static www files
|
||||
#
|
||||
#staticdir /etc/munin/static
|
||||
```
|
||||
|
||||
__TO:__
|
||||
```
|
||||
# Where to look for the HTML templates
|
||||
#
|
||||
tmpldir /usr/share/munin/template/munstrap4/templates
|
||||
|
||||
# Where to look for the static www files
|
||||
#
|
||||
staticdir /usr/share/munin/template/munstrap4/static
|
||||
```
|
||||
|
||||
### 4. [Optional / Recommended] Clean out the old generated files.
|
||||
|
||||
This isn't really required, and is totally not nessesary if you are using `munin-httpd`. The location of these files can be found in your ```munin.conf``` file, with the ```htmldir``` directive.
|
||||
|
||||
__NOTE:__ Ubuntu shown, other distributions may be in ```/var/www/munin/```
|
||||
|
||||
```
|
||||
$ rm -rf /var/cache/munin/www/*
|
||||
```
|
||||
|
||||
### 5. Wait Patiently
|
||||
|
||||
```munin-update``` will regenerate the files the next time it runs. By default, this is on the :05 minute tick for most installations. If you do not have new files within 10 minutes, be sure to check ```munin-update.log``` and find out what went wrong.
|
||||
|
||||
---
|
||||
|
||||
## Revert to Official Munin Template
|
||||
|
||||
### 1. Edit your ```munin.conf``` file.
|
||||
|
||||
Typically located at ```/etc/munin.conf```
|
||||
|
||||
__FIND AND CHANGE:__ (near the top of the file - comment these lines out!)
|
||||
|
||||
### 2. [Optional / Recommended] Clean up
|
||||
|
||||
Remove the files from step #1 & #2 above, and repeat step #4 & #5.
|
||||
|
||||
---
|
||||
|
||||
## Samples
|
||||
|
||||
#### View of a group:
|
||||
<a href="https://jtsage.dev/munstrap4/sample-group.png"><img src="https://jtsage.dev/munstrap4/sample-group.png" style="max-width: 1229px; display:block; margin-left: auto; margin-right: auto; width: 75%" /></a>
|
||||
|
||||
#### View of a specific node:
|
||||
<a href="https://jtsage.dev/munstrap4/sample-node.png"><img src="https://jtsage.dev/munstrap4/sample-node.png" style="max-width: 1229px; display:block; margin-left: auto; margin-right: auto; width: 75%" /></a>
|
||||
|
||||
|
||||
#### Zoom feature:
|
||||
<a href="https://jtsage.dev/munstrap4/sample-zoom.png"><img src="https://jtsage.dev/munstrap4/sample-zoom.png" style="max-width: 1229px; display:block; margin-left: auto; margin-right: auto; width: 75%" /></a>
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Compatibility
|
||||
|
||||
a/n: I am unsure of the compatibility with the next major version of munin. Most things will work from what I've read, but the navigation may be slightly funky.
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,199 @@
|
|||
@media (min-width: 992px) {
|
||||
.modal-lg {
|
||||
width: 940px !important;
|
||||
}
|
||||
}
|
||||
|
||||
img.i {
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
}
|
||||
|
||||
img.img-zoom {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div.service-alert {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
img#zoom_image {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
ul.groupview, ul.groupview ul {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.munin-icon {
|
||||
background: url(../img/logo-munin.png) left top;
|
||||
margin-top: -6px;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
display: block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
|
||||
img {
|
||||
box-sizing: content-box;
|
||||
border: 2px solid transparent;
|
||||
}
|
||||
|
||||
img.warn {
|
||||
border: 2px solid #8a6d3b;
|
||||
}
|
||||
|
||||
img.crit {
|
||||
border: 2px solid #a94442;
|
||||
}
|
||||
|
||||
img.unkn {
|
||||
border: 2px solid #ffaa00;
|
||||
}
|
||||
|
||||
|
||||
html {
|
||||
position: relative;
|
||||
min-height: 100%;
|
||||
}
|
||||
body {
|
||||
margin-bottom: 75px; /* Margin bottom by footer height */
|
||||
}
|
||||
.footer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60px; /* Set the fixed height of the footer here */
|
||||
line-height: 60px; /* Vertically center the text there */
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.breadcrumb-item-svc::before {
|
||||
display: inline-block;
|
||||
color: #6c757d;
|
||||
content: "[";
|
||||
}
|
||||
.breadcrumb-item-svc::after {
|
||||
display: inline-block;
|
||||
padding-right: .5rem;
|
||||
color: #6c757d;
|
||||
content: "]";
|
||||
}
|
||||
|
||||
.custom-collapse {
|
||||
color: #6c757d;
|
||||
font-size: 75%;
|
||||
}
|
||||
.custom-collapse::before {
|
||||
display: inline-block;
|
||||
color: #6c757d;
|
||||
content: "[";
|
||||
}
|
||||
.custom-collapse::after {
|
||||
display: inline-block;
|
||||
padding-right: .5rem;
|
||||
color: #6c757d;
|
||||
content: "]";
|
||||
}
|
||||
|
||||
.custom-collapse-all {
|
||||
color: #6c757d;
|
||||
font-size: 75%;
|
||||
}
|
||||
.custom-collapse-all::before {
|
||||
display: inline-block;
|
||||
color: #6c757d;
|
||||
content: "[";
|
||||
}
|
||||
.custom-collapse-all::after {
|
||||
display: inline-block;
|
||||
padding-right: .5rem;
|
||||
color: #6c757d;
|
||||
content: "]";
|
||||
}
|
||||
|
||||
.cat-list::before {
|
||||
display: inline-block;
|
||||
color: #6c757d;
|
||||
content: "[ ";
|
||||
}
|
||||
.cat-list::after {
|
||||
display: inline-block;
|
||||
color: #6c757d;
|
||||
content: " ]";
|
||||
}
|
||||
|
||||
span.twitter-typeahead .tt-menu {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
span.twitter-typeahead .tt-menu {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 1000;
|
||||
display: none;
|
||||
float: left;
|
||||
min-width: 160px;
|
||||
padding: 5px 0;
|
||||
margin: 2px 0 0;
|
||||
font-size: 1rem;
|
||||
color: #373a3c;
|
||||
text-align: left;
|
||||
list-style: none;
|
||||
background-color: #fff;
|
||||
background-clip: padding-box;
|
||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||
border-radius: 0.25rem;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
span.twitter-typeahead .tt-suggestion {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 3px 20px;
|
||||
clear: both;
|
||||
font-weight: normal;
|
||||
line-height: 1.5;
|
||||
color: #373a3c;
|
||||
text-align: inherit;
|
||||
white-space: nowrap;
|
||||
background: none;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
span.twitter-typeahead .tt-suggestion:focus, .dropdown-item:hover, span.twitter-typeahead .tt-suggestion:hover {
|
||||
color: #2b2d2f;
|
||||
text-decoration: none;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
span.twitter-typeahead .active.tt-suggestion, span.twitter-typeahead .tt-suggestion.tt-cursor, span.twitter-typeahead .active.tt-suggestion:focus, span.twitter-typeahead .tt-suggestion.tt-cursor:focus, span.twitter-typeahead .active.tt-suggestion:hover, span.twitter-typeahead .tt-suggestion.tt-cursor:hover {
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
background-color: #0275d8;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
span.twitter-typeahead .disabled.tt-suggestion, span.twitter-typeahead .disabled.tt-suggestion:focus, span.twitter-typeahead .disabled.tt-suggestion:hover {
|
||||
color: #818a91;
|
||||
}
|
||||
|
||||
span.twitter-typeahead {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.input-group span.twitter-typeahead {
|
||||
display: block !important;
|
||||
}
|
||||
.input-group span.twitter-typeahead .tt-menu {
|
||||
top: 2.375rem !important;
|
||||
}
|
||||
|
||||
span.hangindent2 { padding-left: 1em; }
|
||||
span.hangindent3 { padding-left: 2em; }
|
||||
span.hangindent4 { padding-left: 3em; }
|
||||
span.hangindent5 { padding-left: 4em; }
|
||||
span.hangindent6 { padding-left: 5em; }
|
|
@ -0,0 +1 @@
|
|||
@media(min-width:992px){.modal-lg{width:940px!important}}img.i{display:block;margin:10px auto}img.img-zoom{cursor:pointer}div.service-alert{margin-top:10px}img#zoom_image{margin-bottom:15px}ul.groupview,ul.groupview ul{list-style-type:none}.munin-icon{background:url(../img/logo-munin.png) left top;margin-top:-6px;width:35px;height:35px;display:block;float:left}img{box-sizing:content-box;border:2px solid transparent}img.warn{border:2px solid #8a6d3b}img.crit{border:2px solid #a94442}img.unkn{border:2px solid #fa0}html{position:relative;min-height:100%}body{margin-bottom:75px}.footer{position:absolute;bottom:0;width:100%;height:60px;line-height:60px;background-color:#f5f5f5}.breadcrumb-item-svc::before{display:inline-block;color:#6c757d;content:"["}.breadcrumb-item-svc::after{display:inline-block;padding-right:.5rem;color:#6c757d;content:"]"}.custom-collapse{color:#6c757d;font-size:75%}.custom-collapse::before{display:inline-block;color:#6c757d;content:"["}.custom-collapse::after{display:inline-block;padding-right:.5rem;color:#6c757d;content:"]"}.custom-collapse-all{color:#6c757d;font-size:75%}.custom-collapse-all::before{display:inline-block;color:#6c757d;content:"["}.custom-collapse-all::after{display:inline-block;padding-right:.5rem;color:#6c757d;content:"]"}.cat-list::before{display:inline-block;color:#6c757d;content:"[ "}.cat-list::after{display:inline-block;color:#6c757d;content:" ]"}span.twitter-typeahead .tt-menu{cursor:pointer}span.twitter-typeahead .tt-menu{position:absolute;top:100%;left:0;width:100%;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:1rem;color:#373a3c;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,0.15);border-radius:.25rem;overflow:hidden}span.twitter-typeahead .tt-suggestion{display:block;width:100%;padding:3px 20px;clear:both;font-weight:normal;line-height:1.5;color:#373a3c;text-align:inherit;white-space:nowrap;background:0;border:0}span.twitter-typeahead .tt-suggestion:focus,.dropdown-item:hover,span.twitter-typeahead .tt-suggestion:hover{color:#2b2d2f;text-decoration:none;background-color:#f5f5f5}span.twitter-typeahead .active.tt-suggestion,span.twitter-typeahead .tt-suggestion.tt-cursor,span.twitter-typeahead .active.tt-suggestion:focus,span.twitter-typeahead .tt-suggestion.tt-cursor:focus,span.twitter-typeahead .active.tt-suggestion:hover,span.twitter-typeahead .tt-suggestion.tt-cursor:hover{color:#fff;text-decoration:none;background-color:#0275d8;outline:0}span.twitter-typeahead .disabled.tt-suggestion,span.twitter-typeahead .disabled.tt-suggestion:focus,span.twitter-typeahead .disabled.tt-suggestion:hover{color:#818a91}span.twitter-typeahead{width:100%}.input-group span.twitter-typeahead{display:block!important}.input-group span.twitter-typeahead .tt-menu{top:2.375rem!important}span.hangindent2{padding-left:1em}span.hangindent3{padding-left:2em}span.hangindent4{padding-left:3em}span.hangindent5{padding-left:4em}span.hangindent6{padding-left:5em}
|
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,199 @@
|
|||
function refreshZoom(query, form, image, divOverlay) {
|
||||
//INIT
|
||||
var qs = new Querystring(query);
|
||||
init();
|
||||
|
||||
var scale = refreshImg();
|
||||
var start_epoch = (+qs.get("rst_start_epoch", form.start_epoch.value));
|
||||
var stop_epoch = (+qs.get("rst_stop_epoch", form.stop_epoch.value));
|
||||
var initial_left;
|
||||
var initial_top;
|
||||
|
||||
//form.btnMaj.onclick = majDates;
|
||||
form.plugin_name.onblur = refreshImg;
|
||||
form.start_iso8601.onblur = majDates;
|
||||
form.stop_iso8601.onblur = majDates;
|
||||
form.start_epoch.onblur = refreshImg;
|
||||
form.stop_epoch.onblur = refreshImg;
|
||||
form.lower_limit.onblur = refreshImg;
|
||||
form.upper_limit.onblur = refreshImg;
|
||||
form.size_x.onblur = refreshImg;
|
||||
form.size_y.onblur = refreshImg;
|
||||
form.btnReset.onclick = reset;
|
||||
|
||||
// Sets the onClick handler
|
||||
image.onclick = click;
|
||||
var clickCounter = 0;
|
||||
|
||||
//FUNCTIONS
|
||||
function init() {
|
||||
form.plugin_name.value = qs.get("plugin_name", "localdomain/localhost.localdomain/if_eth0");
|
||||
form.start_epoch.value = qs.get("start_epoch", "1236561663");
|
||||
form.stop_epoch.value = qs.get("stop_epoch", "1237561663");
|
||||
form.lower_limit.value = qs.get("lower_limit", "");
|
||||
form.upper_limit.value = qs.get("upper_limit", "");
|
||||
form.size_x.value = qs.get("size_x", "");
|
||||
form.size_y.value = qs.get("size_y", "");
|
||||
|
||||
updateStartStop();
|
||||
}
|
||||
|
||||
function reset(event) {
|
||||
init();
|
||||
|
||||
//Can be not the initial ones in case of manual refresh
|
||||
form.start_epoch.value = start_epoch;
|
||||
form.stop_epoch.value = stop_epoch;
|
||||
updateStartStop();
|
||||
|
||||
//Redraw
|
||||
scale = refreshImg();
|
||||
|
||||
//Reset gui
|
||||
clickCounter = 0;
|
||||
initial_left = 0;
|
||||
initial_top = 0;
|
||||
|
||||
image.onmousemove = undefined;
|
||||
form.start_iso8601.disabled = false;
|
||||
form.stop_iso8601.disabled = false;
|
||||
form.start_epoch.disabled = false;
|
||||
form.stop_epoch.disabled = false;
|
||||
}
|
||||
|
||||
function refreshImg(event) {
|
||||
image.src = qs.get("cgiurl_graph", "/munin-cgi/munin-cgi-graph") + "/"
|
||||
+ form.plugin_name.value
|
||||
+ "-pinpoint=" + parseInt(form.start_epoch.value) + "," + parseInt(form.stop_epoch.value)
|
||||
+ ".png"
|
||||
+ "?"
|
||||
+ "&lower_limit=" + form.lower_limit.value
|
||||
+ "&upper_limit=" + form.upper_limit.value
|
||||
+ "&size_x=" + form.size_x.value
|
||||
+ "&size_y=" + form.size_y.value
|
||||
;
|
||||
|
||||
return ((+form.stop_epoch.value) - (+form.start_epoch.value)) / (+form.size_x.value);
|
||||
}
|
||||
|
||||
function updateStartStop() {
|
||||
form.start_iso8601.value = new Date(form.start_epoch.value * 1000).formatDate(Date.DATE_ISO8601);
|
||||
form.stop_iso8601.value = new Date(form.stop_epoch.value * 1000).formatDate(Date.DATE_ISO8601);
|
||||
}
|
||||
|
||||
function divMouseMove(event) {
|
||||
var delta_x;
|
||||
var size_x;
|
||||
|
||||
// Handling the borders (X1>X2 ou X1<X2)
|
||||
var posX = getCoordinatesOnImage(event)[0];
|
||||
var current_width = posX - initial_left;
|
||||
if (current_width < 0) {
|
||||
delta_x = posX - 63; // the Y Axis is 63px from the left border
|
||||
size_x = -current_width;
|
||||
} else {
|
||||
delta_x = initial_left - 63; // the Y Axis is 63px from the left border
|
||||
size_x = current_width;
|
||||
}
|
||||
|
||||
// Compute the epochs UNIX (only for horizontal)
|
||||
form.start_epoch.value = start_epoch + scale * delta_x;
|
||||
form.stop_epoch.value = start_epoch + scale * ( delta_x + size_x );
|
||||
|
||||
// update !
|
||||
updateStartStop();
|
||||
}
|
||||
|
||||
function startZoom(event) {
|
||||
var pos = getCoordinatesOnImage(event);
|
||||
initial_left = pos[0];
|
||||
initial_top = pos[1];
|
||||
|
||||
// Fix the handles
|
||||
form.start_iso8601.disabled = true;
|
||||
form.stop_iso8601.disabled = true;
|
||||
form.start_epoch.disabled = true;
|
||||
form.stop_epoch.disabled = true;
|
||||
image.onmousemove = divMouseMove;
|
||||
}
|
||||
|
||||
function endZoom(event) {
|
||||
image.onmousemove = undefined;
|
||||
form.start_iso8601.disabled = false;
|
||||
form.stop_iso8601.disabled = false;
|
||||
form.start_epoch.disabled = false;
|
||||
form.stop_epoch.disabled = false;
|
||||
}
|
||||
|
||||
function fillDate(date, default_date) {
|
||||
return date + default_date.substring(date.length, default_date.length);
|
||||
}
|
||||
|
||||
function majDates(event) {
|
||||
var default_date = "2009-01-01T00:00:00+0100";
|
||||
|
||||
var start_manual = fillDate(form.start_iso8601.value, default_date);
|
||||
var stop_manual = fillDate(form.stop_iso8601.value, default_date);
|
||||
|
||||
var dateRegex = /(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}).(\d{4})/;
|
||||
|
||||
if (dateRegex.test(start_manual)) {
|
||||
var date_parsed = new Date(start_manual.replace(dateRegex, "$2 $3, $1 $4:$5:$6"));
|
||||
form.start_epoch.value = date_parsed.getTime() / 1000;
|
||||
}
|
||||
|
||||
if (dateRegex.test(stop_manual)) {
|
||||
var date_parsed = new Date(stop_manual.replace(dateRegex, "$2 $3, $1 $4:$5:$6"));
|
||||
form.stop_epoch.value = date_parsed.getTime() / 1000;
|
||||
}
|
||||
|
||||
//form.submit();
|
||||
refreshImg();
|
||||
}
|
||||
|
||||
function click(event) {
|
||||
switch ((clickCounter++) % 2) {
|
||||
case 0:
|
||||
startZoom(event);
|
||||
break;
|
||||
case 1:
|
||||
endZoom(event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//Coordinates on image
|
||||
function findPosition(oElement) {
|
||||
if (typeof( oElement.offsetParent ) != "undefined") {
|
||||
for (var posX = 0, posY = 0; oElement; oElement = oElement.offsetParent) {
|
||||
posX += oElement.offsetLeft;
|
||||
posY += oElement.offsetTop;
|
||||
}
|
||||
return [posX, posY];
|
||||
}
|
||||
else {
|
||||
return [oElement.x, oElement.y];
|
||||
}
|
||||
}
|
||||
|
||||
function getCoordinatesOnImage(event) {
|
||||
var posX = 0;
|
||||
var posY = 0;
|
||||
var imgPos;
|
||||
imgPos = findPosition(image);
|
||||
if (!event) var event = window.event;
|
||||
if (event.pageX || event.pageY) {
|
||||
posX = event.pageX;
|
||||
posY = event.pageY;
|
||||
}
|
||||
else if (event.clientX || event.clientY) {
|
||||
posX = event.clientX + document.body.scrollLeft
|
||||
+ document.documentElement.scrollLeft;
|
||||
posY = event.clientY + document.body.scrollTop
|
||||
+ document.documentElement.scrollTop;
|
||||
}
|
||||
posX = posX - imgPos[0];
|
||||
posY = posY - imgPos[1];
|
||||
return [posX, posY];
|
||||
}
|
||||
};
|
|
@ -0,0 +1 @@
|
|||
function refreshZoom(query,form,image,divOverlay){var qs=new Querystring(query);init();var scale=refreshImg();var start_epoch=+qs.get("rst_start_epoch",form.start_epoch.value);var stop_epoch=+qs.get("rst_stop_epoch",form.stop_epoch.value);var initial_left;var initial_top;form.plugin_name.onblur=refreshImg;form.start_iso8601.onblur=majDates;form.stop_iso8601.onblur=majDates;form.start_epoch.onblur=refreshImg;form.stop_epoch.onblur=refreshImg;form.lower_limit.onblur=refreshImg;form.upper_limit.onblur=refreshImg;form.size_x.onblur=refreshImg;form.size_y.onblur=refreshImg;form.btnReset.onclick=reset;image.onclick=click;var clickCounter=0;function init(){form.plugin_name.value=qs.get("plugin_name","localdomain/localhost.localdomain/if_eth0");form.start_epoch.value=qs.get("start_epoch","1236561663");form.stop_epoch.value=qs.get("stop_epoch","1237561663");form.lower_limit.value=qs.get("lower_limit","");form.upper_limit.value=qs.get("upper_limit","");form.size_x.value=qs.get("size_x","");form.size_y.value=qs.get("size_y","");updateStartStop()}function reset(event){init();form.start_epoch.value=start_epoch;form.stop_epoch.value=stop_epoch;updateStartStop();scale=refreshImg();clickCounter=0;initial_left=0;initial_top=0;image.onmousemove=undefined;form.start_iso8601.disabled=false;form.stop_iso8601.disabled=false;form.start_epoch.disabled=false;form.stop_epoch.disabled=false}function refreshImg(event){image.src=qs.get("cgiurl_graph","/munin-cgi/munin-cgi-graph")+"/"+form.plugin_name.value+"-pinpoint="+parseInt(form.start_epoch.value)+","+parseInt(form.stop_epoch.value)+".png"+"?"+"&lower_limit="+form.lower_limit.value+"&upper_limit="+form.upper_limit.value+"&size_x="+form.size_x.value+"&size_y="+form.size_y.value;return(+form.stop_epoch.value-+form.start_epoch.value)/+form.size_x.value}function updateStartStop(){form.start_iso8601.value=new Date(form.start_epoch.value*1e3).formatDate(Date.DATE_ISO8601);form.stop_iso8601.value=new Date(form.stop_epoch.value*1e3).formatDate(Date.DATE_ISO8601)}function divMouseMove(event){var delta_x;var size_x;var posX=getCoordinatesOnImage(event)[0];var current_width=posX-initial_left;if(current_width<0){delta_x=posX-63;size_x=-current_width}else{delta_x=initial_left-63;size_x=current_width}form.start_epoch.value=start_epoch+scale*delta_x;form.stop_epoch.value=start_epoch+scale*(delta_x+size_x);updateStartStop()}function startZoom(event){var pos=getCoordinatesOnImage(event);initial_left=pos[0];initial_top=pos[1];form.start_iso8601.disabled=true;form.stop_iso8601.disabled=true;form.start_epoch.disabled=true;form.stop_epoch.disabled=true;image.onmousemove=divMouseMove}function endZoom(event){image.onmousemove=undefined;form.start_iso8601.disabled=false;form.stop_iso8601.disabled=false;form.start_epoch.disabled=false;form.stop_epoch.disabled=false}function fillDate(date,default_date){return date+default_date.substring(date.length,default_date.length)}function majDates(event){var default_date="2009-01-01T00:00:00+0100";var start_manual=fillDate(form.start_iso8601.value,default_date);var stop_manual=fillDate(form.stop_iso8601.value,default_date);var dateRegex=/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}).(\d{4})/;if(dateRegex.test(start_manual)){var date_parsed=new Date(start_manual.replace(dateRegex,"$2 $3, $1 $4:$5:$6"));form.start_epoch.value=date_parsed.getTime()/1e3}if(dateRegex.test(stop_manual)){var date_parsed=new Date(stop_manual.replace(dateRegex,"$2 $3, $1 $4:$5:$6"));form.stop_epoch.value=date_parsed.getTime()/1e3}refreshImg()}function click(event){switch(clickCounter++%2){case 0:startZoom(event);break;case 1:endZoom(event);break}}function findPosition(oElement){if(typeof oElement.offsetParent!="undefined"){for(var posX=0,posY=0;oElement;oElement=oElement.offsetParent){posX+=oElement.offsetLeft;posY+=oElement.offsetTop}return[posX,posY]}else{return[oElement.x,oElement.y]}}function getCoordinatesOnImage(event){var posX=0;var posY=0;var imgPos;imgPos=findPosition(image);if(!event)var event=window.event;if(event.pageX||event.pageY){posX=event.pageX;posY=event.pageY}else if(event.clientX||event.clientY){posX=event.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;posY=event.clientY+document.body.scrollTop+document.documentElement.scrollTop}posX=posX-imgPos[0];posY=posY-imgPos[1];return[posX,posY]}}
|
|
@ -0,0 +1,363 @@
|
|||
// formatDate :
|
||||
// a PHP date like function, for formatting date strings
|
||||
// authored by Svend Tofte <www.svendtofte.com>
|
||||
// the code is in the public domain
|
||||
//
|
||||
// see http://www.svendtofte.com/javascript/javascript-date-string-formatting/
|
||||
// and http://www.php.net/date
|
||||
//
|
||||
// thanks to
|
||||
// - Daniel Berlin <mail@daniel-berlin.de>,
|
||||
// major overhaul and improvements
|
||||
// - Matt Bannon,
|
||||
// correcting some stupid bugs in my days-in-the-months list!
|
||||
// - levon ghazaryan. pointing out an error in z switch.
|
||||
// - Andy Pemberton. pointing out error in c switch
|
||||
//
|
||||
// input : format string
|
||||
// time : epoch time (seconds, and optional)
|
||||
//
|
||||
// if time is not passed, formatting is based on
|
||||
// the current "this" date object's set time.
|
||||
//
|
||||
// supported switches are
|
||||
// a, A, B, c, d, D, F, g, G, h, H, i, I (uppercase i), j, l (lowecase L),
|
||||
// L, m, M, n, N, O, P, r, s, S, t, U, w, W, y, Y, z, Z
|
||||
//
|
||||
// unsupported (as compared to date in PHP 5.1.3)
|
||||
// T, e, o
|
||||
|
||||
Date.prototype.formatDate = function (input,time) {
|
||||
|
||||
var daysLong = ["Sunday", "Monday", "Tuesday", "Wednesday",
|
||||
"Thursday", "Friday", "Saturday"];
|
||||
var daysShort = ["Sun", "Mon", "Tue", "Wed",
|
||||
"Thu", "Fri", "Sat"];
|
||||
var monthsShort = ["Jan", "Feb", "Mar", "Apr",
|
||||
"May", "Jun", "Jul", "Aug", "Sep",
|
||||
"Oct", "Nov", "Dec"];
|
||||
var monthsLong = ["January", "February", "March", "April",
|
||||
"May", "June", "July", "August", "September",
|
||||
"October", "November", "December"];
|
||||
|
||||
var switches = { // switches object
|
||||
|
||||
a : function () {
|
||||
// Lowercase Ante meridiem and Post meridiem
|
||||
return date.getHours() > 11? "pm" : "am";
|
||||
},
|
||||
|
||||
A : function () {
|
||||
// Uppercase Ante meridiem and Post meridiem
|
||||
return (this.a().toUpperCase ());
|
||||
},
|
||||
|
||||
B : function (){
|
||||
// Swatch internet time. code simply grabbed from ppk,
|
||||
// since I was feeling lazy:
|
||||
// http://www.xs4all.nl/~ppk/js/beat.html
|
||||
var off = (date.getTimezoneOffset() + 60)*60;
|
||||
var theSeconds = (date.getHours() * 3600) +
|
||||
(date.getMinutes() * 60) +
|
||||
date.getSeconds() + off;
|
||||
var beat = Math.floor(theSeconds/86.4);
|
||||
if (beat > 1000) beat -= 1000;
|
||||
if (beat < 0) beat += 1000;
|
||||
if ((String(beat)).length == 1) beat = "00"+beat;
|
||||
if ((String(beat)).length == 2) beat = "0"+beat;
|
||||
return beat;
|
||||
},
|
||||
|
||||
c : function () {
|
||||
// ISO 8601 date (e.g.: "2004-02-12T15:19:21+00:00"), as per
|
||||
// http://www.cl.cam.ac.uk/~mgk25/iso-time.html
|
||||
return (this.Y() + "-" + this.m() + "-" + this.d() + "T" +
|
||||
this.H() + ":" + this.i() + ":" + this.s() + this.P());
|
||||
},
|
||||
|
||||
d : function () {
|
||||
// Day of the month, 2 digits with leading zeros
|
||||
var j = String(this.j());
|
||||
return (j.length == 1 ? "0"+j : j);
|
||||
},
|
||||
|
||||
D : function () {
|
||||
// A textual representation of a day, three letters
|
||||
return daysShort[date.getDay()];
|
||||
},
|
||||
|
||||
F : function () {
|
||||
// A full textual representation of a month
|
||||
return monthsLong[date.getMonth()];
|
||||
},
|
||||
|
||||
g : function () {
|
||||
// 12-hour format of an hour without leading zeros, 1 through 12!
|
||||
if (date.getHours() == 0) {
|
||||
return 12;
|
||||
} else {
|
||||
return date.getHours()>12 ? date.getHours()-12 : date.getHours();
|
||||
}
|
||||
},
|
||||
|
||||
G : function () {
|
||||
// 24-hour format of an hour without leading zeros
|
||||
return date.getHours();
|
||||
},
|
||||
|
||||
h : function () {
|
||||
// 12-hour format of an hour with leading zeros
|
||||
var g = String(this.g());
|
||||
return (g.length == 1 ? "0"+g : g);
|
||||
},
|
||||
|
||||
H : function () {
|
||||
// 24-hour format of an hour with leading zeros
|
||||
var G = String(this.G());
|
||||
return (G.length == 1 ? "0"+G : G);
|
||||
},
|
||||
|
||||
i : function () {
|
||||
// Minutes with leading zeros
|
||||
var min = String (date.getMinutes ());
|
||||
return (min.length == 1 ? "0" + min : min);
|
||||
},
|
||||
|
||||
I : function () {
|
||||
// Whether or not the date is in daylight saving time (DST)
|
||||
// note that this has no bearing in actual DST mechanics,
|
||||
// and is just a pure guess. buyer beware.
|
||||
var noDST = new Date ("January 1 " + this.Y() + " 00:00:00");
|
||||
return (noDST.getTimezoneOffset () ==
|
||||
date.getTimezoneOffset () ? 0 : 1);
|
||||
},
|
||||
|
||||
j : function () {
|
||||
// Day of the month without leading zeros
|
||||
return date.getDate();
|
||||
},
|
||||
|
||||
l : function () {
|
||||
// A full textual representation of the day of the week
|
||||
return daysLong[date.getDay()];
|
||||
},
|
||||
|
||||
L : function () {
|
||||
// leap year or not. 1 if leap year, 0 if not.
|
||||
// the logic should match iso's 8601 standard.
|
||||
// http://www.uic.edu/depts/accc/software/isodates/leapyear.html
|
||||
var Y = this.Y();
|
||||
if (
|
||||
(Y % 4 == 0 && Y % 100 != 0) ||
|
||||
(Y % 4 == 0 && Y % 100 == 0 && Y % 400 == 0)
|
||||
) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
|
||||
m : function () {
|
||||
// Numeric representation of a month, with leading zeros
|
||||
var n = String(this.n());
|
||||
return (n.length == 1 ? "0"+n : n);
|
||||
},
|
||||
|
||||
M : function () {
|
||||
// A short textual representation of a month, three letters
|
||||
return monthsShort[date.getMonth()];
|
||||
},
|
||||
|
||||
n : function () {
|
||||
// Numeric representation of a month, without leading zeros
|
||||
return date.getMonth()+1;
|
||||
},
|
||||
|
||||
N : function () {
|
||||
// ISO-8601 numeric representation of the day of the week
|
||||
var w = this.w();
|
||||
return (w == 0 ? 7 : w);
|
||||
},
|
||||
|
||||
O : function () {
|
||||
// Difference to Greenwich time (GMT) in hours
|
||||
var os = Math.abs(date.getTimezoneOffset());
|
||||
var h = String(Math.floor(os/60));
|
||||
var m = String(os%60);
|
||||
h.length == 1? h = "0"+h:1;
|
||||
m.length == 1? m = "0"+m:1;
|
||||
return date.getTimezoneOffset() < 0 ? "+"+h+m : "-"+h+m;
|
||||
},
|
||||
|
||||
P : function () {
|
||||
// Difference to GMT, with colon between hours and minutes
|
||||
var O = this.O();
|
||||
return (O.substr(0, 3) + ":" + O.substr(3, 2));
|
||||
},
|
||||
|
||||
r : function () {
|
||||
// RFC 822 formatted date
|
||||
var r; // result
|
||||
// Thu , 21 Dec 2000
|
||||
r = this.D() + ", " + this.d() + " " + this.M() + " " + this.Y() +
|
||||
// 16 : 01 : 07 0200
|
||||
" " + this.H() + ":" + this.i() + ":" + this.s() + " " + this.O();
|
||||
return r;
|
||||
},
|
||||
|
||||
s : function () {
|
||||
// Seconds, with leading zeros
|
||||
var sec = String (date.getSeconds ());
|
||||
return (sec.length == 1 ? "0" + sec : sec);
|
||||
},
|
||||
|
||||
S : function () {
|
||||
// English ordinal suffix for the day of the month, 2 characters
|
||||
switch (date.getDate ()) {
|
||||
case 1: return ("st");
|
||||
case 2: return ("nd");
|
||||
case 3: return ("rd");
|
||||
case 21: return ("st");
|
||||
case 22: return ("nd");
|
||||
case 23: return ("rd");
|
||||
case 31: return ("st");
|
||||
default: return ("th");
|
||||
}
|
||||
},
|
||||
|
||||
t : function () {
|
||||
// thanks to Matt Bannon for some much needed code-fixes here!
|
||||
var daysinmonths = [null,31,28,31,30,31,30,31,31,30,31,30,31];
|
||||
if (this.L()==1 && this.n()==2) return 29; // ~leap day
|
||||
return daysinmonths[this.n()];
|
||||
},
|
||||
|
||||
U : function () {
|
||||
// Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)
|
||||
return Math.round(date.getTime()/1000);
|
||||
},
|
||||
|
||||
w : function () {
|
||||
// Numeric representation of the day of the week
|
||||
return date.getDay();
|
||||
},
|
||||
|
||||
W : function () {
|
||||
// Weeknumber, as per ISO specification:
|
||||
// http://www.cl.cam.ac.uk/~mgk25/iso-time.html
|
||||
|
||||
var DoW = this.N ();
|
||||
var DoY = this.z ();
|
||||
|
||||
// If the day is 3 days before New Year's Eve and is Thursday or earlier,
|
||||
// it's week 1 of next year.
|
||||
var daysToNY = 364 + this.L () - DoY;
|
||||
if (daysToNY <= 2 && DoW <= (3 - daysToNY)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// If the day is within 3 days after New Year's Eve and is Friday or later,
|
||||
// it belongs to the old year.
|
||||
if (DoY <= 2 && DoW >= 5) {
|
||||
return new Date (this.Y () - 1, 11, 31).formatDate ("W");
|
||||
}
|
||||
|
||||
var nyDoW = new Date (this.Y (), 0, 1).getDay ();
|
||||
nyDoW = nyDoW != 0 ? nyDoW - 1 : 6;
|
||||
|
||||
if (nyDoW <= 3) { // First day of the year is a Thursday or earlier
|
||||
return (1 + Math.floor ((DoY + nyDoW) / 7));
|
||||
} else { // First day of the year is a Friday or later
|
||||
return (1 + Math.floor ((DoY - (7 - nyDoW)) / 7));
|
||||
}
|
||||
},
|
||||
|
||||
y : function () {
|
||||
// A two-digit representation of a year
|
||||
var y = String(this.Y());
|
||||
return y.substring(y.length-2,y.length);
|
||||
},
|
||||
|
||||
Y : function () {
|
||||
// A full numeric representation of a year, 4 digits
|
||||
|
||||
// we first check, if getFullYear is supported. if it
|
||||
// is, we just use that. ppks code is nice, but won't
|
||||
// work with dates outside 1900-2038, or something like that
|
||||
if (date.getFullYear) {
|
||||
var newDate = new Date("January 1 2001 00:00:00 +0000");
|
||||
var x = newDate .getFullYear();
|
||||
if (x == 2001) {
|
||||
// i trust the method now
|
||||
return date.getFullYear();
|
||||
}
|
||||
}
|
||||
// else, do this:
|
||||
// codes thanks to ppk:
|
||||
// http://www.xs4all.nl/~ppk/js/introdate.html
|
||||
var x = date.getYear();
|
||||
var y = x % 100;
|
||||
y += (y < 38) ? 2000 : 1900;
|
||||
return y;
|
||||
},
|
||||
|
||||
|
||||
z : function () {
|
||||
// The day of the year, zero indexed! 0 through 366
|
||||
var s = "January 1 " + this.Y() + " 00:00:00 GMT" + this.O();
|
||||
var t = new Date(s);
|
||||
var diff = date.getTime() - t.getTime();
|
||||
return Math.floor(diff/1000/60/60/24);
|
||||
},
|
||||
|
||||
Z : function () {
|
||||
// Timezone offset in seconds
|
||||
return (date.getTimezoneOffset () * -60);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function getSwitch(str) {
|
||||
if (switches[str] != undefined) {
|
||||
return switches[str]();
|
||||
} else {
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
||||
var date;
|
||||
if (time) {
|
||||
var date = new Date (time);
|
||||
} else {
|
||||
var date = this;
|
||||
}
|
||||
|
||||
var formatString = input.split("");
|
||||
var i = 0;
|
||||
while (i < formatString.length) {
|
||||
if (formatString[i] == "%") {
|
||||
// this is our way of allowing users to escape stuff
|
||||
formatString.splice(i,1);
|
||||
} else {
|
||||
formatString[i] = getSwitch(formatString[i]);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
return formatString.join("");
|
||||
}
|
||||
|
||||
|
||||
// Some (not all) predefined format strings from PHP 5.1.1, which
|
||||
// offer standard date representations.
|
||||
// See: http://www.php.net/manual/en/ref.datetime.php#datetime.constants
|
||||
//
|
||||
|
||||
// Atom "2005-08-15T15:52:01+00:00"
|
||||
Date.DATE_ATOM = "Y-m-d%TH:i:sP";
|
||||
// ISO-8601 "2005-08-15T15:52:01+0000"
|
||||
Date.DATE_ISO8601 = "Y-m-d%TH:i:sO";
|
||||
// RFC 2822 "Mon, 15 Aug 2005 15:52:01 +0000"
|
||||
Date.DATE_RFC2822 = "D, d M Y H:i:s O";
|
||||
// W3C "2005-08-15 15:52:01+00:00"
|
||||
Date.DATE_W3C = "Y-m-d%TH:i:sP";
|
|
@ -0,0 +1 @@
|
|||
Date.prototype.formatDate=function(input,time){var daysLong=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var daysShort=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];var monthsShort=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var monthsLong=["January","February","March","April","May","June","July","August","September","October","November","December"];var switches={a:function(){return date.getHours()>11?"pm":"am"},A:function(){return this.a().toUpperCase()},B:function(){var off=(date.getTimezoneOffset()+60)*60;var theSeconds=date.getHours()*3600+date.getMinutes()*60+date.getSeconds()+off;var beat=Math.floor(theSeconds/86.4);if(beat>1e3)beat-=1e3;if(beat<0)beat+=1e3;if(String(beat).length==1)beat="00"+beat;if(String(beat).length==2)beat="0"+beat;return beat},c:function(){return this.Y()+"-"+this.m()+"-"+this.d()+"T"+this.H()+":"+this.i()+":"+this.s()+this.P()},d:function(){var j=String(this.j());return j.length==1?"0"+j:j},D:function(){return daysShort[date.getDay()]},F:function(){return monthsLong[date.getMonth()]},g:function(){if(date.getHours()==0){return 12}else{return date.getHours()>12?date.getHours()-12:date.getHours()}},G:function(){return date.getHours()},h:function(){var g=String(this.g());return g.length==1?"0"+g:g},H:function(){var G=String(this.G());return G.length==1?"0"+G:G},i:function(){var min=String(date.getMinutes());return min.length==1?"0"+min:min},I:function(){var noDST=new Date("January 1 "+this.Y()+" 00:00:00");return noDST.getTimezoneOffset()==date.getTimezoneOffset()?0:1},j:function(){return date.getDate()},l:function(){return daysLong[date.getDay()]},L:function(){var Y=this.Y();if(Y%4==0&&Y%100!=0||Y%4==0&&Y%100==0&&Y%400==0){return 1}else{return 0}},m:function(){var n=String(this.n());return n.length==1?"0"+n:n},M:function(){return monthsShort[date.getMonth()]},n:function(){return date.getMonth()+1},N:function(){var w=this.w();return w==0?7:w},O:function(){var os=Math.abs(date.getTimezoneOffset());var h=String(Math.floor(os/60));var m=String(os%60);h.length==1?h="0"+h:1;m.length==1?m="0"+m:1;return date.getTimezoneOffset()<0?"+"+h+m:"-"+h+m},P:function(){var O=this.O();return O.substr(0,3)+":"+O.substr(3,2)},r:function(){var r;r=this.D()+", "+this.d()+" "+this.M()+" "+this.Y()+" "+this.H()+":"+this.i()+":"+this.s()+" "+this.O();return r},s:function(){var sec=String(date.getSeconds());return sec.length==1?"0"+sec:sec},S:function(){switch(date.getDate()){case 1:return"st";case 2:return"nd";case 3:return"rd";case 21:return"st";case 22:return"nd";case 23:return"rd";case 31:return"st";default:return"th"}},t:function(){var daysinmonths=[null,31,28,31,30,31,30,31,31,30,31,30,31];if(this.L()==1&&this.n()==2)return 29;return daysinmonths[this.n()]},U:function(){return Math.round(date.getTime()/1e3)},w:function(){return date.getDay()},W:function(){var DoW=this.N();var DoY=this.z();var daysToNY=364+this.L()-DoY;if(daysToNY<=2&&DoW<=3-daysToNY){return 1}if(DoY<=2&&DoW>=5){return new Date(this.Y()-1,11,31).formatDate("W")}var nyDoW=new Date(this.Y(),0,1).getDay();nyDoW=nyDoW!=0?nyDoW-1:6;if(nyDoW<=3){return 1+Math.floor((DoY+nyDoW)/7)}else{return 1+Math.floor((DoY-(7-nyDoW))/7)}},y:function(){var y=String(this.Y());return y.substring(y.length-2,y.length)},Y:function(){if(date.getFullYear){var newDate=new Date("January 1 2001 00:00:00 +0000");var x=newDate.getFullYear();if(x==2001){return date.getFullYear()}}var x=date.getYear();var y=x%100;y+=y<38?2e3:1900;return y},z:function(){var s="January 1 "+this.Y()+" 00:00:00 GMT"+this.O();var t=new Date(s);var diff=date.getTime()-t.getTime();return Math.floor(diff/1e3/60/60/24)},Z:function(){return date.getTimezoneOffset()*-60}};function getSwitch(str){if(switches[str]!=undefined){return switches[str]()}else{return str}}var date;if(time){var date=new Date(time)}else{var date=this}var formatString=input.split("");var i=0;while(i<formatString.length){if(formatString[i]=="%"){formatString.splice(i,1)}else{formatString[i]=getSwitch(formatString[i])}i++}return formatString.join("")};Date.DATE_ATOM="Y-m-d%TH:i:sP";Date.DATE_ISO8601="Y-m-d%TH:i:sO";Date.DATE_RFC2822="D, d M Y H:i:s O";Date.DATE_W3C="Y-m-d%TH:i:sP";
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,42 @@
|
|||
/* Client-side access to querystring name=value pairs
|
||||
Version 1.3
|
||||
28 May 2008
|
||||
|
||||
License (Simplified BSD):
|
||||
http://adamv.com/dev/javascript/qslicense.txt
|
||||
*/
|
||||
function Querystring(qs) { // optionally pass a querystring to parse
|
||||
this.params = {};
|
||||
|
||||
var query_string = window.location.search;
|
||||
|
||||
if (qs == null) qs = query_string.substring(1, query_string.length);
|
||||
if (qs.length == 0) return;
|
||||
|
||||
// Turn <plus> back to <space>
|
||||
// See: http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.4.1
|
||||
qs = qs.replace(/\+/g, ' ');
|
||||
var args = qs.split('&'); // parse out name/value pairs separated via &
|
||||
|
||||
// split out each name=value pair
|
||||
for (var i = 0; i < args.length; i++) {
|
||||
var pair = args[i].split('=');
|
||||
var name = decodeURIComponent(pair[0]);
|
||||
|
||||
var value = (pair.length==2)
|
||||
? decodeURIComponent(pair[1])
|
||||
: name;
|
||||
|
||||
this.params[name] = value;
|
||||
}
|
||||
}
|
||||
|
||||
Querystring.prototype.get = function(key, default_) {
|
||||
var value = this.params[key];
|
||||
return (value != null) ? value : default_;
|
||||
}
|
||||
|
||||
Querystring.prototype.contains = function(key) {
|
||||
var value = this.params[key];
|
||||
return (value != null);
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
function Querystring(qs){this.params={};var query_string=window.location.search;if(qs==null)qs=query_string.substring(1,query_string.length);if(qs.length==0)return;qs=qs.replace(/\+/g," ");var args=qs.split("&");for(var i=0;i<args.length;i++){var pair=args[i].split("=");var name=decodeURIComponent(pair[0]);var value=pair.length==2?decodeURIComponent(pair[1]):name;this.params[name]=value}}Querystring.prototype.get=function(key,default_){var value=this.params[key];return value!=null?value:default_};Querystring.prototype.contains=function(key){var value=this.params[key];return value!=null};
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,67 @@
|
|||
<TMPL_INCLUDE NAME="partial/head.tmpl" />
|
||||
|
||||
<!--
|
||||
File: munin-categoryview.tmpl
|
||||
|
||||
Used: Category level template
|
||||
-->
|
||||
<TMPL_IF NAME="TIMEDAY"><!-- DAY! --></TMPL_IF>
|
||||
<TMPL_LOOP NAME="SERVICES">
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<TMPL_VAR ESCAPE="HTML" NAME="NAME">
|
||||
</div>
|
||||
<div class="card-body row">
|
||||
<TMPL_LOOP NAME="GRAPHS">
|
||||
<div class="col-md-6 mb-3">
|
||||
<div class="text-left pl-2">
|
||||
◿
|
||||
<TMPL_LOOP NAME="PATH">
|
||||
<TMPL_IF NAME="PATHNAME">
|
||||
<TMPL_IF NAME="PATH">
|
||||
<TMPL_VAR NAME="PATHNAME"><br /><span class="hangindent<TMPL_VAR NAME='__counter__' />">◿</span>
|
||||
</TMPL_IF>
|
||||
</TMPL_IF>
|
||||
</TMPL_LOOP>
|
||||
<TMPL_IF NAME="URLX">
|
||||
<a <TMPL_IF NAME="STATE_WARNING">class="warn"</TMPL_IF>
|
||||
<TMPL_IF NAME="STATE_CRITICAL">class="crit"</TMPL_IF> href="<TMPL_VAR NAME='URLX' />">
|
||||
</TMPL_IF>
|
||||
<TMPL_VAR ESCAPE="HTML" NAME="LABEL" />
|
||||
<TMPL_IF NAME="URLX"></a></TMPL_IF>
|
||||
</div>
|
||||
<TMPL_IF NAME="URLX">
|
||||
<a href="<TMPL_VAR NAME='URLX' />">
|
||||
</TMPL_IF>
|
||||
|
||||
<TMPL_IF NAME="TIMEDAY">
|
||||
<img data-src="<TMPL_VAR NAME='CIMGDAY' />" alt="<TMPL_VAR ESCAPE='HTML' NAME='LABEL' />" class="lazyload img-fluid card-img-top i<TMPL_IF NAME='STATE_WARNING'> warn</TMPL_IF><TMPL_IF NAME='STATE_CRITICAL'> crit</TMPL_IF>"
|
||||
<TMPL_IF NAME="IMGDAYWIDTH">width="<TMPL_VAR NAME='IMGDAYWIDTH' />" </TMPL_IF>
|
||||
<TMPL_IF NAME="IMGDAYHEIGHT">height="<TMPL_VAR NAME='IMGDAYHEIGHT' />"</TMPL_IF>/>
|
||||
</TMPL_IF>
|
||||
<TMPL_IF NAME="TIMEWEEK">
|
||||
<img data-src="<TMPL_VAR NAME='CIMGWEEK'>" alt="<TMPL_VAR ESCAPE='HTML' NAME='LABEL' />" class="lazyload img-fluid card-img-top i<TMPL_IF NAME='STATE_WARNING'> warn</TMPL_IF><TMPL_IF NAME='STATE_CRITICAL'> crit</TMPL_IF>"
|
||||
<TMPL_IF NAME="IMGWEEKWIDTH">width="<TMPL_VAR NAME='IMGWEEKWIDTH' />" </TMPL_IF>
|
||||
<TMPL_IF NAME="IMGWEEKHEIGHT">height="<TMPL_VAR NAME='IMGWEEKHEIGHT' />"</TMPL_IF>/>
|
||||
</TMPL_IF>
|
||||
<TMPL_IF NAME="TIMEMONTH">
|
||||
<img data-src="<TMPL_VAR NAME='CIMGMONTH'>" alt="<TMPL_VAR ESCAPE='HTML' NAME='LABEL' />" class="lazyload img-fluid card-img-top i<TMPL_IF NAME='STATE_WARNING'> warn</TMPL_IF><TMPL_IF NAME='STATE_CRITICAL'> crit</TMPL_IF>"
|
||||
<TMPL_IF NAME="IMGMONTHWIDTH">width="<TMPL_VAR NAME='IMGMONTHWIDTH' />" </TMPL_IF>
|
||||
<TMPL_IF NAME="IMGMONTHHEIGHT">height="<TMPL_VAR NAME='IMGMONTHHEIGHT' />"</TMPL_IF>/>
|
||||
</TMPL_IF>
|
||||
<TMPL_IF NAME="TIMEYEAR">
|
||||
<img data-src="<TMPL_VAR NAME='CIMGYEAR'>" alt="<TMPL_VAR ESCAPE='HTML' NAME='LABEL' />" class="lazyload img-fluid card-img-top i<TMPL_IF NAME='STATE_WARNING'> warn</TMPL_IF><TMPL_IF NAME='STATE_CRITICAL'> crit</TMPL_IF>"
|
||||
<TMPL_IF NAME="IMGYEARWIDTH">width="<TMPL_VAR NAME='IMGYEARWIDTH' />" </TMPL_IF>
|
||||
<TMPL_IF NAME="IMGYEARHEIGHT">height="<TMPL_VAR NAME='IMGYEARHEIGHT' />"</TMPL_IF>/>
|
||||
</TMPL_IF>
|
||||
|
||||
<TMPL_IF NAME="URLX"></a></TMPL_IF>
|
||||
|
||||
</div>
|
||||
</TMPL_LOOP>
|
||||
</div>
|
||||
</div>
|
||||
</TMPL_LOOP>
|
||||
|
||||
<TMPL_INCLUDE NAME="partial/footer_pre.tmpl" />
|
||||
<TMPL_INCLUDE NAME="partial/footer.tmpl" />
|
|
@ -0,0 +1,50 @@
|
|||
<TMPL_INCLUDE NAME="partial/head.tmpl" />
|
||||
|
||||
<h2 class="mb-3">Comparison: by day</h2>
|
||||
|
||||
<TMPL_INCLUDE NAME="partial/compare_navigation.tmpl" />
|
||||
|
||||
<!--
|
||||
File: munin-comparison-day.tmpl
|
||||
|
||||
Used: top level comparison template.
|
||||
-->
|
||||
|
||||
<TMPL_LOOP NAME="CATEGORIES">
|
||||
<div class="card mb-3">
|
||||
<div class="dropdown-toggle card-header" id="<TMPL_VAR ESCAPE='HTML' NAME='GROUPNAME' />" data-toggle="collapse" href="#<TMPL_VAR ESCAPE='HTML' NAME='GROUPNAME' />_coll">
|
||||
Category :: <TMPL_VAR ESCAPE="HTML" NAME="GROUPNAME" />
|
||||
</div>
|
||||
<ul id="<TMPL_VAR ESCAPE='HTML' NAME='GROUPNAME' />_coll" class="card-collapse collapse list-group list-group-flush">
|
||||
<TMPL_LOOP NAME="SERVICES">
|
||||
<li class="list-group-item">
|
||||
<div class="row">
|
||||
<TMPL_LOOP NAME="NODES">
|
||||
<TMPL_IF NAME="CIMGDAY">
|
||||
<div class="col-md-6">
|
||||
<a href="<TMPL_VAR ESCAPE='URL' NAME='NODENAME'>/index.html"><TMPL_VAR ESCAPE="HTML" NAME="NODENAME" /></a>
|
||||
>
|
||||
<TMPL_IF NAME="URL1"><a <TMPL_IF NAME="STATE_WARNING">class="warn"</TMPL_IF>
|
||||
<TMPL_IF NAME="STATE_CRITICAL">class="crit"</TMPL_IF> href="<TMPL_VAR NAME='R_PATH' />/<TMPL_VAR NAME='URL' />">
|
||||
</TMPL_IF>
|
||||
<TMPL_VAR ESCAPE="HTML" NAME="LABEL" />
|
||||
<TMPL_IF NAME="URL1"></a></TMPL_IF>
|
||||
<br/>
|
||||
<a href="<TMPL_VAR NAME='R_PATH' />/<TMPL_VAR NAME='URL' />">
|
||||
<img src="<TMPL_VAR NAME='CIMGDAY' />" alt="<TMPL_VAR ESCAPE='HTML' NAME='LABEL' />"
|
||||
class="img-fluid i<TMPL_IF NAME='STATE_WARNING'> warn</TMPL_IF><TMPL_IF NAME='STATE_CRITICAL'> crit</TMPL_IF>"
|
||||
<TMPL_IF NAME='IMGDAYWIDTH'>width="<TMPL_VAR NAME='IMGDAYWIDTH' />" </TMPL_IF>
|
||||
<TMPL_IF NAME='IMGDAYHEIGHT'>height="<TMPL_VAR NAME='IMGDAYHEIGHT' />"</TMPL_IF>/>
|
||||
</a>
|
||||
</div>
|
||||
</TMPL_IF>
|
||||
</TMPL_LOOP> <!-- END NODE PER SERVICE PER CATEGORY -->
|
||||
</div>
|
||||
</li>
|
||||
</TMPL_LOOP> <!-- END SERVICE PER CATEGORY -->
|
||||
</ul>
|
||||
</div>
|
||||
</TMPL_LOOP> <!-- END CATEGORY -->
|
||||
|
||||
<TMPL_INCLUDE NAME="partial/footer_pre.tmpl" />
|
||||
<TMPL_INCLUDE NAME="partial/footer.tmpl" />
|
|
@ -0,0 +1,50 @@
|
|||
<TMPL_INCLUDE NAME="partial/head.tmpl" />
|
||||
|
||||
<h2 class="mb-3">Comparison: by month</h2>
|
||||
|
||||
<TMPL_INCLUDE NAME="partial/compare_navigation.tmpl" />
|
||||
|
||||
<!--
|
||||
File: munin-comparison-monthy.tmpl
|
||||
|
||||
Used: top level comparison template.
|
||||
-->
|
||||
|
||||
<TMPL_LOOP NAME="CATEGORIES">
|
||||
<div class="card mb-3">
|
||||
<div class="dropdown-toggle card-header" id="<TMPL_VAR ESCAPE='HTML' NAME='GROUPNAME' />" data-toggle="collapse" href="#<TMPL_VAR ESCAPE='HTML' NAME='GROUPNAME' />_coll">
|
||||
Category :: <TMPL_VAR ESCAPE="HTML" NAME="GROUPNAME" />
|
||||
</div>
|
||||
<ul id="<TMPL_VAR ESCAPE='HTML' NAME='GROUPNAME' />_coll" class="card-collapse collapse list-group list-group-flush">
|
||||
<TMPL_LOOP NAME="SERVICES">
|
||||
<li class="list-group-item">
|
||||
<div class="row">
|
||||
<TMPL_LOOP NAME="NODES">
|
||||
<TMPL_IF NAME="CIMGMONTH">
|
||||
<div class="col-md-6">
|
||||
<a href="<TMPL_VAR ESCAPE='URL' NAME='NODENAME'>/index.html"><TMPL_VAR ESCAPE="HTML" NAME="NODENAME" /></a>
|
||||
>
|
||||
<TMPL_IF NAME="URL1"><a <TMPL_IF NAME="STATE_WARNING">class="warn"</TMPL_IF>
|
||||
<TMPL_IF NAME="STATE_CRITICAL">class="crit"</TMPL_IF> href="<TMPL_VAR NAME='R_PATH' />/<TMPL_VAR NAME='URL' />">
|
||||
</TMPL_IF>
|
||||
<TMPL_VAR ESCAPE="HTML" NAME="LABEL" />
|
||||
<TMPL_IF NAME="URL1"></a></TMPL_IF>
|
||||
<br/>
|
||||
<a href="<TMPL_VAR NAME='R_PATH' />/<TMPL_VAR NAME='URL' />">
|
||||
<img src="<TMPL_VAR NAME='CIMGMONTH' />" alt="<TMPL_VAR ESCAPE='HTML' NAME='LABEL' />"
|
||||
class="img-fluid i<TMPL_IF NAME='STATE_WARNING'> warn</TMPL_IF><TMPL_IF NAME='STATE_CRITICAL'> crit</TMPL_IF>"
|
||||
<TMPL_IF NAME='IMGMONTHWIDTH'>width="<TMPL_VAR NAME='IMGMONTHWIDTH' />" </TMPL_IF>
|
||||
<TMPL_IF NAME='IMGMONTHHEIGHT'>height="<TMPL_VAR NAME='IMGMONTHHEIGHT' />"</TMPL_IF>/>
|
||||
</a>
|
||||
</div>
|
||||
</TMPL_IF>
|
||||
</TMPL_LOOP> <!-- END NODE PER SERVICE PER CATEGORY -->
|
||||
</div>
|
||||
</li>
|
||||
</TMPL_LOOP> <!-- END SERVICE PER CATEGORY -->
|
||||
</ul>
|
||||
</div>
|
||||
</TMPL_LOOP> <!-- END CATEGORY -->
|
||||
|
||||
<TMPL_INCLUDE NAME="partial/footer_pre.tmpl" />
|
||||
<TMPL_INCLUDE NAME="partial/footer.tmpl" />
|
|
@ -0,0 +1,50 @@
|
|||
<TMPL_INCLUDE NAME="partial/head.tmpl" />
|
||||
|
||||
<h2 class="mb-3">Comparison: by week</h2>
|
||||
|
||||
<TMPL_INCLUDE NAME="partial/compare_navigation.tmpl" />
|
||||
|
||||
<!--
|
||||
File: munin-comparison-week.tmpl
|
||||
|
||||
Used: top level comparison template.
|
||||
-->
|
||||
|
||||
<TMPL_LOOP NAME="CATEGORIES">
|
||||
<div class="card mb-3">
|
||||
<div class="dropdown-toggle card-header" id="<TMPL_VAR ESCAPE='HTML' NAME='GROUPNAME' />" data-toggle="collapse" href="#<TMPL_VAR ESCAPE='HTML' NAME='GROUPNAME' />_coll">
|
||||
Category :: <TMPL_VAR ESCAPE="HTML" NAME="GROUPNAME" />
|
||||
</div>
|
||||
<ul id="<TMPL_VAR ESCAPE='HTML' NAME='GROUPNAME' />_coll" class="card-collapse collapse list-group list-group-flush">
|
||||
<TMPL_LOOP NAME="SERVICES">
|
||||
<li class="list-group-item">
|
||||
<div class="row">
|
||||
<TMPL_LOOP NAME="NODES">
|
||||
<TMPL_IF NAME="CIMGWEEK">
|
||||
<div class="col-md-6">
|
||||
<a href="<TMPL_VAR ESCAPE='URL' NAME='NODENAME'>/index.html"><TMPL_VAR ESCAPE="HTML" NAME="NODENAME" /></a>
|
||||
>
|
||||
<TMPL_IF NAME="URL1"><a <TMPL_IF NAME="STATE_WARNING">class="warn"</TMPL_IF>
|
||||
<TMPL_IF NAME="STATE_CRITICAL">class="crit"</TMPL_IF> href="<TMPL_VAR NAME='R_PATH' />/<TMPL_VAR NAME='URL' />">
|
||||
</TMPL_IF>
|
||||
<TMPL_VAR ESCAPE="HTML" NAME="LABEL" />
|
||||
<TMPL_IF NAME="URL1"></a></TMPL_IF>
|
||||
<br/>
|
||||
<a href="<TMPL_VAR NAME='R_PATH' />/<TMPL_VAR NAME='URL' />">
|
||||
<img src="<TMPL_VAR NAME='CIMGWEEK' />" alt="<TMPL_VAR ESCAPE='HTML' NAME='LABEL' />"
|
||||
class="img-fluid i<TMPL_IF NAME='STATE_WARNING'> warn</TMPL_IF><TMPL_IF NAME='STATE_CRITICAL'> crit</TMPL_IF>"
|
||||
<TMPL_IF NAME='IMGWEEKWIDTH'>width="<TMPL_VAR NAME='IMGWEEKWIDTH' />" </TMPL_IF>
|
||||
<TMPL_IF NAME='IMGWEEKHEIGHT'>height="<TMPL_VAR NAME='IMGWEEKHEIGHT' />"</TMPL_IF>/>
|
||||
</a>
|
||||
</div>
|
||||
</TMPL_IF>
|
||||
</TMPL_LOOP> <!-- END NODE PER SERVICE PER CATEGORY -->
|
||||
</div>
|
||||
</li>
|
||||
</TMPL_LOOP> <!-- END SERVICE PER CATEGORY -->
|
||||
</ul>
|
||||
</div>
|
||||
</TMPL_LOOP> <!-- END CATEGORY -->
|
||||
|
||||
<TMPL_INCLUDE NAME="partial/footer_pre.tmpl" />
|
||||
<TMPL_INCLUDE NAME="partial/footer.tmpl" />
|
|
@ -0,0 +1,50 @@
|
|||
<TMPL_INCLUDE NAME="partial/head.tmpl" />
|
||||
|
||||
<h2 class="mb-3">Comparison: by year</h2>
|
||||
|
||||
<TMPL_INCLUDE NAME="partial/compare_navigation.tmpl" />
|
||||
|
||||
<!--
|
||||
File: munin-comparison-year.tmpl
|
||||
|
||||
Used: top level comparison template.
|
||||
-->
|
||||
|
||||
<TMPL_LOOP NAME="CATEGORIES">
|
||||
<div class="card mb-3">
|
||||
<div class="dropdown-toggle card-header" id="<TMPL_VAR ESCAPE='HTML' NAME='GROUPNAME' />" data-toggle="collapse" href="#<TMPL_VAR ESCAPE='HTML' NAME='GROUPNAME' />_coll">
|
||||
Category :: <TMPL_VAR ESCAPE="HTML" NAME="GROUPNAME" />
|
||||
</div>
|
||||
<ul id="<TMPL_VAR ESCAPE='HTML' NAME='GROUPNAME' />_coll" class="card-collapse collapse list-group list-group-flush">
|
||||
<TMPL_LOOP NAME="SERVICES">
|
||||
<li class="list-group-item">
|
||||
<div class="row">
|
||||
<TMPL_LOOP NAME="NODES">
|
||||
<TMPL_IF NAME="CIMGYEAR">
|
||||
<div class="col-md-6">
|
||||
<a href="<TMPL_VAR ESCAPE='URL' NAME='NODENAME'>/index.html"><TMPL_VAR ESCAPE="HTML" NAME="NODENAME" /></a>
|
||||
>
|
||||
<TMPL_IF NAME="URL1"><a <TMPL_IF NAME="STATE_WARNING">class="warn"</TMPL_IF>
|
||||
<TMPL_IF NAME="STATE_CRITICAL">class="crit"</TMPL_IF> href="<TMPL_VAR NAME='R_PATH' />/<TMPL_VAR NAME='URL' />">
|
||||
</TMPL_IF>
|
||||
<TMPL_VAR ESCAPE="HTML" NAME="LABEL" />
|
||||
<TMPL_IF NAME="URL1"></a></TMPL_IF>
|
||||
<br/>
|
||||
<a href="<TMPL_VAR NAME='R_PATH' />/<TMPL_VAR NAME='URL' />">
|
||||
<img src="<TMPL_VAR NAME='CIMGYEAR' />" alt="<TMPL_VAR ESCAPE='HTML' NAME='LABEL' />"
|
||||
class="img-fluid i<TMPL_IF NAME='STATE_WARNING'> warn</TMPL_IF><TMPL_IF NAME='STATE_CRITICAL'> crit</TMPL_IF>"
|
||||
<TMPL_IF NAME='IMGYEARWIDTH'>width="<TMPL_VAR NAME='IMGYEARWIDTH' />" </TMPL_IF>
|
||||
<TMPL_IF NAME='IMGYEARHEIGHT'>height="<TMPL_VAR NAME='IMGYEARHEIGHT' />"</TMPL_IF>/>
|
||||
</a>
|
||||
</div>
|
||||
</TMPL_IF>
|
||||
</TMPL_LOOP> <!-- END NODE PER SERVICE PER CATEGORY -->
|
||||
</div>
|
||||
</li>
|
||||
</TMPL_LOOP> <!-- END SERVICE PER CATEGORY -->
|
||||
</ul>
|
||||
</div>
|
||||
</TMPL_LOOP> <!-- END CATEGORY -->
|
||||
|
||||
<TMPL_INCLUDE NAME="partial/footer_pre.tmpl" />
|
||||
<TMPL_INCLUDE NAME="partial/footer.tmpl" />
|
|
@ -0,0 +1,112 @@
|
|||
<TMPL_INCLUDE NAME="partial/head.tmpl" />
|
||||
|
||||
<!--
|
||||
File: munin-domainview.tmpl
|
||||
|
||||
Used: Host Group top level template
|
||||
-->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.custom-collapse').on('click', function() {
|
||||
$(this).parent().find('.collapse').collapse('toggle');
|
||||
return false;
|
||||
});
|
||||
$('.custom-collapse-all').on('click', function() {
|
||||
if ( $(this).hasClass('all-hide') ) {
|
||||
$(this).parent().parent().find('.collapse').collapse('hide');
|
||||
} else {
|
||||
$(this).parent().parent().find('.collapse').collapse('show');
|
||||
}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="btn-group w-100 mb-3">
|
||||
<a href="#" class="custom-collapse-all btn btn-sm btn-outline-secondary all-show">▶ Show All</a>
|
||||
<a href="#" class="custom-collapse-all btn btn-sm btn-outline-secondary all-hide">▼ Hide All</a>
|
||||
</div>
|
||||
<TMPL_LOOP NAME="GROUPS">
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<!-- NAME - FIRST LEVEL -->
|
||||
<a href="<TMPL_VAR NAME='URLX' />"><TMPL_VAR ESCAPE="HTML" NAME="NAME" /></a>
|
||||
<a href="#" class="custom-collapse-all float-right all-hide">▼ Hide All</a>
|
||||
<a href="#" class="custom-collapse-all float-right all-show">▶ Show All</a>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<ul class="list-unstyled">
|
||||
<!-- CATEGORY LOOP - FIRST LEVEL -->
|
||||
<TMPL_IF NAME="NCATEGORIES">
|
||||
<TMPL_LOOP NAME="CATEGORIES">
|
||||
<li class="mb-2">
|
||||
<a href="#" class="custom-collapse">▶▼</a>
|
||||
<a href="<TMPL_VAR NAME='URLX' />"><TMPL_VAR ESCAPE="HTML" NAME="NAME" /></a>
|
||||
<ul class="collapse show ml-4">
|
||||
<TMPL_LOOP NAME="SERVICES">
|
||||
<li><a <TMPL_IF NAME="STATE_WARNING">class="text-warning"</TMPL_IF> <TMPL_IF NAME="STATE_CRITICAL">class="text-danger"</TMPL_IF> href="<TMPL_VAR NAME='URLX'>"><TMPL_VAR ESCAPE="HTML" NAME="NAME" /></a></li>
|
||||
</TMPL_LOOP>
|
||||
</ul>
|
||||
</li>
|
||||
</TMPL_LOOP>
|
||||
</TMPL_IF>
|
||||
|
||||
<TMPL_IF NAME="NGROUPS">
|
||||
<!-- GROUPS ARE HERE - POPULAR EXAMPLE, MULTIGRAPH -->
|
||||
<TMPL_LOOP NAME="GROUPS">
|
||||
<li class="mb-2">
|
||||
<a href="#" class="custom-collapse">▶▼</a>
|
||||
<a href="<TMPL_VAR NAME='URLX' />"><TMPL_VAR ESCAPE="HTML" NAME="NAME" /></a>
|
||||
<ul class="collapse show ml-4">
|
||||
<TMPL_IF NAME="NCATEGORIES">
|
||||
<TMPL_LOOP NAME="CATEGORIES">
|
||||
<li>
|
||||
<a href="<TMPL_VAR NAME='URLX' />"><TMPL_VAR ESCAPE="HTML" NAME="NAME" /></a>
|
||||
<ul>
|
||||
<TMPL_LOOP NAME="SERVICES">
|
||||
<li><a <TMPL_IF NAME="STATE_WARNING">class="text-warning"</TMPL_IF> <TMPL_IF NAME="STATE_CRITICAL">class="text-danger"</TMPL_IF> href="<TMPL_VAR NAME="URLX">"><TMPL_VAR ESCAPE="HTML" NAME="NAME" /></a></li>
|
||||
</TMPL_LOOP>
|
||||
</ul>
|
||||
</li>
|
||||
</TMPL_LOOP>
|
||||
</TMPL_IF>
|
||||
<TMPL_IF NAME="NGROUPS">
|
||||
<!-- A/N: I DON'T KNOW WHEN THESE ARE USED - PLEASE SEND A SCREENCAP -->
|
||||
<TMPL_LOOP NAME="GROUPS">
|
||||
<li>
|
||||
<a href="<TMPL_VAR NAME='URLX' />"><TMPL_VAR ESCAPE="HTML" NAME="NAME" /></a>
|
||||
<ul>
|
||||
<TMPL_IF NAME="NCATEGORIES">
|
||||
<TMPL_LOOP NAME="CATEGORIES">
|
||||
<li>
|
||||
<a href="<TMPL_VAR NAME='URLX' />"><TMPL_VAR ESCAPE="HTML" NAME="NAME" /></a>
|
||||
<ul>
|
||||
<TMPL_LOOP NAME="SERVICES">
|
||||
<li><a <TMPL_IF NAME="STATE_WARNING">class="text-warning"</TMPL_IF> <TMPL_IF NAME="STATE_CRITICAL">class="text-danger"</TMPL_IF> href="<TMPL_VAR NAME='URLX' />"><TMPL_VAR ESCAPE="HTML" NAME="NAME" /></a></li>
|
||||
</TMPL_LOOP><!-- END SERVICES -->
|
||||
</ul>
|
||||
</li>
|
||||
</TMPL_LOOP><!-- END CATEGORIES -->
|
||||
</TMPL_IF>
|
||||
<TMPL_IF NAME="NGROUPS">
|
||||
</TMPL_IF>
|
||||
</ul>
|
||||
</li>
|
||||
</TMPL_LOOP><!-- END GROUPS Listing level 3 -->
|
||||
</TMPL_IF><!-- END NGROUPS level 3 -->
|
||||
</ul>
|
||||
</li>
|
||||
</TMPL_LOOP><!-- END GROUPS Listing level 2 -->
|
||||
</TMPL_IF><!-- END NGROUPS level 2 -->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</TMPL_LOOP> <!-- List Level 1 -->
|
||||
|
||||
|
||||
<div class="contentpusher"></div>
|
||||
|
||||
|
||||
<TMPL_INCLUDE NAME="partial/footer_pre.tmpl" />
|
||||
<TMPL_INCLUDE NAME="partial/footer.tmpl" />
|
|
@ -0,0 +1,171 @@
|
|||
<TMPL_INCLUDE NAME="partial/head.tmpl" />
|
||||
<!--
|
||||
File: munin-nodeview.tmpl
|
||||
|
||||
Used: Individual Host View top level template / Multigraph also hits here.
|
||||
-->
|
||||
|
||||
<div class="btn-group w-100 mt-2">
|
||||
<a href="#" class="graph-click btn btn-outline-success w-25" data-gset="day">Day <span class='gset-state'>Shown</span></a>
|
||||
<a href="#" class="graph-click btn btn-outline-success w-25" data-gset="week">Week <span class='gset-state'>Shown</span></a>
|
||||
<a href="#" class="graph-click btn btn-outline-secondary w-25" data-gset="month">Month <span class='gset-state'>Hidden</span></a>
|
||||
<a href="#" class="graph-click btn btn-outline-secondary w-25" data-gset="year">Year <span class='gset-state'>Hidden</span></a>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function (){
|
||||
// Should we auto-scroll when a service category is opened?
|
||||
window.doScroll = false;
|
||||
// Store display status of graph periods
|
||||
window.gsets = {
|
||||
"day" : true,
|
||||
"week" : true,
|
||||
"month" : false,
|
||||
"year" : false
|
||||
};
|
||||
|
||||
$('.graph-click').on('click', function(){
|
||||
// This shows / hides graph periods.
|
||||
var gset = $(this).data("gset");
|
||||
var newState = ! gsets[gset];
|
||||
gsets[gset] = newState;
|
||||
$(this)
|
||||
.toggleClass("btn-outline-success btn-outline-secondary")
|
||||
.find(".gset-state")
|
||||
.text((newState ? "Shown" : "Hidden"));
|
||||
$('.graph-' + gset).toggleClass("d-none");
|
||||
return false;
|
||||
});
|
||||
$('.tab-click').on('click', function() {
|
||||
window.doScroll = true; // Do scroll when we click a tab header
|
||||
var theCollapse = '#' + $(this).data("target") + "_coll";
|
||||
|
||||
if ( $(theCollapse).hasClass('show') ) {
|
||||
// Already open, lets just trigger the event.
|
||||
$(theCollapse).trigger('shown.bs.collapse');
|
||||
} else {
|
||||
// Close all
|
||||
$(".card-collapse.collapse").collapse("hide");
|
||||
// Open the one we want
|
||||
$(theCollapse).collapse('show');
|
||||
}
|
||||
// Do nothing with the click otherwise.
|
||||
return false;
|
||||
});
|
||||
|
||||
// Actual scroll function
|
||||
$('.collapse').on('shown.bs.collapse', function(e) {
|
||||
if ( window.doScroll ) {
|
||||
var $card = $(this).closest('.card');
|
||||
$('html,body').animate({
|
||||
scrollTop: $card.offset().top
|
||||
}, 500);
|
||||
window.doScroll = false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// If we came here with a hash, open that category and scroll to it.
|
||||
if ( location.hash != "" ) {
|
||||
window.doScroll = true;
|
||||
$(location.hash + "_coll" + '.collapse').collapse('show');
|
||||
}
|
||||
|
||||
// Alternatively, if something changed the hash (looking at you search feature), we should
|
||||
// pretend that the user clicked on the link for that category.
|
||||
$( window ).on( 'hashchange', function( e ) {
|
||||
var newPlace = window.location.hash.substr(1);;
|
||||
$(".tab-click[data-target='" + newPlace + "']").trigger("click");
|
||||
} );
|
||||
|
||||
// If there is only one service group, show it by default.
|
||||
if ( $(".card-collapse.collapse").length < 2 ) {
|
||||
$(".card-collapse.collapse").collapse('show');
|
||||
}
|
||||
|
||||
$(".close-all-tabs").on("click", function(){
|
||||
$('.card-collapse.collapse').collapse('hide');
|
||||
return false;
|
||||
});
|
||||
$(".open-all-tabs").on("click", function() {
|
||||
$('.card-collapse.collapse').collapse('show');
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<nav>
|
||||
<ol class="breadcrumb mt-2 justify-content-center">
|
||||
<li class="breadcrumb-item-svc">
|
||||
<a class="open-all-tabs" href="#">Open All</a>
|
||||
</li>
|
||||
<TMPL_LOOP NAME="CATEGORIES">
|
||||
<li class="breadcrumb-item-svc">
|
||||
<a class="tab-click" data-target="<TMPL_VAR ESCAPE="HTML" NAME="NAME" />" href="#<TMPL_VAR ESCAPE="HTML" NAME="NAME">" data-toggle="tab">
|
||||
<TMPL_VAR ESCAPE="HTML" NAME="NAME" />
|
||||
</a>
|
||||
</li>
|
||||
</TMPL_LOOP>
|
||||
<li class="breadcrumb-item-svc">
|
||||
<a class="close-all-tabs" href="#">Close All</a>
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<TMPL_LOOP NAME="CATEGORIES">
|
||||
<div class="card mt-2">
|
||||
<div class="dropdown-toggle card-header" id="<TMPL_VAR ESCAPE="HTML" NAME="NAME" />" data-toggle="collapse" data-target="#<TMPL_VAR ESCAPE="HTML" NAME="NAME" />_coll">
|
||||
Category :: <TMPL_VAR ESCAPE="HTML" NAME="NAME" />
|
||||
</div>
|
||||
<div class="card-collapse collapse" id="<TMPL_VAR ESCAPE="HTML" NAME="NAME" />_coll">
|
||||
<div class="card-body">
|
||||
<TMPL_LOOP NAME="SERVICES">
|
||||
<div class="row">
|
||||
<div class="graph-day col-md-6">
|
||||
<a href="<TMPL_VAR NAME="URLX" />">
|
||||
<img class="lazyload img-fluid i<TMPL_IF NAME="STATE_WARNING"> warn</TMPL_IF><TMPL_IF NAME="STATE_CRITICAL"> crit</TMPL_IF>"
|
||||
data-src="<TMPL_VAR NAME="IMGDAY" />"
|
||||
alt="<TMPL_VAR ESCAPE="HTML" NAME="NAME" />"
|
||||
<TMPL_IF NAME="IMGDAYWIDTH">width="<TMPL_VAR NAME="IMGDAYWIDTH" />" </TMPL_IF>
|
||||
<TMPL_IF NAME="IMGDAYHEIGHT">height="<TMPL_VAR NAME="IMGDAYHEIGHT" />"</TMPL_IF>/>
|
||||
</a>
|
||||
</div>
|
||||
<div class="graph-week col-md-6">
|
||||
<a href="<TMPL_VAR NAME="URLX" />">
|
||||
<img class="lazyload img-fluid i<TMPL_IF NAME="STATE_WARNING"> warn</TMPL_IF><TMPL_IF NAME="STATE_CRITICAL"> crit</TMPL_IF>"
|
||||
data-src="<TMPL_VAR NAME="IMGWEEK" />"
|
||||
alt="<TMPL_VAR ESCAPE="HTML" NAME="NAME" />"
|
||||
<TMPL_IF NAME="IMGWEEKWIDTH" />width="<TMPL_VAR NAME="IMGWEEKWIDTH" />" </TMPL_IF>
|
||||
<TMPL_IF NAME="IMGWEEKHEIGHT" />height="<TMPL_VAR NAME="IMGWEEKHEIGHT" />"</TMPL_IF>/>
|
||||
</a>
|
||||
</div>
|
||||
<div class="graph-month col-md-6 d-none">
|
||||
<a href="<TMPL_VAR NAME="URLX" />">
|
||||
<img class="lazyload img-fluid i<TMPL_IF NAME="STATE_WARNING"> warn</TMPL_IF><TMPL_IF NAME="STATE_CRITICAL"> crit</TMPL_IF>"
|
||||
data-src="<TMPL_VAR NAME="IMGMONTH" />"
|
||||
alt="<TMPL_VAR ESCAPE="HTML" NAME="NAME" />"
|
||||
<TMPL_IF NAME="IMGMONTHWIDTH" />width="<TMPL_VAR NAME="IMGMONTHWIDTH" />" </TMPL_IF>
|
||||
<TMPL_IF NAME="IMGMONTHHEIGHT" />height="<TMPL_VAR NAME="IMGMONTHHEIGHT" />"</TMPL_IF>/>
|
||||
</a>
|
||||
</div>
|
||||
<div class="graph-year col-md-6 d-none">
|
||||
<a href="<TMPL_VAR NAME="URLX" />">
|
||||
<img class="lazyload img-fluid i<TMPL_IF NAME="STATE_WARNING"> warn</TMPL_IF><TMPL_IF NAME="STATE_CRITICAL"> crit</TMPL_IF>"
|
||||
data-src="<TMPL_VAR NAME="IMGYEAR" />"
|
||||
alt="<TMPL_VAR ESCAPE="HTML" NAME="NAME" />"
|
||||
<TMPL_IF NAME="IMGYEARWIDTH" />width="<TMPL_VAR NAME="IMGYEARWIDTH" />" </TMPL_IF>
|
||||
<TMPL_IF NAME="IMGYEARHEIGHT" />height="<TMPL_VAR NAME="IMGYEARHEIGHT" />"</TMPL_IF>/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</TMPL_LOOP>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</TMPL_LOOP>
|
||||
|
||||
|
||||
|
||||
<TMPL_INCLUDE NAME="partial/footer_pre.tmpl" />
|
||||
<TMPL_INCLUDE NAME="partial/footer.tmpl" />
|
|
@ -0,0 +1,126 @@
|
|||
<TMPL_INCLUDE NAME="partial/head.tmpl" />
|
||||
|
||||
<!--
|
||||
File: munin-overview.tmpl
|
||||
|
||||
Used: "Home" page level
|
||||
-->
|
||||
|
||||
<!-- Alerts -->
|
||||
<TMPL_IF NAME="NUNKNOWN">
|
||||
<div class="alert alert-info">There are <a class="alert-link" href="<TMPL_VAR NAME="R_PATH">/problems.html#unknowns"><TMPL_VAR NAME="NUNKNOWN"> unknown problems</a></div>
|
||||
</TMPL_IF>
|
||||
<TMPL_IF NAME="NCRITICAL">
|
||||
<div class="alert alert-danger">There are <a class="alert-link" href="<TMPL_VAR NAME="R_PATH">/problems.html#critical"> <TMPL_VAR NAME="STATE_CRITICAL"> critical problems</a></div>
|
||||
</TMPL_IF>
|
||||
<TMPL_IF NAME="NWARNING">
|
||||
<div class="alert alert-warning">There are <a class="alert-link" href="<TMPL_VAR NAME="R_PATH">/problems.html#warnings"><TMPL_VAR NAME="NWARNING"> warnings</a></div>
|
||||
</TMPL_IF>
|
||||
|
||||
<TMPL_LOOP NAME="GROUPS">
|
||||
<TMPL_UNLESS NAME="MULTIGRAPH">
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
💼 <a href="<TMPL_VAR NAME='URL' />"><TMPL_VAR ESCAPE="HTML" NAME="NAME" /></a>
|
||||
<TMPL_IF NAME="COMPARE"><div class="float-right pr-3 cat-list"><small>
|
||||
<a href="<TMPL_VAR NAME='R_PATH' />/<TMPL_LOOP NAME='PATH' /><TMPL_IF NAME='pathname'><TMPL_VAR ESCAPE='URL' NAME='PATHNAME' />/</TMPL_IF></TMPL_LOOP>comparison-day.html">day</a>
|
||||
<a href="<TMPL_VAR NAME='R_PATH' />/<TMPL_LOOP NAME='PATH' /><TMPL_IF NAME='pathname'><TMPL_VAR ESCAPE='URL' NAME='PATHNAME' />/</TMPL_IF></TMPL_LOOP>comparison-week.html">week</a>
|
||||
<a href="<TMPL_VAR NAME='R_PATH' />/<TMPL_LOOP NAME='PATH' /><TMPL_IF NAME='pathname'><TMPL_VAR ESCAPE='URL' NAME='PATHNAME' />/</TMPL_IF></TMPL_LOOP>comparison-month.html">month</a>
|
||||
<a href="<TMPL_VAR NAME='R_PATH' />/<TMPL_LOOP NAME='PATH' /><TMPL_IF NAME='pathname'><TMPL_VAR ESCAPE='URL' NAME='PATHNAME' />/</TMPL_IF></TMPL_LOOP>comparison-year.html">year</a>
|
||||
</small></div></TMPL_IF>
|
||||
</div>
|
||||
<div class="card-list-here">
|
||||
<ul class="list-group list-group-flush">
|
||||
|
||||
<TMPL_IF NAME="NCATEGORIES">
|
||||
<li class="list-group-item pl-5">
|
||||
<TMPL_VAR ESCAPE="HTML" NAME="NAME" /><div class="float-right pr-3 cat-list"><small>
|
||||
<TMPL_LOOP NAME="CATEGORIES">
|
||||
<a <TMPL_IF NAME="STATE_WARNING">class="text-warning"</TMPL_IF> <TMPL_IF NAME="STATE_CRITICAL">class="text-critical"</TMPL_IF> href="<TMPL_VAR NAME='URL' />"><TMPL_VAR ESCAPE="HTML" NAME="NAME" /></a>
|
||||
</TMPL_LOOP></small></div>
|
||||
</li>
|
||||
</TMPL_IF>
|
||||
|
||||
<TMPL_LOOP NAME="GROUPS">
|
||||
<TMPL_UNLESS NAME="MULTIGRAPH">
|
||||
<li class="list-group-item pl-5">
|
||||
🖥 <a href="<TMPL_VAR NAME='URL' />" class="link-host"><TMPL_VAR ESCAPE="HTML" NAME="NAME" /></a>
|
||||
|
||||
<TMPL_IF NAME="COMPARE"><div class="float-right pr-3 cat-list"><small>
|
||||
<a href="<TMPL_VAR NAME='R_PATH' />/<TMPL_LOOP NAME='PATH' /><TMPL_IF NAME='pathname'><TMPL_VAR ESCAPE='URL' NAME='PATHNAME' />/</TMPL_IF></TMPL_LOOP>comparison-day.html">day</a>
|
||||
<a href="<TMPL_VAR NAME='R_PATH' />/<TMPL_LOOP NAME='PATH' /><TMPL_IF NAME='pathname'><TMPL_VAR ESCAPE='URL' NAME='PATHNAME' />/</TMPL_IF></TMPL_LOOP>comparison-week.html">week</a>
|
||||
<a href="<TMPL_VAR NAME='R_PATH' />/<TMPL_LOOP NAME='PATH' /><TMPL_IF NAME='pathname'><TMPL_VAR ESCAPE='URL' NAME='PATHNAME' />/</TMPL_IF></TMPL_LOOP>comparison-month.html">month</a>
|
||||
<a href="<TMPL_VAR NAME='R_PATH' />/<TMPL_LOOP NAME='PATH' /><TMPL_IF NAME='pathname'><TMPL_VAR ESCAPE='URL' NAME='PATHNAME' />/</TMPL_IF></TMPL_LOOP>comparison-year.html">year</a>
|
||||
</small></div></TMPL_IF>
|
||||
|
||||
<TMPL_IF NAME="NCATEGORIES"><div class="float-right cat-list pr-3"><small>
|
||||
<TMPL_LOOP NAME="CATEGORIES">
|
||||
<a <TMPL_IF NAME="STATE_WARNING">class="text-warning"</TMPL_IF> <TMPL_IF NAME="STATE_CRITICAL">class="text-critical"</TMPL_IF> href="<TMPL_VAR NAME='URL' />"><TMPL_VAR ESCAPE="HTML" NAME="NAME" /></a>
|
||||
</TMPL_LOOP>
|
||||
</small></div></TMPL_IF>
|
||||
|
||||
<ul>
|
||||
<!-- A/N: AGAIN, DUNNO WHAT (WHEN) THIS DOES - LEVEL 2 OF GROUPS -->
|
||||
<TMPL_LOOP NAME="GROUPS">
|
||||
<TMPL_UNLESS NAME="MULTIGRAPH">
|
||||
<li>
|
||||
<a href="<TMPL_VAR NAME='URL' />"><TMPL_VAR ESCAPE="HTML" NAME="NAME" /></a>
|
||||
|
||||
<TMPL_IF NAME="COMPARE"><div class="float-right cat-list pr-3"><small>
|
||||
<a href="<TMPL_VAR NAME='R_PATH' />/<TMPL_LOOP NAME='PATH' /><TMPL_IF NAME='pathname'><TMPL_VAR ESCAPE='URL' NAME='PATHNAME' />/</TMPL_IF></TMPL_LOOP>comparison-day.html">day</a>
|
||||
<a href="<TMPL_VAR NAME='R_PATH' />/<TMPL_LOOP NAME='PATH' /><TMPL_IF NAME='pathname'><TMPL_VAR ESCAPE='URL' NAME='PATHNAME' />/</TMPL_IF></TMPL_LOOP>comparison-week.html">week</a>
|
||||
<a href="<TMPL_VAR NAME='R_PATH' />/<TMPL_LOOP NAME='PATH' /><TMPL_IF NAME='pathname'><TMPL_VAR ESCAPE='URL' NAME='PATHNAME' />/</TMPL_IF></TMPL_LOOP>comparison-month.html">month</a>
|
||||
<a href="<TMPL_VAR NAME='R_PATH' />/<TMPL_LOOP NAME='PATH' /><TMPL_IF NAME='pathname'><TMPL_VAR ESCAPE='URL' NAME='PATHNAME' />/</TMPL_IF></TMPL_LOOP>comparison-year.html">year</a>
|
||||
</small></div></TMPL_IF>
|
||||
|
||||
<TMPL_IF NAME="NCATEGORIES"><div class="float-right cat-list pr-3"><small>
|
||||
<TMPL_LOOP NAME="CATEGORIES">
|
||||
<a <TMPL_IF NAME="STATE_WARNING">class="text-warning"</TMPL_IF> <TMPL_IF NAME="STATE_CRITICAL">class="text-critical"</TMPL_IF> href="<TMPL_VAR NAME='URL' />"><TMPL_VAR ESCAPE="HTML" NAME="NAME" /></a>
|
||||
</TMPL_LOOP>
|
||||
</small></div></TMPL_IF>
|
||||
|
||||
<ul>
|
||||
<!-- A/N: YEAH, EVEN MORE NO CLUE WHEN - LEVEL 3 OF GROUPS -->
|
||||
<TMPL_LOOP NAME="GROUPS">
|
||||
<TMPL_UNLESS NAME="MULTIGRAPH">
|
||||
<li>
|
||||
<a href="<TMPL_VAR NAME='URL' />"><TMPL_VAR ESCAPE="HTML" NAME="NAME" /></a>
|
||||
|
||||
<TMPL_IF NAME="COMPARE"><div class="float-right cat-list pr-3"><small>
|
||||
<a href="<TMPL_VAR NAME='R_PATH' />/<TMPL_LOOP NAME='PATH' /><TMPL_IF NAME='pathname'><TMPL_VAR ESCAPE='URL' NAME='PATHNAME' />/</TMPL_IF></TMPL_LOOP>comparison-day.html">day</a>
|
||||
<a href="<TMPL_VAR NAME='R_PATH' />/<TMPL_LOOP NAME='PATH' /><TMPL_IF NAME='pathname'><TMPL_VAR ESCAPE='URL' NAME='PATHNAME' />/</TMPL_IF></TMPL_LOOP>comparison-week.html">week</a>
|
||||
<a href="<TMPL_VAR NAME='R_PATH' />/<TMPL_LOOP NAME='PATH' /><TMPL_IF NAME='pathname'><TMPL_VAR ESCAPE='URL' NAME='PATHNAME' />/</TMPL_IF></TMPL_LOOP>comparison-month.html">month</a>
|
||||
<a href="<TMPL_VAR NAME='R_PATH' />/<TMPL_LOOP NAME='PATH' /><TMPL_IF NAME='pathname'><TMPL_VAR ESCAPE='URL' NAME='PATHNAME' />/</TMPL_IF></TMPL_LOOP>comparison-year.html">year</a>
|
||||
</small></div></TMPL_IF>
|
||||
|
||||
<TMPL_IF NAME="NCATEGORIES"><div class="float-right cat-list pr-3"><small>
|
||||
<TMPL_LOOP NAME="CATEGORIES">
|
||||
<a <TMPL_IF NAME="STATE_WARNING">class="text-warning"</TMPL_IF> <TMPL_IF NAME="STATE_CRITICAL">class="text-critical"</TMPL_IF> href="<TMPL_VAR NAME='URL' />"><TMPL_VAR ESCAPE="HTML" NAME="NAME" /></a>
|
||||
</TMPL_LOOP>
|
||||
</small></div></TMPL_IF>
|
||||
</li>
|
||||
</TMPL_UNLESS>
|
||||
</TMPL_LOOP>
|
||||
<!-- END LEVEL 3 OF GROUPS -->
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
</TMPL_UNLESS>
|
||||
</TMPL_LOOP>
|
||||
<!-- END LEVEL 2 OF GROUPS -->
|
||||
</ul>
|
||||
</li>
|
||||
</TMPL_UNLESS>
|
||||
</TMPL_LOOP>
|
||||
<!-- END LEVEL 1 OF GROUPS -->
|
||||
</ul> <!-- .list-group END -->
|
||||
</div> <!-- .card-body end -->
|
||||
</div> <!-- .card end -->
|
||||
|
||||
</TMPL_UNLESS>
|
||||
</TMPL_LOOP>
|
||||
|
||||
<div class="contentpusher"></div>
|
||||
|
||||
<TMPL_INCLUDE NAME="partial/footer_pre.tmpl" />
|
||||
<TMPL_INCLUDE NAME="partial/footer.tmpl" />
|
|
@ -0,0 +1,110 @@
|
|||
<TMPL_INCLUDE NAME="partial/head.tmpl" />
|
||||
|
||||
<!--
|
||||
File: munin-problemview.tmpl
|
||||
|
||||
Used: Problems view, top level template
|
||||
|
||||
NOTE: we don't lazy load on this page - presumably you want to immediatally see all problems
|
||||
-->
|
||||
<h2>Problem Overview</h2>
|
||||
|
||||
<div class="alert alert-danger" id="critical">Critical</div>
|
||||
<TMPL_LOOP NAME="CRITICAL">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<a href="<TMPL_VAR NAME='NODEURL' />"><TMPL_VAR ESCAPE="HTML" NAME="NODENAME" /></a> ></span>
|
||||
<TMPL_IF NAME="URL"><a href="<TMPL_VAR NAME='URL' />"></TMPL_IF>
|
||||
<TMPL_VAR ESCAPE="HTML" NAME="LABEL">
|
||||
<TMPL_IF NAME="URL"></a></TMPL_IF>
|
||||
<br/>
|
||||
<a href="<TMPL_VAR NAME='URL' />">
|
||||
<img src="<TMPL_VAR NAME='CIMGDAY' />" alt="<TMPL_VAR ESCAPE='HTML' NAME='LABEL' />" class="img-fluid i"
|
||||
<TMPL_IF NAME="IMGDAYWIDTH">width="<TMPL_VAR NAME='IMGDAYWIDTH' />" </TMPL_IF>
|
||||
<TMPL_IF NAME="IMGDAYHEIGHT">height="<TMPL_VAR NAME='IMGDAYHEIGHT' />"</TMPL_IF>
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-6 d-none d-md-block">
|
||||
<a href="<TMPL_VAR NAME='NODEURL'>"><TMPL_VAR ESCAPE="HTML" NAME="NODENAME" /></a> >
|
||||
<TMPL_IF NAME="URL"><a href="<TMPL_VAR NAME='URL' />"></TMPL_IF>
|
||||
<TMPL_VAR ESCAPE="HTML" NAME="LABEL" />
|
||||
<TMPL_IF NAME="URL"></a></TMPL_IF>
|
||||
<br/>
|
||||
<a href="<TMPL_VAR NAME='URL' />">
|
||||
<img src="<TMPL_VAR NAME='CIMGWEEK' />" alt="<TMPL_VAR ESCAPE='HTML' NAME='LABEL' />" class="img-fluid i"
|
||||
<TMPL_IF NAME="IMGWEEKWIDTH">width="<TMPL_VAR NAME='IMGWEEKWIDTH' />" </TMPL_IF>
|
||||
<TMPL_IF NAME="IMGWEEKHEIGHT">height="<TMPL_VAR NAME='IMGWEEKHEIGHT' />"</TMPL_IF>
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</TMPL_LOOP>
|
||||
|
||||
|
||||
<div class="alert alert-warning" id="warnings">Warning</div>
|
||||
<TMPL_LOOP NAME="WARNING">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<a href="<TMPL_VAR NAME='NODEURL' />"><TMPL_VAR ESCAPE="HTML" NAME="NODENAME" /></a> ></span>
|
||||
<TMPL_IF NAME="URL"><a href="<TMPL_VAR NAME='URL' />"></TMPL_IF>
|
||||
<TMPL_VAR ESCAPE="HTML" NAME="LABEL">
|
||||
<TMPL_IF NAME="URL"></a></TMPL_IF>
|
||||
<br/>
|
||||
<a href="<TMPL_VAR NAME='URL' />">
|
||||
<img src="<TMPL_VAR NAME='CIMGDAY' />" alt="<TMPL_VAR ESCAPE='HTML' NAME='LABEL' />" class="img-fluid i"
|
||||
<TMPL_IF NAME="IMGDAYWIDTH">width="<TMPL_VAR NAME='IMGDAYWIDTH' />" </TMPL_IF>
|
||||
<TMPL_IF NAME="IMGDAYHEIGHT">height="<TMPL_VAR NAME='IMGDAYHEIGHT' />"</TMPL_IF>
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-6 d-none d-md-block">
|
||||
<a href="<TMPL_VAR NAME='NODEURL'>"><TMPL_VAR ESCAPE="HTML" NAME="NODENAME" /></a> >
|
||||
<TMPL_IF NAME="URL"><a href="<TMPL_VAR NAME='URL' />"></TMPL_IF>
|
||||
<TMPL_VAR ESCAPE="HTML" NAME="LABEL" />
|
||||
<TMPL_IF NAME="URL"></a></TMPL_IF>
|
||||
<br/>
|
||||
<a href="<TMPL_VAR NAME='URL' />">
|
||||
<img src="<TMPL_VAR NAME='CIMGWEEK' />" alt="<TMPL_VAR ESCAPE='HTML' NAME='LABEL' />" class="img-fluid i"
|
||||
<TMPL_IF NAME="IMGWEEKWIDTH">width="<TMPL_VAR NAME='IMGWEEKWIDTH' />" </TMPL_IF>
|
||||
<TMPL_IF NAME="IMGWEEKHEIGHT">height="<TMPL_VAR NAME='IMGWEEKHEIGHT' />"</TMPL_IF>
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</TMPL_LOOP>
|
||||
|
||||
<div class="alert alert-info" id="unknowns">Unknown</div>
|
||||
<TMPL_LOOP NAME="UNKNOWN">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<a href="<TMPL_VAR NAME='NODEURL' />"><TMPL_VAR ESCAPE="HTML" NAME="NODENAME" /></a> ></span>
|
||||
<TMPL_IF NAME="URL"><a href="<TMPL_VAR NAME='URL' />"></TMPL_IF>
|
||||
<TMPL_VAR ESCAPE="HTML" NAME="LABEL">
|
||||
<TMPL_IF NAME="URL"></a></TMPL_IF>
|
||||
<br/>
|
||||
<a href="<TMPL_VAR NAME='URL' />">
|
||||
<img src="<TMPL_VAR NAME='CIMGDAY' />" alt="<TMPL_VAR ESCAPE='HTML' NAME='LABEL' />" class="img-fluid i"
|
||||
<TMPL_IF NAME="IMGDAYWIDTH">width="<TMPL_VAR NAME='IMGDAYWIDTH' />" </TMPL_IF>
|
||||
<TMPL_IF NAME="IMGDAYHEIGHT">height="<TMPL_VAR NAME='IMGDAYHEIGHT' />"</TMPL_IF>
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-6 d-none d-md-block">
|
||||
<a href="<TMPL_VAR NAME='NODEURL'>"><TMPL_VAR ESCAPE="HTML" NAME="NODENAME" /></a> >
|
||||
<TMPL_IF NAME="URL"><a href="<TMPL_VAR NAME='URL' />"></TMPL_IF>
|
||||
<TMPL_VAR ESCAPE="HTML" NAME="LABEL" />
|
||||
<TMPL_IF NAME="URL"></a></TMPL_IF>
|
||||
<br/>
|
||||
<a href="<TMPL_VAR NAME='URL' />">
|
||||
<img src="<TMPL_VAR NAME='CIMGWEEK' />" alt="<TMPL_VAR ESCAPE='HTML' NAME='LABEL' />" class="img-fluid i"
|
||||
<TMPL_IF NAME="IMGWEEKWIDTH">width="<TMPL_VAR NAME='IMGWEEKWIDTH' />" </TMPL_IF>
|
||||
<TMPL_IF NAME="IMGWEEKHEIGHT">height="<TMPL_VAR NAME='IMGWEEKHEIGHT' />"</TMPL_IF>
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</TMPL_LOOP>
|
||||
|
||||
<TMPL_INCLUDE NAME="partial/footer_pre.tmpl" />
|
||||
<TMPL_INCLUDE NAME="partial/footer.tmpl" />
|
|
@ -0,0 +1,237 @@
|
|||
<TMPL_INCLUDE NAME="partial/head.tmpl" />
|
||||
<!--
|
||||
File: munin-serviceview.tmpl
|
||||
|
||||
Used: Individual Service view, top level template
|
||||
-->
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<TMPL_LOOP NAME="SERVICES">
|
||||
<!-- Alerts -->
|
||||
<TMPL_IF NAME="STATE_UNKNOWN">
|
||||
<div class="alert service-alert alert-info"><strong>Note:</strong> This service is in UNKNOWN state, because something bad happened. Please check your network, the munin-node, and the plugin.</div>
|
||||
</TMPL_IF>
|
||||
<TMPL_IF NAME="STATE_CRITICAL">
|
||||
<div class="alert service-alert alert-danger"><strong>Note:</strong> This service is in CRITICAL state because one of the values reported is outside the allowed range. Please see further down for information about the ranges and the graph for the values.</div>
|
||||
</TMPL_IF>
|
||||
<TMPL_IF NAME="STATE_WARNING">
|
||||
<div class="alert service-alert alert-warning"><strong>Note:</strong> This service is in WARNING state because one of the values reported is outside the allowed range. Please see further down for information about the ranges and the graph for the values.</div>
|
||||
</TMPL_IF>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<img data-href="<TMPL_VAR NAME='ZOOMDAY' />" src="<TMPL_VAR NAME='IMGDAY' />"
|
||||
alt="daily graph"
|
||||
class="img-fluid img-zoom i<TMPL_IF NAME='STATE_WARNING'> warn</TMPL_IF><TMPL_IF NAME='STATE_CRITICAL'> crit</TMPL_IF>"
|
||||
<TMPL_IF NAME="IMGDAYWIDTH" />width="<TMPL_VAR NAME='IMGDAYWIDTH' />" </TMPL_IF>
|
||||
<TMPL_IF NAME="IMGDAYHEIGHT" />height="<TMPL_VAR NAME='IMGDAYHEIGHT' />"</TMPL_IF>/>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<img data-href="<TMPL_VAR NAME='ZOOMWEEK'>" src="<TMPL_VAR NAME='IMGWEEK'>"
|
||||
alt="weekly graph"
|
||||
class="img-fluid img-zoom i<TMPL_IF NAME='STATE_WARNING'> warn</TMPL_IF><TMPL_IF NAME='STATE_CRITICAL'> crit</TMPL_IF>"
|
||||
<TMPL_IF NAME="IMGWEEKWIDTH" />width="<TMPL_VAR NAME='IMGWEEKWIDTH' />" </TMPL_IF>
|
||||
<TMPL_IF NAME="IMGWEEKHEIGHT" />height="<TMPL_VAR NAME='IMGWEEKHEIGHT' />"</TMPL_IF>/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<img data-href="<TMPL_VAR NAME='ZOOMMONTH'>" src="<TMPL_VAR NAME='IMGMONTH'>"
|
||||
alt="monthly graph"
|
||||
class="img-fluid img-zoom i<TMPL_IF NAME='STATE_WARNING'> warn</TMPL_IF><TMPL_IF NAME='STATE_CRITICAL'> crit</TMPL_IF>"
|
||||
<TMPL_IF NAME="IMGMONTHWIDTH" />width="<TMPL_VAR NAME='IMGMONTHWIDTH' />" </TMPL_IF>
|
||||
<TMPL_IF NAME="IMGMONTHHEIGHT" />height="<TMPL_VAR NAME='IMGMONTHHEIGHT' />"</TMPL_IF>/>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<img data-href="<TMPL_VAR NAME='ZOOMYEAR'>" src="<TMPL_VAR NAME='IMGYEAR'>"
|
||||
alt="yearly graph"
|
||||
class="img-fluid img-zoom i<TMPL_IF NAME='STATE_WARNING'> warn</TMPL_IF><TMPL_IF NAME='STATE_CRITICAL'> crit</TMPL_IF>"
|
||||
<TMPL_IF NAME="IMGYEARWIDTH" />width="<TMPL_VAR NAME='IMGYEARWIDTH' />" </TMPL_IF>
|
||||
<TMPL_IF NAME="IMGYEARHEIGHT" />height="<TMPL_VAR NAME='IMGYEARHEIGHT' />"</TMPL_IF>/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- .sum graphs. One of the least used features of munin? -->
|
||||
<TMPL_IF NAME="IMGWEEKSUM">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<img src="<TMPL_VAR NAME='IMGWEEKSUM' />"
|
||||
alt="summed weekly graph"
|
||||
<TMPL_IF NAME="IMGWEEKSUMWIDTH">width="<TMPL_VAR NAME='IMGWEEKSUMWIDTH' />" </TMPL_IF>
|
||||
<TMPL_IF NAME="IMGWEEKSUMHEIGHT">height="<TMPL_VAR NAME='IMGWEEKSUMHEIGHT' />"</TMPL_IF>/>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<img src="<TMPL_VAR NAME='IMGWEEKSUM' />"
|
||||
alt="summed weekly graph"
|
||||
<TMPL_IF NAME="IMGWEEKSUMWIDTH">width="<TMPL_VAR NAME='IMGWEEKSUMWIDTH' />" </TMPL_IF>
|
||||
<TMPL_IF NAME="IMGWEEKSUMHEIGHT">height="<TMPL_VAR NAME='IMGWEEKSUMHEIGHT' />"</TMPL_IF>/>
|
||||
</div>
|
||||
</div>
|
||||
</TMPL_IF>
|
||||
|
||||
<h2 class="mt-4"><small>Graph information</small></h2>
|
||||
|
||||
<TMPL_LOOP NAME="GRAPHINFO">
|
||||
<p class="text-muted"><TMPL_VAR NAME="INFO"></p>
|
||||
</TMPL_LOOP>
|
||||
|
||||
<table class="table table-hover table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-2">Field</th>
|
||||
<th class="col-md-2">Internal name</th>
|
||||
<th class="col-md-1">Type</th>
|
||||
<th class="col-md-1">Warning</th>
|
||||
<th class="col-md-1">Critical</th>
|
||||
<th class="col-md-5">Info</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<TMPL_LOOP NAME="FIELDINFO">
|
||||
<tr<TMPL_IF NAME="STATE_CRITICAL"> class="table-danger"<TMPL_ELSE><TMPL_IF NAME="STATE_WARNING"> class="table-warning"</TMPL_IF></TMPL_IF>>
|
||||
<td><TMPL_VAR ESCAPE="HTML" NAME="LABEL" /></td>
|
||||
<td><TMPL_VAR ESCAPE="HTML" NAME="FIELD" /></td>
|
||||
<td><TMPL_VAR NAME="TYPE" /></td>
|
||||
<td class="text-warning"><TMPL_VAR NAME="WARN" /></td>
|
||||
<td class="text-danger"><TMPL_VAR NAME="CRIT" /></td>
|
||||
<td class="text-muted"><TMPL_VAR ESCAPE="HTML" NAME="INFO" /></td>
|
||||
</tr>
|
||||
<TMPL_IF NAME="EXTINFO">
|
||||
<tr>
|
||||
<td class='wrap' colspan="6" align='left' valign='top'>
|
||||
This field has the following extra information: <TMPL_VAR ESCAPE="HTML" NAME="EXTINFO" />
|
||||
</td>
|
||||
</tr>
|
||||
</TMPL_IF>
|
||||
</TMPL_LOOP>
|
||||
</tbody>
|
||||
</table>
|
||||
</TMPL_LOOP>
|
||||
|
||||
<div id="zoom" class="modal fade">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<img alt="Zoom Image - Requires munin-cgi-graph" id="zoom_image" class="img-fluid"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<form class="form-horizontal" role="form" name="zoom_form" id="zoom_form">
|
||||
<div class="form-group row">
|
||||
<label for="plugin_name" class="col-sm-2 control-label">Plugin Name</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="plugin_name" id="plugin_name">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="start_iso8601" class="col-sm-2 control-label">Time Start/Stop</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="start_iso8601" id="start_iso8601">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="stop_iso8601" id="stop_iso8601">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="start_epoch" class="col-sm-2 control-label">Epoch Start/Stop</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="start_epoch" id="start_epoch">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="stop_epoch" id="stop_epoch">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="lower_limit" class="col-sm-2 control-label">Limit Low/High</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="lower_limit" id="lower_limit">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="upper_limit" id="upper_limit">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="size_x" class="col-sm-2 control-label">Width/Height</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="size_x" id="size_x">
|
||||
<span class="input-group-append"><span class="input-group-text">px</span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="size_y" id="size_y">
|
||||
<span class="input-group-append"><span class="input-group-text">px</span></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<input type=hidden name="cgiurl_graph"/>
|
||||
<div class="btn-group w-100 mx-3">
|
||||
<button type="submit" class="btn btn-outline-success">Refresh</button>
|
||||
<button type="button" class="btn btn-outline-primary" name="btnReset">Reset</button>
|
||||
<button type="button" class="btn btn-outline-primary" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-info">
|
||||
<p>Zooming is very easy, it's done in 3 clicks (regular clicks, no drag&drop):</p>
|
||||
<ol>
|
||||
<li>Click to define the start of zoom.</li>
|
||||
<li>Click to define the ending of zoom.</li>
|
||||
<li>Refresh.</li>
|
||||
</ol>
|
||||
<p>You can use the interactive form too.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<TMPL_INCLUDE NAME="partial/footer_pre.tmpl" />
|
||||
|
||||
<script src="<TMPL_VAR NAME='R_PATH'>/static/js/formatdate.min.js"></script>
|
||||
<script src="<TMPL_VAR NAME='R_PATH'>/static/js/querystring.min.js"></script>
|
||||
<script src="<TMPL_VAR NAME='R_PATH'>/static/js/dynazoom.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
//Zoom modal opening
|
||||
$('.img-zoom').click(function(){
|
||||
var query = $(this).attr('data-href');
|
||||
var form = document.getElementById("zoom_form");
|
||||
var image = document.getElementById("zoom_image");
|
||||
|
||||
form.onsubmit = function(){//Submit catching
|
||||
var qs = new Querystring(query);
|
||||
var src = "cgiurl_graph=" + qs.get("cgiurl_graph", "/munin-cgi/munin-cgi-graph")
|
||||
+ "&plugin_name=" + form.plugin_name.value
|
||||
+ "&start_epoch=" + form.start_epoch.value
|
||||
+ "&stop_epoch=" + form.stop_epoch.value
|
||||
+ "&rst_start_epoch=" + qs.get("start_epoch", "")
|
||||
+ "&rst_stop_epoch=" + qs.get("stop_epoch", "")
|
||||
+ "&lower_limit=" + form.lower_limit.value
|
||||
+ "&upper_limit=" + form.upper_limit.value
|
||||
+ "&size_x=" + form.size_x.value
|
||||
+ "&size_y=" + form.size_y.value
|
||||
;
|
||||
refreshZoom(src, form, image);
|
||||
return false;
|
||||
};
|
||||
|
||||
refreshZoom(query, form, image);
|
||||
$('#zoom').modal('show');
|
||||
});
|
||||
</script>
|
||||
|
||||
<TMPL_INCLUDE NAME="partial/footer.tmpl" />
|
|
@ -0,0 +1,17 @@
|
|||
<!--
|
||||
File: partial/bottom_navigation.tmpl
|
||||
|
||||
Used: Host view, when same-level peers exist. (Inside group view)
|
||||
-->
|
||||
<TMPL_IF NAME="LARGESET">
|
||||
<div class="btn-group text-right ml-auto mr-0 d-block">
|
||||
<button type="button" class="btn btn-outline-info w-100 dropdown-toggle" data-toggle="dropdown">
|
||||
<TMPL_VAR NAME="INFO_OPTION"> <span class="caret"></span>
|
||||
</button>
|
||||
<div class="dropdown-menu" role="menu">
|
||||
<TMPL_LOOP NAME="PEERS">
|
||||
<TMPL_IF NAME="LINK"><a class="dropdown-item" href="<TMPL_VAR NAME="LINK">"><TMPL_ELSE><a class="dropdown-item" href=""></TMPL_IF><TMPL_VAR NAME="NAME"></a>
|
||||
</TMPL_LOOP>
|
||||
</div>
|
||||
</div>
|
||||
</TMPL_IF>
|
|
@ -0,0 +1,73 @@
|
|||
<!--
|
||||
File: partial/compare_navigation.tmpl
|
||||
|
||||
Used: Navigation specific to compare templates.
|
||||
-->
|
||||
|
||||
<script>
|
||||
$(document).ready(function (){
|
||||
// Should we auto-scroll when a service category is opened?
|
||||
window.doScroll = false;
|
||||
|
||||
$('.tab-click').on('click', function() {
|
||||
window.doScroll = true; // Do scroll when we click a tab header
|
||||
var theCollapse = '#' + $(this).data("target") + "_coll";
|
||||
|
||||
if ( $(theCollapse).hasClass('show') ) {
|
||||
// Already open, lets just trigger the event.
|
||||
$(theCollapse).trigger('shown.bs.collapse');
|
||||
} else {
|
||||
// Close all
|
||||
$(".card-collapse.collapse").collapse("hide");
|
||||
// Open the one we want
|
||||
$(theCollapse).collapse('show');
|
||||
}
|
||||
// Do nothing with the click otherwise.
|
||||
return false;
|
||||
});
|
||||
|
||||
// Actual scroll function
|
||||
$('.collapse').on('shown.bs.collapse', function(e) {
|
||||
if ( window.doScroll ) {
|
||||
var $card = $(this).closest('.card');
|
||||
$('html,body').animate({
|
||||
scrollTop: $card.offset().top
|
||||
}, 500);
|
||||
window.doScroll = false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// If there is only one service group, show it by default.
|
||||
if ( $(".card-collapse.collapse").length < 2 ) {
|
||||
$(".card-collapse.collapse").collapse('show');
|
||||
}
|
||||
|
||||
$(".close-all-tabs").on("click", function(){
|
||||
$('.card-collapse.collapse').collapse('hide');
|
||||
return false;
|
||||
});
|
||||
$(".open-all-tabs").on("click", function() {
|
||||
$('.card-collapse.collapse').collapse('show');
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<nav>
|
||||
<ol class="breadcrumb mt-2 justify-content-center">
|
||||
<li class="breadcrumb-item-svc">
|
||||
<a class="open-all-tabs" href="#">Open All</a>
|
||||
</li>
|
||||
<TMPL_LOOP NAME="CATEGORIES">
|
||||
<li class="breadcrumb-item-svc">
|
||||
<a class="tab-click" data-target="<TMPL_VAR ESCAPE='HTML' NAME='GROUPNAME' />" href="#<TMPL_VAR ESCAPE='HTML' NAME='GROUPNAME'>" data-toggle="tab">
|
||||
<TMPL_VAR ESCAPE="HTML" NAME="GROUPNAME" />
|
||||
</a>
|
||||
</li>
|
||||
</TMPL_LOOP>
|
||||
<li class="breadcrumb-item-svc">
|
||||
<a class="close-all-tabs" href="#">Close All</a>
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
|
@ -0,0 +1,8 @@
|
|||
<!--
|
||||
File: partial/footer.tmpl
|
||||
|
||||
Used: All views, called after partial/footer.tmpl
|
||||
-->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,18 @@
|
|||
<!--
|
||||
File: partial/footer_pre.tmpl
|
||||
|
||||
Used: All views, called before partial/footer.tmpl
|
||||
-->
|
||||
</div><!-- Close "container" DIV -->
|
||||
|
||||
<footer class="footer">
|
||||
<div class="container text-center">
|
||||
<span class="text-muted"><small>
|
||||
This page was generated by <a href="http://www.munin-monitoring.org/">Munin</a>
|
||||
version <TMPL_VAR NAME="MUNIN_VERSION"> at <TMPL_VAR NAME="TIMESTAMP">
|
||||
with <a href="https://github.com/munin-monitoring/contrib/tree/master/templates/munstrap4/">MunStrap4</a> template.
|
||||
</small></span>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
|
@ -0,0 +1,240 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<!--
|
||||
File: partial/head.tmpl
|
||||
|
||||
Used: All views, called before anything else
|
||||
-->
|
||||
|
||||
<head>
|
||||
<title>
|
||||
<TMPL_IF NAME="NAME"><TMPL_VAR ESCAPE="HTML" NAME="NAME"> (</TMPL_IF>Munin<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"> :: <TMPL_VAR ESCAPE="HTML" NAME="pathname"></TMPL_IF></TMPL_LOOP><TMPL_IF NAME="NAME">)</TMPL_IF>
|
||||
</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="Auto-generated by Munin">
|
||||
<TMPL_UNLESS NAME="SHOW_ZOOM_JS">
|
||||
<meta http-equiv="refresh" content="300" />
|
||||
</TMPL_UNLESS>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="<TMPL_VAR NAME='R_PATH' />/static/img/favicon.ico" />
|
||||
<link rel="icon" type="image/png" href="<TMPL_VAR NAME='R_PATH' />/static/img/favicon.png" />
|
||||
<link href="<TMPL_VAR NAME='R_PATH' />/static/css/bootstrap4.min.css" rel="stylesheet" />
|
||||
<link href="<TMPL_VAR NAME='R_PATH' />/static/css/style-munstrap.min.css" rel="stylesheet" />
|
||||
|
||||
<script src="<TMPL_VAR NAME='R_PATH' />/static/js/jquery.min.js"></script>
|
||||
<script src="<TMPL_VAR NAME='R_PATH' />/static/js/lazysizes.min.js" async></script>
|
||||
<script src="<TMPL_VAR NAME='R_PATH' />/static/js/bootstrap4.min.js"></script>
|
||||
<script src="<TMPL_VAR NAME='R_PATH' />/static/js/typeahead.bundle.min.js"></script>
|
||||
<script>
|
||||
// This is used to build the navigation quick search - there is no backend, so we have to do
|
||||
// it all client side.
|
||||
//
|
||||
// As a curious side note, commenting out the template loops and whatnot allows vscode to parse
|
||||
// the javascript - so please note that the commented out TMPL directives STILL FUNCTION.
|
||||
var gen_basegroups = {
|
||||
// <TMPL_LOOP NAME="ROOTGROUPS">
|
||||
"<TMPL_VAR NAME='NAME' />" : {
|
||||
"baseurl" : "<TMPL_VAR NAME='R_PATH' />/<TMPL_VAR NAME='URL'>",
|
||||
"compare" : {
|
||||
// <TMPL_IF NAME="COMPARE">
|
||||
"Day" : "<TMPL_VAR NAME='R_PATH' />/<TMPL_LOOP NAME='PATH' /><TMPL_IF NAME='pathname'><TMPL_VAR ESCAPE='URL' NAME='PATHNAME' />/</TMPL_IF></TMPL_LOOP>comparison-day.html",
|
||||
"Week" : "<TMPL_VAR NAME='R_PATH' />/<TMPL_LOOP NAME='PATH' /><TMPL_IF NAME='pathname'><TMPL_VAR ESCAPE='URL' NAME='PATHNAME' />/</TMPL_IF></TMPL_LOOP>comparison-week.html",
|
||||
"Month" : "<TMPL_VAR NAME='R_PATH' />/<TMPL_LOOP NAME='PATH' /><TMPL_IF NAME='pathname'><TMPL_VAR ESCAPE='URL' NAME='PATHNAME' />/</TMPL_IF></TMPL_LOOP>comparison-month.html",
|
||||
"Year" : "<TMPL_VAR NAME='R_PATH' />/<TMPL_LOOP NAME='PATH' /><TMPL_IF NAME='pathname'><TMPL_VAR ESCAPE='URL' NAME='PATHNAME' />/</TMPL_IF></TMPL_LOOP>comparison-year.html"
|
||||
// </TMPL_IF>
|
||||
}
|
||||
},
|
||||
// </TMPL_LOOP>
|
||||
};
|
||||
var gen_hosts = {
|
||||
// <TMPL_LOOP NAME="ROOTGROUPS">
|
||||
// <TMPL_LOOP NAME="GROUPS">
|
||||
// <TMPL_IF NAME="NCATEGORIES">
|
||||
"<TMPL_VAR ESCAPE='HTML' NAME='NAME' />" : {
|
||||
"baseurl" : "<TMPL_VAR NAME='R_PATH' />/<TMPL_VAR NAME='URL'>",
|
||||
"services" : {
|
||||
// <TMPL_LOOP NAME="CATEGORIES">
|
||||
"<TMPL_VAR ESCAPE='HTML' NAME='NAME' />" : "<TMPL_VAR NAME='R_PATH' />/<TMPL_VAR NAME='URL' />",
|
||||
// </TMPL_LOOP>
|
||||
}
|
||||
},
|
||||
// </TMPL_IF>
|
||||
// </TMPL_LOOP>
|
||||
// </TMPL_LOOP>
|
||||
};
|
||||
var gen_cats = {
|
||||
// <TMPL_LOOP NAME="GLOBALCATS">
|
||||
"Category :: <TMPL_VAR NAME='NAME'> :: Day" : {
|
||||
"baseurl" : "<TMPL_VAR NAME='R_PATH' />/<TMPL_VAR NAME='URLDAY'>"
|
||||
},
|
||||
"Category :: <TMPL_VAR NAME='NAME'> :: Week" : {
|
||||
"baseurl" : "<TMPL_VAR NAME='R_PATH' />/<TMPL_VAR NAME='URLWEEK'>"
|
||||
},
|
||||
"Category :: <TMPL_VAR NAME='NAME'> :: Month" : {
|
||||
"baseurl" : "<TMPL_VAR NAME='R_PATH' />/<TMPL_VAR NAME='URLMONTH'>"
|
||||
},
|
||||
"Category :: <TMPL_VAR NAME='NAME'> :: Year" : {
|
||||
"baseurl" : "<TMPL_VAR NAME='R_PATH' />/<TMPL_VAR NAME='URLYEAR'>"
|
||||
},
|
||||
// </TMPL_LOOP>
|
||||
};
|
||||
|
||||
function absolute(base, relative) {
|
||||
var stack = base.split("/"),
|
||||
parts = relative.split("/");
|
||||
|
||||
stack.pop(); // remove current file name (or empty string)
|
||||
|
||||
// (omit if "base" is the current folder without trailing slash)
|
||||
|
||||
for (var i=0; i<parts.length; i++) {
|
||||
if (parts[i] == ".") { continue; }
|
||||
|
||||
if (parts[i] == "..") {
|
||||
stack.pop();
|
||||
} else {
|
||||
stack.push(parts[i]);
|
||||
}
|
||||
}
|
||||
return stack.join("/");
|
||||
}
|
||||
|
||||
var navMap = [];
|
||||
|
||||
$.each(gen_cats, function(name, obby) {
|
||||
navMap.push( { "name" : name, "link" : absolute(location.href, obby.baseurl) } );
|
||||
});
|
||||
|
||||
$.each(gen_hosts, function(name, obby) {
|
||||
var host_name = name;
|
||||
navMap.push( { "name" : "Host :: " + name, "link" : absolute(location.href, obby.baseurl) });
|
||||
$.each(obby.services, function(svcname, url){
|
||||
navMap.push( { "name" : "Service :: " + host_name + " :: " + svcname, "link" : absolute(location.href, url) });
|
||||
});
|
||||
});
|
||||
|
||||
$.each(gen_basegroups, function(name, obby) {
|
||||
var host_name = name;
|
||||
navMap.push( { "name" : "Host :: " + name, "link" : absolute(location.href, obby.baseurl) });
|
||||
$.each(obby.compare, function(svcname, url){
|
||||
navMap.push( { "name" : "Compare :: " + host_name + " :: " + svcname, "link" : absolute(location.href, url) });
|
||||
});
|
||||
});
|
||||
|
||||
var navMapB = new Bloodhound({
|
||||
datumTokenizer: function (d) { return Bloodhound.tokenizers.whitespace(d.name); },
|
||||
queryTokenizer: Bloodhound.tokenizers.whitespace,
|
||||
identify: function (obj) { return obj.link; },
|
||||
local: navMap
|
||||
});
|
||||
|
||||
$(document).ready(function(){
|
||||
$('#findthehost').typeahead({
|
||||
hint: true,
|
||||
highlight: true,
|
||||
minLength: 2,
|
||||
},
|
||||
{
|
||||
name: 'navMap',
|
||||
limit: 10,
|
||||
display: 'link',
|
||||
source: navMapB,
|
||||
templates: {
|
||||
suggestion: function (data) {
|
||||
return '<div>' + data.name + '</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
//$('#findthehost').on('typeahead:change',function(){ $('#formy1').submit(); });
|
||||
$('#findthehost').on('typeahead:select',function(){ $('#formy1').submit(); });
|
||||
|
||||
$('#formy1').on('submit', function(){
|
||||
inputVal = $('#findthehost').val();
|
||||
if ( inputVal.substring(0, 4) == "http" ) {
|
||||
window.location.href = inputVal;
|
||||
} else {
|
||||
$('#findthehost').typeahead('val', '');
|
||||
}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light mb-3">
|
||||
<a class="navbar-brand" href="<TMPL_VAR NAME='R_PATH' />"><span class="munin-icon"></span> MUNIN</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<TMPL_VAR NAME='R_PATH' />">Home</a>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarProblems" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Problems
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarProblems">
|
||||
<a class="dropdown-item" href="<TMPL_VAR NAME='R_PATH' />/problems.html#critical"><span class="badge alert-danger mr-2"><TMPL_VAR NAME="NCRITICAL"></span>Critical</a>
|
||||
<a class="dropdown-item" href="<TMPL_VAR NAME='R_PATH' />/problems.html#warnings"><span class="badge alert-warning mr-2"><TMPL_VAR NAME="NWARNING"></span>Warning</a>
|
||||
<a class="dropdown-item" href="<TMPL_VAR NAME='R_PATH' />/problems.html#unknowns"><span class="badge alert-info mr-2"><TMPL_VAR NAME="NUNKNOWN"></span>Unknown</a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarGroups" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Groups
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarGroups">
|
||||
<TMPL_LOOP NAME="ROOTGROUPS">
|
||||
<a class="dropdown-item" href="<TMPL_VAR NAME='R_PATH' />/<TMPL_VAR NAME='URL'>"><TMPL_VAR NAME="NAME"></a>
|
||||
</TMPL_LOOP>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarHosts" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Hosts
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarHosts">
|
||||
<TMPL_LOOP NAME="ROOTGROUPS">
|
||||
<TMPL_LOOP NAME="GROUPS">
|
||||
<TMPL_IF NAME="NCATEGORIES">
|
||||
<a class="dropdown-item" href="<TMPL_VAR NAME='R_PATH' />/<TMPL_VAR NAME='URL'>"><TMPL_VAR ESCAPE="HTML" NAME="NAME"></a>
|
||||
</TMPL_IF>
|
||||
</TMPL_LOOP>
|
||||
</TMPL_LOOP>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarCats" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Categories
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarCats">
|
||||
<TMPL_LOOP NAME="GLOBALCATS">
|
||||
<a class="dropdown-item" href="<TMPL_VAR NAME='R_PATH' />/<TMPL_VAR NAME='URLDAY'>"><TMPL_VAR NAME="NAME"> - Day</a>
|
||||
<a class="dropdown-item" href="<TMPL_VAR NAME='R_PATH' />/<TMPL_VAR NAME='URLWEEK'>"><TMPL_VAR NAME="NAME"> - Week</a>
|
||||
<a class="dropdown-item" href="<TMPL_VAR NAME='R_PATH' />/<TMPL_VAR NAME='URLMONTH'>"><TMPL_VAR NAME="NAME"> - Month</a>
|
||||
<a class="dropdown-item" href="<TMPL_VAR NAME='R_PATH' />/<TMPL_VAR NAME='URLYEAR'>"><TMPL_VAR NAME="NAME"> - Year</a>
|
||||
<TMPL_IF NAME="__first__"><div class="dropdown-divider"></div></TMPL_IF>
|
||||
<TMPL_IF NAME="__inner__"><div class="dropdown-divider"></div></TMPL_IF>
|
||||
</TMPL_LOOP>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<form id="formy1" class="form-inline my-2 my-lg-0 w-25">
|
||||
<input class="form-control mr-sm-2 w-100" type="text" id="findthehost" placeholder="Host or Service" aria-label="Search">
|
||||
</form>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container">
|
||||
<TMPL_INCLUDE NAME="logo_navigation.tmpl">
|
|
@ -0,0 +1,64 @@
|
|||
<!--
|
||||
File: partial/logo_navigation.tmpl
|
||||
|
||||
Used: All views, called after from head.
|
||||
-->
|
||||
|
||||
<!-- TEST DATA :: BEGIN -->
|
||||
<!-- a/n: IF THE NAVIGATION LOOKS WIERD, PLEASE INCLUDE THIS INFO WHEN ASKING FOR HELP FIXING. -->
|
||||
<TMPL_IF NAME="PATH"><TMPL_LOOP NAME="PATH">
|
||||
<!-- PATH <TMPL_VAR NAME="PATHNAME"> -->
|
||||
</TMPL_LOOP>
|
||||
<TMPL_ELSE>
|
||||
<!-- SHIT -->
|
||||
</TMPL_IF>
|
||||
|
||||
<TMPL_IF NAME="CATEGORY" >
|
||||
<!-- CAT: <TMPL_VAR ESCAPE="HTML" NAME="CATEGORY" /> -->
|
||||
</TMPL_IF>
|
||||
<TMPL_IF NAME="NAME">
|
||||
<!-- NAME <TMPL_VAR ESCAPE="HTML" NAME="NAME"> -->
|
||||
<TMPL_ELSE>
|
||||
<!-- NO NAME -->
|
||||
</TMPL_IF>
|
||||
<!-- TEST DATA :: END -->
|
||||
|
||||
<TMPL_IF NAME="PATH">
|
||||
<nav aria-label="breadcrumb pt1">
|
||||
<ol class="breadcrumb">
|
||||
<TMPL_LOOP NAME="PATH">
|
||||
<li class="breadcrumb-item">
|
||||
<TMPL_IF NAME="PATHNAME">
|
||||
<TMPL_IF NAME="PATH"><a href="<TMPL_VAR NAME='PATH'>"></TMPL_IF>
|
||||
<TMPL_VAR NAME="PATHNAME">
|
||||
<TMPL_IF NAME="PATH"></a></TMPL_IF>
|
||||
<TMPL_ELSE>
|
||||
<a href="<TMPL_VAR NAME='R_PATH'>">Home</a>
|
||||
<TMPL_IF NAME="CATEGORY">
|
||||
<TMPL_IF NAME="TIMEDAY"></li><li class="breadcrumb-item">Category :: <TMPL_VAR NAME="CATEGORY" /> - by day</TMPL_IF>
|
||||
<TMPL_IF NAME="TIMEWEEK"></li><li class="breadcrumb-item">Category :: <TMPL_VAR NAME="CATEGORY" /> - by week</TMPL_IF>
|
||||
<TMPL_IF NAME="TIMEMONTH"></li><li class="breadcrumb-item">Category :: <TMPL_VAR NAME="CATEGORY" /> - by month</TMPL_IF>
|
||||
<TMPL_IF NAME="TIMEYEAR"></li><li class="breadcrumb-item">Category :: <TMPL_VAR NAME="CATEGORY" /> - by year</TMPL_IF>
|
||||
</TMPL_IF>
|
||||
</TMPL_IF>
|
||||
</li>
|
||||
</TMPL_LOOP>
|
||||
</ol>
|
||||
</nav>
|
||||
<TMPL_ELSE>
|
||||
<nav aria-label="breadcrumb pt2">
|
||||
<ol class="breadcrumb">
|
||||
<TMPL_IF NAME="NAME">
|
||||
<!-- 2.0.37 - Shouldn't get hit with new HTML generator -->
|
||||
<li class="breadcrumb-item"><a href="<TMPL_VAR NAME='R_PATH'>">Home</a></li>
|
||||
<li class="breadcrumb-item"><TMPL_VAR NAME="NAME" /></li>
|
||||
<TMPL_ELSE>
|
||||
<li class="breadcrumb-item">Home</li>
|
||||
</TMPL_IF>
|
||||
</ol>
|
||||
</nav>
|
||||
</TMPL_IF>
|
||||
|
||||
<TMPL_IF NAME="PEERS">
|
||||
<TMPL_INCLUDE NAME="bottom_navigation.tmpl">
|
||||
</TMPL_IF>
|
Loading…
Reference in New Issue