Esempio n. 1
0
 def wifi(self):
     return wifi_config_template.render({
         'title': 'Wifi configuration',
         'breadcrumb': 'Configure Wifi',
         'loading_message': 'Connecting to Wifi',
         'ssid': helpers.get_wifi_essid(),
     })
Esempio n. 2
0
 def step_by_step_configure_page(self):
     return configure_wizard_template.render({
         'title': 'Configure IoT Box',
         'breadcrumb': 'Configure IoT Box',
         'loading_message': 'Configuring your IoT Box',
         'ssid': helpers.get_wifi_essid(),
         'server': helpers.get_odoo_server_url() or '',
         'hostname': subprocess.check_output('hostname').decode('utf-8').strip('\n'),
     })
Esempio n. 3
0
 def index(self):
     wifi = Path.home() / 'wifi_network.txt'
     remote_server = Path.home() / 'odoo-remote-server.conf'
     if (wifi.exists() == False or remote_server.exists() == False) and helpers.access_point():
         return configure_wizard_template.render({
             'title': 'Configure IoT Box',
             'breadcrumb': 'Configure IoT Box',
             'loading_message': 'Configuring your IoT Box',
             'ssid': helpers.get_wifi_essid(),
             'server': helpers.get_odoo_server_url(),
             'hostname': subprocess.check_output('hostname').decode('utf-8'),
             })
     else:
         return homepage_template.render(self.get_homepage_data())