Added own config for websocket port.

This commit is contained in:
Martin Edenhofer 2015-05-07 07:18:26 +02:00
parent 408bade61b
commit 99ac8c82cf
2 changed files with 20 additions and 1 deletions

View file

@ -185,7 +185,8 @@ class _webSocketSingleton extends App.Controller
if @backend is 'websocket'
@ws = new window.WebSocket( protocol + window.location.hostname + '/ws' )
else if @backend is 'websocketPort'
@ws = new window.WebSocket( protocol + window.location.hostname + ':6042/' )
websocket_port = App.Config.get('websocket_port') || '6042'
@ws = new window.WebSocket( protocol + window.location.hostname + ':' + websocket_port + '/' )
else
@_ajaxInit()

View file

@ -131,6 +131,24 @@ Setting.create_if_not_exists(
state: 'zammad.example.com',
frontend: true
)
Setting.create_if_not_exists(
title: 'websocket port',
name: 'websocket_port',
area: 'System::WebSocket',
description: 'Defines the port of the websocket server.',
options: {
form: [
{
display: '',
null: false,
name: 'websocket_port',
tag: 'input',
},
],
},
state: '6042',
frontend: true
)
Setting.create_if_not_exists(
title: 'http type',
name: 'http_type',