WILCO
  • 👩‍🎓User Manual
    • USER MANUAL
      • welcome page
        • create an account
        • login
          • login troubleshooting
        • logout
      • landing page
      • fleet dashboards
        • URL
        • fleet header
        • fleet
        • current alerts
        • map
      • aircraft timeline
        • overview
        • timeline header
          • calendar
          • warnings
          • show cleared
          • show hidden
        • tags
        • custom message
      • dashboards
        • overview
        • header
        • dashboard
        • parameters
          • search parameter
          • plot graph
          • trend chart
      • open a ticket
    • DESIGNER USER MANUAL
      • Manual post
        • copy text
        • upload file
          • CSV insertion
          • elasticsearch aggregation
      • Edit layouts
        • type of layouts
        • manage layouts and uplinks
        • create layout
          • report parser
          • web connector
        • IFT at Layout
      • Edit Fault codes
        • IFT at Fault Code
      • Edit parameters
        • IFT at Parameter
      • Edit Dashboards
        • create new dashboard
        • edit dashboard
        • Dashboards
          • Dashboard drawing tips
            • Illustrator
          • Dashboard rules
            • Libraries
            • Variables
            • Utils
            • Debugging the rules
            • Graphs
              • creation of the graph
              • Set the title of the graph
              • draw some zones
              • draw a serie (curve)
              • draw horizontal line
              • draw vertical line
              • draw circles
              • Example
            • WILCO.alertWarning
              • WILCO.alertInfo
            • WILCO.alertError
            • WILCO.api
            • WILCO.user
            • WILCO.getEventsForFwot
            • WILCO.getEventsForFwotMinMaxDate
            • WILCO.getSamplesForFwot
            • WILCO.getSamplesForFwotMinMaxDate
            • WILCO.getSampleTableForFwot
            • WILCO.getSamplesTableForFwotMinMaxDate
            • WILCO.getEventsStats
            • WILCO.dsv
            • WILCO.uplink
      • Edit Trends
        • create new trend
        • edit trend
        • Trends
          • Use the tags
          • Access to the surrounding values
      • Edit IFTs
        • edit IFT
        • create an IFT
        • IFT V2
          • moment
          • underscore
          • current Fwot
          • Samples
          • FW.api
          • FW.getWilcoUrls
          • FW.http
          • FW.getEvent
          • FW.getOtherEvent
          • FW.getEvents
          • FW.getFwot
          • FW.getFwots
          • FW.notify <deprecated>
          • FW.notifyWithTemplate <deprecated>
          • FW.email
          • FW.setFrom
          • FW.setTo
          • FW.setTitle
          • FW.setVisible
          • FW.setSeverity
          • FW.setComputedDate
          • FW.setStyle
          • FW.getSamples
          • FW.report
          • FW.reportInfo
          • FW.reportWarn
          • FW.reportFault
          • FW.reportError
          • FW.log
          • FW.updateProperties
          • FW.setFlightStatus
          • FW.setLoc
          • FW.uplink
          • FW.set
          • FW.updateSomeFwotProperty
          • FW.updateFwotProperty
          • FW.removeFwotProperty
          • FW.removeSomeFwotProperty
          • FW.tag
          • FW.untag
          • FW.postEvent
          • FW.reportFaultCode
          • FW.querySamples
          • FW.getRaw
          • FW.getBit
          • FW.csv
          • FW.machineLearningPredict
          • FW.webhook
          • FW.getPlugins()
          • FW.json
      • Show Uplinks
      • General Conf
        • Assets
          • Fwots
        • Configuration
          • Constants
          • Docs
          • Event tables
            • Tables
              • JSON structure
                • Title
                • filters
                • cols
                  • Fields of a column
                • Example
      • examples
        • flow of the data
        • use Constants
        • use Doc
        • use EventTable
        • use algorithm on trends
      • Code snippets
        • Get the last UPLINK message with filters
        • Automatically handle faultcodes according to a doc and a regex
        • Get the current airport
        • goto a page from a dashboard
        • get the samples and events over the 3 last legs
        • Webhooks: Get data from typeform and post it to ELK
        • Download a file from a SVG click
        • Clone a SVG template with D3
        • Cheat sheet
    • ADMIN USER MANUAL
      • General Conf
        • Access rights
          • API keys
          • Users
        • Assets
          • Airlines
          • Fwot types
          • Fwots
        • Configuration
          • App configs
            • UPLINK_ROUTING
            • SEND_MAIL
            • DO_UPLINK
            • UPLINK_PATH
            • MAX_DAYS_WITHOUT_EVENTS
            • ACARS_RECIPIENT
            • MAIL_TEMPLATE
            • USE_CURRENT_DATE
            • DO_UPLINK_AUTOMATIC_BLACKLIST
            • DO_UPLINK_MANUAL_BLACKLIST
            • UPLINK_EXPIRATION_MINUTES
          • Bookmarks
          • Constants
          • Docs
          • Event tables
          • Plugins
        • Swiss knife
      • Edit Plugins
        • Commit plugin
        • Deploy plugin
    • Q&A
  • 🔌Plugins
    • fw.ata49
      • Minimum requirements
      • Configuration
    • fw.fuelsave
      • Minimum requirements
      • Configuration
    • fw.opticooling
      • Minimum requirements
      • Configuration
    • fw.taxi
      • Minimum requirements
      • Configuration
    • fw.turnaround
