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

View file

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