- 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;
|
updated_at: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DbFile {
|
export class DbFile {
|
||||||
id: number;
|
constructor(
|
||||||
document_id: number;
|
public id: number,
|
||||||
path_name: string;
|
public document_id: number,
|
||||||
label: string;
|
public path_name: string,
|
||||||
comment?: string;
|
public label: string,
|
||||||
mime_type: string;
|
public mime_type: string,
|
||||||
language?: string;
|
public file_size: number,
|
||||||
file_size: bigint;
|
public visible_in_frontdoor: boolean,
|
||||||
visible_in_frontdoor: boolean;
|
public visible_in_oai: boolean,
|
||||||
visible_in_oai: boolean;
|
public sort_order: Int16Array,
|
||||||
sort_order: Int16Array;
|
public created_at: string,
|
||||||
created_at: string;
|
public updated_at: string,
|
||||||
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-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">{{ dataset.titles[0].value }}</div> -->
|
||||||
<div class="column is-9-desktop is-8-tablet">
|
<div class="column is-9-desktop is-8-tablet">
|
||||||
<p>{{ dataset.MainTitle.value }}</p>
|
<p>{{ dataset.MainTitle?.value }}</p>
|
||||||
<br />
|
<br />
|
||||||
<p v-if="dataset.hasTranslatedTitle()">
|
<p v-if="dataset.hasTranslatedTitle()">
|
||||||
{{ dataset.TranslatedTitle.value }}
|
{{ dataset.TranslatedTitle?.value }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -81,10 +81,10 @@
|
||||||
abstract:
|
abstract:
|
||||||
</div>
|
</div>
|
||||||
<div class="column is-9-desktop is-8-tablet">
|
<div class="column is-9-desktop is-8-tablet">
|
||||||
<p>{{ dataset.MainAbstract.value }}</p>
|
<p>{{ dataset.MainAbstract?.value }}</p>
|
||||||
<br />
|
<br />
|
||||||
<p v-if="dataset.hasTranslatedAbstract()">
|
<p v-if="dataset.hasTranslatedAbstract()">
|
||||||
{{ dataset.TranslatedAbstract.value }}
|
{{ dataset.TranslatedAbstract?.value }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
<div v-if="dataset.hasOwnProperty('abstracts')" class="columns">
|
<div v-if="dataset.hasOwnProperty('abstracts')" class="columns">
|
||||||
<div class="column is-3-desktop is-4-tablet label">Methodik/<br />method:</div>
|
<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">
|
<div v-if="dataset.hasMethodsAbstract()" class="column is-9-desktop is-8-tablet">
|
||||||
{{ dataset.MethodsAbstract.value }}
|
{{ dataset.MethodsAbstract?.value }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="column is-9-desktop is-8-tablet">-</div>
|
<div v-else class="column is-9-desktop is-8-tablet">-</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -114,7 +114,7 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="table-header">Path Name</th>
|
<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>
|
<th class="table-header">File Size</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -122,12 +122,14 @@
|
||||||
<tr v-for="file in dataset.files" v-bind:key="file.id">
|
<tr v-for="file in dataset.files" v-bind:key="file.id">
|
||||||
<td>
|
<td>
|
||||||
<a class="link-label" target="_blank" v-bind:href="portal + file.id"> {{ file.label }} </a>
|
<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>
|
||||||
<td>
|
<td>
|
||||||
<span>{{ getExtension(file.path_name) }}</span>
|
<span>{{ getExtension(file.path_name) }}</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span>{{ formatSize(file.file_size, 2) }}</span>
|
<span>{{ formatSize(file.file_size) }}</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user