Create a dashboard that has a text widget in three screen modes, with a default theme and a fixed UTC timezone. See dashboard playground documentation for more information about the different properties and values.
npm install @luzmo/nodejs-sdkimport Luzmo from '@luzmo/nodejs-sdk';
const client = new Luzmo({
api_key: '<your Luzmo API key>',
api_token: '<your Luzmo API token>',
host: 'https://api.luzmo.com'
});
const response = await client.create('securable',
{
type: "dashboard",
name: {
en: "< Dashboard name >"
},
contents: {
version: "0.1.99",
syncScreenModes: true,
views: [
{
screenModus: "mobile",
options: {
theme: {
id: "default"
}
},
items: [
{
id: "9ac2f36a-2cd3-4e43-874c-6b8914a5d8a8",
type: "text",
position: {
sizeX: 6,
sizeY: 10,
row: 0,
col: 0
},
options: {
display: {
hideScrollbar: false
},
padding: {
left: 24,
right: 24,
top: 30,
bottom: 30
},
html: {
en: "<h3>My Text Widget</h3>"
}
}
}
]
},
{
screenModus: "tablet",
options: {
theme: {
id: "default"
}
},
items: [
{
id: "9ac2f36a-2cd3-4e43-874c-6b8914a5d8a8",
type: "text",
position: {
sizeX: 48,
sizeY: 10,
row: 0,
col: 0
},
options: {
display: {
hideScrollbar: false
},
padding: {
left: 24,
right: 24,
top: 30,
bottom: 30
},
html: {
en: "<h3>My Text Widget</h3>"
}
}
}
]
},
{
screenModus: "desktop",
options: {
theme: {
id: "default"
}
},
items: [
{
id: "9ac2f36a-2cd3-4e43-874c-6b8914a5d8a8",
type: "text",
position: {
sizeX: 48,
sizeY: 10,
row: 0,
col: 0
},
options: {
display: {
hideScrollbar: false
},
padding: {
left: 24,
right: 24,
top: 30,
bottom: 30
},
html: {
en: "<h3>My Text Widget</h3>"
}
}
}
]
}
],
timezone: {
type: "fixed",
id: "UTC"
}
}
}
);