Skip to content

Commit 9e8e9ea

Browse files
authored
Merge pull request #34 from fleetbase/dev-v0.2.10
v0.2.10 ~ upgraded dependencies
2 parents 2361488 + 3efa681 commit 9e8e9ea

9 files changed

Lines changed: 2148 additions & 764 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Create Release
2+
on:
3+
push:
4+
tags:
5+
- 'v*'
6+
7+
jobs:
8+
create:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Publish GitHub Release
13+
uses: softprops/action-gh-release@v2
14+
with:
15+
tag_name: ${{ github.ref_name }}
16+
name: ${{ github.ref_name }}
17+
generate_release_notes: true
18+
draft: false
19+
prerelease: false
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

addon/components/webhook/attempts.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
</div>
4545
</div>
4646
</div>
47-
<div class="flex-1">
47+
<div>
4848
{{#if this.webhookRequestLogs.meta}}
4949
<Pagination
5050
@meta={{this.webhookRequestLogs.meta}}

addon/components/webhook/details.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="content-panel" ...attributes>
1+
<div class="content-panel border-b border-gray-200 dark:border-gray-700" ...attributes>
22
<div class="content-panel-header">
33
<div class="flex items-center">
44
<h3 class="mr-4 text-xl font-bold dark:text-gray-100">
@@ -10,7 +10,7 @@
1010
<Button @icon="pencil" @text={{t "developers.component.webhook.details.update-details"}} @onClick={{this.onClickUpdateWebhook}} @permission={{@permission}} />
1111
</div>
1212
</div>
13-
<div class="text-sm content-panel-body">
13+
<div class="text-sm content-panel-body pt-0i">
1414
<table class="border-none table-fixed dark:text-gray-100 table-spaced-y-2 table-cells-valign-top">
1515
<tbody>
1616
<tr>

addon/components/webhook/metrics.hbs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
<div class="content-panel" ...attributes>
1+
<div class="content-panel bg-gray-300 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700" ...attributes>
22
<div class="content-panel-body no-y-padding">
33
<div class="flex items-center text-sm dark:text-gray-100">
4-
<div class="px-6 py-3 pl-0 mr-3 border-r border-gray-100 dark:border-gray-900">
4+
<div class="px-6 py-3 pl-0 mr-3">
55
<div class="mb-1">
66
{{t "developers.common.status"}}
77
</div>
88
<Badge @status={{@webhook.status}} />
99
</div>
10-
<div class="px-6 py-3 mr-3 border-r border-gray-100 dark:border-gray-900">
10+
<div class="px-6 py-3 mr-3">
1111
<div class="mb-1">
1212
{{t "developers.common.mode"}}
1313
</div>
1414
<Badge @status={{@webhook.mode}} />
1515
</div>
16-
<div class="px-6 py-3 mr-3 border-r border-gray-100 dark:border-gray-900">
16+
<div class="px-6 py-3 mr-3">
1717
<div class="mb-1">
1818
{{t "developers.common.version"}}
1919
</div>

addon/templates/sockets/view.hbs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
<Layout::Section::Header @title={{@model.name}}>
1+
<Layout::Section::Header @title={{@model.name}} @leftSubheaderClass="flex-1">
22
<Button @icon="long-arrow-left" @iconPrefix="fas" @text={{t "developers.common.back"}} @onClick={{this.goBack}} />
33
</Layout::Section::Header>
44

55
<Layout::Section::Body>
66
<div class="h-screen overflow-y-scroll pb-40">
7-
<div class="space-y-6 py-6 max-w-6xl mx-auto">
7+
<div class="py-6 max-w-4xl mx-auto">
88
<ContentPanel
99
@titleStatusRight="Channel"
1010
@titleStatusRightClass="info-status-badge"
1111
@hideStatusDot={{true}}
1212
@title={{@model.name}}
1313
@open={{true}}
1414
@pad={{false}}
15-
@panelBodyClass="bg-black"
15+
@panelBodyClass="bg-black p-0i"
16+
@wrapperClass="bordered-classic"
1617
>
1718
<div id="output" class="font-mono rounded-b-md max-h-full p-6 overflow-y-scroll bg-black shadow-inner dark:shadow-none">
1819
<div class="flex items-center justify-between mb-4">

addon/templates/webhooks/view.hbs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@
1212
</Layout::Section::Header>
1313

1414
<Layout::Section::Body>
15-
<div class="h-screen overflow-y-scroll pb-40">
16-
<div class="space-y-6 py-6 max-w-6xl mx-auto">
15+
<div class="h-screen overflow-y-scroll">
16+
<div class="space-y-2 mx-auto">
1717
<Webhook::Metrics @webhook={{@model}} />
1818
<Webhook::Details @webhook={{@model}} @onClickUpdateWebhook={{this.updateWebhookDetails}} @permission="developers update webhook" />
1919
<Webhook::Attempts @webhook={{@model}} />
2020
</div>
21+
<Spacer @height="200px" />
2122
</div>
2223
</Layout::Section::Body>

index.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,48 @@ const { buildEngine } = require('ember-engines/lib/engine-addon');
33
const { name } = require('./package');
44
const Funnel = require('broccoli-funnel');
55

6+
function isDevServe() {
7+
// env checks
8+
const env = process.env.EMBER_ENV || process.env.NODE_ENV || 'development';
9+
const isProd = env === 'production' || process.env.CI === 'true';
10+
11+
// command-line checks (serve/watch only)
12+
const argv = process.argv.join(' ');
13+
const isServeCmd = /\b(ember|node).* (serve|server)\b/.test(argv) || process.argv.includes('serve') || process.argv.includes('server');
14+
const isWatch = process.argv.includes('--watch') || process.env.BROCCOLI_WATCHER;
15+
16+
return !isProd && (isServeCmd || isWatch);
17+
}
18+
619
module.exports = buildEngine({
720
name,
821

22+
init() {
23+
if (this._super.init) this._super.init.apply(this, arguments);
24+
25+
if (isDevServe()) {
26+
for (let addon of this.addons || []) {
27+
if (['@fleetbase/ember-core', '@fleetbase/ember-ui'].includes(addon.name)) {
28+
let origTreeFor = addon.treeFor?.bind(addon);
29+
addon.treeFor = function (type) {
30+
if (type === 'styles') {
31+
return undefined;
32+
}
33+
return origTreeFor ? origTreeFor(type) : undefined;
34+
};
35+
}
36+
}
37+
38+
const origNonDup = this.nonDuplicatedAddonInvoke?.bind(this);
39+
this.nonDuplicatedAddonInvoke = (hook, args = []) => {
40+
if (hook === 'treeFor' && args[0] === 'styles') {
41+
return []; // prevents dependency style relocation funnel (dev-only)
42+
}
43+
return origNonDup ? origNonDup(hook, args) : [];
44+
};
45+
}
46+
},
47+
948
postprocessTree(type, tree) {
1049
if (type === 'css') {
1150
tree = new Funnel(tree, {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@fleetbase/dev-engine",
3-
"version": "0.2.9",
3+
"version": "0.2.10",
44
"description": "Fleetbase Developers extension provides a module for managing developer resources such as API keys, webhooks, sockets, events and logs.",
55
"fleetbase": {
66
"route": "developers"

0 commit comments

Comments
 (0)