adding whitelist
This commit is contained in:
parent
b979ba83b7
commit
0841c24f3c
3
.env
3
.env
@ -1,3 +1,4 @@
|
||||
# VITE_API_BASE=http://192.168.1.112:3101/api/v1
|
||||
VITE_API_BASE=http://localhost:3000/api/v1
|
||||
VITE_API_PATH_LIST=/ivao/list/today
|
||||
VITE_API_PATH_LIST=/ivao/list/today
|
||||
VITE_API_PATH_WHITELIST=/ivao/whitelist
|
145
src/App.vue
145
src/App.vue
@ -4,12 +4,14 @@
|
||||
import moment from 'moment';
|
||||
import FormatTime from './components/FormatTime.vue';
|
||||
|
||||
import { getMonthlyList } from './data/http/listRequest';
|
||||
import { getMonthlyList, getWhitelist } from './data/http/listRequest';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
list: [],
|
||||
whitelist: []
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
@ -25,6 +27,7 @@ export default {
|
||||
d._formattedTime = `${hours}:${minutes}`;
|
||||
return d;
|
||||
});
|
||||
this.whitelist = await getWhitelist();
|
||||
console.log(this.list);
|
||||
},
|
||||
dateTime(value) {
|
||||
@ -44,62 +47,92 @@ export default {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<h1 class="title">
|
||||
<img class="logo" src="@/assets/images/logo_28.png" />Horas mensuales
|
||||
</h1>
|
||||
|
||||
|
||||
<table class="table is-striped is-hoverable is-fullwidth">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="has-text-centered">VID</th>
|
||||
<th class="">Nombre</th>
|
||||
<th class="has-text-centered">División</th>
|
||||
<th class="has-text-centered">Horas totales</th>
|
||||
<th class="has-text-centered">Último vuelo</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="item in list" :key="item.vid">
|
||||
<td class="has-text-centered">
|
||||
{{ item.vid }}
|
||||
</td>
|
||||
<td>
|
||||
{{ item.name }}
|
||||
</td>
|
||||
<td class="has-text-centered">
|
||||
{{ item.division }} <img v-if="item.division" :src="flagIcon(item.division.toLowerCase())" :alt="item.division" :title="item.division">
|
||||
</td>
|
||||
<td class="has-text-centered">
|
||||
<FormatTime :value="item.time / 60" />
|
||||
</td>
|
||||
<td class="">
|
||||
<div class="is-size-6">
|
||||
{{ item.lastFlight.departureId }} - {{ item.lastFlight.arrivalId }} <span class="is-size-7 ml-1 has-text-grey-light">{{ dateTime(item.lastFlightDate) }}</span>
|
||||
</div>
|
||||
<div class="field is-grouped is-grouped-multiline">
|
||||
<div class="control">
|
||||
<div class="tags has-addons">
|
||||
<span class="tag is-dark">Callsign</span>
|
||||
<span class="tag">{{ item.lastCallsign }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control">
|
||||
<div class="tags has-addons">
|
||||
<span class="tag is-dark">Aircraft</span>
|
||||
<span class="tag">{{ item.lastFlight.aircraftId }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<header class="container is-fluid level block mt-2">
|
||||
<div class="level-left">
|
||||
<img src="@/assets/images/logo_28.png" alt="Latin Streaming Alliance" class="logo">
|
||||
</div>
|
||||
</header>
|
||||
<div class="container">
|
||||
<section class="section">
|
||||
<h1 class="title">Pilotos activos con mas de 200 horas en ACARS</h1>
|
||||
<table class="table is-striped is-hoverable is-fullwidth">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="has-text-centered">VID</th>
|
||||
<th class="">Nombre</th>
|
||||
<th class="has-text-centered">Total Vuelos</th>
|
||||
<th class="has-text-centered">Horas totales</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="item in whitelist" :key="item.vid">
|
||||
<td class="has-text-centered">
|
||||
{{ item.vid }}
|
||||
</td>
|
||||
<td>
|
||||
{{ item.name }}
|
||||
</td>
|
||||
<td class="has-text-centered">
|
||||
{{ item.flights }}
|
||||
</td>
|
||||
<td class="has-text-centered">
|
||||
<FormatTime :value="item.flightTime" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<section class="section">
|
||||
<h1 class="title">Status mensual IVAO</h1>
|
||||
<table class="table is-striped is-hoverable is-fullwidth">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="has-text-centered">VID</th>
|
||||
<th class="">Nombre</th>
|
||||
<th class="has-text-centered">División</th>
|
||||
<th class="has-text-centered">Horas totales</th>
|
||||
<th class="has-text-centered">Último vuelo</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="item in list" :key="item.vid">
|
||||
<td class="has-text-centered">
|
||||
{{ item.vid }}
|
||||
</td>
|
||||
<td>
|
||||
{{ item.name }}
|
||||
</td>
|
||||
<td class="has-text-centered">
|
||||
{{ item.division }} <img v-if="item.division" :src="flagIcon(item.division.toLowerCase())" :alt="item.division" :title="item.division">
|
||||
</td>
|
||||
<td class="has-text-centered">
|
||||
<FormatTime :value="item.time / 60" />
|
||||
</td>
|
||||
<td class="">
|
||||
<div class="is-size-6">
|
||||
{{ item.lastFlight.departureId }} - {{ item.lastFlight.arrivalId }} <span class="is-size-7 ml-1 has-text-grey-light">{{ dateTime(item.lastFlightDate) }}</span>
|
||||
</div>
|
||||
<div class="field is-grouped is-grouped-multiline">
|
||||
<div class="control">
|
||||
<div class="tags has-addons">
|
||||
<span class="tag is-dark">Callsign</span>
|
||||
<span class="tag">{{ item.lastCallsign }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control">
|
||||
<div class="tags has-addons">
|
||||
<span class="tag is-dark">Aircraft</span>
|
||||
<span class="tag">{{ item.lastFlight.aircraftId }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
<!-- <RouterView /> -->
|
||||
</template>
|
||||
|
||||
|
@ -5,4 +5,10 @@ export async function getMonthlyList() {
|
||||
import.meta.env;
|
||||
const response = await request(`${VITE_API_BASE}${VITE_API_PATH_LIST}`);
|
||||
return response;
|
||||
}
|
||||
export async function getWhitelist() {
|
||||
const { VITE_API_BASE, VITE_API_PATH_WHITELIST } =
|
||||
import.meta.env;
|
||||
const response = await request(`${VITE_API_BASE}${VITE_API_PATH_WHITELIST}`);
|
||||
return response;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user