Projet

Général

Profil

Révision 46f383f9

ID46f383f92cdf048936fe6523b9a663a25dcb75e2
Parent 5a373466
Enfant 0cfcf2cc

Ajouté par Romain MAZIERE il y a plus de 5 ans

Fix geowebcache-blankitems

Voir les différences:

plugins/geowebcache/geowebcache-blankitems
1 1
#!/usr/bin/perl
2 2
# -*- perl -*-
3 3

  
4
# Author Rodolphe Qui?deville <rodolphe@quiedeville.org>
4
# Author Rodolphe Quiédeville <rodolphe@quiedeville.org>
5 5
# Licence : GPLv2
6 6
# Code based on tomcat_volume plugin by
7
# Rune Nordb?e Skillingstad <runesk@linpro.no>
7
# Rune Nordbøe Skillingstad <runesk@linpro.no>
8 8

  
9 9
=head1 NAME
10 10

  
......
41 41

  
42 42
=head1 AUTHOR
43 43

  
44
Rodolphe Qui?deville <rodolphe@quiedeville.org>
44
Rodolphe Quiédeville <rodolphe@quiedeville.org>
45 45

  
46 46
=head1 USAGE
47 47

  
......
112 112
my $ua = LWP::UserAgent->new(timeout => $TIMEOUT);
113 113
my $response = $ua->request(HTTP::Request->new('GET',$url));
114 114

  
115
if ($response->content =~ '<tr><td colspan="2">Blank/KML/HTML:</td><td colspan="3">(\d+\.?\d+)% of requests</td></tr>') {
115
if ($response->content =~ '<tr><th colspan="2" scope="row">Blank/KML/HTML:</th><td colspan="3">(\d+\.?\d+)% of requests</td></tr>') {
116 116
    my $value = $1;
117 117
    $value = $value * 1024 if ($2 eq 'k');
118 118
    $value = $value * 1024 * 1024 if ($2 eq 'm');
119
    print "blank.value " . $value;
119
    print "blank.value " . $value . "\n";
120 120
} else {
121 121
    print "blank.value U\n";
122 122
}

Formats disponibles : Unified diff