forked from geolba/tethys.frontend
- add md5 checksum to dataset-detail.component.vue
This commit is contained in:
parent
c0a758dbc2
commit
f1fbc2d917
|
@ -370,18 +370,31 @@ export interface Project {
|
|||
updated_at: string;
|
||||
}
|
||||
|
||||
export interface DbFile {
|
||||
id: number;
|
||||
document_id: number;
|
||||
path_name: string;
|
||||
label: string;
|
||||
comment?: string;
|
||||
mime_type: string;
|
||||
language?: string;
|
||||
file_size: bigint;
|
||||
visible_in_frontdoor: boolean;
|
||||
visible_in_oai: boolean;
|
||||
sort_order: Int16Array;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
export class DbFile {
|
||||
constructor(
|
||||
public id: number,
|
||||
public document_id: number,
|
||||
public path_name: string,
|
||||
public label: string,
|
||||
public mime_type: string,
|
||||
public file_size: number,
|
||||
public visible_in_frontdoor: boolean,
|
||||
public visible_in_oai: boolean,
|
||||
public sort_order: Int16Array,
|
||||
public created_at: string,
|
||||
public updated_at: string,
|
||||
public hashvalues: Array<HashValue>,
|
||||
public comment?: string,
|
||||
public language?: string,
|
||||
) {}
|
||||
|
||||
public get HashValue(): Nullable<HashValue> {
|
||||
return this.hashvalues.find((e) => e.type === "md5");
|
||||
}
|
||||
}
|
||||
|
||||
export interface HashValue {
|
||||
file_id: number;
|
||||
type: string;
|
||||
value: string;
|
||||
}
|
||||
|
|
|
@ -68,10 +68,10 @@
|
|||
<div class="column is-3-desktop is-4-tablet label">Title/<br />title:</div>
|
||||
<!-- <div class="column is-9-desktop is-8-tablet">{{ dataset.titles[0].value }}</div> -->
|
||||
<div class="column is-9-desktop is-8-tablet">
|
||||
<p>{{ dataset.MainTitle.value }}</p>
|
||||
<p>{{ dataset.MainTitle?.value }}</p>
|
||||
<br />
|
||||
<p v-if="dataset.hasTranslatedTitle()">
|
||||
{{ dataset.TranslatedTitle.value }}
|
||||
{{ dataset.TranslatedTitle?.value }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -81,10 +81,10 @@
|
|||
abstract:
|
||||
</div>
|
||||
<div class="column is-9-desktop is-8-tablet">
|
||||
<p>{{ dataset.MainAbstract.value }}</p>
|
||||
<p>{{ dataset.MainAbstract?.value }}</p>
|
||||
<br />
|
||||
<p v-if="dataset.hasTranslatedAbstract()">
|
||||
{{ dataset.TranslatedAbstract.value }}
|
||||
{{ dataset.TranslatedAbstract?.value }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -102,7 +102,7 @@
|
|||
<div v-if="dataset.hasOwnProperty('abstracts')" class="columns">
|
||||
<div class="column is-3-desktop is-4-tablet label">Methodik/<br />method:</div>
|
||||
<div v-if="dataset.hasMethodsAbstract()" class="column is-9-desktop is-8-tablet">
|
||||
{{ dataset.MethodsAbstract.value }}
|
||||
{{ dataset.MethodsAbstract?.value }}
|
||||
</div>
|
||||
<div v-else class="column is-9-desktop is-8-tablet">-</div>
|
||||
</div>
|
||||
|
@ -114,7 +114,7 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<th class="table-header">Path Name</th>
|
||||
<th class="table-header">File Extension</th>
|
||||
<th class="table-header">File Ext.</th>
|
||||
<th class="table-header">File Size</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -122,12 +122,14 @@
|
|||
<tr v-for="file in dataset.files" v-bind:key="file.id">
|
||||
<td>
|
||||
<a class="link-label" target="_blank" v-bind:href="portal + file.id"> {{ file.label }} </a>
|
||||
<br />
|
||||
<span>md5: {{ file.hashvalues.find((e) => e.type === "md5")?.value }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<span>{{ getExtension(file.path_name) }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<span>{{ formatSize(file.file_size, 2) }}</span>
|
||||
<span>{{ formatSize(file.file_size) }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
Loading…
Reference in New Issue
Block a user