diff --git a/openslides/core/static/js/core/base.js b/openslides/core/static/js/core/base.js index b08101e5b..2f78980dc 100644 --- a/openslides/core/static/js/core/base.js +++ b/openslides/core/static/js/core/base.js @@ -58,7 +58,6 @@ angular.module('OpenSlidesApp.core', [ }, reconnect: function () { socket.close(); - DS.clear(); Autoupdate.connect(); } }; diff --git a/openslides/users/static/js/users/base.js b/openslides/users/static/js/users/base.js index a09057c28..6f6e37ca6 100644 --- a/openslides/users/static/js/users/base.js +++ b/openslides/users/static/js/users/base.js @@ -9,7 +9,8 @@ angular.module('OpenSlidesApp.users', []) 'Group', 'loadGlobalData', 'autoupdate', - function (User, Group, loadGlobalData, autoupdate) { + 'DS', + function (User, Group, loadGlobalData, autoupdate, DS) { var operatorChangeCallbacks = [autoupdate.reconnect]; var operator = { user: null, @@ -35,6 +36,7 @@ angular.module('OpenSlidesApp.users', []) } else { operator.user = null; operator.perms = []; + DS.clear(); _.forEach(operatorChangeCallbacks, function (callback) { callback(); }); diff --git a/openslides/users/static/js/users/site.js b/openslides/users/static/js/users/site.js index 2449e4351..ade115706 100644 --- a/openslides/users/static/js/users/site.js +++ b/openslides/users/static/js/users/site.js @@ -321,7 +321,9 @@ angular.module('OpenSlidesApp.users.site', ['OpenSlidesApp.users']) label: gettextCatalog.getString('Groups'), optionsAttr: 'bs-options', options: Group.getAll(), - ngOptions: 'option[to.valueProp] as option in to.options | filter: $select.search', + ngOptions: 'option[to.valueProp] as option in to.options | ' + + 'filter: {id: "!1"} | filter: {id: "!2"} | ' + + 'filter: $select.search', valueProp: 'id', labelProp: 'name', placeholder: gettextCatalog.getString('Select or search a group ...') diff --git a/openslides/users/static/templates/users/user-detail.html b/openslides/users/static/templates/users/user-detail.html index 9967aad53..629055679 100644 --- a/openslides/users/static/templates/users/user-detail.html +++ b/openslides/users/static/templates/users/user-detail.html @@ -35,7 +35,7 @@ {{ (groups | filter: {id: group})[0].name }} -
{{ user.about_me }}
+
diff --git a/openslides/utils/autoupdate.py b/openslides/utils/autoupdate.py index 2992ea3b1..4949d9691 100644 --- a/openslides/utils/autoupdate.py +++ b/openslides/utils/autoupdate.py @@ -21,6 +21,9 @@ from tornado.wsgi import WSGIContainer from .rest_api import get_collection_and_id_from_url +RUNNING_HOST = None +RUNNING_PORT = None + class DjangoStaticFileHandler(StaticFileHandler): """ @@ -94,8 +97,9 @@ class OpenSlidesSockJSConnection(SockJSConnection): object_url. """ # Join network location with object URL. - # TODO: Use host and port as given in the start script - wsgi_network_location = settings.OPENSLIDES_WSGI_NETWORK_LOCATION or 'http://localhost:8000' + wsgi_network_location = ( + settings.OPENSLIDES_WSGI_NETWORK_LOCATION or + 'http://{}:{}'.format(RUNNING_HOST, RUNNING_PORT)) url = ''.join((wsgi_network_location, object_url)) # Send out internal HTTP request to get data from the REST api. @@ -127,6 +131,11 @@ def run_tornado(addr, port, *args, **kwargs): It runs in one thread. """ + # Save the port and the addr in a global var + global RUNNING_HOST, RUNNING_PORT + RUNNING_HOST = addr + RUNNING_PORT = port + # Don't try to read the command line args from openslides parse_command_line(args=[]) @@ -147,6 +156,10 @@ def run_tornado(addr, port, *args, **kwargs): server.listen(port=port, address=addr) IOLoop.instance().start() + # Reset the global vars + RUNNING_HOST = None + RUNNING_PORT = None + def inform_changed_data(*args): """