Skip to content

Commit b68cc9a

Browse files
authored
Merge pull request #36 from fleetbase/feature/universe-refactor-support
added support for the universe refactor
2 parents e1ee297 + 985be33 commit b68cc9a

24 files changed

Lines changed: 2856 additions & 2059 deletions

addon/components/api-event/data.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<ContentPanel @title={{t "developers.component.api-event.data.title"}} @open={{true}} @pad={{true}} @panelTitleClass="text-sm" @panelBodyClass="bg-white dark:bg-gray-800">
1+
<ContentPanel @title={{t "developers.component.api-event.data.title"}} @open={{true}} @wrapperClass="bordered-top" @panelBodyWrapperClass="p-0i">
22
{{#if @apiEvent.data}}
33
<CodeBlock @code={{or @apiEvent.dataJson ""}} @language="json" class="line-numbers" />
44
{{else}}
Lines changed: 36 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,37 @@
1-
<ContentPanel
2-
@prefixTitle={{t "developers.component.api-event.details.prefixTitle"}}
3-
@title={{@apiEvent.event}}
4-
@prefixTitleRight={{@apiEvent.public_id}}
5-
@titleContainerClass="flex-col"
6-
@panelTitleClass="text-sm"
7-
@prefixTitleClass="ml-4 flex flex-row items-center text-sm"
8-
@prefixTitleRightClass="font-mono"
9-
@panelHeaderClass="items-stretch-i"
10-
@panelHeaderRightClass="items-start-i"
11-
@prefixTitleRightContainerClass="py-2"
12-
@open={{true}}
13-
@pad={{true}}
14-
@panelBodyClass="bg-white dark:bg-gray-800 text-sm"
15-
>
16-
<table class="border-none table-fixed dark:text-gray-100 table-spaced-y-2 table-cells-valign-top">
17-
<tbody>
18-
<tr>
19-
<td class="w-40">
20-
{{t "developers.common.date"}}
21-
</td>
22-
<td>
23-
{{@apiEvent.createdAt}}
24-
</td>
25-
</tr>
26-
<tr>
27-
<td>
28-
{{t "developers.common.source"}}
29-
</td>
30-
<td>
31-
{{@apiEvent.source}}
32-
</td>
33-
</tr>
34-
<tr>
35-
<td>
36-
{{t "developers.common.description"}}
37-
</td>
38-
<td>
39-
{{@apiEvent.description}}
40-
</td>
41-
</tr>
42-
</tbody>
43-
</table>
1+
<ContentPanel @title={{@apiEvent.event}} @open={{true}} @wrapperClass="bordered-top" @panelBodyWrapperClass="pb-0i">
2+
<:title>
3+
<div class="ml-2 flex flex-row space-x-1">
4+
<Badge @hideStatusDot={{true}} @status={{@apiEvent.public_id}} @disableHumanize={{true}} />
5+
</div>
6+
</:title>
7+
<:default>
8+
<table class="border-none text-sm table-fixed dark:text-gray-100 table-spaced-y-2 table-cells-valign-top">
9+
<tbody>
10+
<tr>
11+
<td class="w-40">
12+
{{t "developers.common.date"}}
13+
</td>
14+
<td>
15+
{{@apiEvent.createdAt}}
16+
</td>
17+
</tr>
18+
<tr>
19+
<td>
20+
{{t "developers.common.source"}}
21+
</td>
22+
<td>
23+
{{@apiEvent.source}}
24+
</td>
25+
</tr>
26+
<tr>
27+
<td>
28+
{{t "developers.common.description"}}
29+
</td>
30+
<td>
31+
{{@apiEvent.description}}
32+
</td>
33+
</tr>
34+
</tbody>
35+
</table>
36+
</:default>
4437
</ContentPanel>
Lines changed: 52 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,53 @@
1-
<ContentPanel
2-
@prefixTitle={{t "developers.component.api-request-log.details.prefixTitle"}}
3-
@title={{@apiRequest.description}}
4-
@titleStatus={{@apiRequest.status_code}}
5-
@prefixTitleRight={{@apiRequest.public_id}}
6-
@titleContainerClass="flex-col"
7-
@panelTitleClass="ml-4 flex flex-row items-center text-sm"
8-
@prefixTitleClass="text-sm"
9-
@prefixTitleRightClass="font-mono"
10-
@panelHeaderClass="items-stretch-i"
11-
@panelHeaderRightClass="items-start-i"
12-
@prefixTitleRightContainerClass="py-2"
13-
@open={{true}}
14-
@pad={{true}}
15-
@panelBodyClass="bg-white dark:bg-gray-800 text-sm"
16-
>
17-
<table class="border-none table-fixed dark:text-gray-100 table-spaced-y-2 table-cells-valign-top">
18-
<tbody>
19-
<tr>
20-
<td class="w-40">
21-
{{t "developers.common.time"}}
22-
</td>
23-
<td>
24-
{{@apiRequest.createdAt}}
25-
</td>
26-
</tr>
27-
<tr>
28-
<td class="w-40">
29-
{{t "developers.component.api-request-log.details.duration"}}
30-
</td>
31-
<td>
32-
{{format-milliseconds @apiRequest.duration}}
33-
</td>
34-
</tr>
35-
<tr>
36-
<td>
37-
{{t "developers.component.api-request-log.details.ip-address"}}
38-
</td>
39-
<td>
40-
{{@apiRequest.ip_address}}
41-
</td>
42-
</tr>
43-
<tr>
44-
<td>
45-
{{t "developers.common.version"}}
46-
</td>
47-
<td>
48-
{{@apiRequest.version}}
49-
</td>
50-
</tr>
51-
<tr>
52-
<td>
53-
{{t "developers.common.source"}}
54-
</td>
55-
<td>
56-
{{@apiRequest.source}}
57-
</td>
58-
</tr>
59-
</tbody>
60-
</table>
1+
<ContentPanel @title={{@apiRequest.description}} @titleStatus={{@apiRequest.status_code}} @open={{true}} @wrapperClass="bordered-top" @panelTitleClass="flex flex-row items-center normal-case">
2+
<:title>
3+
<div class="ml-2 flex flex-row space-x-1 leading-5">
4+
<Badge @hideStatusDot={{true}} @status={{@apiRequest.public_id}} @disableHumanize={{true}} />
5+
</div>
6+
</:title>
7+
<:default>
8+
<table class="border-none text-sm table-fixed dark:text-gray-100 table-spaced-y-2 table-cells-valign-top">
9+
<tbody>
10+
<tr>
11+
<td class="w-40">
12+
{{t "developers.common.time"}}
13+
</td>
14+
<td>
15+
{{@apiRequest.createdAt}}
16+
</td>
17+
</tr>
18+
<tr>
19+
<td class="w-40">
20+
{{t "developers.component.api-request-log.details.duration"}}
21+
</td>
22+
<td>
23+
{{format-milliseconds @apiRequest.duration}}
24+
</td>
25+
</tr>
26+
<tr>
27+
<td>
28+
{{t "developers.component.api-request-log.details.ip-address"}}
29+
</td>
30+
<td>
31+
{{@apiRequest.ip_address}}
32+
</td>
33+
</tr>
34+
<tr>
35+
<td>
36+
{{t "developers.common.version"}}
37+
</td>
38+
<td>
39+
{{@apiRequest.version}}
40+
</td>
41+
</tr>
42+
<tr>
43+
<td>
44+
{{t "developers.common.source"}}
45+
</td>
46+
<td>
47+
{{@apiRequest.source}}
48+
</td>
49+
</tr>
50+
</tbody>
51+
</table>
52+
</:default>
6153
</ContentPanel>

addon/components/api-request-log/query-params.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<ContentPanel @title={{t "developers.component.api-request-log.query-params.title"}} @panelTitleClass="text-sm" @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
1+
<ContentPanel @title={{t "developers.component.api-request-log.query-params.title"}} @open={{true}} @wrapperClass="bordered-top" @panelBodyWrapperClass="p-0i">
22
{{#if @apiRequest.query_params}}
33
<CodeBlock @code={{or (json-stringify @apiRequest.query_params) ""}} @language="json" class="line-numbers" />
44
{{else}}

addon/components/api-request-log/request-body.hbs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<ContentPanel
22
@title={{concat (t "developers.component.api-request-log.request-body.title") @apiRequest.method (t "developers.component.api-request-log.request-body.title-second-part")}}
3-
@panelTitleClass="text-sm"
43
@open={{true}}
5-
@pad={{true}}
6-
@panelBodyClass="bg-white dark:bg-gray-800"
4+
@wrapperClass="bordered-top"
5+
@panelBodyWrapperClass="p-0i"
76
>
87
{{#if @apiRequest.request_body}}
98
<CodeBlock @code={{or (json-stringify @apiRequest.request_body) ""}} @language="json" class="line-numbers" />

addon/components/api-request-log/request-headers.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<ContentPanel @title={{t "developers.component.api-request-log.request-headers.title"}} @panelTitleClass="text-sm" @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
1+
<ContentPanel @title={{t "developers.component.api-request-log.request-headers.title"}} @open={{true}} @wrapperClass="bordered-top" @panelBodyWrapperClass="p-0i">
22
{{#if @apiRequest.request_headers}}
33
<CodeBlock @code={{or (json-stringify @apiRequest.request_headers) ""}} @language="json" class="line-numbers" />
44
{{else}}

addon/components/api-request-log/response-body.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<ContentPanel @title={{t "developers.component.api-request-log.response-body.title"}} @panelTitleClass="text-sm" @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
1+
<ContentPanel @title={{t "developers.component.api-request-log.response-body.title"}} @open={{true}} @wrapperClass="bordered-top" @panelBodyWrapperClass="p-0i">
22
{{#if @apiRequest.response_body}}
33
<CodeBlock @code={{or (json-stringify @apiRequest.response_body) ""}} @language="json" class="line-numbers" />
44
{{else}}
Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,39 @@
1-
<ContentPanel @title={{t "developers.component.widget.api-metrics.title"}} @open={{or @open true}} @pad={{or @pad false}} @panelBodyClass="bg-white dark:bg-gray-800">
2-
<div class="grid grid-cols-1 md:grid-cols-2">
3-
<div class="w-full border-b border-r border-gray-200 dark:border-gray-900">
4-
<h4 class="my-3 text-sm font-semibold mx-5">{{t "developers.component.widget.api-metrics.api-requests"}}</h4>
5-
<Chart @type="line" @labels={{this.chartLabels}} @datasets={{this.apiRequestData}} @options={{this.chartOptions}} />
1+
<ContentPanel @title={{t "developers.component.widget.api-metrics.title"}} @open={{or @open true}} @wrapperClass="bordered-classic" @panelBodyClass="p-0i">
2+
<div class="grid grid-cols-1 md:grid-cols-2 gap-px bg-gray-200 dark:bg-gray-800">
3+
<div class="bg-white dark:bg-gray-900 p-5">
4+
<h4 class="mb-4 text-sm font-semibold text-gray-700 dark:text-gray-200">
5+
{{t "developers.component.widget.api-metrics.api-requests"}}
6+
</h4>
7+
<div class="h-96">
8+
<Chart @type="line" @datasets={{this.apiRequestData}} @options={{this.chartOptions}} />
9+
</div>
610
</div>
7-
<div class="w-full border-b border-gray-200 dark:border-gray-900">
8-
<h4 class="my-3 text-sm font-semibold mx-5">{{t "developers.component.widget.api-metrics.api-error"}}</h4>
9-
<Chart @type="line" @labels={{this.chartLabels}} @datasets={{this.apiErrorDistributionData}} @options={{this.chartOptions}} />
11+
12+
<div class="bg-white dark:bg-gray-900 p-5">
13+
<h4 class="mb-4 text-sm font-semibold text-gray-700 dark:text-gray-200">
14+
{{t "developers.component.widget.api-metrics.api-error"}}
15+
</h4>
16+
<div class="h-96">
17+
<Chart @type="line" @datasets={{this.apiErrorDistributionData}} @options={{this.chartOptions}} />
18+
</div>
1019
</div>
11-
<div class="w-full border-b border-r border-gray-200 dark:border-gray-900">
12-
<h4 class="my-3 text-sm font-semibold mx-5">{{t "developers.component.widget.api-metrics.webhooks"}}</h4>
13-
<Chart @type="line" @labels={{this.chartLabels}} @datasets={{this.webhookRequestData}} @options={{this.chartOptions}} />
20+
21+
<div class="bg-white dark:bg-gray-900 p-5">
22+
<h4 class="mb-4 text-sm font-semibold text-gray-700 dark:text-gray-200">
23+
{{t "developers.component.widget.api-metrics.webhooks"}}
24+
</h4>
25+
<div class="h-96">
26+
<Chart @type="line" @datasets={{this.webhookRequestData}} @options={{this.chartOptions}} />
27+
</div>
1428
</div>
15-
<div class="w-full border-b border-gray-200 dark:border-gray-900">
16-
<h4 class="my-3 text-sm font-semibold mx-5">{{t "developers.component.widget.api-metrics.webhooks-response"}}</h4>
17-
<Chart @type="line" @labels={{this.chartLabels}} @datasets={{this.webhookRequestTimingData}} @options={{this.chartOptions}} />
29+
30+
<div class="bg-white dark:bg-gray-900 p-5">
31+
<h4 class="mb-4 text-sm font-semibold text-gray-700 dark:text-gray-200">
32+
{{t "developers.component.widget.api-metrics.webhooks-response"}}
33+
</h4>
34+
<div class="h-96">
35+
<Chart @type="line" @datasets={{this.webhookRequestTimingData}} @options={{this.chartOptions}} />
36+
</div>
1837
</div>
1938
</div>
20-
</ContentPanel>
39+
</ContentPanel>

0 commit comments

Comments
 (0)