Timeline widget
  • 23 Oct 2024
  • 2 Minutos para Ler
  • Contribuintes

Timeline widget


The content is currently unavailable in Portuguese. You are viewing the default English version.
Resumo do artigo

Purpose

The Timeline widget is an interactive widget that displays logged events from a Tulip table. It shows the most recent record on top allowing you to be always up to date.

image

Setup

Required fields:

  • Aggregation ID (Tulip table aggregation)
  • API key (text)
  • Secret (text)
  • Account URL (text)

Optional field:

  • White text (yes/no)
    • Switch to "yes" to change the font color to white. Default acts as "no".

To set up this widget, you need to provide an API key, a Secret and a URL (which looks like your-account.tulip.co). If you don't know what is an API key refer to the next section.

Alternatively, you can set up the widget within the app editor (before running the app) by inputting information directly into the widget's properties.

Once you've provided the necessary information, refresh the widget. At this point, if you have any events in the table, they should be displayed in the widget.

The widget uses an aggregation. Through the aggregation the widget is populated with the events informations. Without this aggregation the widget would need to be refreshed after each insertion to the table to keep it up to date.

How to create an API token

To access the event table, you must have an API token with tables: read permission. Verify that you have one by navigating to the settings section of your instance and then to 'API tokens'. If a workspace is set up, this may be under Workspace settings.

If you already possess a token, it will be listed in that location. Click 'Edit' and make sure tables: read is checked under scopes. If it's checked, you're all set; if not, either adjust the scopes or create a new token.

If no tokens are present, create one by clicking the 'Create API token' button. Assign any name you prefer and then select the scopes, ensuring tables: read is checked and any other scopes as you see fit. Preferably, assign the least amount of privilege necessary, though if uncertain, you may check all options.

Upon clicking 'Create', a window will appear instructing you to save the secret key. Adhere to this because if you lose it and need to regenerate the secret, any locations where the previous secret is used would require updating to the new secret.

How it works

The widget automatically updates when a new record is added to the table. It shows the last events on top. You can change the font if you are using the widget on a darker background.

The table is called Timeline events and has the following columns:

  • ID (text)
    • unique ID for the events, should be created automatically, not intended to be displayed but necessary
  • Title (text)
    • title of the event, it should be concise since it is displayed larger
  • Description (text)
    • if the title is not descriptive enough, more details may be added that is displayed under the Title
  • Type (text)
    • it can be one of the following or left empty: success, error, warning, message, andon, pause, start, stop, msteams
    • there is also a default icon if the type is not given or is none of the previously mentioned
    • they are handled case insensitively in the widget
  • Date Created (metadata, hidden)
    • each record in a Tulip table has metadata (Date created and Date updated) which cannot be modified but can be used in queries

Este artigo foi útil?