-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
156 lines (144 loc) · 5.91 KB
/
index.html
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
145
146
147
148
149
150
151
152
153
154
155
156
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>GoCD Dashboard</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="css/dashboard.css">
<link rel="shortcut icon" href="favicon.ico">
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-md-4">
<h4><strong>GoCD Dashboard</strong></h4>
<table class="table table-striped table-condensed">
<thead>
<tr>
<th colspan="2">Agents</th>
</tr>
</thead>
<tbody id="agents" class="small"></tbody>
</table>
<table class="table table-condensed">
<thead>
<tr>
<th>Queued Jobs</th>
</tr>
</thead>
<tbody id="scheduled-jobs" class="small"></tbody>
</table>
</div>
<div class="col-md-8">
<h5><strong>Pipelines</strong></h5>
<div id="pipeline-groups"></div>
</div>
</div>
</div>
<!-- modal -->
<div id="pause-modal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 id="pause-modal-title" class="modal-title">Pause Pipeline</h4>
</div>
<div id="pause-modal-body" class="modal-body">
<form class="form-horizontal" role="form" onsubmit="return false">
<div class="form-group" id="pause-modal-form">
<label for="pause-modal-form-pausecause" class="col-sm-4 control-label">Cause</label>
<div class="col-sm-6">
<input id="pause-modal-form-pausecause" class="form-control">
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button id="pause-modal-submit-button" type="button" class="btn btn-default" type="submit">Pause</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- /.modal -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/3.0.3/handlebars.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.6/moment.min.js"></script>
<script id="pipeline-group-template" type="text/x-handlebars-template">
<table class="table small table-condensed">
<thead>
<tr>
<th colspan="5">{{name}}</th>
<th data-toggle="collapse" data-target="#pipeline-group-{{name}}"><span id="chevron-{{name}}" class="glyphicon glyphicon-chevron-down pull-right"></span>
</th>
</tr>
</thead>
<tbody class="collapse in" id="pipeline-group-{{name}}" data-chevron="#chevron-{{name}}"></tbody>
</table>
</script>
<script id="pipeline-badge-template" type="text/x-handlebars-template">
<td><a href="{{serverUrl history_url}}" target="_blank">{{name}}</a>{{#if pause_info.paused}} <span class="label label-default">paused</span>{{/if}}</td>
<td>
{{#each _embedded.instances.[0]._embedded.stages}}
<a href="{{serverUrl url}}" target="_blank"><span class="label {{status_label_class}}">{{name}}</span></a>
{{/each}}
</td>
<td>
<a href="{{_embedded.instances.[0]._links.vsm_url.href}}" target="_blank">#{{_embedded.instances.[0].label}}</a> triggered by {{_embedded.instances.[0].triggered_by}} {{reldate _embedded.instances.[0].schedule_at}}
</td>
<td>
<a class="glyphicon glyphicon-sound-stereo" href="{{_embedded.instances.[0]._links.compare_url.href}}" title="Compare" target="_blank" />
</td>
<td>
<a class="hover-tooltip glyphicon glyphicon-edit" data-url="{{_embedded.instances.[0]._links.build_cause_url.href}}" target="_blank" />
</td>
<td>
{{#if pause_info.paused}}
<a class="glyphicon glyphicon-step-forward" href="javascript:;" onclick="postURL('{{_links.unpause.href}}');" />
{{else}}
{{#unless is_building}}
<a class="glyphicon glyphicon-play" href="javascript:;" onclick="$(this).hide(); postURL('{{_links.trigger.href}}');" />
{{/unless}}
<a class="glyphicon glyphicon-pause" href="javascript:;" onclick="showPauseModal('{{name}}', '{{_links.pause.href}}');" />
{{/if}}
</td>
</script>
<script id="scheduled-job-template" type="text/x-handlebars-template">
<tr>
<td>
<a href='{{url}}' target="_blank">{{name}}</a>
<a class="glyphicon glyphicon-remove-circle" href="javascript:;" onclick="postURL('{{serverUrl cancel_url}}');" />
</td>
</tr>
</script>
<script id="agent-template" type="text/x-handlebars-template">
<tr>
<td>
<strong>{{agent_name}} / {{agent_ip_address}} / {{agent_os}}</strong>
</td>
<td class="text-right">
{{#each agent_environments}}
<span class="label label-info">{{this}}</span>
{{/each}}
<span class="label {{status_label_class}}">{{status}}{{#if build_url}} for {{build_time}}{{/if}}</span>
</td>
</tr>
<tr>
<td colspan="2">
{{#if build_url}}
<a href="{{serverUrl build_url}}" target="_blank">{{build_name}}</a>
<a class="glyphicon glyphicon-remove-circle" href="javascript:;" onclick="postURL('{{serverUrl cancel_url}}');" />
{{/if}}
</td>
</tr>
</script>
<script src="js/config.js"></script>
<script src="js/dashboard.js"></script>
</body>
</html>