Skip to content

Commit 8869b65

Browse files
authored
Merge pull request #84 from NotFoundNL/develop
feat!: Version 0.9.0
2 parents 1a130a5 + 5cc8ff6 commit 8869b65

28 files changed

+870
-191
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"laravel/pint": "^1.0",
3333
"nunomaduro/collision": "^6.0",
3434
"nunomaduro/larastan": "^2.0.1",
35-
"orchestra/testbench": "^7.0",
35+
"orchestra/testbench": "^8.9",
3636
"pestphp/pest": "^1.21",
3737
"pestphp/pest-plugin-laravel": "^1.1",
3838
"phpstan/extension-installer": "^1.1",

config/database.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
|
110110
*/
111111

112-
'migrations' => 'migrations',
112+
'migrations' => 'cms_migrations',
113113

114114
/*
115115
|--------------------------------------------------------------------------

config/solr.php renamed to config/indexer.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,14 @@
1212
| Relative path to the sitemap.txt created by the SOLR indexer.
1313
|
1414
*/
15-
'sitemap' => env('SOLR_SITEMAP', 'public/sitemap.txt'),
15+
'engine' => env('INDEXER_ENGINE', 'solr'), // 'solr' or 'elastic
16+
'sitemap' => env('INDEXER_SITEMAP', 'public/sitemap.txt'),
17+
18+
'solr' => [
19+
'host' => env('SOLR_HOST', ''),
20+
'user' => env('SOLR_USER', ''),
21+
'pass' => env('SOLR_PASS', ''),
22+
'core' => env('SOLR_CORE', ''),
23+
],
24+
1625
];

config/siteboss.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,20 @@
1313
| are using a different API prefix for your application.
1414
|
1515
*/
16-
1716
'api_prefix' => env('SB_BACKEND_API_PREFIX', '/siteboss/api'),
1817

