Removed remaining references to websocket port.

This commit is contained in:
Fabio Manganiello 2023-05-07 12:54:13 +02:00
parent bdbbd24e6f
commit c0a948f8ce
Signed by: blacklight
GPG Key ID: D90FBA7F76362774
3 changed files with 7 additions and 14 deletions

View File

@ -1,7 +1,7 @@
from flask import Blueprint, render_template
from platypush.backend.http.app import template_folder
from platypush.backend.http.app.utils import authenticate, get_websocket_port
from platypush.backend.http.app.utils import authenticate
from platypush.backend.http.utils import HttpUtils
dashboard = Blueprint('dashboard', __name__, template_folder=template_folder)
@ -16,10 +16,11 @@ __routes__ = [
@dashboard.route('/dashboard/<name>', methods=['GET'])
@authenticate()
def render_dashboard(name):
""" Route for the dashboard """
return render_template('index.html',
utils=HttpUtils,
websocket_port=get_websocket_port())
"""Route for the dashboard"""
return render_template(
'index.html',
utils=HttpUtils,
)
# vim:sw=4:ts=4:et:

View File

@ -78,14 +78,6 @@ def get_http_port():
return http_conf.get('port', HttpBackend._DEFAULT_HTTP_PORT)
# noinspection PyProtectedMember
def get_websocket_port():
from platypush.backend.http import HttpBackend
http_conf = Config.get('backend.http') or {}
return http_conf.get('websocket_port', HttpBackend._DEFAULT_WEBSOCKET_PORT)
def send_message(msg, wait_for_response=True):
msg = Message.build(msg)
if msg is None:

View File

@ -1,5 +1,5 @@
<template>
<Events ref="events" :ws-port="config['backend.http'].websocket_port" v-if="hasWebsocket" />
<Events ref="events" v-if="hasWebsocket" />
<Notifications ref="notifications" />
<VoiceAssistant ref="voice-assistant" v-if="hasAssistant" />
<Pushbullet ref="pushbullet" v-if="hasPushbullet" />