Commit 250e49fb authored by gj4210's avatar gj4210 👁 Committed by janis.streib
Browse files

UPD: MACfinder name consistency

+ netdoc page component
parent 496b76b2
openapi: 3.0.1
info:
title: Macfinder API
description: 'Macfinder API'
title: MACfinder API
description: 'MACfinder API'
contact:
email: netvs@scc.kit.edu
license:
......@@ -12,7 +12,7 @@ servers:
- url: https://netvs.scc.kit.edu/api/macfinder
tags:
- name: job
description: Macfinder search jobs
description: MACfinder search jobs
- name: oui_lookup
description: Simple OUI vendor lookup
paths:
......
......@@ -128,7 +128,7 @@ export default {
url: '/org/ou'
},
{
name: 'Macfinder',
name: 'MACfinder',
url: '/tools/macfinder'
},
{
......
......@@ -101,8 +101,8 @@ export default {
{
has_sub_pages: true,
label: 'Netdoc',
address: self.$sysinfo.host_oper_mode.is_prod ? 'https://www-net.scc.kit.edu/~netadmin/netdoc/user/wrapper.cgi/' : `https://www-net-${self.$sysinfo.host_oper_mode.mode}.scc.kit.edu/~netadmin/netdoc/user/wrapper.cgi/`,
icon: 'ethernet'
address: '/netdoc',
icon: 'network-wired'
}
],
organizations: [
......
......@@ -157,6 +157,16 @@ export default new Router({
}
}
},
{
path: '/netdoc',
name: 'netdoc',
component: () => import('./views/nd/Netdoc'),
meta: {
resolveName: function () {
return 'Netdoc'
}
}
},
{
path: '/netdoc/map',
name: 'map',
......@@ -170,10 +180,10 @@ export default new Router({
{
path: '/tools/macfinder',
name: 'macfinder',
component: () => import('./views/tools/Macfinder'),
component: () => import('./views/tools/MACfinder.vue'),
meta: {
resolveName: function () {
return 'Macfinder'
return 'MACfinder'
}
}
},
......
......@@ -4,7 +4,7 @@
<div id="swagger-ui-netdb">
</div>
</b-tab>
<b-tab title="Macfinder">
<b-tab title="MACfinder">
<div id="swagger-ui-macfinder">
</div>
</b-tab>
......
<template>
<div>NETDOC WHOOO</div>
</template>
<script>
export default {
name: 'Netdoc'
}
</script>
<style scoped>
</style>
<template>
<div class="macfinder">
<h1>Macfinder</h1>
<h1>MACfinder</h1>
<b-form @submit="createJob">
<b-form-group invalid-feedback="Ungültige BCD" :state="search_bcd !== null" label="Broadcastdomain">
<vue-bootstrap-typeahead
......@@ -71,11 +71,11 @@
</div>
</template>
<script>
import MacfinderService from '@/api-services/macfinder.service'
import MACfinderService from '@/api-services/macfinder.service'
import SearchService from '@/api-services/search.service'
export default {
name: 'Macfinder',
name: 'MACfinder',
data() {
return {
bcds: [],
......@@ -121,7 +121,7 @@ export default {
},
async refresh() {
try {
const jobs = await MacfinderService.getJobs()
const jobs = await MACfinderService.getJobs()
this.jobs = []
for (const job in jobs.data.jobs) {
this.jobs.push(jobs.data.jobs[job])
......@@ -135,13 +135,13 @@ export default {
if (!this.search_bcd) {
return false
}
await MacfinderService.createJob(this.search_bcd.name, this.search_mac)
await MACfinderService.createJob(this.search_bcd.name, this.search_mac)
await this.refresh()
this.search_mac = this.bcd_query = ''
return true
},
async refire(bcd, mac) {
await MacfinderService.createJob(bcd, mac)
await MACfinderService.createJob(bcd, mac)
await this.refresh()
},
async getBCDs(bcd) {
......
......@@ -16,7 +16,7 @@
</div>
</template>
<script>
import MacfinderService from '@/api-services/macfinder.service'
import MACfinderService from '@/api-services/macfinder.service'
export default {
name: 'OUILookup',
......@@ -31,7 +31,7 @@ export default {
async createJob(ev) {
ev.preventDefault()
try {
const res = await MacfinderService.ouiLookup(this.search_mac)
const res = await MACfinderService.ouiLookup(this.search_mac)
this.vendor = res.data.vendor
this.result_mac = res.data.mac
} catch (e) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment