projects.hbs
6.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
{{#if not_business}}
<div class="pageheader">
<div class="media">
<div class="pageicon pull-left">
<i class="fa fa-th-list"></i>
</div>
<div class="media-body">
<ul class="breadcrumb">
<li><a href="/"><i class="glyphicon glyphicon-home"></i></a></li>
<li><a href="/servers">Projects</a></li>
</ul>
<h4>项目列表</h4>
</div>
</div>
<!-- media -->
</div>
<!-- pageheader -->
<div class="contentpanel servers-page">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">AWS</h3>
</div><!-- panel-heading -->
<div class="panel-body">
<div class="row row-stat">
{{#each awsProjects}}
<div class="col-md-4">
<div class="panel panel-{{color}} noborder">
<div class="panel-heading noborder">
<div class="panel-btns">
{{#if @root.is_master}}
<a href="/projects/edit?id={{_id}}" class="tooltips" title="设置"><i
class="fa fa-gear"></i></a>
{{/if}}
</div><!-- panel-btns -->
<div class="panel-icon"><i class="fa fa-git" style="padding-left:12px;"></i></div>
<div class="media-body">
<h1 class="nomargin">{{subname}}</h1>
<h5 class="md-title mt5">{{name}}</h5>
</div><!-- media-body -->
<hr>
<div class="clearfix mt20">
<div class="col-xs-4 project-env" data-id="{{_id}}" data-env="production">
<h5 class="md-title nomargin">线上环境</h5>
{{#if deploy.production.target.length}}
<h4 class="nomargin">{{deploy.production.target.length}}节点</h4>
{{/if}}
</div>
</div>
</div><!-- panel-body -->
</div><!-- panel -->
</div><!-- col-md-4 -->
{{/each}}
{{#if is_master}}
<div class="col-md-4">
<div class="panel panel-default noborder">
<div class="panel-heading noborder">
<div style="text-align: center; font-size: 97px;">
<a href="/projects/new" class="">
<i class="fa fa-plus"></i>
</a>
</div>
</div>
</div>
</div>
{{/if}}
</div>
</div><!-- panel-body -->
</div>
<div class="panel panel-warning">
<div class="panel-heading">
<h3 class="panel-title">QCloud</h3>
</div><!-- panel-heading -->
<div class="panel-body">
<div class="row row-stat">
{{#each qcloudProject}}
<div class="col-md-4">
<div class="panel panel-{{color}} noborder">
<div class="panel-heading noborder">
<div class="panel-btns">
{{#if @root.is_master}}
<a href="/projects/edit?id={{_id}}" class="tooltips" title="设置"><i
class="fa fa-gear"></i></a>
{{/if}}
</div><!-- panel-btns -->
<div class="panel-icon"><i class="fa fa-git" style="padding-left:12px;"></i></div>
<div class="media-body">
<h1 class="nomargin">{{subname}}</h1>
<h5 class="md-title mt5">{{name}}</h5>
</div><!-- media-body -->
<hr>
<div class="clearfix mt20">
<div class="col-xs-4 project-env" data-id="{{_id}}" data-env="production">
<h5 class="md-title nomargin">线上环境</h5>
{{#if deploy.production.target.length}}
<h4 class="nomargin">{{deploy.production.target.length}}节点</h4>
{{/if}}
</div>
<div class="col-xs-4 project-env" data-id="{{_id}}" data-env="preview">
<h5 class="md-title nomargin">灰度环境</h5>
{{#if deploy.preview.target.length}}
<h4 class="nomargin">{{deploy.preview.target.length}}节点</h4>
{{/if}}
</div>
</div>
</div><!-- panel-body -->
</div><!-- panel -->
</div><!-- col-md-4 -->
{{/each}}
{{#if is_master}}
<div class="col-md-4">
<div class="panel panel-default noborder">
<div class="panel-heading noborder">
<div style="text-align: center; font-size: 97px;">
<a href="/projects/new" class="">
<i class="fa fa-plus"></i>
</a>
</div>
</div>
</div>
</div>
{{/if}}
</div>
</div><!-- panel-body -->
</div>
</div>
<script>
$(function() {
$('.project-env').click(function() {
var id = $(this).data('id');
var env = $(this).data('env');
location.href = '/projects/' + id + '?env=' + env;
});
});
</script>
{{/if}}