ViewConfigs

The only checks the server makes of a view's config: its kind is a view kind, it is no larger than MAX_CONFIG_BYTES, and the paths a store queries hold what a store can index (referenceProblem). The engine admits its meaning when it opens it.

Properties

Link copied to clipboard
const val KIND: String
Link copied to clipboard

The largest config, in UTF-8 bytes of its JSON, and the longest title: the port's limits on both sides, which the view engine's MAX_VIEW_CONFIG_BYTES and MAX_VIEW_TITLE_LENGTH mirror.

Link copied to clipboard
const val MAX_ID_LENGTH: Int = 256

The longest definition id and panel reference: every store indexes them whole as exact values.

Link copied to clipboard
const val MAX_PANELS: Int = 1000

The most PANELS a config holds.

Link copied to clipboard
const val MAX_TITLE_LENGTH: Int = 120
Link copied to clipboard

Where a dashboard panel (an element of PANELS) references a saved view, in the engine's DashboardPanel: the view it shows (instanceId), the view it opens (opens), and the view or dashboard a press opens (click.instanceId).

Link copied to clipboard
const val PANELS: String

A dashboard's panels, the array of config that references saved views.

Functions

Link copied to clipboard
fun definitionProblem(definitionId: String): String?

What is wrong with definitionId, or null when it is neither blank nor too long.

Link copied to clipboard
fun kindOf(config: Map<String, Any?>): ViewKind?

The kind of config, or null when its kind names none.

Link copied to clipboard
fun problemOf(config: Map<String, Any?>): String?

What is wrong with config, or null when it passes the checks.

Link copied to clipboard

The views the panels of config reference, at any of PANEL_REFERENCES.

Link copied to clipboard
fun titleProblem(title: String): String?

What is wrong with title, or null when, trimmed, it is neither empty nor too long.