Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
scc-net
netvs
netvs-core
Commits
1d61d78a
Commit
1d61d78a
authored
Jan 28, 2021
by
janis.streib
🦉
Browse files
ADD: oui-lookup page
parent
fe465820
Pipeline
#130325
passed with stages
in 5 minutes and 31 seconds
Changes
5
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
frontend/src/api-services/macfinder.service.js
View file @
1d61d78a
...
@@ -6,5 +6,8 @@ export default {
...
@@ -6,5 +6,8 @@ export default {
},
},
createJob
(
bcd
,
mac
)
{
createJob
(
bcd
,
mac
)
{
return
Axios
.
post
(
'
/api/macfinder/create_job
'
,
{
bcd
:
bcd
,
mac
:
mac
})
return
Axios
.
post
(
'
/api/macfinder/create_job
'
,
{
bcd
:
bcd
,
mac
:
mac
})
},
ouiLookup
(
mac
)
{
return
Axios
.
get
(
'
/api/macfinder/oui_lookup?mac=
'
+
mac
)
}
}
}
}
frontend/src/components/GlobalSearch.vue
View file @
1d61d78a
...
@@ -121,6 +121,10 @@ export default {
...
@@ -121,6 +121,10 @@ export default {
name
:
'
Macfinder
'
,
name
:
'
Macfinder
'
,
url
:
'
/tools/macfinder
'
url
:
'
/tools/macfinder
'
},
},
{
name
:
'
MAC-Vendor-Suche
'
,
url
:
'
/tools/oui_lookup
'
},
{
{
name
:
'
Gruppen & Untergruppen
'
,
name
:
'
Gruppen & Untergruppen
'
,
url
:
'
/cntl/groups
'
url
:
'
/cntl/groups
'
...
...
frontend/src/components/Navbar.vue
View file @
1d61d78a
...
@@ -55,6 +55,10 @@
...
@@ -55,6 +55,10 @@
<font-awesome-icon
fixed-width
icon=
"ethernet"
/>
<font-awesome-icon
fixed-width
icon=
"ethernet"
/>
Macfinder
Macfinder
</b-dropdown-item>
</b-dropdown-item>
<b-dropdown-item
to=
"/tools/oui_lookup"
:active=
"$route.path === '/tools/oui_lookup'"
>
<font-awesome-icon
fixed-width
icon=
"question"
/>
MAC-Vendor-Suche
</b-dropdown-item>
</b-nav-item-dropdown>
</b-nav-item-dropdown>
<b-nav-item-dropdown
v-if=
"$store.state.user"
right
<b-nav-item-dropdown
v-if=
"$store.state.user"
right
:toggle-class=
"$route.path.startsWith('/cntl/')?'active':''"
>
:toggle-class=
"$route.path.startsWith('/cntl/')?'active':''"
>
...
...
frontend/src/router.js
View file @
1d61d78a
...
@@ -122,6 +122,16 @@ export default new Router({
...
@@ -122,6 +122,16 @@ export default new Router({
}
}
}
}
},
},
{
path
:
'
/tools/oui_lookup
'
,
name
:
'
ouilookup
'
,
component
:
()
=>
import
(
'
./views/tools/OUILookup
'
),
meta
:
{
resolveName
:
function
()
{
return
'
MAC-Vendor-Suche
'
}
}
},
{
{
path
:
'
/dnsvs
'
,
path
:
'
/dnsvs
'
,
component
:
()
=>
import
(
'
./views/dnsvs/Main.vue
'
),
component
:
()
=>
import
(
'
./views/dnsvs/Main.vue
'
),
...
...
frontend/src/views/tools/OUILookup.vue
0 → 100644
View file @
1d61d78a
<
template
>
<div
class=
"macfinder"
>
<h1>
MAC-Vendor-Suche (OUI-Lookup)
</h1>
<p>
Hier können Sie den Hersteller eines Gerätes anhand seiner MAC-Adresse herausfinden.
</p>
<b-form
@
submit=
"createJob"
>
<b-form-group
label=
"MAC-Adresse"
description=
"Beliebiges Format möglich"
>
<b-input
required
v-model=
"search_mac"
placeholder=
"MAC-Adresse"
></b-input>
</b-form-group>
<b-button
type=
"submit"
variant=
"outline-success"
>
<font-awesome-icon
icon=
"search"
></font-awesome-icon>
Suchen
</b-button>
</b-form>
<hr/>
<b-jumbotron
v-if=
"vendor"
:header=
"vendor"
:lead=
"result_mac"
></b-jumbotron>
</div>
</
template
>
<
script
>
import
MacfinderService
from
'
@/api-services/macfinder.service
'
export
default
{
name
:
'
OUILookup
'
,
data
()
{
return
{
search_mac
:
null
,
result_mac
:
null
,
vendor
:
null
}
},
methods
:
{
async
createJob
(
ev
)
{
ev
.
preventDefault
()
const
res
=
await
MacfinderService
.
ouiLookup
(
this
.
search_mac
)
this
.
vendor
=
res
.
data
.
vendor
this
.
result_mac
=
res
.
data
.
mac
this
.
search_mac
=
''
return
true
}
}
}
</
script
>
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