18+
/*
19+
|--------------------------------------------------------------------------
20+
| Cache prefix
21+
|--------------------------------------------------------------------------
22+
|
23+
| Boolean to prefix the asset URL with a number based on the updated_at
24+
| of the AssetItem.
25+
|
26+
*/
27+
28+
'cache_prefix' => env('SB_CACHE_PREFIX', false),
29+
1930
/*
2031
|--------------------------------------------------------------------------
2132
| API prefix

database/migrations/2021_10_27_182234_create_cms_search_table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function up()
1818
$table->string('type', 64)->nullable();
1919
$table->integer('updated')->nullable();
2020
$table->integer('site_id')->nullable();
21-
$table->set('search_status', ['PENDING', 'UPDATED', 'SKIPPED', 'INSERTED', 'NOT_INDEXABLE', 'NOT_FOUND'])->nullable();
21+
$table->set('search_status', ['PENDING', 'UPDATED', 'SKIPPED', 'INSERTED', 'NOT_INDEXABLE', 'NOT_FOUND', 'FAILED'])->nullable();
2222
});
2323
}
2424

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<table id="result">
2+
<tr>
3+
<th>Test</th>
4+
<th>Result</th>
5+
</tr>
6+
@foreach ($tests as $test)
7+
<tr class="result @if ($test->result !== true) error @endif">
8+
<td>
9+
@if ($test->result === true)
10+
11+
@else
12+
13+
@endif {{ $test->name }}
14+
</td>
15+
<td>{{ $test->result === true ? 'Success' : $test->result ?? 'Unkown error' }}
16+
</td>
17+
</tr>
18+
@endforeach
19+
</table>

routes/console.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
use Illuminate\Support\Facades\Artisan;
55
use NotFound\Framework\Services\Indexer\IndexBuilderService;
66

7-
Artisan::command('siteboss:indexSite {--debug : Whether debug messages should be displayed}', function ($debug) {
7+
Artisan::command('siteboss:index-site {--debug : Whether debug messages should be displayed}', function ($debug) {
88
//
9-
$indexer = new IndexBuilderService('solr', $debug);
9+
$indexer = new IndexBuilderService($debug);
1010
$indexer->run();
1111

1212
return Command::SUCCESS;

src/Auth/Middleware/EnsureEmailIsVerified.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use Closure;
66
use Illuminate\Contracts\Auth\MustVerifyEmail;
7-
use Illuminate\Support\Facades\Redirect;
87

98
class EnsureEmailIsVerified
109
{

src/FrameworkServiceProvider.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Illuminate\Support\ServiceProvider;
99
use NotFound\Framework\Auth\Notifications\VerifyEmail;
1010
use NotFound\Framework\Models\Lang;
11+
use NotFound\Framework\View\Components\ConfigurationCheck;
1112
use NotFound\Framework\View\Components\Forms\Form;
1213

1314
class FrameworkServiceProvider extends ServiceProvider
@@ -21,6 +22,7 @@ public function boot(): void
2122
$this->loadTranslationsFrom(__DIR__.'/../lang', 'siteboss');
2223

2324
Blade::component('formbuilder-form', Form::class);
25+
Blade::component('configuration-check', ConfigurationCheck::class);
2426
Blade::componentNamespace('NotFound\\Framework\\View\\Components\\Forms\\Fields', 'fields');
2527

2628
$this->publishes([
@@ -31,7 +33,7 @@ public function boot(): void
3133
__DIR__.'/../config/openid.php' => config_path('openid.php'),
3234
__DIR__.'/../config/clamav.php' => config_path('clamav.php'),
3335
__DIR__.'/../config/database.php' => config_path('database.php'),
34-
__DIR__.'/../config/solr.php' => config_path('solr.php'),
36+
__DIR__.'/../config/indexer.php' => config_path('indexer.php'),
3537
__DIR__.'/../config/laravellocalization.php' => config_path('laravellocalization.php'),
3638
__DIR__.'/Providers/AuthServiceProvider.php' => app_path('Providers/AuthServiceProvider.php'),
3739
], 'siteboss-framework');

src/Http/Controllers/CmsEditor/CmsEditorMenuController.php

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,8 @@
1010
use NotFound\Layout\Elements\LayoutButton;
1111
use NotFound\Layout\Elements\LayoutForm;
1212
use NotFound\Layout\Elements\LayoutPage;
13+
use NotFound\Layout\Elements\LayoutText;
1314
use NotFound\Layout\Elements\LayoutWidget;
14-
use NotFound\Layout\Elements\Table\LayoutTable;
15-
use NotFound\Layout\Elements\Table\LayoutTableColumn;
16-
use NotFound\Layout\Elements\Table\LayoutTableHeader;
17-
use NotFound\Layout\Elements\Table\LayoutTableRow;
1815
use NotFound\Layout\Helpers\LayoutWidgetHelper;
1916
use NotFound\Layout\Inputs\LayoutInputCheckbox;
2017
use NotFound\Layout\Inputs\LayoutInputDropdown;
@@ -39,40 +36,10 @@ public function index()
3936

4037
$widget1 = new LayoutWidget('CMS Menu', 12);
4138

42-
$table = new LayoutTable(delete: true, edit: true, create: true, sort: true);
43-
$table->addHeader(new LayoutTableHeader('Name', 'table'));
44-
$table->addHeader(new LayoutTableHeader('Level', 'level'));
45-
$table->addHeader(new LayoutTableHeader('Icon', 'icon'));
46-
$table->addHeader(new LayoutTableHeader('Rights', 'rights'));
47-
$table->addHeader(new LayoutTableHeader('Enabled', 'enabled'));
48-
$tables = CmsMenu::orderBy('order')->get();
49-
50-
foreach ($tables as $cmsTable) {
51-
$row = new LayoutTableRow($cmsTable->id, '/app/editor/menu/'.$cmsTable->id);
52-
$row->addColumn(new LayoutTableColumn($cmsTable->level == 1 ? '- '.$cmsTable->title : $cmsTable->title, 'table'));
53-
$row->addColumn(new LayoutTableColumn($cmsTable->level, 'level'));
54-
$row->addColumn(new LayoutTableColumn($cmsTable->icon, 'icon'));
55-
$row->addColumn(new LayoutTableColumn($cmsTable->rights, 'rights'));
56-
$row->addColumn(new LayoutTableColumn($cmsTable->enabled, 'enabled'));
57-
$table->addRow($row);
58-
}
59-
$widget1->addTable($table);
60-
$widget1->noPadding();
39+
$widget1->addText(new LayoutText('Menu is editable in the file resources/siteboss/menu.json'));
6140

6241
$page->addWidget($widget1);
6342

64-
$widget2 = new LayoutWidget('Add new item', 12);
65-
66-
$newFieldForm = new LayoutForm('/app/editor/menu/');
67-
68-
$newFieldForm->addInput((new LayoutInputText('name', 'Display name'))->setRequired());
69-
$newFieldForm->addInput((new LayoutInputText('to', 'Target Path'))->setRequired());
70-
$newFieldForm->addButton(new LayoutButton('Add menuitem'));
71-
72-
$widget2->addForm($newFieldForm);
73-
74-
$page->addWidget($widget2);
75-
7643
$response->addUIElement($page);
7744

7845
return $response->build();

0 commit comments

Comments
 (0)