From a4e01eb6296c0ce699991226200aa5857f567ae4 Mon Sep 17 00:00:00 2001 From: Joseph Nuthalapati Date: Wed, 13 Feb 2019 06:55:50 +0530 Subject: [PATCH] pagekite: Bring subsubmenu below description. Remove About section. - Fixed broken functional tests - Pagekite index page directly takes to configuration Signed-off-by: Joseph Nuthalapati Reviewed-by: Sunil Mohan Adapa --- functional_tests/support/system.py | 8 ++--- .../templates/pagekite_configure.html | 5 ++- .../templates/pagekite_custom_services.html | 4 +-- .../templates/pagekite_introduction.html | 32 ++++++------------- .../templates/pagekite_standard_services.html | 4 +-- plinth/modules/pagekite/urls.py | 7 ++-- plinth/modules/pagekite/views.py | 24 +++----------- 7 files changed, 26 insertions(+), 58 deletions(-) diff --git a/functional_tests/support/system.py b/functional_tests/support/system.py index 2937f8312..09724c24a 100644 --- a/functional_tests/support/system.py +++ b/functional_tests/support/system.py @@ -262,7 +262,7 @@ def download_file_logged_in(browser, url, suffix=''): def pagekite_enable(browser, should_enable): """Enable/disable pagekite service.""" nav_to_module(browser, 'pagekite') - browser.find_link_by_href('/plinth/sys/pagekite/configure/').first.click() + browser.find_link_by_href('/plinth/sys/pagekite/').first.click() checkbox = browser.find_by_id('id_pagekite-enabled').first if checkbox.checked == should_enable: return @@ -278,14 +278,14 @@ def pagekite_enable(browser, should_enable): def pagekite_is_enabled(browser): """Return whether pagekite is enabled.""" nav_to_module(browser, 'pagekite') - browser.find_link_by_href('/plinth/sys/pagekite/configure/').first.click() + browser.find_link_by_href('/plinth/sys/pagekite/').first.click() return browser.find_by_id('id_pagekite-enabled').checked def pagekite_configure(browser, host, port, kite_name, kite_secret): """Configure pagekite basic parameters.""" nav_to_module(browser, 'pagekite') - browser.find_link_by_href('/plinth/sys/pagekite/configure/').first.click() + browser.find_link_by_href('/plinth/sys/pagekite/').first.click() # time.sleep(0.250) # Wait for 200ms show animation to complete browser.fill('pagekite-server_domain', host) browser.fill('pagekite-server_port', str(port)) @@ -297,7 +297,7 @@ def pagekite_configure(browser, host, port, kite_name, kite_secret): def pagekite_get_configuration(browser): """Return pagekite basic parameters.""" nav_to_module(browser, 'pagekite') - browser.find_link_by_href('/plinth/sys/pagekite/configure/').first.click() + browser.find_link_by_href('/plinth/sys/pagekite/').first.click() return (browser.find_by_name('pagekite-server_domain').value, int(browser.find_by_name('pagekite-server_port').value), browser.find_by_name('pagekite-kite_name').value, diff --git a/plinth/modules/pagekite/templates/pagekite_configure.html b/plinth/modules/pagekite/templates/pagekite_configure.html index cc0aa6957..aae792134 100644 --- a/plinth/modules/pagekite/templates/pagekite_configure.html +++ b/plinth/modules/pagekite/templates/pagekite_configure.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "pagekite_introduction.html" %} {% comment %} # # This file is part of FreedomBox. @@ -22,7 +22,7 @@ {% load i18n %} {% load static %} -{% block content %} +{% block configuration %}
{% csrf_token %} @@ -45,6 +45,5 @@ {% endblock %} {% block page_js %} - {% endblock %} diff --git a/plinth/modules/pagekite/templates/pagekite_custom_services.html b/plinth/modules/pagekite/templates/pagekite_custom_services.html index 6f29a8511..c7d09c516 100644 --- a/plinth/modules/pagekite/templates/pagekite_custom_services.html +++ b/plinth/modules/pagekite/templates/pagekite_custom_services.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "pagekite_introduction.html" %} {% comment %} # # This file is part of FreedomBox. @@ -38,7 +38,7 @@ {% endblock %} -{% block content %} +{% block configuration %}