Skip to content

Commit

Permalink
Add control panel views for Super Admin
Browse files Browse the repository at this point in the history
Require new GraphiQL dependency
  • Loading branch information
bryannielsen committed Jul 3, 2024
1 parent 9d9a764 commit 64f3efe
Show file tree
Hide file tree
Showing 12 changed files with 2,629 additions and 1,617 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
### Added

- Now supporting Laravel 11
- Control Panel access to Coilpack version information and GraphiQL for SuperAdmin Users
- Dependency for updated GraphiQL [MLL\GraphiQL](https://github.com/mll-lab/laravel-graphiql)

### Changed

- Dropped support for Laravel 8
- Minimum PHP version increased to 8.1
- Updated Rebing/GraphQL[https://github.com/rebing/graphql-laravel] Dependency from version 8.6 to 9.2
- Updated Rcrowe/TwigBridge[https://github.com/rcrowe/TwigBridge] Dependency from version 0.14.1 to 0.14.3
- Updated [Rebing/GraphQL](https://github.com/rebing/graphql-laravel) Dependency from version 8.6 to 9.2
- Updated [Rcrowe/TwigBridge](https://github.com/rcrowe/TwigBridge) Dependency from version 0.14.1 to 0.14.3

## [1.3.2] - 2024-07-03

Expand Down
12 changes: 12 additions & 0 deletions addon/addon.setup.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

return [
'author' => 'Packet Tide, LLC',
'author_url' => 'https://packettide.com/',
'name' => 'Coilpack',
'description' => 'Supercharge ExpressionEngine with more power, features, and flexibility!',
'version' => \Composer\InstalledVersions::getPrettyVersion('expressionengine/coilpack'),
'namespace' => 'ExpressionEngine\Addons\Coilpack',
'settings_exist' => false,
'built_in' => true,
];
18 changes: 18 additions & 0 deletions addon/views/graphql.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php $this->extend('ee:_templates/default-nav'); ?>


<?php if (config('coilpack.graphql.enabled') && config('coilpack.graphql.graphiql') !== false) : ?>
<div style="height: 100%">
<iframe src="/graphiql" width="100%" style="border:none;height:85vh;"></iframe>
</div>
<?php else : ?>
<div class="box panel">
<div class="panel-heading">
<h2>GraphQL</h2>
</div>
<div class="panel-body">
<p><strong>GraphQL support is currently disabled.</strong></p>
<p>Learn how to enable and use GraphQL through <a href="https://expressionengine.github.io/coilpack-docs/docs/graphql/" target="_blank">the Coilpack Documentation</a>.</p>
</div>
</div>
<?php endif; ?>
18 changes: 18 additions & 0 deletions addon/views/overview.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php $this->extend('ee:_templates/default-nav'); ?>

<div class="box panel">
<div class="panel-heading">
<h2>Version Information</h2>
</div>
<?php
$table = ee('CP/Table', ['autosort' => true]);
$table->setColumns(['name', 'version']);
$table->setData(array_map(function ($name) use ($versions) {
return [$name, ltrim($versions[$name], 'v')];
}, array_keys($versions)));
$this->embed('ee:_shared/table', $table->viewData(ee('CP/URL', 'coilpack/overview')));
?>
<div class="panel-footer">
<a href="https://expressionengine.github.io/coilpack-docs/" target="_blank">Learn more about Coilpack</a>
</div>
</div>
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"illuminate/contracts": "^9.0|^10.0|^11.0",
"illuminate/database": "^9.0|^10.0|^11.0",
"illuminate/support": "^9.0|^10.0|^11.0",
"mll-lab/laravel-graphiql": "^3.2",
"rcrowe/twigbridge": "^0.14.3",
"rebing/graphql-laravel": "^9.2.0"
},
Expand Down Expand Up @@ -65,4 +66,4 @@
}
}
}
}
}
Loading

0 comments on commit 64f3efe

Please sign in to comment.