How to use the sen.tui.chunks.image.LayerWidget function in sen

To help you get started, we’ve selected a few sen examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TomasTomecek / sen / sen / tui / views / image_info.py View on Github external
layers = self.docker_image.layers
        index = 0

        if isinstance(parent, RootImage) and len(layers) > 0:  # pulled image, docker 1.10+
            for image in layers:
                self.walker.append(
                    RowWidget([LayerWidget(self.ui, image, index=index)])
                )
                index += 1
        else:
            self.walker.append(RowWidget([LayerWidget(self.ui, self.docker_image, index=index)]))
            while True:
                index += 1
                parent = i.parent_image
                if parent:
                    self.walker.append(RowWidget([LayerWidget(self.ui, parent, index=index)]))
                    i = parent
                else:
                    break
github TomasTomecek / sen / sen / tui / views / image_info.py View on Github external
self.walker.append(RowWidget([SelectableText("")]))
        self.walker.append(RowWidget([SelectableText("Layers", maps=get_map("main_list_white"))]))

        i = self.docker_image
        parent = i.parent_image
        layers = self.docker_image.layers
        index = 0

        if isinstance(parent, RootImage) and len(layers) > 0:  # pulled image, docker 1.10+
            for image in layers:
                self.walker.append(
                    RowWidget([LayerWidget(self.ui, image, index=index)])
                )
                index += 1
        else:
            self.walker.append(RowWidget([LayerWidget(self.ui, self.docker_image, index=index)]))
            while True:
                index += 1
                parent = i.parent_image
                if parent:
                    self.walker.append(RowWidget([LayerWidget(self.ui, parent, index=index)]))
                    i = parent
                else:
                    break
github TomasTomecek / sen / sen / tui / views / image_info.py View on Github external
def _layers(self):
        self.walker.append(RowWidget([SelectableText("")]))
        self.walker.append(RowWidget([SelectableText("Layers", maps=get_map("main_list_white"))]))

        i = self.docker_image
        parent = i.parent_image
        layers = self.docker_image.layers
        index = 0

        if isinstance(parent, RootImage) and len(layers) > 0:  # pulled image, docker 1.10+
            for image in layers:
                self.walker.append(
                    RowWidget([LayerWidget(self.ui, image, index=index)])
                )
                index += 1
        else:
            self.walker.append(RowWidget([LayerWidget(self.ui, self.docker_image, index=index)]))
            while True:
                index += 1
                parent = i.parent_image
                if parent:
                    self.walker.append(RowWidget([LayerWidget(self.ui, parent, index=index)]))
                    i = parent
                else:
                    break
github TomasTomecek / sen / sen / tui / views / container_info.py View on Github external
def _image(self):
        if self.docker_container.image:
            self.view_widgets.append(RowWidget([SelectableText("")]))
            self.view_widgets.append(RowWidget([SelectableText("Image", maps=get_map("main_list_white"))]))
            self.view_widgets.append(RowWidget([LayerWidget(self.ui, self.docker_container.image)]))