start-sync-scope
Examples and code snippets
title: Sync-scope examples
type: jig.default
children:
- type: component.section
options:
title:
text: Scope
fontSize: medium
color: color3
isSubtle: false
isBold: true
numberOfLines: 1
children:
- type: component.list
options:
# Bind data from the sync-scopes datasource
data: =@ctx.datasources.sync-scopes
maximumItemsToRender: 8
item:
type: component.list-item
options:
# Display the sync scope state (syncing, synced, failed, interrupted)
title:
text: =@ctx.current.item.state
# Display the details JSON structure as subtitle
subtitle:
text: =@ctx.current.item.details
fontSize: regular
numberOfLines: 3
# Show the sync scope ID on the right side of the list item
rightElement:
element: text
- type: component.section
options:
title:
text: Status
fontSize: medium
color: color10
isSubtle: false
isBold: true
numberOfLines: 1
children:
- type: component.list
options:
# Bind data from the sync-status datasource
data: =@ctx.datasources.sync-status
maximumItemsToRender: 8
item:
type: component.list-item
options:
# Display the sync scope state
title: =@ctx.current.item.state
# Display the datasource table that the state applies to.
subtitle: =@ctx.current.item.entity
# Add a tag to show the status of the sync-scope.
tags:
- text: =@ctx.current.item.state
color: primary
# Show the id of each sync scope status. The id is used in the action to
# identify the sync status that must be deleted.
rightElement:
element: text
firstLine: =@ctx.current.item.id
actions:
- numberOfVisibleActions: 3
children:
# Action to start a new sync scope.
- type: action.start-sync-scope
# Specify a unique identifier for this sync scope action.
instanceId: sync-all
options:
# List the individual instanceIds of each sync (sync-entities)
# that the sync scope applies to.
instanceIds:
- sync-quakes
- sync-enviro
title: Start sync
Last updated
Was this helpful?