Skip to content

Commit

Permalink
Convert the old experimental Vue dashboard from v2 to v3, put it unde…
Browse files Browse the repository at this point in the history
…r feature flag ALPHA_FEATURE_VUE_DASHBOARDS

Remove some unused client code.
client_detail.js was setting up CSS classes on the client side, change that to server based rendering (caveat: some old modules relied on this behaviour)
Add widget table-card to compare what a detail widget would look like using the bootstrap 4 card layout.
mosen committed Jan 18, 2024
1 parent ebb6ae0 commit 0f6ac1d
Showing 29 changed files with 669 additions and 514 deletions.
12 changes: 6 additions & 6 deletions app/Http/Controllers/DashboardsController.php
Original file line number Diff line number Diff line change
@@ -18,12 +18,12 @@ class DashboardsController extends Controller
* This controller action would have been for a Vue/SPA dashboards layout.
* This is parked for a future release
*/
// public function index() {
// Inertia::setRootView('layouts.inertia');
// return Inertia::render('Dashboards/Index', [
// 'dashboard_default_layout' => config('dashboard.default_layout')
// ]);
// }
public function v2() {
Inertia::setRootView('layouts.inertia');
return Inertia::render('Dashboards/Index', [
'dashboard_default_layout' => config('dashboard.default_layout')
]);
}

/**
* This controller action returns an experimental blade component based dashboard.
2 changes: 2 additions & 0 deletions config/_munkireport.php
Original file line number Diff line number Diff line change
@@ -472,5 +472,7 @@ function (){
'business_units_v2' => env('ALPHA_FEATURE_BUSINESS_UNITS_V2', False),
// Enable Flexible Query (GraphQL)
'flexible_query' => env('ALPHA_FEATURE_FLEXIBLE_QUERY', false),
// Enable Vue Dashboards
'vue_dashboards' => env('ALPHA_FEATURE_VUE_DASHBOARDS', false),
]
];
214 changes: 214 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@
"dependencies": {
"@codemirror/lang-sql": "^6.5.5",
"@codemirror/theme-one-dark": "^6.1.2",
"@derpierre65/vue3-dragable-grid-layout": "^1.9.7",
"@fortawesome/fontawesome-svg-core": "^6.4.0",
"@fortawesome/free-brands-svg-icons": "^5.15.4",
"@fortawesome/free-regular-svg-icons": "^5.15.4",
6 changes: 0 additions & 6 deletions public/assets/js/clients/client_detail.js
Original file line number Diff line number Diff line change
@@ -58,12 +58,6 @@ $(document).on('appReady', function(e, lang) {

// -------------------------------- end datatables

// Set table classes
$('table').addClass('table table-condensed table-striped');

// Set h4 classes on headings
$('#summary h4').addClass('alert alert-info');

// Get client data
$.getJSON( appUrl + '/clients/get_data/' + serialNumber, function( data ) {

60 changes: 0 additions & 60 deletions resources/_vue/components/Widget.vue

This file was deleted.

Loading

0 comments on commit 0f6ac1d

Please sign in to comment.