Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.0.18 - added self hosted instance extension install instructions #17

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addon/components/extension-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export default class ExtensionCardComponent extends Component {
async selfManagedInstallInstructions(options = {}) {
await this.modalsManager.done();
this.modalsManager.show('modals/self-managed-install-instructions', {
title: 'Install a Self Managed Extension',
title: 'Install Extension to Self-Hosted Instance',
hideDeclineButton: true,
acceptButtonText: 'Done',
...options,
Expand Down
2 changes: 1 addition & 1 deletion addon/components/extension-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export default class ExtensionFormComponent extends Component {
async selfManagedInstallInstructions(options = {}) {
await this.modalsManager.done();
this.modalsManager.show('modals/self-managed-install-instructions', {
title: 'Install a Self Managed Extension',
title: 'Install Extension to Self-Hosted Instance',
hideDeclineButton: true,
acceptButtonText: 'Done',
...options,
Expand Down
26 changes: 13 additions & 13 deletions addon/components/modals/extension-details.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,21 @@
{{/if}}
</div>
</div>
<div class="space-y-2">
{{#if this.extension.self_managed}}
{{#if @options.viewSelfManagesInstallInstructions}}
<div class="space-y-2">
<div>
<Badge @status="info" @hideStatusDot={{true}} @helpText={{t "registry-bridge.component.extension-details-modal.self-managed-help-text"}}>{{t
"registry-bridge.component.extension-details-modal.self-managed"
}}</Badge>
{{#if @options.viewSelfManagesInstallInstructions}}
<a href="#" class="text-xs text-blue-400 hover:opacity-50" {{on "click" @options.viewSelfManagesInstallInstructions}}><FaIcon
@icon="circle-info"
class="mr-1"
/>How to install</a>
{{/if}}
<Button
@size="xs"
@type="magic"
@text={{t "registry-bridge.component.extension-details-modal.self-hosted-install"}}
@helpText={{t "registry-bridge.component.extension-details-modal.self-hosted-install-help-text"}}
@tooltipPlacement="right"
@onClick={{@options.viewSelfManagesInstallInstructions}}
@icon="circle-info"
/>
</div>
{{/if}}
</div>
</div>
{{/if}}
</div>
</div>
</div>
Expand Down
8 changes: 1 addition & 7 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fleetbase/registry-bridge",
"version": "0.0.17",
"version": "0.0.18",
"description": "Internal Bridge between Fleetbase API and Extensions Registry",
"keywords": [
"fleetbase-extension",
Expand Down Expand Up @@ -33,12 +33,6 @@
"phpstan/phpstan": "^1.10.38",
"symfony/var-dumper": "^5.4.29"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/fleetbase/laravel-model-caching"
}
],
"autoload": {
"psr-4": {
"Fleetbase\\RegistryBridge\\": "server/src/",
Expand Down
2 changes: 1 addition & 1 deletion extension.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Registry Bridge",
"version": "0.0.17",
"version": "0.0.18",
"description": "Internal Bridge between Fleetbase API and Extensions Registry",
"repository": "https://github.com/fleetbase/registry-bridge",
"license": "AGPL-3.0-or-later",
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fleetbase/registry-bridge-engine",
"version": "0.0.17",
"version": "0.0.18",
"description": "Internal Bridge between Fleetbase API and Extensions Registry",
"fleetbase": {
"route": "extensions"
Expand Down Expand Up @@ -39,8 +39,8 @@
},
"dependencies": {
"@babel/core": "^7.23.2",
"@fleetbase/ember-core": "^0.2.21",
"@fleetbase/ember-ui": "^0.2.34",
"@fleetbase/ember-core": "latest",
"@fleetbase/ember-ui": "latest",
"@fortawesome/ember-fontawesome": "^2.0.0",
"@fortawesome/fontawesome-svg-core": "6.4.0",
"@fortawesome/free-solid-svg-icons": "6.4.0",
Expand Down
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function install(InstallExtensionRequest $request)
$extension = RegistryExtension::where('public_id', $request->input('extension'))->first();

// Check if already installed
$installed = RegistryExtensionInstall::disableCache()->where(['company_uuid' => session('company'), 'extension_uuid' => $extension->uuid])->exists();
$installed = RegistryExtensionInstall::where(['company_uuid' => session('company'), 'extension_uuid' => $extension->uuid])->exists();
if ($installed) {
return response()->error('This extension is already installed.');
}
Expand Down Expand Up @@ -105,7 +105,7 @@ public function uninstall(InstallExtensionRequest $request)
$uninstalled = false;

// Check if already uninstalled
$uninstalled = RegistryExtensionInstall::disableCache()->where(['company_uuid' => session('company'), 'extension_uuid' => $extension->uuid])->doesntExist();
$uninstalled = RegistryExtensionInstall::where(['company_uuid' => session('company'), 'extension_uuid' => $extension->uuid])->doesntExist();
if ($uninstalled) {
return response()->error('This extension is not installed.');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function categories()
public function getInstalledEngines(Request $request)
{
if ($request->session()->has('company')) {
$installedExtensions = RegistryExtension::disableCache()->whereHas('installs', function ($query) {
$installedExtensions = RegistryExtension::whereHas('installs', function ($query) {
$query->where('company_uuid', session('company'));
})->get()->map(function ($extension) {
return $extension->currentBundle->meta['package.json'] ?? [];
Expand Down Expand Up @@ -77,8 +77,7 @@ public function getEngineInstallStatus(Request $request)
$engine = $request->input('engine');

if ($request->session()->has('company') && $engine) {
$installed = RegistryExtension::disableCache()
->whereHas(
$installed = RegistryExtension::whereHas(
'currentBundle',
function ($query) use ($engine) {
$query->where('meta->package.json->name', $engine);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function createRecord(Request $request)
*/
public function installed()
{
$installedExtensions = RegistryExtension::disableCache()->whereHas('installs', function ($query) {
$installedExtensions = RegistryExtension::whereHas('installs', function ($query) {
$query->where('company_uuid', session('company'));
})->get();

Expand All @@ -92,7 +92,7 @@ public function installed()
*/
public function purchased()
{
$purchasedExtensions = RegistryExtension::disableCache()->whereHas('purchases', function ($query) {
$purchasedExtensions = RegistryExtension::whereHas('purchases', function ($query) {
$query->where('company_uuid', session('company'));
})->get();

Expand Down
2 changes: 2 additions & 0 deletions translations/en-us.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ registry-bridge:
website: Website
self-managed: Self Managed
self-managed-help-text: A self-managed extension is designed for users who host Fleetbase on their own servers, outside of the cloud/SaaS environment. These extensions require manual installation and configuration. If you are using Fleetbase as a self-hosted instance, you can use these extensions to add additional features. However, they are not available for cloud/SaaS users.
self-hosted-install: Self Hosted Install
self-hosted-install-help-text: View self-hosted install instructions.
extension-pending-publish-viewer:
content-panel-title: Extensions Pending Publish
focused-extension-title: >
Expand Down
Loading