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
def _image(self): 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)]))