dashboard.component.html 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <div nz-row nzGutter="16" style="margin-top: 70px">
  2. <div nz-col nzXs="24" nzSm="12" nzMd="6" class="mb-md">
  3. <div nz-row nzAlign="middle" class="bg-primary rounded-lg">
  4. <div nz-col nzSpan="10" class="p-md text-white">
  5. <div class="h2 mt0 font-weight-bold">{{ appCountService.size }}</div>
  6. <p class="h5 text-nowrap mb0">
  7. <i nz-icon nzType="cloud" nzTheme="outline"></i>
  8. {{ 'monitor.category.service' | i18n }}
  9. </p>
  10. </div>
  11. <div nz-col nzSpan="14" class="p-md text-white">
  12. <nz-tag class="mb-xs">
  13. <span>{{ 'monitor.status.available' | i18n }} </span><span style="font-weight: bolder">{{ appCountService.availableSize }}</span>
  14. </nz-tag>
  15. <nz-tag class="mb-xs">
  16. <span>{{ 'monitor.status.unavailable' | i18n }} </span
  17. ><span style="font-weight: bolder">{{ appCountService.unAvailableSize }}</span>
  18. </nz-tag>
  19. <nz-tag class="mb-xs">
  20. <span>{{ 'monitor.status.unreachable' | i18n }} </span
  21. ><span style="font-weight: bolder">{{ appCountService.unReachableSize }}</span>
  22. </nz-tag>
  23. <nz-tag class="mb-xs">
  24. <span>{{ 'monitor.status.un-manage' | i18n }} </span><span style="font-weight: bolder">{{ appCountService.unManageSize }}</span>
  25. </nz-tag>
  26. </div>
  27. </div>
  28. </div>
  29. <div nz-col nzXs="24" nzSm="12" nzMd="6" class="mb-md">
  30. <div nz-row nzAlign="middle" class="bg-success rounded-lg">
  31. <div nz-col nzSpan="10" class="p-md text-white">
  32. <div class="h2 mt0 font-weight-bold">{{ appCountDb.size }}</div>
  33. <p class="h5 text-nowrap mb0">
  34. <i nz-icon nzType="database" nzTheme="outline"></i>
  35. {{ 'monitor.category.db' | i18n }}
  36. </p>
  37. </div>
  38. <div nz-col nzSpan="14">
  39. <nz-tag class="mb-xs">
  40. <span>{{ 'monitor.status.available' | i18n }} </span><span style="font-weight: bolder">{{ appCountDb.availableSize }}</span>
  41. </nz-tag>
  42. <nz-tag class="mb-xs">
  43. <span>{{ 'monitor.status.unavailable' | i18n }} </span><span style="font-weight: bolder">{{ appCountDb.unAvailableSize }}</span>
  44. </nz-tag>
  45. <nz-tag class="mb-xs">
  46. <span>{{ 'monitor.status.unreachable' | i18n }} </span><span style="font-weight: bolder">{{ appCountDb.unReachableSize }}</span>
  47. </nz-tag>
  48. <nz-tag class="mb-xs">
  49. <span>{{ 'monitor.status.un-manage' | i18n }} </span><span style="font-weight: bolder">{{ appCountDb.unManageSize }}</span>
  50. </nz-tag>
  51. </div>
  52. </div>
  53. </div>
  54. <div nz-col nzXs="24" nzSm="12" nzMd="6" class="mb-md">
  55. <div nz-row nzAlign="middle" class="bg-orange rounded-lg">
  56. <div nz-col nzSpan="10" class="p-md text-white">
  57. <div class="h2 mt0 font-weight-bold">{{ appCountOs.size }}</div>
  58. <p class="h5 text-nowrap mb0">
  59. <i nz-icon nzType="windows" nzTheme="outline"></i>
  60. {{ 'monitor.category.os' | i18n }}
  61. </p>
  62. </div>
  63. <div nz-col nzSpan="14">
  64. <nz-tag class="mb-xs">
  65. <span>{{ 'monitor.status.available' | i18n }} </span><span style="font-weight: bolder">{{ appCountOs.availableSize }}</span>
  66. </nz-tag>
  67. <nz-tag class="mb-xs">
  68. <span>{{ 'monitor.status.unavailable' | i18n }} </span><span style="font-weight: bolder">{{ appCountOs.unAvailableSize }}</span>
  69. </nz-tag>
  70. <nz-tag class="mb-xs">
  71. <span>{{ 'monitor.status.unreachable' | i18n }} </span><span style="font-weight: bolder">{{ appCountOs.unReachableSize }}</span>
  72. </nz-tag>
  73. <nz-tag class="mb-xs">
  74. <span>{{ 'monitor.status.un-manage' | i18n }} </span><span style="font-weight: bolder">{{ appCountOs.unManageSize }}</span>
  75. </nz-tag>
  76. </div>
  77. </div>
  78. </div>
  79. <div nz-col nzXs="24" nzSm="12" nzMd="6" class="mb-md">
  80. <div nz-row nzAlign="middle" class="bg-magenta rounded-lg">
  81. <div nz-col nzSpan="10" class="p-md text-white">
  82. <div class="h2 mt0 font-weight-bold">{{ appCountCustom.size }}</div>
  83. <p class="h5 text-nowrap mb0">
  84. <i nz-icon nzType="skin" nzTheme="outline"></i>
  85. {{ 'monitor.category.custom' | i18n }}
  86. </p>
  87. </div>
  88. <div nz-col nzSpan="14">
  89. <nz-tag class="mb-xs">
  90. <span>{{ 'monitor.status.available' | i18n }} </span><span style="font-weight: bolder">{{ appCountCustom.availableSize }}</span>
  91. </nz-tag>
  92. <nz-tag class="mb-xs">
  93. <span>{{ 'monitor.status.unavailable' | i18n }} </span
  94. ><span style="font-weight: bolder">{{ appCountCustom.unAvailableSize }}</span>
  95. </nz-tag>
  96. <nz-tag class="mb-xs">
  97. <span>{{ 'monitor.status.unreachable' | i18n }} </span
  98. ><span style="font-weight: bolder">{{ appCountCustom.unReachableSize }}</span>
  99. </nz-tag>
  100. <nz-tag class="mb-xs">
  101. <span>{{ 'monitor.status.un-manage' | i18n }} </span><span style="font-weight: bolder">{{ appCountCustom.unManageSize }}</span>
  102. </nz-tag>
  103. </div>
  104. </div>
  105. </div>
  106. </div>
  107. <div
  108. echarts
  109. [options]="appsCountEChartOption"
  110. theme="default"
  111. [autoResize]="true"
  112. [loading]="appsCountLoading"
  113. (chartClick)="onChartClick($event)"
  114. (chartInit)="onAppsCountChartInit($event)"
  115. style="width: 100%; height: 400px; margin-top: 1%"
  116. ></div>
  117. <div nz-row nzGutter="16" style="margin-top: 10px">
  118. <div nz-col nzXs="24" nzSm="24" nzMd="12" class="mb-md">
  119. <nz-card nzHoverable [nzTitle]="'dashboard.alerts.title' | i18n" [nzExtra]="extraTemplate">
  120. <nz-timeline nzMode="left">
  121. <nz-timeline-item *ngFor="let alert of alerts; let i = index" [nzLabel]="(alert.gmtCreate | date: 'YYYY-MM-dd HH:mm:ss')?.trim()">
  122. <p style="font-weight: 400">
  123. <nz-tag *ngIf="alert.priority == 0" nzColor="red">
  124. <i nz-icon nzType="bell" nzTheme="outline"></i>
  125. <span>{{ 'alert.priority.0' | i18n }}</span>
  126. </nz-tag>
  127. <nz-tag *ngIf="alert.priority == 1" nzColor="orange">
  128. <i nz-icon nzType="bell" nzTheme="outline"></i>
  129. <span>{{ 'alert.priority.1' | i18n }}</span>
  130. </nz-tag>
  131. <nz-tag *ngIf="alert.priority == 2" nzColor="yellow">
  132. <i nz-icon nzType="bell" nzTheme="outline"></i>
  133. <span>{{ 'alert.priority.2' | i18n }}</span>
  134. </nz-tag>
  135. <span>[{{ alert.monitorName }}] </span>
  136. {{ alert.content }}
  137. </p>
  138. </nz-timeline-item>
  139. </nz-timeline>
  140. </nz-card>
  141. </div>
  142. <div nz-col nzXs="24" nzSm="12" nzMd="7" class="mb-md">
  143. <div
  144. echarts
  145. [options]="alertsEChartOption"
  146. theme="default"
  147. [autoResize]="true"
  148. [loading]="alertsLoading"
  149. (chartInit)="onAlertNumChartInit($event)"
  150. style="width: 100%; min-height: 300px"
  151. ></div>
  152. </div>
  153. <div nz-col nzXs="24" nzSm="12" nzMd="5" class="mb-md">
  154. <div
  155. echarts
  156. [options]="alertsDealEChartOption"
  157. theme="default"
  158. [autoResize]="true"
  159. [loading]="alertsDealLoading"
  160. (chartInit)="onAlertRateChartInit($event)"
  161. style="width: 100%; min-height: 300px"
  162. ></div>
  163. </div>
  164. </div>
  165. <ng-template #extraTemplate>
  166. <a [routerLink]="['/alert/center']">{{ 'dashboard.alerts.enter' | i18n }}</a>
  167. </ng-template>