@@ -6,23 +6,21 @@ <h3>Analyze task</h3>
6
6
< div class ="span4 ">
7
7
< span > First Run: {{=prettydate(first_run.start_time)}}</ span >
8
8
< span > Last Run: {{=prettydate(last_run.start_time)}}</ span >
9
- < ul >
10
- < li > {{=A('Just this task : %s' % (task.uuid), _href=URL(args=request.args(0), user_signature=True))}}</ li >
11
- < li > {{=A('All tasks by function name : %s' % (task.function_name), _href=URL(args=(request.args(0), 'byfunction'), user_signature=True))}}</ li >
12
- < li > {{=A('All tasks by task name name : %s' % (task.task_name), _href=URL(args=(request.args(0), 'bytaskname'), user_signature=True))}}</ li >
13
- {{args = request.args}}
14
- {{if len(args) == 1:}}
15
- < li > {{=A('Just today', _href=URL(args=(request.args(0), 'this', 'bydate', 0), user_signature=True))}}</ li >
16
- {{elif len(args) == 2:}}
17
- < li > {{=A('Just today', _href=URL(args=(request.args(0), request.args(1), 'bydate', 0), user_signature=True))}}</ li >
18
- {{elif len(args) == 4:}}
19
- < li > {{=A('Previous Day', _href=URL(args=(request.args(0), request.args(1), 'byday', int(request.args(3)) + 1), user_signature=True))}}</ li >
20
- < li > {{=A('Next Day', _href=URL(args=(request.args(0), request.args(1), 'byday', int(request.args(3)) - 1), user_signature=True))}}</ li >
21
- {{pass}}
22
- </ ul >
23
-
24
-
25
-
9
+ < div class ="btn-group btn-group-vertical ">
10
+
11
+ {{=A('Just this task : %s' % (task.uuid), _class="btn", _href=URL(args=request.args(0), user_signature=True))}}
12
+ {{=A('All tasks by function name : %s' % (task.function_name), _class="btn", _href=URL(args=(request.args(0), 'byfunction'), user_signature=True))}}
13
+ {{=A('All tasks by task name name : %s' % (task.task_name), _class="btn", _href=URL(args=(request.args(0), 'bytaskname'), user_signature=True))}}
14
+ {{args = request.args}}
15
+ {{if len(args) == 1:}}
16
+ {{=A('Just today', _class="btn", _href=URL(args=(request.args(0), 'this', 'bydate', 0), user_signature=True))}}
17
+ {{elif len(args) == 2:}}
18
+ {{=A('Just today', _class="btn", _href=URL(args=(request.args(0), request.args(1), 'bydate', 0), user_signature=True))}}
19
+ {{elif len(args) == 4:}}
20
+ {{=A('Previous Day', _class="btn", _href=URL(args=(request.args(0), request.args(1), 'byday', int(request.args(3)) + 1), user_signature=True))}}
21
+ {{=A('Next Day', _class="btn", _href=URL(args=(request.args(0), request.args(1), 'byday', int(request.args(3)) - 1), user_signature=True))}}
22
+ {{pass}}
23
+ </ div >
26
24
</ div >
27
25
< div class ="span4 offset4 ">
28
26
< h4 > Status</ h4 >
@@ -50,175 +48,159 @@ <h4>Dates</h4>
50
48
$ ( function ( ) {
51
49
52
50
var jgb_status_series = { { = XML ( jgb_status_series ) } } ;
53
- var data = [ ] ;
54
- var series = [ ] ;
55
- var colors = [ ] ;
51
+ var data = [ ] ; series = [ ] ; colors = [ ] ;
56
52
$ . each ( jgb_status_series , function ( i , e ) {
57
- data . push ( e [ 'data' ] ) ;
58
- series . push ( { 'label' : e [ 'label' ] } ) ;
53
+ data . push ( e [ 'data' ] ) ; series . push ( { 'label' : e [ 'label' ] } ) ;
59
54
colors . push ( e [ 'color' ] ) ;
60
- } ) ;
61
- if ( data . length == 0 ) data = [ null ] ;
62
-
63
- $ . jqplot ( 'bystatus' , [ data ] ,
64
- {
65
- seriesDefaults : {
66
- seriesColors : colors ,
67
- renderer : jQuery . jqplot . PieRenderer ,
68
- rendererOptions : {
69
- // Turn off filling of slices.
70
- fill : false ,
71
- showDataLabels : true ,
72
- // By default, data labels show the percentage of the donut/pie.
73
- // You can show the data 'value' or data 'label' instead.
74
- dataLabels : 'value' ,
75
- dataLabelThreshold : 10 ,
76
- // Add a margin to seperate the slices.
77
- sliceMargin : 2 ,
78
- // stroke the slices with a little thicker line.
79
- lineWidth : 2
80
- }
81
- } ,
82
- legend : { show :true , location : 'e' } ,
83
- series : series
55
+ } ) ; if ( data . length == 0 ) data = [ null ] ;
56
+
57
+ $ . jqplot ( 'bystatus' , [ data ] , {
58
+ seriesDefaults : {
59
+ seriesColors : colors ,
60
+ renderer : jQuery . jqplot . PieRenderer ,
61
+ rendererOptions : {
62
+ fill : false ,
63
+ showDataLabels : true ,
64
+ dataLabels : 'value' ,
65
+ dataLabelThreshold : 10 ,
66
+ sliceMargin : 2 ,
67
+ lineWidth : 2
84
68
}
85
- ) ;
69
+ } ,
70
+ legend : {
71
+ show : true ,
72
+ location : 'e'
73
+ } ,
74
+ series : series
75
+ } ) ;
86
76
87
77
var jgb_duration_series = { { = XML ( jgb_duration_series ) } } ;
88
- var data = [ ] ;
89
- var series = [ ] ;
78
+ var data = [ ] , series = [ ] ;
90
79
$ . each ( jgb_duration_series , function ( i , e ) {
91
- data . push ( e [ 'data' ] ) ;
92
- series . push ( { 'label' : e [ 'label' ] , 'color' : e [ 'color' ] } ) ;
80
+ data . push ( e [ 'data' ] ) ; series . push ( { 'label' : e [ 'label' ] , 'color' :
81
+ e [ 'color' ] } ) ;
93
82
} ) ;
94
83
if ( data . length == 0 ) data = [ [ null ] ] ;
95
84
$ . jqplot ( 'byduration' , data , {
96
- // The "seriesDefaults" option is an options object that will
97
- // be applied to all series in the chart.
98
85
cursor :{
99
86
show : true ,
100
87
zoom : true
101
- } ,
102
- seriesDefaults :{
88
+ } ,
89
+ seriesDefaults : {
103
90
renderer :$ . jqplot . BarRenderer ,
104
- pointLabels : { show : true , location : 'n' , edgeTolerance : - 15 } ,
105
- rendererOptions : { fillToZero : true , barWidth : 5 }
91
+ pointLabels : {
92
+ show : true ,
93
+ location : 'n' ,
94
+ edgeTolerance : - 15
95
+ } ,
96
+ rendererOptions : {
97
+ fillToZero : true ,
98
+ barWidth : 5
99
+ }
106
100
} ,
107
- // Custom labels for the series are specified with the "label"
108
- // option on the series option. Here a series option object
109
- // is specified for each series.
110
101
series :series ,
111
- // Show the legend and put it outside the grid, but inside the
112
- // plot container, shrinking the grid to accomodate the legend.
113
- // A value of "outside" would not shrink the grid and allow
114
- // the legend to overflow the container.
115
- legend :{
116
- renderer : $ . jqplot . EnhancedLegendRenderer ,
117
- show :true
102
+ legend : {
103
+ renderer : $ . jqplot . EnhancedLegendRenderer , show :true
118
104
} ,
119
105
highlighter : {
120
106
show : true ,
121
107
} ,
122
108
axes : {
123
- // Use a category axis on the x axis and use our custom ticks.
124
109
xaxis : {
125
110
renderer : $ . jqplot . CategoryAxisRenderer ,
126
- rendererOptions :{ sortMergedLabels :true } ,
127
- label :'Seconds Elapsed'
111
+ rendererOptions :{ sortMergedLabels :true } , label :'Seconds Elapsed'
128
112
} ,
129
113
yaxis : {
130
114
label : '# of tasks'
131
115
}
132
116
}
133
-
134
117
} ) ;
135
118
136
119
var jgb_when_series = { { = XML ( jgb_when_series ) } } ;
137
- var data = [ ] ;
138
- var series = [ ] ;
120
+ var data = [ ] , series = [ ] ;
139
121
$ . each ( jgb_when_series , function ( i , e ) {
140
- data . push ( e [ 'data' ] ) ;
141
- series . push ( { 'label' : e [ 'label' ] , 'color' : e [ 'color' ] } ) ;
122
+ data . push ( e [ 'data' ] ) ;
123
+ series . push ( { 'label' : e [ 'label' ] , 'color' : e [ 'color' ] } ) ;
142
124
} ) ;
143
125
if ( data . length == 0 ) data = [ [ null ] ] ;
144
126
$ . jqplot ( 'bydate' , data , {
145
- legend :{
146
- renderer : $ . jqplot . EnhancedLegendRenderer ,
147
- show :true
127
+ legend : {
128
+ renderer : $ . jqplot . EnhancedLegendRenderer ,
129
+ show : true
148
130
} ,
149
- cursor :{
131
+ cursor : {
150
132
show : true ,
151
133
zoom : true
134
+ } ,
135
+ seriesDefaults : {
136
+ pointLabels : {
137
+ show : true ,
138
+ location : 'n' ,
139
+ edgeTolerance : - 15
152
140
} ,
153
- seriesDefaults : {
154
- pointLabels : { show : true , location : 'n' , edgeTolerance : - 15 } ,
155
- } ,
156
- axes : {
157
- xaxis : {
158
- renderer : $ . jqplot . DateAxisRenderer ,
159
- tickOptions : { formatString : '%Y-%m-%d' } ,
160
- max : new Date ( new Date ( ) . getTime ( ) + 24 * 60 * 60 * 1000 ) ,
161
- label : 'When'
141
+ } ,
142
+ axes : {
143
+ xaxis : {
144
+ renderer : $ . jqplot . DateAxisRenderer ,
145
+ tickOptions : {
146
+ formatString : '%Y-%m-%d'
147
+ } ,
148
+ max : new Date ( new Date ( ) . getTime ( ) + 24 * 60 * 60 * 1000 ) ,
149
+ label : 'When'
162
150
} ,
163
- yaxis : {
164
- label : '# of tasks'
151
+ yaxis : {
152
+ label : '# of tasks'
165
153
}
166
154
} ,
167
-
168
155
highlighter : {
169
- show : true ,
156
+ show : true ,
170
157
} ,
171
158
series : series
172
- }
173
- ) ;
159
+ } ) ;
174
160
{ { if len ( request . args ) == 4 :} }
175
161
176
162
var jgb_whend_series = { { = XML ( jgb_whend_series ) } } ;
177
- var data = [ ] ;
178
- var series = [ ] ;
163
+ var data = [ ] , series = [ ] ;
179
164
$ . each ( jgb_whend_series , function ( i , e ) {
180
- data . push ( e [ 'data' ] ) ;
181
- series . push ( { 'label' : e [ 'label' ] , 'color' : e [ 'color' ] } ) ;
165
+ data . push ( e [ 'data' ] ) ;
166
+ series . push ( { 'label' : e [ 'label' ] , 'color' : e [ 'color' ] } ) ;
182
167
} ) ;
183
168
if ( data . length == 0 ) data = [ [ null ] ] ;
184
169
$ . jqplot ( 'bydated' , data , {
185
- legend :{
186
- renderer : $ . jqplot . EnhancedLegendRenderer ,
187
- show :true
170
+ legend : {
171
+ renderer : $ . jqplot . EnhancedLegendRenderer ,
172
+ show : true
188
173
} ,
189
- cursor :{
174
+ cursor : {
190
175
show : true ,
191
176
zoom : true
177
+ } ,
178
+ seriesDefaults : {
179
+ pointLabels : {
180
+ show : true ,
181
+ location : 'n' ,
182
+ edgeTolerance : - 15
192
183
} ,
193
- seriesDefaults : {
194
- pointLabels : { show : true , location : 'n' , edgeTolerance : - 15 } ,
195
- } ,
196
- axes : {
197
- xaxis : {
198
- renderer : $ . jqplot . DateAxisRenderer ,
199
- tickOptions : { formatString : '%H:%M' } ,
200
- tickInterval :'3600000' ,
184
+ } ,
185
+ axes : {
186
+ xaxis : {
187
+ renderer : $ . jqplot . DateAxisRenderer ,
188
+ tickOptions : {
189
+ formatString : '%H:%M'
190
+ } ,
191
+ tickInterval : '3600000' ,
201
192
tickRenderer : $ . jqplot . CanvasAxisTickRenderer ,
202
- //tickOptions: {
203
- // angle: -30
204
- //},
205
- //max : new Date(new Date().getTime() + 24 * 60 * 60 * 1000),
206
- label : 'When' ,
207
- //min : "2013-02-22 00:00",
208
- //max : "2013-02-23 00:00"
209
- //max : max
193
+ label : 'When' ,
210
194
} ,
211
- yaxis : {
212
- label : '# of tasks'
195
+ yaxis : {
196
+ label : '# of tasks'
213
197
}
214
198
} ,
215
-
216
199
highlighter : {
217
- show : true ,
200
+ show : true ,
218
201
} ,
219
202
series : series
220
- }
221
- ) ;
203
+ } ) ;
222
204
223
205
{ { pass } }
224
206
0 commit comments