实现websocket基本功能

This commit is contained in:
刘祥超
2020-09-26 19:54:02 +08:00
parent 2e0c8a3160
commit 4a8498db10
22 changed files with 487 additions and 23 deletions

View File

@@ -0,0 +1,11 @@
{$layout}
{$template "/left_menu"}
<div class="right-box">
{$template "../location_menu"}
{$template "../left_menu"}
<div class="right-box tiny">
<p class="ui message">此功能暂未开放,敬请期待。</p>
</div>
</div>

View File

@@ -1,5 +1,4 @@
{$layout}
{$template "/left_menu"}
<div class="right-box">

View File

@@ -1,5 +1,4 @@
{$layout}
{$template "/left_menu"}
<div class="right-box">

View File

@@ -0,0 +1,17 @@
{$layout}
{$template "/left_menu"}
<div class="right-box">
{$template "../location_menu"}
{$template "../left_menu"}
<div class="right-box tiny">
<form class="ui form" data-tea-action="$" data-tea-success="success">
<input type="hidden" name="webId" :value="webId"/>
<http-websocket-box :v-websocket-ref="websocketRef"
:v-websocket-config="websocketConfig"
:v-is-location="true"></http-websocket-box>
<submit-btn></submit-btn>
</form>
</div>
</div>

View File

@@ -0,0 +1,3 @@
Tea.context(function () {
this.success = NotifyReloadSuccess("保存成功")
})

View File

@@ -0,0 +1,6 @@
{$layout}
{$template "/left_menu"}
<div class="right-box">
<p class="ui message">此功能暂未开放,敬请期待。</p>
</div>

View File

@@ -0,0 +1,15 @@
{$layout "layout_popup"}
<h3>添加来源域</h3>
<form class="ui form" data-tea-success="success" data-tea-action="$">
<table class="ui table definition selectable">
<tr>
<td class="title">来源域 *</td>
<td>
<input type="text" name="origin" maxlength="200" placeholder="比如 example.com" ref="focus"/>
<p class="comment">允许客户端通过Websocket可以访问的域名可以使用星号通配符*来表示匹配一组域名比如www.example.com *.google.com</p>
</td>
</tr>
</table>
<submit-btn></submit-btn>
</form>

View File

@@ -0,0 +1,3 @@
Tea.context(function () {
this.success = NotifyPopup
})

View File

@@ -0,0 +1,3 @@
Tea.context(function () {
this.success = NotifyReloadSuccess("保存成功")
})