// Specify the routes for this module
// Any Marionette View should use the MarionetteView wrapper component with a prop of the actual marionette view class
// Options can be passed into the marionette view class via the options prop
// Models and collections can be specified as props
// If a model or collection is passed in the data will be prefetched before the component is loaded
// Props that make use of the route object should use props: route => ({ ...define prop using route.params object})
import Page from 'app/layouts/page.vue'
import Debug from 'app/views/debug.vue'
import MarionetteView from 'app/views/marionette/marionette-wrapper.vue'
import StatsView from 'modules/blstats/views/stats'

let bc = { title: 'Usage Stats', url: '/ustats' }

const routes = [
  {
    path: '/statistics',
    component: Page,
    children: [
        {
            // We need to pass the regex to allow capture of the second optional parameter
            path: ':type([a-zA-Z0-9]+)?(/)?:subtype?',
            name: 'statistics',
            component: MarionetteView,
            props: route => ({
                mview: StatsView,
                breadcrumbs: [bc],
                options: {
                    type: route.params.type || '', 
                    subtype: route.params.subtype || ''
                }
            })
        },
    ]
  },
]

export default routes
@@ -499,88 +499,8 @@
 t%7D)%0A
-import Page from 'app/layouts/page.vue'%0Aimport Debug from 'app/views/debug.vue'%0A
 impo
@@ -665,13 +665,17 @@
 : '/
-u
 stat
+istic
 s' %7D
@@ -701,88 +701,8 @@
   %7B%0A
-    path: '/statistics',%0A    component: Page,%0A    children: %5B%0A        %7B%0A        
     
@@ -788,23 +788,30 @@
     
-        path: '
+path: '/statistics(/)?
 :typ
@@ -842,24 +842,16 @@
 type?',%0A
-        
     name
@@ -866,24 +866,16 @@
 stics',%0A
-        
     comp
@@ -893,32 +893,24 @@
 onetteView,%0A
-        
     props: r
@@ -928,24 +928,16 @@
         
-   
-     
 mview: S
@@ -954,24 +954,16 @@
         
-    
-    
 breadcru
@@ -981,24 +981,16 @@
         
-     
-   
 options:
@@ -992,24 +992,16 @@
 ions: %7B%0A
-        
         
@@ -1038,16 +1038,9 @@
  '',
- %0A      
+%0A
     
@@ -1047,18 +1047,16 @@
         
-  
 subtype:
@@ -1087,41 +1087,8 @@
  ''%0A
-                %7D%0A            %7D)%0A
     
@@ -1098,17 +1098,18 @@
  %7D,%0A    
-%5D
+%7D)
 %0A  %7D,%0A%5D%0A

Fix statistics routing