阅读rancher/ui 集群监控面板部分源码

190 阅读1分钟

点击一个集群 路由大概是这样的 https://server-namec/123/monitoring

根据app/router.js 得知, 目录 /authenticated/cluster 匹配 /c/:cluster_id

默认进入/authenticated/cluster/index触发

redirect() {
    this.replaceWith('authenticated.cluster.monitoring.index');
}

进入到lib/monitoring/addon/index

最终 

lib\monitoring\addon\index\template.hbs  便是集群监控面板的源码

使用的主要组件有 cluster-dashboard (\lib\monitoring\addon\components\cluster-dashboard\template.hbs)

cluster-basic-info

nodes-live

k8s-component-status

cluster-dashboard-tabs

resource-event-list

所用主要组件基本都在 monitoring目录夹中

由于没有集群信息。缺少一个根据页面进行标识组件的图片。先凑活看吧,有人需要我再补。