GithubHelp home page GithubHelp logo

conjure-up / urwid-ubuntu Goto Github PK

View Code? Open in Web Editor NEW
13.0 5.0 2.0 101 KB

Standarized set of urwid widgets to use within Ubuntu Console Applications

License: Other

Python 100.00%
urwid ubuntu ui widgets

urwid-ubuntu's Introduction

ubuntui

Standarized set of urwid widgets to use within Ubuntu

urwid-ubuntu's People

Contributors

johnsca avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

urwid-ubuntu's Issues

Build on top of universal API

urwid is only supported for Linux through series of low level fcntl calls.

  File "conjureup\app.py", line 18, in <module>
    from ubuntui.ev import EventLoop
  File "C:\Python36\lib\site-packages\ubuntui\ev.py", line 15, in <module>
    class EventLoop:
  File "C:\Python36\lib\site-packages\ubuntui\ev.py", line 22, in EventLoop
    'screen': urwid.raw_display.Screen(),
  File "C:\Python36\lib\site-packages\urwid\raw_display.py", line 89, in __init__
    fcntl.fcntl(self._resize_pipe_rd, fcntl.F_SETFL, os.O_NONBLOCK)
NameError: name 'fcntl' is not defined

This is not portable.

YesNo widget confusion between "Yes" and True

I'm using a boolean input type in a conjure-up spell:

https://github.com/kwmonroe/spells/blob/feature/cdk-log-monitor/canonical-kubernetes/steps/05_logging/metadata.yaml#L8

That's the 'ol YesNo widget that takes "Yes" and "No" strings for initial values:

https://github.com/conjure-up/urwid-ubuntu/blob/master/ubuntui/widgets/input.py#L180

The problem is when you go to check the value() of that widget, it gets mangled into True|False:

https://github.com/conjure-up/urwid-ubuntu/blob/master/ubuntui/widgets/input.py#L160

It would be nice if there was consistent behavior -- either YesNo strings or True/False.

TagMarkupException

https://sentry.io/canonical-pj/conjure-up/issues/305974052/

TagMarkupException: Invalid markup element: None
  File "conjureup/controllers/deploystatus/gui.py", line 19, in _refresh
    view.refresh_nodes(app.juju.client.applications)
  File "conjureup/ui/views/deploystatus.py", line 42, in refresh_nodes
    service_w = ServiceWidget(application.name, service)
  File "ubuntui/widgets/juju/service.py", line 20, in __init__
    w = UnitWidget(n, unit)
  File "ubuntui/widgets/juju/unit.py", line 18, in __init__
    self.PublicAddress = Text(unit.get('public-address', ''))
  File "urwid/widget.py", line 836, in __init__
    self.set_text(markup)
  File "urwid/widget.py", line 879, in set_text
    self._text, self._attrib = decompose_tagmarkup(markup)
  File "urwid/util.py", line 375, in decompose_tagmarkup
    tl, al = _tagmarkup_recurse(tm, None)
  File "urwid/util.py", line 416, in _tagmarkup_recurse
    raise TagMarkupException("Invalid markup element: %r" % tm)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.