2020-12-03 11:03:12 +08:00
|
|
|
|
{$layout}
|
2021-07-03 15:44:49 +08:00
|
|
|
|
{$template "/echarts"}
|
2021-01-21 18:55:53 +08:00
|
|
|
|
|
2021-09-19 16:10:52 +08:00
|
|
|
|
<!-- 加载中 -->
|
|
|
|
|
|
<div style="margin-top: 0.8em">
|
|
|
|
|
|
<div class="ui message loading" v-if="isLoading">
|
|
|
|
|
|
<div class="ui active inline loader small"></div> 数据加载中...
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2021-08-25 11:40:57 +08:00
|
|
|
|
<!-- 没有节点提醒 -->
|
2021-09-19 16:10:52 +08:00
|
|
|
|
<div class="ui icon message warning" v-if="!isLoading && dashboard.defaultClusterId > 0 && dashboard.countNodes == 0">
|
2021-08-25 11:40:57 +08:00
|
|
|
|
<i class="icon warning circle"></i>
|
|
|
|
|
|
<a :href="'/clusters/cluster/createNode?clusterId=' + dashboard.defaultClusterId">还没有在集群中添加节点,现在去添加?添加节点后才可部署网站服务。</a>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2021-12-21 15:18:11 +08:00
|
|
|
|
<!-- 新版本更新提醒 -->
|
|
|
|
|
|
<div class="ui icon message error" v-if="!isLoading && newVersionCode.length > 0">
|
|
|
|
|
|
<i class="icon warning circle"></i>
|
|
|
|
|
|
升级提醒:有新版本管理系统可以更新:v{{currentVersionCode}} -> v{{newVersionCode}}
|
|
|
|
|
|
<a href="https://goedge.cn/docs/Releases/Index.md?nav=1" target="_blank">[去官网查看]</a> <a :href="newVersionDownloadURL" target="_blank">[直接下载]</a>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="" title="关闭" @click.prevent="closeMessage"><i class="ui icon remove small"></i></a>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2022-07-21 19:22:18 +08:00
|
|
|
|
<!-- 边缘节点升级提醒 -->
|
2021-09-19 16:10:52 +08:00
|
|
|
|
<div class="ui icon message error" v-if="!isLoading && nodeUpgradeInfo.count > 0">
|
2021-07-13 14:28:06 +08:00
|
|
|
|
<i class="icon warning circle"></i>
|
2021-10-10 16:33:27 +08:00
|
|
|
|
<a href="/clusters">升级提醒:有 {{nodeUpgradeInfo.count}} 个边缘节点需要升级到 v{{nodeUpgradeInfo.version}} 版本,系统正在尝试自动升级...</a><a href="" title="关闭" @click.prevent="closeMessage"><i class="ui icon remove small"></i></a>
|
2021-07-13 14:28:06 +08:00
|
|
|
|
</div>
|
2022-07-21 19:22:18 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- API节点升级提醒 -->
|
2021-09-19 16:10:52 +08:00
|
|
|
|
<div class="ui icon message error" v-if="!isLoading && apiNodeUpgradeInfo.count > 0">
|
2021-07-13 14:28:06 +08:00
|
|
|
|
<i class="icon warning circle"></i>
|
2022-07-17 21:19:45 +08:00
|
|
|
|
<a href="/api">升级提醒:有 {{apiNodeUpgradeInfo.count}} 个API节点需要升级到 v{{apiNodeUpgradeInfo.version}} 版本;如果已经升级,请尝试重启API节点进程。</a><a href="" title="关闭" @click.prevent="closeMessage"><i class="ui icon remove small"></i></a>
|
2021-07-13 14:28:06 +08:00
|
|
|
|
</div>
|
2021-05-11 22:47:21 +08:00
|
|
|
|
|
2022-07-21 19:22:18 +08:00
|
|
|
|
<!-- 本地API节点 -->
|
|
|
|
|
|
<div class="ui icon message error" v-if="!isLoading && localLowerVersionAPINode != null">
|
|
|
|
|
|
<i class="icon warning circle"></i>
|
|
|
|
|
|
<span v-if="localLowerVersionAPINode.runtimeVersion == localLowerVersionAPINode.fileVersion">升级提醒:发现一个正在使用的本地API节点版本需要升级,文件位置:{{localLowerVersionAPINode.exePath}},当前版本:v{{localLowerVersionAPINode.runtimeVersion}}。</span>
|
|
|
|
|
|
<span v-if="localLowerVersionAPINode.runtimeVersion != localLowerVersionAPINode.fileVersion">升级提醒:发现一个正在使用的本地API节点版本文件已经更新,但需要重启后生效,文件位置:{{localLowerVersionAPINode.exePath}}。 <a href="" @click.prevent="restartAPINode" v-if="!isRestartingLocalAPINode">[帮我重启]</a><span v-if="isRestartingLocalAPINode">尝试重启中...</span></span>
|
|
|
|
|
|
<a href="" title="关闭" @click.prevent="closeMessage"><i class="ui icon remove small"></i></a>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2022-06-14 19:55:38 +08:00
|
|
|
|
<!-- 没有磁盘空间提醒 -->
|
2022-06-14 20:00:00 +08:00
|
|
|
|
<div class="ui icon message error" v-if="!isLoading && dashboard.diskUsageWarning != null && dashboard.diskUsageWarning.length > 0">
|
2022-06-14 19:55:38 +08:00
|
|
|
|
<i class="icon warning circle"></i>
|
|
|
|
|
|
{{dashboard.diskUsageWarning}}
|
|
|
|
|
|
<a href="" title="关闭" @click.prevent="closeMessage"><i class="ui icon remove small"></i></a>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2021-05-11 22:47:21 +08:00
|
|
|
|
<!-- 统计图表 -->
|
2022-04-07 18:31:21 +08:00
|
|
|
|
<div class="ui three columns grid counter-chart" v-if="!isLoading">
|
2021-01-21 18:55:53 +08:00
|
|
|
|
<div class="ui column">
|
2021-01-21 19:22:06 +08:00
|
|
|
|
<h4>集群<link-icon href="/clusters" v-if="dashboard.canGoNodes"></link-icon></h4>
|
2021-01-21 18:55:53 +08:00
|
|
|
|
<div class="value"><span>{{dashboard.countNodeClusters}}</span>个</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="ui column">
|
2021-01-21 19:22:06 +08:00
|
|
|
|
<h4>边缘节点<link-icon href="/clusters" v-if="dashboard.canGoNodes"></link-icon></h4>
|
2021-09-27 09:23:48 +08:00
|
|
|
|
<div class="value"><span>{{dashboard.countNodes}}</span>个
|
|
|
|
|
|
<span style="font-size: 1em" v-if="dashboard.countOfflineNodes > 0">/ <a href="/clusters" v-if="dashboard.canGoNodes"><span class="red" style="font-size: 1em">{{dashboard.countOfflineNodes}}离线</span></a><span class="red" style="font-size: 1em" v-else>{{dashboard.countOfflineNodes}}离线</span></span>
|
|
|
|
|
|
</div>
|
2021-01-21 18:55:53 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
2022-04-16 22:23:58 +08:00
|
|
|
|
<div class="ui column with-border">
|
2021-01-21 19:22:06 +08:00
|
|
|
|
<h4>API节点<link-icon href="/api" v-if="dashboard.canGoSettings"></link-icon></h4>
|
2021-09-27 09:23:48 +08:00
|
|
|
|
<div class="value"><span>{{dashboard.countAPINodes}}</span>个
|
|
|
|
|
|
<span style="font-size: 1em" v-if="dashboard.countOfflineAPINodes > 0">/ <a href="/api" v-if="dashboard.canGoSettings"><span class="red" style="font-size: 1em">{{dashboard.countOfflineAPINodes}}离线</span></a><span class="red" style="font-size: 1em" v-else>{{dashboard.countOfflineAPINodes}}离线</span></span>
|
|
|
|
|
|
</div>
|
2021-01-21 18:55:53 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="ui column">
|
2021-01-21 19:22:06 +08:00
|
|
|
|
<h4>用户<link-icon href="/users" v-if="dashboard.canGoUsers"></link-icon></h4>
|
2022-10-26 09:51:09 +08:00
|
|
|
|
<div class="value"><span>{{dashboard.countUsers}}</span>个</div>
|
2021-01-21 18:55:53 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="ui column">
|
2021-01-21 19:22:06 +08:00
|
|
|
|
<h4>服务<link-icon href="/servers" v-if="dashboard.canGoServers"></link-icon></h4>
|
2021-01-21 18:55:53 +08:00
|
|
|
|
<div class="value"><span>{{dashboard.countServers}}</span>个</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2022-04-16 22:23:58 +08:00
|
|
|
|
<div class="ui column with-border">
|
2021-01-21 19:22:06 +08:00
|
|
|
|
<h4>今日流量</h4>
|
2021-01-21 18:55:53 +08:00
|
|
|
|
<div class="value"><span>{{todayTraffic}}</span>{{todayTrafficUnit}}</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2021-09-19 16:10:52 +08:00
|
|
|
|
<div class="ui divider" v-show="!isLoading"></div>
|
2021-01-21 18:55:53 +08:00
|
|
|
|
|
2021-09-19 16:10:52 +08:00
|
|
|
|
<div class="ui menu tabular" v-show="!isLoading">
|
2021-07-11 11:09:41 +08:00
|
|
|
|
<a href="" class="item" :class="{active: trafficTab == 'hourly'}" @click.prevent="selectTrafficTab('hourly')">24小时流量趋势</a>
|
|
|
|
|
|
<a href="" class="item" :class="{active: trafficTab == 'daily'}" @click.prevent="selectTrafficTab('daily')">15天流量趋势</a>
|
2021-01-21 18:55:53 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 按小时统计 -->
|
|
|
|
|
|
<div class="chart-box" id="hourly-traffic-chart-box" v-show="trafficTab == 'hourly'"></div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 按日统计 -->
|
2021-07-19 17:58:02 +08:00
|
|
|
|
<div class="chart-box" id="daily-traffic-chart-box" v-show="trafficTab == 'daily'"></div>
|
|
|
|
|
|
|
2021-09-19 16:10:52 +08:00
|
|
|
|
<!-- 域名排行 -->
|
|
|
|
|
|
<h4 v-show="!isLoading">域名访问排行 <span>(24小时)</span></h4>
|
|
|
|
|
|
<div class="chart-box" id="top-domains-chart"></div>
|
|
|
|
|
|
|
2021-07-19 17:58:02 +08:00
|
|
|
|
<!-- 指标 -->
|
|
|
|
|
|
<div class="ui divider" v-if="metricCharts.length > 0"></div>
|
|
|
|
|
|
<metric-board>
|
|
|
|
|
|
<metric-chart v-for="chart in metricCharts"
|
|
|
|
|
|
:key="chart.id"
|
|
|
|
|
|
:v-chart="chart.chart"
|
|
|
|
|
|
:v-stats="chart.stats"
|
|
|
|
|
|
:v-item="chart.item">
|
|
|
|
|
|
</metric-chart>
|
|
|
|
|
|
</metric-board>
|