-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of baltig.sandia.gov:scot/SCOT
- Loading branch information
Showing
111 changed files
with
30,476 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,4 @@ scot-debug.js | |
scot-ui/build/static/js/ | ||
scot-ui/build/ | ||
.vscode/ | ||
emailapi.cfg.pl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM sandialabs/scot_perl | ||
|
||
#Create log directory | ||
RUN mkdir -p /var/log/scot | ||
RUN mkdir -p /opt/scot | ||
|
||
COPY install/src/scot/ /opt/scot/etc/ | ||
COPY bin/rfproxy.pl /opt/scot/bin/ | ||
|
||
CMD ["/usr/bin/perl", "/opt/scot/bin/rfproxy.pl"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/usr/bin/env perl | ||
|
||
use strict; | ||
use warnings; | ||
use v5.16; | ||
|
||
use lib '../../Scot-Internal-Modules/lib'; | ||
use lib '../lib'; | ||
use lib '/opt/scot/lib'; | ||
use Scot::App::Mail; | ||
use Scot::Env; | ||
use Data::Dumper; | ||
use DateTime; | ||
|
||
my $config_file = $ENV{'scot_config_file'} // | ||
'/opt/scot/etc/scot.cfg.pl'; | ||
|
||
my $env = Scot::Env->new( | ||
config_file => $config_file, | ||
); | ||
|
||
my $mongo = $env->mongo; | ||
my $collection = $mongo->collection('Event'); | ||
my $cursor = $collection->find();; | ||
my %results; | ||
|
||
while (my $ag = $cursor->next) { | ||
my $created = $ag->created; | ||
my $dt = DateTime->from_epoch( epoch => $created ); | ||
my $year = $dt->year; | ||
my $month = $dt->month; | ||
$results{$year}{$month}++; | ||
} | ||
|
||
say "event counts"; | ||
say "Year, Month, Amount"; | ||
foreach my $y (sort {$a<=>$b} keys %results) { | ||
foreach my $m (sort {$a<=>$b} keys %{$results{$y}} ) { | ||
say "$y-$m, $results{$y}{$m}"; | ||
} | ||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.