配置更新时立即向集群节点发消息
This commit is contained in:
@@ -37,7 +37,7 @@ Tea.context(function () {
|
||||
* 检查集群变更
|
||||
*/
|
||||
this.checkClusterChanges = function () {
|
||||
this.$get("/common/changedClusters")
|
||||
this.$post("/clusters/checkChange")
|
||||
.params({
|
||||
isNotifying: (this.globalChangedClusters.length > 0) ? 1 : 0
|
||||
})
|
||||
@@ -64,7 +64,7 @@ Tea.context(function () {
|
||||
*/
|
||||
this.syncClustersConfigs = function () {
|
||||
teaweb.confirm("确定要同步集群服务配置吗?", function () {
|
||||
this.$post("/common/syncClusters")
|
||||
this.$post("/clusters/sync")
|
||||
.success(function () {
|
||||
this.globalChangedClusters = [];
|
||||
})
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<second-menu>
|
||||
<menu-item :href="'/clusters/cluster/node?clusterId=' + clusterId + '&nodeId=' + nodeId" code="node">节点详情</menu-item>
|
||||
<menu-item :href="'/clusters/cluster/node/logs?clusterId=' + clusterId + '&nodeId=' + nodeId" code="log">节点日志</menu-item>
|
||||
<menu-item :href="'/clusters/cluster/node/update?clusterId=' + clusterId + '&nodeId=' + nodeId" code="update">修改节点</menu-item>
|
||||
<menu-item :href="'/clusters/cluster/node/logs?clusterId=' + clusterId + '&nodeId=' + nodeId" code="log">运行日志</menu-item>
|
||||
<menu-item :href="'/clusters/cluster/node/update?clusterId=' + clusterId + '&nodeId=' + nodeId" code="update">修改设置</menu-item>
|
||||
<menu-item :href="'/clusters/cluster/node/install?clusterId=' + clusterId + '&nodeId=' + nodeId" code="install">安装节点</menu-item>
|
||||
</second-menu>
|
||||
5
web/views/@default/clusters/cluster/node/logs.css
Normal file
5
web/views/@default/clusters/cluster/node/logs.css
Normal file
@@ -0,0 +1,5 @@
|
||||
pre.log-box {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
/*# sourceMappingURL=logs.css.map */
|
||||
1
web/views/@default/clusters/cluster/node/logs.css.map
Normal file
1
web/views/@default/clusters/cluster/node/logs.css.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["logs.less"],"names":[],"mappings":"AAAA,GAAG;EACF,SAAA;EACA,UAAA","file":"logs.css"}
|
||||
@@ -14,10 +14,7 @@
|
||||
</thead>
|
||||
<tr v-for="log in logs">
|
||||
<td>
|
||||
<span :class="{red:log.level == 'error', yellow:log.level == 'warning'}">
|
||||
<span v-if="!log.isToday">[{{log.createdTime}}]</span>
|
||||
<strong v-if="log.isToday">[{{log.createdTime}}]</strong>
|
||||
[{{log.tag}}]{{log.description}}</span>
|
||||
<pre class="log-box"><span :class="{red:log.level == 'error', yellow:log.level == 'warning'}"><span v-if="!log.isToday">[{{log.createdTime}}]</span><strong v-if="log.isToday">[{{log.createdTime}}]</strong>[{{log.tag}}]{{log.description}}</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
4
web/views/@default/clusters/cluster/node/logs.less
Normal file
4
web/views/@default/clusters/cluster/node/logs.less
Normal file
@@ -0,0 +1,4 @@
|
||||
pre.log-box {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
@@ -9,10 +9,8 @@
|
||||
<th>服务名称</th>
|
||||
<th>服务类型</th>
|
||||
<th>部署集群</th>
|
||||
<th>运行中节点数</th>
|
||||
<th>未运行节点数</th>
|
||||
<th>端口</th>
|
||||
<th>状态</th>
|
||||
<th class="two wide">状态</th>
|
||||
<th class="two op">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -20,8 +18,6 @@
|
||||
<td>{{server.name}}</td>
|
||||
<td>{{server.serverTypeName}}</td>
|
||||
<td>{{server.cluster.name}}</td>
|
||||
<td><span class="disabled">[暂无]</span></td>
|
||||
<td><span class="disabled">[暂无]</span></td>
|
||||
<td>
|
||||
<span v-if="server.ports.length == 0">-</span>
|
||||
<div v-for="port in server.ports">
|
||||
@@ -29,7 +25,7 @@
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<span class="disabled">[暂无]</span>
|
||||
<label-on :v-is-on="server.isOn"></label-on>
|
||||
</td>
|
||||
<td>
|
||||
<a :href="'/servers/server?serverId=' + server.id">详情</a>
|
||||
|
||||
Reference in New Issue
Block a user