Added own config for websocket port.
This commit is contained in:
parent
408bade61b
commit
99ac8c82cf
2 changed files with 20 additions and 1 deletions
|
@ -185,7 +185,8 @@ class _webSocketSingleton extends App.Controller
|
||||||
if @backend is 'websocket'
|
if @backend is 'websocket'
|
||||||
@ws = new window.WebSocket( protocol + window.location.hostname + '/ws' )
|
@ws = new window.WebSocket( protocol + window.location.hostname + '/ws' )
|
||||||
else if @backend is 'websocketPort'
|
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
|
else
|
||||||
@_ajaxInit()
|
@_ajaxInit()
|
||||||
|
|
||||||
|
|
18
db/seeds.rb
18
db/seeds.rb
|
@ -131,6 +131,24 @@ Setting.create_if_not_exists(
|
||||||
state: 'zammad.example.com',
|
state: 'zammad.example.com',
|
||||||
frontend: true
|
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(
|
Setting.create_if_not_exists(
|
||||||
title: 'http type',
|
title: 'http type',
|
||||||
name: 'http_type',
|
name: 'http_type',
|
||||||
|
|
Loading…
Reference in a new issue