class ImageInfoBuffer(Buffer): description = "Dashboard for information about selected image." keybinds = { "enter": "display-info", "d": "rm", "i": "inspect", "@": "refresh", } def __init__(self, docker_image, ui): """ :param docker_image: :param ui: ui object so we refresh """ if isinstance(docker_image, RootImage): raise NotifyError("Image \"scratch\" doesn't provide any more information.") if docker_image.image_id == "<missing>": raise NotifyError("This image (layer) is not available due to changes in docker-1.10 " "image representation.") self.docker_image = docker_image self.display_name = docker_image.short_name self.widget = ImageInfoWidget(ui, docker_image) super().__init__() def process_realtime_event(self, event): if event.get("id", None) == self.docker_image.object_id: self.widget.refresh()
class ImageInfoBuffer(Buffer): description = "Dashboard for information about selected image." keybinds = { "enter": "display-info", "d": "rm", "i": "inspect", "@": "refresh", } def __init__(self, docker_image, ui): """ :param docker_image: :param ui: ui object so we refresh """ if isinstance(docker_image, RootImage): raise NotifyError( "Image \"scratch\" doesn't provide any more information.") if docker_image.image_id == "<missing>": raise NotifyError( "This image (layer) is not available due to changes in docker-1.10 " "image representation.") self.docker_image = docker_image self.display_name = docker_image.short_name self.widget = ImageInfoWidget(ui, docker_image) super().__init__() def process_realtime_event(self, event): if event.get("id", None) == self.docker_image.object_id: self.widget.refresh()
def __init__(self, docker_image, ui): """ :param docker_image: :param ui: ui object so we refresh """ if isinstance(docker_image, RootImage): raise NotifyError( "Image \"scratch\" doesn't provide any more information.") if docker_image.image_id == "<missing>": raise NotifyError( "This image (layer) is not available due to changes in docker-1.10 " "image representation.") self.docker_image = docker_image self.display_name = docker_image.short_name self.widget = ImageInfoWidget(ui, docker_image) super().__init__()
def __init__(self, docker_image, ui): """ :param docker_image: :param ui: ui object so we refresh """ if isinstance(docker_image, RootImage): raise NotifyError("Image \"scratch\" doesn't provide any more information.") if docker_image.image_id == "<missing>": raise NotifyError("This image (layer) is not available due to changes in docker-1.10 " "image representation.") self.docker_image = docker_image self.display_name = docker_image.short_name self.widget = ImageInfoWidget(ui, docker_image) super().__init__()