INNER CODE UNIT · JavaScript
hook
lirantal/dockly · hooks/containers.hook.js:5
class hook extends baseHook {
init () {
// on startup we first emit data from the docker server
this.getFreshData((err, data) => {
if (err) {
data = {}
}
// emit an even for a refreshed list of containers and images
this.emit('containersAndImagesList', data)
})
// on startup bind a periodical updates emitter
this.notifyOnContainerInfo()
this.notifyOnContainerUtilization()
if (!this.widgetsRepo.has('toolbar')) {
return null
}