Skip to content

Commit 550918a

Browse files
authored
Merge pull request #1263 from apinf/feature/finalize-admin-view-for-dashboard
Feature/finalize admin view for dashboard
2 parents c787a64 + 3871a82 commit 550918a

File tree

22 files changed

+153
-78
lines changed

22 files changed

+153
-78
lines changed

apis/client/delete/deleteApiBackendConfirmation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Template.deleteApiBackendConfirmation.helpers({
2222
return instance.backendName;
2323
},
2424

25-
/* this helper is needed to display a spinner on the template
25+
/* this helper is needed to display a spinner on the template
2626
after the user has pressed Delete. The instance.restCallStarted
2727
instance variable is set to True when the button
2828
is pressed. The spinner starts and continues until the call returns.*/

apis/client/view/details/details.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ Template.viewApiBackendDetails.events({
55
"click #deleteModal": function() {
66
var apiBackendId = this.apiBackend;
77
/* As information to the delete modal, pass in the API backend document.
8-
This is needed so that the API name can be shown in the dialog,
9-
as well for other information needed for API removal, such as ID*/
8+
This is needed so that the API name can be shown in the dialog,
9+
as well for other information needed for API removal, such as ID*/
1010
Modal.show('deleteApiBackendConfirmation', function() {
1111
return ApiBackends.findOne(apiBackendId);
1212
});

client/views/dashboard/charts/bar/bar.html

Lines changed: 0 additions & 4 deletions
This file was deleted.

client/views/dashboard/charts/line/line.html

Lines changed: 0 additions & 14 deletions
This file was deleted.

client/views/dashboard/charts/row/row.html

Lines changed: 0 additions & 6 deletions
This file was deleted.

core/client/shared/loading.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<template name="loading">
22
<!-- Blank -->
3-
</template>
3+
</template>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<template name="statusCodeCountsChart">
2+
<h4 class="dashboard-block-title">
3+
{{ _ "statusCodeCountsChart_title" }}
4+
</h4>
5+
<a
6+
tabindex="0"
7+
class="dashboard-block-help"
8+
role="button"
9+
data-toggle="popover"
10+
data-placement="right"
11+
data-trigger="focus"
12+
data-content="{{ _ 'statusCodeCountsChart_help_text' }}">
13+
<i class="fa fa-question-circle" aria-hidden="true"></i>
14+
</a>
15+
<div id="statusCodeCounts-chart"></div>
16+
</template>
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
11
<template name="chartsLayout">
22
<div class="row">
3-
<div class="col-md-12">
4-
<div>
5-
{{ > requestsOverTimeChart }}
6-
</div>
7-
<div>
3+
<div class="col-lg-12">
4+
{{ > requestsOverTimeChart }}
5+
<div class="overviewchart-chart">
86
{{ > overviewChartChart }}
97
</div>
108
</div>
119
</div>
1210
<div class="row">
13-
<div class="col-md-6">
11+
<div class="col-lg-6 col-md-6 col-xs-12">
1412
{{ > statusCodeCountsChart }}
1513
</div>
16-
<div class="col-md-6">
14+
<div class="col-lg-6 col-md-6 col-xs-12">
1715
{{ > responseTimeDistributionChart }}
1816
</div>
1917
</div>
2018
<div class="row">
21-
<div class="row padding-sides">
22-
{{ > dataTable tableDataSet=tableDataSet }}
19+
<div class="padding-sides">
20+
{{ > dashboardDataTable tableDataSet=tableDataSet }}
2321
</div>
2422
</div>
2523
</template>
Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Template.chartsLayout.onCreated(function () {
3434
}
3535
},
3636
sort : [
37-
{ request_at : { order : 'desc' }},
37+
{ request_at : { order : 'desc' }},
3838
],
3939
fields: [
4040
'request_at',
@@ -177,6 +177,7 @@ Template.chartsLayout.onCreated(function () {
177177
.renderArea(true)
178178
.transitionDuration(300)
179179
.margins({top: 5, right: 20, bottom: 25, left: 40})
180+
.ordinalColors(['#2fa4e7'])
180181
.x(timeScaleForLineChart)
181182
.dimension(timeStampDimension)
182183
.group(timeStampGroup)
@@ -194,6 +195,7 @@ Template.chartsLayout.onCreated(function () {
194195
.centerBar(true)
195196
.gap(1)
196197
.margins({top: 5, right: 20, bottom: 25, left: 40})
198+
.ordinalColors(['#2fa4e7'])
197199
.x(timeScaleForRangeChart)
198200
.alwaysUseRounding(true)
199201
.elasticY(true)
@@ -204,7 +206,7 @@ Template.chartsLayout.onCreated(function () {
204206
.transitionDuration(300)
205207
.dimension(statusCodeDimension)
206208
.group(statusCodeGroup)
207-
.ordinalColors(['#31bd47', '#e4dd38', '#f2ac11', '#ed1f1f',])
209+
.ordinalColors(['#28ae4f', '#ffc107', '#e15400', '#cc1410']) // Correspond to bootstrap color classes
208210
.elasticX(true)
209211
.xAxis().ticks(5);
210212

@@ -216,6 +218,7 @@ Template.chartsLayout.onCreated(function () {
216218
.centerBar(true)
217219
.xUnits(dc.units.fp.precision(binwidth))
218220
.margins({top: 5, right: 20, bottom: 25, left: 45})
221+
.ordinalColors(['#2fa4e7'])
219222
.brushOn(true)
220223
.x(xScaleForBar)
221224
.renderHorizontalGridLines(true)
@@ -314,6 +317,8 @@ Template.chartsLayout.onRendered(function () {
314317
chartElemets.removeClass('loader'); // Unset loader
315318
}
316319
});
320+
321+
$('[data-toggle="popover"]').popover();
317322
});
318323

319324
Template.chartsLayout.helpers({
@@ -328,4 +333,4 @@ Template.chartsLayout.helpers({
328333
totalItemsCount: instance.totalItemsCount.get()
329334
}
330335
}
331-
})
336+
});
Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#requestsOverTime-chart, #overviewChart-chart, #statusCodeCounts-chart, #responseTimeDistribution-chart {
2-
width:100%;
2+
width: 100%;
33
border: 1px solid #eee;
4-
margin: 5px 0;
4+
margin-left: 0;
5+
margin-right: 0;
6+
margin-bottom: 1em;
57
}
68

79
#requestsOverTime-chart {
@@ -24,3 +26,18 @@
2426
.dc-chart g.row text{
2527
fill: #333;
2628
}
29+
30+
.dashboard-block-title {
31+
display: inline-block;
32+
}
33+
34+
.dashboard-block-help {
35+
margin-top: 0.62em
36+
}
37+
38+
.dashboard-records-number {
39+
margin-top: 0.62em;
40+
margin-bottom: 0.62em;
41+
color: #777;
42+
font-size: small;
43+
}

0 commit comments

Comments
 (0)