Skip to content
Snippets Groups Projects
Verified Commit e2eb7dc6 authored by Martin Weise's avatar Martin Weise
Browse files

Added catch() on all loading functions and updated logo

parent 0cfec386
No related branches found
No related tags found
3 merge requests!231CI: Remove build for log-service,!228Better error message handling in the frontend,!223Release of version 1.4.0
Showing
with 110 additions and 50 deletions
......@@ -22,7 +22,7 @@ helm upgrade --install dbrepo \
Our chart depends on seven other charts which will be automatically resolved when installing our `dbrepo-core` chart:
* Keycloak (Bitnami, v17.3.3) for [Authentication Service](../system-services-authentication)
* MariaDB Galera (Bitnami, v10.1.3) for [Data Database](../system-databases-data) & [Metadata Database](../system-databases-metadata)
* MariaDB Galera (Bitnami, v11.0.1) for [Data Database](../system-databases-data) & [Metadata Database](../system-databases-metadata)
* SeaweedFS (SeaweedFS, v3.59.4) for [Storage Service](../system-services-storage)
* OpenSearch (OpenSearch Project, v2.16.0) for [Search Database](../system-databases-search)
* OpenSearch Dashboards (OpenSearch Project, v2.14.0) for [Search Dashboard](../system-other-search-dashboard)
......
......@@ -26,6 +26,27 @@ curl \
-d '{"name": "Data Database 2", "imageId": 1, "host": "example.com", "port": 3306, "privilegedUsername": "root", "privilegedPassword": "s3cr3t" }'
```
### Settings
The procedures require the user-generated databases to have the same collation (because of comparison operations).
Ensure that the Data Database has the character set `utf8mb4` and collation `utf8mb4_general_ci` in your `my.cfg`:
```ini
[mysqld]
character_set_server=utf8mb4
collation_server=utf8mb4_general_ci
```
We observed this unexpected behavior for
the [MariaDB Galera chart](https://artifacthub.io/packages/helm/bitnami/mariadb-galera) powered by Bitnami and had to
set extra flags. We could not observe this behavior with
the [MariaDB Galera container image](https://hub.docker.com/r/bitnami/mariadb-galera) itself.
```yaml
mariadb-galera:
extraFlags: "--character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci"
```
### Sidecar
We deploy a sidecar that handles the CSV-file upload/download operations between
......@@ -44,7 +65,7 @@ Export all databases with `--skip-lock-tables` option for MariaDB Galera cluster
MariaDB Galera.
```console
mysqldump \
mariadb \
-u <privilegedUsername> \
-p<privilegedPassword> \
--complete-insert \
......@@ -56,7 +77,7 @@ mysqldump \
### Restore
```console
mysql \
mariadb \
-u <privilegedUsername> \
-p<privilegedPassword> < dump.sql
```
......
package at.tuwien.api.container.image;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
......@@ -31,4 +32,10 @@ public class ImageBriefDto {
@Schema(example = "10.5")
private String version;
@NotBlank
@JsonProperty("jdbc_method")
@Field(name = "jdbc_method")
@Schema(example = "mariadb")
private String jdbcMethod;
}
......@@ -28,7 +28,7 @@ public interface StoreMapper {
/* timestamp */
if (data.getTimestamp() == null) {
data.setTimestamp(Instant.now());
log.trace("timestamp=null, set to {}", data.getTimestamp());
log.trace("timestamp is null: set timestamp to {}", data.getTimestamp());
}
try {
final CallableStatement ps = connection.prepareCall(statement);
......@@ -39,11 +39,10 @@ public interface StoreMapper {
ps.setTimestamp(3, Timestamp.from(data.getTimestamp()));
log.trace("param 3={}", Timestamp.from(data.getTimestamp()));
ps.registerOutParameter(4, Types.BIGINT);
log.trace("out param 4={}", Types.BIGINT);
return ps;
} catch (SQLException e) {
log.error("failed to prepare statement {}, reason: {}", statement, e.getMessage());
throw new QueryStoreException("Failed to prepare statement", e);
log.error("failed to prepare statement {}: {}", statement, e.getMessage());
throw new QueryStoreException("Failed to prepare statement '" + statement + "'", e);
}
}
......
......@@ -135,6 +135,9 @@ export default {
.then((subset) => {
this.subset = subset
})
.catch(() => {
this.loadingSave = false
})
.finally(() => {
this.loadingSave = false
})
......@@ -145,6 +148,9 @@ export default {
.then((subset) => {
this.subset = subset
})
.catch(() => {
this.loading = false
})
.finally(() => {
this.loading = false
})
......@@ -160,6 +166,9 @@ export default {
document.body.appendChild(link)
link.click()
})
.catch(() => {
this.downloadLoading = false
})
.finally(() => {
this.downloadLoading = false
})
......
......@@ -10,6 +10,9 @@
"icon": {
"path": "/favicon.ico"
},
"appleTouchIcon": {
"path": "/apple-touch-icon.png"
},
"api": {
"useSsl": false
},
......
......@@ -51,7 +51,8 @@ export default {
title: config.title,
meta,
link: [
{ rel: 'icon', type: 'image/x-icon', href: config.icon.path }
{ rel: 'icon', type: 'image/x-icon', href: config.icon.path },
{ rel: 'apple-touch-icon', sizes: '180x180', href: config.appleTouchIcon.path }
]
},
......
......@@ -41,7 +41,6 @@
"jwt-decode": "^3.1.2",
"knex": "^0.95.6",
"lodash": "^4.17.21",
"minio": "7.0.18",
"moment": "^2.29.1",
"multer": "^1.4.2",
"node-fetch": "^2.6.1",
......
......@@ -19,41 +19,25 @@
<v-list-item-title>
Database Visibility
</v-list-item-title>
<v-list-item-content>
<v-skeleton-loader v-if="loading" type="text" class="skeleton-small" />
<span v-if="!loading">{{ database.is_public ? 'Public' : 'Private' }}</span>
</v-list-item-content>
<v-list-item-content v-if="!loading" v-text="`${database.is_public ? 'Public' : 'Private'}`" />
<v-list-item-title class="mt-2">
Database Internal Name
</v-list-item-title>
<v-list-item-content>
<v-skeleton-loader v-if="loading" type="text" class="skeleton-small" />
<span v-if="!loading">{{ internal_name }}</span>
</v-list-item-content>
<v-list-item-content v-if="!loading" v-text="internal_name" />
<v-list-item-title class="mt-2">
Database Creator
</v-list-item-title>
<v-list-item-content>
<v-skeleton-loader v-if="loading" type="text" class="skeleton-small" />
<span v-if="!loading">
{{ creator }} <sup v-if="creatorVerified">
<v-icon color="primary" title="E-Mail verified" small>mdi-check-decagram</v-icon>
</sup>
</span>
</v-list-item-content>
<v-list-item-content v-if="!loading" v-text="creator" />
<v-list-item-title class="mt-2">
Database Creation
</v-list-item-title>
<v-list-item-content>
<v-skeleton-loader v-if="loading" type="text" class="skeleton-small" />
<span v-if="!loading" v-text="createdUTC" />
</v-list-item-content>
<v-list-item-content v-if="!loading" v-text="createdUTC" />
<v-list-item-title v-if="access && access.type" class="mt-2">
Database Access
</v-list-item-title>
<v-list-item-content v-if="access && access.type">
<span>
<v-badge v-if="databaseExtraInfo" inline :content="databaseExtraInfo" color="primary">
<v-badge v-if="databaseExtraInfo" inline :content="databaseExtraInfo" color="secondary">
<span v-text="accessDescription.text" />
</v-badge>
<span v-else v-text="accessDescription.text" />
......@@ -86,31 +70,19 @@
<v-list-item-title class="mt-2">
Container Name
</v-list-item-title>
<v-list-item-content>
<v-skeleton-loader v-if="loading" type="text" class="skeleton-small" />
<span v-if="!loading" v-text="container_name" />
</v-list-item-content>
<v-list-item-content v-if="!loading" v-text="container_name" />
<v-list-item-title class="mt-2">
Container Internal Name
</v-list-item-title>
<v-list-item-content>
<v-skeleton-loader v-if="loading" type="text" class="skeleton-small" />
<span v-if="!loading" v-text="container_internal_name" />
</v-list-item-content>
<v-list-item-content v-if="!loading" v-text="container_internal_name" />
<v-list-item-title class="mt-2">
Image Name
</v-list-item-title>
<v-list-item-content>
<v-skeleton-loader v-if="loading" type="text" class="skeleton-small" />
<span v-if="!loading" v-text="image_name" />
</v-list-item-content>
<v-list-item-content v-if="!loading" v-text="image_name" />
<v-list-item-title class="mt-2">
Image Version
</v-list-item-title>
<v-list-item-content>
<v-skeleton-loader v-if="loading" type="text" class="skeleton-small" />
<span v-if="!loading" v-text="image_version" />
</v-list-item-content>
<v-list-item-content v-if="!loading" v-text="image_version" />
</v-list-item-content>
</v-list-item>
</v-list>
......@@ -244,7 +216,7 @@ export default {
},
jdbcString () {
const flags = this.database.container.ui_additional_flags ? this.database.container.ui_additional_flags : ''
return `jdbc://${this.database.container.ui_host}:${this.database.container.ui_port}/${this.database.internal_name}${flags} (username=${this.user.username}, password=yourpassword)`
return `jdbc:${this.database.container.image.jdbc_method}://${this.database.container.ui_host}:${this.database.container.ui_port}/${this.database.internal_name}${flags} (username=${this.user.username}, password=yourpassword)`
},
databaseExtraInfo () {
return this.$config.databaseExtraInfo
......
......@@ -64,6 +64,9 @@ export default {
this.subset = subset
this.loadResult()
})
.catch(() => {
this.loadingSubset = false
})
.finally(() => {
this.loadingSubset = false
})
......
......@@ -188,6 +188,9 @@ export default {
.then((subset) => {
this.subset = subset
})
.catch(() => {
this.loadingSubset = false
})
.finally(() => {
this.loadingSubset = false
})
......
......@@ -247,6 +247,9 @@ export default {
this.$toast.success('Successfully updated the database visibility')
location.reload()
})
.catch(() => {
this.loading = false
})
.finally(() => {
this.loading = false
})
......@@ -258,6 +261,9 @@ export default {
this.$toast.success('Successfully updated the database owner')
location.reload()
})
.catch(() => {
this.loading = false
})
.finally(() => {
this.loading = false
})
......@@ -278,6 +284,9 @@ export default {
.then((users) => {
this.users = users
})
.catch(() => {
this.loadingUsers = false
})
.finally(() => {
this.loadingUsers = false
})
......
......@@ -196,6 +196,9 @@ export default {
document.body.appendChild(link)
link.click()
})
.catch(() => {
this.downloadLoading = false
})
.finally(() => {
this.downloadLoading = false
})
......@@ -209,6 +212,9 @@ export default {
document.body.appendChild(link)
link.click()
})
.catch(() => {
this.downloadLoading = false
})
.finally(() => {
this.downloadLoading = false
})
......@@ -308,6 +314,9 @@ export default {
.then((count) => {
this.total = count
})
.catch(() => {
this.loadingData--
})
.finally(() => {
this.loadingData--
})
......
......@@ -205,6 +205,9 @@ export default {
this.$toast.success('Successfully imported data')
this.$router.push(`/database/${this.$route.params.database_id}/table/${this.$route.params.table_id}`)
})
.catch(() => {
this.loading = false
})
.finally(() => {
this.loading = false
})
......@@ -219,6 +222,9 @@ export default {
.then((table) => {
this.table = table
})
.catch(() => {
this.loading = false
})
.finally(() => {
this.loading = false
})
......
......@@ -41,7 +41,7 @@
</v-list-item-title>
<v-list-item-content v-if="access && access.type">
<span>
<v-badge v-if="brokerExtraInfo" inline :content="brokerExtraInfo" color="primary">
<v-badge v-if="brokerExtraInfo" inline :content="brokerExtraInfo" color="secondary">
<span v-text="accessDescription.text" />
</v-badge>
<span v-else v-text="accessDescription.text" />
......
......@@ -228,6 +228,9 @@ export default {
.then((table) => {
this.$store.commit('SET_TABLE', table)
})
.catch(() => {
this.loading = false
})
.finally(() => {
this.loading = false
})
......
......@@ -158,6 +158,9 @@ export default {
await this.$store.dispatch('reloadDatabase')
await this.$router.push(`/database/${this.databaseId}/table/${table.id}`)
})
.catch(() => {
this.loading = false
})
.finally(() => {
this.loading = false
})
......
......@@ -377,6 +377,9 @@ export default {
this.step = 4
}
})
.catch(() => {
this.loading = false
})
.finally(() => {
this.loading = false
})
......@@ -440,6 +443,7 @@ export default {
this.step = 5
})
.catch(() => {
this.loading = false
this.$refs.schema.loading = false
})
.finally(() => {
......
......@@ -88,6 +88,9 @@ export default {
this.databases = databases
console.info('Found', this.databases.length, 'database(s) with access')
})
.catch(() => {
this.loadingDatabases = false
})
.finally(() => {
this.loadingDatabases = false
})
......@@ -97,6 +100,9 @@ export default {
this.databases = databases
console.info('Found', this.databases.length, 'database(s)')
})
.catch(() => {
this.loadingDatabases = false
})
.finally(() => {
this.loadingDatabases = false
})
......
......@@ -121,6 +121,9 @@ export default {
.then((response) => {
this.results = response
})
.catch(() => {
this.loading = false
})
.finally(() => {
this.loading = false
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment