From 6e1e01771cd86b3b58f4932aacb0cc496b5c376d Mon Sep 17 00:00:00 2001 From: Michael Andreen Date: Tue, 15 Jul 2008 23:28:37 +0200 Subject: [PATCH] Converted intel page --- NDWeb/Pages/Intel.pm | 240 ---------------------------------- database/group_roles.sql | 4 + lib/NDWeb.pm | 1 + lib/NDWeb/Controller/Intel.pm | 194 +++++++++++++++++++++++++++ lib/NDWeb/Include.pm | 2 +- root/lib/site/leftbar.tt2 | 7 +- root/src/intel/find.tt2 | 9 ++ root/src/intel/index.tt2 | 46 +++++++ root/src/intel/planet.tt2 | 117 +++++++++++++++++ t/controller_Intel.t | 10 ++ templates/intel.tmpl | 139 -------------------- 11 files changed, 388 insertions(+), 381 deletions(-) delete mode 100644 NDWeb/Pages/Intel.pm create mode 100644 lib/NDWeb/Controller/Intel.pm create mode 100644 root/src/intel/find.tt2 create mode 100644 root/src/intel/index.tt2 create mode 100644 root/src/intel/planet.tt2 create mode 100644 t/controller_Intel.t delete mode 100644 templates/intel.tmpl diff --git a/NDWeb/Pages/Intel.pm b/NDWeb/Pages/Intel.pm deleted file mode 100644 index 6e1d17f..0000000 --- a/NDWeb/Pages/Intel.pm +++ /dev/null @@ -1,240 +0,0 @@ -#************************************************************************** -# Copyright (C) 2006 by Michael Andreen * -# * -# This program is free software; you can redistribute it and/or modify * -# it under the terms of the GNU General Public License as published by * -# the Free Software Foundation; either version 2 of the License, or * -# (at your option) any later version. * -# * -# This program is distributed in the hope that it will be useful, * -# but WITHOUT ANY WARRANTY; without even the implied warranty of * -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -# GNU General Public License for more details. * -# * -# You should have received a copy of the GNU General Public License * -# along with this program; if not, write to the * -# Free Software Foundation, Inc., * -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * -#**************************************************************************/ - -package NDWeb::Pages::Intel; -use strict; -use warnings FATAL => 'all'; -use NDWeb::Forum; -use NDWeb::Include; -use ND::Include; -use CGI qw/:standard/; - -use base qw/NDWeb::XMLPage/; - -$NDWeb::Page::PAGES{intel} = __PACKAGE__; - -sub parse { - my $self = shift; - if ($self->{URI} =~ m{^/.*/((\d+)(?: |:)(\d+)(?: |:)(\d+))$}){ - param('coords',$1); - } -} - -sub render_body { - my $self = shift; - my ($BODY) = @_; - $self->{TITLE} = 'Intel'; - my $DBH = $self->{DBH}; - - return $self->noAccess unless $self->isIntel || $self->isHC; - - my $error; - - my $planet; - if (defined param('coords') && param('coords') =~ /^(\d+)(?: |:)(\d+)(?: |:)(\d+)$/){ - my $query = $DBH->prepare(q{SELECT x,y,z,coords(x,y,z),id, nick, alliance,alliance_id, planet_status,channel,ftid,gov FROM current_planet_stats - WHERE x = ? AND y = ? AND z = ?}); - $planet = $DBH->selectrow_hashref($query,undef,$1,$2,$3) or $ND::ERROR .= p $DBH->errstr; - } - - my $showticks = 'AND (i.tick - i.eta) > (tick() - 48)'; - if (defined param('show')){ - if (param('show') eq 'all'){ - $showticks = ''; - }elsif (param('show') =~ /^(\d+)$/){ - $showticks = "AND (i.tick - i.eta) > (tick() - $1)"; - } - } - - my $thread; - if (defined $planet){ - $thread = $DBH->selectrow_hashref(q{SELECT ftid AS id, subject FROM forum_threads - where ftid = $1},undef,$planet->{ftid}) or $ND::ERROR .= p($DBH->errstr); - } - - if (defined param('cmd') && param('cmd') eq 'coords'){ - my $coords = param('coords'); - $DBH->do(q{CREATE TEMPORARY TABLE coordlist ( - x integer NOT NULL, - y integer NOT NULL, - z integer NOT NULL, - PRIMARY KEY (x,y,z) - )}); - my $insert = $DBH->prepare(q{INSERT INTO coordlist (x,y,z) VALUES(?,?,?)}); - while ($coords =~ m/(\d+):(\d+):(\d+)/g){ - $insert->execute($1,$2,$3); - } - my $planets = $DBH->prepare(q{SELECT (((p.x || ':') || p.y) || ':') || p.z AS coords, alliance FROM current_planet_stats p - JOIN coordlist c ON p.x = c.x AND p.y = c.y AND p.z = c.z - ORDER BY alliance, p.x, p.y, p.z}); - $planets->execute; - my @planets; - while (my $planet = $planets->fetchrow_hashref){ - push @planets,$planet; - } - $BODY->param(CoordList => \@planets); - } - if (defined $thread and defined param('cmd') and param('cmd') eq 'forumpost'){ - addForumPost($DBH,$thread,$ND::UID,param('message')); - } - - if ($planet && defined param('cmd')){ - if (param('cmd') eq 'change'){ - $DBH->begin_work; - if (param('cnick')){ - my $value = escapeHTML(param('nick')); - if ($DBH->do(q{UPDATE planets SET nick = ? WHERE id =?} - ,undef,$value,$planet->{id})){ - intel_log $ND::UID,$planet->{id},"Set nick to: $value"; - $planet->{nick} = $value; - }else{ - $error .= "

Something went wrong: ".$DBH->errstr."

"; - } - } - if (param('cchannel')){ - my $value = escapeHTML(param('channel')); - if ($DBH->do(q{UPDATE planets SET channel = ? WHERE id =?} - ,undef,$value,$planet->{id})){ - intel_log $ND::UID,$planet->{id},"Set channel to: $value"; - $planet->{channel} = $value; - }else{ - $error .= "

Something went wrong: ".$DBH->errstr."

"; - } - } - if (param('cstatus')){ - my $value = escapeHTML(param('status')); - if ($DBH->do(q{UPDATE planets SET planet_status = ? WHERE id =?} - ,undef,$value,$planet->{id})){ - intel_log $ND::UID,$planet->{id},"Set planet_status to: $value"; - $planet->{planet_status} = $value; - }else{ - $error .= "

Something went wrong: ".$DBH->errstr."

"; - } - } - if (param('cgov')){ - my $value = escapeHTML(param('gov')); - if ($DBH->do(q{UPDATE planets SET gov = ? WHERE id =?} - ,undef,$value,$planet->{id})){ - intel_log $ND::UID,$planet->{id},"Set government to: $value"; - $planet->{gov} = $value; - }else{ - $error .= "

Something went wrong: ".$DBH->errstr."

"; - } - } - if (param('calliance')){ - if ($DBH->do(q{UPDATE planets SET alliance_id = NULLIF(?,-1) WHERE id =?} - ,undef,param('alliance'),$planet->{id})){ - intel_log $ND::UID,$planet->{id},"Set alliance_id to: ".param('alliance'); - $planet->{alliance_id} = param('alliance'); - }else{ - $error .= "

Something went wrong: ".$DBH->errstr."

"; - } - } - $DBH->commit or $error .= "

Something went wrong: ".$DBH->errstr."

