2020-08-08 23:59:13 +02:00
|
|
|
|
<template>
|
2020-08-25 13:02:20 +02:00
|
|
|
|
<v-container fluid>
|
|
|
|
|
|
|
|
|
|
|
|
<v-card>
|
|
|
|
|
|
<v-card-title>
|
|
|
|
|
|
<v-toolbar flat>
|
|
|
|
|
|
<v-toolbar-title>Sequences</v-toolbar-title>
|
|
|
|
|
|
|
|
|
|
|
|
<v-spacer></v-spacer>
|
|
|
|
|
|
<v-text-field
|
|
|
|
|
|
v-model="filter"
|
|
|
|
|
|
append-icon="mdi-magnify"
|
|
|
|
|
|
label="Filter"
|
|
|
|
|
|
single-line
|
|
|
|
|
|
clearable
|
|
|
|
|
|
hint="Filter by sequence, line, date or remarks"
|
|
|
|
|
|
></v-text-field>
|
|
|
|
|
|
</v-toolbar>
|
|
|
|
|
|
</v-card-title>
|
|
|
|
|
|
<v-card-text>
|
|
|
|
|
|
|
|
|
|
|
|
<v-data-table
|
|
|
|
|
|
:headers="headers"
|
|
|
|
|
|
:items="items"
|
2020-08-25 18:04:42 +02:00
|
|
|
|
item-key="sequence"
|
2020-08-25 13:02:20 +02:00
|
|
|
|
:server-items-length="num_rows"
|
2020-09-01 12:33:01 +02:00
|
|
|
|
:search="filter"
|
2020-09-02 11:09:04 +02:00
|
|
|
|
:custom-filter="customFilter"
|
2020-08-25 13:02:20 +02:00
|
|
|
|
:loading="loading"
|
|
|
|
|
|
:fixed-header="true"
|
2020-08-25 18:04:42 +02:00
|
|
|
|
show-expand
|
2020-08-25 13:02:20 +02:00
|
|
|
|
>
|
|
|
|
|
|
|
2020-08-25 18:04:42 +02:00
|
|
|
|
<template v-slot:expanded-item="{ headers, item }">
|
|
|
|
|
|
<td :colspan="headers.length" class="pa-0">
|
|
|
|
|
|
<v-container fluid class="pa-0">
|
2020-09-01 12:34:58 +02:00
|
|
|
|
<v-row no-gutters class="d-flex flex-column flex-sm-row">
|
|
|
|
|
|
<v-col cols="6" class="d-flex flex-column">
|
|
|
|
|
|
<v-card outlined class="flex-grow-1">
|
|
|
|
|
|
<v-card-title>
|
|
|
|
|
|
Acquisition remarks
|
|
|
|
|
|
</v-card-title>
|
|
|
|
|
|
<v-card-subtitle>
|
|
|
|
|
|
</v-card-subtitle>
|
|
|
|
|
|
<v-card-text>
|
|
|
|
|
|
{{ item.remarks }}
|
|
|
|
|
|
</v-card-text>
|
|
|
|
|
|
</v-card>
|
|
|
|
|
|
<v-card outlined class="flex-grow-1">
|
|
|
|
|
|
<v-card-title>
|
|
|
|
|
|
Processing remarks
|
|
|
|
|
|
</v-card-title>
|
|
|
|
|
|
<v-card-subtitle>
|
|
|
|
|
|
</v-card-subtitle>
|
|
|
|
|
|
<v-card-text>
|
|
|
|
|
|
{{ item.remarks_final }}
|
|
|
|
|
|
</v-card-text>
|
|
|
|
|
|
</v-card>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
<v-col cols="6" class="d-flex">
|
|
|
|
|
|
<v-card outlined class="flex-grow-1">
|
|
|
|
|
|
<v-card-title>
|
|
|
|
|
|
Source files
|
|
|
|
|
|
</v-card-title>
|
2020-08-25 18:04:42 +02:00
|
|
|
|
<v-card-subtitle>
|
|
|
|
|
|
</v-card-subtitle>
|
|
|
|
|
|
<v-card-text>
|
|
|
|
|
|
<v-list>
|
2020-09-01 12:35:30 +02:00
|
|
|
|
<v-list-group value="true" v-if="item.raw_files">
|
2020-08-25 18:04:42 +02:00
|
|
|
|
<template v-slot:activator>
|
|
|
|
|
|
<v-list-item-title>
|
|
|
|
|
|
Raw files
|
|
|
|
|
|
<span class="grey--text text--lighten-1">
|
|
|
|
|
|
{{item.raw_files.length}}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</v-list-item-title>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<v-list-item v-for="(path, index) in item.raw_files"
|
|
|
|
|
|
key="index"
|
|
|
|
|
|
link
|
|
|
|
|
|
title="View the shot log"
|
|
|
|
|
|
>
|
|
|
|
|
|
{{ basename(path) }}
|
|
|
|
|
|
</v-list-item>
|
|
|
|
|
|
</v-list-group>
|
2020-09-01 12:35:30 +02:00
|
|
|
|
<v-list-group value="true" v-if="item.final_files">
|
2020-08-25 18:04:42 +02:00
|
|
|
|
<template v-slot:activator>
|
|
|
|
|
|
<v-list-item-title>
|
|
|
|
|
|
Final files
|
|
|
|
|
|
<span class="grey--text text--lighten-1">
|
|
|
|
|
|
{{item.final_files.length}}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</v-list-item-title>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<v-list-item v-for="(path, index) in item.final_files"
|
|
|
|
|
|
key="index"
|
|
|
|
|
|
link
|
|
|
|
|
|
title="View the shot log"
|
|
|
|
|
|
>
|
|
|
|
|
|
{{ basename(path) }}
|
|
|
|
|
|
</v-list-item>
|
|
|
|
|
|
</v-list-group>
|
|
|
|
|
|
</v-list>
|
|
|
|
|
|
</v-card-text>
|
|
|
|
|
|
</v-card>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
</v-row>
|
|
|
|
|
|
</v-container>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<template v-slot:item.sequence="{value}">
|
|
|
|
|
|
<a
|
|
|
|
|
|
:href="`/projects/${$route.params.project}/log/sequence/${value}`"
|
|
|
|
|
|
title="View the event log for this sequence">{{value}}</a>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
2020-08-25 13:02:20 +02:00
|
|
|
|
<template v-slot:item.status="{value}">
|
2020-09-01 12:36:00 +02:00
|
|
|
|
<span :class="{'success--text': value=='final', 'warning--text': value=='raw', 'error--text': value=='ntbp'}">
|
|
|
|
|
|
{{ value == "final" ? "Processed" : value == "raw" ? raw_files ? "Acquired" : "In acquisition" : value == "ntbp" ? "NTBP" : `Unknown (${status})` }}
|
2020-08-25 13:02:20 +02:00
|
|
|
|
</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<template v-slot:item.duration="{item: {duration: value}}">
|
|
|
|
|
|
{{
|
|
|
|
|
|
value
|
|
|
|
|
|
?
|
|
|
|
|
|
"" +
|
|
|
|
|
|
(value.days
|
|
|
|
|
|
? value.days + "d "
|
|
|
|
|
|
: "") +
|
|
|
|
|
|
String(value.hours || 0).padStart(2, "0") +
|
|
|
|
|
|
":" + String(value.minutes || 0).padStart(2, "0") +
|
|
|
|
|
|
":" + String(value.seconds || 0).padStart(2, "0")
|
|
|
|
|
|
: "N/A"
|
|
|
|
|
|
}}
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<template v-slot:item.duration_final="{item: {duration_final: value}}">
|
|
|
|
|
|
{{
|
|
|
|
|
|
value
|
|
|
|
|
|
?
|
|
|
|
|
|
"" +
|
|
|
|
|
|
(value.days
|
|
|
|
|
|
? value.days + "d "
|
|
|
|
|
|
: "") +
|
|
|
|
|
|
String(value.hours || 0).padStart(2, "0") +
|
|
|
|
|
|
":" + String(value.minutes || 0).padStart(2, "0") +
|
|
|
|
|
|
":" + String(value.seconds || 0).padStart(2, "0")
|
|
|
|
|
|
: "N/A"
|
|
|
|
|
|
}}
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<template v-slot:item.ts0="{value}">
|
|
|
|
|
|
<span v-if="value">
|
|
|
|
|
|
{{ value.replace(/(.{10})T(.{8}).{4}Z$/, "$1 $2") }}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<template v-slot:item.ts1="{value}">
|
|
|
|
|
|
<span v-if="value">
|
|
|
|
|
|
{{ value.replace(/(.{10})T(.{8}).{4}Z$/, "$1 $2") }}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<template v-slot:item.ts0_final="{value}">
|
|
|
|
|
|
<span v-if="value">
|
|
|
|
|
|
{{ value.replace(/(.{10})T(.{8}).{4}Z$/, "$1 $2") }}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<template v-slot:item.ts1_final="{value}">
|
|
|
|
|
|
<span v-if="value">
|
|
|
|
|
|
{{ value.replace(/(.{10})T(.{8}).{4}Z$/, "$1 $2") }}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<template v-slot:item.missing_shots="{value}">
|
|
|
|
|
|
<span :class="value && 'warning--text'">{{ value }}</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<template v-slot:item.length="props">
|
|
|
|
|
|
<span>{{ Math.round(props.value) }} m</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<template v-slot:item.azimuth="props">
|
|
|
|
|
|
<span>{{ props.value.toFixed(1) }} °</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
</v-data-table>
|
|
|
|
|
|
</v-card-text>
|
|
|
|
|
|
</v-card>
|
|
|
|
|
|
</v-container>
|
2020-08-08 23:59:13 +02:00
|
|
|
|
</template>
|
|
|
|
|
|
|
2020-08-25 13:02:20 +02:00
|
|
|
|
<style>
|
|
|
|
|
|
td span {
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-raw {
|
|
|
|
|
|
color: orange;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-final {
|
|
|
|
|
|
color: green;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-ntbp {
|
|
|
|
|
|
color: red;
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|
|
|
|
|
|
|
2020-08-08 23:59:13 +02:00
|
|
|
|
<script>
|
2020-08-26 17:48:55 +02:00
|
|
|
|
import { mapActions, mapGetters } from 'vuex';
|
2020-08-25 18:04:42 +02:00
|
|
|
|
import { basename } from 'path';
|
2020-08-08 23:59:13 +02:00
|
|
|
|
|
|
|
|
|
|
export default {
|
2020-08-25 13:02:20 +02:00
|
|
|
|
name: "SequenceList",
|
|
|
|
|
|
|
|
|
|
|
|
data () {
|
|
|
|
|
|
return {
|
|
|
|
|
|
headers: [
|
2020-08-25 18:04:42 +02:00
|
|
|
|
{
|
|
|
|
|
|
value: 'data-table-expand'
|
|
|
|
|
|
},
|
2020-08-25 13:02:20 +02:00
|
|
|
|
{
|
|
|
|
|
|
value: "sequence",
|
|
|
|
|
|
text: "Sequence"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: "status",
|
|
|
|
|
|
text: "Status"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: "line",
|
|
|
|
|
|
text: "Line"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: "fsp_final",
|
|
|
|
|
|
text: "FPSP",
|
|
|
|
|
|
align: "end"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: "lsp_final",
|
|
|
|
|
|
text: "LPSP",
|
|
|
|
|
|
align: "end"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: "fsp",
|
|
|
|
|
|
text: "FSP",
|
|
|
|
|
|
align: "end"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: "lsp",
|
|
|
|
|
|
text: "LSP",
|
|
|
|
|
|
align: "end"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: "duration_final",
|
|
|
|
|
|
text: "Prime duration",
|
|
|
|
|
|
align: "end"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: "duration",
|
|
|
|
|
|
text: "Total duration",
|
|
|
|
|
|
align: "end"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: "ts0_final",
|
|
|
|
|
|
text: "FPSP time",
|
|
|
|
|
|
align: "end"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: "ts1_final",
|
|
|
|
|
|
text: "LPSP time",
|
|
|
|
|
|
align: "end"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: "ts0",
|
|
|
|
|
|
text: "Start time",
|
|
|
|
|
|
align: "end"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: "ts1",
|
|
|
|
|
|
text: "End time",
|
|
|
|
|
|
align: "end"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: "num_points",
|
|
|
|
|
|
text: "Shots acquired",
|
|
|
|
|
|
align: "end"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: "missing_shots",
|
|
|
|
|
|
text: "Shots missed",
|
|
|
|
|
|
align: "end"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: "length",
|
|
|
|
|
|
text: "Length",
|
|
|
|
|
|
align: "end"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: "azimuth",
|
|
|
|
|
|
text: "Azimuth",
|
|
|
|
|
|
align: "end"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2020-08-25 18:04:42 +02:00
|
|
|
|
expanded: [],
|
2020-08-25 13:02:20 +02:00
|
|
|
|
items: [],
|
|
|
|
|
|
filter: "",
|
|
|
|
|
|
options: {},
|
|
|
|
|
|
num_rows: null
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2020-08-26 17:48:55 +02:00
|
|
|
|
computed: {
|
|
|
|
|
|
...mapGetters(['loading'])
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2020-08-25 13:02:20 +02:00
|
|
|
|
watch: {
|
|
|
|
|
|
options: {
|
|
|
|
|
|
handler () {
|
|
|
|
|
|
this.getSequences();
|
|
|
|
|
|
},
|
|
|
|
|
|
deep: true
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
|
|
|
|
async getNumLines () {
|
|
|
|
|
|
const projectInfo = await this.api([`/project/${this.$route.params.project}`]);
|
|
|
|
|
|
this.num_rows = projectInfo.sequences;
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
async getSequences () {
|
|
|
|
|
|
|
|
|
|
|
|
const query = new URLSearchParams(this.options);
|
|
|
|
|
|
query.set("filter", this.filter);
|
2020-08-25 18:04:42 +02:00
|
|
|
|
query.set("files", true);
|
2020-08-25 13:02:20 +02:00
|
|
|
|
if (this.options.itemsPerPage < 0) {
|
|
|
|
|
|
query.delete("itemsPerPage");
|
|
|
|
|
|
}
|
|
|
|
|
|
const url = `/project/${this.$route.params.project}/sequence?${query.toString()}`;
|
|
|
|
|
|
|
|
|
|
|
|
this.items = await this.api([url]) || [];
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2020-08-25 18:04:42 +02:00
|
|
|
|
basename (path, ext) {
|
|
|
|
|
|
return basename(path, ext);
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2020-09-02 11:09:04 +02:00
|
|
|
|
customFilter (value, search, item) {
|
|
|
|
|
|
if (!search) return true;
|
|
|
|
|
|
|
|
|
|
|
|
const number = Number(search);
|
|
|
|
|
|
|
|
|
|
|
|
if (!isNaN(number)) {
|
|
|
|
|
|
if (item.sequence == number) return true;
|
|
|
|
|
|
|
|
|
|
|
|
if (search.length > 3) {
|
|
|
|
|
|
const searchShots = [ "fsp", "lsp", "fsp_final", "lsp_final" ].some( k =>
|
|
|
|
|
|
item[k] == number
|
|
|
|
|
|
);
|
|
|
|
|
|
if (searchShots) return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (search.length > 2) {
|
|
|
|
|
|
const searchDates = [ "ts0", "ts1" ].some(k => {
|
|
|
|
|
|
const i = item[k].indexOf(search);
|
|
|
|
|
|
return i >= 0 && i < 10;
|
|
|
|
|
|
});
|
|
|
|
|
|
if (searchDates) return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ((item.remarks||"").indexOf(search) != -1) return true;
|
|
|
|
|
|
|
|
|
|
|
|
if ((item.remarks_final||"").indexOf(search) != -1) return true;
|
|
|
|
|
|
|
|
|
|
|
|
if (item.status.indexOf(search.toLowerCase()) == 0) return true;
|
|
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2020-08-25 13:02:20 +02:00
|
|
|
|
...mapActions(["api"])
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
mounted () {
|
|
|
|
|
|
this.getSequences();
|
|
|
|
|
|
this.getNumLines();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-08-08 23:59:13 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|