]> ruin.nu Git - ndwebbie.git/commitdiff
Show scan tick on cov op page
authorMichael Andreen <harv@ruin.nu>
Sat, 8 Nov 2008 21:32:25 +0000 (22:32 +0100)
committerMichael Andreen <harv@ruin.nu>
Sat, 8 Nov 2008 21:32:25 +0000 (22:32 +0100)
lib/NDWeb/Controller/CovOp.pm
root/src/covop/index.tt2

index 71ea3082823427db2022ce9a4dfb38edf7b79c06..fc95d33d989a7a3cde1b76b5bf08dcab8a5380d2 100644 (file)
@@ -52,13 +52,13 @@ sub list : Private {
        my $query = $dbh->prepare(q{SELECT id, coords, metal, crystal, eonium
                , covop_alert(seccents,structures,size,guards,gov,0) AS minalert
                , covop_alert(seccents,structures,size,guards,gov,50) AS maxalert
-               , distorters,gov
+               , distorters,gov,pstick,dstick
                , MaxResHack,co.tick AS lastcovop
                FROM (SELECT p.id,coords(x,y,z),size, metal,crystal,eonium,guards
                        ,seccents,NULLIF(ds.total::integer,0) AS structures,distorters
                        ,max_bank_hack(metal,crystal,eonium,p.value
                                ,(SELECT value FROM current_planet_stats WHERE id = ?)) AS MaxResHack
-                       , planet_status, relationship,gov
+                       , planet_status, relationship,gov,ps.tick AS pstick, ds.tick AS dstick
                        FROM current_planet_stats p
                                LEFT OUTER JOIN current_planet_scans ps ON p.id = ps.planet
                                LEFT OUTER JOIN current_development_scans ds ON p.id = ds.planet
index 1c44bee9c1b72cd5c672cf7b3e328d003eb4b6b5..3fbf25add98c40f150b50c5c827265fe11919e8b 100644 (file)
@@ -1,18 +1,22 @@
 [% META title = 'Covert operations' %]
 <table>
        <tr>
-       <th>Coords</th><th>Metal</th><th>Crystal</th><th>Eonium</th><th>Gov</th><th>Alert</th><th>Dists</th><th>Max (15 agents)</th><th>Last covop (tick)</th>
+               <th>Coords</th><th>Tick</th><th>Metal</th><th>Crystal</th><th>Eonium</th>
+               <th>Gov</th><th>Alert</th><th>Tick</th><th>Dists</th>
+               <th>Max (15 agents)</th><th>Last covop (tick)</th>
        </tr>
 
 [% debug(targets.size) %]
 [% FOR t IN targets %]
        <tr align="center" class="[% loop.count % 2 == 0 ? 'even' : 'odd' %]">
        <td><a href="[% c.uri_for('/stats/planet',t.id) %]">[% t.coords %]</a></td>
+       <td[% IF TICK - t.pstick > 6 %] class="OLD"[%END%]>[% t.pstick %]</td>
        <td>[% t.metal %]</td>
        <td>[% t.crystal %]</td>
        <td>[% t.eonium %]</td>
        <td>[% t.gov %]</td>
        <td>[% t.minalert %] - [% t.maxalert %]</td>
+       <td[% IF TICK - t.dstick > 6 %] class="OLD"[%END%]>[% t.dstick %]</td>
        <td>[% t.distorters %]</td>
        <td>[% t.maxreshack %]</td>
        <td>[% t.lastcovop %]</td>