Powered by GitBook
On this page

Was this helpful?

  1. User Manual
  2. DESIGNER USER MANUAL
  3. Edit Dashboards
  4. Dashboards
  5. Dashboard rules

Variables

WILCO automatically sets some variables as the context of the call of any dashboard rule

scope.anims

A dictionnary with all the _anims. The key is the name of the anim, and the value is the anim itself.

scope.samples

even if the samples are accessible one by one, you may want to have an object with each one. The scope.samples object is for you. Each property is the sample name, and value is the value. You will have all mixed together: constants, samples, and general object (see below)

{
    TAV_LIMIT: 70, 
    COT_MAX: 220, 
    CABIN_TEMP_HOT: 28, 
    OXY_LO: 1150, 
    EVT: {id: "25123609", klass: "CFD", category: "CFD", tags: Array(0), transmissionDate: "2020-04-09T15:17:00", …},
    FWOT: {reg: "B-XXX", coolName: "", category: "aircraft", type: "A330", status: "pwrup", …}
    …
}

{TAV_LIMIT: 70, COT_MAX: 220, CABIN_TEMP_HOT: 28, OXY_LO: 1150, ENG_OIL_LO: 17, …}

URL_PARAMS

an object containing all the url parameters. for example http://localhost:9000/#/APUs/events/807885?timeUnits=weeks&reg=FW-RVL will provide the object

{
	"timeUnits":"weeks",
	"reg":"FW-RVL"
}

Some predefined fields are allowed acording to the page where the dashboard is inserted:

What page

Field name

Description

Fleet page

db

the id of the dashboard

Fleet page

cols

the count of dashboard copies per row

Fleet page

refDate

A date that is the latest date for the requests. Makes it possible to have fleet status in the past. Please note that even if refDate is set, the status of the FWOT is still the current one, not at refDate

If not set, the date is now

Fleet page

count

A number that works in conjunction with unit if not provided, default is 100.

Fleet page

unit

Example: fleet?db=13662458&cols=12&count=5&unit=days&airport=VHHH&refDate=2020-01-14

the request would be on all the samples between the 09 of Jan to the 14th

EVT (use this for a given event)

var theCurrentDate = EVT.computedDate;
//use the variable (display...)
var date = moment(EVT.computedDate)
date.format("dddd, MMMM Do YYYY, h:mm:ss a"); // "Sunday, February 14th 2010, 3:25:50 pm"
date.fromNow(); // 4 hours ago

FWOTS

for (var i = 0; i < FWOTS.length; i++) {
	var fwot = FWOTS[i];
	//do the stuff...
};

FWOT

MY_anim.go().text(FWOT.reg);

if you want to select an aircraft (for example the current event one) you can use underscore to avoid the loop

	var acEvts=_.where(evts, {reg: EVT.reg});

Each sample is described below

DATE (event scope only)

contains the current date in unix timestamp e.g 1381295944000. This is useful to display the current date in the SVG and to compare the current date with the sample date and check if the sample is right on the current date or is from a near timestamp.

you can compare it with DATE == TAT.date or using momentjs.

PreviousLibrariesNextUtils

Last updated 2 months ago

Was this helpful?

To parse, we first check if the string matches known formats, we then check if the string matches the format

a time unit to define the time windows for the display. can be one of

EVT is an object that represents the . you can access the fields like this:

the dates are strings of formatted dates in ISO format (e.g 2014-11-26T23:56:12) you can use to process it

FWOTS is an array of known FWOTs (like in fleet view). The format of each is the same as you can loop on the FWOT array with a standard javascript loop

FWOT contains the current FWOT that is represented in the thumbnail (see )

👩‍🎓
EventV3IO API object
moment.js
FwotV3IO API object
FwotV3IO API object
ISO 8601
RFC 2822 Date time
https://momentjs.com/docs/#/manipulating/add/