"; - } - } - - if (param('coords')){ - my $channel = param('coords'); - $channel = $planet->{channel} if ($planet); - my $findchannel = $DBH->prepare('SELECT coords(x,y,z),alliance,nick,channel FROM current_planet_stats WHERE channel ILIKE ? '); - $findchannel->execute($channel); - my @channelusers; - while (my $user = $findchannel->fetchrow_hashref){ - push @channelusers,$user; - } - $BODY->param(ChannelUsers => \@channelusers); - } - - if ($planet){ - $BODY->param(Coords => $planet->{coords}); - $BODY->param(Planet => $planet->{id}); - $BODY->param(Nick => escapeHTML($planet->{nick})); - $BODY->param(Channel => $planet->{channel}); - my @gov; - for my $gov ("","Feu", "Dic", "Dem","Uni"){ - push @gov,{Gov => $gov, Selected => $gov eq $planet->{gov}} - } - $BODY->param(Gov => \@gov); - my @status; - for my $status ("","Friendly", "NAP", "Hostile"){ - push @status,{Status => $status, Selected => $status eq $planet->{planet_status}} - } - $BODY->param(PlanetStatus => \@status); - my @alliances = alliances($planet->{alliance_id}); - $BODY->param(Alliances => \@alliances); - - $BODY->param(Thread => viewForumThread $thread); - - my $query = $DBH->prepare(intelquery('o.alliance AS oalliance,coords(o.x,o.y,o.z) AS origin',"t.id = ? $showticks")); - $query->execute($planet->{id}) or $error .= $DBH->errstr; - my @intellists; - my @incomings; - while (my $intel = $query->fetchrow_hashref){ - if ($intel->{ingal}){ - $intel->{missionclass} = 'ingal'; - }else{ - $intel->{missionclass} = $intel->{mission}; - } - push @incomings,$intel; - } - push @intellists,{Message => 'Incoming fleets', Intel => \@incomings, Origin => 1}; - - $query = $DBH->prepare(intelquery('t.alliance AS talliance,coords(t.x,t.y,t.z) AS target',"o.id = ? $showticks")); - $query->execute($planet->{id}) or $error .= $DBH->errstr; - my @outgoings; - while (my $intel = $query->fetchrow_hashref){ - if ($intel->{ingal}){ - $intel->{missionclass} = 'ingal'; - }else{ - $intel->{missionclass} = $intel->{mission}; - } - push @outgoings,$intel; - } - push @intellists,{Message => 'Outgoing Fleets', Intel => \@outgoings, Target => 1}; - - $BODY->param(IntelLIsts => \@intellists); - - }elsif(!param('coords')){ - my $query = $DBH->prepare(intelquery('o.alliance AS oalliance,coords(o.x,o.y,o.z) AS origin, t.alliance AS talliance,coords(t.x,t.y,t.z) AS target',qq{not ingal - AND ((( t.alliance_id != o.alliance_id OR t.alliance_id IS NULL OR o.alliance_id IS NULL) AND (i.mission = 'Defend' OR i.mission = 'AllyDef' )) - OR ( t.alliance_id = o.alliance_id AND i.mission = 'Attack')) - AND i.sender NOT IN (SELECT planet FROM users u NATURAL JOIN groupmembers gm WHERE gid = 8 AND planet IS NOT NULL) - AND NOT (i.back IS NOT NULL AND i.back = i.tick + 4) - $showticks - })); - $query->execute() or $error .= $DBH->errstr; - - my @intellists; - my @intel; - while (my $intel = $query->fetchrow_hashref){ - if ($intel->{ingal}){ - $intel->{missionclass} = 'ingal'; - }else{ - $intel->{missionclass} = $intel->{mission}; - } - push @intel,$intel; - } - push @intellists,{Message => q{Intel where alliances doesn't match}, Intel => \@intel, Origin => 1, Target => 1}; - $BODY->param(IntelLIsts => \@intellists); - } - $BODY->param(Error => $error); - return $BODY; -} -1; diff --git a/database/group_roles.sql b/database/group_roles.sql index 8a51c2b..fa2fd16 100644 --- a/database/group_roles.sql +++ b/database/group_roles.sql @@ -31,6 +31,7 @@ INSERT INTO roles VALUES('stats_details'); INSERT INTO roles VALUES('stats_missions'); INSERT INTO roles VALUES('stats_scans'); INSERT INTO roles VALUES('stats_planetdata'); +INSERT INTO roles VALUES('intel'); INSERT INTO group_roles (gid,role) VALUES(2,'member_menu'); INSERT INTO group_roles (gid,role) VALUES(2,'attack_menu'); @@ -50,6 +51,7 @@ INSERT INTO group_roles (gid,role) VALUES(4,'raids_info'); INSERT INTO group_roles (gid,role) VALUES(4,'raids_edit'); INSERT INTO group_roles (gid,role) VALUES(5,'intel_menu'); +INSERT INTO group_roles (gid,role) VALUES(5,'intel'); INSERT INTO group_roles (gid,role) VALUES(8,'no_fleet_update'); @@ -68,6 +70,7 @@ INSERT INTO group_roles (gid,role) VALUES(1,'calls_list'); INSERT INTO group_roles (gid,role) VALUES(1,'calls_edit'); INSERT INTO group_roles (gid,role) VALUES(1,'raids_info'); INSERT INTO group_roles (gid,role) VALUES(1,'raids_edit'); +INSERT INTO group_roles (gid,role) VALUES(1,'intel'); INSERT INTO group_roles (gid,role) VALUES(3,'dc_menu'); INSERT INTO group_roles (gid,role) VALUES(3,'bc_menu'); @@ -81,3 +84,4 @@ INSERT INTO group_roles (gid,role) VALUES(3,'calls_list'); INSERT INTO group_roles (gid,role) VALUES(3,'calls_edit'); INSERT INTO group_roles (gid,role) VALUES(3,'raids_info'); INSERT INTO group_roles (gid,role) VALUES(3,'raids_edit'); +INSERT INTO group_roles (gid,role) VALUES(3,'intel'); diff --git a/lib/NDWeb.pm b/lib/NDWeb.pm index 135bcf6..4edbcd0 100644 --- a/lib/NDWeb.pm +++ b/lib/NDWeb.pm @@ -82,6 +82,7 @@ __PACKAGE__->allow_access_if('/raids/index',1); __PACKAGE__->allow_access_if('/raids/view',1); __PACKAGE__->allow_access_if('/raids/findRaid',1); __PACKAGE__->allow_access_if('/raids/log',1); +__PACKAGE__->deny_access_unless('/intel',[qw/intel/]); =head1 NAME diff --git a/lib/NDWeb/Controller/Intel.pm b/lib/NDWeb/Controller/Intel.pm new file mode 100644 index 0000000..f2cd52e --- /dev/null +++ b/lib/NDWeb/Controller/Intel.pm @@ -0,0 +1,194 @@ +package NDWeb::Controller::Intel; + +use strict; +use warnings; +use parent 'Catalyst::Controller'; + +use NDWeb::Include; + +=head1 NAME + +NDWeb::Controller::Intel - Catalyst Controller + +=head1 DESCRIPTION + +Catalyst Controller. + +=head1 METHODS + +=cut + + +=head2 index + +=cut + +sub index :Path : Args(0) { + my ( $self, $c ) = @_; + my $dbh = $c->model; + + my $ticks = $c->req->param('ticks') || 48; + $c->stash(showticks => $ticks); + + my $query = $dbh->prepare(intelquery q{ + o.alliance AS oalliance ,coords(o.x,o.y,o.z) AS ocoords, i.sender + ,t.alliance AS talliance,coords(t.x,t.y,t.z) AS tcoords, i.target + },q{not ingal + AND ((( t.alliance_id != o.alliance_id OR t.alliance_id IS NULL OR o.alliance_id IS NULL) AND (i.mission = 'Defend' OR i.mission = 'AllyDef' )) + OR ( t.alliance_id = o.alliance_id AND i.mission = 'Attack')) + AND i.sender NOT IN (SELECT planet FROM users u NATURAL JOIN groupmembers gm WHERE gid = 8 AND planet IS NOT NULL) + AND NOT (i.back IS NOT NULL AND i.back = i.tick + 4) + AND i.tick > (tick() - $1) + }); + $query->execute($ticks); + $c->stash(intel => $query->fetchall_arrayref({}) ); + + if (defined $c->req->param('coords')){ + my $coords = $c->req->param('coords'); + my @coords; + while ($coords =~ m/(\d+:\d+:\d+)/g){ + push @coords,$1; + } + my $planets = $dbh->prepare(q{SELECT id,coords(x,y,z), alliance + FROM current_planet_stats p + WHERE coords(x,y,z) = ANY($1) + ORDER BY alliance, p.x, p.y, p.z + }); + $planets->execute(\@coords); + $c->stash(coordslist => $planets->fetchall_arrayref({}) ); + } +} + +sub planet : Local { + my ( $self, $c, $id ) = @_; + my $dbh = $c->model; + + $c->forward('findPlanet'); + my $p = $c->stash->{p}; + + $c->stash(checkcoords => "$p->{x}:$p->{y}:$p->{z}"); + my $ticks = $c->req->param('ticks') || 48; + $c->stash(showticks => $ticks); + + my $query = $dbh->prepare(q{SELECT id,coords(x,y,z),alliance,nick,channel + FROM current_planet_stats WHERE channel ILIKE ? + ORDER BY alliance,x,y,z + }); + $query->execute($p->{channel}); + $c->stash(channelusers => $query->fetchall_arrayref({}) ); + + $c->forward('/listAlliances'); + $c->forward('/forum/findPosts',[$p->{ftid}]); + + $c->stash(govs => ["","Feu", "Dic", "Dem","Uni"]); + $c->stash(planetstatus => ["","Friendly", "NAP", "Hostile"]); + + $query = $dbh->prepare(intelquery q{i.sender + ,o.alliance AS oalliance,coords(o.x,o.y,o.z) AS ocoords + },q{i.target = $1 AND i.tick > (tick() - $2)}); + $query->execute($id,$ticks); + $c->stash(incoming => $query->fetchall_arrayref({}) ); + + $query = $dbh->prepare(intelquery q{i.target + ,t.alliance AS talliance,coords(t.x,t.y,t.z) AS tcoords + },q{i.sender = $1 AND i.tick > (tick() - $2)}); + $query->execute($id,$ticks); + $c->stash(outgoing => $query->fetchall_arrayref({}) ); + +} + +sub postplanetcomment : Local { + my ($self, $c, $p) = @_; + + $c->forward('findPlanet'); + $p = $c->stash->{p}; + + $c->forward('/forum/insertPost',[$p->{ftid}]); + $c->res->redirect($c->uri_for('planet',$p->{id})); +} + +sub postplanetupdate : Local { + my ($self, $c, $p) = @_; + my $dbh = $c->model; + + $c->forward('findPlanet'); + $p = $c->stash->{p}; + + $dbh->begin_work; + my $log = $dbh->prepare(q{INSERT INTO forum_posts (ftid,uid,message) + VALUES($2,$1,$3) + }); + if ($c->req->param('cnick')){ + my $value = html_escape $c->req->param('nick'); + $dbh->do(q{UPDATE planets SET nick = ? WHERE id =?} + ,undef,$value,$p->{id}); + $log->execute($c->user->id,$p->{ftid},"Set nick to: $value"); + } + if ($c->req->param('cchannel')){ + my $value = html_escape $c->req->param('channel'); + $dbh->do(q{UPDATE planets SET channel = ? WHERE id =?} + ,undef,$value,$p->{id}); + $log->execute($c->user->id,$p->{ftid},"Set channel to: $value"); + } + if ($c->req->param('cstatus')){ + my $value = $c->req->param('status'); + $dbh->do(q{UPDATE planets SET planet_status = ? WHERE id =?} + ,undef,$value,$p->{id}); + $log->execute($c->user->id,$p->{ftid},"Set planet_status to: $value"); + } + if ($c->req->param('cgov')){ + my $value = $c->req->param('gov'); + $dbh->do(q{UPDATE planets SET gov = ? WHERE id =?} + ,undef,$value,$p->{id}); + $log->execute($c->user->id,$p->{ftid},"Set gov to: $value"); + } + if ($c->req->param('calliance')){ + my $value = $c->req->param('alliance'); + $dbh->do(q{UPDATE planets SET alliance_id = NULLIF(?,-1) WHERE id =?} + ,undef,$value,$p->{id}); + $log->execute($c->user->id,$p->{ftid},"Set alliance_id to: $value"); + } + $dbh->commit; + + $c->res->redirect($c->uri_for('planet',$p->{id})); +} + + +sub find : Local { + my ( $self, $c, $find ) = @_; + my $dbh = $c->model; + + local $_ = $find || $c->req->param('coords'); + + if (/(\d+)(?: |:)(\d+)(?: |:)(\d+)(?:(?: |:)(\d+))?/){ + my $planet = $dbh->selectrow_array(q{SELECT planetid($1,$2,$3,$4)} + ,undef,$1,$2,$3,$4); + $c->res->redirect($c->uri_for('planet',$planet)); + } +} + +sub findPlanet : Private { + my ( $self, $c, $id ) = @_; + my $dbh = $c->model; + + my $query = $dbh->prepare(q{SELECT x,y,z,id, nick, alliance,alliance_id + , planet_status,channel,ftid,gov + FROM current_planet_stats + WHERE id = $1 + }); + $query->execute($id); + $c->stash(p => $query->fetchrow_hashref); +} + + +=head1 AUTHOR + +Michael Andreen (harv@ruin.nu) + +=head1 LICENSE + +GPL 2.0, or later. + +=cut + +1; diff --git a/lib/NDWeb/Include.pm b/lib/NDWeb/Include.pm index 5bea31b..1974724 100644 --- a/lib/NDWeb/Include.pm +++ b/lib/NDWeb/Include.pm @@ -79,7 +79,7 @@ FROM (fleets i NATURAL JOIN users u) JOIN current_planet_stats t ON i.target = t.id JOIN current_planet_stats o ON i.sender = o.id WHERE $where -GROUP BY i.tick,i.mission,t.x,t.y,t.z,o.x,o.y,o.z,i.amount,i.ingal,u.username,t.alliance,o.alliance,t.nick,o.nick +GROUP BY i.tick,i.mission,t.x,t.y,t.z,o.x,o.y,o.z,i.amount,i.ingal,u.username,t.alliance,o.alliance,t.nick,o.nick,i.sender,i.target ORDER BY i.tick DESC, i.mission}; } diff --git a/root/lib/site/leftbar.tt2 b/root/lib/site/leftbar.tt2 index fe04fd0..fc7258c 100644 --- a/root/lib/site/leftbar.tt2 +++ b/root/lib/site/leftbar.tt2 @@ -83,7 +83,12 @@ [% IF c.check_user_roles("intel_menu") %]

Intel menu

[% END %] [% IF c.check_user_roles("hc_menu") %] diff --git a/root/src/intel/find.tt2 b/root/src/intel/find.tt2 new file mode 100644 index 0000000..55a9e50 --- /dev/null +++ b/root/src/intel/find.tt2 @@ -0,0 +1,9 @@ +[% META title = 'Find' %] + +

Could not find: "[% c.req.param('coords') | html %]"

+ +

The following syntaxes are possible:

+ diff --git a/root/src/intel/index.tt2 b/root/src/intel/index.tt2 new file mode 100644 index 0000000..cb96bf9 --- /dev/null +++ b/root/src/intel/index.tt2 @@ -0,0 +1,46 @@ +[% META title = 'Intel' %] + +[% IF coordslist %] + + + [% FOR p IN coordslist %] + + + + + [% END %] +
CoordsAlliance
[% p.coords %][% p.alliance %]
+[% END %] + + +
+

Show last ticks

+
+ + + + + + + + +[% FOR i IN intel %] + + + + + + + + + + + +[% END %] +
AllianceSenderMissionLanding tickETAAmountTargetAllianceReported by
[% i.oalliance %][% i.ocoords %][% i.mission %][% i.landingtick %][% i.eta %][% i.amount %][% i.tcoords %][% i.talliance %][% i.username %]
+ +
Coords +

Paste a list of coords that you want to check here

+ +
+
diff --git a/root/src/intel/planet.tt2 b/root/src/intel/planet.tt2 new file mode 100644 index 0000000..cb7aae7 --- /dev/null +++ b/root/src/intel/planet.tt2 @@ -0,0 +1,117 @@ +[% META title = 'Intel' %] + +
+
+

Show last ticks

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueChange?
Nick
Channel
Government
Planet status
Alliance
+

+

+
+ +[% IF channelusers.size > 0 %] + + + + + [% FOR cu IN channelusers %] + + + + + [% END %] +
CoordsAllianceNickChannel
[% cu.coords %][% cu.alliance %][% cu.nick %][% cu.channel %]
+[% END %] + + + + + + +[% FOR i IN incoming %] + + + + + + + + + + +[% END %] +
AllianceSenderMissionLanding tickETAAmountIngalReported by
[% i.oalliance %][% i.ocoords %][% i.mission %][% i.landingtick %][% i.eta %][% i.amount %][% i.ingal %][% i.username %]
+ + + + + + + +[% FOR i IN outgoing %] + + + + + + + + + + +[% END %] +
MissionLanding tickETAAmountTargetAllianceIngalReported by
[% i.mission %][% i.landingtick %][% i.eta %][% i.amount %][% i.tcoords %][% i.talliance %][% i.ingal %][% i.username %]
+
+ +
+[% FOR post IN posts %] +
+[% post.username %] : [% post.time %] + [% post.message %] +
+[% END %] + +
New Reply + + +
+
diff --git a/t/controller_Intel.t b/t/controller_Intel.t new file mode 100644 index 0000000..fbe201d --- /dev/null +++ b/t/controller_Intel.t @@ -0,0 +1,10 @@ +use strict; +use warnings; +use Test::More tests => 3; + +BEGIN { use_ok 'Catalyst::Test', 'NDWeb' } +BEGIN { use_ok 'NDWeb::Controller::Intel' } + +ok( request('/intel')->is_success, 'Request should succeed' ); + + diff --git a/templates/intel.tmpl b/templates/intel.tmpl deleted file mode 100644 index fca56eb..0000000 --- a/templates/intel.tmpl +++ /dev/null @@ -1,139 +0,0 @@ - -
-

- - - -

-
-

Show all ticks

- - - - - - - - - - -
CoordsAlliance
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueChange?
Nick
Channel
Government
Planet status
Alliance
-

-

-
-
- -

Planets sharing this channel

- - - - - - - - - - -
CoordsAllianceNickChannel
-
-
- - -
- -
New Reply - - - - - -
- -
-
-
- - -

- - - - - - - - - - - - - - - - - - - - - - - - - -
AllianceSenderMissionLanding tickETAAmountTargetAllianceIngalReported by
-
- -
Coords -

Paste a list of coords that you want to check here

- - - -
-
-- 2.39.2