Ejemplo n.º 1
0
    def __init__(self):
        self.page = None
        self.title = None
        self.txt = None
        self.status_head = None
        self.status_title = None
        self.status_txt = None
        self.action_txt = None
        self.download_title = None
        self.download_link = None
        self.img = None
        self.ui = PiUi()
        self.src = None
        self.rfstatus = RFStatusCheck.RFStatusCheck()

        self.status_states = {
            0 : '<p style=\"color:SlateGray;font-style:italic;\">Checking Status...</p>',
            1 : '<p style=\"color:blue;font-weight:normal;\">Waiting to scan inventory.</p>',
            2 : '<p style=\"color:LimeGreen;font-weight:bold;\">Inventory scan in progress.</p>',
            3 : '<p style=\"color:blue;font-weight:bold;\">Inventory scan completed successfully.</p>',
            4 : '<p style=\"color:red;font-weight:bold;\">Inventory scan failed.</p>'
        }

        self.action_states = {
            0 : '<p>&nbsp;</p>',
            1 : '<p style=\"color:SlateGray;font-style:italic;\">Starting Data Collection...</p>',
            2 : '<p style=\"color:DarkSlateGray;font-weight:normal;\">Inventory scan is already running.</p>',
            3 : '<p style=\"color:SlateGray;font-style:italic;\">Stopping Data Collection...</p>',
            4 : '<p style=\"color:DarkSlateGray;font-weight:normal;\">Inventory scan is not running.</p>'
        }
        self.status_state = 0
        self.action_state = 0
Ejemplo n.º 2
0
 def __init__(self):
     self.title = None
     self.txt = None
     self.img = None
     self.img_dir = os.path.join(current_dir, 'imgs')
     self.thumbs_dir = os.path.join(current_dir, 'thumbs')
     self.ui = PiUi(self.thumbs_dir)
     self.src = "sunset.png"
 def __init__(self, queuey, receiveQueuey):
     self.title = None
     self.txt = None
     self.img = None
     self.ui = PiUi(img_dir=os.path.join(current_dir, 'imgs'))
     self.src = "sunset.png"
     self.queuey = queuey  #ADDED FOR WIFI - queue to hold the outgoing messages, connecting the piui and wifi program threads
     self.receiveQueuey = receiveQueuey
     self.piuiLightDict = {
     }  #this dict will store the active lights' lightModulePiUiInfo; keys are the port numbers
     self.currentPage = None
     self.titles = {
     }  #this is a dictionary that is used by the toggle page to remember the title for each light; keys are the port numbers
     self.nameInputs = {
     }  #this is a dictionary that is used by the toggle page to remember the name textbox for each light; keys are port numbers
Ejemplo n.º 4
0
def getssid():

    command = "nmcli -t -f ssid dev wifi| cut -d\\' -f2"
    process = subprocess.check_output(
        "nmcli -t -f ssid dev wifi| cut -d\\' -f2", shell=True)
    namelist = process.split('\n')
    noduplist = []
    for i in namelist:
        if i not in noduplist:
            noduplist.append(i)
    print(noduplist)

    ui = PiUi()
    page = ui.new_ui_page(title="Available Networks")
    page_form = ui.new_ui_page(title="Enter Login Details")
    txt = page_form.add_input("text", "loginID")
    txt2 = page_form.add_input("text", "password")
    button = page.add_button("submit", onButtonClick)
    list = page.addlist()
    for i in nonduplist:
        list.add_item(nonduplist[i], onclick=page_form)
Ejemplo n.º 5
0
 def setUp(self):
     self._ui = PiUi("Test", timeout=1)
Ejemplo n.º 6
0
from piui import PiUi

ui = PiUi()
page = ui.new_ui_page(title="Hello")
title = page.add_textbox("Hello, world!")
Ejemplo n.º 7
0
 def __init__(self):
     self.title = None
     self.txt = None
     self.ui = PiUi()
     self.pattern = None
Ejemplo n.º 8
0
 def __init__(self):
     self.title = None
     self.txt = None
     self.img = None
     self.ui = PiUi()
 def __init__(self):
     self.ui = PiUi()