Skip to content
Snippets Groups Projects
Unverified Commit 926683fd authored by Martin Weise's avatar Martin Weise
Browse files

Update layout and added recent on start page

parent 8a3184f5
Branches
Tags
4 merge requests!231CI: Remove build for log-service,!228Better error message handling in the frontend,!223Release of version 1.4.0,!215Resolve "Fix the unit independent search"
......@@ -13,6 +13,7 @@ import lombok.extern.jackson.Jacksonized;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Transient;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
......@@ -36,6 +37,10 @@ public class TableDto {
@Field(name = "id", type = FieldType.Keyword)
private Long id;
@NotNull
@Field(name = "database_id", type = FieldType.Keyword)
private Long tdbid;
@NotNull
@org.springframework.data.annotation.Transient
private DatabaseDto database;
......
......
......@@ -59,7 +59,6 @@ public interface TableMapper {
TableBriefDto tableToTableBriefDto(Table data);
@Mappings({
@Mapping(source = "id", target = "id"),
@Mapping(target = "name", expression = "java(data.getName())"),
@Mapping(target = "internalName", expression = "java(data.getInternalName())"),
@Mapping(target = "queueName", expression = "java(data.getQueueName())"),
......
......
......@@ -245,6 +245,7 @@ public class IndexConfigComponentTest extends BaseUnitTest {
.getMapping(new GetMappingsRequest().indices("table"), RequestOptions.DEFAULT);
final Map<String, String> types = getTypes("table", response);
assertEquals("keyword", types.get("id"));
assertEquals("keyword", types.get("database_id"));
assertNull(types.get("database"));
assertEquals("keyword", types.get("name"));
assertEquals("keyword", types.get("internal_name"));
......
......
......@@ -80,6 +80,9 @@
"id": {
"type": "keyword"
},
"database_id": {
"type": "keyword"
},
"internal_name": {
"type": "keyword"
},
......
......
......@@ -197,6 +197,8 @@ def general_search(search_term=None, t1=None, t2=None, fieldValuePairs=None):
"_source": [
"_class",
"id",
"table_id",
"database_id",
"name",
"identifier.*",
"column_type",
......
......
......@@ -80,6 +80,11 @@
},
"information": {
"links": [
{
"text": "Release Notes",
"blank": true,
"href": "https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/blob/dev/CHANGELOG.md"
},
{
"text": "Online Documentation",
"blank": true,
......
......
......@@ -25,6 +25,17 @@
<v-list-item-title>{{ $t('layout.information', { name: 'vue-i18n' }) }}</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-list-item
to="/search"
router
exact>
<v-list-item-action>
<v-icon>mdi-magnify</v-icon>
</v-list-item-action>
<v-list-item-content>
<v-list-item-title>{{ $t('layout.search', { name: 'vue-i18n' }) }}</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-list-item
to="/database"
router
......@@ -85,7 +96,7 @@
single-line
hide-details
append-icon="mdi-magnify"
:placeholder="$t('layout.search', { name: 'vue-i18n' })"
:placeholder="$t('search.fuzzy.placeholder', { name: 'vue-i18n' })"
@click:append="retrieve" />
<v-btn class="ml-2" plain type="submit" name="search-advanced" @click="toggleAdvancedSearch">
Advanced
......@@ -364,17 +375,6 @@ export default {
deep: true,
immediate: true
},
user: {
handler () {
if (!this.user) {
return
}
DatabaseService.countAll(true)
.then((count) => {
this.databaseCountFilter = count
})
}
},
'advancedSearchData.type': {
handler (newType, oldType) {
if (!newType) {
......
......
......@@ -5,11 +5,16 @@
"mydatabases": "Meine Datenbanken",
"semantics": "Semantik",
"ontologies": "Ontologien",
"search": "Suchen ...",
"search": "Suche",
"login": "Anmelden",
"logout": "Abmelden",
"signup": "Registrieren"
},
"search": {
"fuzzy": {
"placeholder": "Suchen ..."
}
},
"databases": {
"recent": "Neue Datenbanken",
"my": "Meine Datenbanken",
......
......
......@@ -5,11 +5,16 @@
"mydatabases": "My Databases",
"semantics": "Semantics",
"ontologies": "Ontologies",
"search": "Search ...",
"search": "Search",
"login": "Login",
"logout": "Logout",
"signup": "Signup"
},
"search": {
"fuzzy": {
"placeholder": "Search ..."
}
},
"databases": {
"recent": "Recent Databases",
"my": "My Databases",
......
......
......@@ -13,68 +13,22 @@
</ul>
</div>
</v-card-text>
<v-card-actions>
<v-btn
class="ml-2 mb-2"
color="primary"
to="/database">
Get Started
</v-btn>
</v-card-actions>
</v-card>
<v-card class="mt-4" flat tile>
<v-card-text>
<div>Release Notes</div>
<p class="text-h4 text--primary">
1.3
</p>
<p>
<a href="https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/blob/e4c6fdc36b3ceaa9f912cf284052459963d96076/CHANGELOG.md">Detailed
Changelog</a>
</p>
<div class="text--primary">
This release fixes bugs related to versioning, increases tasks for developers and data stewards. It enables
organizations to federate identities with their own identity provider through Keycloak.
</div>
</v-card-text>
<v-divider class="mx-4" />
<v-card-text>
<div>Release Notes</div>
<p class="text-h4 text--primary">
1.2
</p>
<p>
<a
href="https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/blob/ac45842d27fcce47a99683330dc8ea1b8321c3be/CHANGELOG.md">Detailed
Changelog</a>
</p>
<div class="text--primary">
This release adds semantic information to sub- and supersets, time-versioned metadata database, added access
model for giving users access to databases, improved the query store handling.
</div>
</v-card-text>
<v-divider class="mx-4" />
<v-card-text>
<div>Release Notes</div>
<p class="text-h4 text--primary">
1.1
</p>
<p>
<a
href="https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/blob/70b4d1e6398934d88e0080cb89f8cf87c68bf6eb/CHANGELOG">Detailed
Changelog</a>
</p>
<div class="text--primary">
In this release we added long-overdue features like user management so each user has their own database (which
can also be private) as well as data-insert features directly in the portal.
</div>
</v-card-text>
</v-card>
<v-toolbar flat>
<v-toolbar-title v-text="$t('databases.recent', { name: 'vue-i18n' })" />
</v-toolbar>
<DatabaseList ref="databases" />
</div>
</template>
<script>
import DatabaseList from '@/components/DatabaseList'
export default {
components: {
DatabaseList
},
computed: {
infoLinks () {
const infoLinks = this.$config.infoLinks
......
......
......@@ -2,6 +2,12 @@
<div>
<v-toolbar flat>
<v-toolbar-title v-text="header" />
<v-spacer />
<v-toolbar-title>
<v-btn v-if="canCreateDatabase" color="primary" name="create-database" @click.stop="createDbDialog = true">
<v-icon left>mdi-plus</v-icon> Database
</v-btn>
</v-toolbar-title>
</v-toolbar>
<v-progress-linear v-if="loading" color="primary" />
<v-card
......@@ -29,22 +35,36 @@
</div>
</v-card-text>
</v-card>
<v-dialog
v-model="createDbDialog"
persistent
max-width="640">
<CreateDB @close="closed" />
</v-dialog>
</div>
</template>
<script>
import EventBus from '@/api/eventBus'
import SearchService from '@/api/search.service'
import CreateDB from '@/components/dialogs/CreateDB'
export default {
components: {
CreateDB
},
inject: ['advancedSearchData'],
data () {
return {
results: [],
loading: false
loading: false,
createDbDialog: null
}
},
computed: {
roles () {
return this.$store.state.roles
},
query () {
if (!this.$route.query || !this.$route.query.q) {
return null
......@@ -62,6 +82,12 @@ export default {
return `${this.results.length} results`
}
return `${this.results.length} result`
},
canCreateDatabase () {
if (!this.roles) {
return false
}
return this.roles.includes('create-database')
}
},
watch: {
......@@ -229,11 +255,11 @@ export default {
if (this.isDatabase(item)) {
return `/database/${item.id}`
} else if (this.isTable(item)) {
return `/database/${item.databaseId}/table/${item.id}`
return `/database/${item.database_id}/table/${item.id}`
} else if (this.isView(item)) {
return `/database/${item.vdbid}/view/${item.id}`
return `/database/${item.database_id}/view/${item.id}`
} else if (this.isColumn(item)) {
return `/database/${item.cdbid}/table/${item.tid}`
return `/database/${item.database_id}/table/${item.table_id}`
} else if (this.isIdentifier(item)) {
return `/pid/${item.id}`
} else if (this.isConcept(item) || this.isUnit(item)) {
......@@ -270,6 +296,12 @@ export default {
tags.push({ text: 'Concept' })
}
return tags
},
closed (event) {
this.createDbDialog = false
if (event.success) {
this.$router.push('/database?f=my')
}
}
}
}
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment