Merge branch 'mater-ztq' into 'master'
腾讯云展示租户详情页 See merge request !1222
Showing
13 changed files
with
187 additions
and
7 deletions
@@ -4008,10 +4008,11 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele | @@ -4008,10 +4008,11 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele | ||
4008 | layer.alert('该资源只对接TRAP告警信息!',{icon:0}); | 4008 | layer.alert('该资源只对接TRAP告警信息!',{icon:0}); |
4009 | return; | 4009 | return; |
4010 | } | 4010 | } |
4011 | - //如果是腾讯云平台且是租户,则没有详情页 | 4011 | + //如果是腾讯云平台且是租户,则跳转租户页面 |
4012 | if (res.resType === 'TENCENT_CLOUD_PLAT' && res.platUserType !== '0'){ | 4012 | if (res.resType === 'TENCENT_CLOUD_PLAT' && res.platUserType !== '0'){ |
4013 | - layer.alert('只有运营端有详情页!',{icon:0}); | ||
4014 | - return; | 4013 | + // layer.alert('只有运营端有详情页!',{icon:0}); |
4014 | + // return; | ||
4015 | + url = common.detailPath(res.resType+'_TENANT',res.resId,protocol); | ||
4015 | } | 4016 | } |
4016 | //url(/src/style/img/shutdown.png) | 4017 | //url(/src/style/img/shutdown.png) |
4017 | title +=`<span id="title-shutdown" data-id=${resId} style="flex:1;padding:0 5px;width:600px;display: inline-block;position: relative;top: 0px;left:20px;"></span>` | 4018 | title +=`<span id="title-shutdown" data-id=${resId} style="flex:1;padding:0 5px;width:600px;display: inline-block;position: relative;top: 0px;left:20px;"></span>` |
1 | +<style> | ||
2 | +</style> | ||
3 | +<article class="page-container template template_redis"> | ||
4 | + <div class="page-panel"> | ||
5 | + <div class="main"> | ||
6 | + <div class="layui-card"> | ||
7 | + <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief"> | ||
8 | + <iframe src="/vue3/index.html#/vue3/tencentCloudTenant" class="layadmin-iframe" style="height: 748px!important;border: none!important;"/> | ||
9 | + </div> | ||
10 | + </div> | ||
11 | + </div> | ||
12 | + </div> | ||
13 | +</article> | ||
14 | +<textarea id="tencent_cloud_plat_param_id" style="display: none;">{{d}}</textarea> | ||
15 | +<script> | ||
16 | + layui.use('tencent_cloud_plat', function (fn) { | ||
17 | + var $ = layui.$; | ||
18 | + var parm = $("#tencent_cloud_plat_param_id").val(); | ||
19 | + if(parm.indexOf('{{d') != -1){ | ||
20 | + fn(); | ||
21 | + }else{ | ||
22 | + fn(JSON.parse(parm)); | ||
23 | + } | ||
24 | + }); | ||
25 | +</script> |
@@ -232,11 +232,100 @@ | @@ -232,11 +232,100 @@ | ||
232 | .td-sql-ratio-box .res-ratio .progress{ | 232 | .td-sql-ratio-box .res-ratio .progress{ |
233 | width: 40%; | 233 | width: 40%; |
234 | } | 234 | } |
235 | +.tencent-tenant-title{ | ||
236 | + padding: 20px 0px; | ||
237 | + border-bottom: 1px solid #E3E3E3; | ||
238 | +} | ||
239 | +.tencent-tenant-items{ | ||
240 | + display: flex; | ||
241 | + flex-wrap: wrap; | ||
242 | + align-content: start; | ||
243 | +} | ||
244 | +.tencent-tenant-items .tencent-tenant-item{ | ||
245 | + width: calc((100% - 36px) / 3); | ||
246 | + height: 154px; | ||
247 | + background: linear-gradient(181deg, #EAF1FF, #FFFFFF); | ||
248 | + box-shadow: -1px 4px 3px 0px rgba(71,71,71,0.05); | ||
249 | + border-radius: 15px; | ||
250 | + margin-right: 18px; | ||
251 | + margin-top: 18px; | ||
235 | 252 | ||
236 | - | ||
237 | - | ||
238 | - | ||
239 | - | 253 | + display: flex; |
254 | + justify-content: space-around; | ||
255 | + align-items: center; | ||
256 | +} | ||
257 | +.tencent-tenant-items .tencent-tenant-item:nth-of-type(3n){ | ||
258 | + margin-right: 0; | ||
259 | +} | ||
260 | +.tencent-tenant-img{ | ||
261 | + width: 90px; | ||
262 | + height: 85px; | ||
263 | +} | ||
264 | +.tencent-tenant-info{ | ||
265 | + width: 330px; | ||
266 | + height: 100%; | ||
267 | +} | ||
268 | +.tencent-tenant-name{ | ||
269 | + border-bottom: 1px solid #D5E3FA; | ||
270 | + height: 72px; | ||
271 | + display: flex; | ||
272 | + align-items: center; | ||
273 | + justify-content: space-between; | ||
274 | +} | ||
275 | +.tencent-tenant-name .tencent-tenant-resTypeName{ | ||
276 | + font-weight: bold; | ||
277 | + font-size: 16px; | ||
278 | + margin-left: 18px; | ||
279 | +} | ||
280 | +.tencent-tenant-name .tencent-tenant-count{ | ||
281 | + font-size: 30px; | ||
282 | + font-weight: bold; | ||
283 | + color: #15162B; | ||
284 | + margin-right: 50px; | ||
285 | +} | ||
286 | +.tencent-tenant-alarm{ | ||
287 | + width: 100%; | ||
288 | + height: calc(100% - 72px); | ||
289 | + display: flex; | ||
290 | + align-items: center; | ||
291 | + justify-content: space-between; | ||
292 | +} | ||
293 | +.tencent-tenant-normalCount{ | ||
294 | + color: #0BAC33; | ||
295 | + margin-left: 18px; | ||
296 | + font-weight: 500; | ||
297 | + text-align: right; | ||
298 | +} | ||
299 | +.tencent-tenant-normalCount div:nth-of-type(1){ | ||
300 | + margin-bottom: 14px; | ||
301 | +} | ||
302 | +.tencent-tenant-normalCount div:nth-of-type(1):before{ | ||
303 | + content: ''; | ||
304 | + display: inline-block; | ||
305 | + width: 12px; | ||
306 | + height: 12px; | ||
307 | + border-radius: 50%; | ||
308 | + margin-right: 12px; | ||
309 | + background-color: #0BAC33; | ||
310 | +} | ||
311 | +.tencent-tenant-alarmCount{ | ||
312 | + color: #D81E06; | ||
313 | + margin-right: 50px; | ||
314 | + font-weight: 500; | ||
315 | + text-align: right; | ||
316 | +} | ||
317 | +.tencent-tenant-alarmCount div:nth-of-type(1){ | ||
318 | + margin-bottom: 14px; | ||
319 | +} | ||
320 | +.tencent-tenant-alarmCount div:nth-of-type(1):before{ | ||
321 | + content: ''; | ||
322 | + display: inline-block; | ||
323 | + width: 12px; | ||
324 | + height: 12px; | ||
325 | + border-radius: 50%; | ||
326 | + margin-right: 12px; | ||
327 | + background-color: #D81E06; | ||
328 | +} | ||
240 | 329 | ||
241 | 330 | ||
242 | 331 |
hg-monitor-web-zj/src/main/resources/static/vue3/src/assets/images/machineRoom/RES_CKAFKA.png
0 → 100644

64.4 KB
hg-monitor-web-zj/src/main/resources/static/vue3/src/assets/images/machineRoom/RES_DISK.png
0 → 100644

65.4 KB
hg-monitor-web-zj/src/main/resources/static/vue3/src/assets/images/machineRoom/RES_LOAD_BALANCE.png
0 → 100644

57.1 KB
hg-monitor-web-zj/src/main/resources/static/vue3/src/assets/images/machineRoom/RES_MARIADB.png
0 → 100644

69.9 KB
hg-monitor-web-zj/src/main/resources/static/vue3/src/assets/images/machineRoom/RES_REDIS.png
0 → 100644

65.7 KB
hg-monitor-web-zj/src/main/resources/static/vue3/src/assets/images/machineRoom/RES_TDSQLMYSQL.png
0 → 100644

62.7 KB
hg-monitor-web-zj/src/main/resources/static/vue3/src/assets/images/machineRoom/VIRTUALHOST.png
0 → 100644

59.8 KB
@@ -211,6 +211,10 @@ const routes = [{ | @@ -211,6 +211,10 @@ const routes = [{ | ||
211 | path: '/vue3/tencentCloudTDSQL', // 腾讯云--TDSQL-Msql资源 | 211 | path: '/vue3/tencentCloudTDSQL', // 腾讯云--TDSQL-Msql资源 |
212 | name: 'tencentCloudTDSQL', | 212 | name: 'tencentCloudTDSQL', |
213 | component: ()=> myImport('views/tencentCloud/tencentCloudTDSQL') | 213 | component: ()=> myImport('views/tencentCloud/tencentCloudTDSQL') |
214 | + },{ | ||
215 | + path: '/vue3/tencentCloudTenant', // 腾讯云租户 | ||
216 | + name: 'tencentCloudTDSQL', | ||
217 | + component: ()=> myImport('views/tencentCloud/tencentCloudTenant') | ||
214 | } | 218 | } |
215 | ]; | 219 | ]; |
216 | 220 |
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/tencentCloud/tencentCloudTenant.html
0 → 100644
1 | +<div> | ||
2 | + <div class="cm-card" style="background: #f1f4fb;text-align: left;"> | ||
3 | + <div class="tencent-cloud-box"> | ||
4 | + <div class="tencent-tenant-title"> | ||
5 | + <span>资源统计信息</span> | ||
6 | + </div> | ||
7 | + <div class="tencent-tenant-items"> | ||
8 | + <div class="tencent-tenant-item" v-for="(item,index) in tenantList" :key="index"> | ||
9 | + <img class="tencent-tenant-img" :src="'/vue3/src/assets/images/machineRoom/TENCENT_CLOUD_PLAT_'+item.type+'.png'" alt=""> | ||
10 | + <div class="tencent-tenant-info"> | ||
11 | + <div class="tencent-tenant-name"> | ||
12 | + <div class="tencent-tenant-resTypeName">{{item.resTypeName}}</div> | ||
13 | + <div class="tencent-tenant-count">{{item.count}}</div> | ||
14 | + </div> | ||
15 | + <div class="tencent-tenant-alarm"> | ||
16 | + <div class="tencent-tenant-normalCount"> | ||
17 | + <div>正常量</div> | ||
18 | + <div>{{item.normalCount}}</div> | ||
19 | + </div> | ||
20 | + <div class="tencent-tenant-alarmCount"> | ||
21 | + <div>异常量</div> | ||
22 | + <div>{{item.alarmCount}}</div> | ||
23 | + </div> | ||
24 | + </div> | ||
25 | + </div> | ||
26 | + </div> | ||
27 | + </div> | ||
28 | + </div> | ||
29 | + </div> | ||
30 | +</div> |
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/tencentCloud/tencentCloudTenant.js
0 → 100644
1 | +export default { | ||
2 | + name: "tencentCloudTenant", | ||
3 | + template: '', | ||
4 | + components: {}, | ||
5 | + props: [], | ||
6 | + setup(props,{attrs,slots,emit}){ | ||
7 | + const {proxy} = Vue.getCurrentInstance(); | ||
8 | + const resId = localStorage.getItem('resId'); | ||
9 | + let height = Vue.ref(window.innerHeight); | ||
10 | + | ||
11 | + let tenantList = Vue.ref([]) | ||
12 | + let getList = ()=>{ | ||
13 | + proxy.$http.get(`/api-web/bResource/tenantStatistics`,{ | ||
14 | + resId:resId, | ||
15 | + },(res)=>{ | ||
16 | + console.log(res.data); | ||
17 | + tenantList.value = res.data; | ||
18 | + tenantList.value.forEach(item=>{ | ||
19 | + item.type='tencent-cloud-host'; | ||
20 | + }) | ||
21 | + },(err)=>{ | ||
22 | + console.log(err); | ||
23 | + }) | ||
24 | + } | ||
25 | + getList(); | ||
26 | + | ||
27 | + return { | ||
28 | + tenantList, | ||
29 | + } | ||
30 | + } | ||
31 | +} |
-
Please register or login to post a comment