flexadminportal
    Preparing search index...

    A class that contains methods for interacting with the Amplify API

    Hierarchy (View Summary)

    Index

    ctx

    _errorFunction: (errors: string[] | number[] | object[]) => void = console.error
    • get amplify(): Client

      Returns Client

    • set amplify(amplify: Client): void

      Parameters

      • amplify: Client

      Returns void

    • get analyzedStats(): (string | number | boolean)[][]

      Returns (string | number | boolean)[][]

    • set errorFunction(error: (errors: string[] | number[] | object[]) => void): void

      Parameters

      • error: (errors: string[] | number[] | object[]) => void

      Returns void

    • Parameters

      • errors: string[] | number[] | object[]

      Returns void

    • Analyze the runs and display the modal window

      Parameters

      • selectedIDs: number[]

        The indices of the selected runs

      Returns Promise<boolean>

      selectedIDs - The indices of the selected runs

    • Averages an array of numbers

      Parameters

      • arr: number[]

        an array of numbers to average

      Returns number

      the average of the elements in the array

    • Parameters

      • path: string
      • handleError: (errors: string[] | number[] | object[]) => void = ...

      Returns Promise<boolean>

    • Executes a lambda function

      Parameters

      • functionName: string

        The name of the lambda function to execute

      • functionArgs: any

        The arguments to pass to the lambda function

      Returns Promise<{ logs: string; result: string }>

      • The API response or error
    • Get all the parameters for a lambda function

      Parameters

      • functionName: string

        The name of the lambda function to execute

      Returns Promise<{ logs: string; result: string }>

      this.executeLambda

    • Check if the full data for a run is available. Note that most browsers will show a 403 error in the console if the data is not available.

      Parameters

      • runID: number

        The ID of the run to check

      Returns Promise<boolean>

      true if the full data is available, false otherwise

    • Loads a text file from S3

      Parameters

      • path: string

        The S3 path to the file

      • handleError: (error: string | number | object) => void = ...

        The error handler

      Returns Promise<string>

      • The file contents
    • Load the full data for a run from S3

      Parameters

      • url: string

        The URL of the full data

      • completion: (m: (string | number | boolean)[][]) => void

        The completion handler

      Returns Promise<void>

      use the completion handler and this.#fullRunData

    • Load runs from the database

      Parameters

      • fieldID: number = 0

        The ID of the field to filter by

      • groupID: number = null

        The ID of the group to filter by

      • teamFieldID: number = 0

        The ID of the team field to filter by

      • deviceID: number = 0

        The ID of the device to filter by

      Returns Promise<RunConnection>

      the list of runs

    • Check if runs have been loaded for the current page

      Parameters

      • page: number

        The current page

      • itemsPerPage: number

        The number of items per page

      Returns boolean

      true if the runs have been loaded, false otherwise