Skip to content

Instantly share code, notes, and snippets.

@fezu54
Last active Mar 14, 2020
Embed
What would you like to do?
VaadinVueButton.kt
val taktMonitorButton = Button().apply {
icon = MaterialIcons.ALARM
caption = Messages.getString("EditMasterDataLayout.taktMonitorButton.caption")
id = EQUIPMENT_GROUP_TAKT_MONITOR_BUTTON_ID
this.addStyleName(XeticsLeanStyles.OUTLINE_ICON_BUTTON)
this.addClickListener { openTaktMonitor(equipmentGroupVM.equipmentGroup) }
}
private fun openTaktMonitor(equipmentGroup: EquipmentGroup) {
val language = Messages.getLocale()
val taktMonitorUrl = "$taktUrl/?group-id=${equipmentGroup.id}&group-name=${equipmentGroup.name}&language=$language#/"
UI.getCurrent().page.open(taktMonitorUrl, "_blank")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment