Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
2b6b62c2
Commit
2b6b62c2
authored
Jun 04, 2020
by
Savas Vedova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reintroduce the missing router
parent
f5d90c4d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
ee/app/assets/javascripts/security_dashboard/first_class_init.js
...assets/javascripts/security_dashboard/first_class_init.js
+3
-0
ee/app/assets/javascripts/security_dashboard/router.js
ee/app/assets/javascripts/security_dashboard/router.js
+23
-0
No files found.
ee/app/assets/javascripts/security_dashboard/first_class_init.js
View file @
2b6b62c2
...
...
@@ -6,6 +6,7 @@ import FirstClassGroupSecurityDashboard from './components/first_class_group_sec
import
FirstClassInstanceSecurityDashboard
from
'
./components/first_class_instance_security_dashboard.vue
'
;
import
UnavailableState
from
'
./components/unavailable_state.vue
'
;
import
createStore
from
'
./store
'
;
import
createRouter
from
'
./router
'
;
import
projectsPlugin
from
'
./store/plugins/projects
'
;
import
projectSelector
from
'
./store/plugins/project_selector
'
;
import
apolloProvider
from
'
./graphql/provider
'
;
...
...
@@ -62,6 +63,7 @@ export default (
props
.
vulnerabilitiesExportEndpoint
=
el
.
dataset
.
vulnerabilitiesExportEndpoint
;
}
const
router
=
createRouter
();
const
store
=
createStore
({
dashboardType
,
plugins
:
[
projectSelector
,
projectsPlugin
],
...
...
@@ -70,6 +72,7 @@ export default (
return
new
Vue
({
el
,
store
,
router
,
apolloProvider
,
render
(
createElement
)
{
return
createElement
(
component
,
{
props
});
...
...
ee/app/assets/javascripts/security_dashboard/router.js
0 → 100644
View file @
2b6b62c2
import
Vue
from
'
vue
'
;
import
VueRouter
from
'
vue-router
'
;
Vue
.
use
(
VueRouter
);
// Unfortunately Vue Router doesn't work without at least a fake component
// If you do only data handling
const
EmptyRouterComponent
=
{
render
(
createElement
)
{
return
createElement
(
'
div
'
);
},
};
export
default
()
=>
{
const
routes
=
[{
path
:
'
/
'
,
name
:
'
dashboard
'
,
component
:
EmptyRouterComponent
}];
const
router
=
new
VueRouter
({
mode
:
'
history
'
,
base
:
window
.
location
.
pathname
,
routes
,
});
return
router
;
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment