kopia lustrzana https://github.com/dl2alf/AirScout
V1.4.2.0
rodzic
05485dc1a4
commit
9916d150a8
|
@ -406,9 +406,10 @@ namespace AirScout.Aircrafts
|
|||
public int AircraftBulkInsert(List<AircraftDesignator> ads)
|
||||
{
|
||||
int errors = 0;
|
||||
try
|
||||
|
||||
lock (db)
|
||||
{
|
||||
lock (db)
|
||||
try
|
||||
{
|
||||
db.BeginTransaction();
|
||||
foreach (AircraftDesignator ad in ads)
|
||||
|
@ -423,22 +424,25 @@ namespace AirScout.Aircrafts
|
|||
errors++;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
||||
}
|
||||
finally
|
||||
{
|
||||
db.Commit();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
||||
}
|
||||
return -errors;
|
||||
}
|
||||
|
||||
public int AircraftBulkDelete(List<AircraftDesignator> ads)
|
||||
{
|
||||
int errors = 0;
|
||||
try
|
||||
lock (db)
|
||||
{
|
||||
lock (db)
|
||||
try
|
||||
{
|
||||
db.BeginTransaction();
|
||||
foreach (AircraftDesignator ad in ads)
|
||||
|
@ -453,13 +457,16 @@ namespace AirScout.Aircrafts
|
|||
errors++;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
||||
}
|
||||
finally
|
||||
{
|
||||
db.Commit();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
||||
}
|
||||
return -errors;
|
||||
}
|
||||
|
||||
|
@ -468,9 +475,9 @@ namespace AirScout.Aircrafts
|
|||
if (ads == null)
|
||||
return 0;
|
||||
int i = 0;
|
||||
try
|
||||
lock (db)
|
||||
{
|
||||
lock (db)
|
||||
try
|
||||
{
|
||||
db.BeginTransaction();
|
||||
foreach (AircraftDesignator ad in ads)
|
||||
|
@ -485,13 +492,16 @@ namespace AirScout.Aircrafts
|
|||
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
||||
}
|
||||
finally
|
||||
{
|
||||
db.Commit();
|
||||
}
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
|
@ -885,9 +895,9 @@ namespace AirScout.Aircrafts
|
|||
public int AircraftTypeBulkInsert(List<AircraftTypeDesignator> tds)
|
||||
{
|
||||
int errors = 0;
|
||||
try
|
||||
lock (db)
|
||||
{
|
||||
lock (db)
|
||||
try
|
||||
{
|
||||
db.BeginTransaction();
|
||||
foreach (AircraftTypeDesignator td in tds)
|
||||
|
@ -902,22 +912,25 @@ namespace AirScout.Aircrafts
|
|||
errors++;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
||||
}
|
||||
finally
|
||||
{
|
||||
db.Commit();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
||||
}
|
||||
return -errors;
|
||||
}
|
||||
|
||||
public int AircraftTypeBulkDelete(List<AircraftTypeDesignator> ads)
|
||||
{
|
||||
int errors = 0;
|
||||
try
|
||||
lock (db)
|
||||
{
|
||||
lock (db)
|
||||
try
|
||||
{
|
||||
db.BeginTransaction();
|
||||
foreach (AircraftTypeDesignator td in ads)
|
||||
|
@ -932,13 +945,16 @@ namespace AirScout.Aircrafts
|
|||
errors++;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
||||
}
|
||||
finally
|
||||
{
|
||||
db.Commit();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
||||
}
|
||||
return -errors;
|
||||
}
|
||||
|
||||
|
@ -949,13 +965,23 @@ namespace AirScout.Aircrafts
|
|||
int i = 0;
|
||||
lock (db)
|
||||
{
|
||||
db.BeginTransaction();
|
||||
foreach (AircraftTypeDesignator ad in ads)
|
||||
try
|
||||
{
|
||||
AircraftTypeInsertOrUpdateIfNewer(ad);
|
||||
i++;
|
||||
db.BeginTransaction();
|
||||
foreach (AircraftTypeDesignator ad in ads)
|
||||
{
|
||||
AircraftTypeInsertOrUpdateIfNewer(ad);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
||||
}
|
||||
finally
|
||||
{
|
||||
db.Commit();
|
||||
}
|
||||
db.Commit();
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
@ -1285,9 +1311,9 @@ namespace AirScout.Aircrafts
|
|||
public int AirlineBulkInsert(List<AirlineDesignator> lds)
|
||||
{
|
||||
int errors = 0;
|
||||
try
|
||||
lock (db)
|
||||
{
|
||||
lock (db)
|
||||
try
|
||||
{
|
||||
db.BeginTransaction();
|
||||
foreach (AirlineDesignator ld in lds)
|
||||
|
@ -1302,22 +1328,25 @@ namespace AirScout.Aircrafts
|
|||
errors++;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
||||
}
|
||||
finally
|
||||
{
|
||||
db.Commit();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
||||
}
|
||||
return -errors;
|
||||
}
|
||||
|
||||
public int AirlineBulkDelete(List<AirlineDesignator> lds)
|
||||
{
|
||||
int errors = 0;
|
||||
try
|
||||
lock (db)
|
||||
{
|
||||
lock (db)
|
||||
try
|
||||
{
|
||||
db.BeginTransaction();
|
||||
foreach (AirlineDesignator ld in lds)
|
||||
|
@ -1332,13 +1361,16 @@ namespace AirScout.Aircrafts
|
|||
errors++;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
||||
}
|
||||
finally
|
||||
{
|
||||
db.Commit();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
||||
}
|
||||
return -errors;
|
||||
}
|
||||
|
||||
|
@ -1348,14 +1380,24 @@ namespace AirScout.Aircrafts
|
|||
return 0;
|
||||
int i = 0;
|
||||
lock (db)
|
||||
{
|
||||
db.BeginTransaction();
|
||||
foreach (AirlineDesignator ld in lds)
|
||||
{
|
||||
try
|
||||
{
|
||||
AirlineInsertOrUpdateIfNewer(ld);
|
||||
i++;
|
||||
db.BeginTransaction();
|
||||
foreach (AirlineDesignator ld in lds)
|
||||
{
|
||||
AirlineInsertOrUpdateIfNewer(ld);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
||||
}
|
||||
finally
|
||||
{
|
||||
db.Commit();
|
||||
}
|
||||
db.Commit();
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
@ -1691,9 +1733,9 @@ namespace AirScout.Aircrafts
|
|||
public int AirportBulkInsert(List<AirportDesignator> pds)
|
||||
{
|
||||
int errors = 0;
|
||||
try
|
||||
lock (db)
|
||||
{
|
||||
lock (db)
|
||||
try
|
||||
{
|
||||
db.BeginTransaction();
|
||||
foreach (AirportDesignator pd in pds)
|
||||
|
@ -1708,22 +1750,25 @@ namespace AirScout.Aircrafts
|
|||
errors++;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
||||
}
|
||||
finally
|
||||
{
|
||||
db.Commit();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
||||
}
|
||||
return -errors;
|
||||
}
|
||||
|
||||
public int AirportBulkDelete(List<AirportDesignator> pds)
|
||||
{
|
||||
int errors = 0;
|
||||
try
|
||||
lock (db)
|
||||
{
|
||||
lock (db)
|
||||
try
|
||||
{
|
||||
db.BeginTransaction();
|
||||
foreach (AirportDesignator pd in pds)
|
||||
|
@ -1738,13 +1783,16 @@ namespace AirScout.Aircrafts
|
|||
errors++;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
||||
}
|
||||
finally
|
||||
{
|
||||
db.Commit();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
||||
}
|
||||
return -errors;
|
||||
}
|
||||
|
||||
|
@ -1755,13 +1803,23 @@ namespace AirScout.Aircrafts
|
|||
int i = 0;
|
||||
lock (db)
|
||||
{
|
||||
db.BeginTransaction();
|
||||
foreach (AirportDesignator pd in pds)
|
||||
try
|
||||
{
|
||||
AirportInsertOrUpdateIfNewer(pd);
|
||||
i++;
|
||||
db.BeginTransaction();
|
||||
foreach (AirportDesignator pd in pds)
|
||||
{
|
||||
AirportInsertOrUpdateIfNewer(pd);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
||||
}
|
||||
finally
|
||||
{
|
||||
db.Commit();
|
||||
}
|
||||
db.Commit();
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
@ -2088,9 +2146,9 @@ namespace AirScout.Aircrafts
|
|||
public int AircraftRegistrationBulkInsert(List<AircraftRegistrationDesignator> rds)
|
||||
{
|
||||
int errors = 0;
|
||||
try
|
||||
lock (db)
|
||||
{
|
||||
lock (db)
|
||||
try
|
||||
{
|
||||
db.BeginTransaction();
|
||||
foreach (AircraftRegistrationDesignator rd in rds)
|
||||
|
@ -2105,22 +2163,25 @@ namespace AirScout.Aircrafts
|
|||
errors++;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
||||
}
|
||||
finally
|
||||
{
|
||||
db.Commit();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
||||
}
|
||||
return -errors;
|
||||
}
|
||||
|
||||
public int AircraftRegistrationBulkDelete(List<AircraftRegistrationDesignator> rds)
|
||||
{
|
||||
int errors = 0;
|
||||
try
|
||||
lock (db)
|
||||
{
|
||||
lock (db)
|
||||
try
|
||||
{
|
||||
db.BeginTransaction();
|
||||
foreach (AircraftRegistrationDesignator rd in rds)
|
||||
|
@ -2135,13 +2196,16 @@ namespace AirScout.Aircrafts
|
|||
errors++;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
||||
}
|
||||
finally
|
||||
{
|
||||
db.Commit();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
||||
}
|
||||
return -errors;
|
||||
}
|
||||
|
||||
|
@ -2152,13 +2216,23 @@ namespace AirScout.Aircrafts
|
|||
int i = 0;
|
||||
lock (db)
|
||||
{
|
||||
db.BeginTransaction();
|
||||
foreach (AircraftRegistrationDesignator rd in rds)
|
||||
try
|
||||
{
|
||||
AircraftRegistrationInsertOrUpdateIfNewer(rd);
|
||||
i++;
|
||||
db.BeginTransaction();
|
||||
foreach (AircraftRegistrationDesignator rd in rds)
|
||||
{
|
||||
AircraftRegistrationInsertOrUpdateIfNewer(rd);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
||||
}
|
||||
finally
|
||||
{
|
||||
db.Commit();
|
||||
}
|
||||
db.Commit();
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
@ -2262,27 +2336,37 @@ namespace AirScout.Aircrafts
|
|||
int i = 0;
|
||||
lock (db)
|
||||
{
|
||||
db.BeginTransaction();
|
||||
foreach (PlaneInfo plane in planes)
|
||||
try
|
||||
{
|
||||
try
|
||||
db.BeginTransaction();
|
||||
foreach (PlaneInfo plane in planes)
|
||||
{
|
||||
// update aircraft information
|
||||
if (PlaneInfoChecker.Check_Hex(plane.Hex) && PlaneInfoChecker.Check_Call(plane.Call) && PlaneInfoChecker.Check_Reg(plane.Reg) && PlaneInfoChecker.Check_Type(plane.Type))
|
||||
AircraftData.Database.AircraftInsertOrUpdateIfNewer(new AircraftDesignator(plane.Hex, plane.Call, plane.Reg, plane.Type, plane.Time));
|
||||
// update aircraft type information
|
||||
if (!String.IsNullOrEmpty(plane.Type))
|
||||
try
|
||||
{
|
||||
AircraftTypeInsertOrUpdateIfNewer(new AircraftTypeDesignator("", plane.Type, plane.Manufacturer, plane.Model, plane.Category, DateTime.UtcNow));
|
||||
// update aircraft information
|
||||
if (PlaneInfoChecker.Check_Hex(plane.Hex) && PlaneInfoChecker.Check_Call(plane.Call) && PlaneInfoChecker.Check_Reg(plane.Reg) && PlaneInfoChecker.Check_Type(plane.Type))
|
||||
AircraftData.Database.AircraftInsertOrUpdateIfNewer(new AircraftDesignator(plane.Hex, plane.Call, plane.Reg, plane.Type, plane.Time));
|
||||
// update aircraft type information
|
||||
if (!String.IsNullOrEmpty(plane.Type))
|
||||
{
|
||||
AircraftTypeInsertOrUpdateIfNewer(new AircraftTypeDesignator("", plane.Type, plane.Manufacturer, plane.Model, plane.Category, DateTime.UtcNow));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
db.Commit();
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
||||
}
|
||||
finally
|
||||
{
|
||||
db.Commit();
|
||||
}
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
|
|
@ -298,6 +298,16 @@ namespace AirScout.Aircrafts
|
|||
this.ReportProgress(1, AircraftData.Database.GetDBStatus());
|
||||
Stopwatch st = new Stopwatch();
|
||||
st.Start();
|
||||
// clear temporary files
|
||||
try
|
||||
{
|
||||
SupportFunctions.DeleteFilesFromDirectory(TmpDirectory, new string[] { "*.tmp", "*.PendingOverwrite" });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
this.ReportProgress(-1, ex.ToString());
|
||||
}
|
||||
// set database status to updating
|
||||
AircraftData.Database.SetDBStatus(DATABASESTATUS.UPDATING);
|
||||
this.ReportProgress(1, AircraftData.Database.GetDBStatus());
|
||||
// update aircraft database
|
||||
|
|
|
@ -30,6 +30,7 @@ namespace AirScout.Aircrafts
|
|||
// plane already in cache --> check time and update if newer
|
||||
if (plane.Time > oldplane.Time)
|
||||
{
|
||||
|
||||
// keep old values
|
||||
oldplane.OldTime = oldplane.Time;
|
||||
oldplane.OldLat = oldplane.Lat;
|
||||
|
@ -211,8 +212,6 @@ namespace AirScout.Aircrafts
|
|||
|
||||
public List<PlaneInfo> GetAll(DateTime at, int ttl)
|
||||
{
|
||||
string filename = "positions.csv";
|
||||
string call = "CSN464";
|
||||
|
||||
List<PlaneInfo> l = new List<PlaneInfo>();
|
||||
DateTime to = at;
|
||||
|
@ -239,6 +238,10 @@ namespace AirScout.Aircrafts
|
|||
double newtrack = (plane.Track - plane.OldTrack) / oldtimediff * newtimediff + plane.Track;
|
||||
double newspeed = (plane.Speed - plane.OldSpeed) / oldtimediff * newtimediff + plane.Speed;
|
||||
|
||||
/*
|
||||
string filename = "positions.csv";
|
||||
string call = "CSN464";
|
||||
|
||||
if (plane.Call == call)
|
||||
{
|
||||
File.AppendAllText(filename, oldtimediff.ToString() + ";" +
|
||||
|
@ -254,6 +257,8 @@ namespace AirScout.Aircrafts
|
|||
newspeed.ToString("F8") + ";" +
|
||||
Environment.NewLine);
|
||||
}
|
||||
*/
|
||||
|
||||
// do plausibility check of calculated values
|
||||
if ((newalt > 0) && (newalt < 50000) &&
|
||||
(newtrack > 0) && (newtrack < 360) &&
|
||||
|
@ -266,6 +271,7 @@ namespace AirScout.Aircrafts
|
|||
else
|
||||
{
|
||||
// do nothing
|
||||
/*
|
||||
if (plane.Call == call)
|
||||
{
|
||||
File.AppendAllText(filename, oldtimediff.ToString() + ";" +
|
||||
|
@ -282,15 +288,18 @@ namespace AirScout.Aircrafts
|
|||
"invalid values!" +
|
||||
Environment.NewLine);
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// do nothing
|
||||
/*
|
||||
if (plane.Call == call)
|
||||
{
|
||||
File.AppendAllText(filename, oldtimediff.ToString() + ";" + newtimediff.ToString() + "invalid timediff!" + Environment.NewLine);
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -77,13 +77,15 @@ namespace AirScout.Aircrafts
|
|||
reg = reg.Replace("\"", String.Empty).ToUpper().Trim();
|
||||
if (reg.Length < AircraftData.Database.AircraftRegistrationMinLength + 1)
|
||||
return false;
|
||||
if (!reg.Contains('-') && !reg.StartsWith("N"))
|
||||
if (!reg.Contains('-') && !reg.StartsWith("N") && !reg.StartsWith("H"))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool Check_Lat(double lat)
|
||||
{
|
||||
if (double.IsNaN(lat))
|
||||
return false;
|
||||
if (lat < -90)
|
||||
return false;
|
||||
if (lat > 90)
|
||||
|
@ -93,6 +95,8 @@ namespace AirScout.Aircrafts
|
|||
|
||||
public static bool Check_Lon(double lon)
|
||||
{
|
||||
if (double.IsNaN(lon))
|
||||
return false;
|
||||
if (lon < -180)
|
||||
return false;
|
||||
if (lon > 180)
|
||||
|
@ -102,6 +106,8 @@ namespace AirScout.Aircrafts
|
|||
|
||||
public static bool Check_Alt(double alt)
|
||||
{
|
||||
if (double.IsNaN(alt))
|
||||
return false;
|
||||
if (alt < 0)
|
||||
return false;
|
||||
if (alt > 100000.0)
|
||||
|
@ -111,6 +117,8 @@ namespace AirScout.Aircrafts
|
|||
|
||||
public static bool Check_Track(double track)
|
||||
{
|
||||
if (double.IsNaN(track))
|
||||
return false;
|
||||
if (track < 0)
|
||||
return false;
|
||||
if (track >= 360)
|
||||
|
@ -121,6 +129,8 @@ namespace AirScout.Aircrafts
|
|||
|
||||
public static bool Check_Speed(double speed)
|
||||
{
|
||||
if (double.IsNaN(speed))
|
||||
return false;
|
||||
if (speed < 0)
|
||||
return false;
|
||||
if (speed > 800)
|
||||
|
|
|
@ -89,84 +89,15 @@ namespace AirScout.CAT
|
|||
protected override void OnDoWork(DoWorkEventArgs e)
|
||||
{
|
||||
StartOptions = (CATWorkerStartOptions)e.Argument;
|
||||
|
||||
this.ReportProgress(0, StartOptions.Name + " started.");
|
||||
|
||||
// name the thread for debugging
|
||||
if (String.IsNullOrEmpty(Thread.CurrentThread.Name))
|
||||
Thread.CurrentThread.Name = StartOptions.Name + "_" + this.GetType().Name;
|
||||
|
||||
// check if any CAT is working by getting all supported rigs
|
||||
// handle exceptions
|
||||
List<SupportedRig> rigs = new List<SupportedRig>();
|
||||
try
|
||||
{
|
||||
rigs = CATWorker.SupportedRigs();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
this.ReportProgress(-1, "Error while getting supported rigs from CAT: " + ex.Message);
|
||||
this.ReportProgress(1, RIGSTATUS.NOCAT);
|
||||
return;
|
||||
}
|
||||
|
||||
// check if any rig is found
|
||||
if (rigs.Count == 0)
|
||||
{
|
||||
this.ReportProgress(-1, "Error while getting supported rigs from CAT: No available CAT found!");
|
||||
this.ReportProgress(1, RIGSTATUS.NORIG);
|
||||
return;
|
||||
}
|
||||
|
||||
// check if the rig is among the currently supported rigs --> get a new IRig object
|
||||
// be careful with ActiveX objects an handle exceptions
|
||||
// initially set Rig to NULL
|
||||
Rig = null;
|
||||
try
|
||||
{
|
||||
foreach (SupportedRig rig in rigs)
|
||||
{
|
||||
if (rig.Type == StartOptions.RigType)
|
||||
{
|
||||
switch (rig.CATEngine)
|
||||
{
|
||||
case CATENGINE.OMNIRIGX: Rig = new OmniRigX(); break;
|
||||
case CATENGINE.SCOUTBASE: Rig = new ScoutBaseRig(); break;
|
||||
}
|
||||
|
||||
// OK, we have a valid CAT and rig --> complete and download settings
|
||||
RigSettings settings = new RigSettings();
|
||||
settings.Type = rig.Type;
|
||||
settings.Model = rig.Model;
|
||||
settings.PortName = StartOptions.PortName;
|
||||
settings.Baudrate = StartOptions.Baudrate;
|
||||
settings.DataBits = StartOptions.DataBits;
|
||||
settings.Parity = StartOptions.Parity;
|
||||
settings.StopBits = StartOptions.StopBits;
|
||||
settings.RtsMode = StartOptions.RTS;
|
||||
settings.DtrMode = StartOptions.DTR;
|
||||
settings.PollMs = StartOptions.Poll;
|
||||
settings.TimeoutMs = StartOptions.Timeout;
|
||||
Rig.Settings = settings;
|
||||
|
||||
// stop search
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
this.ReportProgress(-1, "Error while trying to get a rig object from CAT: " + ex.ToString());
|
||||
}
|
||||
|
||||
// report error if rig is still null
|
||||
if (Rig == null)
|
||||
{
|
||||
this.ReportProgress(-1, "Rig is not supported by any available CAT!");
|
||||
this.ReportProgress(1, RIGSTATUS.NORIG);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
this.ReportProgress(0, "Opening CAT: Success!");
|
||||
this.ReportProgress(2, Rig);
|
||||
|
||||
// old values for check changes
|
||||
DOPPLERSTRATEGY olddoppler = DOPPLERSTRATEGY.DOPPLER_NONE;
|
||||
|
@ -180,9 +111,100 @@ namespace AirScout.CAT
|
|||
// run polling loop
|
||||
while (!this.CancellationPending)
|
||||
{
|
||||
// get Rig if NULL
|
||||
if (Rig == null)
|
||||
{
|
||||
// check if any CAT is working by getting all supported rigs
|
||||
// handle exceptions
|
||||
List<SupportedRig> rigs = new List<SupportedRig>();
|
||||
try
|
||||
{
|
||||
rigs = CATWorker.SupportedRigs();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
this.ReportProgress(-1, "Error while getting supported rigs from CAT: " + ex.Message);
|
||||
this.ReportProgress(1, RIGSTATUS.NOCAT);
|
||||
}
|
||||
|
||||
// check if any rig is found
|
||||
if (rigs.Count == 0)
|
||||
{
|
||||
this.ReportProgress(-1, "Error while getting supported rigs from CAT: No available CAT found!");
|
||||
this.ReportProgress(1, RIGSTATUS.NORIG);
|
||||
}
|
||||
|
||||
// check if the rig is among the currently supported rigs --> get a new IRig object
|
||||
// be careful with ActiveX objects an handle exceptions
|
||||
try
|
||||
{
|
||||
foreach (SupportedRig rig in rigs)
|
||||
{
|
||||
if (rig.Type == StartOptions.RigType)
|
||||
{
|
||||
switch (rig.CATEngine)
|
||||
{
|
||||
case CATENGINE.OMNIRIGX: Rig = new OmniRigX(); break;
|
||||
case CATENGINE.SCOUTBASE: Rig = new ScoutBaseRig(); break;
|
||||
}
|
||||
|
||||
// OK, we have a valid CAT and rig --> complete and download settings
|
||||
RigSettings settings = new RigSettings();
|
||||
settings.Type = rig.Type;
|
||||
settings.Model = rig.Model;
|
||||
settings.PortName = StartOptions.PortName;
|
||||
settings.Baudrate = StartOptions.Baudrate;
|
||||
settings.DataBits = StartOptions.DataBits;
|
||||
settings.Parity = StartOptions.Parity;
|
||||
settings.StopBits = StartOptions.StopBits;
|
||||
settings.RtsMode = StartOptions.RTS;
|
||||
settings.DtrMode = StartOptions.DTR;
|
||||
settings.PollMs = StartOptions.Poll;
|
||||
settings.TimeoutMs = StartOptions.Timeout;
|
||||
Rig.Settings = settings;
|
||||
|
||||
// stop search
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
this.ReportProgress(0, "Opening CAT: Success!");
|
||||
this.ReportProgress(2, Rig);
|
||||
|
||||
// old values for check changes
|
||||
olddoppler = DOPPLERSTRATEGY.DOPPLER_NONE;
|
||||
oldrigstat = RIGSTATUS.NONE;
|
||||
oldrigmode = RIGMODE.NONE;
|
||||
oldrigsplit = RIGSPLIT.NONE;
|
||||
oldrigrit = RIGRIT.NONE;
|
||||
oldrxfreq = -1;
|
||||
oldtxfreq = -1;
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
this.ReportProgress(-1, "Error while trying to get a rig object from CAT: " + ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
// report error if rig is still null
|
||||
if (Rig == null)
|
||||
{
|
||||
this.ReportProgress(-1, "No rig selected or rig is not supported by any available CAT!");
|
||||
this.ReportProgress(1, RIGSTATUS.NORIG);
|
||||
Rig = null;
|
||||
Thread.Sleep(10000);
|
||||
continue;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
RIGSTATUS rigstatus = Rig.GetStatus();
|
||||
if (rigstatus == RIGSTATUS.NONE)
|
||||
{
|
||||
throw new Exception("Rig lost during polling!");
|
||||
}
|
||||
|
||||
if (oldrigstat != rigstatus)
|
||||
{
|
||||
oldrigstat = rigstatus;
|
||||
|
@ -276,12 +298,24 @@ namespace AirScout.CAT
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
this.ReportProgress(-1, "Error while polling CAT: " + ex.ToString());
|
||||
this.ReportProgress(1, RIGSTATUS.NORIG);
|
||||
Rig = null;
|
||||
}
|
||||
|
||||
Thread.Sleep(Properties.Settings.Default.CAT_Update);
|
||||
}
|
||||
|
||||
// Reset doppler tracking, if any
|
||||
try
|
||||
{
|
||||
Rig.LeaveDoppler();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// reset status
|
||||
this.ReportProgress(1, RIGSTATUS.NONE);
|
||||
}
|
||||
|
|
|
@ -86,6 +86,19 @@ namespace AirScout.CAT
|
|||
|
||||
private static void StartOmniRig()
|
||||
{
|
||||
// check for OmniRigEngine is accessible
|
||||
try
|
||||
{
|
||||
if (OmniRigEngine == null)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
OmniRigEngine = null;
|
||||
}
|
||||
|
||||
if (OmniRigEngine == null)
|
||||
{
|
||||
try
|
||||
|
@ -1300,7 +1313,20 @@ namespace AirScout.CAT
|
|||
{
|
||||
List<SupportedRig> l = new List<SupportedRig>();
|
||||
|
||||
// try get OmniRig working
|
||||
// check for OmniRigEngine is accessible
|
||||
try
|
||||
{
|
||||
if (OmniRigEngine == null)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
OmniRigEngine = null;
|
||||
}
|
||||
|
||||
// start OmniRig engine
|
||||
if (OmniRigEngine == null)
|
||||
{
|
||||
StartOmniRig();
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace AirScout.CAT.Properties {
|
|||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.5.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.3.0")]
|
||||
public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
@ -61,7 +61,7 @@ namespace AirScout.CAT.Properties {
|
|||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("[None]")]
|
||||
public string CAT_RigType {
|
||||
get {
|
||||
return ((string)(this["CAT_RigType"]));
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<Value Profile="(Default)">500</Value>
|
||||
</Setting>
|
||||
<Setting Name="CAT_RigType" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
<Value Profile="(Default)">[None]</Value>
|
||||
</Setting>
|
||||
<Setting Name="CAT_PortName" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<value>500</value>
|
||||
</setting>
|
||||
<setting name="CAT_RigType" serializeAs="String">
|
||||
<value />
|
||||
<value>[None]</value>
|
||||
</setting>
|
||||
<setting name="CAT_PortName" serializeAs="String">
|
||||
<value />
|
||||
|
|
|
@ -160,7 +160,7 @@ namespace AirScout.PlaneFeeds.Plugin.AirScoutServer
|
|||
{
|
||||
using (StreamWriter sw = new StreamWriter(File.Create(filename)))
|
||||
{
|
||||
XmlSerializer s = new XmlSerializer(this.GetType(), overrides,null,new XmlRootAttribute(),"");
|
||||
XmlSerializer s = new XmlSerializer(this.GetType(), overrides, null, new XmlRootAttribute(), "");
|
||||
s.Serialize(sw, this);
|
||||
}
|
||||
}
|
||||
|
@ -347,8 +347,13 @@ namespace AirScout.PlaneFeeds.Plugin.AirScoutServer
|
|||
|
||||
// JavaScriptSerializer js = new JavaScriptSerializer();
|
||||
// dynamic root = js.Deserialize<dynamic>(json);
|
||||
|
||||
// check for empty list
|
||||
if (json.Length < 20)
|
||||
return new PlaneFeedPluginPlaneInfoList();
|
||||
|
||||
// get the planes position list
|
||||
List<PlaneJSON> aclist = JsonConvert.DeserializeObject <List<PlaneJSON>>(json);
|
||||
List<PlaneJSON> aclist = JsonConvert.DeserializeObject<List<PlaneJSON>>(json);
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Created object from JSON is " + aclist.GetType().ToString());
|
||||
// analyze json string for planes data
|
||||
foreach (PlaneJSON ac in aclist)
|
||||
|
@ -356,7 +361,7 @@ namespace AirScout.PlaneFeeds.Plugin.AirScoutServer
|
|||
try
|
||||
{
|
||||
PlaneFeedPluginPlaneInfo plane = new PlaneFeedPluginPlaneInfo();
|
||||
plane.Hex = !String.IsNullOrEmpty(ac.Hex)? ac.Hex : "";
|
||||
plane.Hex = !String.IsNullOrEmpty(ac.Hex) ? ac.Hex : "";
|
||||
plane.Call = !String.IsNullOrEmpty(ac.Call) ? ac.Call : "";
|
||||
plane.Lat = (ac.Lat != null) ? (double)ac.Lat : double.NaN;
|
||||
plane.Lon = (ac.Lon != null) ? (double)ac.Lon : double.NaN;
|
||||
|
@ -389,7 +394,7 @@ namespace AirScout.PlaneFeeds.Plugin.AirScoutServer
|
|||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
{
|
||||
// do nothing if saving fails
|
||||
}
|
||||
// forward exception to parent thread
|
||||
|
@ -603,6 +608,7 @@ namespace AirScout.PlaneFeeds.Plugin.AirScoutServer
|
|||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||
// indem Sie "*" wie unten gezeigt eingeben:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.4.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.0.0")]
|
||||
[assembly: AssemblyVersion("1.4.0.1")]
|
||||
[assembly: AssemblyFileVersion("1.4.0.1")]
|
||||
|
|
|
@ -394,63 +394,66 @@ namespace AirScout.PlaneFeeds.Plugin.OpenSky
|
|||
// analyze json string for planes data
|
||||
// get the planes position list
|
||||
var aclist = root["states"];
|
||||
foreach (var ac in aclist)
|
||||
if (aclist != null)
|
||||
{
|
||||
try
|
||||
foreach (var ac in aclist)
|
||||
{
|
||||
// different handling of reading JSON between Windows (Array) & Linux (ArrayList)
|
||||
// access to data values itself is the same
|
||||
int len = 0;
|
||||
len = ac.Count;
|
||||
// skip if too few fields in record
|
||||
if (len < 17)
|
||||
continue;
|
||||
PlaneFeedPluginPlaneInfo plane = new PlaneFeedPluginPlaneInfo();
|
||||
// get hex first
|
||||
plane.Hex = ReadPropertyString(ac, 0).ToUpper().Trim();
|
||||
// get callsign
|
||||
plane.Call = ReadPropertyString(ac, 1).ToUpperInvariant().Trim();
|
||||
// get position
|
||||
plane.Lon = ReadPropertyDouble(ac, 5);
|
||||
plane.Lat = ReadPropertyDouble(ac, 6);
|
||||
// get altitude (provided in m --> convert to ft)
|
||||
plane.Alt = UnitConverter.m_ft(ReadPropertyDouble(ac, 13));
|
||||
// get track
|
||||
plane.Track = ReadPropertyDouble(ac, 10);
|
||||
// get speed (provided in m/s --> convert to kts)
|
||||
plane.Speed = UnitConverter.ms_kts(ReadPropertyDouble(ac, 9));
|
||||
// registration is not provided
|
||||
plane.Reg = "";
|
||||
// get position timestamp in sec
|
||||
int l = ReadPropertyInt(ac, 3);
|
||||
if (l != int.MinValue)
|
||||
try
|
||||
{
|
||||
DateTime timestamp = new System.DateTime(1970, 1, 1, 0, 0, 0, 0);
|
||||
timestamp = timestamp.AddSeconds(l);
|
||||
plane.Time = timestamp;
|
||||
// different handling of reading JSON between Windows (Array) & Linux (ArrayList)
|
||||
// access to data values itself is the same
|
||||
int len = 0;
|
||||
len = ac.Count;
|
||||
// skip if too few fields in record
|
||||
if (len < 17)
|
||||
continue;
|
||||
PlaneFeedPluginPlaneInfo plane = new PlaneFeedPluginPlaneInfo();
|
||||
// get hex first
|
||||
plane.Hex = ReadPropertyString(ac, 0).ToUpper().Trim();
|
||||
// get callsign
|
||||
plane.Call = ReadPropertyString(ac, 1).ToUpperInvariant().Trim();
|
||||
// get position
|
||||
plane.Lon = ReadPropertyDouble(ac, 5);
|
||||
plane.Lat = ReadPropertyDouble(ac, 6);
|
||||
// get altitude (provided in m --> convert to ft)
|
||||
plane.Alt = UnitConverter.m_ft(ReadPropertyDouble(ac, 13));
|
||||
// get track
|
||||
plane.Track = ReadPropertyDouble(ac, 10);
|
||||
// get speed (provided in m/s --> convert to kts)
|
||||
plane.Speed = UnitConverter.ms_kts(ReadPropertyDouble(ac, 9));
|
||||
// registration is not provided
|
||||
plane.Reg = "";
|
||||
// get position timestamp in sec
|
||||
int l = ReadPropertyInt(ac, 3);
|
||||
if (l != int.MinValue)
|
||||
{
|
||||
DateTime timestamp = new System.DateTime(1970, 1, 1, 0, 0, 0, 0);
|
||||
timestamp = timestamp.AddSeconds(l);
|
||||
plane.Time = timestamp;
|
||||
}
|
||||
else
|
||||
{
|
||||
// skip plane if no valid timestamp found
|
||||
continue;
|
||||
}
|
||||
// get type info
|
||||
plane.Type = ReadPropertyString(ac, 5);
|
||||
|
||||
// discard planes on ground
|
||||
bool onground = ReadPropertyBool(ac, 8);
|
||||
if (onground)
|
||||
continue;
|
||||
|
||||
// discard planes stopped
|
||||
if (plane.Speed <= 0)
|
||||
continue;
|
||||
|
||||
planes.Add(plane);
|
||||
}
|
||||
else
|
||||
catch (Exception ex)
|
||||
{
|
||||
// skip plane if no valid timestamp found
|
||||
continue;
|
||||
Console.WriteLine("[" + System.Reflection.MethodBase.GetCurrentMethod().Name + "]" + ex.Message);
|
||||
}
|
||||
// get type info
|
||||
plane.Type = ReadPropertyString(ac, 5);
|
||||
|
||||
// discard planes on ground
|
||||
bool onground = ReadPropertyBool(ac, 8);
|
||||
if (onground)
|
||||
continue;
|
||||
|
||||
// discard planes stopped
|
||||
if (plane.Speed <= 0)
|
||||
continue;
|
||||
|
||||
planes.Add(plane);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("[" + System.Reflection.MethodBase.GetCurrentMethod().Name + "]" + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||
// indem Sie "*" wie unten gezeigt eingeben:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.4.1.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.1.0")]
|
||||
[assembly: AssemblyVersion("1.4.1.1")]
|
||||
[assembly: AssemblyFileVersion("1.4.1.1")]
|
||||
|
|
|
@ -0,0 +1,87 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\ILMerge.3.0.29\build\ILMerge.props" Condition="Exists('..\packages\ILMerge.3.0.29\build\ILMerge.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{D953C82D-5881-4F5C-8335-1C54114BE28B}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>AirScout.PlaneFeeds.Plugin.RB24</RootNamespace>
|
||||
<AssemblyName>AirScout.PlaneFeeds.Plugin.RB24</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="RB24.cs" />
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\AirScout.PlaneFeeds.Plugin\AirScout.PlaneFeeds.Plugin.csproj">
|
||||
<Project>{36945dbd-96c8-41e7-9168-f83c42e67af3}</Project>
|
||||
<Name>AirScout.PlaneFeeds.Plugin</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}".</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\ILMerge.3.0.29\build\ILMerge.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ILMerge.3.0.29\build\ILMerge.props'))" />
|
||||
<Error Condition="!Exists('..\packages\ILMerge.MSBuild.Task.1.0.7\build\ILMerge.MSBuild.Task.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ILMerge.MSBuild.Task.1.0.7\build\ILMerge.MSBuild.Task.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\ILMerge.MSBuild.Task.1.0.7\build\ILMerge.MSBuild.Task.targets" Condition="Exists('..\packages\ILMerge.MSBuild.Task.1.0.7\build\ILMerge.MSBuild.Task.targets')" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>mkdir $(SolutionDir)\Airscout\$(OutDir)\Plugin\
|
||||
copy $(ProjectDir)\$(OutDir)\ILMerge\*$(TargetExt) $(SolutionDir)\Airscout\$(OutDir)\Plugin\ /y</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||
// die einer Assembly zugeordnet sind.
|
||||
[assembly: AssemblyTitle("AirScout.PlaneFeeds.Plugin.PlaneFinder")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("AirScout.PlaneFeeds.Plugin.PlaneFinder")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2020")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
|
||||
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
|
||||
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
|
||||
[assembly: Guid("db85e98a-e209-49d0-b6cf-6cdd5b8e20e3")]
|
||||
|
||||
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
//
|
||||
// Hauptversion
|
||||
// Nebenversion
|
||||
// Buildnummer
|
||||
// Revision
|
||||
//
|
||||
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||
// indem Sie "*" wie unten gezeigt eingeben:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.4.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.0.0")]
|
|
@ -0,0 +1,26 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace AirScout.PlaneFeeds.Plugin.RB24.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles />
|
||||
<Settings />
|
||||
</SettingsFile>
|
|
@ -0,0 +1,640 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Reflection;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
using AirScout.PlaneFeeds.Plugin.MEFContract;
|
||||
using System.Diagnostics;
|
||||
using System.Net;
|
||||
using System.IO;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Collections;
|
||||
using System.Xml.Serialization;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace AirScout.PlaneFeeds.Plugin.RB24
|
||||
{
|
||||
|
||||
public class RB24Settings
|
||||
{
|
||||
|
||||
[Browsable(false)]
|
||||
[DefaultValue("")]
|
||||
[XmlIgnore]
|
||||
public string DisclaimerAccepted { get; set; }
|
||||
|
||||
[Browsable(true)]
|
||||
[CategoryAttribute("Web Feed")]
|
||||
[DescriptionAttribute("Save downloaded JSON to file")]
|
||||
[DefaultValue(false)]
|
||||
[XmlIgnore]
|
||||
public bool SaveToFile { get; set; }
|
||||
|
||||
[Browsable(true)]
|
||||
[CategoryAttribute("Web Feed")]
|
||||
[DescriptionAttribute("Base URL for website.")]
|
||||
[DefaultValue("https://data.rb24.com/live?aircraft=&airport=&fn=&far=&fms=&zoom=6&flightid=&bounds=%MAXLAT%,%MAXLON%,%MINLAT%,%MINLON%×tamp=%TIMESTAMP%&designator=iata&showLastTrails=true&ff=false&os=web&adsb=true&adsbsat=true&asdi=true&ocea=true&mlat=true&sate=true&uat=true&hfdl=true&esti=true&asdex=true&flarm=true&aust=true&diverted=false&delayed=false&isga=false&ground=true&onair=true&blocked=false&station=&class[]=?&class[]=A&class[]=B&class[]=C&class[]=G&class[]=H&class[]=M&airline=&route=&country=")]
|
||||
public string URL { get; set; }
|
||||
|
||||
[Browsable(true)]
|
||||
[CategoryAttribute("Web Feed")]
|
||||
[DescriptionAttribute("Timeout for loading the site.")]
|
||||
[DefaultValue(30)]
|
||||
[XmlIgnore]
|
||||
public int Timeout { get; set; }
|
||||
|
||||
|
||||
public RB24Settings()
|
||||
{
|
||||
Default();
|
||||
Load(true);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Sets all properties to their default value according to the [DefaultValue=] attribute
|
||||
/// </summary>
|
||||
public void Default()
|
||||
{
|
||||
// set all properties to their default values according to definition in [DeafultValue=]
|
||||
foreach (var p in this.GetType().GetProperties())
|
||||
{
|
||||
try
|
||||
{
|
||||
// initialize all properties with default value if set
|
||||
if (Attribute.IsDefined(p, typeof(DefaultValueAttribute)))
|
||||
{
|
||||
p.SetValue(this, ((DefaultValueAttribute)Attribute.GetCustomAttribute(
|
||||
p, typeof(DefaultValueAttribute)))?.Value, null);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Cannot set default value of: " + p.Name + ", " + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Loads settings from a XML-formatted configuration file into settings.
|
||||
/// </summary>
|
||||
/// <param name="loadall">If true, ignore the [XmlIgnore] attribute, e.g. load all settings available in the file.<br>If false, load only settings without [XmlIgore] attrbute.</br></param>
|
||||
/// <param name="filename">The filename of the settings file.</param>
|
||||
public void Load(bool loadall, string filename = "")
|
||||
{
|
||||
// use standard filename if empty
|
||||
// be careful because Linux file system is case sensitive
|
||||
if (String.IsNullOrEmpty(filename))
|
||||
filename = new Uri(Assembly.GetExecutingAssembly().GetName().CodeBase.Replace(".dll", ".cfg").Replace(".DLL", ".CFG")).LocalPath;
|
||||
// do nothing if file not exists
|
||||
if (!File.Exists(filename))
|
||||
return;
|
||||
try
|
||||
{
|
||||
string xml = "";
|
||||
using (StreamReader sr = new StreamReader(File.OpenRead(filename)))
|
||||
{
|
||||
xml = sr.ReadToEnd();
|
||||
}
|
||||
XDocument xdoc = XDocument.Parse(xml);
|
||||
PropertyInfo[] properties = this.GetType().GetProperties();
|
||||
foreach (PropertyInfo p in properties)
|
||||
{
|
||||
if (!loadall)
|
||||
{
|
||||
// check on XmlIgnore attribute, skip if set
|
||||
object[] attr = p.GetCustomAttributes(typeof(XmlIgnoreAttribute), false);
|
||||
if (attr.Length > 0)
|
||||
continue;
|
||||
}
|
||||
try
|
||||
{
|
||||
// get matching element
|
||||
XElement typenode = xdoc.Element(this.GetType().Name);
|
||||
if (typenode != null)
|
||||
{
|
||||
XElement element = typenode.Element(p.Name);
|
||||
if (element != null)
|
||||
p.SetValue(this, Convert.ChangeType(element.Value, p.PropertyType), null);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Error while loading property[" + p.Name + " from " + filename + ", " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Cannot load settings from " + filename + ", " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Saves settings from settings into a XML-formatted configuration file
|
||||
/// </summary>
|
||||
/// <param name="saveall">If true, ignore the [XmlIgnore] attribute, e.g. save all settings.<br>If false, save only settings without [XmlIgore] attrbute.</param>
|
||||
/// <param name="filename">The filename of the settings file.</param>
|
||||
public void Save(bool saveall, string filename = "")
|
||||
{
|
||||
// use standard filename if empty
|
||||
// be careful because Linux file system is case sensitive
|
||||
if (String.IsNullOrEmpty(filename))
|
||||
filename = new Uri(Assembly.GetExecutingAssembly().GetName().CodeBase.Replace(".dll", ".cfg").Replace(".DLL", ".CFG")).LocalPath;
|
||||
XmlAttributeOverrides overrides = new XmlAttributeOverrides();
|
||||
if (saveall)
|
||||
{
|
||||
// ovverride the XmlIgnore attributes to get all serialized
|
||||
PropertyInfo[] properties = this.GetType().GetProperties();
|
||||
foreach (PropertyInfo p in properties)
|
||||
{
|
||||
XmlAttributes attribs = new XmlAttributes { XmlIgnore = false };
|
||||
overrides.Add(this.GetType(), p.Name, attribs);
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
using (StreamWriter sw = new StreamWriter(File.Create(filename)))
|
||||
{
|
||||
XmlSerializer s = new XmlSerializer(this.GetType(), overrides);
|
||||
s.Serialize(sw, this);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new InvalidOperationException("[" + this.GetType().Name + "]: Cannot save settings to " + filename + ", " + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Export(typeof(IPlaneFeedPlugin))]
|
||||
[ExportMetadata("Name", "PlaneFeedPlugin")]
|
||||
public class RB24Plugin : IPlaneFeedPlugin
|
||||
{
|
||||
private RB24Settings Settings = new RB24Settings();
|
||||
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return "[WebFeed] www.radarbox24.com";
|
||||
}
|
||||
}
|
||||
|
||||
public string Info
|
||||
{
|
||||
get
|
||||
{
|
||||
return "Web feed from www.radarbox24.com\n" +
|
||||
"See https:///www.radarbox24.com\n\n" +
|
||||
"(c)AirScout(www.airscout.eu)\n\n" +
|
||||
"CAUTION: Radarbox24 does not provide HEX - values, the feed is getting the values only from internal database using plane registry values";
|
||||
}
|
||||
}
|
||||
|
||||
public string Version
|
||||
{
|
||||
get
|
||||
{
|
||||
return Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasSettings
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public bool CanImport
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool CanExport
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public string Disclaimer
|
||||
{
|
||||
get
|
||||
{
|
||||
return "This plane feed might fetch data from an Internet server via Deep Link\n" +
|
||||
"technology(see http://en.wikipedia.org/wiki/Deep_link)\n." +
|
||||
"The use is probably not intended by the website owners and could be changed in URL and data format frequently and without further notice.\n" +
|
||||
"Furthermore, it might cause legal issues in some countries.\n" +
|
||||
"By clicking on \"Accept\" you understand that you are\n\n" +
|
||||
"DOING THAT ON YOUR OWN RISK\n\n" +
|
||||
"The auhor of this software will not be responsible in any case.";
|
||||
}
|
||||
}
|
||||
|
||||
public string DisclaimerAccepted
|
||||
{
|
||||
get
|
||||
{
|
||||
return Settings.DisclaimerAccepted;
|
||||
}
|
||||
set
|
||||
{
|
||||
Settings.DisclaimerAccepted = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void ResetSettings()
|
||||
{
|
||||
Settings.Default();
|
||||
}
|
||||
|
||||
public void LoadSettings()
|
||||
{
|
||||
Settings.Load(true);
|
||||
}
|
||||
|
||||
public void SaveSettings()
|
||||
{
|
||||
Settings.Save(true);
|
||||
}
|
||||
|
||||
public object GetSettings()
|
||||
{
|
||||
return this.Settings;
|
||||
}
|
||||
|
||||
public void ImportSettings()
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
public void ExportSettings()
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
public void Start(PlaneFeedPluginArgs args)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
public PlaneFeedPluginPlaneInfoList GetPlanes(PlaneFeedPluginArgs args)
|
||||
{
|
||||
// intialize variables
|
||||
VarConverter VC = new VarConverter();
|
||||
VC.AddVar("APPDIR", args.AppDirectory);
|
||||
VC.AddVar("DATADIR", args.AppDataDirectory);
|
||||
VC.AddVar("LOGDIR", args.LogDirectory);
|
||||
VC.AddVar("DATABASEDIR", args.DatabaseDirectory);
|
||||
VC.AddVar("MINLAT", args.MinLat);
|
||||
VC.AddVar("MAXLAT", args.MaxLat);
|
||||
VC.AddVar("MINLON", args.MinLon);
|
||||
VC.AddVar("MAXLON", args.MaxLon);
|
||||
VC.AddVar("MINALTM", args.MinAlt);
|
||||
VC.AddVar("MAXALTM", args.MaxAlt);
|
||||
VC.AddVar("MINALTFT", (int)UnitConverter.m_ft((double)args.MinAlt));
|
||||
VC.AddVar("MAXALTFT", (int)UnitConverter.m_ft((double)args.MaxAlt));
|
||||
VC.AddVar("TIMESTAMP", (long)DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1)).TotalSeconds * 1000 - 30000);
|
||||
// initialize plane info list
|
||||
PlaneFeedPluginPlaneInfoList planes = new PlaneFeedPluginPlaneInfoList();
|
||||
string json = "";
|
||||
// calculate url and get json
|
||||
string url = VC.ReplaceAllVars(Settings.URL);
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Creating web request: " + url);
|
||||
HttpWebRequest webrequest = (HttpWebRequest)HttpWebRequest.Create(url);
|
||||
webrequest.Headers.Add("method: GET");
|
||||
webrequest.Headers.Add("authority: data.rb24.com");
|
||||
webrequest.Headers.Add("scheme: https");
|
||||
webrequest.Headers.Add("pragma: no-cache");
|
||||
webrequest.Headers.Add("cache-control: no-cache");
|
||||
webrequest.Headers.Add("sec-ch-ua: \"Google Chrome\";v=\"105\", \"Not)A; Brand\";v=\"8\", \"Chromium\";v=\"105\"");
|
||||
webrequest.Accept = "application/json, text/plain, */*";
|
||||
webrequest.Headers.Add("dnt: 1");
|
||||
webrequest.Headers.Add("sec-ch-ua-mobile: ?0");
|
||||
webrequest.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36";
|
||||
webrequest.Headers.Add("sec-ch-ua-platform: \"Windows\"");
|
||||
webrequest.Headers.Add("origin: https://www.radarbox.com");
|
||||
webrequest.Headers.Add("sec-fetch-site: cross-site");
|
||||
webrequest.Headers.Add("sec-fetch-mode: cors");
|
||||
webrequest.Headers.Add("sec-fetch-dest: empty");
|
||||
webrequest.Referer = "https://www.radarbox24.com/";
|
||||
// webrequest.Headers.Add("accept-encoding: gzip, deflate, br");
|
||||
webrequest.Headers.Add("accept-language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7");
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Getting web response");
|
||||
HttpWebResponse webresponse = (HttpWebResponse)webrequest.GetResponse();
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Reading stream");
|
||||
// Thread.Sleep(1000);
|
||||
using (StreamReader sr = new StreamReader(webresponse.GetResponseStream()))
|
||||
{
|
||||
json = sr.ReadToEnd();
|
||||
Console.WriteLine(json);
|
||||
}
|
||||
// save raw data to file if enabled
|
||||
if (Settings.SaveToFile)
|
||||
{
|
||||
using (StreamWriter sw = new StreamWriter(args.TmpDirectory + Path.DirectorySeparatorChar + this.GetType().Name + "_" + DateTime.UtcNow.ToString("yyyy-MM-dd HH_mm_ss") + ".json"))
|
||||
{
|
||||
sw.WriteLine(json);
|
||||
}
|
||||
}
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Analyzing data");
|
||||
JavaScriptSerializer js = new JavaScriptSerializer();
|
||||
dynamic root = js.Deserialize<dynamic>(json);
|
||||
try
|
||||
{
|
||||
// analyze json string for planes data
|
||||
// get the planes position list
|
||||
var aclist = root[0];
|
||||
foreach (var ac in aclist)
|
||||
{
|
||||
try
|
||||
{
|
||||
// different handling of reading JSON between Windows (Array) & Linux (ArrayList)
|
||||
// access to data values itself is the same
|
||||
int len = 0;
|
||||
if (ac.Value.GetType() == typeof(ArrayList))
|
||||
{
|
||||
len = ac.Value.Count;
|
||||
}
|
||||
else if (ac.Value.GetType() == typeof(Object[]))
|
||||
{
|
||||
len = ac.Value.Length;
|
||||
}
|
||||
// skip if too few fields in record
|
||||
if (len < 14)
|
||||
continue;
|
||||
PlaneFeedPluginPlaneInfo plane = new PlaneFeedPluginPlaneInfo();
|
||||
// get hex first
|
||||
// Radarbox24 does not provide a HEX info
|
||||
// leave it empty and let it fill by Reg in planefeed main thread
|
||||
plane.Hex = "";
|
||||
// get position
|
||||
plane.Lat = ReadPropertyDouble(ac, 1);
|
||||
plane.Lon = ReadPropertyDouble(ac, 2);
|
||||
// get altitude
|
||||
plane.Alt = ReadPropertyDouble(ac, 4);
|
||||
// get callsign
|
||||
plane.Call = ReadPropertyString(ac, 0);
|
||||
// get registration
|
||||
plane.Reg = ReadPropertyString(ac, 9);
|
||||
// get track
|
||||
plane.Track = ReadPropertyDouble(ac, 7);
|
||||
// get speed
|
||||
plane.Speed = ReadPropertyDouble(ac, 6);
|
||||
// get position timestamp in msec
|
||||
long l = ReadPropertyLong(ac, 3);
|
||||
if (l != long.MinValue)
|
||||
{
|
||||
DateTime timestamp = new System.DateTime(1970, 1, 1, 0, 0, 0, 0);
|
||||
timestamp = timestamp.AddMilliseconds(l);
|
||||
plane.Time = timestamp;
|
||||
}
|
||||
else
|
||||
{
|
||||
// skip plane if no valid timestamp found
|
||||
continue;
|
||||
}
|
||||
|
||||
// skip plane if no reg
|
||||
if (String.IsNullOrEmpty(plane.Reg) || (plane.Reg == "BLOCKED") || (plane.Reg == "VARIOUS"))
|
||||
continue;
|
||||
|
||||
// get type info
|
||||
plane.Type = ReadPropertyString(ac, 5);
|
||||
planes.Add(plane);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("[" + System.Reflection.MethodBase.GetCurrentMethod().Name + "]" + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// do nothing if property is not found
|
||||
}
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Returning " + planes.Count + " planes");
|
||||
return planes;
|
||||
}
|
||||
|
||||
public void Stop(PlaneFeedPluginArgs args)
|
||||
{
|
||||
Settings.Save(true);
|
||||
}
|
||||
|
||||
// ************************************* End of interface ****************************************************
|
||||
|
||||
|
||||
// ************************************* Helpers ****************************************************
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCode]
|
||||
private string ReadPropertyString(dynamic o, int propertyindex)
|
||||
{
|
||||
string s = null;
|
||||
try
|
||||
{
|
||||
s = o.Value[propertyindex];
|
||||
}
|
||||
catch
|
||||
{
|
||||
// do nothing if something went wrong
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCode]
|
||||
private int ReadPropertyInt(dynamic o, int propertyindex)
|
||||
{
|
||||
int i = int.MinValue;
|
||||
double d = ReadPropertyDouble(o, propertyindex);
|
||||
if ((d != double.MinValue) && (d >= int.MinValue) && (d <= int.MaxValue))
|
||||
i = (int)d;
|
||||
return i;
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCode]
|
||||
private double ReadPropertyDouble(dynamic o, int propertyindex)
|
||||
{
|
||||
double d = double.MinValue;
|
||||
try
|
||||
{
|
||||
string s = o.Value[propertyindex].ToString(CultureInfo.InvariantCulture);
|
||||
d = double.Parse(s, CultureInfo.InvariantCulture);
|
||||
}
|
||||
catch
|
||||
{
|
||||
// do nothing if something went wrong
|
||||
}
|
||||
return d;
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCode]
|
||||
private long ReadPropertyLong(dynamic o, int propertyindex)
|
||||
{
|
||||
long l = long.MinValue;
|
||||
try
|
||||
{
|
||||
l = long.Parse(o.Value[propertyindex].ToString());
|
||||
}
|
||||
catch
|
||||
{
|
||||
// do nothing if something went wrong
|
||||
}
|
||||
return l;
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCode]
|
||||
private bool ReadPropertyBool(dynamic o, int propertyindex)
|
||||
{
|
||||
bool b = false;
|
||||
try
|
||||
{
|
||||
string s = o.Value[propertyindex].ToString();
|
||||
b = s.ToLower() == "true";
|
||||
}
|
||||
catch
|
||||
{
|
||||
// do nothing if something went wrong
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// //////////////////////////////////////////// Helpers ////////////////////////////////////////////
|
||||
/// </summary>
|
||||
|
||||
public static class UnitConverter
|
||||
{
|
||||
public static double ft_m(double feet)
|
||||
{
|
||||
return feet / 3.28084;
|
||||
}
|
||||
|
||||
public static double m_ft(double m)
|
||||
{
|
||||
return m * 3.28084;
|
||||
}
|
||||
|
||||
public static double kts_kmh(double kts)
|
||||
{
|
||||
return kts * 1.852;
|
||||
}
|
||||
|
||||
public static double kmh_kts(double kmh)
|
||||
{
|
||||
return kmh / 1.852;
|
||||
}
|
||||
|
||||
public static double km_mi(double km)
|
||||
{
|
||||
return km * 1.609;
|
||||
}
|
||||
|
||||
public static double mi_km(double mi)
|
||||
{
|
||||
return mi / 1.609;
|
||||
}
|
||||
}
|
||||
|
||||
public class VarConverter : Dictionary<string, object>
|
||||
{
|
||||
public readonly char VarSeparator = '%';
|
||||
|
||||
public void AddVar(string var, object value)
|
||||
{
|
||||
// adds a new var<>value pair to dictionary
|
||||
object o;
|
||||
if (this.TryGetValue(var, out o))
|
||||
{
|
||||
// item found --> update value
|
||||
o = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
// item not found --> add new
|
||||
this.Add(var, value);
|
||||
}
|
||||
}
|
||||
|
||||
public object GetValue(string var)
|
||||
{
|
||||
// finds a var in dictionary and returns its value
|
||||
object o;
|
||||
if (this.TryGetValue(var, out o))
|
||||
{
|
||||
// item found --> return value
|
||||
return o;
|
||||
}
|
||||
// item not found --> return null
|
||||
return null;
|
||||
}
|
||||
|
||||
public string ReplaceAllVars(string s)
|
||||
{
|
||||
// check for var separotors first
|
||||
if (s.Contains(VarSeparator))
|
||||
{
|
||||
// OK, string is containing vars --> crack the string first and replace vars
|
||||
try
|
||||
{
|
||||
string[] a = s.Split(VarSeparator);
|
||||
// as we are always using a pair of separators the length of a[] must be odd
|
||||
if (a.Length % 2 == 0)
|
||||
throw new ArgumentException("Number of separators is not an even number.");
|
||||
// create new string and replace all vars (on odd indices)
|
||||
s = "";
|
||||
for (int i = 0; i < a.Length; i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
// cannot be not a var on that position
|
||||
s = s + a[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
// var identifier: upper the string and try to convert
|
||||
a[i] = a[i].ToUpper();
|
||||
object o;
|
||||
if (this.TryGetValue(a[i], out o))
|
||||
{
|
||||
// convert floating points with invariant culture info
|
||||
if (o.GetType() == typeof(double))
|
||||
s = s + ((double)o).ToString(CultureInfo.InvariantCulture);
|
||||
else if (o.GetType() == typeof(float))
|
||||
s = s + ((float)o).ToString(CultureInfo.InvariantCulture);
|
||||
else
|
||||
s = s + o.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new ArgumentException("Var identifier not found: " + a[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// throw an excecption
|
||||
throw new ArgumentException("Error while parsing string for variables [" + ex.Message + "]: " + s);
|
||||
}
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="AirScout.PlaneFeeds.Plugin.Template.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
<section name="AirScout.PlaneFeeds.Plugin.PlaneFinder.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<userSettings>
|
||||
<AirScout.PlaneFeeds.Plugin.Template.Properties.Settings>
|
||||
<setting name="Info" serializeAs="String">
|
||||
<value>Generic template for ceration of new plane feed projects
|
||||
</value>
|
||||
</setting>
|
||||
<setting name="Name" serializeAs="String">
|
||||
<value>[WebFeed] Template</value>
|
||||
</setting>
|
||||
<setting name="Disclaimer" serializeAs="String">
|
||||
<value>This plane feed is being fetched from an Internet server via Deep Link
|
||||
technology (see http://en.wikipedia.org/wiki/Deep_link).
|
||||
|
||||
The use is not intended by the website owners and could be changed in URL and data format frequently and without further notice.
|
||||
Furthermore, it might cause legal issues in some countries.
|
||||
|
||||
By clicking on "Accept" you understand that you are
|
||||
|
||||
DOING THAT ON YOUR OWN RISK
|
||||
|
||||
The auhor of this software will not be responsible in any case.</value>
|
||||
</setting>
|
||||
<setting name="Disclaimer_Accepted" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="URL" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="SaveToFile" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="Version" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="HasSettings" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="CanImport" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="CanExport" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
</AirScout.PlaneFeeds.Plugin.Template.Properties.Settings>
|
||||
<AirScout.PlaneFeeds.Plugin.PlaneFinder.Properties.Settings>
|
||||
<setting name="Info" serializeAs="String">
|
||||
<value>Web feed from www.planefinder.net
|
||||
See https://planefinder.net/
|
||||
|
||||
(c) AirScout (www.airscout.eu)
|
||||
|
||||
This feed does not require a login or API key.
|
||||
</value>
|
||||
</setting>
|
||||
<setting name="Name" serializeAs="String">
|
||||
<value>[WebFeed] www.planefinder.net</value>
|
||||
</setting>
|
||||
<setting name="Disclaimer" serializeAs="String">
|
||||
<value>This plane feed is being fetched from an Internet server via Deep Link
|
||||
technology (see http://en.wikipedia.org/wiki/Deep_link).
|
||||
|
||||
The use is not intended by the website owners and could be changed in URL and data format frequently and without further notice.
|
||||
Furthermore, it might cause legal issues in some countries.
|
||||
|
||||
By clicking on "Accept" you understand that you are
|
||||
|
||||
DOING THAT ON YOUR OWN RISK
|
||||
|
||||
The auhor of this software will not be responsible in any case.</value>
|
||||
</setting>
|
||||
<setting name="Disclaimer_Accepted" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="URL" serializeAs="String">
|
||||
<value>http://droidapp.pinkfroot.com/APPAPIDROID/v7/planeUpdateFAA.php?routetype=IATA&amp;FAA=1&amp;bounds=%MAXLAT%,%MINLAT%,%MINLON%,%MAXLON%</value>
|
||||
</setting>
|
||||
<setting name="SaveToFile" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="Version" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="HasSettings" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="CanImport" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="CanExport" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="Timeout" serializeAs="String">
|
||||
<value>30</value>
|
||||
</setting>
|
||||
</AirScout.PlaneFeeds.Plugin.PlaneFinder.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="ILMerge" version="3.0.29" targetFramework="net40" />
|
||||
<package id="ILMerge.MSBuild.Task" version="1.0.7" targetFramework="net40" />
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net40" />
|
||||
</packages>
|
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||
// indem Sie "*" wie unten gezeigt eingeben:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.4.1.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.1.0")]
|
||||
[assembly: AssemblyVersion("1.4.3.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.3.0")]
|
||||
|
|
|
@ -38,6 +38,11 @@ namespace AirScout.PlaneFeeds.Plugin.RTL1090
|
|||
[DefaultValue(true)]
|
||||
public virtual bool Binary { get; set; }
|
||||
|
||||
[Browsable(true)]
|
||||
[DescriptionAttribute("Use geometric altitudes only (instead of both barometric/geometric) to enhance tracking accuracy.")]
|
||||
[DefaultValue(false)]
|
||||
public virtual bool UseGeometricAltOnly { get; set; }
|
||||
|
||||
[Browsable(true)]
|
||||
[DescriptionAttribute("Report ADS-B messages to console output.")]
|
||||
[DefaultValue(true)]
|
||||
|
@ -351,7 +356,18 @@ namespace AirScout.PlaneFeeds.Plugin.RTL1090
|
|||
plane.Call = (Settings.MarkLocal) ? "@" + info.Call : info.Call;
|
||||
plane.Lat = info.Lat;
|
||||
plane.Lon = info.Lon;
|
||||
plane.Alt = info.Alt;
|
||||
// use geometric altitude, if enabled and available
|
||||
if (Settings.UseGeometricAltOnly)
|
||||
{
|
||||
if (info.GeoMinusBaro != int.MinValue)
|
||||
plane.Alt = info.BaroAlt + info.GeoMinusBaro;
|
||||
else
|
||||
plane.Alt = int.MinValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
plane.Alt = info.BaroAlt + info.GeoMinusBaro;
|
||||
}
|
||||
plane.Speed = info.Speed;
|
||||
plane.Track = info.Heading;
|
||||
plane.Reg = "[unknown]";
|
||||
|
@ -359,7 +375,12 @@ namespace AirScout.PlaneFeeds.Plugin.RTL1090
|
|||
plane.Manufacturer = "[unknown]";
|
||||
plane.Model = "[unknown]";
|
||||
plane.Category = 0;
|
||||
planes.Add(plane);
|
||||
|
||||
// add only valid positions
|
||||
if (plane.Alt > 0)
|
||||
{
|
||||
planes.Add(plane);
|
||||
}
|
||||
}
|
||||
// save raw data to file if enabled
|
||||
if (Settings.SaveToFile)
|
||||
|
@ -435,8 +456,8 @@ namespace AirScout.PlaneFeeds.Plugin.RTL1090
|
|||
{
|
||||
info = "[" + this.GetType().Name + "]: " + msg.RawMessage + "-- > ";
|
||||
Console.Write(info);
|
||||
line = info;
|
||||
info = Decoder.DecodeMessage(msg.RawMessage, msg.TimeStamp);
|
||||
line = info;
|
||||
info = Decoder.DecodeMessage(msg.RawMessage, msg.TimeStamp, Settings.UseGeometricAltOnly);
|
||||
line = line + info + "\n";
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
@ -0,0 +1,91 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\ILMerge.3.0.29\build\ILMerge.props" Condition="Exists('..\packages\ILMerge.3.0.29\build\ILMerge.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{1F2A3BE9-9349-4478-BA6E-0BC842615B3B}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>AirScout.PlaneFeeds.Plugin.RadarVirtuel</RootNamespace>
|
||||
<AssemblyName>AirScout.PlaneFeeds.Plugin.RadarVirtuel</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="RadarVirtuel.cs" />
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\AirScout.Core\AirScout.Core.csproj">
|
||||
<Project>{41b66be4-6086-4ae3-be31-c81ee6b10154}</Project>
|
||||
<Name>AirScout.Core</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\AirScout.PlaneFeeds.Plugin\AirScout.PlaneFeeds.Plugin.csproj">
|
||||
<Project>{36945dbd-96c8-41e7-9168-f83c42e67af3}</Project>
|
||||
<Name>AirScout.PlaneFeeds.Plugin</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}".</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\ILMerge.3.0.29\build\ILMerge.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ILMerge.3.0.29\build\ILMerge.props'))" />
|
||||
<Error Condition="!Exists('..\packages\ILMerge.MSBuild.Task.1.0.7\build\ILMerge.MSBuild.Task.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ILMerge.MSBuild.Task.1.0.7\build\ILMerge.MSBuild.Task.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\ILMerge.MSBuild.Task.1.0.7\build\ILMerge.MSBuild.Task.targets" Condition="Exists('..\packages\ILMerge.MSBuild.Task.1.0.7\build\ILMerge.MSBuild.Task.targets')" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>mkdir $(SolutionDir)\Airscout\$(OutDir)\Plugin\
|
||||
copy $(ProjectDir)\$(OutDir)\ILMerge\*$(TargetExt) $(SolutionDir)\Airscout\$(OutDir)\Plugin\ /y</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||
// die einer Assembly zugeordnet sind.
|
||||
[assembly: AssemblyTitle("AirScout.PlaneFeeds.Plugin.RadarVirtuel")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("AirScout.PlaneFeeds.Plugin.RadarVirtuel")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2022 DL2ALF")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
|
||||
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
|
||||
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
|
||||
[assembly: Guid("db85e98a-e209-49d0-b6cf-6cdd5b8e20e3")]
|
||||
|
||||
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
//
|
||||
// Hauptversion
|
||||
// Nebenversion
|
||||
// Buildnummer
|
||||
// Revision
|
||||
//
|
||||
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||
// indem Sie "*" wie unten gezeigt eingeben:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.4.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.0.0")]
|
|
@ -0,0 +1,26 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace AirScout.PlaneFeeds.Plugin.RadarVirtuel.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.3.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles />
|
||||
<Settings />
|
||||
</SettingsFile>
|
|
@ -0,0 +1,659 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Reflection;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
using AirScout.PlaneFeeds.Plugin.MEFContract;
|
||||
using System.Diagnostics;
|
||||
using System.Net;
|
||||
using System.IO;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Collections;
|
||||
using System.Xml.Serialization;
|
||||
using System.Xml.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using AirScout.Core;
|
||||
|
||||
namespace AirScout.PlaneFeeds.Plugin.RadarVirtuel
|
||||
{
|
||||
|
||||
public class RadarVirtuelSettings
|
||||
{
|
||||
[Browsable(false)]
|
||||
[DefaultValue("")]
|
||||
[XmlIgnore]
|
||||
public string DisclaimerAccepted { get; set; }
|
||||
|
||||
[Browsable(true)]
|
||||
[CategoryAttribute("Web Feed")]
|
||||
[DescriptionAttribute("Save downloaded JSON to file")]
|
||||
[DefaultValue(false)]
|
||||
[XmlIgnore]
|
||||
public bool SaveToFile { get; set; }
|
||||
|
||||
[Browsable(true)]
|
||||
[CategoryAttribute("Web Feed")]
|
||||
[DescriptionAttribute("Base URL for website.")]
|
||||
[DefaultValue("https://mg22.adsbnetwork.com/zsrv/xenvolsrv.php?userid=betatesteur&serviceid=allicao")]
|
||||
public string URL { get; set; }
|
||||
|
||||
[Browsable(true)]
|
||||
[CategoryAttribute("Web Feed")]
|
||||
[DescriptionAttribute("Timeout for loading the site.")]
|
||||
[DefaultValue(30)]
|
||||
[XmlIgnore]
|
||||
public int Timeout { get; set; }
|
||||
|
||||
|
||||
public RadarVirtuelSettings()
|
||||
{
|
||||
Default();
|
||||
Load(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets all properties to their default value according to the [DefaultValue=] attribute
|
||||
/// </summary>
|
||||
public void Default()
|
||||
{
|
||||
// set all properties to their default values according to definition in [DeafultValue=]
|
||||
foreach (var p in this.GetType().GetProperties())
|
||||
{
|
||||
try
|
||||
{
|
||||
// initialize all properties with default value if set
|
||||
if (Attribute.IsDefined(p, typeof(DefaultValueAttribute)))
|
||||
{
|
||||
p.SetValue(this, ((DefaultValueAttribute)Attribute.GetCustomAttribute(
|
||||
p, typeof(DefaultValueAttribute)))?.Value, null);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Cannot set default value of: " + p.Name + ", " + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Loads settings from a XML-formatted configuration file into settings.
|
||||
/// </summary>
|
||||
/// <param name="loadall">If true, ignore the [XmlIgnore] attribute, e.g. load all settings available in the file.<br>If false, load only settings without [XmlIgore] attrbute.</br></param>
|
||||
/// <param name="filename">The filename of the settings file.</param>
|
||||
public void Load(bool loadall, string filename = "")
|
||||
{
|
||||
// use standard filename if empty
|
||||
// be careful because Linux file system is case sensitive
|
||||
if (String.IsNullOrEmpty(filename))
|
||||
filename = new Uri(Assembly.GetExecutingAssembly().GetName().CodeBase.Replace(".dll", ".cfg").Replace(".DLL", ".CFG")).LocalPath;
|
||||
// do nothing if file not exists
|
||||
if (!File.Exists(filename))
|
||||
return;
|
||||
try
|
||||
{
|
||||
string xml = "";
|
||||
using (StreamReader sr = new StreamReader(File.OpenRead(filename)))
|
||||
{
|
||||
xml = sr.ReadToEnd();
|
||||
}
|
||||
XDocument xdoc = XDocument.Parse(xml);
|
||||
PropertyInfo[] properties = this.GetType().GetProperties();
|
||||
foreach (PropertyInfo p in properties)
|
||||
{
|
||||
if (!loadall)
|
||||
{
|
||||
// check on XmlIgnore attribute, skip if set
|
||||
object[] attr = p.GetCustomAttributes(typeof(XmlIgnoreAttribute), false);
|
||||
if (attr.Length > 0)
|
||||
continue;
|
||||
}
|
||||
try
|
||||
{
|
||||
// get matching element
|
||||
XElement typenode = xdoc.Element(this.GetType().Name);
|
||||
if (typenode != null)
|
||||
{
|
||||
XElement element = typenode.Element(p.Name);
|
||||
if (element != null)
|
||||
p.SetValue(this, Convert.ChangeType(element.Value, p.PropertyType), null);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Error while loading property[" + p.Name + " from " + filename + ", " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Cannot load settings from " + filename + ", " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Saves settings from settings into a XML-formatted configuration file
|
||||
/// </summary>
|
||||
/// <param name="saveall">If true, ignore the [XmlIgnore] attribute, e.g. save all settings.<br>If false, save only settings without [XmlIgore] attrbute.</param>
|
||||
/// <param name="filename">The filename of the settings file.</param>
|
||||
public void Save(bool saveall, string filename = "")
|
||||
{
|
||||
// use standard filename if empty
|
||||
// be careful because Linux file system is case sensitive
|
||||
if (String.IsNullOrEmpty(filename))
|
||||
filename = new Uri(Assembly.GetExecutingAssembly().GetName().CodeBase.Replace(".dll", ".cfg").Replace(".DLL", ".CFG")).LocalPath;
|
||||
XmlAttributeOverrides overrides = new XmlAttributeOverrides();
|
||||
if (saveall)
|
||||
{
|
||||
// ovverride the XmlIgnore attributes to get all serialized
|
||||
PropertyInfo[] properties = this.GetType().GetProperties();
|
||||
foreach (PropertyInfo p in properties)
|
||||
{
|
||||
XmlAttributes attribs = new XmlAttributes { XmlIgnore = false };
|
||||
overrides.Add(this.GetType(), p.Name, attribs);
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
using (StreamWriter sw = new StreamWriter(File.Create(filename)))
|
||||
{
|
||||
XmlSerializer s = new XmlSerializer(this.GetType(), overrides,null,new XmlRootAttribute(),"");
|
||||
s.Serialize(sw, this);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Cannot save settings to " + filename + ", " + ex.ToString());
|
||||
throw new InvalidOperationException("[" + this.GetType().Name + "]: Cannot save settings to " + filename + ", " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Export(typeof(IPlaneFeedPlugin))]
|
||||
[ExportMetadata("Name", "PlaneFeedPlugin")]
|
||||
public class RadarVirtuelPlugin : IPlaneFeedPlugin
|
||||
{
|
||||
private RadarVirtuelSettings Settings = new RadarVirtuelSettings();
|
||||
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return "[WebFeed] RadarVirtuel ";
|
||||
}
|
||||
}
|
||||
|
||||
public string Info
|
||||
{
|
||||
get
|
||||
{
|
||||
return "Web feed from www.radarvirtuel.com\n" +
|
||||
"See https://www.radarvirtuel.com\n\n" +
|
||||
"(c)AirScout(www.airscout.eu)\n\n";
|
||||
}
|
||||
}
|
||||
|
||||
public string Version
|
||||
{
|
||||
get
|
||||
{
|
||||
return Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasSettings
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public bool CanImport
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool CanExport
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public string Disclaimer
|
||||
{
|
||||
get
|
||||
{
|
||||
return "This plane feed might fetch data from an Internet server via Deep Link\n" +
|
||||
"technology(see http://en.wikipedia.org/wiki/Deep_link)\n." +
|
||||
"The use is probably not intended by the website owners and could be changed in URL and data format frequently and without further notice.\n" +
|
||||
"Furthermore, it might cause legal issues in some countries.\n" +
|
||||
"By clicking on \"Accept\" you understand that you are\n\n" +
|
||||
"DOING THAT ON YOUR OWN RISK\n\n" +
|
||||
"The auhor of this software will not be responsible in any case.";
|
||||
}
|
||||
}
|
||||
|
||||
public string DisclaimerAccepted
|
||||
{
|
||||
get
|
||||
{
|
||||
return Settings.DisclaimerAccepted;
|
||||
}
|
||||
set
|
||||
{
|
||||
Settings.DisclaimerAccepted = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void ResetSettings()
|
||||
{
|
||||
Settings.Default();
|
||||
}
|
||||
|
||||
public void LoadSettings()
|
||||
{
|
||||
Settings.Load(true);
|
||||
}
|
||||
|
||||
public void SaveSettings()
|
||||
{
|
||||
Settings.Save(true);
|
||||
}
|
||||
|
||||
public object GetSettings()
|
||||
{
|
||||
return this.Settings;
|
||||
}
|
||||
|
||||
public void ImportSettings()
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
public void ExportSettings()
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
public void Start(PlaneFeedPluginArgs args)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
private DateTime UNIXTimeToDateTime(int ut)
|
||||
{
|
||||
if (ut == int.MinValue)
|
||||
return DateTime.MinValue;
|
||||
else if (ut == int.MaxValue)
|
||||
return DateTime.MaxValue;
|
||||
DateTime dt = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc);
|
||||
return dt.AddSeconds(ut);
|
||||
}
|
||||
|
||||
|
||||
public PlaneFeedPluginPlaneInfoList GetPlanes(PlaneFeedPluginArgs args)
|
||||
{
|
||||
// intialize variables
|
||||
VarConverter VC = new VarConverter();
|
||||
VC.AddVar("APPDIR", args.AppDirectory);
|
||||
VC.AddVar("DATADIR", args.AppDataDirectory);
|
||||
VC.AddVar("LOGDIR", args.LogDirectory);
|
||||
VC.AddVar("DATABASEDIR", args.DatabaseDirectory);
|
||||
VC.AddVar("MINLAT", args.MinLat);
|
||||
VC.AddVar("MAXLAT", args.MaxLat);
|
||||
VC.AddVar("MINLON", args.MinLon);
|
||||
VC.AddVar("MAXLON", args.MaxLon);
|
||||
VC.AddVar("MINALTM", args.MinAlt);
|
||||
VC.AddVar("MAXALTM", args.MaxAlt);
|
||||
VC.AddVar("MINALTFT", (int)UnitConverter.m_ft((double)args.MinAlt));
|
||||
VC.AddVar("MAXALTFT", (int)UnitConverter.m_ft((double)args.MaxAlt));
|
||||
// initialize plane info list
|
||||
PlaneFeedPluginPlaneInfoList planes = new PlaneFeedPluginPlaneInfoList();
|
||||
string json = "";
|
||||
// calculate url and get json
|
||||
String url = VC.ReplaceAllVars(Settings.URL);
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Creating web request: " + url);
|
||||
HttpWebRequest webrequest = (HttpWebRequest)HttpWebRequest.Create(url);
|
||||
webrequest.Timeout = Settings.Timeout * 1000;
|
||||
webrequest.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0";
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Getting web response");
|
||||
HttpWebResponse webresponse = (HttpWebResponse)webrequest.GetResponse();
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Reading stream");
|
||||
using (StreamReader sr = new StreamReader(webresponse.GetResponseStream()))
|
||||
{
|
||||
json = sr.ReadToEnd();
|
||||
}
|
||||
// save raw data to file if enabled
|
||||
if (Settings.SaveToFile)
|
||||
{
|
||||
using (StreamWriter sw = new StreamWriter(args.TmpDirectory + Path.DirectorySeparatorChar + this.GetType().Name + "_" + DateTime.UtcNow.ToString("yyyy-MM-dd HH_mm_ss") + ".json"))
|
||||
{
|
||||
sw.WriteLine(json);
|
||||
}
|
||||
}
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Analyzing data");
|
||||
try
|
||||
{
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Deserializing data from JSON");
|
||||
|
||||
// JavaScriptSerializer js = new JavaScriptSerializer();
|
||||
// dynamic root = js.Deserialize<dynamic>(json);
|
||||
// get the planes position list
|
||||
PlaneRV[] aclist = JsonConvert.DeserializeObject <PlaneRV[]>(json);
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Created object from JSON is " + aclist.GetType().ToString());
|
||||
// analyze json string for planes data
|
||||
foreach (PlaneRV ac in aclist)
|
||||
{
|
||||
try
|
||||
{
|
||||
PlaneFeedPluginPlaneInfo plane = new PlaneFeedPluginPlaneInfo();
|
||||
plane.Hex = !String.IsNullOrEmpty(ac.icao)? ac.icao : "";
|
||||
plane.Call = !String.IsNullOrEmpty(ac.cs) ? ac.cs : "";
|
||||
plane.Lat = ac.loc.lat;
|
||||
plane.Lon = ac.loc.lng;
|
||||
plane.Alt = ac.alt;
|
||||
plane.Track = ac.trk;
|
||||
plane.Speed = ac.spd;
|
||||
plane.Type = "";
|
||||
plane.Category = 0;
|
||||
plane.Manufacturer = "";
|
||||
plane.Model = "";
|
||||
plane.Time = UNIXTimeToDateTime(ac.tm);
|
||||
if (ac.alt > 0)
|
||||
planes.Add(plane);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: " + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string filename = args.TmpDirectory + Path.DirectorySeparatorChar + this.GetType().Name + "_" + DateTime.UtcNow.ToString("yyyy-MM-dd HH_mm_ss") + ".json";
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: " + ex.Message + "\n\nJSON response saved as: " + filename);
|
||||
// save the JSON file
|
||||
try
|
||||
{
|
||||
using (StreamWriter sw = new StreamWriter(filename))
|
||||
{
|
||||
sw.WriteLine(json);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
// do nothing if saving fails
|
||||
}
|
||||
// forward exception to parent thread
|
||||
throw new Exception(ex.Message, ex.InnerException);
|
||||
}
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Returning " + planes.Count + " planes");
|
||||
return planes;
|
||||
}
|
||||
|
||||
public void Stop(PlaneFeedPluginArgs args)
|
||||
{
|
||||
Settings.Save(true);
|
||||
}
|
||||
|
||||
// end of Interface
|
||||
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCode]
|
||||
private string ReadPropertyString(dynamic o, int propertyindex)
|
||||
{
|
||||
string s = null;
|
||||
try
|
||||
{
|
||||
s = o.Value[propertyindex];
|
||||
}
|
||||
catch
|
||||
{
|
||||
// do nothing if something went wrong
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCode]
|
||||
private int ReadPropertyInt(dynamic o, int propertyindex)
|
||||
{
|
||||
int i = int.MinValue;
|
||||
double d = ReadPropertyDouble(o, propertyindex);
|
||||
if ((d != double.MinValue) && (d >= int.MinValue) && (d <= int.MaxValue))
|
||||
i = (int)d;
|
||||
return i;
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCode]
|
||||
private double ReadPropertyDouble(dynamic o, int propertyindex)
|
||||
{
|
||||
double d = double.MinValue;
|
||||
try
|
||||
{
|
||||
string s = o.Value[propertyindex].ToString(CultureInfo.InvariantCulture);
|
||||
d = double.Parse(s, CultureInfo.InvariantCulture);
|
||||
}
|
||||
catch
|
||||
{
|
||||
// do nothing if something went wrong
|
||||
}
|
||||
return d;
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCode]
|
||||
private long ReadPropertyLong(dynamic o, int propertyindex)
|
||||
{
|
||||
long l = long.MinValue;
|
||||
try
|
||||
{
|
||||
l = long.Parse(o.Value[propertyindex].ToString());
|
||||
}
|
||||
catch
|
||||
{
|
||||
// do nothing if something went wrong
|
||||
}
|
||||
return l;
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCode]
|
||||
private bool ReadPropertyBool(dynamic o, int propertyindex)
|
||||
{
|
||||
bool b = false;
|
||||
try
|
||||
{
|
||||
string s = o.Value[propertyindex].ToString();
|
||||
b = s.ToLower() == "true";
|
||||
}
|
||||
catch
|
||||
{
|
||||
// do nothing if something went wrong
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// //////////////////////////////////////////// Helpers ////////////////////////////////////////////
|
||||
/// </summary>
|
||||
|
||||
public static class UnitConverter
|
||||
{
|
||||
public static double ft_m(double feet)
|
||||
{
|
||||
return feet / 3.28084;
|
||||
}
|
||||
|
||||
public static double m_ft(double m)
|
||||
{
|
||||
return m * 3.28084;
|
||||
}
|
||||
|
||||
public static double kts_kmh(double kts)
|
||||
{
|
||||
return kts * 1.852;
|
||||
}
|
||||
|
||||
public static double kmh_kts(double kmh)
|
||||
{
|
||||
return kmh / 1.852;
|
||||
}
|
||||
|
||||
public static double km_mi(double km)
|
||||
{
|
||||
return km * 1.609;
|
||||
}
|
||||
|
||||
public static double mi_km(double mi)
|
||||
{
|
||||
return mi / 1.609;
|
||||
}
|
||||
}
|
||||
|
||||
public class VarConverter : Dictionary<string, object>
|
||||
{
|
||||
public readonly char VarSeparator = '%';
|
||||
|
||||
public void AddVar(string var, object value)
|
||||
{
|
||||
// adds a new var<>value pair to dictionary
|
||||
object o;
|
||||
if (this.TryGetValue(var, out o))
|
||||
{
|
||||
// item found --> update value
|
||||
o = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
// item not found --> add new
|
||||
this.Add(var, value);
|
||||
}
|
||||
}
|
||||
|
||||
public object GetValue(string var)
|
||||
{
|
||||
// finds a var in dictionary and returns its value
|
||||
object o;
|
||||
if (this.TryGetValue(var, out o))
|
||||
{
|
||||
// item found --> return value
|
||||
return o;
|
||||
}
|
||||
// item not found --> return null
|
||||
return null;
|
||||
}
|
||||
|
||||
public string ReplaceAllVars(string s)
|
||||
{
|
||||
// check for var separotors first
|
||||
if (s.Contains(VarSeparator))
|
||||
{
|
||||
// OK, string is containing vars --> crack the string first and replace vars
|
||||
try
|
||||
{
|
||||
string[] a = s.Split(VarSeparator);
|
||||
// as we are always using a pair of separators the length of a[] must be odd
|
||||
if (a.Length % 2 == 0)
|
||||
throw new ArgumentException("Number of separators is not an even number.");
|
||||
// create new string and replace all vars (on odd indices)
|
||||
s = "";
|
||||
for (int i = 0; i < a.Length; i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
// cannot be not a var on that position
|
||||
s = s + a[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
// var identifier: upper the string and try to convert
|
||||
a[i] = a[i].ToUpper();
|
||||
object o;
|
||||
if (this.TryGetValue(a[i], out o))
|
||||
{
|
||||
// convert floating points with invariant culture info
|
||||
if (o.GetType() == typeof(double))
|
||||
s = s + ((double)o).ToString(CultureInfo.InvariantCulture);
|
||||
else if (o.GetType() == typeof(float))
|
||||
s = s + ((float)o).ToString(CultureInfo.InvariantCulture);
|
||||
else
|
||||
s = s + o.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new ArgumentException("Var identifier not found: " + a[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// throw an excecption
|
||||
throw new ArgumentException("Error while parsing string for variables [" + ex.Message + "]: " + s);
|
||||
}
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// holds the complete location
|
||||
public class LocRV
|
||||
{
|
||||
public double lng { get; set; } = 0;
|
||||
public double lat { get; set; } = 0;
|
||||
}
|
||||
|
||||
// holds the complete aircraft info
|
||||
public class PlaneRV
|
||||
{
|
||||
public string icao { get; set; } = "";
|
||||
public string affp { get; set; } = "";
|
||||
public double alt { get; set; } = 0;
|
||||
public double falt { get; set; } = 0;
|
||||
public LocRV floc { get; set; } = new LocRV();
|
||||
public double fspd { get; set; } = 0;
|
||||
public string fst { get; set; } = "";
|
||||
public string fswk { get; set; } = "";
|
||||
public string fvrt { get; set; } = "";
|
||||
public string icon { get; set; } = "";
|
||||
public string itc { get; set; } = "";
|
||||
public LocRV loc { get; set; } = new LocRV();
|
||||
public string mod { get; set; } = "";
|
||||
public int nbm { get; set; } = 0;
|
||||
public int nbpos { get; set; } = 0;
|
||||
public string reg { get; set; } = "";
|
||||
public double spd { get; set; } = 0;
|
||||
public string spe { get; set; } = "";
|
||||
public string st { get; set; } = "";
|
||||
public string swk { get; set; } = "";
|
||||
public string tav { get; set; } = "";
|
||||
public int tm { get; set; } = 0;
|
||||
public string tmot { get; set; } = "";
|
||||
public double trk { get; set; } = 0;
|
||||
public int ts { get; set; } = 0;
|
||||
public int vrt { get; set; } = 0;
|
||||
public string cs { get; set; } = "";
|
||||
public string at { get; set; } = "";
|
||||
|
||||
public PlaneRV()
|
||||
{
|
||||
}
|
||||
|
||||
public PlaneRV(string hex, string call, double lat, double lon, double alt, double track, double speed, string type, PLANECATEGORY category, string manufacturer, string model, string reg, DateTime time)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
</configSections>
|
||||
</configuration>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="ILMerge" version="3.0.29" targetFramework="net40" />
|
||||
<package id="ILMerge.MSBuild.Task" version="1.0.7" targetFramework="net40" />
|
||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net40" />
|
||||
</packages>
|
|
@ -0,0 +1,95 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\ILMerge.3.0.29\build\ILMerge.props" Condition="Exists('..\packages\ILMerge.3.0.29\build\ILMerge.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{5C096747-2BF0-4D36-BAA7-226CF71619A4}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>AirScout.PlaneFeeds.Plugin.VRSWebServer</RootNamespace>
|
||||
<AssemblyName>AirScout.PlaneFeeds.Plugin.VRSWebServer</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="BouncyCastle.Crypto, Version=1.8.9.0, Culture=neutral, PublicKeyToken=0e99375e54769942">
|
||||
<HintPath>..\packages\BouncyCastle.1.8.9\lib\BouncyCastle.Crypto.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AircraftJson.cs" />
|
||||
<Compile Include="AircraftListJson.cs" />
|
||||
<Compile Include="FeedJson.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="VRSWebServer.cs" />
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="TLS.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\AirScout.PlaneFeeds.Plugin\AirScout.PlaneFeeds.Plugin.csproj">
|
||||
<Project>{36945dbd-96c8-41e7-9168-f83c42e67af3}</Project>
|
||||
<Name>AirScout.PlaneFeeds.Plugin</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}".</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\ILMerge.3.0.29\build\ILMerge.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ILMerge.3.0.29\build\ILMerge.props'))" />
|
||||
<Error Condition="!Exists('..\packages\ILMerge.MSBuild.Task.1.0.7\build\ILMerge.MSBuild.Task.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ILMerge.MSBuild.Task.1.0.7\build\ILMerge.MSBuild.Task.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\ILMerge.MSBuild.Task.1.0.7\build\ILMerge.MSBuild.Task.targets" Condition="Exists('..\packages\ILMerge.MSBuild.Task.1.0.7\build\ILMerge.MSBuild.Task.targets')" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>mkdir $(SolutionDir)\Airscout\$(OutDir)\Plugin\
|
||||
copy $(ProjectDir)\$(OutDir)\ILMerge\*$(TargetExt) $(SolutionDir)\Airscout\$(OutDir)\Plugin\ /y</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -0,0 +1,455 @@
|
|||
// Copyright © 2010 onwards, Andrew Whewell
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use of this software in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
// * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
// * Neither the name of the author nor the names of the program's contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OF THE SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace VirtualRadar.Interface.WebSite
|
||||
{
|
||||
/// <summary>
|
||||
/// The object that describes an aircraft in JSON files that are sent to the browser.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public class AircraftJson
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the unique identifier of the aircraft.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Id")]
|
||||
public int UniqueId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ID of the receiver that is currently tracking the aircraft.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Rcvr", IsRequired = false, EmitDefaultValue = false)]
|
||||
public int? ReceiverId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the receiver emitted a signal level for the aircraft.
|
||||
/// </summary>
|
||||
[DataMember(Name = "HasSig", IsRequired = false, EmitDefaultValue = false)]
|
||||
public bool? HasSignalLevel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the signal level of the last message received for the aircraft. Use in conjunction with HasSignalLevel.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Sig", IsRequired = false, EmitDefaultValue = false)]
|
||||
public int? SignalLevel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the 24-bit Mode-S identifier of the aircraft.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Icao", IsRequired = false, EmitDefaultValue = false)]
|
||||
public string Icao24 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating that the <see cref="Icao24"/> code is wrong - either it is an unallocated code
|
||||
/// or the aircraft is known to be transmitting the wrong code.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Bad", IsRequired = false, EmitDefaultValue = false)]
|
||||
public bool? Icao24Invalid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the aircraft's registration.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Reg", IsRequired = false, EmitDefaultValue = false)]
|
||||
public string Registration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the date and time (UTC) that a transmission from the aircraft was first received by the server.
|
||||
/// </summary>
|
||||
[DataMember(Name = "FSeen", IsRequired = false, EmitDefaultValue = false)]
|
||||
public DateTime? FirstSeen { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number of seconds that the aircraft has been tracked for.
|
||||
/// </summary>
|
||||
[DataMember(Name = "TSecs", IsRequired = false, EmitDefaultValue = false)]
|
||||
public long SecondsTracked { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number of messages received for the aircraft.
|
||||
/// </summary>
|
||||
[DataMember(Name = "CMsgs", IsRequired = false, EmitDefaultValue = false)]
|
||||
public long? CountMessagesReceived { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the aircraft's pressure altitude in feet.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Alt", IsRequired = false, EmitDefaultValue = false)]
|
||||
public int? Altitude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the aircraft's geometric altitude in feet.
|
||||
/// </summary>
|
||||
[DataMember(Name = "GAlt", IsRequired = false, EmitDefaultValue = false)]
|
||||
public int? GeometricAltitude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the aircraft's air pressure setting in inches of mercury.
|
||||
/// </summary>
|
||||
[DataMember(Name = "InHg", IsRequired = false, EmitDefaultValue = false)]
|
||||
public float? AirPressureInHg { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type of altitude transmitted by the aircraft.
|
||||
/// </summary>
|
||||
[DataMember(Name = "AltT", IsRequired = false, EmitDefaultValue = false)]
|
||||
public int? AltitudeType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the altitude set on the autopilot / FMS etc.
|
||||
/// </summary>
|
||||
[DataMember(Name = "TAlt", IsRequired = false, EmitDefaultValue = false)]
|
||||
public int? TargetAltitude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the aircraft's callsign.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Call", IsRequired = false, EmitDefaultValue = false)]
|
||||
public string Callsign { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the latitude of the aircraft.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Lat", IsRequired = false, EmitDefaultValue = false)]
|
||||
public double? Latitude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the aircraft's longitude.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Long", IsRequired = false, EmitDefaultValue = false)]
|
||||
public double? Longitude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the time that the <see cref="Latitude"/> and <see cref="Longitude"/> were
|
||||
/// transmitted as a number of .NET ticks.
|
||||
/// </summary>
|
||||
[DataMember(Name = "PosTime", IsRequired = false, EmitDefaultValue = false)]
|
||||
public long? PositionTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating that the <see cref="Latitude"/> and <see cref="Longitude"/>
|
||||
/// were calculated by an MLAT source.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Mlat", IsRequired = false, EmitDefaultValue = false)]
|
||||
public bool? PositionIsMlat { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the position is older than the display timeout.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This is usually only seen on merged feeds that include an MLAT feed, and only for aircraft
|
||||
/// that are not transmitting positions. The aircraft can appear to freeze on the map when it
|
||||
/// moves out of range of the MLAT receiver, this flag controls whether we should keep showing
|
||||
/// the aircraft on the map.
|
||||
/// </remarks>
|
||||
[DataMember(Name = "PosStale", IsRequired = false, EmitDefaultValue = false)]
|
||||
public bool? PositionIsStale { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating that the last message received for this aircraft was from a TIS-B source.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Tisb", IsRequired = false, EmitDefaultValue = false)]
|
||||
public bool? IsTisb { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ground speed of the aircraft in knots.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Spd", IsRequired = false, EmitDefaultValue = false)]
|
||||
public float? GroundSpeed { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the heading that the aircraft is tracking across the ground in degrees from 0° north.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Trak", IsRequired = false, EmitDefaultValue = false)]
|
||||
public float? Track { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating that the track is the aircraft's heading, not its ground track.
|
||||
/// </summary>
|
||||
[DataMember(Name = "TrkH", IsRequired = false, EmitDefaultValue = false)]
|
||||
public bool? TrackIsHeading { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the heading on the aircraft's autopilot or FMS.
|
||||
/// </summary>
|
||||
[DataMember(Name = "TTrk", IsRequired = false, EmitDefaultValue = false)]
|
||||
public float? TargetTrack { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ICAO8643 type code of the aircraft.
|
||||
/// </summary>
|
||||
[DataMember(IsRequired = false, EmitDefaultValue = false)]
|
||||
public string Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the English description of the aircraft model. Usually includes the manufacturer.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Mdl", IsRequired = false, EmitDefaultValue = false)]
|
||||
public string Model { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the manufacturer's name.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Man", IsRequired = false, EmitDefaultValue = false)]
|
||||
public string Manufacturer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the construction / serial number of the aircraft.
|
||||
/// </summary>
|
||||
[DataMember(Name = "CNum", IsRequired = false, EmitDefaultValue = false)]
|
||||
public string ConstructionNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the airport that the aircraft set out from.
|
||||
/// </summary>
|
||||
[DataMember(Name = "From", IsRequired = false, EmitDefaultValue = false)]
|
||||
public string Origin { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the airport that the aircraft is travelling to.
|
||||
/// </summary>
|
||||
[DataMember(Name = "To", IsRequired = false, EmitDefaultValue = false)]
|
||||
public string Destination { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a list of airports that the aircraft will be stopping at on its way to <see cref="Destination"/>.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Stops", IsRequired = false, EmitDefaultValue = false)]
|
||||
public List<string> Stopovers { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating that this is probably a positioning / ferry flight.
|
||||
/// </summary>
|
||||
[DataMember(Name = "IsFerryFlight", IsRequired = false, EmitDefaultValue = false)]
|
||||
public bool? IsPositioningFlight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating that the this probably a charter flight.
|
||||
/// </summary>
|
||||
[DataMember(Name = "IsCharterFlight", IsRequired = false, EmitDefaultValue = false)]
|
||||
public bool? IsCharterFlight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the operator's name.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Op", IsRequired = false, EmitDefaultValue = false)]
|
||||
public string Operator { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the operator's ICAO code.
|
||||
/// </summary>
|
||||
[DataMember(Name = "OpIcao", IsRequired = false, EmitDefaultValue = false)]
|
||||
public string OperatorIcao { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the squawk currently transmitted by the aircraft.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Sqk", IsRequired = false, EmitDefaultValue = false)]
|
||||
public string Squawk { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether ident is active.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Ident", IsRequired = false, EmitDefaultValue = false)]
|
||||
public bool? IdentActive { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a flag indicating that the aircraft is transmitting a mayday squawk.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Help", IsRequired = false, EmitDefaultValue = false)]
|
||||
public bool? Emergency { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the vertical speed in feet per second.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Vsi", IsRequired = false, EmitDefaultValue = false)]
|
||||
public int? VerticalRate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type of altitude reported in <see cref="VerticalRate"/>.
|
||||
/// </summary>
|
||||
[DataMember(Name = "VsiT", IsRequired = false, EmitDefaultValue = false)]
|
||||
public int? VerticalRateType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the distance from the browser's location to the aircraft in kilometres.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Dst", IsRequired = false, EmitDefaultValue = false)]
|
||||
public double? DistanceFromHere { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the bearing from the browser to the aircraft in degrees from 0° north.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Brng", IsRequired = false, EmitDefaultValue = false)]
|
||||
public double? BearingFromHere { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating the wake turbulence category of the aircraft (see <see cref="WakeTurbulenceCategory"/>).
|
||||
/// </summary>
|
||||
[DataMember(Name = "WTC", IsRequired = false, EmitDefaultValue = false)]
|
||||
public int? WakeTurbulenceCategory { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating the species of aircraft (see <see cref="Species"/>).
|
||||
/// </summary>
|
||||
[DataMember(IsRequired = false, EmitDefaultValue = false)]
|
||||
public int? Species { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number of engines that the aircraft has - note that this is a copy of the ICAO8643 engine count which is not
|
||||
/// always a number!
|
||||
/// </summary>
|
||||
[DataMember(Name = "Engines", IsRequired = false, EmitDefaultValue = false)]
|
||||
public string NumberOfEngines { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating the type of engines that the aircraft uses (see <see cref="EngineType"/>).
|
||||
/// </summary>
|
||||
[DataMember(Name = "EngType", IsRequired = false, EmitDefaultValue = false)]
|
||||
public int? EngineType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating the placement of the engines mounted to the aircraft (see <see cref="EnginePlacement"/>).
|
||||
/// </summary>
|
||||
[DataMember(Name = "EngMount", IsRequired = false, EmitDefaultValue = false)]
|
||||
public int? EnginePlacement { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating that the aircraft is operated by a country's military.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Mil", IsRequired = false, EmitDefaultValue = false)]
|
||||
public bool? IsMilitary { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the country that the aircraft's <see cref="Icao24"/> was allocated to.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Cou", IsRequired = false, EmitDefaultValue = false)]
|
||||
public string Icao24Country { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating that the server can supply a picture of the aircraft.
|
||||
/// </summary>
|
||||
[DataMember(Name = "HasPic", IsRequired = false, EmitDefaultValue = false)]
|
||||
public bool? HasPicture { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the width of the aircraft picture in pixels.
|
||||
/// </summary>
|
||||
[DataMember(Name = "PicX", IsRequired = false, EmitDefaultValue = false)]
|
||||
public int? PictureWidth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the height of the aircraft picture in pixels.
|
||||
/// </summary>
|
||||
[DataMember(Name = "PicY", IsRequired = false, EmitDefaultValue = false)]
|
||||
public int? PictureHeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating that the aircraft is flagged as interesting in the BaseStation database.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Interested", IsRequired = false, EmitDefaultValue = false)]
|
||||
public bool? IsInteresting { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating how many flights this aircraft has logged in the BaseStation database.
|
||||
/// </summary>
|
||||
[DataMember(Name = "FlightsCount", IsRequired = false, EmitDefaultValue = false)]
|
||||
public int? FlightsCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating that the aircraft is on the ground.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Gnd", IsRequired = false, EmitDefaultValue = false)]
|
||||
public bool? OnGround { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating the type of speed the aircraft is transmitting.
|
||||
/// </summary>
|
||||
[DataMember(Name = "SpdTyp", IsRequired = false, EmitDefaultValue = false)]
|
||||
public int? SpeedType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating that the <see cref="Callsign"/> came from an unreliable source.
|
||||
/// </summary>
|
||||
[DataMember(Name = "CallSus", IsRequired = false, EmitDefaultValue = false)]
|
||||
public bool? CallsignIsSuspect { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the user tag from the aircraft's database record.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Tag", IsRequired = false, EmitDefaultValue = false)]
|
||||
public string UserTag { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the user notes from the aircraft's database record.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Notes", IsRequired = false, EmitDefaultValue = false)]
|
||||
public string UserNotes { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating that the server wants all trails for the aircraft to be reset.
|
||||
/// </summary>
|
||||
[DataMember(IsRequired = false, EmitDefaultValue = false)]
|
||||
public bool ResetTrail { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the trail type. It is empty for plain trails (just position), 'a' for trails that have altitude
|
||||
/// attached and 's' for trails with speeds attached.
|
||||
/// </summary>
|
||||
[DataMember(Name = "TT", IsRequired = false, EmitDefaultValue = false)]
|
||||
public string TrailType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the transponder type.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Trt", IsRequired = false, EmitDefaultValue = false)]
|
||||
public int? TransponderType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the year the aircraft was manufactured.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Year", EmitDefaultValue = false)]
|
||||
public string YearBuilt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating that the aircraft was seen on a SatCom feed.
|
||||
/// </summary>
|
||||
[DataMember(Name = "Sat", EmitDefaultValue = false)]
|
||||
public bool IsSatcomFeed { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a list of coordinates representing the full trail for the aircraft. If <see cref="ResetTrail"/>
|
||||
/// is true then it is the entire trail, otherwise it extends the existing trail.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This is a set of 3-tuples - latitude, longitude and the heading. If <see cref="TrailType"/> is 'a' or 's'
|
||||
/// then it's a set of 4-tuples, with altitude or speed being added to the end of the tuple.
|
||||
/// </remarks>
|
||||
[DataMember(Name = "Cot", IsRequired = false, EmitDefaultValue = false)]
|
||||
public List<double?> FullCoordinates { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a list of coordinates representing the short trail for the aircraft. If <see cref="ResetTrail"/>
|
||||
/// is true then it is the entire trail, otherwise it extends the existing trail.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This is a set of 3-tuples - latitude, longitude and the time of the position in Javascript ticks. When <see cref="TrailType"/>
|
||||
/// is 'a' or 's' then it's a set of 4-tuples, where altitude or speed are added to the end of the tuple.
|
||||
/// </remarks>
|
||||
[DataMember(Name = "Cos", IsRequired = false, EmitDefaultValue = false)]
|
||||
public List<double?> ShortCoordinates { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,125 @@
|
|||
// Copyright © 2010 onwards, Andrew Whewell
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use of this software in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
// * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
// * Neither the name of the author nor the names of the program's contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OF THE SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace VirtualRadar.Interface.WebSite
|
||||
{
|
||||
/// <summary>
|
||||
/// The list of aircraft that is sent to the browser as a JSON file.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public class AircraftListJson
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the source of the aircraft list (see <see cref="AircraftListSource"/>).
|
||||
/// </summary>
|
||||
[DataMember(Name = "src")]
|
||||
public int Source { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a collection of feeds that VRS has been configured to listen to and are currently enabled.
|
||||
/// </summary>
|
||||
[DataMember(Name = "feeds")]
|
||||
public List<FeedJson> Feeds { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ID of the feed that this aircraft list is showing.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// It's entirely possible that this ID number does not correspond with any feed in <see cref="Feeds"/> - this
|
||||
/// can happen when reporting on the Flight Simulator X feed, or when the feed requested by the website no
|
||||
/// longer exists on the server.
|
||||
/// </remarks>
|
||||
[DataMember(Name = "srcFeed")]
|
||||
public int SourceFeedId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating that silhouettes can be shown for aircraft.
|
||||
/// </summary>
|
||||
[DataMember(Name = "showSil")]
|
||||
public bool ShowSilhouettes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating that operator flags can be shown for aircraft.
|
||||
/// </summary>
|
||||
[DataMember(Name = "showFlg")]
|
||||
public bool ShowFlags { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating that pictures can be shown for aircraft.
|
||||
/// </summary>
|
||||
[DataMember(Name = "showPic")]
|
||||
public bool ShowPictures { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the height of the operator flags.
|
||||
/// </summary>
|
||||
[DataMember(Name = "flgH")]
|
||||
public int FlagHeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the width of the operator flags.
|
||||
/// </summary>
|
||||
[DataMember(Name = "flgW")]
|
||||
public int FlagWidth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of aircraft to show to the user.
|
||||
/// </summary>
|
||||
[DataMember(Name = "acList", IsRequired = true)]
|
||||
public List<AircraftJson> Aircraft { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the total number of aircraft that the server is currently tracking.
|
||||
/// </summary>
|
||||
[DataMember(Name = "totalAc")]
|
||||
public int AvailableAircraft { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the latest <see cref="IAircraft.DataVersion"/> for the aircraft in the aircraft list.
|
||||
/// </summary>
|
||||
/// <remarks>The browser sends this value back to the server when it asks for another aircraft list. In this
|
||||
/// way the server can figure out what has changed since the last time the browser asked for a list.</remarks>
|
||||
[DataMember(Name = "lastDv")]
|
||||
public string LastDataVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number of seconds of positions to show in short trails.
|
||||
/// </summary>
|
||||
[DataMember(Name = "shtTrlSec", IsRequired = false, EmitDefaultValue = false)]
|
||||
public int ShortTrailLengthSeconds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the server's current time as the number of Javascript ticks in a UTC DateTime.
|
||||
/// </summary>
|
||||
[DataMember(Name = "stm")]
|
||||
public long ServerTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating that the server configuration has changed since their last update.
|
||||
/// </summary>
|
||||
[DataMember(Name = "configChanged", IsRequired = false, EmitDefaultValue = false)]
|
||||
public bool ServerConfigChanged { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new object.
|
||||
/// </summary>
|
||||
public AircraftListJson()
|
||||
{
|
||||
Aircraft = new List<AircraftJson>();
|
||||
Feeds = new List<FeedJson>();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
// Copyright © 2013 onwards, Andrew Whewell
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use of this software in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
// * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
// * Neither the name of the author nor the names of the program's contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OF THE SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace VirtualRadar.Interface.WebSite
|
||||
{
|
||||
/// <summary>
|
||||
/// The JSON object that describes a data feed from a receiver.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public class FeedJson
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the unique ID of the feed.
|
||||
/// </summary>
|
||||
[DataMember(Name = "id", IsRequired = true)]
|
||||
public int UniqueId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the current name of the feed.
|
||||
/// </summary>
|
||||
[DataMember(Name = "name", IsRequired = true)]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating that a polar plot exists for the feed.
|
||||
/// </summary>
|
||||
[DataMember(Name = "polarPlot", IsRequired = true)]
|
||||
public bool HasPolarPlot { get; set; }
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||
// die einer Assembly zugeordnet sind.
|
||||
[assembly: AssemblyTitle("AirScout.PlaneFeeds.Plugin.VRSWebServer")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("AirScout.PlaneFeeds.Plugin.VRSWebServer")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2022 DL2ALF")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
|
||||
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
|
||||
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
|
||||
[assembly: Guid("db85e98a-e209-49d0-b6cf-6cdd5b8e20e3")]
|
||||
|
||||
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
//
|
||||
// Hauptversion
|
||||
// Nebenversion
|
||||
// Buildnummer
|
||||
// Revision
|
||||
//
|
||||
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||
// indem Sie "*" wie unten gezeigt eingeben:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.4.3.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.3.0")]
|
|
@ -0,0 +1,26 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace AirScout.PlaneFeeds.Plugin.OpenSky.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles />
|
||||
<Settings />
|
||||
</SettingsFile>
|
|
@ -0,0 +1,282 @@
|
|||
using Org.BouncyCastle.Crypto.Tls;
|
||||
using Org.BouncyCastle.Security;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace System.Net
|
||||
{
|
||||
class VRSTlsClient : DefaultTlsClient
|
||||
{
|
||||
string HostName;
|
||||
|
||||
public VRSTlsClient(string hostname)
|
||||
{
|
||||
HostName = hostname;
|
||||
}
|
||||
|
||||
public override TlsAuthentication GetAuthentication()
|
||||
{
|
||||
TlsAuthentication auth = new MyTlsAuthentication();
|
||||
return auth;
|
||||
}
|
||||
|
||||
public override void NotifyNewSessionTicket(NewSessionTicket newSessionTicket)
|
||||
{
|
||||
base.NotifyNewSessionTicket(newSessionTicket);
|
||||
}
|
||||
|
||||
public override IDictionary GetClientExtensions()
|
||||
{
|
||||
var clientExtensions = base.GetClientExtensions();
|
||||
/*
|
||||
List<ServerName> servers = new List<ServerName>();
|
||||
servers.Add(new ServerName(NameType.host_name, HostName));
|
||||
TlsExtensionsUtilities.AddServerNameExtension(clientExtensions, new ServerNameList(servers));
|
||||
*/
|
||||
return clientExtensions;
|
||||
}
|
||||
|
||||
private static bool ReadContent(Stream stream, int contentlength, int timeout, ref string response)
|
||||
{
|
||||
// set stop watch as timout
|
||||
Stopwatch st = new Stopwatch();
|
||||
st.Start();
|
||||
string resp = "";
|
||||
int count = 0;
|
||||
// assign buffer
|
||||
byte[] buff = new byte[1024];
|
||||
int bytesread = 0;
|
||||
// read content blockwise
|
||||
while (bytesread < contentlength)
|
||||
{
|
||||
int bytestoread = buff.Length - bytesread;
|
||||
if (bytestoread > buff.Length)
|
||||
bytestoread = buff.Length;
|
||||
bytesread += stream.Read(buff, 0, buff.Length);
|
||||
// add it to response
|
||||
resp += Encoding.ASCII.GetString(buff, 0, buff.Length);
|
||||
if (st.ElapsedMilliseconds > timeout)
|
||||
throw new TimeoutException("Connection timed out.");
|
||||
}
|
||||
/*
|
||||
string trailer = "";
|
||||
// reassign buffer
|
||||
buff = new byte[1];
|
||||
// read stream bytewise until CRLFCRLF is detected, should be the next two bytes
|
||||
do
|
||||
{
|
||||
count = stream.Read(buff, 0, buff.Length);
|
||||
trailer += Encoding.ASCII.GetString(buff, 0, buff.Length);
|
||||
if (st.ElapsedMilliseconds > timeout)
|
||||
throw new TimeoutException("Connection timed out.");
|
||||
}
|
||||
while (!trailer.Contains("\r\n"));
|
||||
*/
|
||||
Console.WriteLine("Reading content [" + contentlength.ToString() + " bytes]: " + resp);
|
||||
response += resp;
|
||||
return true;
|
||||
}
|
||||
|
||||
private static bool ReadChunkedContent(Stream stream, int timeout, ref string response)
|
||||
{
|
||||
// set stop watch as timout
|
||||
Stopwatch st = new Stopwatch();
|
||||
st.Start();
|
||||
string resp = "";
|
||||
byte[] buff = new byte[1];
|
||||
int count = 0;
|
||||
string strcontentlength = "";
|
||||
int contentlength = 0;
|
||||
int bytesread = 0;
|
||||
// chunked transfer, first line should contain content length
|
||||
// read stream bytewise until CRLF is detected
|
||||
try
|
||||
{
|
||||
do
|
||||
{
|
||||
count = stream.Read(buff, 0, buff.Length);
|
||||
strcontentlength += Encoding.ASCII.GetString(buff, 0, buff.Length);
|
||||
if (st.ElapsedMilliseconds > timeout)
|
||||
throw new TimeoutException("Connection timed out.");
|
||||
}
|
||||
while (!strcontentlength.Contains("\r\n"));
|
||||
strcontentlength = strcontentlength.Replace("\r\n", "");
|
||||
contentlength = int.Parse(strcontentlength, System.Globalization.NumberStyles.HexNumber);
|
||||
// finished reading all chunks
|
||||
if (contentlength == 0)
|
||||
{
|
||||
Console.WriteLine("Reading chunked content finished");
|
||||
return true;
|
||||
}
|
||||
|
||||
// re-assign buffer
|
||||
buff = new byte[contentlength];
|
||||
|
||||
// read content in 1kByte chunks until contentlength is reached
|
||||
while (bytesread < contentlength)
|
||||
{
|
||||
int bytestoread = buff.Length - bytesread;
|
||||
if (bytestoread > buff.Length)
|
||||
bytestoread = buff.Length;
|
||||
bytesread += stream.Read(buff, bytesread, bytestoread);
|
||||
// add it to response
|
||||
if (st.ElapsedMilliseconds > timeout)
|
||||
throw new TimeoutException("Connection timed out.");
|
||||
}
|
||||
resp += Encoding.ASCII.GetString(buff, 0, buff.Length);
|
||||
|
||||
string trailer = "";
|
||||
// reassign buffer
|
||||
buff = new byte[1];
|
||||
// read stream bytewise until CRLFCRLF is detected, should be the next two bytes
|
||||
do
|
||||
{
|
||||
count = stream.Read(buff, 0, buff.Length);
|
||||
trailer += Encoding.ASCII.GetString(buff, 0, buff.Length);
|
||||
if (st.ElapsedMilliseconds > timeout)
|
||||
throw new TimeoutException("Connection timed out.");
|
||||
}
|
||||
while (!trailer.Contains("\r\n"));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("Error while reading chunked content: " + ex.Message);
|
||||
return true;
|
||||
}
|
||||
// Console.WriteLine("Reading chunked content [" + contentlength.ToString() + " bytes]: " + resp);
|
||||
response += resp;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static string DownloadFile(string url, int timeout, string username, string password)
|
||||
{
|
||||
string response = "";
|
||||
Uri uri = null;
|
||||
// try to parse url
|
||||
try
|
||||
{
|
||||
uri = new Uri(url);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ex.Message;
|
||||
}
|
||||
// simple connection
|
||||
if (url.Contains("http:"))
|
||||
{
|
||||
HttpWebRequest webrequest = (HttpWebRequest)HttpWebRequest.Create(url);
|
||||
webrequest.Referer = "http://www.vrs-world.com/";
|
||||
webrequest.Timeout = timeout;
|
||||
webrequest.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0";
|
||||
webrequest.Accept = "application/json, text/javascript, */*;q=0.01";
|
||||
webrequest.AutomaticDecompression = System.Net.DecompressionMethods.Deflate | System.Net.DecompressionMethods.GZip;
|
||||
|
||||
// include authorization if username/password are not empty
|
||||
if (!String.IsNullOrEmpty(username) && !String.IsNullOrEmpty(password))
|
||||
{
|
||||
// Base64 encode username:password
|
||||
string s = Convert.ToBase64String(Encoding.UTF8.GetBytes(username + ":" + password));
|
||||
webrequest.Headers.Add("Authorization: Basic " + s);
|
||||
}
|
||||
|
||||
Console.WriteLine("[VRSWebFeed]: Getting web response");
|
||||
HttpWebResponse webresponse = (HttpWebResponse)webrequest.GetResponse();
|
||||
Console.WriteLine("[VRSWebFeed]: Reading stream");
|
||||
|
||||
using (StreamReader sr = new StreamReader(webresponse.GetResponseStream()))
|
||||
{
|
||||
response = sr.ReadToEnd();
|
||||
}
|
||||
}
|
||||
// using SSL for connection
|
||||
else
|
||||
{
|
||||
// create new TCP-Client
|
||||
using (var client = new TcpClient(uri.Host, uri.Port))
|
||||
{
|
||||
var sr = new SecureRandom();
|
||||
var cl = new VRSTlsClient(uri.Host);
|
||||
var protocol = new TlsClientProtocol(client.GetStream(), sr);
|
||||
protocol.Connect(cl);
|
||||
|
||||
using (var stream = protocol.Stream)
|
||||
{
|
||||
var hdr = new StringBuilder();
|
||||
hdr.AppendLine("GET " + uri.PathAndQuery + " HTTP/1.1");
|
||||
hdr.AppendLine("Host: " + uri.Host);
|
||||
hdr.AppendLine("Content-Type: text/json; charset=utf-8");
|
||||
hdr.AppendLine("Connection: close");
|
||||
|
||||
// include authorization if username/password are not empty
|
||||
if (!String.IsNullOrEmpty(username) && !String.IsNullOrEmpty(password))
|
||||
{
|
||||
// Base64 encode username:password
|
||||
string s = Convert.ToBase64String(Encoding.UTF8.GetBytes(username + ":" + password));
|
||||
hdr.AppendLine("Authorization: Basic " + s);
|
||||
}
|
||||
hdr.AppendLine();
|
||||
|
||||
var dataToSend = Encoding.ASCII.GetBytes(hdr.ToString());
|
||||
|
||||
stream.Write(dataToSend, 0, dataToSend.Length);
|
||||
|
||||
byte[] buff;
|
||||
// set stop watch as timout
|
||||
Stopwatch st = new Stopwatch();
|
||||
st.Start();
|
||||
//read header bytewise
|
||||
string header = "";
|
||||
int totalRead = 0;
|
||||
buff = new byte[1];
|
||||
do
|
||||
{
|
||||
totalRead = stream.Read(buff, 0, buff.Length);
|
||||
header += Encoding.ASCII.GetString(buff);
|
||||
if (st.ElapsedMilliseconds > timeout)
|
||||
throw new TimeoutException("Connection to " + url + " timed out.");
|
||||
}
|
||||
while (!header.Contains("\r\n\r\n"));
|
||||
Console.Write(header);
|
||||
int contentlength = 0;
|
||||
if (header.Contains("Transfer-Encoding: chunked"))
|
||||
{
|
||||
// chunked transfer, read all chunks until complete
|
||||
while (!ReadChunkedContent(stream, timeout, ref response))
|
||||
{ }
|
||||
}
|
||||
else
|
||||
{
|
||||
// get content length from header
|
||||
Regex rcontentlength = new Regex("(?<=Content-Length:\\s)\\d+", RegexOptions.IgnoreCase);
|
||||
contentlength = int.Parse(rcontentlength.Match(header).Value);
|
||||
ReadContent(stream, contentlength, timeout, ref response);
|
||||
}
|
||||
st.Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
class MyTlsAuthentication : TlsAuthentication
|
||||
{
|
||||
public TlsCredentials GetClientCredentials(CertificateRequest certificateRequest)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public void NotifyServerCertificate(Certificate serverCertificate)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,941 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Reflection;
|
||||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
using AirScout.PlaneFeeds.Plugin.MEFContract;
|
||||
using System.Net;
|
||||
using System.IO;
|
||||
using System.Security.Cryptography;
|
||||
using System.Xml.Serialization;
|
||||
using System.Xml.Linq;
|
||||
using System.ComponentModel.Composition;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace AirScout.PlaneFeeds.Plugin.VRSWebServer
|
||||
{
|
||||
|
||||
public class VRSWebServerServerSettings
|
||||
{
|
||||
|
||||
[Browsable(false)]
|
||||
[DefaultValue("")]
|
||||
[XmlIgnore]
|
||||
public string DisclaimerAccepted { get; set; }
|
||||
|
||||
[Browsable(true)]
|
||||
[CategoryAttribute("Web Feed")]
|
||||
[DescriptionAttribute("Save downloaded JSON to file")]
|
||||
[DefaultValue(false)]
|
||||
[XmlIgnore]
|
||||
public bool SaveToFile { get; set; }
|
||||
|
||||
[Browsable(true)]
|
||||
[CategoryAttribute("Web Feed")]
|
||||
[DescriptionAttribute("Base URL for website.")]
|
||||
[DefaultValue("http://localhost:7780/VirtualRadar/AircraftList.json?ldv=%LASTDV%&stm=%UNIXTIME%&lat=%MYLAT%&lng=%MYLON%&fDstL=%MINDISTKM%&fDstU=%MAXDISTKM%&fAltL=%MINALTFT%&fAltU=%MAXALTFT%")]
|
||||
public string URL { get; set; }
|
||||
|
||||
[Browsable(true)]
|
||||
[CategoryAttribute("Web Feed")]
|
||||
[DescriptionAttribute("Username for Authentication (blank for anonymous)")]
|
||||
[DefaultValue("")]
|
||||
public string Username { get; set; }
|
||||
|
||||
[Browsable(true)]
|
||||
[CategoryAttribute("Web Feed")]
|
||||
[DescriptionAttribute("Password for Authentication (blank for anonymous)")]
|
||||
[DefaultValue("")]
|
||||
[PasswordPropertyText(true)]
|
||||
public string Password { get; set; }
|
||||
|
||||
[Browsable(true)]
|
||||
[CategoryAttribute("Web Feed (redundant)")]
|
||||
[DescriptionAttribute("Base URL for redundant website.")]
|
||||
public string URL2 { get; set; }
|
||||
|
||||
[Browsable(true)]
|
||||
[CategoryAttribute("Web Feed (redundant)")]
|
||||
[DescriptionAttribute("Username for redundant Authentication (blank for anonymous)")]
|
||||
[DefaultValue("")]
|
||||
public string Username2 { get; set; }
|
||||
|
||||
[Browsable(true)]
|
||||
[CategoryAttribute("Web Feed (redundant)")]
|
||||
[DescriptionAttribute("Password for redundant Authentication (blank for anonymous)")]
|
||||
[DefaultValue("")]
|
||||
[PasswordPropertyText(true)]
|
||||
public string Password2 { get; set; }
|
||||
|
||||
[Browsable(true)]
|
||||
[CategoryAttribute("Web Feed (redundant)")]
|
||||
[DescriptionAttribute("Share load between both redundant servers")]
|
||||
[DefaultValue(true)]
|
||||
public bool LoadShare { get; set; }
|
||||
|
||||
[Browsable(true)]
|
||||
[CategoryAttribute("Web Feed")]
|
||||
[DescriptionAttribute("Use geometric altitude from GPS rather than barometric")]
|
||||
[DefaultValue(false)]
|
||||
public bool UseGeoAlt { get; set; }
|
||||
|
||||
[Browsable(true)]
|
||||
[CategoryAttribute("Web Feed")]
|
||||
[DescriptionAttribute("Timeout for loading the site.")]
|
||||
[DefaultValue(30)]
|
||||
[XmlIgnore]
|
||||
public int Timeout { get; set; }
|
||||
|
||||
public VRSWebServerServerSettings()
|
||||
{
|
||||
Default();
|
||||
Load(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets all properties to their default value according to the [DefaultValue=] attribute
|
||||
/// </summary>
|
||||
public void Default()
|
||||
{
|
||||
// set all properties to their default values according to definition in [DeafultValue=]
|
||||
foreach (var p in this.GetType().GetProperties())
|
||||
{
|
||||
try
|
||||
{
|
||||
// initialize all properties with default value if set
|
||||
if (Attribute.IsDefined(p, typeof(DefaultValueAttribute)))
|
||||
{
|
||||
p.SetValue(this, ((DefaultValueAttribute)Attribute.GetCustomAttribute(
|
||||
p, typeof(DefaultValueAttribute)))?.Value, null);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Cannot set default value of: " + p.Name + ", " + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Loads settings from a XML-formatted configuration file into settings.
|
||||
/// </summary>
|
||||
/// <param name="loadall">If true, ignore the [XmlIgnore] attribute, e.g. load all settings available in the file.<br>If false, load only settings without [XmlIgore] attrbute.</br></param>
|
||||
/// <param name="filename">The filename of the settings file.</param>
|
||||
public void Load(bool loadall, string filename = "")
|
||||
{
|
||||
// use standard filename if empty
|
||||
// be careful because Linux file system is case sensitive
|
||||
if (String.IsNullOrEmpty(filename))
|
||||
filename = new Uri(Assembly.GetExecutingAssembly().GetName().CodeBase.Replace(".dll", ".cfg").Replace(".DLL", ".CFG")).LocalPath;
|
||||
// do nothing if file not exists
|
||||
if (!File.Exists(filename))
|
||||
return;
|
||||
try
|
||||
{
|
||||
string xml = "";
|
||||
using (StreamReader sr = new StreamReader(File.OpenRead(filename)))
|
||||
{
|
||||
xml = sr.ReadToEnd();
|
||||
}
|
||||
XDocument xdoc = XDocument.Parse(xml);
|
||||
PropertyInfo[] properties = this.GetType().GetProperties();
|
||||
foreach (PropertyInfo p in properties)
|
||||
{
|
||||
if (!loadall)
|
||||
{
|
||||
// check on XmlIgnore attribute, skip if set
|
||||
object[] attr = p.GetCustomAttributes(typeof(XmlIgnoreAttribute), false);
|
||||
if (attr.Length > 0)
|
||||
continue;
|
||||
}
|
||||
try
|
||||
{
|
||||
// get matching element
|
||||
XElement typenode = xdoc.Element(this.GetType().Name);
|
||||
if (typenode != null)
|
||||
{
|
||||
XElement element = typenode.Element(p.Name);
|
||||
if (element != null)
|
||||
{
|
||||
// fix issues with URL in V1.4.0.0 --> do not load URL from file if not containing filters
|
||||
if ((p.Name != "URL") || (element.Value.ToString().Contains("?")))
|
||||
{
|
||||
p.SetValue(this, Convert.ChangeType(element.Value, p.PropertyType), null);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Ignoring property URL do to version conflict: " + element.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Error while loading property[" + p.Name + " from " + filename + ", " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Cannot load settings from " + filename + ", " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Saves settings from settings into a XML-formatted configuration file
|
||||
/// </summary>
|
||||
/// <param name="saveall">If true, ignore the [XmlIgnore] attribute, e.g. save all settings.<br>If false, save only settings without [XmlIgore] attrbute.</param>
|
||||
/// <param name="filename">The filename of the settings file.</param>
|
||||
public void Save(bool saveall, string filename = "")
|
||||
{
|
||||
// use standard filename if empty
|
||||
// be careful because Linux file system is case sensitive
|
||||
if (String.IsNullOrEmpty(filename))
|
||||
filename = new Uri(Assembly.GetExecutingAssembly().GetName().CodeBase.Replace(".dll", ".cfg").Replace(".DLL", ".CFG")).LocalPath;
|
||||
XmlAttributeOverrides overrides = new XmlAttributeOverrides();
|
||||
if (saveall)
|
||||
{
|
||||
// ovverride the XmlIgnore attributes to get all serialized
|
||||
PropertyInfo[] properties = this.GetType().GetProperties();
|
||||
foreach (PropertyInfo p in properties)
|
||||
{
|
||||
XmlAttributes attribs = new XmlAttributes { XmlIgnore = false };
|
||||
overrides.Add(this.GetType(), p.Name, attribs);
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
using (StreamWriter sw = new StreamWriter(File.Create(filename)))
|
||||
{
|
||||
XmlSerializer s = new XmlSerializer(this.GetType(), overrides);
|
||||
s.Serialize(sw, this);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new InvalidOperationException("[" + this.GetType().Name + "]: Cannot save settings to " + filename + ", " + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Export(typeof(IPlaneFeedPlugin))]
|
||||
[ExportMetadata("Name", "PlaneFeedPlugin")]
|
||||
public class VRSWebServerPlugin : IPlaneFeedPlugin
|
||||
{
|
||||
private VRSWebServerServerSettings Settings = new VRSWebServerServerSettings();
|
||||
|
||||
VirtualRadar.Interface.WebSite.AircraftListJson AircraftList = null;
|
||||
|
||||
// last data version
|
||||
private string LastDV { get; set; } = "";
|
||||
|
||||
// Load share counter
|
||||
long Count1 = 0;
|
||||
long Count2 = 0;
|
||||
|
||||
|
||||
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return "[WebFeed] VRS Web Server";
|
||||
}
|
||||
}
|
||||
|
||||
public string Info
|
||||
{
|
||||
get
|
||||
{
|
||||
return "Web feed from Virtual Radar Server\n\n" +
|
||||
"(c) AirScout(www.airscout.eu)\n\n" +
|
||||
"Gets either single or aggrated feed\n" +
|
||||
"from a local or remote VRS instance.\n" +
|
||||
"Be sure to select the desired feed as\n" +
|
||||
"the default web server feed in the\n" +
|
||||
"VRS Web server settings.\n\n" +
|
||||
"See https://www.virtualradarserver.co.uk \n" +
|
||||
"for details.\n\n" +
|
||||
"Change hostname and/or port to your needs\n" +
|
||||
"when getting data from a remote server.\n\n" +
|
||||
"If the access is restricted, you can\n" +
|
||||
"enter username and password here.\n\n" +
|
||||
"";
|
||||
}
|
||||
}
|
||||
|
||||
public string Version
|
||||
{
|
||||
get
|
||||
{
|
||||
return Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasSettings
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public bool CanImport
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool CanExport
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public string Disclaimer
|
||||
{
|
||||
get
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
public string DisclaimerAccepted
|
||||
{
|
||||
get
|
||||
{
|
||||
return Settings.DisclaimerAccepted;
|
||||
}
|
||||
set
|
||||
{
|
||||
Settings.DisclaimerAccepted = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void ResetSettings()
|
||||
{
|
||||
Settings.Default();
|
||||
}
|
||||
|
||||
public void LoadSettings()
|
||||
{
|
||||
Settings.Load(true);
|
||||
}
|
||||
|
||||
public void SaveSettings()
|
||||
{
|
||||
Settings.Save(true);
|
||||
}
|
||||
|
||||
public object GetSettings()
|
||||
{
|
||||
return this.Settings;
|
||||
}
|
||||
|
||||
public void ImportSettings()
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
public void ExportSettings()
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
public void Start(PlaneFeedPluginArgs args)
|
||||
{
|
||||
// reset counters
|
||||
Count1 = 0;
|
||||
Count2 = 0;
|
||||
}
|
||||
|
||||
public PlaneFeedPluginPlaneInfoList GetPlanes(PlaneFeedPluginArgs args)
|
||||
{
|
||||
// intialize variables
|
||||
VarConverter VC = new VarConverter();
|
||||
VC.AddVar("APPDIR", args.AppDirectory);
|
||||
VC.AddVar("DATADIR", args.AppDataDirectory);
|
||||
VC.AddVar("LOGDIR", args.LogDirectory);
|
||||
VC.AddVar("DATABASEDIR", args.DatabaseDirectory);
|
||||
VC.AddVar("MINLAT", args.MinLat);
|
||||
VC.AddVar("MAXLAT", args.MaxLat);
|
||||
VC.AddVar("MINLON", args.MinLon);
|
||||
VC.AddVar("MAXLON", args.MaxLon);
|
||||
VC.AddVar("MINALTM", args.MinAlt);
|
||||
VC.AddVar("MAXALTM", args.MaxAlt);
|
||||
VC.AddVar("MINALTFT", (int)UnitConverter.m_ft((double)args.MinAlt));
|
||||
VC.AddVar("MAXALTFT", (int)UnitConverter.m_ft((double)args.MaxAlt));
|
||||
VC.AddVar("UNIXTIME", SupportFunctions.DateTimeToUNIXTime(DateTime.UtcNow));
|
||||
|
||||
// calculate Max/Min distance for filter
|
||||
VC.AddVar("MYLAT", args.MyLat);
|
||||
VC.AddVar("MYLON", args.MyLon);
|
||||
|
||||
double mindist = 0;
|
||||
double maxdist = 0;
|
||||
|
||||
// check the distance between MyLocation and edges of rect and take the maximum
|
||||
maxdist = Math.Max(maxdist, LatLon.Distance(args.MyLat, args.MyLon, args.MinLat, args.MinLon));
|
||||
maxdist = Math.Max(maxdist, LatLon.Distance(args.MyLat, args.MyLon, args.MaxLat, args.MinLon));
|
||||
maxdist = Math.Max(maxdist, LatLon.Distance(args.MyLat, args.MyLon, args.MinLat, args.MaxLon));
|
||||
maxdist = Math.Max(maxdist, LatLon.Distance(args.MyLat, args.MyLon, args.MaxLat, args.MaxLon));
|
||||
|
||||
VC.AddVar("MINDISTKM", mindist);
|
||||
VC.AddVar("MAXDISTKM", maxdist);
|
||||
|
||||
VC.AddVar("LASTDV", LastDV);
|
||||
|
||||
// initialize plane info list
|
||||
PlaneFeedPluginPlaneInfoList planes = new PlaneFeedPluginPlaneInfoList();
|
||||
|
||||
string url = "";
|
||||
string json = "";
|
||||
|
||||
// if redundant servers --> calculate url according to redundancy and load sharing
|
||||
if (!String.IsNullOrEmpty(Settings.URL2))
|
||||
{
|
||||
if (!Settings.LoadShare)
|
||||
{
|
||||
// no load sharing --> use URL1 by default, use URL2 if anything goes wrong
|
||||
try
|
||||
{
|
||||
DateTime start1 = DateTime.UtcNow;
|
||||
|
||||
url = VC.ReplaceAllVars(Settings.URL);
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Mode=REDUNDANCY, LoadShare=OFF");
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Creating web request: " + url);
|
||||
|
||||
// get JSON data
|
||||
json = VRSTlsClient.DownloadFile(url, Settings.Timeout * 1000, Settings.Username, Settings.Password);
|
||||
|
||||
// aggregate loading time
|
||||
Count1 += (long)(DateTime.UtcNow - start1).Milliseconds;
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
DateTime start2 = DateTime.UtcNow;
|
||||
|
||||
url = VC.ReplaceAllVars(Settings.URL2);
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Mode=REDUNDANCY, LoadShare=OFF");
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Creating web request: " + url);
|
||||
|
||||
// get JSON data
|
||||
json = VRSTlsClient.DownloadFile(url, Settings.Timeout * 1000, Settings.Username, Settings.Password);
|
||||
|
||||
// aggregate loading time
|
||||
Count2 += (long)(DateTime.UtcNow - start2).Milliseconds;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// load sharing --> use URL with lowest overall loading time first, use the other if anything goes wrong
|
||||
if (Count1 <= Count2)
|
||||
{
|
||||
try
|
||||
{
|
||||
DateTime start1 = DateTime.UtcNow;
|
||||
|
||||
url = VC.ReplaceAllVars(Settings.URL);
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Mode=REDUNDANCY, LoadShare=ON, Count1=" + Count1.ToString() + ",Count2=" + Count2.ToString());
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Creating web request: " + url);
|
||||
|
||||
// get JSON data
|
||||
json = VRSTlsClient.DownloadFile(url, Settings.Timeout * 1000, Settings.Username, Settings.Password);
|
||||
|
||||
// aggregate loading time
|
||||
Count1 += (long)(DateTime.UtcNow - start1).Milliseconds;
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
DateTime start2 = DateTime.UtcNow;
|
||||
|
||||
url = VC.ReplaceAllVars(Settings.URL2);
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Mode=REDUNDANCY, LoadShare=ON, Count1=" + Count1.ToString() + ",Count2=" + Count2.ToString());
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Creating web request: " + url);
|
||||
|
||||
// get JSON data
|
||||
json = VRSTlsClient.DownloadFile(url, Settings.Timeout * 1000, Settings.Username2, Settings.Password2);
|
||||
|
||||
// aggregate loading time
|
||||
Count2 += (long)(DateTime.UtcNow - start2).Milliseconds;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
DateTime start2 = DateTime.UtcNow;
|
||||
|
||||
url = VC.ReplaceAllVars(Settings.URL2);
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Mode=REDUNDANCY, LoadShare=ON, Count1=" + Count1.ToString() + ",Count2=" + Count2.ToString());
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Creating web request: " + url);
|
||||
|
||||
// get JSON data
|
||||
json = VRSTlsClient.DownloadFile(url, Settings.Timeout * 1000, Settings.Username2, Settings.Password2);
|
||||
|
||||
// aggregate loading time
|
||||
Count2 += (long)(DateTime.UtcNow - start2).Milliseconds;
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
DateTime start1 = DateTime.UtcNow;
|
||||
|
||||
url = VC.ReplaceAllVars(Settings.URL);
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Mode=REDUNDANCY, LoadShare=ON, Count1=" + Count1.ToString() + ",Count2=" + Count2.ToString());
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Creating web request: " + url);
|
||||
|
||||
// get JSON data
|
||||
json = VRSTlsClient.DownloadFile(url, Settings.Timeout * 1000, Settings.Username, Settings.Password);
|
||||
|
||||
// aggregate loading time
|
||||
Count1 += (long)(DateTime.UtcNow - start1).Milliseconds;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// no redundancy --> simple load from URL1
|
||||
|
||||
// reset counters
|
||||
Count1 = 0;
|
||||
Count2 = 0;
|
||||
|
||||
url = VC.ReplaceAllVars(Settings.URL);
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Mode=SIMPLE");
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Creating web request: " + url);
|
||||
|
||||
// get JSON data
|
||||
json = VRSTlsClient.DownloadFile(url, Settings.Timeout * 1000, Settings.Username, Settings.Password);
|
||||
|
||||
}
|
||||
|
||||
// save raw data to file if enabled
|
||||
if (Settings.SaveToFile)
|
||||
{
|
||||
using (StreamWriter sw = new StreamWriter(args.TmpDirectory + Path.DirectorySeparatorChar + this.GetType().Name + "_" + DateTime.UtcNow.ToString("yyyy-MM-dd HH_mm_ss") + ".json"))
|
||||
{
|
||||
sw.WriteLine(json);
|
||||
}
|
||||
}
|
||||
|
||||
// reset counters if before getting too near to overflow
|
||||
if ((Count1 > long.MaxValue / 2) || (Count2 > long.MaxValue / 2))
|
||||
{
|
||||
Count1 = 0;
|
||||
Count2 = 0;
|
||||
}
|
||||
|
||||
bool writetofile = false;
|
||||
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Analyzing data");
|
||||
try
|
||||
{
|
||||
// deserialize JSON
|
||||
AircraftList = JsonConvert.DeserializeObject<VirtualRadar.Interface.WebSite.AircraftListJson>(json);
|
||||
|
||||
// keep latest data version
|
||||
LastDV = AircraftList.LastDataVersion;
|
||||
|
||||
// get planes
|
||||
foreach (VirtualRadar.Interface.WebSite.AircraftJson ac in AircraftList.Aircraft)
|
||||
{
|
||||
try
|
||||
{
|
||||
PlaneFeedPluginPlaneInfo plane = new PlaneFeedPluginPlaneInfo();
|
||||
// get hex first
|
||||
plane.Hex = ac.Icao24.Trim().Replace("\"", "");
|
||||
// get position
|
||||
plane.Lat = (ac.Latitude == null) ? double.NaN : (double)ac.Latitude;
|
||||
plane.Lon = (ac.Longitude == null) ? double.NaN : (double)ac.Longitude;
|
||||
// get altitude
|
||||
if (Settings.UseGeoAlt)
|
||||
{
|
||||
plane.Alt = (ac.GeometricAltitude == null) ? int.MinValue : (int)ac.GeometricAltitude;
|
||||
}
|
||||
else
|
||||
{
|
||||
plane.Alt = (ac.Altitude == null) ? int.MinValue : (int)ac.Altitude;
|
||||
}
|
||||
// get callsign
|
||||
plane.Call = ac.Callsign;
|
||||
// get registration
|
||||
plane.Reg = ac.Registration;
|
||||
// get track
|
||||
plane.Track = (ac.Track == null) ? double.NaN : (double)ac.Track;
|
||||
// get speed
|
||||
plane.Speed = (ac.GroundSpeed == null) ? double.NaN : (double)ac.GroundSpeed;
|
||||
// get position timestamp
|
||||
// CAUTION!! time is UNIX time in milliseconds
|
||||
long l = (ac.PositionTime == null) ? long.MinValue : (long)ac.PositionTime;
|
||||
if (l != long.MinValue)
|
||||
{
|
||||
DateTime timestamp = new System.DateTime(1970, 1, 1, 0, 0, 0, 0);
|
||||
timestamp = timestamp.AddMilliseconds(l);
|
||||
plane.Time = timestamp;
|
||||
}
|
||||
else
|
||||
{
|
||||
// skip plane if no valid timestamp found
|
||||
continue;
|
||||
}
|
||||
// get type info
|
||||
plane.Type = ac.Type;
|
||||
// get extended plane type info
|
||||
plane.Manufacturer = ac.Manufacturer;
|
||||
plane.Model = ac.Model;
|
||||
int cat = (ac.WakeTurbulenceCategory == null) ? int.MinValue : (int)ac.WakeTurbulenceCategory;
|
||||
switch (cat)
|
||||
{
|
||||
case 1: plane.Category = 1; break;
|
||||
case 2: plane.Category = 2; break;
|
||||
case 3: plane.Category = 3; break;
|
||||
case 4: plane.Category = 4; break;
|
||||
default: plane.Category = 0; break;
|
||||
}
|
||||
// do correction of A380 as "SuperHeavy" is not supported
|
||||
if (plane.Type == "A388")
|
||||
plane.Category = 4;
|
||||
// get country
|
||||
plane.Country = ac.Icao24Country;
|
||||
// get departure airport
|
||||
plane.From = ac.Origin;
|
||||
// get destination airport
|
||||
plane.To = ac.Destination;
|
||||
// get vertical speed
|
||||
plane.VSpeed = (ac.VerticalRate == null) ? int.MinValue : (int)ac.VerticalRate;
|
||||
|
||||
if (String.IsNullOrEmpty(plane.Reg))
|
||||
{
|
||||
writetofile = true;
|
||||
}
|
||||
|
||||
// add plane to list
|
||||
planes.Add(plane);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("[" + System.Reflection.MethodBase.GetCurrentMethod().Name + "]" + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// do nothing if something else goes wrong
|
||||
}
|
||||
Console.WriteLine("[" + this.GetType().Name + "]: Returning " + planes.Count + " planes");
|
||||
|
||||
return planes;
|
||||
|
||||
}
|
||||
|
||||
public void Stop(PlaneFeedPluginArgs args)
|
||||
{
|
||||
Settings.Save(true);
|
||||
}
|
||||
|
||||
|
||||
// end of Interface
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Decodes an OpenSSL-encrypted (AES256-CBC) string<br></br><br></br>
|
||||
/// The equivalent encoding in PHP is like:<br></br><br></br>
|
||||
/// $encrypt_method = "AES-256-CBC";<br></br>
|
||||
/// $secret_key = hash('md5',$key);<br></br>
|
||||
/// $encoded = openssl_encrypt($data, $encrypt_method, $secret_key);
|
||||
/// </summary>
|
||||
/// <param name="encrypteddata">The encrypted string (Base64 encoded).</param>
|
||||
/// <param name="pwd">The password as a string.</param>
|
||||
/// <returns></returns>
|
||||
public static string OpenSSLDecrypt(string encrypteddata, string pwd)
|
||||
{
|
||||
// create a 32bit MD5 hash of the password
|
||||
var hash = MD5.Create().ComputeHash(Encoding.UTF8.GetBytes(pwd));
|
||||
StringBuilder sb = new StringBuilder();
|
||||
// Loop through each byte of the hashed data
|
||||
// and format each one as a hexadecimal string.
|
||||
for (int i = 0; i < hash.Length; i++)
|
||||
{
|
||||
sb.Append(hash[i].ToString("x2"));
|
||||
}
|
||||
// use the MD5 hash as the key
|
||||
byte[] key = Encoding.UTF8.GetBytes(sb.ToString());
|
||||
//get the encrypted data as byte[]
|
||||
byte[] encrypted = Convert.FromBase64String(encrypteddata);
|
||||
//setup an empty iv
|
||||
var iv = new byte[16];
|
||||
// Declare the RijndaelManaged object used to decrypt the data.
|
||||
RijndaelManaged aesAlg = null;
|
||||
|
||||
// Declare the string used to hold the decrypted text.
|
||||
string decrypted;
|
||||
|
||||
// Create a RijndaelManaged object
|
||||
// with the specified key and IV.
|
||||
aesAlg = new RijndaelManaged { Mode = CipherMode.CBC, Padding = PaddingMode.PKCS7, KeySize = 256, BlockSize = 128, Key = key, IV = iv };
|
||||
|
||||
// Create a decrytor to perform the stream transform.
|
||||
ICryptoTransform decryptor = aesAlg.CreateDecryptor(aesAlg.Key, aesAlg.IV);
|
||||
// Create the streams used for decryption.
|
||||
using (MemoryStream ms = new MemoryStream(encrypted))
|
||||
{
|
||||
using (CryptoStream cs = new CryptoStream(ms, decryptor, CryptoStreamMode.Read))
|
||||
{
|
||||
using (StreamReader sr = new StreamReader(cs))
|
||||
{
|
||||
// Read the decrypted bytes from the decrypting stream
|
||||
// and place them in a string.
|
||||
decrypted = sr.ReadToEnd();
|
||||
sr.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
// return decrypted string
|
||||
return decrypted;
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCode]
|
||||
private string ReadPropertyString(dynamic o, string propertyname)
|
||||
{
|
||||
string s = null;
|
||||
try
|
||||
{
|
||||
s = o[propertyname];
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCode]
|
||||
private int ReadPropertyInt(dynamic o, string propertyname)
|
||||
{
|
||||
int i = int.MinValue;
|
||||
double d = ReadPropertyDouble(o, propertyname);
|
||||
if ((d != double.MinValue) && (d >= int.MinValue) && (d <= int.MaxValue))
|
||||
i = (int)d;
|
||||
return i;
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCode]
|
||||
private double ReadPropertyDouble(dynamic o, string propertyname)
|
||||
{
|
||||
double d = double.MinValue;
|
||||
try
|
||||
{
|
||||
string s = o[propertyname].ToString(CultureInfo.InvariantCulture);
|
||||
d = double.Parse(s, CultureInfo.InvariantCulture);
|
||||
}
|
||||
catch
|
||||
{
|
||||
// do nothing if something went wrong
|
||||
}
|
||||
return d;
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCode]
|
||||
private long ReadPropertyLong(dynamic o, string propertyname)
|
||||
{
|
||||
long l = long.MinValue;
|
||||
try
|
||||
{
|
||||
l = o[propertyname];
|
||||
}
|
||||
catch
|
||||
{
|
||||
// do nothing if something went wrong
|
||||
}
|
||||
return l;
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCode]
|
||||
private bool ReadPropertyBool(dynamic o, string propertyname)
|
||||
{
|
||||
bool b = false;
|
||||
try
|
||||
{
|
||||
string s = o[propertyname].ToString();
|
||||
b = s.ToLower() == "true";
|
||||
}
|
||||
catch
|
||||
{
|
||||
// do nothing if something went wrong
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// //////////////////////////////////////////// Helpers ////////////////////////////////////////////
|
||||
/// </summary>
|
||||
|
||||
public static class SupportFunctions
|
||||
{
|
||||
public static int DateTimeToUNIXTime(DateTime dt)
|
||||
{
|
||||
if (dt == DateTime.MinValue)
|
||||
return int.MinValue;
|
||||
else if (dt == DateTime.MaxValue)
|
||||
return int.MaxValue;
|
||||
return (Int32)(dt.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class LatLon
|
||||
{
|
||||
public class Earth
|
||||
{
|
||||
public static double Radius = 6371;
|
||||
}
|
||||
|
||||
public static double Distance(double mylat, double mylon, double lat, double lon)
|
||||
{
|
||||
double R = Earth.Radius;
|
||||
double dLat = (mylat - lat);
|
||||
double dLon = (mylon - lon);
|
||||
double a = Math.Sin(dLat / 180 * Math.PI / 2) * Math.Sin(dLat / 180 * Math.PI / 2) +
|
||||
Math.Sin(dLon / 180 * Math.PI / 2) * Math.Sin(dLon / 180 * Math.PI / 2) * Math.Cos(mylat / 180 * Math.PI) * Math.Cos(lat / 180 * Math.PI);
|
||||
return R * 2 * Math.Atan2(Math.Sqrt(a), Math.Sqrt(1 - a));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
public static class UnitConverter
|
||||
{
|
||||
public static double ft_m(double feet)
|
||||
{
|
||||
return feet / 3.28084;
|
||||
}
|
||||
|
||||
public static double m_ft(double m)
|
||||
{
|
||||
return m * 3.28084;
|
||||
}
|
||||
|
||||
public static double kts_kmh(double kts)
|
||||
{
|
||||
return kts * 1.852;
|
||||
}
|
||||
|
||||
public static double kmh_kts(double kmh)
|
||||
{
|
||||
return kmh / 1.852;
|
||||
}
|
||||
|
||||
public static double km_mi(double km)
|
||||
{
|
||||
return km * 1.609;
|
||||
}
|
||||
|
||||
public static double mi_km(double mi)
|
||||
{
|
||||
return mi / 1.609;
|
||||
}
|
||||
}
|
||||
|
||||
public class VarConverter : Dictionary<string, object>
|
||||
{
|
||||
public readonly char VarSeparator = '%';
|
||||
|
||||
public void AddVar(string var, object value)
|
||||
{
|
||||
// adds a new var<>value pair to dictionary
|
||||
object o;
|
||||
if (this.TryGetValue(var, out o))
|
||||
{
|
||||
// item found --> update value
|
||||
o = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
// item not found --> add new
|
||||
this.Add(var, value);
|
||||
}
|
||||
}
|
||||
|
||||
public object GetValue(string var)
|
||||
{
|
||||
// finds a var in dictionary and returns its value
|
||||
object o;
|
||||
if (this.TryGetValue(var, out o))
|
||||
{
|
||||
// item found --> return value
|
||||
return o;
|
||||
}
|
||||
// item not found --> return null
|
||||
return null;
|
||||
}
|
||||
|
||||
public string ReplaceAllVars(string s)
|
||||
{
|
||||
// check for var separotors first
|
||||
if (s.Contains(VarSeparator))
|
||||
{
|
||||
// OK, string is containing vars --> crack the string first and replace vars
|
||||
try
|
||||
{
|
||||
string[] a = s.Split(VarSeparator);
|
||||
// as we are always using a pair of separators the length of a[] must be odd
|
||||
if (a.Length % 2 == 0)
|
||||
throw new ArgumentException("Number of separators is not an even number.");
|
||||
// create new string and replace all vars (on odd indices)
|
||||
s = "";
|
||||
for (int i = 0; i < a.Length; i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
// cannot be not a var on that position
|
||||
s = s + a[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
// var identifier: upper the string and try to convert
|
||||
a[i] = a[i].ToUpper();
|
||||
object o;
|
||||
if (this.TryGetValue(a[i], out o))
|
||||
{
|
||||
// convert floating points with invariant culture info
|
||||
if (o.GetType() == typeof(double))
|
||||
s = s + ((double)o).ToString(CultureInfo.InvariantCulture);
|
||||
else if (o.GetType() == typeof(float))
|
||||
s = s + ((float)o).ToString(CultureInfo.InvariantCulture);
|
||||
else
|
||||
s = s + o.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new ArgumentException("Var identifier not found: " + a[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// throw an excecption
|
||||
throw new ArgumentException("Error while parsing string for variables [" + ex.Message + "]: " + s);
|
||||
}
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="AirScout.PlaneFeeds.Plugin.PlaneFinder.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<userSettings>
|
||||
<AirScout.PlaneFeeds.Plugin.PlaneFinder.Properties.Settings>
|
||||
<setting name="Info" serializeAs="String">
|
||||
<value>Web feed from www.planefinder.net
|
||||
See https://planefinder.net/
|
||||
|
||||
(c) AirScout (www.airscout.eu)
|
||||
|
||||
This feed does not require a login or API key.
|
||||
</value>
|
||||
</setting>
|
||||
<setting name="Name" serializeAs="String">
|
||||
<value>[WebFeed] www.planefinder.net</value>
|
||||
</setting>
|
||||
<setting name="Disclaimer" serializeAs="String">
|
||||
<value>This plane feed is being fetched from an Internet server via Deep Link
|
||||
technology (see http://en.wikipedia.org/wiki/Deep_link).
|
||||
|
||||
The use is not intended by the website owners and could be changed in URL and data format frequently and without further notice.
|
||||
Furthermore, it might cause legal issues in some countries.
|
||||
|
||||
By clicking on "Accept" you understand that you are
|
||||
|
||||
DOING THAT ON YOUR OWN RISK
|
||||
|
||||
The auhor of this software will not be responsible in any case.</value>
|
||||
</setting>
|
||||
<setting name="Disclaimer_Accepted" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="URL" serializeAs="String">
|
||||
<value>http://droidapp.pinkfroot.com/APPAPIDROID/v7/planeUpdateFAA.php?routetype=IATA&amp;FAA=1&amp;bounds=%MAXLAT%,%MINLAT%,%MINLON%,%MAXLON%</value>
|
||||
</setting>
|
||||
<setting name="SaveToFile" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="Version" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="HasSettings" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="CanImport" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="CanExport" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="Timeout" serializeAs="String">
|
||||
<value>30</value>
|
||||
</setting>
|
||||
</AirScout.PlaneFeeds.Plugin.PlaneFinder.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="BouncyCastle" version="1.8.9" targetFramework="net40" />
|
||||
<package id="ILMerge" version="3.0.29" targetFramework="net40" />
|
||||
<package id="ILMerge.MSBuild.Task" version="1.0.7" targetFramework="net40" />
|
||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net40" />
|
||||
</packages>
|
|
@ -12,6 +12,7 @@ namespace AirScout.PlaneFeeds.Plugin
|
|||
public string LogDirectory = "";
|
||||
public string TmpDirectory = "";
|
||||
public string DatabaseDirectory = "";
|
||||
public string PlanePositionsDirectory = "";
|
||||
|
||||
public double MaxLat = 0;
|
||||
public double MinLon = 0;
|
||||
|
@ -32,6 +33,8 @@ namespace AirScout.PlaneFeeds.Plugin
|
|||
public string SessionKey;
|
||||
public string GetKeyURL;
|
||||
|
||||
public bool LogPlanePositions = false;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -96,6 +96,7 @@ namespace AirScout.PlaneFeeds
|
|||
feedargs.LogDirectory = Arguments.LogDirectory;
|
||||
feedargs.TmpDirectory = Arguments.TmpDirectory;
|
||||
feedargs.DatabaseDirectory = Arguments.DatabaseDirectory;
|
||||
feedargs.PlanePositionsDirectory = Arguments.PlanePositionsDirectory;
|
||||
feedargs.MaxLat = Arguments.MaxLat;
|
||||
feedargs.MinLon = Arguments.MinLon;
|
||||
feedargs.MinLat = Arguments.MinLat;
|
||||
|
@ -110,6 +111,7 @@ namespace AirScout.PlaneFeeds
|
|||
feedargs.InstanceID = Arguments.InstanceID;
|
||||
feedargs.SessionKey = Arguments.SessionKey;
|
||||
feedargs.GetKeyURL = Arguments.GetKeyURL;
|
||||
feedargs.LogPlanePositions = Arguments.LogPlanePositions;
|
||||
|
||||
// do start procedure
|
||||
Arguments.Feed.Start(feedargs);
|
||||
|
@ -124,9 +126,13 @@ namespace AirScout.PlaneFeeds
|
|||
// get plane raw data and do addtional checks
|
||||
PlaneFeedPluginPlaneInfoList acs = Arguments.Feed.GetPlanes(feedargs);
|
||||
PlaneInfoList planes = new PlaneInfoList();
|
||||
PlaneInfoList invalids = new PlaneInfoList();
|
||||
int total = acs.Count;
|
||||
int count = 0;
|
||||
int errors = 0;
|
||||
double track = 0;
|
||||
double dist = 0;
|
||||
|
||||
foreach (PlaneFeedPluginPlaneInfo ac in acs)
|
||||
{
|
||||
// skip without error when on ground
|
||||
|
@ -167,6 +173,7 @@ namespace AirScout.PlaneFeeds
|
|||
{
|
||||
if (Arguments.LogErrors)
|
||||
Log.WriteMessage("Incorrect aircraft data received [Hex]: " + plane.Hex, LogLevel.Warning);
|
||||
invalids.Add(plane);
|
||||
errors++;
|
||||
continue;
|
||||
}
|
||||
|
@ -174,7 +181,8 @@ namespace AirScout.PlaneFeeds
|
|||
if (ad == null)
|
||||
{
|
||||
if (Arguments.LogErrors)
|
||||
Log.WriteMessage("Incorrect aircraft data received [Hex]: " + plane.Hex, LogLevel.Warning);
|
||||
Log.WriteMessage("Incorrect aircraft data received [Reg]: " + plane.Reg, LogLevel.Warning);
|
||||
invalids.Add(plane);
|
||||
errors++;
|
||||
continue;
|
||||
}
|
||||
|
@ -185,6 +193,7 @@ namespace AirScout.PlaneFeeds
|
|||
{
|
||||
if (Arguments.LogErrors)
|
||||
Log.WriteMessage("Incorrect aircraft data received [Lat]: " + plane.Lat.ToString("F8", CultureInfo.InvariantCulture), LogLevel.Warning);
|
||||
invalids.Add(plane);
|
||||
errors++;
|
||||
continue;
|
||||
}
|
||||
|
@ -196,6 +205,7 @@ namespace AirScout.PlaneFeeds
|
|||
{
|
||||
if (Arguments.LogErrors)
|
||||
Log.WriteMessage("Incorrect aircraft data received [Lon]: " + plane.Lon.ToString("F8", CultureInfo.InvariantCulture), LogLevel.Warning);
|
||||
invalids.Add(plane);
|
||||
errors++;
|
||||
continue;
|
||||
}
|
||||
|
@ -215,6 +225,7 @@ namespace AirScout.PlaneFeeds
|
|||
{
|
||||
if (Arguments.LogErrors)
|
||||
Log.WriteMessage("Incorrect aircraft data received [Alt]: " + plane.Alt.ToString("F8", CultureInfo.InvariantCulture), LogLevel.Warning);
|
||||
invalids.Add(plane);
|
||||
errors++;
|
||||
continue;
|
||||
}
|
||||
|
@ -275,6 +286,7 @@ namespace AirScout.PlaneFeeds
|
|||
{
|
||||
if (Arguments.LogErrors)
|
||||
Log.WriteMessage("Incorrect aircraft data received [Track]: " + plane.Track.ToString("F8", CultureInfo.InvariantCulture), LogLevel.Warning);
|
||||
invalids.Add(plane);
|
||||
errors++;
|
||||
continue;
|
||||
}
|
||||
|
@ -291,6 +303,7 @@ namespace AirScout.PlaneFeeds
|
|||
{
|
||||
if (Arguments.LogErrors)
|
||||
Log.WriteMessage("Incorrect aircraft data received [Speed]: " + plane.Speed.ToString("F8", CultureInfo.InvariantCulture), LogLevel.Warning);
|
||||
invalids.Add(plane);
|
||||
errors++;
|
||||
continue;
|
||||
}
|
||||
|
@ -334,17 +347,118 @@ namespace AirScout.PlaneFeeds
|
|||
// remove manufacturer info if part of model description
|
||||
if (plane.Model.StartsWith(plane.Manufacturer))
|
||||
plane.Model = plane.Model.Remove(0, plane.Manufacturer.Length).Trim();
|
||||
|
||||
// check position against estimated position from last konwn if possible
|
||||
PlaneInfo oldplane = PlanePositions.Get(plane.Hex, plane.Time, 5);
|
||||
double dist = 0;
|
||||
if (Arguments.ExtendedPlausibilityCheck_Enable && (oldplane != null) && ((dist = LatLon.Distance(oldplane.Lat, oldplane.Lon, plane.Lat, plane.Lon)) > Arguments.ExtendedPlausiblityCheck_MaxErrorDist))
|
||||
PlaneInfo estplane = null;
|
||||
PlaneInfo lastplane = null;
|
||||
if (PlanePositions.ContainsKey(plane.Hex))
|
||||
{
|
||||
// report error
|
||||
if (Arguments.LogErrors)
|
||||
Log.WriteMessage("Incorrect aircraft position received [(" + oldplane.Lat.ToString("F8") + "," + oldplane.Lon.ToString("F8") + ")<" + dist.ToString("F0") + "km>(" + plane.Lat.ToString("F8") + "," + plane.Lon.ToString("F8") + ")]: " + plane.ToString(), LogLevel.Warning);
|
||||
errors++;
|
||||
continue;
|
||||
lastplane = PlanePositions[plane.Hex];
|
||||
if ((plane.Time - lastplane.Time).TotalSeconds > 300)
|
||||
lastplane = null;
|
||||
estplane = PlanePositions.Get(plane.Hex, plane.Time, 5);
|
||||
}
|
||||
if (Arguments.ExtendedPlausibilityCheck_Enable && (lastplane != null) && (estplane != null))
|
||||
{
|
||||
// estimate the track value from location change
|
||||
track = LatLon.Bearing(lastplane.Lat, lastplane.Lon, plane.Lat, plane.Lon);
|
||||
|
||||
// estimate the distance between estimated position and reported position
|
||||
dist = LatLon.Distance(estplane.Lat, estplane.Lon, plane.Lat, plane.Lon);
|
||||
|
||||
// Check track
|
||||
if (Math.Abs(((track <= 180) ? track : 360 - track) - ((plane.Track <= 180) ? plane.Track : 360 - plane.Track)) > 45)
|
||||
{
|
||||
|
||||
plane.Track = track;
|
||||
|
||||
// report error
|
||||
if (Arguments.LogErrors)
|
||||
Log.WriteMessage("Incorrect aircraft track received [(" + lastplane.Track.ToString("F0") + "<>" + plane.Track.ToString("F0"), LogLevel.Warning);
|
||||
|
||||
invalids.Add(plane);
|
||||
|
||||
errors++;
|
||||
continue;
|
||||
}
|
||||
|
||||
// check distance
|
||||
if (Math.Abs(dist) > Arguments.ExtendedPlausiblityCheck_MaxErrorDist * (plane.Time - lastplane.Time).TotalMinutes)
|
||||
{
|
||||
Console.WriteLine("[Error " + errors + "] : Distance " + dist);
|
||||
// report error
|
||||
if (Arguments.LogErrors)
|
||||
{
|
||||
invalids.Add(plane);
|
||||
Log.WriteMessage("Incorrect aircraft position received [(" + lastplane.Lat.ToString("F8") + "," + lastplane.Lon.ToString("F8") + ")<" + dist.ToString("F0") + "km>(" + plane.Lat.ToString("F8") + "," + plane.Lon.ToString("F8") + ")]: " + plane.ToString(), LogLevel.Warning);
|
||||
}
|
||||
|
||||
invalids.Add(plane);
|
||||
|
||||
errors++;
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (feedargs.LogPlanePositions)
|
||||
{
|
||||
// extended logging
|
||||
string filename = Path.Combine(feedargs.PlanePositionsDirectory, plane.Hex + ".csv");
|
||||
|
||||
if (!File.Exists(filename))
|
||||
{
|
||||
File.WriteAllText(filename, "Time;TimeD;Hex;Lat;LatD;Lon;LonD;Alt;AltD;Track;TrackD;Speed;SpeedD;Call;Reg;From;To;VSpeed;CalcTrack;CalcDist" + Environment.NewLine);
|
||||
}
|
||||
try
|
||||
{
|
||||
double timed = 0;
|
||||
double latd = 0;
|
||||
double lond = 0;
|
||||
double altd = 0;
|
||||
double spdd = 0;
|
||||
double trkd = 0;
|
||||
|
||||
if (lastplane != null)
|
||||
{
|
||||
timed = (lastplane.Time - plane.Time).TotalSeconds;
|
||||
latd = lastplane.Lat - plane.Lat;
|
||||
lond = lastplane.Lon - plane.Lon;
|
||||
altd = lastplane.Alt - plane.Alt;
|
||||
spdd = lastplane.Speed - plane.Speed;
|
||||
trkd = lastplane.Track - plane.Track;
|
||||
}
|
||||
|
||||
string csv = plane.Time + ";" +
|
||||
timed + ";" +
|
||||
plane.Hex + ";" +
|
||||
plane.Lat + ";" +
|
||||
latd + ";" +
|
||||
plane.Lon + ";" +
|
||||
lond + ";" +
|
||||
plane.Alt + ";" +
|
||||
altd + ";" +
|
||||
plane.Track + ";" +
|
||||
trkd + ";" +
|
||||
plane.Speed + ";" +
|
||||
spdd + ";" +
|
||||
plane.Call + ";" +
|
||||
plane.Reg + ";" +
|
||||
plane.From + ";" +
|
||||
plane.To + ";" +
|
||||
plane.VSpeed + ";" +
|
||||
track + ";" +
|
||||
dist +
|
||||
Environment.NewLine;
|
||||
|
||||
File.AppendAllText(filename, csv);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// all checks successfully done --> add plane to list
|
||||
planes.Add(plane);
|
||||
count++;
|
||||
|
@ -369,6 +483,7 @@ namespace AirScout.PlaneFeeds
|
|||
// write all planes to file
|
||||
try
|
||||
{
|
||||
// simple logging
|
||||
using (StreamWriter sw = new StreamWriter(Path.Combine(Arguments.TmpDirectory, "planes.csv")))
|
||||
{
|
||||
sw.WriteLine("Time;Hex;Lat;Lon;Alt;Track;Speed;Call;Reg;From;To;VSpeed");
|
||||
|
|
|
@ -17,6 +17,7 @@ namespace AirScout.PlaneFeeds
|
|||
public string LogDirectory = "";
|
||||
public string TmpDirectory = "";
|
||||
public string DatabaseDirectory = "";
|
||||
public string PlanePositionsDirectory = "";
|
||||
|
||||
// Scope für plane positions
|
||||
public double MaxLat = 0;
|
||||
|
@ -47,6 +48,9 @@ namespace AirScout.PlaneFeeds
|
|||
public string SessionKey;
|
||||
public string GetKeyURL;
|
||||
|
||||
// Log plane positions to file
|
||||
public bool LogPlanePositions = false;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
40
AirScout.sln
40
AirScout.sln
|
@ -81,6 +81,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirScout.CAT", "AirScout.CA
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirScout.PlaneFeeds.Plugin.AirScoutServer", "AirScout.PlaneFeeds.Plugin.AirScoutServer\AirScout.PlaneFeeds.Plugin.AirScoutServer.csproj", "{692CAF08-26D0-4D41-9CAC-BDA8D8BE6125}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirScout.PlaneFeeds.Plugin.RadarVirtuel", "AirScout.PlaneFeeds.Plugin.RadarVirtuel\AirScout.PlaneFeeds.Plugin.RadarVirtuel.csproj", "{1F2A3BE9-9349-4478-BA6E-0BC842615B3B}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirScout.PlaneFeeds.Plugin.VRSWebServer", "AirScout.PlaneFeeds.Plugin.VRSWebServer\AirScout.PlaneFeeds.Plugin.VRSWebServer.csproj", "{5C096747-2BF0-4D36-BAA7-226CF71619A4}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -776,6 +780,42 @@ Global
|
|||
{692CAF08-26D0-4D41-9CAC-BDA8D8BE6125}.WSL|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{692CAF08-26D0-4D41-9CAC-BDA8D8BE6125}.WSL|x86.ActiveCfg = Debug|Any CPU
|
||||
{692CAF08-26D0-4D41-9CAC-BDA8D8BE6125}.WSL|x86.Build.0 = Debug|Any CPU
|
||||
{1F2A3BE9-9349-4478-BA6E-0BC842615B3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1F2A3BE9-9349-4478-BA6E-0BC842615B3B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1F2A3BE9-9349-4478-BA6E-0BC842615B3B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{1F2A3BE9-9349-4478-BA6E-0BC842615B3B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{1F2A3BE9-9349-4478-BA6E-0BC842615B3B}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{1F2A3BE9-9349-4478-BA6E-0BC842615B3B}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{1F2A3BE9-9349-4478-BA6E-0BC842615B3B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1F2A3BE9-9349-4478-BA6E-0BC842615B3B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1F2A3BE9-9349-4478-BA6E-0BC842615B3B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{1F2A3BE9-9349-4478-BA6E-0BC842615B3B}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{1F2A3BE9-9349-4478-BA6E-0BC842615B3B}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{1F2A3BE9-9349-4478-BA6E-0BC842615B3B}.Release|x86.Build.0 = Release|Any CPU
|
||||
{1F2A3BE9-9349-4478-BA6E-0BC842615B3B}.WSL|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1F2A3BE9-9349-4478-BA6E-0BC842615B3B}.WSL|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1F2A3BE9-9349-4478-BA6E-0BC842615B3B}.WSL|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{1F2A3BE9-9349-4478-BA6E-0BC842615B3B}.WSL|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{1F2A3BE9-9349-4478-BA6E-0BC842615B3B}.WSL|x86.ActiveCfg = Debug|Any CPU
|
||||
{1F2A3BE9-9349-4478-BA6E-0BC842615B3B}.WSL|x86.Build.0 = Debug|Any CPU
|
||||
{5C096747-2BF0-4D36-BAA7-226CF71619A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5C096747-2BF0-4D36-BAA7-226CF71619A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5C096747-2BF0-4D36-BAA7-226CF71619A4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{5C096747-2BF0-4D36-BAA7-226CF71619A4}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{5C096747-2BF0-4D36-BAA7-226CF71619A4}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{5C096747-2BF0-4D36-BAA7-226CF71619A4}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{5C096747-2BF0-4D36-BAA7-226CF71619A4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5C096747-2BF0-4D36-BAA7-226CF71619A4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5C096747-2BF0-4D36-BAA7-226CF71619A4}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{5C096747-2BF0-4D36-BAA7-226CF71619A4}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{5C096747-2BF0-4D36-BAA7-226CF71619A4}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{5C096747-2BF0-4D36-BAA7-226CF71619A4}.Release|x86.Build.0 = Release|Any CPU
|
||||
{5C096747-2BF0-4D36-BAA7-226CF71619A4}.WSL|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5C096747-2BF0-4D36-BAA7-226CF71619A4}.WSL|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5C096747-2BF0-4D36-BAA7-226CF71619A4}.WSL|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{5C096747-2BF0-4D36-BAA7-226CF71619A4}.WSL|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{5C096747-2BF0-4D36-BAA7-226CF71619A4}.WSL|x86.ActiveCfg = Debug|Any CPU
|
||||
{5C096747-2BF0-4D36-BAA7-226CF71619A4}.WSL|x86.Build.0 = Debug|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
Plik diff jest za duży
Load Diff
Plik diff jest za duży
Load Diff
|
@ -30,8 +30,8 @@
|
|||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MapDlg));
|
||||
ScoutBase.Core.LatLon.GPoint gPoint7 = new ScoutBase.Core.LatLon.GPoint();
|
||||
ScoutBase.Core.LatLon.GPoint gPoint8 = new ScoutBase.Core.LatLon.GPoint();
|
||||
ScoutBase.Core.LatLon.GPoint gPoint3 = new ScoutBase.Core.LatLon.GPoint();
|
||||
ScoutBase.Core.LatLon.GPoint gPoint4 = new ScoutBase.Core.LatLon.GPoint();
|
||||
this.il_Main = new System.Windows.Forms.ImageList(this.components);
|
||||
this.ti_Progress = new System.Windows.Forms.Timer(this.components);
|
||||
this.sc_Map = new System.Windows.Forms.SplitContainer();
|
||||
|
@ -181,7 +181,7 @@
|
|||
this.bw_Analysis_FileSaver = new System.ComponentModel.BackgroundWorker();
|
||||
this.bw_Analysis_FileLoader = new System.ComponentModel.BackgroundWorker();
|
||||
this.bw_AirportMapper = new System.ComponentModel.BackgroundWorker();
|
||||
this.bw_LocatorGridUpdater = new System.ComponentModel.BackgroundWorker();
|
||||
this.tsl_Database_LED_Rig = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
((System.ComponentModel.ISupportInitialize)(this.sc_Map)).BeginInit();
|
||||
this.sc_Map.Panel1.SuspendLayout();
|
||||
this.sc_Map.Panel2.SuspendLayout();
|
||||
|
@ -1091,6 +1091,7 @@
|
|||
this.tsl_Database,
|
||||
this.tsl_Database_LED_Aircraft,
|
||||
this.tsl_Database_LED_Stations,
|
||||
this.tsl_Database_LED_Rig,
|
||||
this.tsl_Database_LED_GLOBE,
|
||||
this.tsl_Database_LED_SRTM3,
|
||||
this.tsl_Database_LED_SRTM1,
|
||||
|
@ -1113,7 +1114,7 @@
|
|||
| System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom)));
|
||||
this.tsl_Status.BorderStyle = System.Windows.Forms.Border3DStyle.SunkenInner;
|
||||
this.tsl_Status.Name = "tsl_Status";
|
||||
this.tsl_Status.Size = new System.Drawing.Size(606, 19);
|
||||
this.tsl_Status.Size = new System.Drawing.Size(561, 19);
|
||||
this.tsl_Status.Spring = true;
|
||||
this.tsl_Status.Text = "No Messages.";
|
||||
this.tsl_Status.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
|
@ -1220,8 +1221,8 @@
|
|||
this.tsl_Database_LED_ASTER3.Margin = new System.Windows.Forms.Padding(1, 5, 1, 5);
|
||||
this.tsl_Database_LED_ASTER3.Name = "tsl_Database_LED_ASTER3";
|
||||
this.tsl_Database_LED_ASTER3.Size = new System.Drawing.Size(12, 14);
|
||||
this.tsl_Database_LED_ASTER3.Text = " SRTM3 database status LED";
|
||||
this.tsl_Database_LED_ASTER3.ToolTipText = "SRTM3 database status LED";
|
||||
this.tsl_Database_LED_ASTER3.Text = " ASTER3 database status LED";
|
||||
this.tsl_Database_LED_ASTER3.ToolTipText = "ASTER3 database status LED";
|
||||
//
|
||||
// tsl_Database_LED_ASTER1
|
||||
//
|
||||
|
@ -1233,8 +1234,8 @@
|
|||
this.tsl_Database_LED_ASTER1.Margin = new System.Windows.Forms.Padding(1, 5, 1, 5);
|
||||
this.tsl_Database_LED_ASTER1.Name = "tsl_Database_LED_ASTER1";
|
||||
this.tsl_Database_LED_ASTER1.Size = new System.Drawing.Size(12, 14);
|
||||
this.tsl_Database_LED_ASTER1.Text = " SRTM3 database status LED";
|
||||
this.tsl_Database_LED_ASTER1.ToolTipText = "SRTM3 database status LED";
|
||||
this.tsl_Database_LED_ASTER1.Text = "ASTER1 database status LED";
|
||||
this.tsl_Database_LED_ASTER1.ToolTipText = "ASTER1 database status LED";
|
||||
//
|
||||
// tsl_Track
|
||||
//
|
||||
|
@ -1701,7 +1702,7 @@
|
|||
this.cb_DXLoc.Font = new System.Drawing.Font("Courier New", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.cb_DXLoc.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
this.cb_DXLoc.FormattingEnabled = true;
|
||||
this.cb_DXLoc.GeoLocation = gPoint7;
|
||||
this.cb_DXLoc.GeoLocation = gPoint3;
|
||||
this.cb_DXLoc.Location = new System.Drawing.Point(3, 154);
|
||||
this.cb_DXLoc.Name = "cb_DXLoc";
|
||||
this.cb_DXLoc.Precision = 3;
|
||||
|
@ -1725,7 +1726,7 @@
|
|||
this.cb_MyLoc.Font = new System.Drawing.Font("Courier New", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.cb_MyLoc.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
this.cb_MyLoc.FormattingEnabled = true;
|
||||
this.cb_MyLoc.GeoLocation = gPoint8;
|
||||
this.cb_MyLoc.GeoLocation = gPoint4;
|
||||
this.cb_MyLoc.Location = new System.Drawing.Point(3, 71);
|
||||
this.cb_MyLoc.Name = "cb_MyLoc";
|
||||
this.cb_MyLoc.Precision = 3;
|
||||
|
@ -2054,13 +2055,18 @@
|
|||
this.bw_AirportMapper.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.bw_AirportMapper_ProgressChanged);
|
||||
this.bw_AirportMapper.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.bw_AirportMapper_RunWorkerCompleted);
|
||||
//
|
||||
// bw_LocatorGridUpdater
|
||||
// tsl_Database_LED_Rig
|
||||
//
|
||||
this.bw_LocatorGridUpdater.WorkerReportsProgress = true;
|
||||
this.bw_LocatorGridUpdater.WorkerSupportsCancellation = true;
|
||||
this.bw_LocatorGridUpdater.DoWork += new System.ComponentModel.DoWorkEventHandler(this.bw_LocatorGridUpdater_DoWork);
|
||||
this.bw_LocatorGridUpdater.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.bw_LocatorGridUpdater_ProgressChanged);
|
||||
this.bw_LocatorGridUpdater.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.bw_LocatorGridUpdater_RunWorkerCompleted);
|
||||
this.tsl_Database_LED_Rig.AutoSize = false;
|
||||
this.tsl_Database_LED_Rig.BackColor = System.Drawing.Color.Plum;
|
||||
this.tsl_Database_LED_Rig.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.None;
|
||||
this.tsl_Database_LED_Rig.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.tsl_Database_LED_Rig.Image = ((System.Drawing.Image)(resources.GetObject("tsl_Database_LED_Rig.Image")));
|
||||
this.tsl_Database_LED_Rig.Margin = new System.Windows.Forms.Padding(1, 5, 1, 5);
|
||||
this.tsl_Database_LED_Rig.Name = "tsl_Database_LED_Rig";
|
||||
this.tsl_Database_LED_Rig.Size = new System.Drawing.Size(12, 14);
|
||||
this.tsl_Database_LED_Rig.Text = "Rig database status LED";
|
||||
this.tsl_Database_LED_Rig.ToolTipText = "Rig database status LED";
|
||||
//
|
||||
// MapDlg
|
||||
//
|
||||
|
@ -2281,7 +2287,7 @@
|
|||
private System.Windows.Forms.ToolStripStatusLabel tsl_CAT;
|
||||
private System.Windows.Forms.ToolStripStatusLabel tsl_Rot;
|
||||
private System.Windows.Forms.ToolStripStatusLabel tsl_Track;
|
||||
private System.ComponentModel.BackgroundWorker bw_LocatorGridUpdater;
|
||||
private System.Windows.Forms.ToolStripStatusLabel tsl_Database_LED_Rig;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Plik diff jest za duży
Load Diff
|
@ -125,7 +125,7 @@
|
|||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACc
|
||||
DQAAAk1TRnQBSQFMAgEBAwEAATABDAEwAQwBIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
DQAAAk1TRnQBSQFMAgEBAwEAAUABDAFAAQwBIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABgAMAASADAAEBAQABCAYAARAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
|
@ -312,6 +312,12 @@
|
|||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vAAADrwBlbxySQAAABBJREFUGFdjqMcBhpREfT0AN/NfQdTsp04AAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="tsl_Database_LED_Rig.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vAAADrwBlbxySQAAABBJREFUGFdjqMcBhpREfT0AN/NfQdTsp04AAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="tsl_Database_LED_GLOBE.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
|
@ -355,7 +361,7 @@
|
|||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACM
|
||||
DAAAAk1TRnQBSQFMAwEBAAGYAQoBmAEKASABAAEgAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA
|
||||
DAAAAk1TRnQBSQFMAwEBAAGoAQoBqAEKASABAAEgAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA
|
||||
AYADAAEgAwABAQEAAQgGAAEQGAABgAIAAYADAAKAAQABgAMAAYABAAGAAQACgAIAA8ABAAHAAdwBwAEA
|
||||
AfABygGmAQABMwUAATMBAAEzAQABMwEAAjMCAAMWAQADHAEAAyIBAAMpAQADVQEAA00BAANCAQADOQEA
|
||||
AYABfAH/AQACUAH/AQABkwEAAdYBAAH/AewBzAEAAcYB1gHvAQAB1gLnAQABkAGpAa0CAAH/ATMDAAFm
|
||||
|
@ -471,9 +477,6 @@
|
|||
<metadata name="bw_AirportMapper.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1347, 17</value>
|
||||
</metadata>
|
||||
<metadata name="bw_LocatorGridUpdater.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>544, 95</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>137</value>
|
||||
</metadata>
|
||||
|
|
Plik diff jest za duży
Load Diff
|
@ -2732,6 +2732,11 @@ namespace AirScout
|
|||
// get a list of supported rigs and add them to combo box
|
||||
List<SupportedRig> rigs = CATWorker.SupportedRigs();
|
||||
cb_Options_CAT_Rig.Items.Clear();
|
||||
// add a [None] rig
|
||||
SupportedRig none = new SupportedRig();
|
||||
none.Model = "[None]";
|
||||
none.Type = "[None]";
|
||||
cb_Options_CAT_Rig.Items.Add(none);
|
||||
foreach (SupportedRig rig in rigs)
|
||||
{
|
||||
cb_Options_CAT_Rig.Items.Add(rig);
|
||||
|
|
|
@ -238,15 +238,15 @@
|
|||
xNtuqAliuQlg60EE2Lzsy4Ps4y+UBobZ5brY5TC7spHD7MpGDrMrGznMrmzkMLuykcPsykYOsysbOcyu
|
||||
bOQwu7KRw+zKRg6zKxs5zK5s5DC7spHD7MpGDrMrGznMrkwUwn8BkAmqaXV391cAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="btn_Options_LocalObstructions.ToolTip" xml:space="preserve">
|
||||
<value>Manages local obstructions near own location which are not covered by the choosen Digital Elevation Model, e.g. higher buildings or hill sites.
|
||||
You can set a minimal possibile elevation for each single direction manually here.</value>
|
||||
</data>
|
||||
<data name="label61.Text" xml:space="preserve">
|
||||
<value>You can select different map provider from the list below. Please note that the selection of maps is taken from Great Maps regardless of their legal status. Some of them might be copyrighted or otherwise restricted in use.
|
||||
You were asked to agree with the terms of use first.
|
||||
Open Street Map is recommended as a default.</value>
|
||||
</data>
|
||||
<data name="btn_Options_LocalObstructions.ToolTip" xml:space="preserve">
|
||||
<value>Manages local obstructions near own location which are not covered by the choosen Digital Elevation Model, e.g. higher buildings or hill sites.
|
||||
You can set a minimal possibile elevation for each single direction manually here.</value>
|
||||
</data>
|
||||
<data name="label52.Text" xml:space="preserve">
|
||||
<value>Information from callsign database and other sources are used to prefill fields. You can overwrite and complete entries here. Your local database is updated. If you want to share the information with the AirScout community please use the "Send Update!" buttons.</value>
|
||||
|
|
|
@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("DL2ALF")]
|
||||
[assembly: AssemblyProduct("AirScout")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2013-2020")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2013-2022")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
||||
// übernehmen, indem Sie "*" eingeben:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.4.1.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.1.0")]
|
||||
[assembly: AssemblyVersion("1.4.2.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.2.0")]
|
||||
|
|
|
@ -2067,7 +2067,7 @@ Digital data base on the World Wide Web (URL: http://www.ngdc.noaa.gov/mgg/topo/
|
|||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("10")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("30")]
|
||||
public int Planes_ExtendedPlausibilityCheck_MaxErrorDist {
|
||||
get {
|
||||
return ((int)(this["Planes_ExtendedPlausibilityCheck_MaxErrorDist"]));
|
||||
|
@ -2815,5 +2815,53 @@ Digital data base on the World Wide Web (URL: http://www.ngdc.noaa.gov/mgg/topo/
|
|||
this["Map_TrackingGaugesShow"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool NewsFeed_Enabled {
|
||||
get {
|
||||
return ((bool)(this["NewsFeed_Enabled"]));
|
||||
}
|
||||
set {
|
||||
this["NewsFeed_Enabled"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("UNDEFINED")]
|
||||
public global::System.Data.SQLite.DATABASESTATUS RigDatabase_Status {
|
||||
get {
|
||||
return ((global::System.Data.SQLite.DATABASESTATUS)(this["RigDatabase_Status"]));
|
||||
}
|
||||
set {
|
||||
this["RigDatabase_Status"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool Planes_TracePositions {
|
||||
get {
|
||||
return ((bool)(this["Planes_TracePositions"]));
|
||||
}
|
||||
set {
|
||||
this["Planes_TracePositions"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("PlanePositions")]
|
||||
public string Planes_PositionsDirectory {
|
||||
get {
|
||||
return ((string)(this["Planes_PositionsDirectory"]));
|
||||
}
|
||||
set {
|
||||
this["Planes_PositionsDirectory"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -545,7 +545,7 @@ MEaSUREs data and products are available at no charge from the LP DAAC.See https
|
|||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="Planes_ExtendedPlausibilityCheck_MaxErrorDist" Type="System.Int32" Scope="User">
|
||||
<Value Profile="(Default)">10</Value>
|
||||
<Value Profile="(Default)">30</Value>
|
||||
</Setting>
|
||||
<Setting Name="Planes_LogErrors" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
|
@ -754,5 +754,17 @@ NASA/METI/AIST/Japan Spacesystems, and U.S./Japan ASTER Science Team (2019). AST
|
|||
<Setting Name="Map_TrackingGaugesShow" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="NewsFeed_Enabled" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="RigDatabase_Status" Type="System.Data.SQLite.DATABASESTATUS" Scope="User">
|
||||
<Value Profile="(Default)">UNDEFINED</Value>
|
||||
</Setting>
|
||||
<Setting Name="Planes_TracePositions" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="Planes_PositionsDirectory" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">PlanePositions</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
|
@ -1,4 +1,22 @@
|
|||
2022-01-03: V1.4.1.0
|
||||
2023-xx-xx: V1.4.3.0
|
||||
====================
|
||||
|
||||
|
||||
2023-01-29: V1.4.2.0
|
||||
====================
|
||||
|
||||
- Bugfix: DXElevation was not calculated correctly when in track mode --> fixed (tnx OE5VRL)
|
||||
- Bugfix: CAT option is not properly checked on program start --> fixed, furthermore CAT rig is set to [None] by default (tnx OE5VRL)
|
||||
- Bugfix: Program settigs are now saved as JSON on Linux/Mono to avoid problems with load/save Windows-style settings
|
||||
- Feature: new high precision tracking broadcast telegram is now sent simultaneous to legacy broadcast
|
||||
- Bugfix: Split mode was not reset on program exit when in tracking mode --> fixed (tnx OE5VRL)
|
||||
- Bugfix: dabatabase updates sometimes show errors and status LEDs were not displayed properly --> fixed
|
||||
- Bugfix: Wrong calculation of Epsilon resulted in faulty display & tracking especially at small distances --> fixed (tnx OE5VRL)
|
||||
- Bugfix: AirScout crashes when OmniRig CAT is activated and OmniRig instance disappears during AirScout run --> fixed
|
||||
- Bugfix: Planes with numeric values reported as "not a number" for lat/lon/alt/speed/track were considered as good --> fixed
|
||||
- Bugfix: Extended plane feed plausibility check gives a lot of errors on VRS Web Server feed --> fixed (tnx OV3T)
|
||||
|
||||
2022-01-03: V1.4.1.0
|
||||
====================
|
||||
|
||||
- Bugfix: RIT on rig is reset when tracking started --> fixed
|
||||
|
|
|
@ -68,6 +68,7 @@ using OxyPlot.WindowsForms;
|
|||
using OxyPlot.Series;
|
||||
using OxyPlot.Axes;
|
||||
using System.Data.SQLite;
|
||||
using MimeTypes;
|
||||
|
||||
namespace AirScout
|
||||
{
|
||||
|
@ -85,7 +86,15 @@ namespace AirScout
|
|||
// get temp directory from arguments
|
||||
if (e != null)
|
||||
{
|
||||
tmpdir = (string)e.Argument;
|
||||
tmpdir = ((WebserverStartArgs)e.Argument).TmpDirectory;
|
||||
}
|
||||
|
||||
|
||||
string webserverdir = Path.Combine(Application.StartupPath, "wwwroot");
|
||||
// get webserver directory from arguments
|
||||
if (e != null)
|
||||
{
|
||||
webserverdir = ((WebserverStartArgs)e.Argument).WebserverDirectory;
|
||||
}
|
||||
|
||||
Log.WriteMessage("started.");
|
||||
|
@ -128,6 +137,7 @@ namespace AirScout
|
|||
WebServerDelivererArgs args = new WebServerDelivererArgs();
|
||||
args.ID = id;
|
||||
args.TmpDirectory = tmpdir;
|
||||
args.WebserverDirectory = webserverdir;
|
||||
args.Context = context;
|
||||
args.AllPlanes = allplanes;
|
||||
WebserverDeliver bw = new WebserverDeliver();
|
||||
|
@ -364,6 +374,13 @@ namespace AirScout
|
|||
json = JsonConvert.SerializeObject(Properties.Settings.Default, settings);
|
||||
return json;
|
||||
}
|
||||
private string DeliverBands(string paramstr)
|
||||
{
|
||||
string json = "";
|
||||
string[] bands = Bands.GetStringValuesExceptNoneAndAll();
|
||||
json = JsonConvert.SerializeObject(bands);
|
||||
return json;
|
||||
}
|
||||
|
||||
private string DeliverLocation(string paramstr)
|
||||
{
|
||||
|
@ -806,47 +823,104 @@ namespace AirScout
|
|||
WebServerDelivererArgs args = (WebServerDelivererArgs)e.Argument;
|
||||
if (String.IsNullOrEmpty(Thread.CurrentThread.Name))
|
||||
Thread.CurrentThread.Name = this.GetType().Name + "_" + args.ID;
|
||||
|
||||
byte[] buffer = new byte[0];
|
||||
string mime = "text/html";
|
||||
HttpStatusCode status = HttpStatusCode.OK;
|
||||
|
||||
HttpListenerRequest request = args.Context.Request;
|
||||
|
||||
// Obtain a response object.
|
||||
HttpListenerResponse response = args.Context.Response;
|
||||
// Construct a default response.
|
||||
string responsestring = "<HTML><BODY> Welcome to AirScout!</BODY></HTML>";
|
||||
// check for content delivery request
|
||||
if (request.RawUrl.ToLower() == "/planes.json")
|
||||
|
||||
// get unescaped raw url from request
|
||||
string rawurl = Uri.UnescapeDataString(request.RawUrl);
|
||||
|
||||
// redirect parameterless calls to index.html
|
||||
if (!rawurl.Contains("/") || (rawurl == "/"))
|
||||
{
|
||||
responsestring = DeliverPlanes(args.TmpDirectory);
|
||||
rawurl = "/index.html";
|
||||
}
|
||||
|
||||
// try to create local file name
|
||||
string filename = "";
|
||||
if (SupportFunctions.IsMono)
|
||||
{
|
||||
filename = rawurl.Substring(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
filename = rawurl.Substring(1).Replace("/", "\\");
|
||||
}
|
||||
|
||||
// cut parameters
|
||||
if (filename.Contains("?"))
|
||||
filename = filename.Substring(0, filename.IndexOf("?"));
|
||||
|
||||
// try to find local file and deliver it
|
||||
filename = Path.Combine(args.WebserverDirectory, filename);
|
||||
if (File.Exists(filename))
|
||||
{
|
||||
buffer = File.ReadAllBytes(filename);
|
||||
mime = MimeTypeMap.GetMimeType(Path.GetExtension(filename));
|
||||
}
|
||||
// check for content delivery request
|
||||
else if (request.RawUrl.ToLower() == "/planes.json")
|
||||
{
|
||||
buffer = System.Text.Encoding.UTF8.GetBytes(DeliverPlanes(args.TmpDirectory));
|
||||
mime = "text/json";
|
||||
}
|
||||
else if (request.RawUrl.ToLower().StartsWith("/version.json"))
|
||||
{
|
||||
responsestring = DeliverVersion(request.RawUrl);
|
||||
buffer = System.Text.Encoding.UTF8.GetBytes(DeliverVersion(request.RawUrl));
|
||||
mime = "text/json";
|
||||
}
|
||||
else if (request.RawUrl.ToLower().StartsWith("/settings.json"))
|
||||
{
|
||||
responsestring = DeliverSettings(request.RawUrl);
|
||||
buffer = System.Text.Encoding.UTF8.GetBytes(DeliverSettings(request.RawUrl));
|
||||
mime = "text/json";
|
||||
}
|
||||
else if (request.RawUrl.ToLower().StartsWith("/bands.json"))
|
||||
{
|
||||
buffer = System.Text.Encoding.UTF8.GetBytes(DeliverBands(request.RawUrl));
|
||||
mime = "text/json";
|
||||
}
|
||||
else if (request.RawUrl.ToLower().StartsWith("/location.json"))
|
||||
{
|
||||
responsestring = DeliverLocation(request.RawUrl);
|
||||
buffer = System.Text.Encoding.UTF8.GetBytes(DeliverLocation(request.RawUrl));
|
||||
mime = "text/json";
|
||||
}
|
||||
else if (request.RawUrl.ToLower().StartsWith("/qrv.json"))
|
||||
{
|
||||
responsestring = DeliverQRV(request.RawUrl);
|
||||
buffer = System.Text.Encoding.UTF8.GetBytes(DeliverQRV(request.RawUrl));
|
||||
mime = "text/json";
|
||||
}
|
||||
else if (request.RawUrl.ToLower().StartsWith("/elevationpath.json"))
|
||||
{
|
||||
responsestring = DeliverElevationPath(request.RawUrl);
|
||||
buffer = System.Text.Encoding.UTF8.GetBytes(DeliverElevationPath(request.RawUrl));
|
||||
mime = "text/json";
|
||||
}
|
||||
else if (request.RawUrl.ToLower().StartsWith("/propagationpath.json"))
|
||||
{
|
||||
responsestring = DeliverPropagationPath(request.RawUrl);
|
||||
buffer = System.Text.Encoding.UTF8.GetBytes(DeliverPropagationPath(request.RawUrl));
|
||||
mime = "text/json";
|
||||
}
|
||||
else if (request.RawUrl.ToLower().StartsWith("/nearestplanes.json"))
|
||||
{
|
||||
responsestring = DeliverNearestPlanes(request.RawUrl, args.AllPlanes);
|
||||
buffer = System.Text.Encoding.UTF8.GetBytes(DeliverNearestPlanes(request.RawUrl, args.AllPlanes));
|
||||
mime = "text/json";
|
||||
}
|
||||
// copy bytes to buffer
|
||||
byte[] buffer = System.Text.Encoding.UTF8.GetBytes(responsestring);
|
||||
else
|
||||
{
|
||||
// mit Error 404 antworten
|
||||
buffer = System.Text.Encoding.UTF8.GetBytes("Not found!");
|
||||
status = HttpStatusCode.NotFound;
|
||||
}
|
||||
|
||||
// Get a response stream and write the response to it.
|
||||
response.Headers.Add(HttpResponseHeader.CacheControl, "no-cache");
|
||||
response.ContentType = mime;
|
||||
response.StatusCode = (int)status;
|
||||
response.ContentLength64 = buffer.Length;
|
||||
System.IO.Stream output = response.OutputStream;
|
||||
output.Write(buffer, 0, buffer.Length);
|
||||
|
@ -860,6 +934,7 @@ namespace AirScout
|
|||
{
|
||||
public int ID;
|
||||
public string TmpDirectory = "";
|
||||
public string WebserverDirectory = "";
|
||||
public HttpListenerContext Context;
|
||||
public List<PlaneInfo> AllPlanes;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace AirScout
|
||||
{
|
||||
public class WebserverStartArgs
|
||||
{
|
||||
public string TmpDirectory = "";
|
||||
public string WebserverDirectory = "";
|
||||
}
|
||||
}
|
|
@ -544,7 +544,7 @@ MEaSUREs data and products are available at no charge from the LP DAAC.See https
|
|||
</setting>
|
||||
<setting name="Planes_ExtendedPlausibilityCheck_MaxErrorDist"
|
||||
serializeAs="String">
|
||||
<value>10</value>
|
||||
<value>30</value>
|
||||
</setting>
|
||||
<setting name="Planes_LogErrors" serializeAs="String">
|
||||
<value>False</value>
|
||||
|
@ -753,6 +753,18 @@ NASA/METI/AIST/Japan Spacesystems, and U.S./Japan ASTER Science Team (2019). AST
|
|||
<setting name="Map_TrackingGaugesShow" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="NewsFeed_Enabled" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="RigDatabase_Status" serializeAs="String">
|
||||
<value>UNDEFINED</value>
|
||||
</setting>
|
||||
<setting name="Planes_TracePositions" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="Planes_PositionsDirectory" serializeAs="String">
|
||||
<value>PlanePositions</value>
|
||||
</setting>
|
||||
</AirScout.Properties.Settings>
|
||||
</userSettings>
|
||||
<startup>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="ajayumi.MimeTypeMap" version="2.5.0" targetFramework="net40" />
|
||||
<package id="DeviceId" version="4.5.0" targetFramework="net40" />
|
||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net40" />
|
||||
<package id="System.Data.SQLite.Core" version="1.0.112.0" targetFramework="net40" />
|
||||
|
|
|
@ -0,0 +1,187 @@
|
|||
table.dataTable {
|
||||
clear: both;
|
||||
margin-top: 6px !important;
|
||||
margin-bottom: 6px !important;
|
||||
max-width: none !important;
|
||||
border-collapse: separate !important;
|
||||
}
|
||||
table.dataTable td,
|
||||
table.dataTable th {
|
||||
-webkit-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
table.dataTable td.dataTables_empty,
|
||||
table.dataTable th.dataTables_empty {
|
||||
text-align: center;
|
||||
}
|
||||
table.dataTable.nowrap th,
|
||||
table.dataTable.nowrap td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
div.dataTables_wrapper div.dataTables_length label {
|
||||
font-weight: normal;
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_length select {
|
||||
width: 75px;
|
||||
display: inline-block;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_filter {
|
||||
text-align: right;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_filter label {
|
||||
font-weight: normal;
|
||||
white-space: nowrap;
|
||||
text-align: left;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_filter input {
|
||||
margin-left: 0.5em;
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_info {
|
||||
padding-top: 8px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_paginate {
|
||||
margin: 0;
|
||||
white-space: nowrap;
|
||||
text-align: right;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_paginate ul.pagination {
|
||||
margin: 2px 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_processing {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 200px;
|
||||
margin-left: -100px;
|
||||
margin-top: -26px;
|
||||
text-align: center;
|
||||
padding: 1em 0;
|
||||
}
|
||||
|
||||
table.dataTable thead > tr > th.sorting_asc, table.dataTable thead > tr > th.sorting_desc, table.dataTable thead > tr > th.sorting,
|
||||
table.dataTable thead > tr > td.sorting_asc,
|
||||
table.dataTable thead > tr > td.sorting_desc,
|
||||
table.dataTable thead > tr > td.sorting {
|
||||
padding-right: 30px;
|
||||
}
|
||||
table.dataTable thead > tr > th:active,
|
||||
table.dataTable thead > tr > td:active {
|
||||
outline: none;
|
||||
}
|
||||
table.dataTable thead .sorting,
|
||||
table.dataTable thead .sorting_asc,
|
||||
table.dataTable thead .sorting_desc,
|
||||
table.dataTable thead .sorting_asc_disabled,
|
||||
table.dataTable thead .sorting_desc_disabled {
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
}
|
||||
table.dataTable thead .sorting:after,
|
||||
table.dataTable thead .sorting_asc:after,
|
||||
table.dataTable thead .sorting_desc:after,
|
||||
table.dataTable thead .sorting_asc_disabled:after,
|
||||
table.dataTable thead .sorting_desc_disabled:after {
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
right: 8px;
|
||||
display: block;
|
||||
font-family: 'Glyphicons Halflings';
|
||||
opacity: 0.5;
|
||||
}
|
||||
table.dataTable thead .sorting:after {
|
||||
opacity: 0.2;
|
||||
content: "\e150";
|
||||
/* sort */
|
||||
}
|
||||
table.dataTable thead .sorting_asc:after {
|
||||
content: "\e155";
|
||||
/* sort-by-attributes */
|
||||
}
|
||||
table.dataTable thead .sorting_desc:after {
|
||||
content: "\e156";
|
||||
/* sort-by-attributes-alt */
|
||||
}
|
||||
table.dataTable thead .sorting_asc_disabled:after,
|
||||
table.dataTable thead .sorting_desc_disabled:after {
|
||||
color: #eee;
|
||||
}
|
||||
|
||||
div.dataTables_scrollHead table.dataTable {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
div.dataTables_scrollBody > table {
|
||||
border-top: none;
|
||||
margin-top: 0 !important;
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
div.dataTables_scrollBody > table > thead .sorting:after,
|
||||
div.dataTables_scrollBody > table > thead .sorting_asc:after,
|
||||
div.dataTables_scrollBody > table > thead .sorting_desc:after {
|
||||
display: none;
|
||||
}
|
||||
div.dataTables_scrollBody > table > tbody > tr:first-child > th,
|
||||
div.dataTables_scrollBody > table > tbody > tr:first-child > td {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
div.dataTables_scrollFoot > .dataTables_scrollFootInner {
|
||||
box-sizing: content-box;
|
||||
}
|
||||
div.dataTables_scrollFoot > .dataTables_scrollFootInner > table {
|
||||
margin-top: 0 !important;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 767px) {
|
||||
div.dataTables_wrapper div.dataTables_length,
|
||||
div.dataTables_wrapper div.dataTables_filter,
|
||||
div.dataTables_wrapper div.dataTables_info,
|
||||
div.dataTables_wrapper div.dataTables_paginate {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
table.dataTable.table-condensed > thead > tr > th {
|
||||
padding-right: 20px;
|
||||
}
|
||||
table.dataTable.table-condensed .sorting:after,
|
||||
table.dataTable.table-condensed .sorting_asc:after,
|
||||
table.dataTable.table-condensed .sorting_desc:after {
|
||||
top: 6px;
|
||||
right: 6px;
|
||||
}
|
||||
|
||||
table.table-bordered.dataTable th,
|
||||
table.table-bordered.dataTable td {
|
||||
border-left-width: 0;
|
||||
}
|
||||
table.table-bordered.dataTable th:last-child, table.table-bordered.dataTable th:last-child,
|
||||
table.table-bordered.dataTable td:last-child,
|
||||
table.table-bordered.dataTable td:last-child {
|
||||
border-right-width: 0;
|
||||
}
|
||||
table.table-bordered.dataTable tbody th,
|
||||
table.table-bordered.dataTable tbody td {
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
|
||||
div.dataTables_scrollHead table.table-bordered {
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
|
||||
div.table-responsive > div.dataTables_wrapper > div.row {
|
||||
margin: 0;
|
||||
}
|
||||
div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:first-child {
|
||||
padding-left: 0;
|
||||
}
|
||||
div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:last-child {
|
||||
padding-right: 0;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
table.dataTable{clear:both;margin-top:6px !important;margin-bottom:6px !important;max-width:none !important;border-collapse:separate !important}table.dataTable td,table.dataTable th{-webkit-box-sizing:content-box;box-sizing:content-box}table.dataTable td.dataTables_empty,table.dataTable th.dataTables_empty{text-align:center}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}div.dataTables_wrapper div.dataTables_length label{font-weight:normal;text-align:left;white-space:nowrap}div.dataTables_wrapper div.dataTables_length select{width:75px;display:inline-block}div.dataTables_wrapper div.dataTables_filter{text-align:right}div.dataTables_wrapper div.dataTables_filter label{font-weight:normal;white-space:nowrap;text-align:left}div.dataTables_wrapper div.dataTables_filter input{margin-left:0.5em;display:inline-block;width:auto}div.dataTables_wrapper div.dataTables_info{padding-top:8px;white-space:nowrap}div.dataTables_wrapper div.dataTables_paginate{margin:0;white-space:nowrap;text-align:right}div.dataTables_wrapper div.dataTables_paginate ul.pagination{margin:2px 0;white-space:nowrap}div.dataTables_wrapper div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;margin-top:-26px;text-align:center;padding:1em 0}table.dataTable thead>tr>th.sorting_asc,table.dataTable thead>tr>th.sorting_desc,table.dataTable thead>tr>th.sorting,table.dataTable thead>tr>td.sorting_asc,table.dataTable thead>tr>td.sorting_desc,table.dataTable thead>tr>td.sorting{padding-right:30px}table.dataTable thead>tr>th:active,table.dataTable thead>tr>td:active{outline:none}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{cursor:pointer;position:relative}table.dataTable thead .sorting:after,table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_desc:after,table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:after{position:absolute;bottom:8px;right:8px;display:block;font-family:'Glyphicons Halflings';opacity:0.5}table.dataTable thead .sorting:after{opacity:0.2;content:"\e150"}table.dataTable thead .sorting_asc:after{content:"\e155"}table.dataTable thead .sorting_desc:after{content:"\e156"}table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:after{color:#eee}div.dataTables_scrollHead table.dataTable{margin-bottom:0 !important}div.dataTables_scrollBody>table{border-top:none;margin-top:0 !important;margin-bottom:0 !important}div.dataTables_scrollBody>table>thead .sorting:after,div.dataTables_scrollBody>table>thead .sorting_asc:after,div.dataTables_scrollBody>table>thead .sorting_desc:after{display:none}div.dataTables_scrollBody>table>tbody>tr:first-child>th,div.dataTables_scrollBody>table>tbody>tr:first-child>td{border-top:none}div.dataTables_scrollFoot>.dataTables_scrollFootInner{box-sizing:content-box}div.dataTables_scrollFoot>.dataTables_scrollFootInner>table{margin-top:0 !important;border-top:none}@media screen and (max-width: 767px){div.dataTables_wrapper div.dataTables_length,div.dataTables_wrapper div.dataTables_filter,div.dataTables_wrapper div.dataTables_info,div.dataTables_wrapper div.dataTables_paginate{text-align:center}}table.dataTable.table-condensed>thead>tr>th{padding-right:20px}table.dataTable.table-condensed .sorting:after,table.dataTable.table-condensed .sorting_asc:after,table.dataTable.table-condensed .sorting_desc:after{top:6px;right:6px}table.table-bordered.dataTable th,table.table-bordered.dataTable td{border-left-width:0}table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable td:last-child,table.table-bordered.dataTable td:last-child{border-right-width:0}table.table-bordered.dataTable tbody th,table.table-bordered.dataTable tbody td{border-bottom-width:0}div.dataTables_scrollHead table.table-bordered{border-bottom-width:0}div.table-responsive>div.dataTables_wrapper>div.row{margin:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:first-child{padding-left:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:last-child{padding-right:0}
|
|
@ -0,0 +1,202 @@
|
|||
table.dataTable {
|
||||
clear: both;
|
||||
margin-top: 6px !important;
|
||||
margin-bottom: 6px !important;
|
||||
max-width: none !important;
|
||||
border-collapse: separate !important;
|
||||
}
|
||||
table.dataTable td,
|
||||
table.dataTable th {
|
||||
-webkit-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
table.dataTable td.dataTables_empty,
|
||||
table.dataTable th.dataTables_empty {
|
||||
text-align: center;
|
||||
}
|
||||
table.dataTable.nowrap th,
|
||||
table.dataTable.nowrap td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
div.dataTables_wrapper div.dataTables_length label {
|
||||
font-weight: normal;
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_length select {
|
||||
width: 75px;
|
||||
display: inline-block;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_filter {
|
||||
text-align: right;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_filter label {
|
||||
font-weight: normal;
|
||||
white-space: nowrap;
|
||||
text-align: left;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_filter input {
|
||||
margin-left: 0.5em;
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_info {
|
||||
padding-top: 0.85em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_paginate {
|
||||
margin: 0;
|
||||
white-space: nowrap;
|
||||
text-align: right;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_paginate ul.pagination {
|
||||
margin: 2px 0;
|
||||
white-space: nowrap;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_processing {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 200px;
|
||||
margin-left: -100px;
|
||||
margin-top: -26px;
|
||||
text-align: center;
|
||||
padding: 1em 0;
|
||||
}
|
||||
|
||||
table.dataTable thead > tr > th.sorting_asc, table.dataTable thead > tr > th.sorting_desc, table.dataTable thead > tr > th.sorting,
|
||||
table.dataTable thead > tr > td.sorting_asc,
|
||||
table.dataTable thead > tr > td.sorting_desc,
|
||||
table.dataTable thead > tr > td.sorting {
|
||||
padding-right: 30px;
|
||||
}
|
||||
table.dataTable thead > tr > th:active,
|
||||
table.dataTable thead > tr > td:active {
|
||||
outline: none;
|
||||
}
|
||||
table.dataTable thead .sorting,
|
||||
table.dataTable thead .sorting_asc,
|
||||
table.dataTable thead .sorting_desc,
|
||||
table.dataTable thead .sorting_asc_disabled,
|
||||
table.dataTable thead .sorting_desc_disabled {
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
}
|
||||
table.dataTable thead .sorting:before, table.dataTable thead .sorting:after,
|
||||
table.dataTable thead .sorting_asc:before,
|
||||
table.dataTable thead .sorting_asc:after,
|
||||
table.dataTable thead .sorting_desc:before,
|
||||
table.dataTable thead .sorting_desc:after,
|
||||
table.dataTable thead .sorting_asc_disabled:before,
|
||||
table.dataTable thead .sorting_asc_disabled:after,
|
||||
table.dataTable thead .sorting_desc_disabled:before,
|
||||
table.dataTable thead .sorting_desc_disabled:after {
|
||||
position: absolute;
|
||||
bottom: 0.9em;
|
||||
display: block;
|
||||
opacity: 0.3;
|
||||
}
|
||||
table.dataTable thead .sorting:before,
|
||||
table.dataTable thead .sorting_asc:before,
|
||||
table.dataTable thead .sorting_desc:before,
|
||||
table.dataTable thead .sorting_asc_disabled:before,
|
||||
table.dataTable thead .sorting_desc_disabled:before {
|
||||
right: 1em;
|
||||
content: "\2191";
|
||||
}
|
||||
table.dataTable thead .sorting:after,
|
||||
table.dataTable thead .sorting_asc:after,
|
||||
table.dataTable thead .sorting_desc:after,
|
||||
table.dataTable thead .sorting_asc_disabled:after,
|
||||
table.dataTable thead .sorting_desc_disabled:after {
|
||||
right: 0.5em;
|
||||
content: "\2193";
|
||||
}
|
||||
table.dataTable thead .sorting_asc:before,
|
||||
table.dataTable thead .sorting_desc:after {
|
||||
opacity: 1;
|
||||
}
|
||||
table.dataTable thead .sorting_asc_disabled:before,
|
||||
table.dataTable thead .sorting_desc_disabled:after {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
div.dataTables_scrollHead table.dataTable {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
div.dataTables_scrollBody table {
|
||||
border-top: none;
|
||||
margin-top: 0 !important;
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
div.dataTables_scrollBody table thead .sorting:after,
|
||||
div.dataTables_scrollBody table thead .sorting_asc:after,
|
||||
div.dataTables_scrollBody table thead .sorting_desc:after {
|
||||
display: none;
|
||||
}
|
||||
div.dataTables_scrollBody table tbody tr:first-child th,
|
||||
div.dataTables_scrollBody table tbody tr:first-child td {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
div.dataTables_scrollFoot > .dataTables_scrollFootInner {
|
||||
box-sizing: content-box;
|
||||
}
|
||||
div.dataTables_scrollFoot > .dataTables_scrollFootInner > table {
|
||||
margin-top: 0 !important;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 767px) {
|
||||
div.dataTables_wrapper div.dataTables_length,
|
||||
div.dataTables_wrapper div.dataTables_filter,
|
||||
div.dataTables_wrapper div.dataTables_info,
|
||||
div.dataTables_wrapper div.dataTables_paginate {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
table.dataTable.table-sm > thead > tr > th {
|
||||
padding-right: 20px;
|
||||
}
|
||||
table.dataTable.table-sm .sorting:before,
|
||||
table.dataTable.table-sm .sorting_asc:before,
|
||||
table.dataTable.table-sm .sorting_desc:before {
|
||||
top: 5px;
|
||||
right: 0.85em;
|
||||
}
|
||||
table.dataTable.table-sm .sorting:after,
|
||||
table.dataTable.table-sm .sorting_asc:after,
|
||||
table.dataTable.table-sm .sorting_desc:after {
|
||||
top: 5px;
|
||||
}
|
||||
|
||||
table.table-bordered.dataTable th,
|
||||
table.table-bordered.dataTable td {
|
||||
border-left-width: 0;
|
||||
}
|
||||
table.table-bordered.dataTable th:last-child, table.table-bordered.dataTable th:last-child,
|
||||
table.table-bordered.dataTable td:last-child,
|
||||
table.table-bordered.dataTable td:last-child {
|
||||
border-right-width: 0;
|
||||
}
|
||||
table.table-bordered.dataTable tbody th,
|
||||
table.table-bordered.dataTable tbody td {
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
|
||||
div.dataTables_scrollHead table.table-bordered {
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
|
||||
div.table-responsive > div.dataTables_wrapper > div.row {
|
||||
margin: 0;
|
||||
}
|
||||
div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:first-child {
|
||||
padding-left: 0;
|
||||
}
|
||||
div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:last-child {
|
||||
padding-right: 0;
|
||||
}
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,118 @@
|
|||
table.dataTable {
|
||||
clear: both;
|
||||
margin: 0.5em 0 !important;
|
||||
max-width: none !important;
|
||||
width: 100%;
|
||||
}
|
||||
table.dataTable td,
|
||||
table.dataTable th {
|
||||
-webkit-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
table.dataTable td.dataTables_empty,
|
||||
table.dataTable th.dataTables_empty {
|
||||
text-align: center;
|
||||
}
|
||||
table.dataTable.nowrap th, table.dataTable.nowrap td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
div.dataTables_wrapper {
|
||||
position: relative;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_length label {
|
||||
float: left;
|
||||
text-align: left;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_length select {
|
||||
width: 75px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_filter label {
|
||||
float: right;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_filter input {
|
||||
display: inline-block !important;
|
||||
width: auto !important;
|
||||
margin-bottom: 0;
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_info {
|
||||
padding-top: 2px;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_paginate {
|
||||
float: right;
|
||||
margin: 0;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_processing {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 200px;
|
||||
margin-left: -100px;
|
||||
margin-top: -26px;
|
||||
text-align: center;
|
||||
padding: 1rem 0;
|
||||
}
|
||||
|
||||
table.dataTable thead > tr > th.sorting_asc, table.dataTable thead > tr > th.sorting_desc, table.dataTable thead > tr > th.sorting,
|
||||
table.dataTable thead > tr > td.sorting_asc,
|
||||
table.dataTable thead > tr > td.sorting_desc,
|
||||
table.dataTable thead > tr > td.sorting {
|
||||
padding-right: 1.5rem;
|
||||
}
|
||||
table.dataTable thead > tr > th:active,
|
||||
table.dataTable thead > tr > td:active {
|
||||
outline: none;
|
||||
}
|
||||
table.dataTable thead .sorting,
|
||||
table.dataTable thead .sorting_asc,
|
||||
table.dataTable thead .sorting_desc,
|
||||
table.dataTable thead .sorting_asc_disabled,
|
||||
table.dataTable thead .sorting_desc_disabled {
|
||||
cursor: pointer;
|
||||
}
|
||||
table.dataTable thead .sorting,
|
||||
table.dataTable thead .sorting_asc,
|
||||
table.dataTable thead .sorting_desc,
|
||||
table.dataTable thead .sorting_asc_disabled,
|
||||
table.dataTable thead .sorting_desc_disabled {
|
||||
background-repeat: no-repeat;
|
||||
background-position: center right;
|
||||
}
|
||||
table.dataTable thead .sorting {
|
||||
background-image: url("../images/sort_both.png");
|
||||
}
|
||||
table.dataTable thead .sorting_asc {
|
||||
background-image: url("../images/sort_asc.png");
|
||||
}
|
||||
table.dataTable thead .sorting_desc {
|
||||
background-image: url("../images/sort_desc.png");
|
||||
}
|
||||
table.dataTable thead .sorting_asc_disabled {
|
||||
background-image: url("../images/sort_asc_disabled.png");
|
||||
}
|
||||
table.dataTable thead .sorting_desc_disabled {
|
||||
background-image: url("../images/sort_desc_disabled.png");
|
||||
}
|
||||
|
||||
div.dataTables_scrollHead table {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
div.dataTables_scrollBody table {
|
||||
border-top: none;
|
||||
margin-top: 0 !important;
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
div.dataTables_scrollBody table tbody tr:first-child th,
|
||||
div.dataTables_scrollBody table tbody tr:first-child td {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
div.dataTables_scrollFoot table {
|
||||
margin-top: 0 !important;
|
||||
border-top: none;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
table.dataTable{clear:both;margin:0.5em 0 !important;max-width:none !important;width:100%}table.dataTable td,table.dataTable th{-webkit-box-sizing:content-box;box-sizing:content-box}table.dataTable td.dataTables_empty,table.dataTable th.dataTables_empty{text-align:center}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}div.dataTables_wrapper{position:relative}div.dataTables_wrapper div.dataTables_length label{float:left;text-align:left;margin-bottom:0}div.dataTables_wrapper div.dataTables_length select{width:75px;margin-bottom:0}div.dataTables_wrapper div.dataTables_filter label{float:right;margin-bottom:0}div.dataTables_wrapper div.dataTables_filter input{display:inline-block !important;width:auto !important;margin-bottom:0;margin-left:0.5em}div.dataTables_wrapper div.dataTables_info{padding-top:2px}div.dataTables_wrapper div.dataTables_paginate{float:right;margin:0}div.dataTables_wrapper div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;margin-top:-26px;text-align:center;padding:1rem 0}table.dataTable thead>tr>th.sorting_asc,table.dataTable thead>tr>th.sorting_desc,table.dataTable thead>tr>th.sorting,table.dataTable thead>tr>td.sorting_asc,table.dataTable thead>tr>td.sorting_desc,table.dataTable thead>tr>td.sorting{padding-right:1.5rem}table.dataTable thead>tr>th:active,table.dataTable thead>tr>td:active{outline:none}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{cursor:pointer}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{background-repeat:no-repeat;background-position:center right}table.dataTable thead .sorting{background-image:url("../images/sort_both.png")}table.dataTable thead .sorting_asc{background-image:url("../images/sort_asc.png")}table.dataTable thead .sorting_desc{background-image:url("../images/sort_desc.png")}table.dataTable thead .sorting_asc_disabled{background-image:url("../images/sort_asc_disabled.png")}table.dataTable thead .sorting_desc_disabled{background-image:url("../images/sort_desc_disabled.png")}div.dataTables_scrollHead table{margin-bottom:0 !important}div.dataTables_scrollBody table{border-top:none;margin-top:0 !important;margin-bottom:0 !important}div.dataTables_scrollBody table tbody tr:first-child th,div.dataTables_scrollBody table tbody tr:first-child td{border-top:none}div.dataTables_scrollFoot table{margin-top:0 !important;border-top:none}
|
|
@ -0,0 +1,481 @@
|
|||
/*
|
||||
* Table styles
|
||||
*/
|
||||
table.dataTable {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
clear: both;
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
/*
|
||||
* Header and footer styles
|
||||
*/
|
||||
/*
|
||||
* Body styles
|
||||
*/
|
||||
}
|
||||
table.dataTable thead th,
|
||||
table.dataTable tfoot th {
|
||||
font-weight: bold;
|
||||
}
|
||||
table.dataTable thead th,
|
||||
table.dataTable thead td {
|
||||
padding: 10px 18px;
|
||||
}
|
||||
table.dataTable thead th:active,
|
||||
table.dataTable thead td:active {
|
||||
outline: none;
|
||||
}
|
||||
table.dataTable tfoot th,
|
||||
table.dataTable tfoot td {
|
||||
padding: 10px 18px 6px 18px;
|
||||
}
|
||||
table.dataTable tbody tr {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
table.dataTable tbody tr.selected {
|
||||
background-color: #B0BED9;
|
||||
}
|
||||
table.dataTable tbody th,
|
||||
table.dataTable tbody td {
|
||||
padding: 8px 10px;
|
||||
}
|
||||
table.dataTable.row-border tbody th, table.dataTable.row-border tbody td, table.dataTable.display tbody th, table.dataTable.display tbody td {
|
||||
border-top: 1px solid #ddd;
|
||||
}
|
||||
table.dataTable.row-border tbody tr:first-child th,
|
||||
table.dataTable.row-border tbody tr:first-child td, table.dataTable.display tbody tr:first-child th,
|
||||
table.dataTable.display tbody tr:first-child td {
|
||||
border-top: none;
|
||||
}
|
||||
table.dataTable.cell-border tbody th, table.dataTable.cell-border tbody td {
|
||||
border-top: 1px solid #ddd;
|
||||
border-right: 1px solid #ddd;
|
||||
}
|
||||
table.dataTable.cell-border tbody tr th:first-child,
|
||||
table.dataTable.cell-border tbody tr td:first-child {
|
||||
border-left: 1px solid #ddd;
|
||||
}
|
||||
table.dataTable.cell-border tbody tr:first-child th,
|
||||
table.dataTable.cell-border tbody tr:first-child td {
|
||||
border-top: none;
|
||||
}
|
||||
table.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
table.dataTable.stripe tbody tr.odd.selected, table.dataTable.display tbody tr.odd.selected {
|
||||
background-color: #acbad4;
|
||||
}
|
||||
table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover {
|
||||
background-color: #f6f6f6;
|
||||
}
|
||||
table.dataTable.hover tbody tr:hover.selected, table.dataTable.display tbody tr:hover.selected {
|
||||
background-color: #aab7d1;
|
||||
}
|
||||
table.dataTable.order-column tbody tr > .sorting_1,
|
||||
table.dataTable.order-column tbody tr > .sorting_2,
|
||||
table.dataTable.order-column tbody tr > .sorting_3, table.dataTable.display tbody tr > .sorting_1,
|
||||
table.dataTable.display tbody tr > .sorting_2,
|
||||
table.dataTable.display tbody tr > .sorting_3 {
|
||||
background-color: #fafafa;
|
||||
}
|
||||
table.dataTable.order-column tbody tr.selected > .sorting_1,
|
||||
table.dataTable.order-column tbody tr.selected > .sorting_2,
|
||||
table.dataTable.order-column tbody tr.selected > .sorting_3, table.dataTable.display tbody tr.selected > .sorting_1,
|
||||
table.dataTable.display tbody tr.selected > .sorting_2,
|
||||
table.dataTable.display tbody tr.selected > .sorting_3 {
|
||||
background-color: #acbad5;
|
||||
}
|
||||
table.dataTable.display tbody tr.odd > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd > .sorting_1 {
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
table.dataTable.display tbody tr.odd > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd > .sorting_2 {
|
||||
background-color: #f3f3f3;
|
||||
}
|
||||
table.dataTable.display tbody tr.odd > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd > .sorting_3 {
|
||||
background-color: whitesmoke;
|
||||
}
|
||||
table.dataTable.display tbody tr.odd.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_1 {
|
||||
background-color: #a6b4cd;
|
||||
}
|
||||
table.dataTable.display tbody tr.odd.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_2 {
|
||||
background-color: #a8b5cf;
|
||||
}
|
||||
table.dataTable.display tbody tr.odd.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_3 {
|
||||
background-color: #a9b7d1;
|
||||
}
|
||||
table.dataTable.display tbody tr.even > .sorting_1, table.dataTable.order-column.stripe tbody tr.even > .sorting_1 {
|
||||
background-color: #fafafa;
|
||||
}
|
||||
table.dataTable.display tbody tr.even > .sorting_2, table.dataTable.order-column.stripe tbody tr.even > .sorting_2 {
|
||||
background-color: #fcfcfc;
|
||||
}
|
||||
table.dataTable.display tbody tr.even > .sorting_3, table.dataTable.order-column.stripe tbody tr.even > .sorting_3 {
|
||||
background-color: #fefefe;
|
||||
}
|
||||
table.dataTable.display tbody tr.even.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_1 {
|
||||
background-color: #acbad5;
|
||||
}
|
||||
table.dataTable.display tbody tr.even.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_2 {
|
||||
background-color: #aebcd6;
|
||||
}
|
||||
table.dataTable.display tbody tr.even.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_3 {
|
||||
background-color: #afbdd8;
|
||||
}
|
||||
table.dataTable.display tbody tr:hover > .sorting_1, table.dataTable.order-column.hover tbody tr:hover > .sorting_1 {
|
||||
background-color: #eaeaea;
|
||||
}
|
||||
table.dataTable.display tbody tr:hover > .sorting_2, table.dataTable.order-column.hover tbody tr:hover > .sorting_2 {
|
||||
background-color: #ececec;
|
||||
}
|
||||
table.dataTable.display tbody tr:hover > .sorting_3, table.dataTable.order-column.hover tbody tr:hover > .sorting_3 {
|
||||
background-color: #efefef;
|
||||
}
|
||||
table.dataTable.display tbody tr:hover.selected > .sorting_1, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_1 {
|
||||
background-color: #a2aec7;
|
||||
}
|
||||
table.dataTable.display tbody tr:hover.selected > .sorting_2, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_2 {
|
||||
background-color: #a3b0c9;
|
||||
}
|
||||
table.dataTable.display tbody tr:hover.selected > .sorting_3, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_3 {
|
||||
background-color: #a5b2cb;
|
||||
}
|
||||
table.dataTable.no-footer {
|
||||
border-bottom: 1px solid #111;
|
||||
}
|
||||
table.dataTable.nowrap th, table.dataTable.nowrap td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
table.dataTable.compact thead th,
|
||||
table.dataTable.compact thead td {
|
||||
padding: 4px 17px 4px 4px;
|
||||
}
|
||||
table.dataTable.compact tfoot th,
|
||||
table.dataTable.compact tfoot td {
|
||||
padding: 4px;
|
||||
}
|
||||
table.dataTable.compact tbody th,
|
||||
table.dataTable.compact tbody td {
|
||||
padding: 4px;
|
||||
}
|
||||
table.dataTable th.dt-left,
|
||||
table.dataTable td.dt-left {
|
||||
text-align: left;
|
||||
}
|
||||
table.dataTable th.dt-center,
|
||||
table.dataTable td.dt-center,
|
||||
table.dataTable td.dataTables_empty {
|
||||
text-align: center;
|
||||
}
|
||||
table.dataTable th.dt-right,
|
||||
table.dataTable td.dt-right {
|
||||
text-align: right;
|
||||
}
|
||||
table.dataTable th.dt-justify,
|
||||
table.dataTable td.dt-justify {
|
||||
text-align: justify;
|
||||
}
|
||||
table.dataTable th.dt-nowrap,
|
||||
table.dataTable td.dt-nowrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
table.dataTable thead th.dt-head-left,
|
||||
table.dataTable thead td.dt-head-left,
|
||||
table.dataTable tfoot th.dt-head-left,
|
||||
table.dataTable tfoot td.dt-head-left {
|
||||
text-align: left;
|
||||
}
|
||||
table.dataTable thead th.dt-head-center,
|
||||
table.dataTable thead td.dt-head-center,
|
||||
table.dataTable tfoot th.dt-head-center,
|
||||
table.dataTable tfoot td.dt-head-center {
|
||||
text-align: center;
|
||||
}
|
||||
table.dataTable thead th.dt-head-right,
|
||||
table.dataTable thead td.dt-head-right,
|
||||
table.dataTable tfoot th.dt-head-right,
|
||||
table.dataTable tfoot td.dt-head-right {
|
||||
text-align: right;
|
||||
}
|
||||
table.dataTable thead th.dt-head-justify,
|
||||
table.dataTable thead td.dt-head-justify,
|
||||
table.dataTable tfoot th.dt-head-justify,
|
||||
table.dataTable tfoot td.dt-head-justify {
|
||||
text-align: justify;
|
||||
}
|
||||
table.dataTable thead th.dt-head-nowrap,
|
||||
table.dataTable thead td.dt-head-nowrap,
|
||||
table.dataTable tfoot th.dt-head-nowrap,
|
||||
table.dataTable tfoot td.dt-head-nowrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
table.dataTable tbody th.dt-body-left,
|
||||
table.dataTable tbody td.dt-body-left {
|
||||
text-align: left;
|
||||
}
|
||||
table.dataTable tbody th.dt-body-center,
|
||||
table.dataTable tbody td.dt-body-center {
|
||||
text-align: center;
|
||||
}
|
||||
table.dataTable tbody th.dt-body-right,
|
||||
table.dataTable tbody td.dt-body-right {
|
||||
text-align: right;
|
||||
}
|
||||
table.dataTable tbody th.dt-body-justify,
|
||||
table.dataTable tbody td.dt-body-justify {
|
||||
text-align: justify;
|
||||
}
|
||||
table.dataTable tbody th.dt-body-nowrap,
|
||||
table.dataTable tbody td.dt-body-nowrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
table.dataTable,
|
||||
table.dataTable th,
|
||||
table.dataTable td {
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
/*
|
||||
* Control feature layout
|
||||
*/
|
||||
.dataTables_wrapper {
|
||||
position: relative;
|
||||
clear: both;
|
||||
*zoom: 1;
|
||||
zoom: 1;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_length {
|
||||
float: left;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_filter {
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_filter input {
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_info {
|
||||
clear: both;
|
||||
float: left;
|
||||
padding-top: 0.755em;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_paginate {
|
||||
float: right;
|
||||
text-align: right;
|
||||
padding-top: 0.25em;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_paginate .paginate_button {
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
min-width: 1.5em;
|
||||
padding: 0.5em 1em;
|
||||
margin-left: 2px;
|
||||
text-align: center;
|
||||
text-decoration: none !important;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
color: #333 !important;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
|
||||
color: #333 !important;
|
||||
border: 1px solid #979797;
|
||||
background-color: white;
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, white), color-stop(100%, #dcdcdc));
|
||||
/* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, white 0%, #dcdcdc 100%);
|
||||
/* Chrome10+,Safari5.1+ */
|
||||
background: -moz-linear-gradient(top, white 0%, #dcdcdc 100%);
|
||||
/* FF3.6+ */
|
||||
background: -ms-linear-gradient(top, white 0%, #dcdcdc 100%);
|
||||
/* IE10+ */
|
||||
background: -o-linear-gradient(top, white 0%, #dcdcdc 100%);
|
||||
/* Opera 11.10+ */
|
||||
background: linear-gradient(to bottom, white 0%, #dcdcdc 100%);
|
||||
/* W3C */
|
||||
}
|
||||
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
|
||||
cursor: default;
|
||||
color: #666 !important;
|
||||
border: 1px solid transparent;
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
|
||||
color: white !important;
|
||||
border: 1px solid #111;
|
||||
background-color: #585858;
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111));
|
||||
/* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #585858 0%, #111 100%);
|
||||
/* Chrome10+,Safari5.1+ */
|
||||
background: -moz-linear-gradient(top, #585858 0%, #111 100%);
|
||||
/* FF3.6+ */
|
||||
background: -ms-linear-gradient(top, #585858 0%, #111 100%);
|
||||
/* IE10+ */
|
||||
background: -o-linear-gradient(top, #585858 0%, #111 100%);
|
||||
/* Opera 11.10+ */
|
||||
background: linear-gradient(to bottom, #585858 0%, #111 100%);
|
||||
/* W3C */
|
||||
}
|
||||
.dataTables_wrapper .dataTables_paginate .paginate_button:active {
|
||||
outline: none;
|
||||
background-color: #2b2b2b;
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c));
|
||||
/* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
|
||||
/* Chrome10+,Safari5.1+ */
|
||||
background: -moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
|
||||
/* FF3.6+ */
|
||||
background: -ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
|
||||
/* IE10+ */
|
||||
background: -o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
|
||||
/* Opera 11.10+ */
|
||||
background: linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%);
|
||||
/* W3C */
|
||||
box-shadow: inset 0 0 3px #111;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_paginate .ellipsis {
|
||||
padding: 0 1em;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_processing {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
margin-left: -50%;
|
||||
margin-top: -25px;
|
||||
padding-top: 20px;
|
||||
text-align: center;
|
||||
font-size: 1.2em;
|
||||
background-color: white;
|
||||
background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(25%, rgba(255, 255, 255, 0.9)), color-stop(75%, rgba(255, 255, 255, 0.9)), color-stop(100%, rgba(255, 255, 255, 0)));
|
||||
background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
|
||||
background: -moz-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
|
||||
background: -ms-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
|
||||
background: -o-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
|
||||
background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
|
||||
}
|
||||
.dataTables_wrapper .dataTables_length,
|
||||
.dataTables_wrapper .dataTables_filter,
|
||||
.dataTables_wrapper .dataTables_info,
|
||||
.dataTables_wrapper .dataTables_processing,
|
||||
.dataTables_wrapper .dataTables_paginate {
|
||||
color: #333;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_scroll {
|
||||
clear: both;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody {
|
||||
*margin-top: -1px;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th > div.dataTables_sizing,
|
||||
.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td > div.dataTables_sizing, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th > div.dataTables_sizing,
|
||||
.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td > div.dataTables_sizing {
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
.dataTables_wrapper.no-footer .dataTables_scrollBody {
|
||||
border-bottom: 1px solid #111;
|
||||
}
|
||||
.dataTables_wrapper.no-footer div.dataTables_scrollHead table.dataTable,
|
||||
.dataTables_wrapper.no-footer div.dataTables_scrollBody > table {
|
||||
border-bottom: none;
|
||||
}
|
||||
.dataTables_wrapper:after {
|
||||
visibility: hidden;
|
||||
display: block;
|
||||
content: "";
|
||||
clear: both;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 767px) {
|
||||
.dataTables_wrapper .dataTables_info,
|
||||
.dataTables_wrapper .dataTables_paginate {
|
||||
float: none;
|
||||
text-align: center;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_paginate {
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 640px) {
|
||||
.dataTables_wrapper .dataTables_length,
|
||||
.dataTables_wrapper .dataTables_filter {
|
||||
float: none;
|
||||
text-align: center;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_filter {
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
}
|
||||
table.dataTable thead th div.DataTables_sort_wrapper {
|
||||
position: relative;
|
||||
}
|
||||
table.dataTable thead th div.DataTables_sort_wrapper span {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin-top: -8px;
|
||||
right: -18px;
|
||||
}
|
||||
table.dataTable thead th.ui-state-default,
|
||||
table.dataTable tfoot th.ui-state-default {
|
||||
border-left-width: 0;
|
||||
}
|
||||
table.dataTable thead th.ui-state-default:first-child,
|
||||
table.dataTable tfoot th.ui-state-default:first-child {
|
||||
border-left-width: 1px;
|
||||
}
|
||||
|
||||
/*
|
||||
* Control feature layout
|
||||
*/
|
||||
.dataTables_wrapper .dataTables_paginate .fg-button {
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
min-width: 1.5em;
|
||||
padding: 0.5em;
|
||||
margin-left: 2px;
|
||||
text-align: center;
|
||||
text-decoration: none !important;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_paginate .fg-button:active {
|
||||
outline: none;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_paginate .fg-button:first-child {
|
||||
border-top-left-radius: 3px;
|
||||
border-bottom-left-radius: 3px;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_paginate .fg-button:last-child {
|
||||
border-top-right-radius: 3px;
|
||||
border-bottom-right-radius: 3px;
|
||||
}
|
||||
.dataTables_wrapper .ui-widget-header {
|
||||
font-weight: normal;
|
||||
}
|
||||
.dataTables_wrapper .ui-toolbar {
|
||||
padding: 8px;
|
||||
}
|
||||
.dataTables_wrapper.no-footer .dataTables_scrollBody {
|
||||
border-bottom: none;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_length,
|
||||
.dataTables_wrapper .dataTables_filter,
|
||||
.dataTables_wrapper .dataTables_info,
|
||||
.dataTables_wrapper .dataTables_processing,
|
||||
.dataTables_wrapper .dataTables_paginate {
|
||||
color: inherit;
|
||||
}
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,102 @@
|
|||
/*
|
||||
* Styling for DataTables with Semantic UI
|
||||
*/
|
||||
table.dataTable.table {
|
||||
margin: 0;
|
||||
}
|
||||
table.dataTable.table thead th,
|
||||
table.dataTable.table thead td {
|
||||
position: relative;
|
||||
}
|
||||
table.dataTable.table thead th.sorting, table.dataTable.table thead th.sorting_asc, table.dataTable.table thead th.sorting_desc,
|
||||
table.dataTable.table thead td.sorting,
|
||||
table.dataTable.table thead td.sorting_asc,
|
||||
table.dataTable.table thead td.sorting_desc {
|
||||
padding-right: 20px;
|
||||
}
|
||||
table.dataTable.table thead th.sorting:after, table.dataTable.table thead th.sorting_asc:after, table.dataTable.table thead th.sorting_desc:after,
|
||||
table.dataTable.table thead td.sorting:after,
|
||||
table.dataTable.table thead td.sorting_asc:after,
|
||||
table.dataTable.table thead td.sorting_desc:after {
|
||||
position: absolute;
|
||||
top: 12px;
|
||||
right: 8px;
|
||||
display: block;
|
||||
font-family: Icons;
|
||||
}
|
||||
table.dataTable.table thead th.sorting:after,
|
||||
table.dataTable.table thead td.sorting:after {
|
||||
content: "\f0dc";
|
||||
color: #ddd;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
table.dataTable.table thead th.sorting_asc:after,
|
||||
table.dataTable.table thead td.sorting_asc:after {
|
||||
content: "\f0de";
|
||||
}
|
||||
table.dataTable.table thead th.sorting_desc:after,
|
||||
table.dataTable.table thead td.sorting_desc:after {
|
||||
content: "\f0dd";
|
||||
}
|
||||
table.dataTable.table td,
|
||||
table.dataTable.table th {
|
||||
-webkit-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
table.dataTable.table td.dataTables_empty,
|
||||
table.dataTable.table th.dataTables_empty {
|
||||
text-align: center;
|
||||
}
|
||||
table.dataTable.table.nowrap th,
|
||||
table.dataTable.table.nowrap td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
div.dataTables_wrapper div.dataTables_length select {
|
||||
vertical-align: middle;
|
||||
min-height: 2.7142em;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_length .ui.selection.dropdown {
|
||||
min-width: 0;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_filter input {
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_info {
|
||||
padding-top: 13px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_processing {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 200px;
|
||||
margin-left: -100px;
|
||||
text-align: center;
|
||||
}
|
||||
div.dataTables_wrapper div.row.dt-table {
|
||||
padding: 0;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_scrollHead table.dataTable {
|
||||
border-bottom-right-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom: none;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_scrollBody thead .sorting:after,
|
||||
div.dataTables_wrapper div.dataTables_scrollBody thead .sorting_asc:after,
|
||||
div.dataTables_wrapper div.dataTables_scrollBody thead .sorting_desc:after {
|
||||
display: none;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_scrollBody table.dataTable {
|
||||
border-radius: 0;
|
||||
border-top: none;
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_scrollBody table.dataTable.no-footer {
|
||||
border-bottom-width: 1px;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_scrollFoot table.dataTable {
|
||||
border-top-right-radius: 0;
|
||||
border-top-left-radius: 0;
|
||||
border-top: none;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
table.dataTable.table{margin:0}table.dataTable.table thead th,table.dataTable.table thead td{position:relative}table.dataTable.table thead th.sorting,table.dataTable.table thead th.sorting_asc,table.dataTable.table thead th.sorting_desc,table.dataTable.table thead td.sorting,table.dataTable.table thead td.sorting_asc,table.dataTable.table thead td.sorting_desc{padding-right:20px}table.dataTable.table thead th.sorting:after,table.dataTable.table thead th.sorting_asc:after,table.dataTable.table thead th.sorting_desc:after,table.dataTable.table thead td.sorting:after,table.dataTable.table thead td.sorting_asc:after,table.dataTable.table thead td.sorting_desc:after{position:absolute;top:12px;right:8px;display:block;font-family:Icons}table.dataTable.table thead th.sorting:after,table.dataTable.table thead td.sorting:after{content:"\f0dc";color:#ddd;font-size:0.8em}table.dataTable.table thead th.sorting_asc:after,table.dataTable.table thead td.sorting_asc:after{content:"\f0de"}table.dataTable.table thead th.sorting_desc:after,table.dataTable.table thead td.sorting_desc:after{content:"\f0dd"}table.dataTable.table td,table.dataTable.table th{-webkit-box-sizing:content-box;box-sizing:content-box}table.dataTable.table td.dataTables_empty,table.dataTable.table th.dataTables_empty{text-align:center}table.dataTable.table.nowrap th,table.dataTable.table.nowrap td{white-space:nowrap}div.dataTables_wrapper div.dataTables_length select{vertical-align:middle;min-height:2.7142em}div.dataTables_wrapper div.dataTables_length .ui.selection.dropdown{min-width:0}div.dataTables_wrapper div.dataTables_filter input{margin-left:0.5em}div.dataTables_wrapper div.dataTables_info{padding-top:13px;white-space:nowrap}div.dataTables_wrapper div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;text-align:center}div.dataTables_wrapper div.row.dt-table{padding:0}div.dataTables_wrapper div.dataTables_scrollHead table.dataTable{border-bottom-right-radius:0;border-bottom-left-radius:0;border-bottom:none}div.dataTables_wrapper div.dataTables_scrollBody thead .sorting:after,div.dataTables_wrapper div.dataTables_scrollBody thead .sorting_asc:after,div.dataTables_wrapper div.dataTables_scrollBody thead .sorting_desc:after{display:none}div.dataTables_wrapper div.dataTables_scrollBody table.dataTable{border-radius:0;border-top:none;border-bottom-width:0}div.dataTables_wrapper div.dataTables_scrollBody table.dataTable.no-footer{border-bottom-width:1px}div.dataTables_wrapper div.dataTables_scrollFoot table.dataTable{border-top-right-radius:0;border-top-left-radius:0;border-top:none}
|
|
@ -0,0 +1,448 @@
|
|||
/*
|
||||
* Table styles
|
||||
*/
|
||||
table.dataTable {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
clear: both;
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
/*
|
||||
* Header and footer styles
|
||||
*/
|
||||
/*
|
||||
* Body styles
|
||||
*/
|
||||
}
|
||||
table.dataTable thead th,
|
||||
table.dataTable tfoot th {
|
||||
font-weight: bold;
|
||||
}
|
||||
table.dataTable thead th,
|
||||
table.dataTable thead td {
|
||||
padding: 10px 18px;
|
||||
border-bottom: 1px solid #111;
|
||||
}
|
||||
table.dataTable thead th:active,
|
||||
table.dataTable thead td:active {
|
||||
outline: none;
|
||||
}
|
||||
table.dataTable tfoot th,
|
||||
table.dataTable tfoot td {
|
||||
padding: 10px 18px 6px 18px;
|
||||
border-top: 1px solid #111;
|
||||
}
|
||||
table.dataTable thead .sorting,
|
||||
table.dataTable thead .sorting_asc,
|
||||
table.dataTable thead .sorting_desc,
|
||||
table.dataTable thead .sorting_asc_disabled,
|
||||
table.dataTable thead .sorting_desc_disabled {
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center right;
|
||||
}
|
||||
table.dataTable thead .sorting {
|
||||
background-image: url("../images/sort_both.png");
|
||||
}
|
||||
table.dataTable thead .sorting_asc {
|
||||
background-image: url("../images/sort_asc.png");
|
||||
}
|
||||
table.dataTable thead .sorting_desc {
|
||||
background-image: url("../images/sort_desc.png");
|
||||
}
|
||||
table.dataTable thead .sorting_asc_disabled {
|
||||
background-image: url("../images/sort_asc_disabled.png");
|
||||
}
|
||||
table.dataTable thead .sorting_desc_disabled {
|
||||
background-image: url("../images/sort_desc_disabled.png");
|
||||
}
|
||||
table.dataTable tbody tr {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
table.dataTable tbody tr.selected {
|
||||
background-color: #B0BED9;
|
||||
}
|
||||
table.dataTable tbody th,
|
||||
table.dataTable tbody td {
|
||||
padding: 8px 10px;
|
||||
}
|
||||
table.dataTable.row-border tbody th, table.dataTable.row-border tbody td, table.dataTable.display tbody th, table.dataTable.display tbody td {
|
||||
border-top: 1px solid #ddd;
|
||||
}
|
||||
table.dataTable.row-border tbody tr:first-child th,
|
||||
table.dataTable.row-border tbody tr:first-child td, table.dataTable.display tbody tr:first-child th,
|
||||
table.dataTable.display tbody tr:first-child td {
|
||||
border-top: none;
|
||||
}
|
||||
table.dataTable.cell-border tbody th, table.dataTable.cell-border tbody td {
|
||||
border-top: 1px solid #ddd;
|
||||
border-right: 1px solid #ddd;
|
||||
}
|
||||
table.dataTable.cell-border tbody tr th:first-child,
|
||||
table.dataTable.cell-border tbody tr td:first-child {
|
||||
border-left: 1px solid #ddd;
|
||||
}
|
||||
table.dataTable.cell-border tbody tr:first-child th,
|
||||
table.dataTable.cell-border tbody tr:first-child td {
|
||||
border-top: none;
|
||||
}
|
||||
table.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
table.dataTable.stripe tbody tr.odd.selected, table.dataTable.display tbody tr.odd.selected {
|
||||
background-color: #acbad4;
|
||||
}
|
||||
table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover {
|
||||
background-color: #f6f6f6;
|
||||
}
|
||||
table.dataTable.hover tbody tr:hover.selected, table.dataTable.display tbody tr:hover.selected {
|
||||
background-color: #aab7d1;
|
||||
}
|
||||
table.dataTable.order-column tbody tr > .sorting_1,
|
||||
table.dataTable.order-column tbody tr > .sorting_2,
|
||||
table.dataTable.order-column tbody tr > .sorting_3, table.dataTable.display tbody tr > .sorting_1,
|
||||
table.dataTable.display tbody tr > .sorting_2,
|
||||
table.dataTable.display tbody tr > .sorting_3 {
|
||||
background-color: #fafafa;
|
||||
}
|
||||
table.dataTable.order-column tbody tr.selected > .sorting_1,
|
||||
table.dataTable.order-column tbody tr.selected > .sorting_2,
|
||||
table.dataTable.order-column tbody tr.selected > .sorting_3, table.dataTable.display tbody tr.selected > .sorting_1,
|
||||
table.dataTable.display tbody tr.selected > .sorting_2,
|
||||
table.dataTable.display tbody tr.selected > .sorting_3 {
|
||||
background-color: #acbad5;
|
||||
}
|
||||
table.dataTable.display tbody tr.odd > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd > .sorting_1 {
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
table.dataTable.display tbody tr.odd > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd > .sorting_2 {
|
||||
background-color: #f3f3f3;
|
||||
}
|
||||
table.dataTable.display tbody tr.odd > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd > .sorting_3 {
|
||||
background-color: whitesmoke;
|
||||
}
|
||||
table.dataTable.display tbody tr.odd.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_1 {
|
||||
background-color: #a6b4cd;
|
||||
}
|
||||
table.dataTable.display tbody tr.odd.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_2 {
|
||||
background-color: #a8b5cf;
|
||||
}
|
||||
table.dataTable.display tbody tr.odd.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_3 {
|
||||
background-color: #a9b7d1;
|
||||
}
|
||||
table.dataTable.display tbody tr.even > .sorting_1, table.dataTable.order-column.stripe tbody tr.even > .sorting_1 {
|
||||
background-color: #fafafa;
|
||||
}
|
||||
table.dataTable.display tbody tr.even > .sorting_2, table.dataTable.order-column.stripe tbody tr.even > .sorting_2 {
|
||||
background-color: #fcfcfc;
|
||||
}
|
||||
table.dataTable.display tbody tr.even > .sorting_3, table.dataTable.order-column.stripe tbody tr.even > .sorting_3 {
|
||||
background-color: #fefefe;
|
||||
}
|
||||
table.dataTable.display tbody tr.even.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_1 {
|
||||
background-color: #acbad5;
|
||||
}
|
||||
table.dataTable.display tbody tr.even.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_2 {
|
||||
background-color: #aebcd6;
|
||||
}
|
||||
table.dataTable.display tbody tr.even.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_3 {
|
||||
background-color: #afbdd8;
|
||||
}
|
||||
table.dataTable.display tbody tr:hover > .sorting_1, table.dataTable.order-column.hover tbody tr:hover > .sorting_1 {
|
||||
background-color: #eaeaea;
|
||||
}
|
||||
table.dataTable.display tbody tr:hover > .sorting_2, table.dataTable.order-column.hover tbody tr:hover > .sorting_2 {
|
||||
background-color: #ececec;
|
||||
}
|
||||
table.dataTable.display tbody tr:hover > .sorting_3, table.dataTable.order-column.hover tbody tr:hover > .sorting_3 {
|
||||
background-color: #efefef;
|
||||
}
|
||||
table.dataTable.display tbody tr:hover.selected > .sorting_1, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_1 {
|
||||
background-color: #a2aec7;
|
||||
}
|
||||
table.dataTable.display tbody tr:hover.selected > .sorting_2, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_2 {
|
||||
background-color: #a3b0c9;
|
||||
}
|
||||
table.dataTable.display tbody tr:hover.selected > .sorting_3, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_3 {
|
||||
background-color: #a5b2cb;
|
||||
}
|
||||
table.dataTable.no-footer {
|
||||
border-bottom: 1px solid #111;
|
||||
}
|
||||
table.dataTable.nowrap th, table.dataTable.nowrap td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
table.dataTable.compact thead th,
|
||||
table.dataTable.compact thead td {
|
||||
padding: 4px 17px 4px 4px;
|
||||
}
|
||||
table.dataTable.compact tfoot th,
|
||||
table.dataTable.compact tfoot td {
|
||||
padding: 4px;
|
||||
}
|
||||
table.dataTable.compact tbody th,
|
||||
table.dataTable.compact tbody td {
|
||||
padding: 4px;
|
||||
}
|
||||
table.dataTable th.dt-left,
|
||||
table.dataTable td.dt-left {
|
||||
text-align: left;
|
||||
}
|
||||
table.dataTable th.dt-center,
|
||||
table.dataTable td.dt-center,
|
||||
table.dataTable td.dataTables_empty {
|
||||
text-align: center;
|
||||
}
|
||||
table.dataTable th.dt-right,
|
||||
table.dataTable td.dt-right {
|
||||
text-align: right;
|
||||
}
|
||||
table.dataTable th.dt-justify,
|
||||
table.dataTable td.dt-justify {
|
||||
text-align: justify;
|
||||
}
|
||||
table.dataTable th.dt-nowrap,
|
||||
table.dataTable td.dt-nowrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
table.dataTable thead th.dt-head-left,
|
||||
table.dataTable thead td.dt-head-left,
|
||||
table.dataTable tfoot th.dt-head-left,
|
||||
table.dataTable tfoot td.dt-head-left {
|
||||
text-align: left;
|
||||
}
|
||||
table.dataTable thead th.dt-head-center,
|
||||
table.dataTable thead td.dt-head-center,
|
||||
table.dataTable tfoot th.dt-head-center,
|
||||
table.dataTable tfoot td.dt-head-center {
|
||||
text-align: center;
|
||||
}
|
||||
table.dataTable thead th.dt-head-right,
|
||||
table.dataTable thead td.dt-head-right,
|
||||
table.dataTable tfoot th.dt-head-right,
|
||||
table.dataTable tfoot td.dt-head-right {
|
||||
text-align: right;
|
||||
}
|
||||
table.dataTable thead th.dt-head-justify,
|
||||
table.dataTable thead td.dt-head-justify,
|
||||
table.dataTable tfoot th.dt-head-justify,
|
||||
table.dataTable tfoot td.dt-head-justify {
|
||||
text-align: justify;
|
||||
}
|
||||
table.dataTable thead th.dt-head-nowrap,
|
||||
table.dataTable thead td.dt-head-nowrap,
|
||||
table.dataTable tfoot th.dt-head-nowrap,
|
||||
table.dataTable tfoot td.dt-head-nowrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
table.dataTable tbody th.dt-body-left,
|
||||
table.dataTable tbody td.dt-body-left {
|
||||
text-align: left;
|
||||
}
|
||||
table.dataTable tbody th.dt-body-center,
|
||||
table.dataTable tbody td.dt-body-center {
|
||||
text-align: center;
|
||||
}
|
||||
table.dataTable tbody th.dt-body-right,
|
||||
table.dataTable tbody td.dt-body-right {
|
||||
text-align: right;
|
||||
}
|
||||
table.dataTable tbody th.dt-body-justify,
|
||||
table.dataTable tbody td.dt-body-justify {
|
||||
text-align: justify;
|
||||
}
|
||||
table.dataTable tbody th.dt-body-nowrap,
|
||||
table.dataTable tbody td.dt-body-nowrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
table.dataTable,
|
||||
table.dataTable th,
|
||||
table.dataTable td {
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
/*
|
||||
* Control feature layout
|
||||
*/
|
||||
.dataTables_wrapper {
|
||||
position: relative;
|
||||
clear: both;
|
||||
*zoom: 1;
|
||||
zoom: 1;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_length {
|
||||
float: left;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_filter {
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_filter input {
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_info {
|
||||
clear: both;
|
||||
float: left;
|
||||
padding-top: 0.755em;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_paginate {
|
||||
float: right;
|
||||
text-align: right;
|
||||
padding-top: 0.25em;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_paginate .paginate_button {
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
min-width: 1.5em;
|
||||
padding: 0.5em 1em;
|
||||
margin-left: 2px;
|
||||
text-align: center;
|
||||
text-decoration: none !important;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
color: #333 !important;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
|
||||
color: #333 !important;
|
||||
border: 1px solid #979797;
|
||||
background-color: white;
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, white), color-stop(100%, #dcdcdc));
|
||||
/* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, white 0%, #dcdcdc 100%);
|
||||
/* Chrome10+,Safari5.1+ */
|
||||
background: -moz-linear-gradient(top, white 0%, #dcdcdc 100%);
|
||||
/* FF3.6+ */
|
||||
background: -ms-linear-gradient(top, white 0%, #dcdcdc 100%);
|
||||
/* IE10+ */
|
||||
background: -o-linear-gradient(top, white 0%, #dcdcdc 100%);
|
||||
/* Opera 11.10+ */
|
||||
background: linear-gradient(to bottom, white 0%, #dcdcdc 100%);
|
||||
/* W3C */
|
||||
}
|
||||
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
|
||||
cursor: default;
|
||||
color: #666 !important;
|
||||
border: 1px solid transparent;
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
|
||||
color: white !important;
|
||||
border: 1px solid #111;
|
||||
background-color: #585858;
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111));
|
||||
/* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #585858 0%, #111 100%);
|
||||
/* Chrome10+,Safari5.1+ */
|
||||
background: -moz-linear-gradient(top, #585858 0%, #111 100%);
|
||||
/* FF3.6+ */
|
||||
background: -ms-linear-gradient(top, #585858 0%, #111 100%);
|
||||
/* IE10+ */
|
||||
background: -o-linear-gradient(top, #585858 0%, #111 100%);
|
||||
/* Opera 11.10+ */
|
||||
background: linear-gradient(to bottom, #585858 0%, #111 100%);
|
||||
/* W3C */
|
||||
}
|
||||
.dataTables_wrapper .dataTables_paginate .paginate_button:active {
|
||||
outline: none;
|
||||
background-color: #2b2b2b;
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c));
|
||||
/* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
|
||||
/* Chrome10+,Safari5.1+ */
|
||||
background: -moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
|
||||
/* FF3.6+ */
|
||||
background: -ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
|
||||
/* IE10+ */
|
||||
background: -o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
|
||||
/* Opera 11.10+ */
|
||||
background: linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%);
|
||||
/* W3C */
|
||||
box-shadow: inset 0 0 3px #111;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_paginate .ellipsis {
|
||||
padding: 0 1em;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_processing {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
margin-left: -50%;
|
||||
margin-top: -25px;
|
||||
padding-top: 20px;
|
||||
text-align: center;
|
||||
font-size: 1.2em;
|
||||
background-color: white;
|
||||
background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(25%, rgba(255, 255, 255, 0.9)), color-stop(75%, rgba(255, 255, 255, 0.9)), color-stop(100%, rgba(255, 255, 255, 0)));
|
||||
background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
|
||||
background: -moz-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
|
||||
background: -ms-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
|
||||
background: -o-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
|
||||
background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
|
||||
}
|
||||
.dataTables_wrapper .dataTables_length,
|
||||
.dataTables_wrapper .dataTables_filter,
|
||||
.dataTables_wrapper .dataTables_info,
|
||||
.dataTables_wrapper .dataTables_processing,
|
||||
.dataTables_wrapper .dataTables_paginate {
|
||||
color: #333;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_scroll {
|
||||
clear: both;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody {
|
||||
*margin-top: -1px;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th > div.dataTables_sizing,
|
||||
.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td > div.dataTables_sizing, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th > div.dataTables_sizing,
|
||||
.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td > div.dataTables_sizing {
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
.dataTables_wrapper.no-footer .dataTables_scrollBody {
|
||||
border-bottom: 1px solid #111;
|
||||
}
|
||||
.dataTables_wrapper.no-footer div.dataTables_scrollHead table.dataTable,
|
||||
.dataTables_wrapper.no-footer div.dataTables_scrollBody > table {
|
||||
border-bottom: none;
|
||||
}
|
||||
.dataTables_wrapper:after {
|
||||
visibility: hidden;
|
||||
display: block;
|
||||
content: "";
|
||||
clear: both;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 767px) {
|
||||
.dataTables_wrapper .dataTables_info,
|
||||
.dataTables_wrapper .dataTables_paginate {
|
||||
float: none;
|
||||
text-align: center;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_paginate {
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 640px) {
|
||||
.dataTables_wrapper .dataTables_length,
|
||||
.dataTables_wrapper .dataTables_filter {
|
||||
float: none;
|
||||
text-align: center;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_filter {
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
}
|
File diff suppressed because one or more lines are too long
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 160 B |
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 148 B |
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 201 B |
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 158 B |
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 146 B |
|
@ -0,0 +1,182 @@
|
|||
/*! DataTables Bootstrap 3 integration
|
||||
* ©2011-2015 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* DataTables integration for Bootstrap 3. This requires Bootstrap 3 and
|
||||
* DataTables 1.10 or newer.
|
||||
*
|
||||
* This file sets the defaults and adds options to DataTables to style its
|
||||
* controls using Bootstrap. See http://datatables.net/manual/styling/bootstrap
|
||||
* for further information.
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
// AMD
|
||||
define(["jquery", "datatables.net"], function ($) {
|
||||
return factory($, window, document);
|
||||
});
|
||||
} else if (typeof exports === "object") {
|
||||
// CommonJS
|
||||
module.exports = function (root, $) {
|
||||
if (!root) {
|
||||
root = window;
|
||||
}
|
||||
|
||||
if (!$ || !$.fn.dataTable) {
|
||||
// Require DataTables, which attaches to jQuery, including
|
||||
// jQuery if needed and have a $ property so we can access the
|
||||
// jQuery object that is used
|
||||
$ = require("datatables.net")(root, $).$;
|
||||
}
|
||||
|
||||
return factory($, root, root.document);
|
||||
};
|
||||
} else {
|
||||
// Browser
|
||||
factory(jQuery, window, document);
|
||||
}
|
||||
})(function ($, window, document, undefined) {
|
||||
"use strict";
|
||||
var DataTable = $.fn.dataTable;
|
||||
|
||||
/* Set the defaults for DataTables initialisation */
|
||||
$.extend(true, DataTable.defaults, {
|
||||
dom:
|
||||
"<'row'<'col-sm-6'l><'col-sm-6'f>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
renderer: "bootstrap",
|
||||
});
|
||||
|
||||
/* Default class modification */
|
||||
$.extend(DataTable.ext.classes, {
|
||||
sWrapper: "dataTables_wrapper form-inline dt-bootstrap",
|
||||
sFilterInput: "form-control input-sm",
|
||||
sLengthSelect: "form-control input-sm",
|
||||
sProcessing: "dataTables_processing panel panel-default",
|
||||
});
|
||||
|
||||
/* Bootstrap paging button renderer */
|
||||
DataTable.ext.renderer.pageButton.bootstrap = function (
|
||||
settings,
|
||||
host,
|
||||
idx,
|
||||
buttons,
|
||||
page,
|
||||
pages
|
||||
) {
|
||||
var api = new DataTable.Api(settings);
|
||||
var classes = settings.oClasses;
|
||||
var lang = settings.oLanguage.oPaginate;
|
||||
var aria = settings.oLanguage.oAria.paginate || {};
|
||||
var btnDisplay,
|
||||
btnClass,
|
||||
counter = 0;
|
||||
|
||||
var attach = function (container, buttons) {
|
||||
var i, ien, node, button;
|
||||
var clickHandler = function (e) {
|
||||
e.preventDefault();
|
||||
if (
|
||||
!$(e.currentTarget).hasClass("disabled") &&
|
||||
api.page() != e.data.action
|
||||
) {
|
||||
api.page(e.data.action).draw("page");
|
||||
}
|
||||
};
|
||||
|
||||
for (i = 0, ien = buttons.length; i < ien; i++) {
|
||||
button = buttons[i];
|
||||
|
||||
if ($.isArray(button)) {
|
||||
attach(container, button);
|
||||
} else {
|
||||
btnDisplay = "";
|
||||
btnClass = "";
|
||||
|
||||
switch (button) {
|
||||
case "ellipsis":
|
||||
btnDisplay = "…";
|
||||
btnClass = "disabled";
|
||||
break;
|
||||
|
||||
case "first":
|
||||
btnDisplay = lang.sFirst;
|
||||
btnClass = button + (page > 0 ? "" : " disabled");
|
||||
break;
|
||||
|
||||
case "previous":
|
||||
btnDisplay = lang.sPrevious;
|
||||
btnClass = button + (page > 0 ? "" : " disabled");
|
||||
break;
|
||||
|
||||
case "next":
|
||||
btnDisplay = lang.sNext;
|
||||
btnClass = button + (page < pages - 1 ? "" : " disabled");
|
||||
break;
|
||||
|
||||
case "last":
|
||||
btnDisplay = lang.sLast;
|
||||
btnClass = button + (page < pages - 1 ? "" : " disabled");
|
||||
break;
|
||||
|
||||
default:
|
||||
btnDisplay = button + 1;
|
||||
btnClass = page === button ? "active" : "";
|
||||
break;
|
||||
}
|
||||
|
||||
if (btnDisplay) {
|
||||
node = $("<li>", {
|
||||
class: classes.sPageButton + " " + btnClass,
|
||||
id:
|
||||
idx === 0 && typeof button === "string"
|
||||
? settings.sTableId + "_" + button
|
||||
: null,
|
||||
})
|
||||
.append(
|
||||
$("<a>", {
|
||||
href: "#",
|
||||
"aria-controls": settings.sTableId,
|
||||
"aria-label": aria[button],
|
||||
"data-dt-idx": counter,
|
||||
tabindex: settings.iTabIndex,
|
||||
}).html(btnDisplay)
|
||||
)
|
||||
.appendTo(container);
|
||||
|
||||
settings.oApi._fnBindAction(node, { action: button }, clickHandler);
|
||||
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// IE9 throws an 'unknown error' if document.activeElement is used
|
||||
// inside an iframe or frame.
|
||||
var activeEl;
|
||||
|
||||
try {
|
||||
// Because this approach is destroying and recreating the paging
|
||||
// elements, focus is lost on the select button which is bad for
|
||||
// accessibility. So we want to restore focus once the draw has
|
||||
// completed
|
||||
activeEl = $(host).find(document.activeElement).data("dt-idx");
|
||||
} catch (e) {}
|
||||
|
||||
attach(
|
||||
$(host).empty().html('<ul class="pagination"/>').children("ul"),
|
||||
buttons
|
||||
);
|
||||
|
||||
if (activeEl !== undefined) {
|
||||
$(host)
|
||||
.find("[data-dt-idx=" + activeEl + "]")
|
||||
.focus();
|
||||
}
|
||||
};
|
||||
|
||||
return DataTable;
|
||||
});
|
|
@ -0,0 +1,110 @@
|
|||
/*!
|
||||
DataTables Bootstrap 3 integration
|
||||
©2011-2015 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
(function (b) {
|
||||
"function" === typeof define && define.amd
|
||||
? define(["jquery", "datatables.net"], function (a) {
|
||||
return b(a, window, document);
|
||||
})
|
||||
: "object" === typeof exports
|
||||
? (module.exports = function (a, d) {
|
||||
a || (a = window);
|
||||
if (!d || !d.fn.dataTable) d = require("datatables.net")(a, d).$;
|
||||
return b(d, a, a.document);
|
||||
})
|
||||
: b(jQuery, window, document);
|
||||
})(function (b, a, d, m) {
|
||||
var f = b.fn.dataTable;
|
||||
b.extend(!0, f.defaults, {
|
||||
dom: "<'row'<'col-sm-6'l><'col-sm-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
renderer: "bootstrap",
|
||||
});
|
||||
b.extend(f.ext.classes, {
|
||||
sWrapper: "dataTables_wrapper form-inline dt-bootstrap",
|
||||
sFilterInput: "form-control input-sm",
|
||||
sLengthSelect: "form-control input-sm",
|
||||
sProcessing: "dataTables_processing panel panel-default",
|
||||
});
|
||||
f.ext.renderer.pageButton.bootstrap = function (a, h, r, s, j, n) {
|
||||
var o = new f.Api(a),
|
||||
t = a.oClasses,
|
||||
k = a.oLanguage.oPaginate,
|
||||
u = a.oLanguage.oAria.paginate || {},
|
||||
e,
|
||||
g,
|
||||
p = 0,
|
||||
q = function (d, f) {
|
||||
var l,
|
||||
h,
|
||||
i,
|
||||
c,
|
||||
m = function (a) {
|
||||
a.preventDefault();
|
||||
!b(a.currentTarget).hasClass("disabled") &&
|
||||
o.page() != a.data.action &&
|
||||
o.page(a.data.action).draw("page");
|
||||
};
|
||||
l = 0;
|
||||
for (h = f.length; l < h; l++)
|
||||
if (((c = f[l]), b.isArray(c))) q(d, c);
|
||||
else {
|
||||
g = e = "";
|
||||
switch (c) {
|
||||
case "ellipsis":
|
||||
e = "…";
|
||||
g = "disabled";
|
||||
break;
|
||||
case "first":
|
||||
e = k.sFirst;
|
||||
g = c + (0 < j ? "" : " disabled");
|
||||
break;
|
||||
case "previous":
|
||||
e = k.sPrevious;
|
||||
g = c + (0 < j ? "" : " disabled");
|
||||
break;
|
||||
case "next":
|
||||
e = k.sNext;
|
||||
g = c + (j < n - 1 ? "" : " disabled");
|
||||
break;
|
||||
case "last":
|
||||
e = k.sLast;
|
||||
g = c + (j < n - 1 ? "" : " disabled");
|
||||
break;
|
||||
default:
|
||||
(e = c + 1), (g = j === c ? "active" : "");
|
||||
}
|
||||
e &&
|
||||
((i = b("<li>", {
|
||||
class: t.sPageButton + " " + g,
|
||||
id:
|
||||
0 === r && "string" === typeof c
|
||||
? a.sTableId + "_" + c
|
||||
: null,
|
||||
})
|
||||
.append(
|
||||
b("<a>", {
|
||||
href: "#",
|
||||
"aria-controls": a.sTableId,
|
||||
"aria-label": u[c],
|
||||
"data-dt-idx": p,
|
||||
tabindex: a.iTabIndex,
|
||||
}).html(e)
|
||||
)
|
||||
.appendTo(d)),
|
||||
a.oApi._fnBindAction(i, { action: c }, m),
|
||||
p++);
|
||||
}
|
||||
},
|
||||
i;
|
||||
try {
|
||||
i = b(h).find(d.activeElement).data("dt-idx");
|
||||
} catch (v) {}
|
||||
q(b(h).empty().html('<ul class="pagination"/>').children("ul"), s);
|
||||
i !== m &&
|
||||
b(h)
|
||||
.find("[data-dt-idx=" + i + "]")
|
||||
.focus();
|
||||
};
|
||||
return f;
|
||||
});
|
|
@ -0,0 +1,184 @@
|
|||
/*! DataTables Bootstrap 3 integration
|
||||
* ©2011-2015 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* DataTables integration for Bootstrap 3. This requires Bootstrap 3 and
|
||||
* DataTables 1.10 or newer.
|
||||
*
|
||||
* This file sets the defaults and adds options to DataTables to style its
|
||||
* controls using Bootstrap. See http://datatables.net/manual/styling/bootstrap
|
||||
* for further information.
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
// AMD
|
||||
define(["jquery", "datatables.net"], function ($) {
|
||||
return factory($, window, document);
|
||||
});
|
||||
} else if (typeof exports === "object") {
|
||||
// CommonJS
|
||||
module.exports = function (root, $) {
|
||||
if (!root) {
|
||||
root = window;
|
||||
}
|
||||
|
||||
if (!$ || !$.fn.dataTable) {
|
||||
// Require DataTables, which attaches to jQuery, including
|
||||
// jQuery if needed and have a $ property so we can access the
|
||||
// jQuery object that is used
|
||||
$ = require("datatables.net")(root, $).$;
|
||||
}
|
||||
|
||||
return factory($, root, root.document);
|
||||
};
|
||||
} else {
|
||||
// Browser
|
||||
factory(jQuery, window, document);
|
||||
}
|
||||
})(function ($, window, document, undefined) {
|
||||
"use strict";
|
||||
var DataTable = $.fn.dataTable;
|
||||
|
||||
/* Set the defaults for DataTables initialisation */
|
||||
$.extend(true, DataTable.defaults, {
|
||||
dom:
|
||||
"<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
||||
renderer: "bootstrap",
|
||||
});
|
||||
|
||||
/* Default class modification */
|
||||
$.extend(DataTable.ext.classes, {
|
||||
sWrapper: "dataTables_wrapper container-fluid dt-bootstrap4",
|
||||
sFilterInput: "form-control form-control-sm",
|
||||
sLengthSelect: "form-control form-control-sm",
|
||||
sProcessing: "dataTables_processing card",
|
||||
sPageButton: "paginate_button page-item",
|
||||
});
|
||||
|
||||
/* Bootstrap paging button renderer */
|
||||
DataTable.ext.renderer.pageButton.bootstrap = function (
|
||||
settings,
|
||||
host,
|
||||
idx,
|
||||
buttons,
|
||||
page,
|
||||
pages
|
||||
) {
|
||||
var api = new DataTable.Api(settings);
|
||||
var classes = settings.oClasses;
|
||||
var lang = settings.oLanguage.oPaginate;
|
||||
var aria = settings.oLanguage.oAria.paginate || {};
|
||||
var btnDisplay,
|
||||
btnClass,
|
||||
counter = 0;
|
||||
|
||||
var attach = function (container, buttons) {
|
||||
var i, ien, node, button;
|
||||
var clickHandler = function (e) {
|
||||
e.preventDefault();
|
||||
if (
|
||||
!$(e.currentTarget).hasClass("disabled") &&
|
||||
api.page() != e.data.action
|
||||
) {
|
||||
api.page(e.data.action).draw("page");
|
||||
}
|
||||
};
|
||||
|
||||
for (i = 0, ien = buttons.length; i < ien; i++) {
|
||||
button = buttons[i];
|
||||
|
||||
if ($.isArray(button)) {
|
||||
attach(container, button);
|
||||
} else {
|
||||
btnDisplay = "";
|
||||
btnClass = "";
|
||||
|
||||
switch (button) {
|
||||
case "ellipsis":
|
||||
btnDisplay = "…";
|
||||
btnClass = "disabled";
|
||||
break;
|
||||
|
||||
case "first":
|
||||
btnDisplay = lang.sFirst;
|
||||
btnClass = button + (page > 0 ? "" : " disabled");
|
||||
break;
|
||||
|
||||
case "previous":
|
||||
btnDisplay = lang.sPrevious;
|
||||
btnClass = button + (page > 0 ? "" : " disabled");
|
||||
break;
|
||||
|
||||
case "next":
|
||||
btnDisplay = lang.sNext;
|
||||
btnClass = button + (page < pages - 1 ? "" : " disabled");
|
||||
break;
|
||||
|
||||
case "last":
|
||||
btnDisplay = lang.sLast;
|
||||
btnClass = button + (page < pages - 1 ? "" : " disabled");
|
||||
break;
|
||||
|
||||
default:
|
||||
btnDisplay = button + 1;
|
||||
btnClass = page === button ? "active" : "";
|
||||
break;
|
||||
}
|
||||
|
||||
if (btnDisplay) {
|
||||
node = $("<li>", {
|
||||
class: classes.sPageButton + " " + btnClass,
|
||||
id:
|
||||
idx === 0 && typeof button === "string"
|
||||
? settings.sTableId + "_" + button
|
||||
: null,
|
||||
})
|
||||
.append(
|
||||
$("<a>", {
|
||||
href: "#",
|
||||
"aria-controls": settings.sTableId,
|
||||
"aria-label": aria[button],
|
||||
"data-dt-idx": counter,
|
||||
tabindex: settings.iTabIndex,
|
||||
class: "page-link",
|
||||
}).html(btnDisplay)
|
||||
)
|
||||
.appendTo(container);
|
||||
|
||||
settings.oApi._fnBindAction(node, { action: button }, clickHandler);
|
||||
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// IE9 throws an 'unknown error' if document.activeElement is used
|
||||
// inside an iframe or frame.
|
||||
var activeEl;
|
||||
|
||||
try {
|
||||
// Because this approach is destroying and recreating the paging
|
||||
// elements, focus is lost on the select button which is bad for
|
||||
// accessibility. So we want to restore focus once the draw has
|
||||
// completed
|
||||
activeEl = $(host).find(document.activeElement).data("dt-idx");
|
||||
} catch (e) {}
|
||||
|
||||
attach(
|
||||
$(host).empty().html('<ul class="pagination"/>').children("ul"),
|
||||
buttons
|
||||
);
|
||||
|
||||
if (activeEl !== undefined) {
|
||||
$(host)
|
||||
.find("[data-dt-idx=" + activeEl + "]")
|
||||
.focus();
|
||||
}
|
||||
};
|
||||
|
||||
return DataTable;
|
||||
});
|
|
@ -0,0 +1,112 @@
|
|||
/*!
|
||||
DataTables Bootstrap 3 integration
|
||||
©2011-2015 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
(function (b) {
|
||||
"function" === typeof define && define.amd
|
||||
? define(["jquery", "datatables.net"], function (a) {
|
||||
return b(a, window, document);
|
||||
})
|
||||
: "object" === typeof exports
|
||||
? (module.exports = function (a, d) {
|
||||
a || (a = window);
|
||||
if (!d || !d.fn.dataTable) d = require("datatables.net")(a, d).$;
|
||||
return b(d, a, a.document);
|
||||
})
|
||||
: b(jQuery, window, document);
|
||||
})(function (b, a, d, m) {
|
||||
var f = b.fn.dataTable;
|
||||
b.extend(!0, f.defaults, {
|
||||
dom: "<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
||||
renderer: "bootstrap",
|
||||
});
|
||||
b.extend(f.ext.classes, {
|
||||
sWrapper: "dataTables_wrapper container-fluid dt-bootstrap4",
|
||||
sFilterInput: "form-control form-control-sm",
|
||||
sLengthSelect: "form-control form-control-sm",
|
||||
sProcessing: "dataTables_processing card",
|
||||
sPageButton: "paginate_button page-item",
|
||||
});
|
||||
f.ext.renderer.pageButton.bootstrap = function (a, h, r, s, j, n) {
|
||||
var o = new f.Api(a),
|
||||
t = a.oClasses,
|
||||
k = a.oLanguage.oPaginate,
|
||||
u = a.oLanguage.oAria.paginate || {},
|
||||
e,
|
||||
g,
|
||||
p = 0,
|
||||
q = function (d, f) {
|
||||
var l,
|
||||
h,
|
||||
i,
|
||||
c,
|
||||
m = function (a) {
|
||||
a.preventDefault();
|
||||
!b(a.currentTarget).hasClass("disabled") &&
|
||||
o.page() != a.data.action &&
|
||||
o.page(a.data.action).draw("page");
|
||||
};
|
||||
l = 0;
|
||||
for (h = f.length; l < h; l++)
|
||||
if (((c = f[l]), b.isArray(c))) q(d, c);
|
||||
else {
|
||||
g = e = "";
|
||||
switch (c) {
|
||||
case "ellipsis":
|
||||
e = "…";
|
||||
g = "disabled";
|
||||
break;
|
||||
case "first":
|
||||
e = k.sFirst;
|
||||
g = c + (0 < j ? "" : " disabled");
|
||||
break;
|
||||
case "previous":
|
||||
e = k.sPrevious;
|
||||
g = c + (0 < j ? "" : " disabled");
|
||||
break;
|
||||
case "next":
|
||||
e = k.sNext;
|
||||
g = c + (j < n - 1 ? "" : " disabled");
|
||||
break;
|
||||
case "last":
|
||||
e = k.sLast;
|
||||
g = c + (j < n - 1 ? "" : " disabled");
|
||||
break;
|
||||
default:
|
||||
(e = c + 1), (g = j === c ? "active" : "");
|
||||
}
|
||||
e &&
|
||||
((i = b("<li>", {
|
||||
class: t.sPageButton + " " + g,
|
||||
id:
|
||||
0 === r && "string" === typeof c
|
||||
? a.sTableId + "_" + c
|
||||
: null,
|
||||
})
|
||||
.append(
|
||||
b("<a>", {
|
||||
href: "#",
|
||||
"aria-controls": a.sTableId,
|
||||
"aria-label": u[c],
|
||||
"data-dt-idx": p,
|
||||
tabindex: a.iTabIndex,
|
||||
class: "page-link",
|
||||
}).html(e)
|
||||
)
|
||||
.appendTo(d)),
|
||||
a.oApi._fnBindAction(i, { action: c }, m),
|
||||
p++);
|
||||
}
|
||||
},
|
||||
i;
|
||||
try {
|
||||
i = b(h).find(d.activeElement).data("dt-idx");
|
||||
} catch (v) {}
|
||||
q(b(h).empty().html('<ul class="pagination"/>').children("ul"), s);
|
||||
i !== m &&
|
||||
b(h)
|
||||
.find("[data-dt-idx=" + i + "]")
|
||||
.focus();
|
||||
};
|
||||
return f;
|
||||
});
|
|
@ -0,0 +1,177 @@
|
|||
/*! DataTables Foundation integration
|
||||
* ©2011-2015 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* DataTables integration for Foundation. This requires Foundation 5 and
|
||||
* DataTables 1.10 or newer.
|
||||
*
|
||||
* This file sets the defaults and adds options to DataTables to style its
|
||||
* controls using Foundation. See http://datatables.net/manual/styling/foundation
|
||||
* for further information.
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
// AMD
|
||||
define(["jquery", "datatables.net"], function ($) {
|
||||
return factory($, window, document);
|
||||
});
|
||||
} else if (typeof exports === "object") {
|
||||
// CommonJS
|
||||
module.exports = function (root, $) {
|
||||
if (!root) {
|
||||
root = window;
|
||||
}
|
||||
|
||||
if (!$ || !$.fn.dataTable) {
|
||||
$ = require("datatables.net")(root, $).$;
|
||||
}
|
||||
|
||||
return factory($, root, root.document);
|
||||
};
|
||||
} else {
|
||||
// Browser
|
||||
factory(jQuery, window, document);
|
||||
}
|
||||
})(function ($, window, document, undefined) {
|
||||
"use strict";
|
||||
var DataTable = $.fn.dataTable;
|
||||
|
||||
// Detect Foundation 5 / 6 as they have different element and class requirements
|
||||
var meta = $('<meta class="foundation-mq"/>').appendTo("head");
|
||||
DataTable.ext.foundationVersion = meta
|
||||
.css("font-family")
|
||||
.match(/small|medium|large/)
|
||||
? 6
|
||||
: 5;
|
||||
meta.remove();
|
||||
|
||||
$.extend(DataTable.ext.classes, {
|
||||
sWrapper: "dataTables_wrapper dt-foundation",
|
||||
sProcessing: "dataTables_processing panel callout",
|
||||
});
|
||||
|
||||
/* Set the defaults for DataTables initialisation */
|
||||
$.extend(true, DataTable.defaults, {
|
||||
dom:
|
||||
"<'row'<'small-6 columns'l><'small-6 columns'f>r>" +
|
||||
"t" +
|
||||
"<'row'<'small-6 columns'i><'small-6 columns'p>>",
|
||||
renderer: "foundation",
|
||||
});
|
||||
|
||||
/* Page button renderer */
|
||||
DataTable.ext.renderer.pageButton.foundation = function (
|
||||
settings,
|
||||
host,
|
||||
idx,
|
||||
buttons,
|
||||
page,
|
||||
pages
|
||||
) {
|
||||
var api = new DataTable.Api(settings);
|
||||
var classes = settings.oClasses;
|
||||
var lang = settings.oLanguage.oPaginate;
|
||||
var aria = settings.oLanguage.oAria.paginate || {};
|
||||
var btnDisplay, btnClass;
|
||||
var tag;
|
||||
var v5 = DataTable.ext.foundationVersion === 5;
|
||||
|
||||
var attach = function (container, buttons) {
|
||||
var i, ien, node, button;
|
||||
var clickHandler = function (e) {
|
||||
e.preventDefault();
|
||||
if (
|
||||
!$(e.currentTarget).hasClass("unavailable") &&
|
||||
api.page() != e.data.action
|
||||
) {
|
||||
api.page(e.data.action).draw("page");
|
||||
}
|
||||
};
|
||||
|
||||
for (i = 0, ien = buttons.length; i < ien; i++) {
|
||||
button = buttons[i];
|
||||
|
||||
if ($.isArray(button)) {
|
||||
attach(container, button);
|
||||
} else {
|
||||
btnDisplay = "";
|
||||
btnClass = "";
|
||||
tag = null;
|
||||
|
||||
switch (button) {
|
||||
case "ellipsis":
|
||||
btnDisplay = "…";
|
||||
btnClass = "unavailable disabled";
|
||||
tag = null;
|
||||
break;
|
||||
|
||||
case "first":
|
||||
btnDisplay = lang.sFirst;
|
||||
btnClass = button + (page > 0 ? "" : " unavailable disabled");
|
||||
tag = page > 0 ? "a" : null;
|
||||
break;
|
||||
|
||||
case "previous":
|
||||
btnDisplay = lang.sPrevious;
|
||||
btnClass = button + (page > 0 ? "" : " unavailable disabled");
|
||||
tag = page > 0 ? "a" : null;
|
||||
break;
|
||||
|
||||
case "next":
|
||||
btnDisplay = lang.sNext;
|
||||
btnClass =
|
||||
button + (page < pages - 1 ? "" : " unavailable disabled");
|
||||
tag = page < pages - 1 ? "a" : null;
|
||||
break;
|
||||
|
||||
case "last":
|
||||
btnDisplay = lang.sLast;
|
||||
btnClass =
|
||||
button + (page < pages - 1 ? "" : " unavailable disabled");
|
||||
tag = page < pages - 1 ? "a" : null;
|
||||
break;
|
||||
|
||||
default:
|
||||
btnDisplay = button + 1;
|
||||
btnClass = page === button ? "current" : "";
|
||||
tag = page === button ? null : "a";
|
||||
break;
|
||||
}
|
||||
|
||||
if (v5) {
|
||||
tag = "a";
|
||||
}
|
||||
|
||||
if (btnDisplay) {
|
||||
node = $("<li>", {
|
||||
class: classes.sPageButton + " " + btnClass,
|
||||
"aria-controls": settings.sTableId,
|
||||
"aria-label": aria[button],
|
||||
tabindex: settings.iTabIndex,
|
||||
id:
|
||||
idx === 0 && typeof button === "string"
|
||||
? settings.sTableId + "_" + button
|
||||
: null,
|
||||
})
|
||||
.append(
|
||||
tag
|
||||
? $("<" + tag + "/>", { href: "#" }).html(btnDisplay)
|
||||
: btnDisplay
|
||||
)
|
||||
.appendTo(container);
|
||||
|
||||
settings.oApi._fnBindAction(node, { action: button }, clickHandler);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
attach(
|
||||
$(host).empty().html('<ul class="pagination"/>').children("ul"),
|
||||
buttons
|
||||
);
|
||||
};
|
||||
|
||||
return DataTable;
|
||||
});
|
|
@ -0,0 +1,109 @@
|
|||
/*!
|
||||
DataTables Foundation integration
|
||||
©2011-2015 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
(function (d) {
|
||||
"function" === typeof define && define.amd
|
||||
? define(["jquery", "datatables.net"], function (a) {
|
||||
return d(a, window, document);
|
||||
})
|
||||
: "object" === typeof exports
|
||||
? (module.exports = function (a, b) {
|
||||
a || (a = window);
|
||||
if (!b || !b.fn.dataTable) b = require("datatables.net")(a, b).$;
|
||||
return d(b, a, a.document);
|
||||
})
|
||||
: d(jQuery, window, document);
|
||||
})(function (d) {
|
||||
var a = d.fn.dataTable,
|
||||
b = d('<meta class="foundation-mq"/>').appendTo("head");
|
||||
a.ext.foundationVersion = b.css("font-family").match(/small|medium|large/)
|
||||
? 6
|
||||
: 5;
|
||||
b.remove();
|
||||
d.extend(a.ext.classes, {
|
||||
sWrapper: "dataTables_wrapper dt-foundation",
|
||||
sProcessing: "dataTables_processing panel callout",
|
||||
});
|
||||
d.extend(!0, a.defaults, {
|
||||
dom: "<'row'<'small-6 columns'l><'small-6 columns'f>r>t<'row'<'small-6 columns'i><'small-6 columns'p>>",
|
||||
renderer: "foundation",
|
||||
});
|
||||
a.ext.renderer.pageButton.foundation = function (b, l, r, s, e, i) {
|
||||
var m = new a.Api(b),
|
||||
t = b.oClasses,
|
||||
j = b.oLanguage.oPaginate,
|
||||
u = b.oLanguage.oAria.paginate || {},
|
||||
f,
|
||||
h,
|
||||
g,
|
||||
v = 5 === a.ext.foundationVersion,
|
||||
q = function (a, n) {
|
||||
var k,
|
||||
o,
|
||||
p,
|
||||
c,
|
||||
l = function (a) {
|
||||
a.preventDefault();
|
||||
!d(a.currentTarget).hasClass("unavailable") &&
|
||||
m.page() != a.data.action &&
|
||||
m.page(a.data.action).draw("page");
|
||||
};
|
||||
k = 0;
|
||||
for (o = n.length; k < o; k++)
|
||||
if (((c = n[k]), d.isArray(c))) q(a, c);
|
||||
else {
|
||||
h = f = "";
|
||||
g = null;
|
||||
switch (c) {
|
||||
case "ellipsis":
|
||||
f = "…";
|
||||
h = "unavailable disabled";
|
||||
g = null;
|
||||
break;
|
||||
case "first":
|
||||
f = j.sFirst;
|
||||
h = c + (0 < e ? "" : " unavailable disabled");
|
||||
g = 0 < e ? "a" : null;
|
||||
break;
|
||||
case "previous":
|
||||
f = j.sPrevious;
|
||||
h = c + (0 < e ? "" : " unavailable disabled");
|
||||
g = 0 < e ? "a" : null;
|
||||
break;
|
||||
case "next":
|
||||
f = j.sNext;
|
||||
h = c + (e < i - 1 ? "" : " unavailable disabled");
|
||||
g = e < i - 1 ? "a" : null;
|
||||
break;
|
||||
case "last":
|
||||
f = j.sLast;
|
||||
h = c + (e < i - 1 ? "" : " unavailable disabled");
|
||||
g = e < i - 1 ? "a" : null;
|
||||
break;
|
||||
default:
|
||||
(f = c + 1),
|
||||
(h = e === c ? "current" : ""),
|
||||
(g = e === c ? null : "a");
|
||||
}
|
||||
v && (g = "a");
|
||||
f &&
|
||||
((p = d("<li>", {
|
||||
class: t.sPageButton + " " + h,
|
||||
"aria-controls": b.sTableId,
|
||||
"aria-label": u[c],
|
||||
tabindex: b.iTabIndex,
|
||||
id:
|
||||
0 === r && "string" === typeof c
|
||||
? b.sTableId + "_" + c
|
||||
: null,
|
||||
})
|
||||
.append(g ? d("<" + g + "/>", { href: "#" }).html(f) : f)
|
||||
.appendTo(a)),
|
||||
b.oApi._fnBindAction(p, { action: c }, l));
|
||||
}
|
||||
};
|
||||
q(d(l).empty().html('<ul class="pagination"/>').children("ul"), s);
|
||||
};
|
||||
return a;
|
||||
});
|
|
@ -0,0 +1,179 @@
|
|||
/*! DataTables jQuery UI integration
|
||||
* ©2011-2014 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* DataTables integration for jQuery UI. This requires jQuery UI and
|
||||
* DataTables 1.10 or newer.
|
||||
*
|
||||
* This file sets the defaults and adds options to DataTables to style its
|
||||
* controls using jQuery UI. See http://datatables.net/manual/styling/jqueryui
|
||||
* for further information.
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
// AMD
|
||||
define(["jquery", "datatables.net"], function ($) {
|
||||
return factory($, window, document);
|
||||
});
|
||||
} else if (typeof exports === "object") {
|
||||
// CommonJS
|
||||
module.exports = function (root, $) {
|
||||
if (!root) {
|
||||
root = window;
|
||||
}
|
||||
|
||||
if (!$ || !$.fn.dataTable) {
|
||||
$ = require("datatables.net")(root, $).$;
|
||||
}
|
||||
|
||||
return factory($, root, root.document);
|
||||
};
|
||||
} else {
|
||||
// Browser
|
||||
factory(jQuery, window, document);
|
||||
}
|
||||
})(function ($, window, document, undefined) {
|
||||
"use strict";
|
||||
var DataTable = $.fn.dataTable;
|
||||
|
||||
var sort_prefix = "css_right ui-icon ui-icon-";
|
||||
var toolbar_prefix =
|
||||
"fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix ui-corner-";
|
||||
|
||||
/* Set the defaults for DataTables initialisation */
|
||||
$.extend(true, DataTable.defaults, {
|
||||
dom:
|
||||
'<"' +
|
||||
toolbar_prefix +
|
||||
'tl ui-corner-tr"lfr>' +
|
||||
"t" +
|
||||
'<"' +
|
||||
toolbar_prefix +
|
||||
'bl ui-corner-br"ip>',
|
||||
renderer: "jqueryui",
|
||||
});
|
||||
|
||||
$.extend(DataTable.ext.classes, {
|
||||
sWrapper: "dataTables_wrapper dt-jqueryui",
|
||||
|
||||
/* Full numbers paging buttons */
|
||||
sPageButton: "fg-button ui-button ui-state-default",
|
||||
sPageButtonActive: "ui-state-disabled",
|
||||
sPageButtonDisabled: "ui-state-disabled",
|
||||
|
||||
/* Features */
|
||||
sPaging:
|
||||
"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi " +
|
||||
"ui-buttonset-multi paging_" /* Note that the type is postfixed */,
|
||||
|
||||
/* Sorting */
|
||||
sSortAsc: "ui-state-default sorting_asc",
|
||||
sSortDesc: "ui-state-default sorting_desc",
|
||||
sSortable: "ui-state-default sorting",
|
||||
sSortableAsc: "ui-state-default sorting_asc_disabled",
|
||||
sSortableDesc: "ui-state-default sorting_desc_disabled",
|
||||
sSortableNone: "ui-state-default sorting_disabled",
|
||||
sSortIcon: "DataTables_sort_icon",
|
||||
|
||||
/* Scrolling */
|
||||
sScrollHead: "dataTables_scrollHead " + "ui-state-default",
|
||||
sScrollFoot: "dataTables_scrollFoot " + "ui-state-default",
|
||||
|
||||
/* Misc */
|
||||
sHeaderTH: "ui-state-default",
|
||||
sFooterTH: "ui-state-default",
|
||||
});
|
||||
|
||||
DataTable.ext.renderer.header.jqueryui = function (
|
||||
settings,
|
||||
cell,
|
||||
column,
|
||||
classes
|
||||
) {
|
||||
// Calculate what the unsorted class should be
|
||||
var noSortAppliedClass = sort_prefix + "caret-2-n-s";
|
||||
var asc = $.inArray("asc", column.asSorting) !== -1;
|
||||
var desc = $.inArray("desc", column.asSorting) !== -1;
|
||||
|
||||
if (!column.bSortable || (!asc && !desc)) {
|
||||
noSortAppliedClass = "";
|
||||
} else if (asc && !desc) {
|
||||
noSortAppliedClass = sort_prefix + "caret-1-n";
|
||||
} else if (!asc && desc) {
|
||||
noSortAppliedClass = sort_prefix + "caret-1-s";
|
||||
}
|
||||
|
||||
// Setup the DOM structure
|
||||
$("<div/>")
|
||||
.addClass("DataTables_sort_wrapper")
|
||||
.append(cell.contents())
|
||||
.append(
|
||||
$("<span/>").addClass(classes.sSortIcon + " " + noSortAppliedClass)
|
||||
)
|
||||
.appendTo(cell);
|
||||
|
||||
// Attach a sort listener to update on sort
|
||||
$(settings.nTable).on("order.dt", function (e, ctx, sorting, columns) {
|
||||
if (settings !== ctx) {
|
||||
return;
|
||||
}
|
||||
|
||||
var colIdx = column.idx;
|
||||
|
||||
cell
|
||||
.removeClass(classes.sSortAsc + " " + classes.sSortDesc)
|
||||
.addClass(
|
||||
columns[colIdx] == "asc"
|
||||
? classes.sSortAsc
|
||||
: columns[colIdx] == "desc"
|
||||
? classes.sSortDesc
|
||||
: column.sSortingClass
|
||||
);
|
||||
|
||||
cell
|
||||
.find("span." + classes.sSortIcon)
|
||||
.removeClass(
|
||||
sort_prefix +
|
||||
"triangle-1-n" +
|
||||
" " +
|
||||
sort_prefix +
|
||||
"triangle-1-s" +
|
||||
" " +
|
||||
sort_prefix +
|
||||
"caret-2-n-s" +
|
||||
" " +
|
||||
sort_prefix +
|
||||
"caret-1-n" +
|
||||
" " +
|
||||
sort_prefix +
|
||||
"caret-1-s"
|
||||
)
|
||||
.addClass(
|
||||
columns[colIdx] == "asc"
|
||||
? sort_prefix + "triangle-1-n"
|
||||
: columns[colIdx] == "desc"
|
||||
? sort_prefix + "triangle-1-s"
|
||||
: noSortAppliedClass
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
* TableTools jQuery UI compatibility
|
||||
* Required TableTools 2.1+
|
||||
*/
|
||||
if (DataTable.TableTools) {
|
||||
$.extend(true, DataTable.TableTools.classes, {
|
||||
container: "DTTT_container ui-buttonset ui-buttonset-multi",
|
||||
buttons: {
|
||||
normal: "DTTT_button ui-button ui-state-default",
|
||||
},
|
||||
collection: {
|
||||
container: "DTTT_collection ui-buttonset ui-buttonset-multi",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return DataTable;
|
||||
});
|
|
@ -0,0 +1,91 @@
|
|||
/*!
|
||||
DataTables jQuery UI integration
|
||||
©2011-2014 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
(function (a) {
|
||||
"function" === typeof define && define.amd
|
||||
? define(["jquery", "datatables.net"], function (b) {
|
||||
return a(b, window, document);
|
||||
})
|
||||
: "object" === typeof exports
|
||||
? (module.exports = function (b, d) {
|
||||
b || (b = window);
|
||||
if (!d || !d.fn.dataTable) d = require("datatables.net")(b, d).$;
|
||||
return a(d, b, b.document);
|
||||
})
|
||||
: a(jQuery, window, document);
|
||||
})(function (a) {
|
||||
var b = a.fn.dataTable;
|
||||
a.extend(!0, b.defaults, {
|
||||
dom: '<"fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix ui-corner-tl ui-corner-tr"lfr>t<"fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix ui-corner-bl ui-corner-br"ip>',
|
||||
renderer: "jqueryui",
|
||||
});
|
||||
a.extend(b.ext.classes, {
|
||||
sWrapper: "dataTables_wrapper dt-jqueryui",
|
||||
sPageButton: "fg-button ui-button ui-state-default",
|
||||
sPageButtonActive: "ui-state-disabled",
|
||||
sPageButtonDisabled: "ui-state-disabled",
|
||||
sPaging:
|
||||
"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",
|
||||
sSortAsc: "ui-state-default sorting_asc",
|
||||
sSortDesc: "ui-state-default sorting_desc",
|
||||
sSortable: "ui-state-default sorting",
|
||||
sSortableAsc: "ui-state-default sorting_asc_disabled",
|
||||
sSortableDesc: "ui-state-default sorting_desc_disabled",
|
||||
sSortableNone: "ui-state-default sorting_disabled",
|
||||
sSortIcon: "DataTables_sort_icon",
|
||||
sScrollHead: "dataTables_scrollHead ui-state-default",
|
||||
sScrollFoot: "dataTables_scrollFoot ui-state-default",
|
||||
sHeaderTH: "ui-state-default",
|
||||
sFooterTH: "ui-state-default",
|
||||
});
|
||||
b.ext.renderer.header.jqueryui = function (b, h, e, c) {
|
||||
var f = "css_right ui-icon ui-icon-caret-2-n-s",
|
||||
g = -1 !== a.inArray("asc", e.asSorting),
|
||||
i = -1 !== a.inArray("desc", e.asSorting);
|
||||
!e.bSortable || (!g && !i)
|
||||
? (f = "")
|
||||
: g && !i
|
||||
? (f = "css_right ui-icon ui-icon-caret-1-n")
|
||||
: !g && i && (f = "css_right ui-icon ui-icon-caret-1-s");
|
||||
a("<div/>")
|
||||
.addClass("DataTables_sort_wrapper")
|
||||
.append(h.contents())
|
||||
.append(a("<span/>").addClass(c.sSortIcon + " " + f))
|
||||
.appendTo(h);
|
||||
a(b.nTable).on("order.dt", function (a, g, i, j) {
|
||||
b === g &&
|
||||
((a = e.idx),
|
||||
h
|
||||
.removeClass(c.sSortAsc + " " + c.sSortDesc)
|
||||
.addClass(
|
||||
"asc" == j[a]
|
||||
? c.sSortAsc
|
||||
: "desc" == j[a]
|
||||
? c.sSortDesc
|
||||
: e.sSortingClass
|
||||
),
|
||||
h
|
||||
.find("span." + c.sSortIcon)
|
||||
.removeClass(
|
||||
"css_right ui-icon ui-icon-triangle-1-n css_right ui-icon ui-icon-triangle-1-s css_right ui-icon ui-icon-caret-2-n-s css_right ui-icon ui-icon-caret-1-n css_right ui-icon ui-icon-caret-1-s"
|
||||
)
|
||||
.addClass(
|
||||
"asc" == j[a]
|
||||
? "css_right ui-icon ui-icon-triangle-1-n"
|
||||
: "desc" == j[a]
|
||||
? "css_right ui-icon ui-icon-triangle-1-s"
|
||||
: f
|
||||
));
|
||||
});
|
||||
};
|
||||
b.TableTools &&
|
||||
a.extend(!0, b.TableTools.classes, {
|
||||
container: "DTTT_container ui-buttonset ui-buttonset-multi",
|
||||
buttons: { normal: "DTTT_button ui-button ui-state-default" },
|
||||
collection: {
|
||||
container: "DTTT_collection ui-buttonset ui-buttonset-multi",
|
||||
},
|
||||
});
|
||||
return b;
|
||||
});
|
|
@ -0,0 +1,208 @@
|
|||
/*! DataTables Bootstrap 3 integration
|
||||
* ©2011-2015 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* DataTables integration for Bootstrap 3. This requires Bootstrap 3 and
|
||||
* DataTables 1.10 or newer.
|
||||
*
|
||||
* This file sets the defaults and adds options to DataTables to style its
|
||||
* controls using Bootstrap. See http://datatables.net/manual/styling/bootstrap
|
||||
* for further information.
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
// AMD
|
||||
define(["jquery", "datatables.net"], function ($) {
|
||||
return factory($, window, document);
|
||||
});
|
||||
} else if (typeof exports === "object") {
|
||||
// CommonJS
|
||||
module.exports = function (root, $) {
|
||||
if (!root) {
|
||||
root = window;
|
||||
}
|
||||
|
||||
if (!$ || !$.fn.dataTable) {
|
||||
// Require DataTables, which attaches to jQuery, including
|
||||
// jQuery if needed and have a $ property so we can access the
|
||||
// jQuery object that is used
|
||||
$ = require("datatables.net")(root, $).$;
|
||||
}
|
||||
|
||||
return factory($, root, root.document);
|
||||
};
|
||||
} else {
|
||||
// Browser
|
||||
factory(jQuery, window, document);
|
||||
}
|
||||
})(function ($, window, document, undefined) {
|
||||
"use strict";
|
||||
var DataTable = $.fn.dataTable;
|
||||
|
||||
/* Set the defaults for DataTables initialisation */
|
||||
$.extend(true, DataTable.defaults, {
|
||||
dom:
|
||||
"<'ui stackable grid'" +
|
||||
"<'row'" +
|
||||
"<'eight wide column'l>" +
|
||||
"<'right aligned eight wide column'f>" +
|
||||
">" +
|
||||
"<'row dt-table'" +
|
||||
"<'sixteen wide column'tr>" +
|
||||
">" +
|
||||
"<'row'" +
|
||||
"<'seven wide column'i>" +
|
||||
"<'right aligned nine wide column'p>" +
|
||||
">" +
|
||||
">",
|
||||
renderer: "semanticUI",
|
||||
});
|
||||
|
||||
/* Default class modification */
|
||||
$.extend(DataTable.ext.classes, {
|
||||
sWrapper: "dataTables_wrapper dt-semanticUI",
|
||||
sFilter: "dataTables_filter ui input",
|
||||
sProcessing: "dataTables_processing ui segment",
|
||||
sPageButton: "paginate_button item",
|
||||
});
|
||||
|
||||
/* Bootstrap paging button renderer */
|
||||
DataTable.ext.renderer.pageButton.semanticUI = function (
|
||||
settings,
|
||||
host,
|
||||
idx,
|
||||
buttons,
|
||||
page,
|
||||
pages
|
||||
) {
|
||||
var api = new DataTable.Api(settings);
|
||||
var classes = settings.oClasses;
|
||||
var lang = settings.oLanguage.oPaginate;
|
||||
var aria = settings.oLanguage.oAria.paginate || {};
|
||||
var btnDisplay,
|
||||
btnClass,
|
||||
counter = 0;
|
||||
|
||||
var attach = function (container, buttons) {
|
||||
var i, ien, node, button;
|
||||
var clickHandler = function (e) {
|
||||
e.preventDefault();
|
||||
if (
|
||||
!$(e.currentTarget).hasClass("disabled") &&
|
||||
api.page() != e.data.action
|
||||
) {
|
||||
api.page(e.data.action).draw("page");
|
||||
}
|
||||
};
|
||||
|
||||
for (i = 0, ien = buttons.length; i < ien; i++) {
|
||||
button = buttons[i];
|
||||
|
||||
if ($.isArray(button)) {
|
||||
attach(container, button);
|
||||
} else {
|
||||
btnDisplay = "";
|
||||
btnClass = "";
|
||||
|
||||
switch (button) {
|
||||
case "ellipsis":
|
||||
btnDisplay = "…";
|
||||
btnClass = "disabled";
|
||||
break;
|
||||
|
||||
case "first":
|
||||
btnDisplay = lang.sFirst;
|
||||
btnClass = button + (page > 0 ? "" : " disabled");
|
||||
break;
|
||||
|
||||
case "previous":
|
||||
btnDisplay = lang.sPrevious;
|
||||
btnClass = button + (page > 0 ? "" : " disabled");
|
||||
break;
|
||||
|
||||
case "next":
|
||||
btnDisplay = lang.sNext;
|
||||
btnClass = button + (page < pages - 1 ? "" : " disabled");
|
||||
break;
|
||||
|
||||
case "last":
|
||||
btnDisplay = lang.sLast;
|
||||
btnClass = button + (page < pages - 1 ? "" : " disabled");
|
||||
break;
|
||||
|
||||
default:
|
||||
btnDisplay = button + 1;
|
||||
btnClass = page === button ? "active" : "";
|
||||
break;
|
||||
}
|
||||
|
||||
var tag = btnClass.indexOf("disabled") === -1 ? "a" : "div";
|
||||
|
||||
if (btnDisplay) {
|
||||
node = $("<" + tag + ">", {
|
||||
class: classes.sPageButton + " " + btnClass,
|
||||
id:
|
||||
idx === 0 && typeof button === "string"
|
||||
? settings.sTableId + "_" + button
|
||||
: null,
|
||||
href: "#",
|
||||
"aria-controls": settings.sTableId,
|
||||
"aria-label": aria[button],
|
||||
"data-dt-idx": counter,
|
||||
tabindex: settings.iTabIndex,
|
||||
})
|
||||
.html(btnDisplay)
|
||||
.appendTo(container);
|
||||
|
||||
settings.oApi._fnBindAction(node, { action: button }, clickHandler);
|
||||
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// IE9 throws an 'unknown error' if document.activeElement is used
|
||||
// inside an iframe or frame.
|
||||
var activeEl;
|
||||
|
||||
try {
|
||||
// Because this approach is destroying and recreating the paging
|
||||
// elements, focus is lost on the select button which is bad for
|
||||
// accessibility. So we want to restore focus once the draw has
|
||||
// completed
|
||||
activeEl = $(host).find(document.activeElement).data("dt-idx");
|
||||
} catch (e) {}
|
||||
|
||||
attach(
|
||||
$(host)
|
||||
.empty()
|
||||
.html('<div class="ui stackable pagination menu"/>')
|
||||
.children(),
|
||||
buttons
|
||||
);
|
||||
|
||||
if (activeEl !== undefined) {
|
||||
$(host)
|
||||
.find("[data-dt-idx=" + activeEl + "]")
|
||||
.focus();
|
||||
}
|
||||
};
|
||||
|
||||
// Javascript enhancements on table initialisation
|
||||
$(document).on("init.dt", function (e, ctx) {
|
||||
if (e.namespace !== "dt") {
|
||||
return;
|
||||
}
|
||||
|
||||
// Length menu drop down
|
||||
if ($.fn.dropdown) {
|
||||
var api = new $.fn.dataTable.Api(ctx);
|
||||
|
||||
$("div.dataTables_length select", api.table().container()).dropdown();
|
||||
}
|
||||
});
|
||||
|
||||
return DataTable;
|
||||
});
|
|
@ -0,0 +1,120 @@
|
|||
/*!
|
||||
DataTables Bootstrap 3 integration
|
||||
©2011-2015 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
(function (b) {
|
||||
"function" === typeof define && define.amd
|
||||
? define(["jquery", "datatables.net"], function (a) {
|
||||
return b(a, window, document);
|
||||
})
|
||||
: "object" === typeof exports
|
||||
? (module.exports = function (a, d) {
|
||||
a || (a = window);
|
||||
if (!d || !d.fn.dataTable) d = require("datatables.net")(a, d).$;
|
||||
return b(d, a, a.document);
|
||||
})
|
||||
: b(jQuery, window, document);
|
||||
})(function (b, a, d, m) {
|
||||
var e = b.fn.dataTable;
|
||||
b.extend(!0, e.defaults, {
|
||||
dom: "<'ui stackable grid'<'row'<'eight wide column'l><'right aligned eight wide column'f>><'row dt-table'<'sixteen wide column'tr>><'row'<'seven wide column'i><'right aligned nine wide column'p>>>",
|
||||
renderer: "semanticUI",
|
||||
});
|
||||
b.extend(e.ext.classes, {
|
||||
sWrapper: "dataTables_wrapper dt-semanticUI",
|
||||
sFilter: "dataTables_filter ui input",
|
||||
sProcessing: "dataTables_processing ui segment",
|
||||
sPageButton: "paginate_button item",
|
||||
});
|
||||
e.ext.renderer.pageButton.semanticUI = function (h, a, r, s, j, n) {
|
||||
var o = new e.Api(h),
|
||||
t = h.oClasses,
|
||||
k = h.oLanguage.oPaginate,
|
||||
u = h.oLanguage.oAria.paginate || {},
|
||||
f,
|
||||
g,
|
||||
p = 0,
|
||||
q = function (a, d) {
|
||||
var e,
|
||||
i,
|
||||
l,
|
||||
c,
|
||||
m = function (a) {
|
||||
a.preventDefault();
|
||||
!b(a.currentTarget).hasClass("disabled") &&
|
||||
o.page() != a.data.action &&
|
||||
o.page(a.data.action).draw("page");
|
||||
};
|
||||
e = 0;
|
||||
for (i = d.length; e < i; e++)
|
||||
if (((c = d[e]), b.isArray(c))) q(a, c);
|
||||
else {
|
||||
g = f = "";
|
||||
switch (c) {
|
||||
case "ellipsis":
|
||||
f = "…";
|
||||
g = "disabled";
|
||||
break;
|
||||
case "first":
|
||||
f = k.sFirst;
|
||||
g = c + (0 < j ? "" : " disabled");
|
||||
break;
|
||||
case "previous":
|
||||
f = k.sPrevious;
|
||||
g = c + (0 < j ? "" : " disabled");
|
||||
break;
|
||||
case "next":
|
||||
f = k.sNext;
|
||||
g = c + (j < n - 1 ? "" : " disabled");
|
||||
break;
|
||||
case "last":
|
||||
f = k.sLast;
|
||||
g = c + (j < n - 1 ? "" : " disabled");
|
||||
break;
|
||||
default:
|
||||
(f = c + 1), (g = j === c ? "active" : "");
|
||||
}
|
||||
l = -1 === g.indexOf("disabled") ? "a" : "div";
|
||||
f &&
|
||||
((l = b("<" + l + ">", {
|
||||
class: t.sPageButton + " " + g,
|
||||
id:
|
||||
0 === r && "string" === typeof c
|
||||
? h.sTableId + "_" + c
|
||||
: null,
|
||||
href: "#",
|
||||
"aria-controls": h.sTableId,
|
||||
"aria-label": u[c],
|
||||
"data-dt-idx": p,
|
||||
tabindex: h.iTabIndex,
|
||||
})
|
||||
.html(f)
|
||||
.appendTo(a)),
|
||||
h.oApi._fnBindAction(l, { action: c }, m),
|
||||
p++);
|
||||
}
|
||||
},
|
||||
i;
|
||||
try {
|
||||
i = b(a).find(d.activeElement).data("dt-idx");
|
||||
} catch (v) {}
|
||||
q(
|
||||
b(a)
|
||||
.empty()
|
||||
.html('<div class="ui stackable pagination menu"/>')
|
||||
.children(),
|
||||
s
|
||||
);
|
||||
i !== m &&
|
||||
b(a)
|
||||
.find("[data-dt-idx=" + i + "]")
|
||||
.focus();
|
||||
};
|
||||
b(d).on("init.dt", function (a, d) {
|
||||
if ("dt" === a.namespace && b.fn.dropdown) {
|
||||
var e = new b.fn.dataTable.Api(d);
|
||||
b("div.dataTables_length select", e.table().container()).dropdown();
|
||||
}
|
||||
});
|
||||
return e;
|
||||
});
|
Plik diff jest za duży
Load Diff
Plik diff jest za duży
Load Diff
|
@ -0,0 +1,216 @@
|
|||
/*
|
||||
* This combined file was created by the DataTables downloader builder:
|
||||
* https://datatables.net/download
|
||||
*
|
||||
* To rebuild or modify this file with the latest versions of the included
|
||||
* software please visit:
|
||||
* https://datatables.net/download/#bs4/dt-1.10.16
|
||||
*
|
||||
* Included libraries:
|
||||
* DataTables 1.10.16
|
||||
*/
|
||||
|
||||
table.dataTable {
|
||||
clear: both;
|
||||
margin-top: 6px !important;
|
||||
margin-bottom: 6px !important;
|
||||
max-width: none !important;
|
||||
border-collapse: separate !important;
|
||||
}
|
||||
table.dataTable td,
|
||||
table.dataTable th {
|
||||
-webkit-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
table.dataTable td.dataTables_empty,
|
||||
table.dataTable th.dataTables_empty {
|
||||
text-align: center;
|
||||
}
|
||||
table.dataTable.nowrap th,
|
||||
table.dataTable.nowrap td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
div.dataTables_wrapper div.dataTables_length label {
|
||||
font-weight: normal;
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_length select {
|
||||
width: 75px;
|
||||
display: inline-block;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_filter {
|
||||
text-align: right;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_filter label {
|
||||
font-weight: normal;
|
||||
white-space: nowrap;
|
||||
text-align: left;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_filter input {
|
||||
margin-left: 0.5em;
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_info {
|
||||
padding-top: 0.85em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_paginate {
|
||||
margin: 0;
|
||||
white-space: nowrap;
|
||||
text-align: right;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_paginate ul.pagination {
|
||||
margin: 2px 0;
|
||||
white-space: nowrap;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_processing {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 200px;
|
||||
margin-left: -100px;
|
||||
margin-top: -26px;
|
||||
text-align: center;
|
||||
padding: 1em 0;
|
||||
}
|
||||
|
||||
table.dataTable thead > tr > th.sorting_asc, table.dataTable thead > tr > th.sorting_desc, table.dataTable thead > tr > th.sorting,
|
||||
table.dataTable thead > tr > td.sorting_asc,
|
||||
table.dataTable thead > tr > td.sorting_desc,
|
||||
table.dataTable thead > tr > td.sorting {
|
||||
padding-right: 30px;
|
||||
}
|
||||
table.dataTable thead > tr > th:active,
|
||||
table.dataTable thead > tr > td:active {
|
||||
outline: none;
|
||||
}
|
||||
table.dataTable thead .sorting,
|
||||
table.dataTable thead .sorting_asc,
|
||||
table.dataTable thead .sorting_desc,
|
||||
table.dataTable thead .sorting_asc_disabled,
|
||||
table.dataTable thead .sorting_desc_disabled {
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
}
|
||||
table.dataTable thead .sorting:before, table.dataTable thead .sorting:after,
|
||||
table.dataTable thead .sorting_asc:before,
|
||||
table.dataTable thead .sorting_asc:after,
|
||||
table.dataTable thead .sorting_desc:before,
|
||||
table.dataTable thead .sorting_desc:after,
|
||||
table.dataTable thead .sorting_asc_disabled:before,
|
||||
table.dataTable thead .sorting_asc_disabled:after,
|
||||
table.dataTable thead .sorting_desc_disabled:before,
|
||||
table.dataTable thead .sorting_desc_disabled:after {
|
||||
position: absolute;
|
||||
bottom: 0.9em;
|
||||
display: block;
|
||||
opacity: 0.3;
|
||||
}
|
||||
table.dataTable thead .sorting:before,
|
||||
table.dataTable thead .sorting_asc:before,
|
||||
table.dataTable thead .sorting_desc:before,
|
||||
table.dataTable thead .sorting_asc_disabled:before,
|
||||
table.dataTable thead .sorting_desc_disabled:before {
|
||||
right: 1em;
|
||||
content: "\2191";
|
||||
}
|
||||
table.dataTable thead .sorting:after,
|
||||
table.dataTable thead .sorting_asc:after,
|
||||
table.dataTable thead .sorting_desc:after,
|
||||
table.dataTable thead .sorting_asc_disabled:after,
|
||||
table.dataTable thead .sorting_desc_disabled:after {
|
||||
right: 0.5em;
|
||||
content: "\2193";
|
||||
}
|
||||
table.dataTable thead .sorting_asc:before,
|
||||
table.dataTable thead .sorting_desc:after {
|
||||
opacity: 1;
|
||||
}
|
||||
table.dataTable thead .sorting_asc_disabled:before,
|
||||
table.dataTable thead .sorting_desc_disabled:after {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
div.dataTables_scrollHead table.dataTable {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
div.dataTables_scrollBody table {
|
||||
border-top: none;
|
||||
margin-top: 0 !important;
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
div.dataTables_scrollBody table thead .sorting:after,
|
||||
div.dataTables_scrollBody table thead .sorting_asc:after,
|
||||
div.dataTables_scrollBody table thead .sorting_desc:after {
|
||||
display: none;
|
||||
}
|
||||
div.dataTables_scrollBody table tbody tr:first-child th,
|
||||
div.dataTables_scrollBody table tbody tr:first-child td {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
div.dataTables_scrollFoot > .dataTables_scrollFootInner {
|
||||
box-sizing: content-box;
|
||||
}
|
||||
div.dataTables_scrollFoot > .dataTables_scrollFootInner > table {
|
||||
margin-top: 0 !important;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 767px) {
|
||||
div.dataTables_wrapper div.dataTables_length,
|
||||
div.dataTables_wrapper div.dataTables_filter,
|
||||
div.dataTables_wrapper div.dataTables_info,
|
||||
div.dataTables_wrapper div.dataTables_paginate {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
table.dataTable.table-sm > thead > tr > th {
|
||||
padding-right: 20px;
|
||||
}
|
||||
table.dataTable.table-sm .sorting:before,
|
||||
table.dataTable.table-sm .sorting_asc:before,
|
||||
table.dataTable.table-sm .sorting_desc:before {
|
||||
top: 5px;
|
||||
right: 0.85em;
|
||||
}
|
||||
table.dataTable.table-sm .sorting:after,
|
||||
table.dataTable.table-sm .sorting_asc:after,
|
||||
table.dataTable.table-sm .sorting_desc:after {
|
||||
top: 5px;
|
||||
}
|
||||
|
||||
table.table-bordered.dataTable th,
|
||||
table.table-bordered.dataTable td {
|
||||
border-left-width: 0;
|
||||
}
|
||||
table.table-bordered.dataTable th:last-child, table.table-bordered.dataTable th:last-child,
|
||||
table.table-bordered.dataTable td:last-child,
|
||||
table.table-bordered.dataTable td:last-child {
|
||||
border-right-width: 0;
|
||||
}
|
||||
table.table-bordered.dataTable tbody th,
|
||||
table.table-bordered.dataTable tbody td {
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
|
||||
div.dataTables_scrollHead table.table-bordered {
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
|
||||
div.table-responsive > div.dataTables_wrapper > div.row {
|
||||
margin: 0;
|
||||
}
|
||||
div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:first-child {
|
||||
padding-left: 0;
|
||||
}
|
||||
div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:last-child {
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
|
Plik diff jest za duży
Load Diff
File diff suppressed because one or more lines are too long
Plik diff jest za duży
Load Diff
|
@ -0,0 +1,66 @@
|
|||
.fc-state-default {
|
||||
text-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.fc-basic-view .fc-body .fc-row {
|
||||
min-height: 5rem;
|
||||
}
|
||||
|
||||
.fc-toolbar .fc-button-group {
|
||||
border: 1px solid #2961ff;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.fc-toolbar .fc-button {
|
||||
background: #2961ff;
|
||||
color: #fff;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.fc-toolbar .fc-button:hover {
|
||||
background: #2961ff;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.fc-toolbar .fc-button.fc-state-active {
|
||||
background: #fff;
|
||||
color: #2961ff;
|
||||
}
|
||||
|
||||
|
||||
.fc-widget-header {
|
||||
border: 0px !important;
|
||||
}
|
||||
|
||||
.fc-widget-content {
|
||||
border-color: rgba(120, 130, 140, 0.13) !important;
|
||||
}
|
||||
|
||||
.fc-widget-content tr {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
|
||||
.fc-view {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.fc-toolbar {
|
||||
margin: 0px;
|
||||
padding: 24px 0px;
|
||||
}
|
||||
|
||||
|
||||
.fc-event {
|
||||
border-radius: 0px;
|
||||
border: none;
|
||||
cursor: move;
|
||||
color: #fff !important;
|
||||
font-size: 13px;
|
||||
margin: 1px -1px 0 -1px;
|
||||
|
||||
padding: 5px 5px;
|
||||
text-align: center;
|
||||
background: #40c4ff;
|
||||
}
|
|
@ -0,0 +1,91 @@
|
|||
/* the norm */
|
||||
#gritter-notice-wrapper {
|
||||
position:fixed;
|
||||
top:50px;
|
||||
right:10px;
|
||||
width:301px;
|
||||
z-index:989;
|
||||
}
|
||||
#gritter-notice-wrapper.top-left {
|
||||
left: 20px;
|
||||
right: auto;
|
||||
}
|
||||
#gritter-notice-wrapper.bottom-right {
|
||||
top: auto;
|
||||
left: auto;
|
||||
bottom: 20px;
|
||||
right: 20px;
|
||||
}
|
||||
#gritter-notice-wrapper.bottom-left {
|
||||
top: auto;
|
||||
right: auto;
|
||||
bottom: 20px;
|
||||
left: 20px;
|
||||
}
|
||||
.gritter-item-wrapper {
|
||||
position:relative;
|
||||
margin:0 0 10px 0;
|
||||
}
|
||||
|
||||
.gritter-top, .gritter-bottom {
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.gritter-item {
|
||||
display:block;
|
||||
background: #f74d4d; /* Old browsers */
|
||||
color:#2b2b2b; box-shadow:3px 3px 20px #000;
|
||||
padding:7px 10px 10px;
|
||||
font-size: 11px; color:#fff;
|
||||
font-family:verdana;
|
||||
}
|
||||
.hover .gritter-item {
|
||||
}
|
||||
.gritter-item p {
|
||||
padding:0;
|
||||
margin:0;
|
||||
word-wrap:break-word;
|
||||
font-size: 10px;
|
||||
line-height: 14px;
|
||||
}
|
||||
.gritter-close {
|
||||
display:none;
|
||||
position:absolute;
|
||||
top:-7px;
|
||||
right:-9px;
|
||||
background:url(../img/gritter.png) no-repeat left top;
|
||||
cursor:pointer;
|
||||
width:30px;
|
||||
height:30px;
|
||||
}
|
||||
.gritter-title {
|
||||
font-size:12px;
|
||||
font-weight:bold;
|
||||
padding:0 0 7px 0;
|
||||
display:block;
|
||||
}
|
||||
.gritter-image {
|
||||
width:32px;
|
||||
height:32px;
|
||||
float:left;
|
||||
margin: 5px;
|
||||
}
|
||||
.gritter-with-image,
|
||||
.gritter-without-image {
|
||||
padding:0;
|
||||
}
|
||||
.gritter-with-image {
|
||||
width:220px;
|
||||
float:right;
|
||||
}
|
||||
/* for the light (white) version of the gritter notice */
|
||||
.gritter-light .gritter-item,
|
||||
.gritter-light .gritter-bottom,
|
||||
.gritter-light .gritter-top,
|
||||
.gritter-light .gritter-close {
|
||||
background-image: url(../img/gritter-light.png);
|
||||
color: #222;
|
||||
}
|
||||
.gritter-light .gritter-title {
|
||||
text-shadow: none;
|
||||
}
|
|
@ -0,0 +1,223 @@
|
|||
(function (b) {
|
||||
b.gritter = {};
|
||||
b.gritter.options = {
|
||||
position: "",
|
||||
class_name: "",
|
||||
fade_in_speed: "medium",
|
||||
fade_out_speed: 1000,
|
||||
time: 6000,
|
||||
};
|
||||
b.gritter.add = function (f) {
|
||||
try {
|
||||
return a.add(f || {});
|
||||
} catch (d) {
|
||||
var c = "Gritter Error: " + d;
|
||||
typeof console != "undefined" && console.error
|
||||
? console.error(c, f)
|
||||
: alert(c);
|
||||
}
|
||||
};
|
||||
b.gritter.remove = function (d, c) {
|
||||
a.removeSpecific(d, c || {});
|
||||
};
|
||||
b.gritter.removeAll = function (c) {
|
||||
a.stop(c || {});
|
||||
};
|
||||
var a = {
|
||||
position: "",
|
||||
fade_in_speed: "",
|
||||
fade_out_speed: "",
|
||||
time: "",
|
||||
_custom_timer: 0,
|
||||
_item_count: 0,
|
||||
_is_setup: 0,
|
||||
_tpl_close: '<div class="gritter-close"></div>',
|
||||
_tpl_title: '<span class="gritter-title">[[title]]</span>',
|
||||
_tpl_item:
|
||||
'<div id="gritter-item-[[number]]" class="gritter-item-wrapper [[item_class]]" style="display:none"><div class="gritter-top"></div><div class="gritter-item">[[close]][[image]]<div class="[[class_name]]">[[title]]<p>[[text]]</p></div><div style="clear:both"></div></div><div class="gritter-bottom"></div></div>',
|
||||
_tpl_wrap: '<div id="gritter-notice-wrapper"></div>',
|
||||
add: function (g) {
|
||||
if (typeof g == "string") {
|
||||
g = { text: g };
|
||||
}
|
||||
if (!g.text) {
|
||||
throw 'You must supply "text" parameter.';
|
||||
}
|
||||
if (!this._is_setup) {
|
||||
this._runSetup();
|
||||
}
|
||||
var k = g.title,
|
||||
n = g.text,
|
||||
e = g.image || "",
|
||||
l = g.sticky || false,
|
||||
m = g.class_name || b.gritter.options.class_name,
|
||||
j = b.gritter.options.position,
|
||||
d = g.time || "";
|
||||
this._verifyWrapper();
|
||||
this._item_count++;
|
||||
var f = this._item_count,
|
||||
i = this._tpl_item;
|
||||
b(["before_open", "after_open", "before_close", "after_close"]).each(
|
||||
function (p, q) {
|
||||
a["_" + q + "_" + f] = b.isFunction(g[q]) ? g[q] : function () {};
|
||||
}
|
||||
);
|
||||
this._custom_timer = 0;
|
||||
if (d) {
|
||||
this._custom_timer = d;
|
||||
}
|
||||
var c = e != "" ? '<img src="' + e + '" class="gritter-image" />' : "",
|
||||
h = e != "" ? "gritter-with-image" : "gritter-without-image";
|
||||
if (k) {
|
||||
k = this._str_replace("[[title]]", k, this._tpl_title);
|
||||
} else {
|
||||
k = "";
|
||||
}
|
||||
i = this._str_replace(
|
||||
[
|
||||
"[[title]]",
|
||||
"[[text]]",
|
||||
"[[close]]",
|
||||
"[[image]]",
|
||||
"[[number]]",
|
||||
"[[class_name]]",
|
||||
"[[item_class]]",
|
||||
],
|
||||
[k, n, this._tpl_close, c, this._item_count, h, m],
|
||||
i
|
||||
);
|
||||
if (this["_before_open_" + f]() === false) {
|
||||
return false;
|
||||
}
|
||||
b("#gritter-notice-wrapper").addClass(j).append(i);
|
||||
var o = b("#gritter-item-" + this._item_count);
|
||||
o.fadeIn(this.fade_in_speed, function () {
|
||||
a["_after_open_" + f](b(this));
|
||||
});
|
||||
if (!l) {
|
||||
this._setFadeTimer(o, f);
|
||||
}
|
||||
b(o).bind("mouseenter mouseleave", function (p) {
|
||||
if (p.type == "mouseenter") {
|
||||
if (!l) {
|
||||
a._restoreItemIfFading(b(this), f);
|
||||
}
|
||||
} else {
|
||||
if (!l) {
|
||||
a._setFadeTimer(b(this), f);
|
||||
}
|
||||
}
|
||||
a._hoverState(b(this), p.type);
|
||||
});
|
||||
b(o)
|
||||
.find(".gritter-close")
|
||||
.click(function () {
|
||||
a.removeSpecific(f, {}, null, true);
|
||||
});
|
||||
return f;
|
||||
},
|
||||
_countRemoveWrapper: function (c, d, f) {
|
||||
d.remove();
|
||||
this["_after_close_" + c](d, f);
|
||||
if (b(".gritter-item-wrapper").length == 0) {
|
||||
b("#gritter-notice-wrapper").remove();
|
||||
}
|
||||
},
|
||||
_fade: function (g, d, j, f) {
|
||||
var j = j || {},
|
||||
i = typeof j.fade != "undefined" ? j.fade : true,
|
||||
c = j.speed || this.fade_out_speed,
|
||||
h = f;
|
||||
this["_before_close_" + d](g, h);
|
||||
if (f) {
|
||||
g.unbind("mouseenter mouseleave");
|
||||
}
|
||||
if (i) {
|
||||
g.animate({ opacity: 0 }, c, function () {
|
||||
g.animate({ height: 0 }, 300, function () {
|
||||
a._countRemoveWrapper(d, g, h);
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this._countRemoveWrapper(d, g);
|
||||
}
|
||||
},
|
||||
_hoverState: function (d, c) {
|
||||
if (c == "mouseenter") {
|
||||
d.addClass("hover");
|
||||
d.find(".gritter-close").show();
|
||||
} else {
|
||||
d.removeClass("hover");
|
||||
d.find(".gritter-close").hide();
|
||||
}
|
||||
},
|
||||
removeSpecific: function (c, g, f, d) {
|
||||
if (!f) {
|
||||
var f = b("#gritter-item-" + c);
|
||||
}
|
||||
this._fade(f, c, g || {}, d);
|
||||
},
|
||||
_restoreItemIfFading: function (d, c) {
|
||||
clearTimeout(this["_int_id_" + c]);
|
||||
d.stop().css({ opacity: "", height: "" });
|
||||
},
|
||||
_runSetup: function () {
|
||||
for (opt in b.gritter.options) {
|
||||
this[opt] = b.gritter.options[opt];
|
||||
}
|
||||
this._is_setup = 1;
|
||||
},
|
||||
_setFadeTimer: function (f, d) {
|
||||
var c = this._custom_timer ? this._custom_timer : this.time;
|
||||
this["_int_id_" + d] = setTimeout(function () {
|
||||
a._fade(f, d);
|
||||
}, c);
|
||||
},
|
||||
stop: function (e) {
|
||||
var c = b.isFunction(e.before_close) ? e.before_close : function () {};
|
||||
var f = b.isFunction(e.after_close) ? e.after_close : function () {};
|
||||
var d = b("#gritter-notice-wrapper");
|
||||
c(d);
|
||||
d.fadeOut(function () {
|
||||
b(this).remove();
|
||||
f();
|
||||
});
|
||||
},
|
||||
_str_replace: function (v, e, o, n) {
|
||||
var k = 0,
|
||||
h = 0,
|
||||
t = "",
|
||||
m = "",
|
||||
g = 0,
|
||||
q = 0,
|
||||
l = [].concat(v),
|
||||
c = [].concat(e),
|
||||
u = o,
|
||||
d = c instanceof Array,
|
||||
p = u instanceof Array;
|
||||
u = [].concat(u);
|
||||
if (n) {
|
||||
this.window[n] = 0;
|
||||
}
|
||||
for (k = 0, g = u.length; k < g; k++) {
|
||||
if (u[k] === "") {
|
||||
continue;
|
||||
}
|
||||
for (h = 0, q = l.length; h < q; h++) {
|
||||
t = u[k] + "";
|
||||
m = d ? (c[h] !== undefined ? c[h] : "") : c[0];
|
||||
u[k] = t.split(l[h]).join(m);
|
||||
if (n && u[k] !== t) {
|
||||
this.window[n] += (t.length - u[k].length) / l[h].length;
|
||||
}
|
||||
}
|
||||
}
|
||||
return p ? u : u[0];
|
||||
},
|
||||
_verifyWrapper: function () {
|
||||
if (b("#gritter-notice-wrapper").length == 0) {
|
||||
b("body").append(this._tpl_wrap);
|
||||
}
|
||||
},
|
||||
};
|
||||
})(jQuery);
|
|
@ -0,0 +1,21 @@
|
|||
$(function () {
|
||||
//multicheckbox check for static table no padding
|
||||
$("#mainCheckbox").multicheck($(".listCheckbox"));
|
||||
|
||||
//multicheckbox check for static table with padding
|
||||
$("#mainCheckbox1").multicheck($(".listCheckbox1"));
|
||||
|
||||
/*var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-36251023-1']);
|
||||
_gaq.push(['_setDomainName', 'jqueryscript.net']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script');
|
||||
ga.type = 'text/javascript';
|
||||
ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0];
|
||||
s.parentNode.insertBefore(ga, s);
|
||||
})();*/
|
||||
});
|
|
@ -0,0 +1,33 @@
|
|||
(function ($) {
|
||||
$.fn.multicheck = function ($checkboxes) {
|
||||
$checkboxes = $checkboxes.filter("input[type=checkbox]");
|
||||
if ($checkboxes.length > 0) {
|
||||
this.each(function () {
|
||||
var $this = $(this);
|
||||
$this.click(function () {
|
||||
$checkboxes.prop("checked", this.checked);
|
||||
$this.trigger(
|
||||
this.checked ? "multicheck.allchecked" : "multicheck.nonechecked"
|
||||
);
|
||||
});
|
||||
$checkboxes.on("click change", function () {
|
||||
var checkedItems = $checkboxes.filter(":checked").length;
|
||||
if (checkedItems == 0) {
|
||||
$this[0].indeterminate = false;
|
||||
$this[0].checked = false;
|
||||
$this.trigger("multicheck.nonechecked");
|
||||
} else if (checkedItems == $checkboxes.length) {
|
||||
$this[0].indeterminate = false;
|
||||
$this[0].checked = true;
|
||||
$this.trigger("multicheck.allchecked");
|
||||
} else {
|
||||
$this[0].checked = false;
|
||||
$this[0].indeterminate = true;
|
||||
$this.trigger("multicheck.somechecked");
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
return this;
|
||||
};
|
||||
})(jQuery);
|
|
@ -0,0 +1,63 @@
|
|||
/* The customcheckbox */
|
||||
.customcheckbox {
|
||||
display: block;
|
||||
position: relative;
|
||||
padding-left: 24px;
|
||||
font-weight: 100;
|
||||
/*margin-bottom: 12px;*/
|
||||
cursor: pointer;
|
||||
font-size: 22px;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none; }
|
||||
|
||||
/* Hide the browser's default checkbox */
|
||||
.customcheckbox input {
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
cursor: pointer; }
|
||||
|
||||
/* Create a custom checkbox */
|
||||
.checkmark {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
background-color: #CDCDCD;
|
||||
border-radius: 6px; }
|
||||
|
||||
/* On mouse-over, add a grey background color */
|
||||
.customcheckbox:hover input ~ .checkmark {
|
||||
background-color: #ccc; }
|
||||
|
||||
/* When the checkbox is checked, add a blue background */
|
||||
.customcheckbox input:checked ~ .checkmark {
|
||||
background-color: #2196BB; }
|
||||
|
||||
/* Create the checkmark/indicator (hidden when not checked) */
|
||||
.checkmark:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
display: none; }
|
||||
|
||||
/* Show the checkmark when checked */
|
||||
.customcheckbox input:checked ~ .checkmark:after {
|
||||
display: block; }
|
||||
|
||||
/* Style the checkmark/indicator */
|
||||
.customcheckbox .checkmark:after {
|
||||
left: 8px;
|
||||
top: 4px;
|
||||
width: 5px;
|
||||
height: 10px;
|
||||
border: solid white;
|
||||
border-width: 0 3px 3px 0;
|
||||
-webkit-transform: rotate(45deg);
|
||||
-ms-transform: rotate(45deg);
|
||||
transform: rotate(45deg); }
|
||||
|
||||
.check-1 {
|
||||
margin-top: 12px;
|
||||
margin-left: 14px; }
|
Plik diff jest za duży
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Ładowanie…
Reference in New Issue