The frontend/UI server, written in JS using the MarkoJS library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

33 lines
602 B

const {logsApi} = require("../../../../../rpdata/api/Log")
module.exports = class {
onCreate(input) {
this.state = {
error: null,
loading: false,
}
}
open() {
}
close() {
this.emit("close")
}
doIt() {
this.state.loading = true
logsApi.remove({id: this.input.logId}).then(() => {
this.emit("removed")
this.emit("close")
}).catch(errs => {
console.warn("Failed to remove:", errs)
this.state.error = "Failed to remove: " + errs.message || errs[0].message
}).then(() => {
this.state.loading = false
})
}
}