Completed
Branch vue-dev (285fcd)
by Seth
41s
created

src/router/index.js   A

Complexity

Total Complexity 0
Complexity/F 0

Size

Lines of Code 33
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 5
Bugs 1 Features 0
Metric Value
cc 0
c 5
b 1
f 0
nc 1
dl 0
loc 33
rs 10
wmc 0
mnd 0
bc 0
fnc 0
bpm 0
cpm 0
noi 0
1
import Vue from 'vue'
2
import Router from 'vue-router'
3
4
import DeviceList from '@/components/DeviceList'
5
import Device from '@/components/Device'
6
import Logs from '@/components/Logs'
7
8
Vue.use(Router)
9
10
export default new Router({
11
  mode: 'history',
12
  routes: [
13
    {
14
      path: '/',
15
      name: 'DeviceList',
16
      component: DeviceList
17
    },
18
    {
19
      path: '/device/:id',
20
      name: 'Device',
21
      component: Device
22
    },
23
    {
24
      path: '/device/:deviceid/logs/:logid',
25
      name: 'Logs',
26
      component: Logs
27
    },
28
    {
29
      path: '*',
30
      redirect: '/'
31
    }
32
  ]
33
})
34