Changeset 263


Ignore:
Timestamp:
Jun 26, 2018, 10:18:07 AM (2 years ago)
Author:
g7moreau
Message:
  • Move css style in an independant file velvice.css
Location:
trunk/nagios-velvice
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/nagios-velvice/Makefile

    r243 r263  
    55MANDIR=/usr/share/man/man1
    66SHAREDOCDIR=/usr/share/doc/nagios-velvice
     7STYLEDIR=/etc/nagios3/stylesheets
    78
    89.PHONY: all ignore install update sync upload stat help pkg
     
    1920        @install -d -m 0755 -o root -g root $(DESTDIR)/$(MANDIR)
    2021        @install -d -m 0755 -o root -g root $(DESTDIR)/$(SHAREDOCDIR)
     22        @install -d -m 0755 -o root -g root $(DESTDIR)/$(STYLEDIR)
    2123
    2224        install    -m 0755 -o root -g root velvice.cgi          $(DESTDIR)/$(CGIDIR)
     25        install    -m 0644 -o root -g root velvice.sample.yml   $(DESTDIR)/$(ETCDIR)
    2326        install    -m 0644 -o root -g root velvice.1.gz         $(DESTDIR)/$(MANDIR)
    24         install    -m 0644 -o root -g root velvice.sample.yml   $(DESTDIR)/$(ETCDIR)
    2527        install    -m 0644 -o root -g root LICENSE.txt          $(DESTDIR)/$(SHAREDOCDIR)
     28        install    -m 0644 -o root -g root velvice.html         $(DESTDIR)/$(SHAREDOCDIR)
     29        install    -m 0644 -o root -g root velvice.sample.yml   $(DESTDIR)/$(SHAREDOCDIR)
     30        install    -m 0644 -o root -g root velvice.css          $(DESTDIR)/$(STYLEDIR)
    2631
    2732sync:
  • trunk/nagios-velvice/make-package-debian

    r255 r263  
    1717
    1818# Create future tree
    19 mkdir -p ${tmp_folder}/etc/nagios3
     19mkdir -p ${tmp_folder}/etc/nagios3/stylesheets
    2020mkdir -p ${tmp_folder}/usr/lib/cgi-bin/nagios3
    2121mkdir -p ${tmp_folder}/usr/share/doc/nagios3-velvice
    2222mkdir -p ${tmp_folder}/usr/share/man/man1
    2323cp LICENSE.txt          ${tmp_folder}/usr/share/doc/nagios3-velvice/
     24cp velvice.html         ${tmp_folder}/usr/share/doc/nagios3-velvice/
     25cp velvice.sample.yml   ${tmp_folder}/usr/share/doc/nagios3-velvice/
    2426cp velvice.1.gz         ${tmp_folder}/usr/share/man/man1/
    2527cp velvice.cgi          ${tmp_folder}/usr/lib/cgi-bin/nagios3/
    2628cp velvice.sample.yml   ${tmp_folder}/etc/nagios3/
     29cp velvice.css          ${tmp_folder}/etc/nagios3/stylesheets/
    2730chmod ugo+rx         ${tmp_folder}/usr/lib/cgi-bin/nagios3/velvice.cgi
    2831chmod -R a+rX,go-w   ${tmp_folder}/usr
  • trunk/nagios-velvice/velvice.cgi

    r261 r263  
    1515use strict;
    1616use warnings;
    17 use version; our $VERSION = version->declare('0.6.6');
     17use version; our $VERSION = version->declare('0.7.1');
    1818
    1919use CGI;
     
    2828my $cgi_script_name = $query->script_name();
    2929my $cgi_path        = $cgi_script_name =~ s{/[^/]+\.cgi$}{}r;
     30undef $query;
    3031
    3132my $config = {};
     
    3637$config->{'nagios-server'}{'portal-url'}  ||= $cgi_path =~ s{/cgi-bin/}{/}r . '/';
    3738$config->{'nagios-server'}{'status-cgi'}  ||= "$cgi_path/status.cgi";
     39$config->{'nagios-server'}{'stylesheets'} ||= $config->{'nagios-server'}{'portal-url'} =~ s{/?$}{/stylesheets}r;
    3840$config->{'host-mapping'}                 ||= {};
    3941$config->{'color-downtime'}               ||= {};
     
    111113 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    112114 <title>Nagios  Velvice</title>
     115 <link rel="stylesheet" type="text/css" href="$config->{'nagios-server'}{'stylesheets'}/velvice.cgi">
    113116</head>
    114 <style type="text/css">
    115 /* https://stackoverflow.com/questions/14920401/how-to-simulate-hfill-with-html-and-css */
    116 h1 ul {
    117    display: flex;
    118    justify-content: space-between;
    119    }
    120 h1 li {
    121    display: inline;
    122    }
    123 td.bold {
    124    font-weight: bold;
    125    }
    126 </style>
    127117<body>
    128118<h1>
  • trunk/nagios-velvice/velvice.sample.yml

    r261 r263  
    55   portal-url:  https://srv-nagios.example.com/nagios3/
    66   status-cgi:  https://srv-nagios.example.com/cgi-bin/nagios3/status.cgi
     7   stylesheets: https://srv-nagios.example.com/nagios3/stylesheets
    78
    89host-mapping:
Note: See TracChangeset for help on using the changeset viewer.