File Coverage

blib/lib/App/AquariumHive/Plugin/Cron.pm
Criterion Covered Total %
statement 10 14 71.4
branch n/a
condition n/a
subroutine 4 6 66.6
pod 0 1 0.0
total 14 21 66.6


line stmt bran cond sub pod time code
1             package App::AquariumHive::Plugin::Cron;
2             BEGIN {
3 1     1   1124 $App::AquariumHive::Plugin::Cron::AUTHORITY = 'cpan:GETTY';
4             }
5             $App::AquariumHive::Plugin::Cron::VERSION = '0.002';
6 1     1   5 use Moo;
  1         1  
  1         6  
7 1     1   564 use App::AquariumHive::Tile;
  1         3  
  1         32  
8 1     1   6 use JSON::MaybeXS;
  1         1  
  1         189  
9              
10             with qw(
11             App::AquariumHive::Role
12             );
13              
14             sub BUILD {
15 0     0 0   my ( $self ) = @_;
16              
17 0           $self->add_tile( 'cron' => App::AquariumHive::Tile->new(
18             id => 'cron',
19             bgcolor => 'blue',
20             content => <<"__HTML__",
21              
22             <h1 class="text-center">
23             <i class="icon-chronometer"></i>
24             </h1>
25              
26             __HTML__
27             js => <<"__JS__",
28              
29             \$('#cron').click(function(){
30             call_app('cron');
31             });
32              
33             __JS__
34             ));
35              
36             $self->web_mount( 'cron', sub {
37 0     0     return [ 200, [ "Content-Type" => "application/json" ], [encode_json({
38             html => <<__HTML__,
39             <h1 class="text-center">Ablauf Management</h1>
40             <hr/>
41              
42             __HTML__
43             })] ];
44 0           });
45              
46             }
47              
48             1;
49              
50             __END__
51              
52             =pod
53              
54             =head1 NAME
55              
56             App::AquariumHive::Plugin::Cron
57              
58             =head1 VERSION
59              
60             version 0.002
61              
62             =head1 DESCRIPTION
63              
64             B<IN DEVELOPMENT, DO NOT USE YET>
65              
66             See L<http://aquariumhive.com/> for now.
67              
68             =head1 SUPPORT
69              
70             IRC
71              
72             Join #AquariumHive on irc.freenode.net. Highlight Getty for fast reaction :).
73              
74             Repository
75              
76             https://github.com/homehivelab/aquariumhive
77             Pull request and additional contributors are welcome
78              
79             Issue Tracker
80              
81             https://github.com/homehivelab/aquariumhive/issues
82              
83             =head1 AUTHOR
84              
85             Torsten Raudssus <torsten@raudss.us>
86              
87             =head1 COPYRIGHT AND LICENSE
88              
89             This software is copyright (c) 2014 by Torsten Raudssus.
90              
91             This is free software; you can redistribute it and/or modify it under
92             the same terms as the Perl 5 programming language system itself.
93              
94             =cut