diff --git a/medusa/server/web/config/handler.py b/medusa/server/web/config/handler.py index e9a96e8857..15d5e38678 100644 --- a/medusa/server/web/config/handler.py +++ b/medusa/server/web/config/handler.py @@ -4,14 +4,7 @@ from __future__ import unicode_literals -import os - -from medusa import ( - app, - db, -) from medusa.server.web.core import PageTemplate, WebRoot -from medusa.version_checker import CheckVersion from tornroutes import route @@ -44,45 +37,9 @@ def ConfigMenu(): def index(self): """ - Render the Help & Info page - """ - t = PageTemplate(rh=self, filename='config.mako') - - try: - import pwd - app_user = pwd.getpwuid(os.getuid()).pw_name - except ImportError: - try: - import getpass - app_user = getpass.getuser() - except Exception: - app_user = 'Unknown' - - try: - import locale - app_locale = locale.getdefaultlocale() - except Exception: - app_locale = 'Unknown', 'Unknown' + Render the Help & Info page. - try: - import ssl - ssl_version = ssl.OPENSSL_VERSION - except Exception: - ssl_version = 'Unknown' - - app_version = '' - if app.VERSION_NOTIFY: - updater = CheckVersion().updater - if updater: - app_version = updater.get_cur_version() - - main_db_con = db.DBConnection() - cur_branch_major_db_version, cur_branch_minor_db_version = main_db_con.checkDBVersion() - - return t.render( - submenu=self.ConfigMenu(), title='Medusa Configuration', - header='Medusa Configuration', topmenu='config', - app_user=app_user, app_locale=app_locale, ssl_version=ssl_version, - app_version=app_version, cur_branch_major_db_version=cur_branch_major_db_version, - cur_branch_minor_db_version=cur_branch_minor_db_version - ) + [Converted to VueRouter] + """ + t = PageTemplate(rh=self, filename='index.mako') + return t.render(submenu=self.ConfigMenu(), topmenu='config') diff --git a/themes-default/slim/static/js/lib/http-vue-loader.js b/themes-default/slim/static/js/lib/http-vue-loader.js new file mode 100644 index 0000000000..6e24a0cdf4 --- /dev/null +++ b/themes-default/slim/static/js/lib/http-vue-loader.js @@ -0,0 +1,470 @@ +(function umd(root,factory){ + if(typeof module==='object' && typeof exports === 'object' ) + module.exports=factory() + else if(typeof define==='function' && define.amd) + define([],factory) + else + root.httpVueLoader=factory() +})(this,function factory() { + 'use strict'; + + var scopeIndex = 0; + + StyleContext.prototype = { + + withBase: function(callback) { + + var tmpBaseElt; + if ( this.component.baseURI ) { + + // firefox and chrome need the to be set while inserting or modifying diff --git a/themes-default/slim/static/js/templates/http/404.vue b/themes-default/slim/static/js/templates/http/404.vue new file mode 100644 index 0000000000..475cfc78bc --- /dev/null +++ b/themes-default/slim/static/js/templates/http/404.vue @@ -0,0 +1,3 @@ + diff --git a/themes-default/slim/views/config.mako b/themes-default/slim/views/config.mako deleted file mode 100644 index e2bebc0d0f..0000000000 --- a/themes-default/slim/views/config.mako +++ /dev/null @@ -1,122 +0,0 @@ -<%inherit file="/layouts/main.mako"/> -<%block name="scripts"> - - - -<%block name="css"> - - -<%block name="content"> -

Medusa Configuration

- - diff --git a/themes-default/slim/views/index.mako b/themes-default/slim/views/index.mako index e69de29bb2..672544e1fd 100644 --- a/themes-default/slim/views/index.mako +++ b/themes-default/slim/views/index.mako @@ -0,0 +1,5 @@ +<%inherit file="/layouts/main.mako"/> +<%block name="content"> +

{{$route.meta.header}}

+ + diff --git a/themes-default/slim/views/layouts/main.mako b/themes-default/slim/views/layouts/main.mako index d128c9cf3b..78d16e0df6 100644 --- a/themes-default/slim/views/layouts/main.mako +++ b/themes-default/slim/views/layouts/main.mako @@ -114,6 +114,7 @@ ## @NOTE: These will be usable on all pages %> + @@ -181,19 +182,13 @@ } <%block name="scripts" /> + + + diff --git a/themes/dark/assets/js/templates/http/404.vue b/themes/dark/assets/js/templates/http/404.vue new file mode 100644 index 0000000000..475cfc78bc --- /dev/null +++ b/themes/dark/assets/js/templates/http/404.vue @@ -0,0 +1,3 @@ + diff --git a/themes/dark/templates/config.mako b/themes/dark/templates/config.mako deleted file mode 100644 index e2bebc0d0f..0000000000 --- a/themes/dark/templates/config.mako +++ /dev/null @@ -1,122 +0,0 @@ -<%inherit file="/layouts/main.mako"/> -<%block name="scripts"> - - - -<%block name="css"> - - -<%block name="content"> -

Medusa Configuration

- - diff --git a/themes/dark/templates/index.mako b/themes/dark/templates/index.mako index e69de29bb2..672544e1fd 100644 --- a/themes/dark/templates/index.mako +++ b/themes/dark/templates/index.mako @@ -0,0 +1,5 @@ +<%inherit file="/layouts/main.mako"/> +<%block name="content"> +

{{$route.meta.header}}

+ + diff --git a/themes/dark/templates/layouts/main.mako b/themes/dark/templates/layouts/main.mako index d128c9cf3b..78d16e0df6 100644 --- a/themes/dark/templates/layouts/main.mako +++ b/themes/dark/templates/layouts/main.mako @@ -114,6 +114,7 @@ ## @NOTE: These will be usable on all pages %> + @@ -181,19 +182,13 @@ } <%block name="scripts" /> + + + diff --git a/themes/light/assets/js/templates/http/404.vue b/themes/light/assets/js/templates/http/404.vue new file mode 100644 index 0000000000..475cfc78bc --- /dev/null +++ b/themes/light/assets/js/templates/http/404.vue @@ -0,0 +1,3 @@ + diff --git a/themes/light/templates/config.mako b/themes/light/templates/config.mako deleted file mode 100644 index e2bebc0d0f..0000000000 --- a/themes/light/templates/config.mako +++ /dev/null @@ -1,122 +0,0 @@ -<%inherit file="/layouts/main.mako"/> -<%block name="scripts"> - - - -<%block name="css"> - - -<%block name="content"> -

Medusa Configuration

- - diff --git a/themes/light/templates/index.mako b/themes/light/templates/index.mako index e69de29bb2..672544e1fd 100644 --- a/themes/light/templates/index.mako +++ b/themes/light/templates/index.mako @@ -0,0 +1,5 @@ +<%inherit file="/layouts/main.mako"/> +<%block name="content"> +

{{$route.meta.header}}

+ + diff --git a/themes/light/templates/layouts/main.mako b/themes/light/templates/layouts/main.mako index d128c9cf3b..78d16e0df6 100644 --- a/themes/light/templates/layouts/main.mako +++ b/themes/light/templates/layouts/main.mako @@ -114,6 +114,7 @@ ## @NOTE: These will be usable on all pages %> + @@ -181,19 +182,13 @@ } <%block name="scripts" /> +