Skip to content

Commit

Permalink
Merge pull request #4374 from pymedusa/move-config-to-http-vue-loader
Browse files Browse the repository at this point in the history
moved config to http-vue-loader
  • Loading branch information
OmgImAlexis authored Jul 4, 2018
2 parents dda941a + ebe47e5 commit b88db29
Show file tree
Hide file tree
Showing 24 changed files with 1,792 additions and 438 deletions.
53 changes: 5 additions & 48 deletions medusa/server/web/config/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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')
Loading

0 comments on commit b88db29

Please sign in to comment.