This repository was archived by the owner on Sep 17, 2019. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,7 +79,12 @@ <h3 class="modal-title">{{type}}主机</h3>
7979 < td class ="table-td-padding "> {{host.name}}</ td >
8080 < td class ="table-td-padding "> {{host.ip}}</ td >
8181 < td class ="table-td-padding "> {{host.appset.name}}</ td >
82- < td class ="table-td-padding "> {{getStatus(host.id)}}</ td >
82+ < td class ="table-td-padding ">
83+ < span ng-class ="getStatus(host.id)==1?'green':'red' ">
84+ < i class ="fa fa-fw " ng-class ="getStatus(host.id)==1?'fa-check':'fa-times' "> </ i >
85+ {{getStatus(host.id)==1?'运行中':'未运行'}}
86+ </ span >
87+ </ td >
8388 < td class ="table-td-padding ">
8489 < ul class ="list-unstyled list-no-margin ">
8590 < li ng-repeat ="p in host.path "> {{p.path}}</ li >
Original file line number Diff line number Diff line change @@ -73,15 +73,10 @@ angular.module('ModuleAB.hosts', ['ngRoute'])
7373 }
7474
7575 $scope . getStatus = function ( id ) {
76- var s = '<i class="fa {0} fa-fw"></i> {1}'
7776 try {
78- if ( clientStatus [ id ] === 1 ) {
79- return s . format ( 'fa-check' , '运行中' ) ;
80- } else {
81- return s . format ( 'fa-times' , '未运行' ) ;
82- }
77+ return clientStatus [ id ] ;
8378 } catch ( e ) {
84- return s . format ( 'fa-question' , '未知' ) ;
79+ return 0 ;
8580 }
8681 }
8782
Original file line number Diff line number Diff line change 2525 <!-- Custom Fonts -->
2626 < link href ="/bower_components/font-awesome/css/font-awesome.min.css " rel ="stylesheet " type ="text/css ">
2727
28+ < style >
29+ span .status {
30+
31+ }
32+ span .red {
33+ color : red;
34+ }
35+ span .green {
36+ color : green;
37+ }
38+ </ style >
39+
2840 <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
2941 <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
3042 <!--[if lt IE 9]>
You can’t perform that action at this time.
0 commit comments