diff --git a/app/Database/migrations/2017_12_20_005147_create_acars_tables.php b/app/Database/migrations/2017_12_20_005147_create_acars_tables.php index ee7a087b..14be0fd3 100644 --- a/app/Database/migrations/2017_12_20_005147_create_acars_tables.php +++ b/app/Database/migrations/2017_12_20_005147_create_acars_tables.php @@ -29,6 +29,7 @@ class CreateAcarsTables extends Migration $table->unsignedInteger('gs')->nullable(); $table->unsignedInteger('transponder')->nullable(); $table->string('autopilot')->nullable(); + $table->decimal('fuel')->nullable(); $table->decimal('fuel_flow')->nullable(); $table->string('sim_time')->nullable(); diff --git a/app/Database/seeds/in_progress.yml b/app/Database/seeds/in_progress.yml new file mode 100644 index 00000000..44490d83 --- /dev/null +++ b/app/Database/seeds/in_progress.yml @@ -0,0 +1,1075 @@ +acars: + - + id: aOYyrOopomBd + pirep_id: dNk9qNnojYKe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '17.934786422889' + lon: '-76.778003584686' + heading: '292' + altitude: '8.1515683516007' + vs: '0' + gs: '0' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-01 23:49:04' + updated_at: '2018-05-01 23:49:04' + - + id: bW67DZA551Ja + pirep_id: dNk9qNnojYKe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '17.934786432775' + lon: '-76.77800361008' + heading: '292' + altitude: '8.1583404581437' + vs: '0' + gs: '0.0074230431465574' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 00:28:36' + updated_at: '2018-05-02 00:28:36' + - + id: erkRwJWQnr4a + pirep_id: dNk9qNnojYKe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '17.934786689673' + lon: '-76.77800427491' + heading: '292' + altitude: '8.1583200798013' + vs: '0' + gs: '0.0063170024918172' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 00:28:58' + updated_at: '2018-05-02 00:28:58' + - + id: bmZQoAzRGYAd + pirep_id: dNk9qNnojYKe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '17.934786863364' + lon: '-76.778004724083' + heading: '292' + altitude: '8.1583258454302' + vs: '0' + gs: '0.0062211738290854' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 00:29:13' + updated_at: '2018-05-02 00:29:13' + - + id: mbk8EolwQOEd + pirep_id: dNk9qNnojYKe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '17.934787031837' + lon: '-76.778005160205' + heading: '292' + altitude: '8.1583950316794' + vs: '0' + gs: '0.0074284254152491' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 00:29:28' + updated_at: '2018-05-02 00:29:28' + - + id: bYEvG2JvOJAb + pirep_id: dNk9qNnojYKe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '17.934787200997' + lon: '-76.778005597894' + heading: '292' + altitude: '8.1583980328179' + vs: '0' + gs: '0.0056652719315407' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 00:29:43' + updated_at: '2018-05-02 00:29:43' + - + id: ejRqlxwJ5Ave + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '17.934787330613' + lon: '-76.778005933186' + heading: '292' + altitude: '8.1584579148505' + vs: '0' + gs: '0' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 00:31:21' + updated_at: '2018-05-02 00:31:21' + - + id: bkRZmyxPQwva + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '17.934787413408' + lon: '-76.778006147368' + heading: '292' + altitude: '8.1587934295896' + vs: '0' + gs: '0.0057051356580496' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 00:32:10' + updated_at: '2018-05-02 00:32:10' + - + id: lejZDnk5qMWe + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '17.934788873785' + lon: '-76.778009925791' + heading: '292' + altitude: '8.1591462785382' + vs: '0' + gs: '0.0087238823686628' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 00:35:15' + updated_at: '2018-05-02 00:35:15' + - + id: aM8QpMPDAMPe + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '17.934842509128' + lon: '-76.778532656292' + heading: '223' + altitude: '8.1607914299049' + vs: '0' + gs: '6.4202715128239' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 00:35:30' + updated_at: '2018-05-02 00:35:30' + - + id: aQW0wQl1jz7d + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '17.934617196721' + lon: '-76.778605526212' + heading: '194' + altitude: '8.1632128918151' + vs: '0' + gs: '0.78235724264669' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 00:35:45' + updated_at: '2018-05-02 00:35:45' + - + id: eVOPBYqAPWMa + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '17.934300718688' + lon: '-76.778703210335' + heading: '176' + altitude: '8.1666375744461' + vs: '0' + gs: '6.8945587994399' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 00:36:00' + updated_at: '2018-05-02 00:36:00' + - + id: epYQ0EpZyp1a + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '17.934118452794' + lon: '-76.77856797319' + heading: '124' + altitude: '8.166254969636' + vs: '0' + gs: '0.0063371483834717' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 00:36:15' + updated_at: '2018-05-02 00:36:15' + - + id: b2kv53PWlqKd + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '17.934118203036' + lon: '-76.778567591848' + heading: '124' + altitude: '8.1663702576785' + vs: '0' + gs: '0.0070555182089322' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 00:36:30' + updated_at: '2018-05-02 00:36:30' + - + id: aM8QpMPEB15e + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '17.934117958358' + lon: '-76.77856721815' + heading: '124' + altitude: '8.1663703232199' + vs: '0' + gs: '0.0064996252497234' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 00:36:45' + updated_at: '2018-05-02 00:36:45' + - + id: eZ6VJ3xj8vge + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '17.934117498661' + lon: '-76.778566516289' + heading: '124' + altitude: '8.1664622222087' + vs: '0' + gs: '0' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 00:40:16' + updated_at: '2018-05-02 00:40:16' + - + id: bo2QqDLl2lLa + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '17.933884143334' + lon: '-76.778210172233' + heading: '124' + altitude: '8.1707802663933' + vs: '0' + gs: '14.419195209695' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:22:25' + updated_at: '2018-05-02 01:22:25' + - + id: aM8QpM4qV2Be + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '17.933705349611' + lon: '-76.777936938059' + heading: '124' + altitude: '8.170089899507' + vs: '0' + gs: '15.392330039049' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:22:55' + updated_at: '2018-05-02 01:22:55' + - + id: dR6oxR9qjoOd + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '17.933130691906' + lon: '-76.777152737985' + heading: '158' + altitude: '8.1683570286331' + vs: '0' + gs: '10.450467475023' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:23:10' + updated_at: '2018-05-02 01:23:10' + - + id: erkRwJODRvEa + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '17.932580370289' + lon: '-76.777450200122' + heading: '221' + altitude: '8.1695896791822' + vs: '0' + gs: '12.932334300694' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:23:25' + updated_at: '2018-05-02 01:23:25' + - + id: b2kv53VMy7Ad + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '17.932012550651' + lon: '-76.778009113329' + heading: '296' + altitude: '8.1683852467213' + vs: '0' + gs: '10.502719192825' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:23:41' + updated_at: '2018-05-02 01:23:41' + - + id: eXDoE14JxAve + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '17.932052237309' + lon: '-76.778111495187' + heading: '290' + altitude: '8.1719753739837' + vs: '0' + gs: '12.643743277153' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:23:42' + updated_at: '2018-05-02 01:23:42' + - + id: b68R5gZ5YyOe + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '17.932664026837' + lon: '-76.779705339967' + heading: '293' + altitude: '8.2203963962548' + vs: '0' + gs: '64.870244840054' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:23:52' + updated_at: '2018-05-02 01:23:52' + - + id: bqxYvGNN5N0a + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '17.934300220408' + lon: '-76.783954914814' + heading: '293' + altitude: '8.3302468103811' + vs: '0' + gs: '122.78529244208' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:24:02' + updated_at: '2018-05-02 01:24:02' + - + id: en5rpBKw514d + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '17.935736496556' + lon: '-76.78765616448' + heading: '293' + altitude: '49.554739665916' + vs: '21' + gs: '146.79677958636' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:24:08' + updated_at: '2018-05-02 01:24:08' + - + id: erkRwJA29l2a + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '17.976972983585' + lon: '-76.896548114872' + heading: '297' + altitude: '6228.684012199' + vs: '62' + gs: '281.03976876098' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:26:08' + updated_at: '2018-05-02 01:26:08' + - + id: dR6oxR3r5nwd + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '18.061360208405' + lon: '-77.056156629983' + heading: '301' + altitude: '12522.331716891' + vs: '25' + gs: '371.70833265547' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:28:08' + updated_at: '2018-05-02 01:28:08' + - + id: e1wr82J877Zb + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '18.17373613295' + lon: '-77.260347185993' + heading: '301' + altitude: '16802.15636323' + vs: '43' + gs: '421.37353688139' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:30:08' + updated_at: '2018-05-02 01:30:08' + - + id: bqxYvGyExN2a + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '18.193907285814' + lon: '-77.29810465405' + heading: '297' + altitude: '17395.953175647' + vs: '40' + gs: '425.98105291451' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:35:21' + updated_at: '2018-05-02 01:35:21' + - + id: aQW0wQDQk5Md + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '18.648921231143' + lon: '-78.014696613517' + heading: '323' + altitude: '37108.124381987' + vs: '22' + gs: '438.52028383384' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:37:20' + updated_at: '2018-05-02 01:37:20' + - + id: e9rQ5lk3p63a + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '18.796585259338' + lon: '-78.194734005052' + heading: '260' + altitude: '39718.178225504' + vs: '19' + gs: '432.41969107334' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:39:20' + updated_at: '2018-05-02 01:39:20' + - + id: aQW0wQP8vZqd + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '18.660552760063' + lon: '-78.407597067994' + heading: '242' + altitude: '40998.775690971' + vs: '-25' + gs: '449.51695639627' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:41:20' + updated_at: '2018-05-02 01:41:20' + - + id: bqxYvGKgp32a + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '18.592775999582' + lon: '-78.638711340118' + heading: '298' + altitude: '41060.297106821' + vs: '0' + gs: '427.14806185954' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:43:20' + updated_at: '2018-05-02 01:43:20' + - + id: bqxYvGg2r02a + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '18.718367591656' + lon: '-78.840980459275' + heading: '284' + altitude: '41065.55293844' + vs: '1' + gs: '424.89060056552' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:45:20' + updated_at: '2018-05-02 01:45:20' + - + id: e0RV61wPj53b + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '18.77448809677' + lon: '-79.082727467209' + heading: '283' + altitude: '41069.809333539' + vs: '0' + gs: '425.02780492483' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:47:21' + updated_at: '2018-05-02 01:47:21' + - + id: dwpmBOo3wWwe + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '18.813031600863' + lon: '-79.249543355636' + heading: '283' + altitude: '41072.545805172' + vs: '0' + gs: '425.04687332464' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:48:46' + updated_at: '2018-05-02 01:48:46' + - + id: ejRqlxXoZPle + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '18.840653974635' + lon: '-79.370042672541' + heading: '283' + altitude: '40396.200981621' + vs: '-16' + gs: '428.08364925851' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:49:16' + updated_at: '2018-05-02 01:49:16' + - + id: eVOPBYw4q9Xa + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '18.868358744495' + lon: '-79.491434926253' + heading: '283' + altitude: '39399.093383161' + vs: '-16' + gs: '427.57826037174' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:49:46' + updated_at: '2018-05-02 01:49:46' + - + id: aOYyrOmVPzEd + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '18.896191929474' + lon: '-79.613169477385' + heading: '284' + altitude: '36491.730092364' + vs: '-55' + gs: '429.74732238829' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:50:16' + updated_at: '2018-05-02 01:50:16' + - + id: dL98oLQgyzje + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '18.9242378342' + lon: '-79.736368411294' + heading: '284' + altitude: '32998.644142986' + vs: '-61' + gs: '434.90864533098' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:50:46' + updated_at: '2018-05-02 01:50:46' + - + id: e9rQ5lqD2o8a + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '18.952608029755' + lon: '-79.861339775352' + heading: '284' + altitude: '29069.168636089' + vs: '-68' + gs: '441.90475491564' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:51:16' + updated_at: '2018-05-02 01:51:16' + - + id: av2oANWY1vma + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '18.981670375928' + lon: '-79.987960713131' + heading: '283' + altitude: '24954.890708875' + vs: '-56' + gs: '447.81957529674' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:51:46' + updated_at: '2018-05-02 01:51:46' + - + id: 9aAN4mxlK9zb + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '19.01074931075' + lon: '-80.116947122245' + heading: '283' + altitude: '21483.90439337' + vs: '-57' + gs: '450.05461228268' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:52:16' + updated_at: '2018-05-02 01:52:16' + - + id: e1wr82gp8zGb + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '19.039021032617' + lon: '-80.242584645189' + heading: '283' + altitude: '18000.954967422' + vs: '-58' + gs: '431.5690825604' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:52:46' + updated_at: '2018-05-02 01:52:46' + - + id: dG65jDL2gK0b + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '19.066116186076' + lon: '-80.36338355333' + heading: '284' + altitude: '14630.153058153' + vs: '-55' + gs: '414.70845758094' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:53:16' + updated_at: '2018-05-02 01:53:16' + - + id: epYQ0ENmyvXa + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '19.091238961633' + lon: '-80.475901417309' + heading: '284' + altitude: '11927.379697397' + vs: '-17' + gs: '381.57664353055' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:53:46' + updated_at: '2018-05-02 01:53:46' + - + id: erkRwJPrVoEa + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '19.10261633392' + lon: '-80.527021151647' + heading: '284' + altitude: '11424.525210898' + vs: '-17' + gs: '337.58307680654' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:54:16' + updated_at: '2018-05-02 01:54:16' + - + id: e1wr82gZXqZb + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '19.112886513796' + lon: '-80.57297038027' + heading: '284' + altitude: '10919.983208888' + vs: '-16' + gs: '307.28164751381' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:54:46' + updated_at: '2018-05-02 01:54:46' + - + id: eER95AJ4XLga + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '19.122449020305' + lon: '-80.615560002642' + heading: '284' + altitude: '10418.227268525' + vs: '-16' + gs: '292.97011599774' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:55:16' + updated_at: '2018-05-02 01:55:16' + - + id: dPNZvP0O0Gza + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '19.131746364354' + lon: '-80.657133675868' + heading: '284' + altitude: '9921.6695218175' + vs: '-16' + gs: '293.10586428433' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:55:46' + updated_at: '2018-05-02 01:55:46' + - + id: aQW0wQYVm2Yd + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '19.141074988147' + lon: '-80.698952940579' + heading: '284' + altitude: '9423.0799985721' + vs: '-16' + gs: '291.77956791503' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:56:16' + updated_at: '2018-05-02 01:56:16' + - + id: eXDoE11x32We + pirep_id: b68R5gwVzpVe + type: '0' + nav_type: null + order: '0' + name: null + log: null + lat: '19.150291803457' + lon: '-80.740363792336' + heading: '284' + altitude: '8921.7506913567' + vs: '-16' + gs: '289.03760297791' + transponder: null + autopilot: null + fuel_flow: null + sim_time: null + created_at: '2018-05-02 01:56:46' + updated_at: '2018-05-02 01:56:46' +pireps: + - + id: b68R5gwVzpVe + user_id: '1' + airline_id: '1' + aircraft_id: '1' + flight_number: '13' + route_code: null + route_leg: null + flight_type: J + dpt_airport_id: MKJP + arr_airport_id: MWCR + level: '320' + distance: '249.63' + planned_distance: '273.09' + block_time: null + flight_time: '0' + planned_flight_time: '0' + zfw: null + block_fuel: '21500.25390625' + fuel_used: null + landing_rate: '0' + score: '0' + route: '' + notes: null + source: '1' + source_name: vmsacars + state: '0' + status: APR + submitted_at: null + block_off_time: '2018-04-28T12:55:40Z' + block_on_time: null + created_at: '2018-05-02 00:31:21' + updated_at: '2018-05-02 01:56:46' diff --git a/app/Http/Controllers/Api/PirepController.php b/app/Http/Controllers/Api/PirepController.php index 4be491b5..da8db702 100644 --- a/app/Http/Controllers/Api/PirepController.php +++ b/app/Http/Controllers/Api/PirepController.php @@ -240,7 +240,8 @@ class PirepController extends Controller */ public function update($id, UpdateRequest $request) { - Log::info('PIREP Update, user '.Auth::id(), $request->post()); + Log::info('PIREP Update, user '.Auth::id()); + Log::info($request->getContent()); $user = Auth::user(); $pirep = Pirep::find($id); diff --git a/app/Http/Requests/Acars/PositionRequest.php b/app/Http/Requests/Acars/PositionRequest.php index 21ca418d..da800e7c 100644 --- a/app/Http/Requests/Acars/PositionRequest.php +++ b/app/Http/Requests/Acars/PositionRequest.php @@ -26,12 +26,13 @@ class PositionRequest extends FormRequest 'positions.*.lat' => 'required|numeric', 'positions.*.lon' => 'required|numeric', 'positions.*.altitude' => 'nullable|numeric', - 'positions.*.heading' => 'nullable|integer|between:0,360', + 'positions.*.heading' => 'nullable|numeric|between:0,360', 'positions.*.vs' => 'nullable', 'positions.*.gs' => 'nullable', 'positions.*.transponder' => 'nullable', 'positions.*.autopilot' => 'nullable', - 'positions.*.fuel_flow' => 'nullable', + 'positions.*.fuel' => 'nullable|numeric', + 'positions.*.fuel_flow' => 'nullable|numeric', 'positions.*.log' => 'nullable', 'positions.*.created_at' => 'nullable|date', ]; diff --git a/app/Http/Requests/Acars/UpdateRequest.php b/app/Http/Requests/Acars/UpdateRequest.php index 2941c3d1..49b86c35 100644 --- a/app/Http/Requests/Acars/UpdateRequest.php +++ b/app/Http/Requests/Acars/UpdateRequest.php @@ -43,9 +43,9 @@ class UpdateRequest extends FormRequest 'notes' => 'nullable', 'source_name' => 'nullable|max:25', 'landing_rate' => 'nullable|numeric', - 'block_off_time' => 'nullable|date', - 'block_on_time' => 'nullable|date', - 'created_at' => 'nullable|date', + 'block_off_time' => 'nullable', + 'block_on_time' => 'nullable', + 'created_at' => 'nullable', 'status' => 'nullable', 'score' => 'nullable|integer', diff --git a/app/Models/Pirep.php b/app/Models/Pirep.php index 375e64b5..d12f66b4 100644 --- a/app/Models/Pirep.php +++ b/app/Models/Pirep.php @@ -33,6 +33,8 @@ use PhpUnitsOfMeasure\Exception\NonStringUnitName; * @property integer block_time * @property integer flight_time In minutes * @property integer planned_flight_time + * @property mixed planned_distance + * @property mixed distance * @property integer score * @property User user * @property Flight|null flight @@ -105,11 +107,20 @@ class Pirep extends Model 'score' => 'integer', 'source' => 'integer', 'state' => 'integer', - 'block_off_time' => 'datetime', - 'block_on_time' => 'datetime', - 'submitted_at' => 'datetime', + #'block_off_time' => 'datetime', + #'block_on_time' => 'datetime', + #'submitted_at' => 'datetime', ]; + /*protected $dates = [ + 'block_off_time', + 'block_on_time', + 'submitted_at', + 'created_at', + 'updated_at', + 'deleted_at' + ];*/ + public static $rules = [ 'airline_id' => 'required|exists:airlines,id', 'aircraft_id' => 'required|exists:aircraft,id', @@ -140,6 +151,24 @@ class Pirep extends Model return $flight_id; } + /** + * Return the block off time in carbon format + * @return Carbon + */ + public function getBlockOffTimeAttribute() + { + return new Carbon($this->attributes['block_off_time']); + } + + /** + * Return the block on time + * @return Carbon + */ + public function getBlockOnTimeAttribute() + { + return new Carbon($this->attributes['block_on_time']); + } + /** * Return a new Length unit so conversions can be made * @return int|Distance @@ -236,16 +265,16 @@ class Pirep extends Model */ public function getProgressPercentAttribute() { - $upper_bound = $this->flight_time; - if($this->planned_flight_time) { - $upper_bound = $this->planned_flight_time; + $upper_bound = $this->distance['nmi']; + if($this->planned_distance) { + $upper_bound = $this->planned_distance['nmi']; } if(!$upper_bound) { $upper_bound = 1; } - return round(($this->flight_time / $upper_bound) * 100, 0); + return round(($this->distance['nmi'] / $upper_bound) * 100, 0); } /** diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index fbe0ef29..a01140f8 100755 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -18,6 +18,7 @@ use App\Models\Setting; use App\Models\Subfleet; use App\Repositories\SettingRepository; use App\Services\ModuleService; +use Illuminate\Support\Carbon; use Illuminate\Support\Facades\Schema; use Illuminate\Support\ServiceProvider; use View; @@ -27,6 +28,11 @@ class AppServiceProvider extends ServiceProvider public function boot(): void { Schema::defaultStringLength(191); + + Carbon::serializeUsing(function ($carbon) { + return $carbon->format('U'); + }); + $this->app->bind('setting', SettingRepository::class); View::share('moduleSvc', app(ModuleService::class)); @@ -39,6 +45,7 @@ class AppServiceProvider extends ServiceProvider PirepField::observe(PirepFieldObserver::class); Setting::observe(SettingObserver::class); Subfleet::observe(SubfleetObserver::class); + } /** diff --git a/public/assets/admin/css/vendor.css b/public/assets/admin/css/vendor.css index 535bbe1f..36bf5cd2 100644 --- a/public/assets/admin/css/vendor.css +++ b/public/assets/admin/css/vendor.css @@ -10838,246 +10838,6 @@ button.close { .select2-container--classic.select2-container--open .select2-dropdown { border-color: #5897fb; } -@charset "UTF-8"; - -/*! - * Pikaday - * Copyright © 2014 David Bushell | BSD & MIT license | http://dbushell.com/ - */ - -.pika-single { - z-index: 9999; - display: block; - position: relative; - color: #333; - background: #fff; - border: 1px solid #ccc; - border-bottom-color: #bbb; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; -} - -/* -clear child float (pika-lendar), using the famous micro clearfix hack -http://nicolasgallagher.com/micro-clearfix-hack/ -*/ -.pika-single:before, -.pika-single:after { - content: " "; - display: table; -} -.pika-single:after { clear: both } -.pika-single { *zoom: 1 } - -.pika-single.is-hidden { - display: none; -} - -.pika-single.is-bound { - position: absolute; - box-shadow: 0 5px 15px -5px rgba(0,0,0,.5); -} - -.pika-lendar { - float: left; - width: 240px; - margin: 8px; -} - -.pika-title { - position: relative; - text-align: center; -} - -.pika-label { - display: inline-block; - *display: inline; - position: relative; - z-index: 9999; - overflow: hidden; - margin: 0; - padding: 5px 3px; - font-size: 14px; - line-height: 20px; - font-weight: bold; - background-color: #fff; -} -.pika-title select { - cursor: pointer; - position: absolute; - z-index: 9998; - margin: 0; - left: 0; - top: 5px; - filter: alpha(opacity=0); - opacity: 0; -} - -.pika-prev, -.pika-next { - display: block; - cursor: pointer; - position: relative; - outline: none; - border: 0; - padding: 0; - width: 20px; - height: 30px; - /* hide text using text-indent trick, using width value (it's enough) */ - text-indent: 20px; - white-space: nowrap; - overflow: hidden; - background-color: transparent; - background-position: center center; - background-repeat: no-repeat; - background-size: 75% 75%; - opacity: .5; - *position: absolute; - *top: 0; -} - -.pika-prev:hover, -.pika-next:hover { - opacity: 1; -} - -.pika-prev, -.is-rtl .pika-next { - float: left; - background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAUklEQVR42u3VMQoAIBADQf8Pgj+OD9hG2CtONJB2ymQkKe0HbwAP0xucDiQWARITIDEBEnMgMQ8S8+AqBIl6kKgHiXqQqAeJepBo/z38J/U0uAHlaBkBl9I4GwAAAABJRU5ErkJggg=='); - *left: 0; -} - -.pika-next, -.is-rtl .pika-prev { - float: right; - background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAU0lEQVR42u3VOwoAMAgE0dwfAnNjU26bYkBCFGwfiL9VVWoO+BJ4Gf3gtsEKKoFBNTCoCAYVwaAiGNQGMUHMkjGbgjk2mIONuXo0nC8XnCf1JXgArVIZAQh5TKYAAAAASUVORK5CYII='); - *right: 0; -} - -.pika-prev.is-disabled, -.pika-next.is-disabled { - cursor: default; - opacity: .2; -} - -.pika-select { - display: inline-block; - *display: inline; -} - -.pika-table { - width: 100%; - border-collapse: collapse; - border-spacing: 0; - border: 0; -} - -.pika-table th, -.pika-table td { - width: 14.285714285714286%; - padding: 0; -} - -.pika-table th { - color: #999; - font-size: 12px; - line-height: 25px; - font-weight: bold; - text-align: center; -} - -.pika-button { - cursor: pointer; - display: block; - box-sizing: border-box; - -moz-box-sizing: border-box; - outline: none; - border: 0; - margin: 0; - width: 100%; - padding: 5px; - color: #666; - font-size: 12px; - line-height: 15px; - text-align: right; - background: #f5f5f5; -} - -.pika-week { - font-size: 11px; - color: #999; -} - -.is-today .pika-button { - color: #33aaff; - font-weight: bold; -} - -.is-selected .pika-button, -.has-event .pika-button { - color: #fff; - font-weight: bold; - background: #33aaff; - box-shadow: inset 0 1px 3px #178fe5; - border-radius: 3px; -} - -.has-event .pika-button { - background: #005da9; - box-shadow: inset 0 1px 3px #0076c9; -} - -.is-disabled .pika-button, -.is-inrange .pika-button { - background: #D5E9F7; -} - -.is-startrange .pika-button { - color: #fff; - background: #6CB31D; - box-shadow: none; - border-radius: 3px; -} - -.is-endrange .pika-button { - color: #fff; - background: #33aaff; - box-shadow: none; - border-radius: 3px; -} - -.is-disabled .pika-button { - pointer-events: none; - cursor: default; - color: #999; - opacity: .3; -} - -.is-outside-current-month .pika-button { - color: #999; - opacity: .3; -} - -.is-selection-disabled { - pointer-events: none; - cursor: default; -} - -.pika-button:hover, -.pika-row.pick-whole-week:hover .pika-button { - color: #fff; - background: #ff8000; - box-shadow: none; - border-radius: 3px; -} - -/* styling for abbr */ -.pika-table abbr { - border-bottom: none; - cursor: help; -} - - /*! X-editable - v1.5.1 * In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery * http://github.com/vitalets/x-editable diff --git a/public/assets/admin/js/app.js b/public/assets/admin/js/app.js index 42bf609d..c6c8d461 100644 --- a/public/assets/admin/js/app.js +++ b/public/assets/admin/js/app.js @@ -366,7 +366,7 @@ eval("/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__base_map__ = __webpa /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* unused harmony export onFeaturePointClick */\n/* unused harmony export pointToLayer */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__base_map__ = __webpack_require__(\"./resources/js/maps/base_map.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__helpers__ = __webpack_require__(\"./resources/js/maps/helpers.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__config__ = __webpack_require__(\"./resources/js/maps/config.js\");\n\nvar leaflet = __webpack_require__(\"./node_modules/leaflet/dist/leaflet-src.js\");\n\n\n\n\n\n\n/**\n * Show some popup text when a feature is clicked on\n * @param feature\n * @param layer\n */\nvar onFeaturePointClick = function onFeaturePointClick(feature, layer) {\n var popup_html = '';\n if (feature.properties && feature.properties.popup) {\n popup_html += feature.properties.popup;\n }\n\n layer.bindPopup(popup_html);\n};\n\n/**\n * Show each point as a marker\n * @param feature\n * @param latlng\n * @returns {*}\n */\nvar pointToLayer = function pointToLayer(feature, latlng) {\n return leaflet.circleMarker(latlng, {\n radius: 5,\n fillColor: __WEBPACK_IMPORTED_MODULE_2__config__[\"b\" /* CIRCLE_COLOR */],\n color: '#000',\n weight: 1,\n opacity: 1,\n fillOpacity: 0.8\n });\n};\n\n/**\n *\n * @param opts\n * @private\n */\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (opts) {\n\n opts = Object.assign({\n route_points: null,\n planned_route_line: null,\n actual_route_points: null,\n actual_route_line: null,\n render_elem: 'map',\n metar_wms: {\n url: '',\n params: {}\n }\n }, opts);\n\n console.log(opts);\n\n var map = Object(__WEBPACK_IMPORTED_MODULE_0__base_map__[\"a\" /* default */])(opts);\n\n if (opts.metar_wms.url !== '') {\n Object(__WEBPACK_IMPORTED_MODULE_1__helpers__[\"a\" /* addWMSLayer */])(map, opts.metar_wms);\n }\n\n var geodesicLayer = leaflet.geodesic([], {\n weight: 4,\n opacity: 0.9,\n color: __WEBPACK_IMPORTED_MODULE_2__config__[\"c\" /* PLAN_ROUTE_COLOR */],\n steps: 50,\n wrap: false\n }).addTo(map);\n\n geodesicLayer.geoJson(opts.planned_route_line);\n\n try {\n map.fitBounds(geodesicLayer.getBounds());\n } catch (e) {\n console.log(e);\n }\n\n // Draw the route points after\n if (opts.route_points !== null) {\n var route_points = leaflet.geoJSON(opts.route_points, {\n onEachFeature: onFeaturePointClick,\n pointToLayer: pointToLayer,\n style: {\n 'color': __WEBPACK_IMPORTED_MODULE_2__config__[\"c\" /* PLAN_ROUTE_COLOR */],\n 'weight': 3,\n 'opacity': 0.65\n }\n });\n\n route_points.addTo(map);\n }\n\n /**\n * draw the actual route\n */\n\n if (opts.actual_route_line !== null && opts.actual_route_line.features.length > 0) {\n var _geodesicLayer = leaflet.geodesic([], {\n weight: 3,\n opacity: 0.9,\n color: __WEBPACK_IMPORTED_MODULE_2__config__[\"a\" /* ACTUAL_ROUTE_COLOR */],\n steps: 50,\n wrap: false\n }).addTo(map);\n\n _geodesicLayer.geoJson(opts.actual_route_line);\n\n try {\n map.fitBounds(_geodesicLayer.getBounds());\n } catch (e) {\n console.log(e);\n }\n }\n\n if (opts.actual_route_points !== null && opts.actual_route_points.features.length > 0) {\n var _route_points = leaflet.geoJSON(opts.actual_route_points, {\n onEachFeature: onFeaturePointClick,\n pointToLayer: pointToLayer,\n style: {\n 'color': __WEBPACK_IMPORTED_MODULE_2__config__[\"a\" /* ACTUAL_ROUTE_COLOR */],\n 'weight': 3,\n 'opacity': 0.65\n }\n });\n\n _route_points.addTo(map);\n }\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvanMvbWFwcy9yb3V0ZV9tYXAuanM/YTc0NSJdLCJuYW1lcyI6WyJsZWFmbGV0IiwicmVxdWlyZSIsIm9uRmVhdHVyZVBvaW50Q2xpY2siLCJmZWF0dXJlIiwibGF5ZXIiLCJwb3B1cF9odG1sIiwicHJvcGVydGllcyIsInBvcHVwIiwiYmluZFBvcHVwIiwicG9pbnRUb0xheWVyIiwibGF0bG5nIiwiY2lyY2xlTWFya2VyIiwicmFkaXVzIiwiZmlsbENvbG9yIiwiY29sb3IiLCJ3ZWlnaHQiLCJvcGFjaXR5IiwiZmlsbE9wYWNpdHkiLCJvcHRzIiwiT2JqZWN0IiwiYXNzaWduIiwicm91dGVfcG9pbnRzIiwicGxhbm5lZF9yb3V0ZV9saW5lIiwiYWN0dWFsX3JvdXRlX3BvaW50cyIsImFjdHVhbF9yb3V0ZV9saW5lIiwicmVuZGVyX2VsZW0iLCJtZXRhcl93bXMiLCJ1cmwiLCJwYXJhbXMiLCJjb25zb2xlIiwibG9nIiwibWFwIiwiZHJhd19iYXNlX21hcCIsImFkZFdNU0xheWVyIiwiZ2VvZGVzaWNMYXllciIsImdlb2Rlc2ljIiwic3RlcHMiLCJ3cmFwIiwiYWRkVG8iLCJnZW9Kc29uIiwiZml0Qm91bmRzIiwiZ2V0Qm91bmRzIiwiZSIsImdlb0pTT04iLCJvbkVhY2hGZWF0dXJlIiwic3R5bGUiLCJmZWF0dXJlcyIsImxlbmd0aCJdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQ0EsSUFBTUEsVUFBVSxtQkFBQUMsQ0FBUSw0Q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VxuICAgIH1cbiAgfVxuXG4gIGlmIChvcHRzLmFjdHVhbF9yb3V0ZV9wb2ludHMgIT09IG51bGwgJiYgb3B0cy5hY3R1YWxfcm91dGVfcG9pbnRzLmZlYXR1cmVzLmxlbmd0aCA+IDApIHtcbiAgICBsZXQgcm91dGVfcG9pbnRzID0gbGVhZmxldC5nZW9KU09OKG9wdHMuYWN0dWFsX3JvdXRlX3BvaW50cywge1xuICAgICAgb25FYWNoRmVhdHVyZTogb25GZWF0dXJlUG9pbnRDbGljayxcbiAgICAgIHBvaW50VG9MYXllcjogcG9pbnRUb0xheWVyLFxuICAgICAgc3R5bGU6IHtcbiAgICAgICAgJ2NvbG9yJzogQUNUVUFMX1JPVVRFX0NPTE9SLFxuICAgICAgICAnd2VpZ2h0JzogMyxcbiAgICAgICAgJ29wYWNpdHknOiAwLjY1LFxuICAgICAgfSxcbiAgICB9KTtcblxuICAgIHJvdXRlX3BvaW50cy5hZGRUbyhtYXApXG4gIH1cbn07XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9yZXNvdXJjZXMvanMvbWFwcy9yb3V0ZV9tYXAuanMiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./resources/js/maps/route_map.js\n"); +eval("/* unused harmony export onFeaturePointClick */\n/* unused harmony export pointToLayer */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__base_map__ = __webpack_require__(\"./resources/js/maps/base_map.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__helpers__ = __webpack_require__(\"./resources/js/maps/helpers.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__config__ = __webpack_require__(\"./resources/js/maps/config.js\");\nvar leaflet = __webpack_require__(\"./node_modules/leaflet/dist/leaflet-src.js\");\n\n\n\n\n\n\n/**\n * Show some popup text when a feature is clicked on\n * @param feature\n * @param layer\n */\nvar onFeaturePointClick = function onFeaturePointClick(feature, layer) {\n var popup_html = '';\n if (feature.properties && feature.properties.popup) {\n popup_html += feature.properties.popup;\n }\n\n layer.bindPopup(popup_html);\n};\n\n/**\n * Show each point as a marker\n * @param feature\n * @param latlng\n * @returns {*}\n */\nvar pointToLayer = function pointToLayer(feature, latlng) {\n return leaflet.circleMarker(latlng, {\n radius: 5,\n fillColor: __WEBPACK_IMPORTED_MODULE_2__config__[\"b\" /* CIRCLE_COLOR */],\n color: '#000',\n weight: 1,\n opacity: 1,\n fillOpacity: 0.8\n });\n};\n\n/**\n *\n * @param opts\n * @private\n */\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (opts) {\n\n opts = Object.assign({\n\n route_points: null,\n planned_route_line: null,\n actual_route_points: null,\n actual_route_line: null,\n render_elem: 'map',\n live_map: false,\n aircraft_icon: '/assets/img/acars/aircraft.png',\n metar_wms: {\n url: '',\n params: {}\n }\n }, opts);\n\n var aircraftIcon = leaflet.icon({\n iconUrl: opts.aircraft_icon,\n iconSize: [42, 42],\n iconAnchor: [21, 21]\n });\n\n var map = Object(__WEBPACK_IMPORTED_MODULE_0__base_map__[\"a\" /* default */])(opts);\n var layerLiveFlight = void 0;\n\n if (opts.metar_wms.url !== '') {\n Object(__WEBPACK_IMPORTED_MODULE_1__helpers__[\"a\" /* addWMSLayer */])(map, opts.metar_wms);\n }\n\n var geodesicLayer = leaflet.geodesic([], {\n weight: 4,\n opacity: 0.9,\n color: __WEBPACK_IMPORTED_MODULE_2__config__[\"c\" /* PLAN_ROUTE_COLOR */],\n steps: 50,\n wrap: false\n }).addTo(map);\n\n geodesicLayer.geoJson(opts.planned_route_line);\n\n try {\n map.fitBounds(geodesicLayer.getBounds());\n } catch (e) {\n console.log(e);\n }\n\n // Draw the route points after\n if (opts.route_points !== null) {\n var route_points = leaflet.geoJSON(opts.route_points, {\n onEachFeature: onFeaturePointClick,\n pointToLayer: pointToLayer,\n style: {\n 'color': __WEBPACK_IMPORTED_MODULE_2__config__[\"c\" /* PLAN_ROUTE_COLOR */],\n 'weight': 3,\n 'opacity': 0.65\n }\n });\n\n route_points.addTo(map);\n }\n\n /**\n * draw the actual route\n */\n\n if (opts.actual_route_line !== null && opts.actual_route_line.features.length > 0) {\n var _geodesicLayer = leaflet.geodesic([], {\n weight: 3,\n opacity: 0.9,\n color: __WEBPACK_IMPORTED_MODULE_2__config__[\"a\" /* ACTUAL_ROUTE_COLOR */],\n steps: 50,\n wrap: false\n }).addTo(map);\n\n _geodesicLayer.geoJson(opts.actual_route_line);\n\n try {\n map.fitBounds(_geodesicLayer.getBounds());\n } catch (e) {\n console.log(e);\n }\n }\n\n if (opts.actual_route_points !== null && opts.actual_route_points.features.length > 0) {\n var _route_points = leaflet.geoJSON(opts.actual_route_points, {\n onEachFeature: onFeaturePointClick,\n pointToLayer: pointToLayer,\n style: {\n 'color': __WEBPACK_IMPORTED_MODULE_2__config__[\"a\" /* ACTUAL_ROUTE_COLOR */],\n 'weight': 3,\n 'opacity': 0.65\n }\n });\n\n _route_points.addTo(map);\n }\n\n /**\n *\n */\n var liveFlight = function liveFlight() {\n var uri = opts.pirep_uri;\n var live_route = $.ajax({\n url: uri,\n dataType: 'json',\n error: console.log\n });\n\n $.when(live_route).done(function (routeJson) {\n layerLiveFlight = leaflet.geoJSON(routeJson, {\n pointToLayer: function pointToLayer(feature, latlon) {\n return leaflet.marker(latlon, {\n icon: aircraftIcon,\n rotationAngle: feature.properties.heading\n });\n }\n });\n\n layerLiveFlight.addTo(map);\n });\n };\n\n setInterval(liveFlight, 10000);\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvanMvbWFwcy9yb3V0ZV9tYXAuanM/YTc0NSJdLCJuYW1lcyI6WyJsZWFmbGV0IiwicmVxdWlyZSIsIm9uRmVhdHVyZVBvaW50Q2xpY2siLCJmZWF0dXJlIiwibGF5ZXIiLCJwb3B1cF9odG1sIiwicHJvcGVydGllcyIsInBv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ICAgICAgICByb3V0ZV9wb2ludHMuYWRkVG8obWFwKVxuICAgIH1cblxuICAgIC8qKlxuICAgICAqXG4gICAgICovXG4gICAgY29uc3QgbGl2ZUZsaWdodCA9ICgpID0+IHtcbiAgICAgICAgY29uc3QgdXJpID0gb3B0cy5waXJlcF91cmk7XG4gICAgICAgIGNvbnN0IGxpdmVfcm91dGUgPSAkLmFqYXgoe1xuICAgICAgICAgICAgdXJsOiB1cmksXG4gICAgICAgICAgICBkYXRhVHlwZTogJ2pzb24nLFxuICAgICAgICAgICAgZXJyb3I6IGNvbnNvbGUubG9nXG4gICAgICAgIH0pO1xuXG4gICAgICAgICQud2hlbihsaXZlX3JvdXRlKS5kb25lKChyb3V0ZUpzb24pID0+IHtcbiAgICAgICAgICAgIGxheWVyTGl2ZUZsaWdodCA9IGxlYWZsZXQuZ2VvSlNPTihyb3V0ZUpzb24sIHtcbiAgICAgICAgICAgICAgICBwb2ludFRvTGF5ZXI6IGZ1bmN0aW9uIChmZWF0dXJlLCBsYXRsb24pIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGxlYWZsZXQubWFya2VyKGxhdGxvbiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWNvbjogYWlyY3JhZnRJY29uLFxuICAgICAgICAgICAgICAgICAgICAgICAgcm90YXRpb25BbmdsZTogZmVhdHVyZS5wcm9wZXJ0aWVzLmhlYWRpbmdcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KVxuXG4gICAgICAgICAgICBsYXllckxpdmVGbGlnaHQuYWRkVG8obWFwKVxuICAgICAgICB9KTtcbiAgICB9O1xuXG4gICAgc2V0SW50ZXJ2YWwobGl2ZUZsaWdodCwgMTAwMDApO1xufTtcblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyAuL3Jlc291cmNlcy9qcy9tYXBzL3JvdXRlX21hcC5qcyJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./resources/js/maps/route_map.js\n"); /***/ }), diff --git a/public/assets/admin/js/vendor.js b/public/assets/admin/js/vendor.js index 1ee244d1..c42f0e17 100644 --- a/public/assets/admin/js/vendor.js +++ b/public/assets/admin/js/vendor.js @@ -44514,1252 +44514,6 @@ S2.define('jquery.select2',[ } })(window.jQuery || window.Zepto); -/*! - * Pikaday - * - * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/dbushell/Pikaday - */ - -(function (root, factory) -{ - 'use strict'; - - var moment; - if (typeof exports === 'object') { - // CommonJS module - // Load moment.js as an optional dependency - try { moment = require('moment'); } catch (e) {} - module.exports = factory(moment); - } else if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define(function (req) - { - // Load moment.js as an optional dependency - var id = 'moment'; - try { moment = req(id); } catch (e) {} - return factory(moment); - }); - } else { - root.Pikaday = factory(root.moment); - } -}(this, function (moment) -{ - 'use strict'; - - /** - * feature detection and helper functions - */ - var hasMoment = typeof moment === 'function', - - hasEventListeners = !!window.addEventListener, - - document = window.document, - - sto = window.setTimeout, - - addEvent = function(el, e, callback, capture) - { - if (hasEventListeners) { - el.addEventListener(e, callback, !!capture); - } else { - el.attachEvent('on' + e, callback); - } - }, - - removeEvent = function(el, e, callback, capture) - { - if (hasEventListeners) { - el.removeEventListener(e, callback, !!capture); - } else { - el.detachEvent('on' + e, callback); - } - }, - - trim = function(str) - { - return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g,''); - }, - - hasClass = function(el, cn) - { - return (' ' + el.className + ' ').indexOf(' ' + cn + ' ') !== -1; - }, - - addClass = function(el, cn) - { - if (!hasClass(el, cn)) { - el.className = (el.className === '') ? cn : el.className + ' ' + cn; - } - }, - - removeClass = function(el, cn) - { - el.className = trim((' ' + el.className + ' ').replace(' ' + cn + ' ', ' ')); - }, - - isArray = function(obj) - { - return (/Array/).test(Object.prototype.toString.call(obj)); - }, - - isDate = function(obj) - { - return (/Date/).test(Object.prototype.toString.call(obj)) && !isNaN(obj.getTime()); - }, - - isWeekend = function(date) - { - var day = date.getDay(); - return day === 0 || day === 6; - }, - - isLeapYear = function(year) - { - // solution by Matti Virkkunen: http://stackoverflow.com/a/4881951 - return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0; - }, - - getDaysInMonth = function(year, month) - { - return [31, isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month]; - }, - - setToStartOfDay = function(date) - { - if (isDate(date)) date.setHours(0,0,0,0); - }, - - compareDates = function(a,b) - { - // weak date comparison (use setToStartOfDay(date) to ensure correct result) - return a.getTime() === b.getTime(); - }, - - extend = function(to, from, overwrite) - { - var prop, hasProp; - for (prop in from) { - hasProp = to[prop] !== undefined; - if (hasProp && typeof from[prop] === 'object' && from[prop] !== null && from[prop].nodeName === undefined) { - if (isDate(from[prop])) { - if (overwrite) { - to[prop] = new Date(from[prop].getTime()); - } - } - else if (isArray(from[prop])) { - if (overwrite) { - to[prop] = from[prop].slice(0); - } - } else { - to[prop] = extend({}, from[prop], overwrite); - } - } else if (overwrite || !hasProp) { - to[prop] = from[prop]; - } - } - return to; - }, - - fireEvent = function(el, eventName, data) - { - var ev; - - if (document.createEvent) { - ev = document.createEvent('HTMLEvents'); - ev.initEvent(eventName, true, false); - ev = extend(ev, data); - el.dispatchEvent(ev); - } else if (document.createEventObject) { - ev = document.createEventObject(); - ev = extend(ev, data); - el.fireEvent('on' + eventName, ev); - } - }, - - adjustCalendar = function(calendar) { - if (calendar.month < 0) { - calendar.year -= Math.ceil(Math.abs(calendar.month)/12); - calendar.month += 12; - } - if (calendar.month > 11) { - calendar.year += Math.floor(Math.abs(calendar.month)/12); - calendar.month -= 12; - } - return calendar; - }, - - /** - * defaults and localisation - */ - defaults = { - - // bind the picker to a form field - field: null, - - // automatically show/hide the picker on `field` focus (default `true` if `field` is set) - bound: undefined, - - // position of the datepicker, relative to the field (default to bottom & left) - // ('bottom' & 'left' keywords are not used, 'top' & 'right' are modifier on the bottom/left position) - position: 'bottom left', - - // automatically fit in the viewport even if it means repositioning from the position option - reposition: true, - - // the default output format for `.toString()` and `field` value - format: 'YYYY-MM-DD', - - // the toString function which gets passed a current date object and format - // and returns a string - toString: null, - - // used to create date object from current input string - parse: null, - - // the initial date to view when first opened - defaultDate: null, - - // make the `defaultDate` the initial selected value - setDefaultDate: false, - - // first day of week (0: Sunday, 1: Monday etc) - firstDay: 0, - - // the default flag for moment's strict date parsing - formatStrict: false, - - // the minimum/earliest date that can be selected - minDate: null, - // the maximum/latest date that can be selected - maxDate: null, - - // number of years either side, or array of upper/lower range - yearRange: 10, - - // show week numbers at head of row - showWeekNumber: false, - - // Week picker mode - pickWholeWeek: false, - - // used internally (don't config outside) - minYear: 0, - maxYear: 9999, - minMonth: undefined, - maxMonth: undefined, - - startRange: null, - endRange: null, - - isRTL: false, - - // Additional text to append to the year in the calendar title - yearSuffix: '', - - // Render the month after year in the calendar title - showMonthAfterYear: false, - - // Render days of the calendar grid that fall in the next or previous month - showDaysInNextAndPreviousMonths: false, - - // Allows user to select days that fall in the next or previous month - enableSelectionDaysInNextAndPreviousMonths: false, - - // how many months are visible - numberOfMonths: 1, - - // when numberOfMonths is used, this will help you to choose where the main calendar will be (default `left`, can be set to `right`) - // only used for the first display or when a selected date is not visible - mainCalendar: 'left', - - // Specify a DOM element to render the calendar in - container: undefined, - - // Blur field when date is selected - blurFieldOnSelect : true, - - // internationalization - i18n: { - previousMonth : 'Previous Month', - nextMonth : 'Next Month', - months : ['January','February','March','April','May','June','July','August','September','October','November','December'], - weekdays : ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'], - weekdaysShort : ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'] - }, - - // Theme Classname - theme: null, - - // events array - events: [], - - // callback function - onSelect: null, - onOpen: null, - onClose: null, - onDraw: null, - - // Enable keyboard input - keyboardInput: true - }, - - - /** - * templating functions to abstract HTML rendering - */ - renderDayName = function(opts, day, abbr) - { - day += opts.firstDay; - while (day >= 7) { - day -= 7; - } - return abbr ? opts.i18n.weekdaysShort[day] : opts.i18n.weekdays[day]; - }, - - renderDay = function(opts) - { - var arr = []; - var ariaSelected = 'false'; - if (opts.isEmpty) { - if (opts.showDaysInNextAndPreviousMonths) { - arr.push('is-outside-current-month'); - - if(!opts.enableSelectionDaysInNextAndPreviousMonths) { - arr.push('is-selection-disabled'); - } - - } else { - return ''; - } - } - if (opts.isDisabled) { - arr.push('is-disabled'); - } - if (opts.isToday) { - arr.push('is-today'); - } - if (opts.isSelected) { - arr.push('is-selected'); - ariaSelected = 'true'; - } - if (opts.hasEvent) { - arr.push('has-event'); - } - if (opts.isInRange) { - arr.push('is-inrange'); - } - if (opts.isStartRange) { - arr.push('is-startrange'); - } - if (opts.isEndRange) { - arr.push('is-endrange'); - } - return '' + - '' + - ''; - }, - - renderWeek = function (d, m, y) { - // Lifted from http://javascript.about.com/library/blweekyear.htm, lightly modified. - var onejan = new Date(y, 0, 1), - weekNum = Math.ceil((((new Date(y, m, d) - onejan) / 86400000) + onejan.getDay()+1)/7); - return '' + weekNum + ''; - }, - - renderRow = function(days, isRTL, pickWholeWeek, isRowSelected) - { - return '' + (isRTL ? days.reverse() : days).join('') + ''; - }, - - renderBody = function(rows) - { - return '' + rows.join('') + ''; - }, - - renderHead = function(opts) - { - var i, arr = []; - if (opts.showWeekNumber) { - arr.push(''); - } - for (i = 0; i < 7; i++) { - arr.push('' + renderDayName(opts, i, true) + ''); - } - return '' + (opts.isRTL ? arr.reverse() : arr).join('') + ''; - }, - - renderTitle = function(instance, c, year, month, refYear, randId) - { - var i, j, arr, - opts = instance._o, - isMinYear = year === opts.minYear, - isMaxYear = year === opts.maxYear, - html = '
', - monthHtml, - yearHtml, - prev = true, - next = true; - - for (arr = [], i = 0; i < 12; i++) { - arr.push(''); - } - - monthHtml = '
' + opts.i18n.months[month] + '
'; - - if (isArray(opts.yearRange)) { - i = opts.yearRange[0]; - j = opts.yearRange[1] + 1; - } else { - i = year - opts.yearRange; - j = 1 + year + opts.yearRange; - } - - for (arr = []; i < j && i <= opts.maxYear; i++) { - if (i >= opts.minYear) { - arr.push(''); - } - } - yearHtml = '
' + year + opts.yearSuffix + '
'; - - if (opts.showMonthAfterYear) { - html += yearHtml + monthHtml; - } else { - html += monthHtml + yearHtml; - } - - if (isMinYear && (month === 0 || opts.minMonth >= month)) { - prev = false; - } - - if (isMaxYear && (month === 11 || opts.maxMonth <= month)) { - next = false; - } - - if (c === 0) { - html += ''; - } - if (c === (instance._o.numberOfMonths - 1) ) { - html += ''; - } - - return html += '
'; - }, - - renderTable = function(opts, data, randId) - { - return '' + renderHead(opts) + renderBody(data) + '
'; - }, - - - /** - * Pikaday constructor - */ - Pikaday = function(options) - { - var self = this, - opts = self.config(options); - - self._onMouseDown = function(e) - { - if (!self._v) { - return; - } - e = e || window.event; - var target = e.target || e.srcElement; - if (!target) { - return; - } - - if (!hasClass(target, 'is-disabled')) { - if (hasClass(target, 'pika-button') && !hasClass(target, 'is-empty') && !hasClass(target.parentNode, 'is-disabled')) { - self.setDate(new Date(target.getAttribute('data-pika-year'), target.getAttribute('data-pika-month'), target.getAttribute('data-pika-day'))); - if (opts.bound) { - sto(function() { - self.hide(); - if (opts.blurFieldOnSelect && opts.field) { - opts.field.blur(); - } - }, 100); - } - } - else if (hasClass(target, 'pika-prev')) { - self.prevMonth(); - } - else if (hasClass(target, 'pika-next')) { - self.nextMonth(); - } - } - if (!hasClass(target, 'pika-select')) { - // if this is touch event prevent mouse events emulation - if (e.preventDefault) { - e.preventDefault(); - } else { - e.returnValue = false; - return false; - } - } else { - self._c = true; - } - }; - - self._onChange = function(e) - { - e = e || window.event; - var target = e.target || e.srcElement; - if (!target) { - return; - } - if (hasClass(target, 'pika-select-month')) { - self.gotoMonth(target.value); - } - else if (hasClass(target, 'pika-select-year')) { - self.gotoYear(target.value); - } - }; - - self._onKeyChange = function(e) - { - e = e || window.event; - - if (self.isVisible()) { - - switch(e.keyCode){ - case 13: - case 27: - if (opts.field) { - opts.field.blur(); - } - break; - case 37: - e.preventDefault(); - self.adjustDate('subtract', 1); - break; - case 38: - self.adjustDate('subtract', 7); - break; - case 39: - self.adjustDate('add', 1); - break; - case 40: - self.adjustDate('add', 7); - break; - } - } - }; - - self._onInputChange = function(e) - { - var date; - - if (e.firedBy === self) { - return; - } - if (opts.parse) { - date = opts.parse(opts.field.value, opts.format); - } else if (hasMoment) { - date = moment(opts.field.value, opts.format, opts.formatStrict); - date = (date && date.isValid()) ? date.toDate() : null; - } - else { - date = new Date(Date.parse(opts.field.value)); - } - if (isDate(date)) { - self.setDate(date); - } - if (!self._v) { - self.show(); - } - }; - - self._onInputFocus = function() - { - self.show(); - }; - - self._onInputClick = function() - { - self.show(); - }; - - self._onInputBlur = function() - { - // IE allows pika div to gain focus; catch blur the input field - var pEl = document.activeElement; - do { - if (hasClass(pEl, 'pika-single')) { - return; - } - } - while ((pEl = pEl.parentNode)); - - if (!self._c) { - self._b = sto(function() { - self.hide(); - }, 50); - } - self._c = false; - }; - - self._onClick = function(e) - { - e = e || window.event; - var target = e.target || e.srcElement, - pEl = target; - if (!target) { - return; - } - if (!hasEventListeners && hasClass(target, 'pika-select')) { - if (!target.onchange) { - target.setAttribute('onchange', 'return;'); - addEvent(target, 'change', self._onChange); - } - } - do { - if (hasClass(pEl, 'pika-single') || pEl === opts.trigger) { - return; - } - } - while ((pEl = pEl.parentNode)); - if (self._v && target !== opts.trigger && pEl !== opts.trigger) { - self.hide(); - } - }; - - self.el = document.createElement('div'); - self.el.className = 'pika-single' + (opts.isRTL ? ' is-rtl' : '') + (opts.theme ? ' ' + opts.theme : ''); - - addEvent(self.el, 'mousedown', self._onMouseDown, true); - addEvent(self.el, 'touchend', self._onMouseDown, true); - addEvent(self.el, 'change', self._onChange); - - if (opts.keyboardInput) { - addEvent(document, 'keydown', self._onKeyChange); - } - - if (opts.field) { - if (opts.container) { - opts.container.appendChild(self.el); - } else if (opts.bound) { - document.body.appendChild(self.el); - } else { - opts.field.parentNode.insertBefore(self.el, opts.field.nextSibling); - } - addEvent(opts.field, 'change', self._onInputChange); - - if (!opts.defaultDate) { - if (hasMoment && opts.field.value) { - opts.defaultDate = moment(opts.field.value, opts.format).toDate(); - } else { - opts.defaultDate = new Date(Date.parse(opts.field.value)); - } - opts.setDefaultDate = true; - } - } - - var defDate = opts.defaultDate; - - if (isDate(defDate)) { - if (opts.setDefaultDate) { - self.setDate(defDate, true); - } else { - self.gotoDate(defDate); - } - } else { - self.gotoDate(new Date()); - } - - if (opts.bound) { - this.hide(); - self.el.className += ' is-bound'; - addEvent(opts.trigger, 'click', self._onInputClick); - addEvent(opts.trigger, 'focus', self._onInputFocus); - addEvent(opts.trigger, 'blur', self._onInputBlur); - } else { - this.show(); - } - }; - - - /** - * public Pikaday API - */ - Pikaday.prototype = { - - - /** - * configure functionality - */ - config: function(options) - { - if (!this._o) { - this._o = extend({}, defaults, true); - } - - var opts = extend(this._o, options, true); - - opts.isRTL = !!opts.isRTL; - - opts.field = (opts.field && opts.field.nodeName) ? opts.field : null; - - opts.theme = (typeof opts.theme) === 'string' && opts.theme ? opts.theme : null; - - opts.bound = !!(opts.bound !== undefined ? opts.field && opts.bound : opts.field); - - opts.trigger = (opts.trigger && opts.trigger.nodeName) ? opts.trigger : opts.field; - - opts.disableWeekends = !!opts.disableWeekends; - - opts.disableDayFn = (typeof opts.disableDayFn) === 'function' ? opts.disableDayFn : null; - - var nom = parseInt(opts.numberOfMonths, 10) || 1; - opts.numberOfMonths = nom > 4 ? 4 : nom; - - if (!isDate(opts.minDate)) { - opts.minDate = false; - } - if (!isDate(opts.maxDate)) { - opts.maxDate = false; - } - if ((opts.minDate && opts.maxDate) && opts.maxDate < opts.minDate) { - opts.maxDate = opts.minDate = false; - } - if (opts.minDate) { - this.setMinDate(opts.minDate); - } - if (opts.maxDate) { - this.setMaxDate(opts.maxDate); - } - - if (isArray(opts.yearRange)) { - var fallback = new Date().getFullYear() - 10; - opts.yearRange[0] = parseInt(opts.yearRange[0], 10) || fallback; - opts.yearRange[1] = parseInt(opts.yearRange[1], 10) || fallback; - } else { - opts.yearRange = Math.abs(parseInt(opts.yearRange, 10)) || defaults.yearRange; - if (opts.yearRange > 100) { - opts.yearRange = 100; - } - } - - return opts; - }, - - /** - * return a formatted string of the current selection (using Moment.js if available) - */ - toString: function(format) - { - format = format || this._o.format; - if (!isDate(this._d)) { - return ''; - } - if (this._o.toString) { - return this._o.toString(this._d, format); - } - if (hasMoment) { - return moment(this._d).format(format); - } - return this._d.toDateString(); - }, - - /** - * return a Moment.js object of the current selection (if available) - */ - getMoment: function() - { - return hasMoment ? moment(this._d) : null; - }, - - /** - * set the current selection from a Moment.js object (if available) - */ - setMoment: function(date, preventOnSelect) - { - if (hasMoment && moment.isMoment(date)) { - this.setDate(date.toDate(), preventOnSelect); - } - }, - - /** - * return a Date object of the current selection - */ - getDate: function() - { - return isDate(this._d) ? new Date(this._d.getTime()) : null; - }, - - /** - * set the current selection - */ - setDate: function(date, preventOnSelect) - { - if (!date) { - this._d = null; - - if (this._o.field) { - this._o.field.value = ''; - fireEvent(this._o.field, 'change', { firedBy: this }); - } - - return this.draw(); - } - if (typeof date === 'string') { - date = new Date(Date.parse(date)); - } - if (!isDate(date)) { - return; - } - - var min = this._o.minDate, - max = this._o.maxDate; - - if (isDate(min) && date < min) { - date = min; - } else if (isDate(max) && date > max) { - date = max; - } - - this._d = new Date(date.getTime()); - setToStartOfDay(this._d); - this.gotoDate(this._d); - - if (this._o.field) { - this._o.field.value = this.toString(); - fireEvent(this._o.field, 'change', { firedBy: this }); - } - if (!preventOnSelect && typeof this._o.onSelect === 'function') { - this._o.onSelect.call(this, this.getDate()); - } - }, - - /** - * change view to a specific date - */ - gotoDate: function(date) - { - var newCalendar = true; - - if (!isDate(date)) { - return; - } - - if (this.calendars) { - var firstVisibleDate = new Date(this.calendars[0].year, this.calendars[0].month, 1), - lastVisibleDate = new Date(this.calendars[this.calendars.length-1].year, this.calendars[this.calendars.length-1].month, 1), - visibleDate = date.getTime(); - // get the end of the month - lastVisibleDate.setMonth(lastVisibleDate.getMonth()+1); - lastVisibleDate.setDate(lastVisibleDate.getDate()-1); - newCalendar = (visibleDate < firstVisibleDate.getTime() || lastVisibleDate.getTime() < visibleDate); - } - - if (newCalendar) { - this.calendars = [{ - month: date.getMonth(), - year: date.getFullYear() - }]; - if (this._o.mainCalendar === 'right') { - this.calendars[0].month += 1 - this._o.numberOfMonths; - } - } - - this.adjustCalendars(); - }, - - adjustDate: function(sign, days) { - - var day = this.getDate() || new Date(); - var difference = parseInt(days)*24*60*60*1000; - - var newDay; - - if (sign === 'add') { - newDay = new Date(day.valueOf() + difference); - } else if (sign === 'subtract') { - newDay = new Date(day.valueOf() - difference); - } - - this.setDate(newDay); - }, - - adjustCalendars: function() { - this.calendars[0] = adjustCalendar(this.calendars[0]); - for (var c = 1; c < this._o.numberOfMonths; c++) { - this.calendars[c] = adjustCalendar({ - month: this.calendars[0].month + c, - year: this.calendars[0].year - }); - } - this.draw(); - }, - - gotoToday: function() - { - this.gotoDate(new Date()); - }, - - /** - * change view to a specific month (zero-index, e.g. 0: January) - */ - gotoMonth: function(month) - { - if (!isNaN(month)) { - this.calendars[0].month = parseInt(month, 10); - this.adjustCalendars(); - } - }, - - nextMonth: function() - { - this.calendars[0].month++; - this.adjustCalendars(); - }, - - prevMonth: function() - { - this.calendars[0].month--; - this.adjustCalendars(); - }, - - /** - * change view to a specific full year (e.g. "2012") - */ - gotoYear: function(year) - { - if (!isNaN(year)) { - this.calendars[0].year = parseInt(year, 10); - this.adjustCalendars(); - } - }, - - /** - * change the minDate - */ - setMinDate: function(value) - { - if(value instanceof Date) { - setToStartOfDay(value); - this._o.minDate = value; - this._o.minYear = value.getFullYear(); - this._o.minMonth = value.getMonth(); - } else { - this._o.minDate = defaults.minDate; - this._o.minYear = defaults.minYear; - this._o.minMonth = defaults.minMonth; - this._o.startRange = defaults.startRange; - } - - this.draw(); - }, - - /** - * change the maxDate - */ - setMaxDate: function(value) - { - if(value instanceof Date) { - setToStartOfDay(value); - this._o.maxDate = value; - this._o.maxYear = value.getFullYear(); - this._o.maxMonth = value.getMonth(); - } else { - this._o.maxDate = defaults.maxDate; - this._o.maxYear = defaults.maxYear; - this._o.maxMonth = defaults.maxMonth; - this._o.endRange = defaults.endRange; - } - - this.draw(); - }, - - setStartRange: function(value) - { - this._o.startRange = value; - }, - - setEndRange: function(value) - { - this._o.endRange = value; - }, - - /** - * refresh the HTML - */ - draw: function(force) - { - if (!this._v && !force) { - return; - } - var opts = this._o, - minYear = opts.minYear, - maxYear = opts.maxYear, - minMonth = opts.minMonth, - maxMonth = opts.maxMonth, - html = '', - randId; - - if (this._y <= minYear) { - this._y = minYear; - if (!isNaN(minMonth) && this._m < minMonth) { - this._m = minMonth; - } - } - if (this._y >= maxYear) { - this._y = maxYear; - if (!isNaN(maxMonth) && this._m > maxMonth) { - this._m = maxMonth; - } - } - - randId = 'pika-title-' + Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 2); - - for (var c = 0; c < opts.numberOfMonths; c++) { - html += '
' + renderTitle(this, c, this.calendars[c].year, this.calendars[c].month, this.calendars[0].year, randId) + this.render(this.calendars[c].year, this.calendars[c].month, randId) + '
'; - } - - this.el.innerHTML = html; - - if (opts.bound) { - if(opts.field.type !== 'hidden') { - sto(function() { - opts.trigger.focus(); - }, 1); - } - } - - if (typeof this._o.onDraw === 'function') { - this._o.onDraw(this); - } - - if (opts.bound) { - // let the screen reader user know to use arrow keys - opts.field.setAttribute('aria-label', 'Use the arrow keys to pick a date'); - } - }, - - adjustPosition: function() - { - var field, pEl, width, height, viewportWidth, viewportHeight, scrollTop, left, top, clientRect; - - if (this._o.container) return; - - this.el.style.position = 'absolute'; - - field = this._o.trigger; - pEl = field; - width = this.el.offsetWidth; - height = this.el.offsetHeight; - viewportWidth = window.innerWidth || document.documentElement.clientWidth; - viewportHeight = window.innerHeight || document.documentElement.clientHeight; - scrollTop = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop; - - if (typeof field.getBoundingClientRect === 'function') { - clientRect = field.getBoundingClientRect(); - left = clientRect.left + window.pageXOffset; - top = clientRect.bottom + window.pageYOffset; - } else { - left = pEl.offsetLeft; - top = pEl.offsetTop + pEl.offsetHeight; - while((pEl = pEl.offsetParent)) { - left += pEl.offsetLeft; - top += pEl.offsetTop; - } - } - - // default position is bottom & left - if ((this._o.reposition && left + width > viewportWidth) || - ( - this._o.position.indexOf('right') > -1 && - left - width + field.offsetWidth > 0 - ) - ) { - left = left - width + field.offsetWidth; - } - if ((this._o.reposition && top + height > viewportHeight + scrollTop) || - ( - this._o.position.indexOf('top') > -1 && - top - height - field.offsetHeight > 0 - ) - ) { - top = top - height - field.offsetHeight; - } - - this.el.style.left = left + 'px'; - this.el.style.top = top + 'px'; - }, - - /** - * render HTML for a particular month - */ - render: function(year, month, randId) - { - var opts = this._o, - now = new Date(), - days = getDaysInMonth(year, month), - before = new Date(year, month, 1).getDay(), - data = [], - row = []; - setToStartOfDay(now); - if (opts.firstDay > 0) { - before -= opts.firstDay; - if (before < 0) { - before += 7; - } - } - var previousMonth = month === 0 ? 11 : month - 1, - nextMonth = month === 11 ? 0 : month + 1, - yearOfPreviousMonth = month === 0 ? year - 1 : year, - yearOfNextMonth = month === 11 ? year + 1 : year, - daysInPreviousMonth = getDaysInMonth(yearOfPreviousMonth, previousMonth); - var cells = days + before, - after = cells; - while(after > 7) { - after -= 7; - } - cells += 7 - after; - var isWeekSelected = false; - for (var i = 0, r = 0; i < cells; i++) - { - var day = new Date(year, month, 1 + (i - before)), - isSelected = isDate(this._d) ? compareDates(day, this._d) : false, - isToday = compareDates(day, now), - hasEvent = opts.events.indexOf(day.toDateString()) !== -1 ? true : false, - isEmpty = i < before || i >= (days + before), - dayNumber = 1 + (i - before), - monthNumber = month, - yearNumber = year, - isStartRange = opts.startRange && compareDates(opts.startRange, day), - isEndRange = opts.endRange && compareDates(opts.endRange, day), - isInRange = opts.startRange && opts.endRange && opts.startRange < day && day < opts.endRange, - isDisabled = (opts.minDate && day < opts.minDate) || - (opts.maxDate && day > opts.maxDate) || - (opts.disableWeekends && isWeekend(day)) || - (opts.disableDayFn && opts.disableDayFn(day)); - - if (isEmpty) { - if (i < before) { - dayNumber = daysInPreviousMonth + dayNumber; - monthNumber = previousMonth; - yearNumber = yearOfPreviousMonth; - } else { - dayNumber = dayNumber - days; - monthNumber = nextMonth; - yearNumber = yearOfNextMonth; - } - } - - var dayConfig = { - day: dayNumber, - month: monthNumber, - year: yearNumber, - hasEvent: hasEvent, - isSelected: isSelected, - isToday: isToday, - isDisabled: isDisabled, - isEmpty: isEmpty, - isStartRange: isStartRange, - isEndRange: isEndRange, - isInRange: isInRange, - showDaysInNextAndPreviousMonths: opts.showDaysInNextAndPreviousMonths, - enableSelectionDaysInNextAndPreviousMonths: opts.enableSelectionDaysInNextAndPreviousMonths - }; - - if (opts.pickWholeWeek && isSelected) { - isWeekSelected = true; - } - - row.push(renderDay(dayConfig)); - - if (++r === 7) { - if (opts.showWeekNumber) { - row.unshift(renderWeek(i - before, month, year)); - } - data.push(renderRow(row, opts.isRTL, opts.pickWholeWeek, isWeekSelected)); - row = []; - r = 0; - isWeekSelected = false; - } - } - return renderTable(opts, data, randId); - }, - - isVisible: function() - { - return this._v; - }, - - show: function() - { - if (!this.isVisible()) { - this._v = true; - this.draw(); - removeClass(this.el, 'is-hidden'); - if (this._o.bound) { - addEvent(document, 'click', this._onClick); - this.adjustPosition(); - } - if (typeof this._o.onOpen === 'function') { - this._o.onOpen.call(this); - } - } - }, - - hide: function() - { - var v = this._v; - if (v !== false) { - if (this._o.bound) { - removeEvent(document, 'click', this._onClick); - } - this.el.style.position = 'static'; // reset - this.el.style.left = 'auto'; - this.el.style.top = 'auto'; - addClass(this.el, 'is-hidden'); - this._v = false; - if (v !== undefined && typeof this._o.onClose === 'function') { - this._o.onClose.call(this); - } - } - }, - - /** - * GAME OVER - */ - destroy: function() - { - var opts = this._o; - - this.hide(); - removeEvent(this.el, 'mousedown', this._onMouseDown, true); - removeEvent(this.el, 'touchend', this._onMouseDown, true); - removeEvent(this.el, 'change', this._onChange); - if (opts.keyboardInput) { - removeEvent(document, 'keydown', this._onKeyChange); - } - if (opts.field) { - removeEvent(opts.field, 'change', this._onInputChange); - if (opts.bound) { - removeEvent(opts.trigger, 'click', this._onInputClick); - removeEvent(opts.trigger, 'focus', this._onInputFocus); - removeEvent(opts.trigger, 'blur', this._onInputBlur); - } - } - if (this.el.parentNode) { - this.el.parentNode.removeChild(this.el); - } - } - - }; - - return Pikaday; -})); - /*! X-editable - v1.5.1 * In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery * http://github.com/vitalets/x-editable diff --git a/public/assets/frontend/js/app.js b/public/assets/frontend/js/app.js index d3987176..a74b4ff3 100644 --- a/public/assets/frontend/js/app.js +++ b/public/assets/frontend/js/app.js @@ -366,7 +366,7 @@ eval("/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__base_map__ = __webpa /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* unused harmony export onFeaturePointClick */\n/* unused harmony export pointToLayer */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__base_map__ = __webpack_require__(\"./resources/js/maps/base_map.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__helpers__ = __webpack_require__(\"./resources/js/maps/helpers.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__config__ = __webpack_require__(\"./resources/js/maps/config.js\");\n\nvar leaflet = __webpack_require__(\"./node_modules/leaflet/dist/leaflet-src.js\");\n\n\n\n\n\n\n/**\n * Show some popup text when a feature is clicked on\n * @param feature\n * @param layer\n */\nvar onFeaturePointClick = function onFeaturePointClick(feature, layer) {\n var popup_html = '';\n if (feature.properties && feature.properties.popup) {\n popup_html += feature.properties.popup;\n }\n\n layer.bindPopup(popup_html);\n};\n\n/**\n * Show each point as a marker\n * @param feature\n * @param latlng\n * @returns {*}\n */\nvar pointToLayer = function pointToLayer(feature, latlng) {\n return leaflet.circleMarker(latlng, {\n radius: 5,\n fillColor: __WEBPACK_IMPORTED_MODULE_2__config__[\"b\" /* CIRCLE_COLOR */],\n color: '#000',\n weight: 1,\n opacity: 1,\n fillOpacity: 0.8\n });\n};\n\n/**\n *\n * @param opts\n * @private\n */\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (opts) {\n\n opts = Object.assign({\n route_points: null,\n planned_route_line: null,\n actual_route_points: null,\n actual_route_line: null,\n render_elem: 'map',\n metar_wms: {\n url: '',\n params: {}\n }\n }, opts);\n\n console.log(opts);\n\n var map = Object(__WEBPACK_IMPORTED_MODULE_0__base_map__[\"a\" /* default */])(opts);\n\n if (opts.metar_wms.url !== '') {\n Object(__WEBPACK_IMPORTED_MODULE_1__helpers__[\"a\" /* addWMSLayer */])(map, opts.metar_wms);\n }\n\n var geodesicLayer = leaflet.geodesic([], {\n weight: 4,\n opacity: 0.9,\n color: __WEBPACK_IMPORTED_MODULE_2__config__[\"c\" /* PLAN_ROUTE_COLOR */],\n steps: 50,\n wrap: false\n }).addTo(map);\n\n geodesicLayer.geoJson(opts.planned_route_line);\n\n try {\n map.fitBounds(geodesicLayer.getBounds());\n } catch (e) {\n console.log(e);\n }\n\n // Draw the route points after\n if (opts.route_points !== null) {\n var route_points = leaflet.geoJSON(opts.route_points, {\n onEachFeature: onFeaturePointClick,\n pointToLayer: pointToLayer,\n style: {\n 'color': __WEBPACK_IMPORTED_MODULE_2__config__[\"c\" /* PLAN_ROUTE_COLOR */],\n 'weight': 3,\n 'opacity': 0.65\n }\n });\n\n route_points.addTo(map);\n }\n\n /**\n * draw the actual route\n */\n\n if (opts.actual_route_line !== null && opts.actual_route_line.features.length > 0) {\n var _geodesicLayer = leaflet.geodesic([], {\n weight: 3,\n opacity: 0.9,\n color: __WEBPACK_IMPORTED_MODULE_2__config__[\"a\" /* ACTUAL_ROUTE_COLOR */],\n steps: 50,\n wrap: false\n }).addTo(map);\n\n _geodesicLayer.geoJson(opts.actual_route_line);\n\n try {\n map.fitBounds(_geodesicLayer.getBounds());\n } catch (e) {\n console.log(e);\n }\n }\n\n if (opts.actual_route_points !== null && opts.actual_route_points.features.length > 0) {\n var _route_points = leaflet.geoJSON(opts.actual_route_points, {\n onEachFeature: onFeaturePointClick,\n pointToLayer: pointToLayer,\n style: {\n 'color': __WEBPACK_IMPORTED_MODULE_2__config__[\"a\" /* ACTUAL_ROUTE_COLOR */],\n 'weight': 3,\n 'opacity': 0.65\n }\n });\n\n _route_points.addTo(map);\n }\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvanMvbWFwcy9yb3V0ZV9tYXAuanM/YTc0NSJdLCJuYW1lcyI6WyJsZWFmbGV0IiwicmVxdWlyZSIsIm9uRmVhdHVyZVBvaW50Q2xpY2siLCJmZWF0dXJlIiwibGF5ZXIiLCJwb3B1cF9odG1sIiwicHJvcGVydGllcyIsInBvcHVwIiwiYmluZFBvcHVwIiwicG9pbnRUb0xheWVyIiwibGF0bG5nIiwiY2lyY2xlTWFya2VyIiwicmFkaXVzIiwiZmlsbENvbG9yIiwiY29sb3IiLCJ3ZWlnaHQiLCJvcGFjaXR5IiwiZmlsbE9wYWNpdHkiLCJvcHRzIiwiT2JqZWN0IiwiYXNzaWduIiwicm91dGVfcG9pbnRzIiwicGxhbm5lZF9yb3V0ZV9saW5lIiwiYWN0dWFsX3JvdXRlX3BvaW50cyIsImFjdHVhbF9yb3V0ZV9saW5lIiwicmVuZGVyX2VsZW0iLCJtZXRhcl93bXMiLCJ1cmwiLCJwYXJhbXMiLCJjb25zb2xlIiwibG9nIiwibWFwIiwiZHJhd19iYXNlX21hcCIsImFkZFdNU0xheWVyIiwiZ2VvZGVzaWNMYXllciIsImdlb2Rlc2ljIiwic3RlcHMiLCJ3cmFwIiwiYWRkVG8iLCJnZW9Kc29uIiwiZml0Qm91bmRz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29uKG9wdHMuYWN0dWFsX3JvdXRlX2xpbmUpO1xuXG4gICAgdHJ5IHtcbiAgICAgIG1hcC5maXRCb3VuZHMoZ2VvZGVzaWNMYXllci5nZXRCb3VuZHMoKSlcbiAgICB9IGNhdGNoIChlKSB7XG4gICAgICBjb25zb2xlLmxvZyhlKVxuICAgIH1cbiAgfVxuXG4gIGlmIChvcHRzLmFjdHVhbF9yb3V0ZV9wb2ludHMgIT09IG51bGwgJiYgb3B0cy5hY3R1YWxfcm91dGVfcG9pbnRzLmZlYXR1cmVzLmxlbmd0aCA+IDApIHtcbiAgICBsZXQgcm91dGVfcG9pbnRzID0gbGVhZmxldC5nZW9KU09OKG9wdHMuYWN0dWFsX3JvdXRlX3BvaW50cywge1xuICAgICAgb25FYWNoRmVhdHVyZTogb25GZWF0dXJlUG9pbnRDbGljayxcbiAgICAgIHBvaW50VG9MYXllcjogcG9pbnRUb0xheWVyLFxuICAgICAgc3R5bGU6IHtcbiAgICAgICAgJ2NvbG9yJzogQUNUVUFMX1JPVVRFX0NPTE9SLFxuICAgICAgICAnd2VpZ2h0JzogMyxcbiAgICAgICAgJ29wYWNpdHknOiAwLjY1LFxuICAgICAgfSxcbiAgICB9KTtcblxuICAgIHJvdXRlX3BvaW50cy5hZGRUbyhtYXApXG4gIH1cbn07XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9yZXNvdXJjZXMvanMvbWFwcy9yb3V0ZV9tYXAuanMiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./resources/js/maps/route_map.js\n"); +eval("/* unused harmony export onFeaturePointClick */\n/* unused harmony export pointToLayer */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__base_map__ = __webpack_require__(\"./resources/js/maps/base_map.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__helpers__ = __webpack_require__(\"./resources/js/maps/helpers.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__config__ = __webpack_require__(\"./resources/js/maps/config.js\");\nvar leaflet = __webpack_require__(\"./node_modules/leaflet/dist/leaflet-src.js\");\n\n\n\n\n\n\n/**\n * Show some popup text when a feature is clicked on\n * @param feature\n * @param layer\n */\nvar onFeaturePointClick = function onFeaturePointClick(feature, layer) {\n var popup_html = '';\n if (feature.properties && feature.properties.popup) {\n popup_html += feature.properties.popup;\n }\n\n layer.bindPopup(popup_html);\n};\n\n/**\n * Show each point as a marker\n * @param feature\n * @param latlng\n * @returns {*}\n */\nvar pointToLayer = function pointToLayer(feature, latlng) {\n return leaflet.circleMarker(latlng, {\n radius: 5,\n fillColor: __WEBPACK_IMPORTED_MODULE_2__config__[\"b\" /* CIRCLE_COLOR */],\n color: '#000',\n weight: 1,\n opacity: 1,\n fillOpacity: 0.8\n });\n};\n\n/**\n *\n * @param opts\n * @private\n */\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (opts) {\n\n opts = Object.assign({\n\n route_points: null,\n planned_route_line: null,\n actual_route_points: null,\n actual_route_line: null,\n render_elem: 'map',\n live_map: false,\n aircraft_icon: '/assets/img/acars/aircraft.png',\n metar_wms: {\n url: '',\n params: {}\n }\n }, opts);\n\n var aircraftIcon = leaflet.icon({\n iconUrl: opts.aircraft_icon,\n iconSize: [42, 42],\n iconAnchor: [21, 21]\n });\n\n var map = Object(__WEBPACK_IMPORTED_MODULE_0__base_map__[\"a\" /* default */])(opts);\n var layerLiveFlight = void 0;\n\n if (opts.metar_wms.url !== '') {\n Object(__WEBPACK_IMPORTED_MODULE_1__helpers__[\"a\" /* addWMSLayer */])(map, opts.metar_wms);\n }\n\n var geodesicLayer = leaflet.geodesic([], {\n weight: 4,\n opacity: 0.9,\n color: __WEBPACK_IMPORTED_MODULE_2__config__[\"c\" /* PLAN_ROUTE_COLOR */],\n steps: 50,\n wrap: false\n }).addTo(map);\n\n geodesicLayer.geoJson(opts.planned_route_line);\n\n try {\n map.fitBounds(geodesicLayer.getBounds());\n } catch (e) {\n console.log(e);\n }\n\n // Draw the route points after\n if (opts.route_points !== null) {\n var route_points = leaflet.geoJSON(opts.route_points, {\n onEachFeature: onFeaturePointClick,\n pointToLayer: pointToLayer,\n style: {\n 'color': __WEBPACK_IMPORTED_MODULE_2__config__[\"c\" /* PLAN_ROUTE_COLOR */],\n 'weight': 3,\n 'opacity': 0.65\n }\n });\n\n route_points.addTo(map);\n }\n\n /**\n * draw the actual route\n */\n\n if (opts.actual_route_line !== null && opts.actual_route_line.features.length > 0) {\n var _geodesicLayer = leaflet.geodesic([], {\n weight: 3,\n opacity: 0.9,\n color: __WEBPACK_IMPORTED_MODULE_2__config__[\"a\" /* ACTUAL_ROUTE_COLOR */],\n steps: 50,\n wrap: false\n }).addTo(map);\n\n _geodesicLayer.geoJson(opts.actual_route_line);\n\n try {\n map.fitBounds(_geodesicLayer.getBounds());\n } catch (e) {\n console.log(e);\n }\n }\n\n if (opts.actual_route_points !== null && opts.actual_route_points.features.length > 0) {\n var _route_points = leaflet.geoJSON(opts.actual_route_points, {\n onEachFeature: onFeaturePointClick,\n pointToLayer: pointToLayer,\n style: {\n 'color': __WEBPACK_IMPORTED_MODULE_2__config__[\"a\" /* ACTUAL_ROUTE_COLOR */],\n 'weight': 3,\n 'opacity': 0.65\n }\n });\n\n _route_points.addTo(map);\n }\n\n /**\n *\n */\n var liveFlight = function liveFlight() {\n var uri = opts.pirep_uri;\n var live_route = $.ajax({\n url: uri,\n dataType: 'json',\n error: console.log\n });\n\n $.when(live_route).done(function (routeJson) {\n layerLiveFlight = leaflet.geoJSON(routeJson, {\n pointToLayer: function pointToLayer(feature, latlon) {\n return leaflet.marker(latlon, {\n icon: aircraftIcon,\n rotationAngle: feature.properties.heading\n });\n }\n });\n\n layerLiveFlight.addTo(map);\n });\n };\n\n setInterval(liveFlight, 10000);\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZ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xuICAgICAgICAgICAgICAgICdjb2xvcic6IEFDVFVBTF9ST1VURV9DT0xPUixcbiAgICAgICAgICAgICAgICAnd2VpZ2h0JzogMyxcbiAgICAgICAgICAgICAgICAnb3BhY2l0eSc6IDAuNjUsXG4gICAgICAgICAgICB9LFxuICAgICAgICB9KTtcblxuICAgICAgICByb3V0ZV9wb2ludHMuYWRkVG8obWFwKVxuICAgIH1cblxuICAgIC8qKlxuICAgICAqXG4gICAgICovXG4gICAgY29uc3QgbGl2ZUZsaWdodCA9ICgpID0+IHtcbiAgICAgICAgY29uc3QgdXJpID0gb3B0cy5waXJlcF91cmk7XG4gICAgICAgIGNvbnN0IGxpdmVfcm91dGUgPSAkLmFqYXgoe1xuICAgICAgICAgICAgdXJsOiB1cmksXG4gICAgICAgICAgICBkYXRhVHlwZTogJ2pzb24nLFxuICAgICAgICAgICAgZXJyb3I6IGNvbnNvbGUubG9nXG4gICAgICAgIH0pO1xuXG4gICAgICAgICQud2hlbihsaXZlX3JvdXRlKS5kb25lKChyb3V0ZUpzb24pID0+IHtcbiAgICAgICAgICAgIGxheWVyTGl2ZUZsaWdodCA9IGxlYWZsZXQuZ2VvSlNPTihyb3V0ZUpzb24sIHtcbiAgICAgICAgICAgICAgICBwb2ludFRvTGF5ZXI6IGZ1bmN0aW9uIChmZWF0dXJlLCBsYXRsb24pIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGxlYWZsZXQubWFya2VyKGxhdGxvbiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWNvbjogYWlyY3JhZnRJY29uLFxuICAgICAgICAgICAgICAgICAgICAgICAgcm90YXRpb25BbmdsZTogZmVhdHVyZS5wcm9wZXJ0aWVzLmhlYWRpbmdcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KVxuXG4gICAgICAgICAgICBsYXllckxpdmVGbGlnaHQuYWRkVG8obWFwKVxuICAgICAgICB9KTtcbiAgICB9O1xuXG4gICAgc2V0SW50ZXJ2YWwobGl2ZUZsaWdodCwgMTAwMDApO1xufTtcblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyAuL3Jlc291cmNlcy9qcy9tYXBzL3JvdXRlX21hcC5qcyJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./resources/js/maps/route_map.js\n"); /***/ }), diff --git a/public/mix-manifest.json b/public/mix-manifest.json index f8f7bd30..09d6486b 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,16 +1,16 @@ { - "/assets/frontend/js/app.js": "/assets/frontend/js/app.js?id=3d5b0dff38050f6b5e0b", + "/assets/frontend/js/app.js": "/assets/frontend/js/app.js?id=cd886ba18357a1c96ec0", "/assets/frontend/css/now-ui-kit.css": "/assets/frontend/css/now-ui-kit.css?id=b0a0f05b94a4486db4f2", "/assets/admin/css/vendor.min.css": "/assets/admin/css/vendor.min.css?id=cc80aec3cf1646f83d8d", - "/assets/admin/js/app.js": "/assets/admin/js/app.js?id=926a7c24ec36533523e3", + "/assets/admin/js/app.js": "/assets/admin/js/app.js?id=559d5e8e5d6ecc64a3af", "/assets/installer/js/app.js": "/assets/installer/js/app.js?id=c65781eda730445d666e", "/assets/fonts/glyphicons-halflings-regular.woff2": "/assets/fonts/glyphicons-halflings-regular.woff2?id=b5b5055c6d812c0f9f0d", "/assets/admin/fonts/glyphicons-halflings-regular.woff2": "/assets/admin/fonts/glyphicons-halflings-regular.woff2?id=b5b5055c6d812c0f9f0d", "/assets/admin/img/clear.png": "/assets/admin/img/clear.png?id=0e92f4c3efc6988a3c96", "/assets/admin/img/loading.gif": "/assets/admin/img/loading.gif?id=90a4b76b4f11558691f6", "/assets/global/js/jquery.js": "/assets/global/js/jquery.js?id=6a07da9fae934baf3f74", - "/assets/admin/css/vendor.css": "/assets/admin/css/vendor.css?id=99aedbd62dfa118e7b73", - "/assets/admin/js/vendor.js": "/assets/admin/js/vendor.js?id=5130233c88c71fc60135", + "/assets/admin/css/vendor.css": "/assets/admin/css/vendor.css?id=d4c03403265f42272050", + "/assets/admin/js/vendor.js": "/assets/admin/js/vendor.js?id=aa7db4bedfe23409f625", "/assets/admin/css/blue.png": "/assets/admin/css/blue.png?id=753a3c0dec86d3a38d9c", "/assets/admin/css/blue@2x.png": "/assets/admin/css/blue@2x.png?id=97da23d47b838cbd4bef", "/assets/global/js/vendor.js": "/assets/global/js/vendor.js?id=6436d215691e8f38eb12", diff --git a/resources/js/maps/route_map.js b/resources/js/maps/route_map.js index 28622408..233de223 100644 --- a/resources/js/maps/route_map.js +++ b/resources/js/maps/route_map.js @@ -1,14 +1,9 @@ - const leaflet = require('leaflet'); import draw_base_map from './base_map' -import { addWMSLayer } from './helpers'; +import {addWMSLayer} from './helpers'; -import { - ACTUAL_ROUTE_COLOR, - PLAN_ROUTE_COLOR, - CIRCLE_COLOR -} from './config' +import {ACTUAL_ROUTE_COLOR, CIRCLE_COLOR, PLAN_ROUTE_COLOR} from './config' /** * Show some popup text when a feature is clicked on @@ -16,12 +11,12 @@ import { * @param layer */ export const onFeaturePointClick = (feature, layer) => { - let popup_html = ''; - if (feature.properties && feature.properties.popup) { - popup_html += feature.properties.popup - } + let popup_html = ''; + if (feature.properties && feature.properties.popup) { + popup_html += feature.properties.popup + } - layer.bindPopup(popup_html) + layer.bindPopup(popup_html) }; /** @@ -31,14 +26,14 @@ export const onFeaturePointClick = (feature, layer) => { * @returns {*} */ export const pointToLayer = (feature, latlng) => { - return leaflet.circleMarker(latlng, { - radius: 5, - fillColor: CIRCLE_COLOR, - color: '#000', - weight: 1, - opacity: 1, - fillOpacity: 0.8 - }) + return leaflet.circleMarker(latlng, { + radius: 5, + fillColor: CIRCLE_COLOR, + color: '#000', + weight: 1, + opacity: 1, + fillOpacity: 0.8 + }) } /** @@ -48,90 +43,125 @@ export const pointToLayer = (feature, latlng) => { */ export default (opts) => { - opts = Object.assign({ - route_points: null, - planned_route_line: null, - actual_route_points: null, - actual_route_line: null, - render_elem: 'map', - metar_wms: { - url: '', - params: {} - }, - }, opts); + opts = Object.assign({ - console.log(opts); + route_points: null, + planned_route_line: null, + actual_route_points: null, + actual_route_line: null, + render_elem: 'map', + live_map: false, + aircraft_icon: '/assets/img/acars/aircraft.png', + metar_wms: { + url: '', + params: {} + }, + }, opts); - let map = draw_base_map(opts); - - if (opts.metar_wms.url !== '') { - addWMSLayer(map, opts.metar_wms); - } - - let geodesicLayer = leaflet.geodesic([], { - weight: 4, - opacity: 0.9, - color: PLAN_ROUTE_COLOR, - steps: 50, - wrap: false, - }).addTo(map); - - geodesicLayer.geoJson(opts.planned_route_line); - - try { - map.fitBounds(geodesicLayer.getBounds()) - } catch (e) { - console.log(e) - } - - // Draw the route points after - if (opts.route_points !== null) { - let route_points = leaflet.geoJSON(opts.route_points, { - onEachFeature: onFeaturePointClick, - pointToLayer: pointToLayer, - style: { - 'color': PLAN_ROUTE_COLOR, - 'weight': 3, - 'opacity': 0.65, - }, + const aircraftIcon = leaflet.icon({ + iconUrl: opts.aircraft_icon, + iconSize: [42, 42], + iconAnchor: [21, 21], }); - route_points.addTo(map); - } + let map = draw_base_map(opts); + let layerLiveFlight; - /** - * draw the actual route - */ + if (opts.metar_wms.url !== '') { + addWMSLayer(map, opts.metar_wms); + } - if (opts.actual_route_line !== null && opts.actual_route_line.features.length > 0) { let geodesicLayer = leaflet.geodesic([], { - weight: 3, - opacity: 0.9, - color: ACTUAL_ROUTE_COLOR, - steps: 50, - wrap: false, + weight: 4, + opacity: 0.9, + color: PLAN_ROUTE_COLOR, + steps: 50, + wrap: false, }).addTo(map); - geodesicLayer.geoJson(opts.actual_route_line); + geodesicLayer.geoJson(opts.planned_route_line); try { - map.fitBounds(geodesicLayer.getBounds()) + map.fitBounds(geodesicLayer.getBounds()) } catch (e) { - console.log(e) + console.log(e) } - } - if (opts.actual_route_points !== null && opts.actual_route_points.features.length > 0) { - let route_points = leaflet.geoJSON(opts.actual_route_points, { - onEachFeature: onFeaturePointClick, - pointToLayer: pointToLayer, - style: { - 'color': ACTUAL_ROUTE_COLOR, - 'weight': 3, - 'opacity': 0.65, - }, - }); + // Draw the route points after + if (opts.route_points !== null) { + let route_points = leaflet.geoJSON(opts.route_points, { + onEachFeature: onFeaturePointClick, + pointToLayer: pointToLayer, + style: { + 'color': PLAN_ROUTE_COLOR, + 'weight': 3, + 'opacity': 0.65, + }, + }); - route_points.addTo(map) - } + route_points.addTo(map); + } + + /** + * draw the actual route + */ + + if (opts.actual_route_line !== null && opts.actual_route_line.features.length > 0) { + let geodesicLayer = leaflet.geodesic([], { + weight: 3, + opacity: 0.9, + color: ACTUAL_ROUTE_COLOR, + steps: 50, + wrap: false, + }).addTo(map); + + geodesicLayer.geoJson(opts.actual_route_line); + + try { + map.fitBounds(geodesicLayer.getBounds()) + } catch (e) { + console.log(e) + } + } + + if (opts.actual_route_points !== null && opts.actual_route_points.features.length > 0) { + let route_points = leaflet.geoJSON(opts.actual_route_points, { + onEachFeature: onFeaturePointClick, + pointToLayer: pointToLayer, + style: { + 'color': ACTUAL_ROUTE_COLOR, + 'weight': 3, + 'opacity': 0.65, + }, + }); + + route_points.addTo(map) + } + + /** + * + */ + const liveFlight = () => { + const uri = opts.pirep_uri; + const live_route = $.ajax({ + url: uri, + dataType: 'json', + error: console.log + }); + + $.when(live_route).done((routeJson) => { + layerLiveFlight = leaflet.geoJSON(routeJson, { + pointToLayer: function (feature, latlon) { + return leaflet.marker(latlon, { + icon: aircraftIcon, + rotationAngle: feature.properties.heading + }) + } + }); + + layerLiveFlight.addTo(map) + }); + }; + + setInterval(liveFlight, 10000); }; diff --git a/resources/views/layouts/default/pireps/map.blade.php b/resources/views/layouts/default/pireps/map.blade.php index ed447677..9aa65731 100644 --- a/resources/views/layouts/default/pireps/map.blade.php +++ b/resources/views/layouts/default/pireps/map.blade.php @@ -9,10 +9,12 @@ @section('scripts') @endsection diff --git a/resources/views/layouts/default/pireps/show.blade.php b/resources/views/layouts/default/pireps/show.blade.php index 68b47566..8986d0da 100644 --- a/resources/views/layouts/default/pireps/show.blade.php +++ b/resources/views/layouts/default/pireps/show.blade.php @@ -9,7 +9,13 @@

{{$pirep->airline->code}}{{ $pirep->ident }}

-

Arrived {{$pirep->created_at->diffForHumans()}}

+

+ @if($pirep->state === PirepState::IN_PROGRESS) + + @else + Arrived {{$pirep->created_at->diffForHumans()}} + @endif +

@@ -55,8 +61,10 @@
- {{ Utils::minutesToTimeString($pirep->flight_time) }} + style="width: {{$pirep->progress_percent}}%;"> + {{--

+ {{ Utils::minutesToTimeString($pirep->flight_time) }} +

--}}
@@ -78,8 +86,8 @@

 

- - +
+ {{-- + --}} + + + + diff --git a/resources/views/layouts/default/widgets/live_map.blade.php b/resources/views/layouts/default/widgets/live_map.blade.php index 5a257d2e..ec5f3d30 100644 --- a/resources/views/layouts/default/widgets/live_map.blade.php +++ b/resources/views/layouts/default/widgets/live_map.blade.php @@ -16,9 +16,10 @@
Status @php @@ -96,6 +104,15 @@ {{ PirepState::label($pirep->state) }}
State +
+ {{ PirepStatus::label($pirep->status) }} +
+
@foreach($pireps as $pirep) - + + diff --git a/tests/UtilsTest.php b/tests/UtilsTest.php index f90931bb..350ac300 100644 --- a/tests/UtilsTest.php +++ b/tests/UtilsTest.php @@ -9,8 +9,8 @@ class UtilsTest extends TestCase public function testDates() { - $carbon = new \Carbon\Carbon('2018-03-18 00:20:43'); - //echo $carbon; + $carbon = new \Carbon\Carbon('2018-04-28T12:55:40Z'); + $this->assertNotNull($carbon); } public function testSecondsToTimeParts()
{{ $pirep->ident }}{{ $pirep->airline->code }}{{ $pirep->ident }} {{ $pirep->dpt_airport_id }} {{ $pirep->arr_airport_id }}{{ $pirep->aircraft->name }} {{ PirepStatus::label($pirep->status) }}