sdr-enthusiasts/docker-planefence

Allow more detail/columns in alert list

Sportsbadger opened this issue · 4 comments

Now that I'm putting together alert lists I have realised that it would be useful to have more data/columns in the alert list, even if they are not used by PA. For example I store the data in this format,

ICAO,Ident,Operator,Type,Mil/Civ/Pol,Tag,Category

As the list grows it would be useful to have this extra data the user knows why the plane is on the list, and to allow for better management of what aircraft should be altered on.

In short - richer tagging of the alert list.

kx1t commented

Currently, you are already able to add on additional fields beyond the Plane Type. (update - actually, you are NOT, but that is fixed with the implementation below)

I suggest we do the following:

  • the first line of the plane-alert-db.txt file is the index to the table
  • the Plane-Alert table will always show ICAO/Transponder ID, Tail, Owner, Equipment/Planetype
  • For any additional fields, if the field name starts with a "#" it will NOT be showed, or if the field name does not start with "#", it will be shown in the table
  • I probably have to limit the number of extra fields to 4 or 5 or so (for a total of 8-9 fields shown) - to ensure it fits on the screen (and to avoid things go wild).

Let me know if this is what you want?

That sounds absolutely perfect. Thank you.

kx1t commented

Implementation pushed to dev:
are you ready to test?

  • update the header of plane-alert-db.txt:
#Transponder ID,Tail,Owner,Equipment,Custom 1,#Custom 2,Custom 3,#Custom 4,Custom 5
  • Now, it will print the NAME of the headers into the table
  • Always start the line with a "#"
  • It ALWAYS use fields 1-4 even if the fieldname starts with "#" (which is will strip off)
  • if you add any of the custom fields -- they WILL show up in the table as long as the fieldname does NOT start with "#". In my example -- it will show fields "Custom 1", "Custom 3", and "Custom 5"
  • You can add up to 7 custom fields (for a total of 11 fields). That's a random limitation - if that's not good enough, let me know
  • You can also do LESS than 7 custom fields or no custom fields -- if you don't add them to the header, they will be ignored
  • Then... edit the rest of the entries in this file and add info into the custom fields
    For example:
#Transponder ID,Tail,Owner,Equipment,Custom 1,#Custom 2,Custom 3,#Custom 4,Custom 5
A0B674,N145NE,NE Life Flight,EuroCopter 45,hello 1, hello 2,hello 3,hello 4,hello 5
A2B2D2,N273NE,NE Life Flight,EuroCopter 45,hello a, hello b,hello c,hello d,hello e

results in this:
https://ramonk.net/planefence-dev/plane-alert/

Also -- see https://ramonk.net/planefence-dev/plane-alert/alertlist.txt for an example of the plane-alert-db.txt file that is used for the website above

Last -- if you want to add a hashtag to the Twitter DM triggered by a Plane-Alert, simply add a $ to the beginning of the custom field. (You cannot combine # and $ - the first character indicates what will be done.). This will only make sense if you have Plane-Alert Twitter DM's configured and enabled.

For example:

#Transponder ID,Tail,Owner,Equipment,$Custom 1,#Custom 2,Custom 3,#Custom 4,$Custom 5
A0B674,N145NE,NE Life Flight,EuroCopter 45,hello 1, hello 2,hello 3,hello 4,hello 5
A2B2D2,N273NE,NE Life Flight,EuroCopter 45,hello a, hello b,hello c,hello d,hello e

If an aircraft with ICAO A2B2D2 is detected, the Twitter DM will have hashtags #helloa #helloe

kx1t commented

Implemented and deployed to dev
8d21d07