Computer labs card

Free workstations in each campus computer lab, how full it is, which operating systems are free, when it closes and whether its printers work.

Category: Schools. Tags: Schools and campuses, Numbers and metrics.

Previews

Computer labs
Canvas
Computer labs
Corner
Computer labs
Chip

Views and forms

Views: canvas, corner, chip. Canvas forms: landscape, portrait, square, strip.

Card views, themes and publishing. Browse the gallery.

Data and privacy

Feed: screenrig.labs/v1.

Feed documents carry source attribution. The Player supplies the feed to the card.

Counts only, never who is at a workstation.

Properties

For theme, background, accent and position, see Common properties.

Set static properties in params. Bind data to a project card data key for live values; that document holds only dynamic properties. Without a data key, put the complete configuration in params. Nested rows describe the contents of their parent property.

Static properties

NameTypeDefaultValues and limitsDescription
titlestring"Computer labs"maxLength: 40
sortstring"feed""feed", "free"feed keeps the order given; free puts the lab with the most free workstations first.
lowPercentinteger20minimum: 1; maximum: 50A lab with this percent or fewer of its workstations free reads Filling up.
showPlatformsbooleantrue
showPrintersbooleantrue
staleMinutesinteger10minimum: 1; maximum: 1440
hour12booleanfalse
timeZonestring, nullnull

Dynamic properties

NameTypeDefaultValues and limitsDescription
labsarray[]minItems: 0; maxItems: 8The labs. A feed (screenrig.labs/v1) wins when present; the data store supplies the same rows otherwise.
labs[].namestringminLength: 1; maxLength: 40; Required
labs[].locationstringmaxLength: 40Building and room: Irving K. Barber, level 2.
labs[].totalintegerminimum: 0; maximum: 2000; RequiredWorkstations in the lab.
labs[].freeintegerminimum: 0; maximum: 2000Workstations free now. Without it the card uses total minus inUse.
labs[].inUseintegerminimum: 0; maximum: 2000
labs[].openbooleantrue
labs[].closesAtstringmaxLength: 32ISO 8601; with an offset or wall time in the screen's zone.
labs[].opensAtstringmaxLength: 32When a closed lab opens next, ISO 8601.
labs[].platformsarraymaxItems: 4Free workstations by operating system.
labs[].platforms[].osstringmaxLength: 20; Required
labs[].platforms[].freeintegerminimum: 0; maximum: 2000; Required
labs[].printersarraymaxItems: 12
labs[].printers[].namestringmaxLength: 30
labs[].printers[].statusstring"ready", "low-paper", "out-of-paper", "low-toner", "out-of-toner", "jam", "offline", "error"; Required
updatedstring""maxLength: 32When the counts were taken, ISO 8601 (data store only; a feed carries fetchedAt).

Canvas example

Add this item to a playlist page’s primitives. Publish the playlist and assign a screen.

{
  "id": "computer-labs",
  "primitive": "card",
  "card": "computer-labs",
  "major": 1,
  "params": {
    "theme": "neomustard"
  },
  "rect": {
    "x": 0,
    "y": 0,
    "width": 1920,
    "height": 1080
  },
  "layer": 0,
  "content_fit": "fill",
  "data": "computer-labs-main"
}

Write live data

Create this document before showing the card, then replace it to update the screen without republishing. Use the same project as the playlist. Supply your API authorization through the environment; see API authentication.

curl --request PUT "https://api.screenrig.ai/api/card-data/computer-labs-main" \
  --header "Authorization: Bearer $SCREENRIG_TOKEN" \
  --header "ScreenRig-Project: $SCREENRIG_PROJECT" \
  --header "Content-Type: application/json" \
  --data '{"document":{"labs":[],"updated":""}}'