onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
"Tree::AdjacencyList",
"UUIDColumns",
);
__PACKAGE__->table("sessions");
__PACKAGE__->add_c
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
"Tree::AdjacencyList",
"UUIDColumns",
);
__PACKAGE__->table("users");
__PACKAGE__->add_colu
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
"Tree::AdjacencyList",
"UUIDColumns",
);
__PACKAGE__->table("jobs");
__PACKAGE__->add_colum
lete", "broken", "canceled"],
},
is_nullable => 0,
},
"parameters",
{ data_type => "jsonb", is_nullable => 1 },
"test_file_id",
{ data_type => "uuid", is_foreign_key => 1, is_nullabl
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
"Tree::AdjacencyList",
"UUIDColumns",
);
__PACKAGE__->table("coverage_manager");
__PACKAGE_
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
"Tree::AdjacencyList",
"UUIDColumns",
);
__PACKAGE__->table("coverage");
__PACKAGE__->add_c
e => "uuid", is_foreign_key => 1, is_nullable => 1, size => 16 },
"metadata",
{ data_type => "jsonb", is_nullable => 1 },
);
__PACKAGE__->set_primary_key("coverage_id");
__PACKAGE__->add_unique_co
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
"Tree::AdjacencyList",
"UUIDColumns",
);
__PACKAGE__->table("source_files");
__PACKAGE__->a
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
"Tree::AdjacencyList",
"UUIDColumns",
);
__PACKAGE__->table("session_hosts");
__PACKAGE__->
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
"Tree::AdjacencyList",
"UUIDColumns",
);
__PACKAGE__->table("test_files");
__PACKAGE__->add
use Data::GUID;
use Test2::Harness::UI::Response qw/resp error/;
use Test2::Harness::Util::JSON qw/encode_json/;
use parent 'Test2::Harness::UI::Controller';
use Test2::Harness::UI::Util::HashBase qw
[];
while (my $run = $runs->next) {
push @$data => $run->TO_JSON;
}
$res->content_type('application/json');
$res->raw_body($data);
return $res;
}
1;
__END__
=pod
=en
esp error/;
use Test2::Harness::UI::Util qw/share_dir find_job/;
use Test2::Harness::Util::JSON qw/encode_json/;
use parent 'Test2::Harness::UI::Controller';
use Test2::Harness::UI::Util::HashBase qw
out;
$res->stream(
env => $req->env,
content_type => 'application/x-jsonl; charset=utf-8',
done => sub {
return 0 if @out;
return 0 if @s
rs->search({run_id => $lookup})->first };
return () unless $run;
return (
encode_json({type => 'run', data => $run }) . "\n",
);
}
sub lookup_jobs {
my $self = shift;
my
eper;
use Test2::Harness::UI::Response qw/resp error/;
use Test2::Harness::Util::JSON qw/encode_json encode_pretty_json/;
use parent 'Test2::Harness::UI::Controller';
use Test2::Harness::UI::Util::Ha
tent_type($ct);
if ($ct eq 'application/json') {
$res->raw_body($purged);
}
else {
$res->raw_body("<pre>" . encode_pretty_json($purged) . "</pre>");
}
return $res
st_name/;
use Test2::Harness::UI::Response qw/resp error/;
use Test2::Harness::Util::JSON qw/encode_json decode_json/;
use Test2::Harness::UI::UUID qw/uuid_deflate uuid_inflate/;
use parent 'Test2::H
my $json = $req->content;
my $stats = decode_json($json);
my $res = resp(200);
$res->stream(
env => $req->env,
content_type => 'application/x-jsonl; charse
{
my $data = $self->build_stat($project => shift(@$stats));
return encode_json($data) . "\n";
},
);
return $res;
}
my %VALID_TYPES = (
run_list
Text::Xslate();
use Test2::Harness::UI::UUID qw/uuid_inflate/;
use Test2::Harness::Util::JSON qw/decode_json/;
use Test2::Harness::Util qw/open_file/;
use Test2::Harness::UI::Queries();
use Test2:
=> [share_dir('templates')]);
my $user = $req->user;
if ($req->parameters->{json}) {
$res->as_json($run_id ? (run_id => $run_id) : ());
return $res;
}
$res->add_css('
| 'qvfd';
return $res->add_error("Unsupported file type, must be .jsonl.bz2, or .jsonl.gz")
unless $file =~ m/\.jsonl\.(bz2|gz)$/i;
my $ext = lc($1);
my ($run_id);
my $ok = e
qw/max/;
use Test2::Harness::UI::Response qw/resp error/;
use Test2::Harness::Util::JSON qw/encode_json decode_json/;
use Test2::Harness::UI::UUID qw/uuid_inflate/;
use parent 'Test2::Harness::UI::C
event_ord'};
if ($route->{from} eq 'single_event') {
$res->content_type('application/json');
$res->raw_body($event);
return $res;
}
if ($p->{load_subtests}) {
);
$res->stream(
env => $req->env,
content_type => 'application/x-jsonl; charset=utf-8',
resultset => $rs,
data_method => 'st_line_data',
);
ob/;
use Test2::Harness::UI::Util::DateTimeFormat qw/DTF/;
use Test2::Harness::Util::JSON qw/encode_json decode_json/;
use Test2::Util::Times qw/render_duration/;
use Test2::Harness::UI::UUID qw/uuid_
};
$res->stream(
env => $req->env,
content_type => 'application/x-jsonl; charset=utf-8',
done => $advance,
fetch => sub {
return ()
ift @out or return ();
$complete = 1 if $item->{complete};
return encode_json($item) . "\n";
},
);
return $res;
}
sub data {
my $self = shift;
my ($r
-config -worker_id/;
use Test2::Harness::UI::UUID qw/gen_uuid/;
use Test2::Harness::Util::JSON qw/decode_json/;
use IO::Uncompress::Bunzip2 qw($Bunzip2Error);
use IO::Uncompress::Gunzip qw($GunzipE
next if $line =~ m/^null$/ims;
my $ln = $.;
my $error = $self->process_event_json($processor, $ln => $line);
return {errors => ["error processing line number $ln: $error"
return $status;
}
sub process_event_json {
my $self = shift;
my ($processor, $ln, $json) = @_;
my $ok = eval {
my $event = decode_json($json);
$processor->process_event(
ind_job/;
use Test2::Harness::UI::Response qw/resp error/;
use Test2::Harness::Util::JSON qw/encode_json decode_json/;
use parent 'Test2::Harness::UI::Controller';
use Test2::Harness::UI::Util::HashB
|| $job->name) . ' - ' . $job->job_id . '+' . $job->job_try;
$res->content_type('application/json');
$res->raw_body($job);
return $res;
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
000144';
use Test2::Harness::UI::Response qw/resp error/;
use Test2::Harness::Util::JSON qw/encode_json decode_json/;
use parent 'Test2::Harness::UI::Controller';
use Test2::Harness::UI::Util::HashB
ntent_type => 'application/x-jsonl',
done => sub { !@$data },
fetch => sub {
my $item = shift @$data or return;
return encode_json($item) . "\n";
},
use Test2::Harness::UI::Response qw/resp error/;
use Test2::Harness::Util::JSON qw/encode_json encode_pretty_json decode_json/;
use Test2::Harness::UI::UUID qw/uuid_inflate/;
use parent 'Test2::Harne
tent_type => 'application/x-jsonl; charset=utf-8',
cache => 0,
headers => ["content-disposition" => 'attachment; filename="coverage.jsonl"'],
done => s
fetch => sub {
if (my $item = $iter->()) {
return encode_json($item) . "\n";
}
else {
$done = 1;
are_dir/;
use Test2::Harness::UI::Response qw/resp error/;
use Test2::Harness::Util::JSON qw/encode_json decode_json/;
use Test2::Harness::UI::UUID qw/uuid_inflate/;
use parent 'Test2::Harness::UI::C