diff --git a/dbrepo-data-service/rest-service/src/main/resources/application.yml b/dbrepo-data-service/rest-service/src/main/resources/application.yml index 6684368fb250cdd4323278d329c5ce1fc2845d67..32eb758b4bae631858ba39b9edb3348fa3459202 100644 --- a/dbrepo-data-service/rest-service/src/main/resources/application.yml +++ b/dbrepo-data-service/rest-service/src/main/resources/application.yml @@ -69,7 +69,7 @@ dbrepo: client: "${AUTH_SERVICE_CLIENT:dbrepo-client}" clientSecret: "${AUTH_SERVICE_CLIENT_SECRET:MUwRc7yfXSJwX8AdRMWaQC3Nep1VjwgG}" sql: - forbidden: "${NOT_SUPPORTED_KEYWORDS:\\*,AVG,BIT_AND,BIT_OR,BIT_XOR,COUNT,COUNTDISTINCT,GROUP_CONCAT,JSON_ARRAYAGG,JSON_OBJECTAGG,MAX,MIN,STD,STDDEV,STDDEV_POP,STDDEV_SAMP,SUM,VARIANCE,VAR_POP,VAR_SAMP,--}" + forbidden: "${NOT_SUPPORTED_KEYWORDS:AVG,BIT_AND,BIT_OR,BIT_XOR,COUNT,COUNTDISTINCT,GROUP_CONCAT,JSON_ARRAYAGG,JSON_OBJECTAGG,MAX,MIN,STD,STDDEV,STDDEV_POP,STDDEV_SAMP,SUM,VARIANCE,VAR_POP,VAR_SAMP,--}" grant: default: read: "${GRANT_DEFAULT_READ:SELECT}" diff --git a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/SubsetEndpointUnitTest.java b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/SubsetEndpointUnitTest.java index 9ab7082d0eb40da175947314c13b669de9f02476..531f8a387c78cc808adff4b3dcdcec1b4dcc0df1 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/SubsetEndpointUnitTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/SubsetEndpointUnitTest.java @@ -270,7 +270,7 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { @WithMockUser(username = USER_1_USERNAME, authorities = {"execute-query"}) public void create_forbiddenKeyword_fails() { final ExecuteStatementDto request = ExecuteStatementDto.builder() - .statement("SELECT * FROM tbl") + .statement("SELECT COUNT(id) FROM tbl") .build(); /* test */ diff --git a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/SubsetServiceIntegrationTest.java b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/SubsetServiceIntegrationTest.java index b33a76506c15b77df3e0243754ca57b6dfcd9ed4..dd36d2eb8f4cc3f1861c95e94118d659876dab04 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/SubsetServiceIntegrationTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/SubsetServiceIntegrationTest.java @@ -11,12 +11,8 @@ import at.tuwien.exception.*; import at.tuwien.gateway.DataDatabaseSidecarGateway; import at.tuwien.gateway.MetadataServiceGateway; import at.tuwien.test.AbstractUnitTest; -import at.tuwien.utils.FileUtils; -import com.google.common.hash.Hashing; import lombok.extern.log4j.Log4j2; import org.apache.commons.lang3.RandomStringUtils; -import org.apache.commons.lang3.RandomUtils; -import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -28,11 +24,8 @@ import org.testcontainers.containers.MariaDBContainer; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.io.File; import java.io.IOException; -import java.io.InputStream; import java.math.BigInteger; -import java.nio.charset.Charset; import java.sql.SQLException; import java.time.Instant; import java.util.List; diff --git a/dbrepo-metadata-db/1_setup-schema.sql b/dbrepo-metadata-db/1_setup-schema.sql index b6b3b7bf89a8140950f1bf11768911bcc9fb6977..ad240f6c9ba1b1870097c4d04f30505804be94b0 100644 --- a/dbrepo-metadata-db/1_setup-schema.sql +++ b/dbrepo-metadata-db/1_setup-schema.sql @@ -535,6 +535,18 @@ CREATE TABLE IF NOT EXISTS `mdb_image_types` UNIQUE (value) ) WITH SYSTEM VERSIONING; +CREATE TABLE IF NOT EXISTS `mdb_image_operators` +( + id SERIAL, + image_id BIGINT UNSIGNED NOT NULL, + display_name varchar(255) NOT NULL, + value varchar(255) NOT NULL, + documentation TEXT NOT NULL, + PRIMARY KEY (id), + FOREIGN KEY (image_id) REFERENCES `mdb_images` (`id`), + UNIQUE (value) +) WITH SYSTEM VERSIONING; + COMMIT; BEGIN; @@ -619,6 +631,37 @@ VALUES (1, 'BIGINT(size)', 'bigint', 0, null, null, false, 1, null, null, null, (1, 'VARCHAR(size)', 'varchar', 0, 65532, 255, true, null, null, null, null, null, null, null, null, 'https://mariadb.com/kb/en/varchar/', false, true, false); +INSERT INTO `mdb_image_operators` (image_id, display_name, value, documentation) +VALUES (1, 'Equal operator', '=', 'https://mariadb.com/kb/en/assignment-operators-assignment-operator/'), + (1, 'NULL-safe equal operator', '<=>', 'https://mariadb.com/kb/en/null-safe-equal/'), + (1, 'Less-than operator', '<', 'https://mariadb.com/kb/en/less-than/'), + (1, 'Less than or equal operator', '<=', 'https://mariadb.com/kb/en/less-than-or-equal/'), + (1, 'Greater-than operator', '>', 'https://mariadb.com/kb/en/greater-than/'), + (1, 'Greater than or equal operator', '>=', 'https://mariadb.com/kb/en/greater-than-or-equal/'), + (1, 'Not equal operator', '!=', 'https://mariadb.com/kb/en/not-equal/'), + (1, 'Addition operator', '+', 'https://mariadb.com/kb/en/addition-operator/'), + (1, 'Division operator', '/', 'https://mariadb.com/kb/en/division-operator/'), + (1, 'Modulo operator', '%', 'https://mariadb.com/kb/en/modulo-operator/'), + (1, 'Multiplication operator', '*', 'https://mariadb.com/kb/en/multiplication-operator/'), + (1, 'Subtraction operator', '-', 'https://mariadb.com/kb/en/subtraction-operator-/'), + (1, 'LIKE', 'LIKE', 'https://mariadb.com/kb/en/like/'), + (1, 'NOT LIKE', 'NOT LIKE', 'https://mariadb.com/kb/en/not-like/'), + (1, 'IN', 'IN', 'https://mariadb.com/kb/en/in/'), + (1, 'NOT IN', 'NOT IN', 'https://mariadb.com/kb/en/not-in/'), + (1, 'IS', 'IS', 'https://mariadb.com/kb/en/is/'), + (1, 'IS NOT', 'IS NOT', 'https://mariadb.com/kb/en/is-not/'), + (1, 'IS NOT NULL', 'IS NOT NULL', 'https://mariadb.com/kb/en/is-not-null/'), + (1, 'IS NULL', 'IS NULL', 'https://mariadb.com/kb/en/is-null/'), + (1, 'ISNULL', 'ISNULL', 'https://mariadb.com/kb/en/isnull/'), + (1, 'REGEXP', 'REGEXP', 'https://mariadb.com/kb/en/regexp/'), + (1, 'NOT REGEXP', 'NOT REGEXP', 'https://mariadb.com/kb/en/not-regexp/'), + (1, 'Bitwise AND', '&', 'https://mariadb.com/kb/en/bitwise_and/'), + (1, 'Bitwise OR', '|', 'https://mariadb.com/kb/en/bitwise-or/'), + (1, 'Bitwise XOR', '^', 'https://mariadb.com/kb/en/bitwise-xor/'), + (1, 'Bitwise NOT', '~', 'https://mariadb.com/kb/en/bitwise-not/'), + (1, 'Left shift', '<<', 'https://mariadb.com/kb/en/shift-left/'), + (1, 'Right shift', '>>', 'https://mariadb.com/kb/en/shift-right/'); + INSERT INTO `mdb_ontologies` (prefix, uri, uri_pattern, sparql_endpoint, rdf_path) VALUES ('om', 'http://www.ontology-of-units-of-measure.org/resource/om-2/', diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/image/ImageDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/image/ImageDto.java index 743f1f2b0a8ab67795a58b060d6ef30597d36837..ea47c51e477e45359598076478fdce87b6c3ddc3 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/image/ImageDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/image/ImageDto.java @@ -61,4 +61,7 @@ public class ImageDto { @JsonProperty("data_types") private List<DataTypeDto> dataTypes; + @NotNull + private List<OperatorDto> operators; + } diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/image/OperatorDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/image/OperatorDto.java new file mode 100644 index 0000000000000000000000000000000000000000..a954bf4a61d52a1d4ee3063cf7187f8865969554 --- /dev/null +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/image/OperatorDto.java @@ -0,0 +1,32 @@ +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; +import lombok.*; +import lombok.extern.jackson.Jacksonized; + +@Getter +@Setter +@Builder +@NoArgsConstructor +@AllArgsConstructor +@Jacksonized +@ToString +public class OperatorDto { + + @NotBlank + @JsonProperty("display_name") + @Schema(example = "XOR") + private String displayName; + + @NotBlank + @Schema(example = "XOR") + private String value; + + @NotNull + @Schema(example = "https://mariadb.com/kb/en/xor/") + private String documentation; + +} diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/container/image/ContainerImage.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/container/image/ContainerImage.java index 080a843aada9982608cb534c0e24027439e9d9c0..4a9e9a4b9f6a6552c1b4f8342da3248006e7ad34 100644 --- a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/container/image/ContainerImage.java +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/container/image/ContainerImage.java @@ -71,7 +71,11 @@ public class ContainerImage { private Instant lastModified; @ToString.Exclude - @OneToMany(fetch = FetchType.LAZY, mappedBy = "image") + @OneToMany(fetch = FetchType.LAZY, cascade = {CascadeType.ALL, CascadeType.PERSIST}, mappedBy = "image") private List<DataType> dataTypes; + @ToString.Exclude + @OneToMany(fetch = FetchType.LAZY, cascade = {CascadeType.ALL, CascadeType.PERSIST}, mappedBy = "image") + private List<Operator> operators; + } diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/container/image/DataType.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/container/image/DataType.java index a98da8d530e550cd12546d3bdfed8ad383461964..47872da89036300ed6ec9970821a77580322b630 100644 --- a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/container/image/DataType.java +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/container/image/DataType.java @@ -68,7 +68,8 @@ public class DataType { @Column(name = "is_buildable", nullable = false) private Boolean buildable; - @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.ALL, CascadeType.PERSIST}) + @ToString.Exclude + @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.MERGE}) @JoinColumns({ @JoinColumn(name = "image_id", referencedColumnName = "id") }) diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/container/image/Operator.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/container/image/Operator.java new file mode 100644 index 0000000000000000000000000000000000000000..418d54cb6446670123aa2b2acd4ed6e7b01e3ccc --- /dev/null +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/container/image/Operator.java @@ -0,0 +1,42 @@ +package at.tuwien.entities.container.image; + +import jakarta.persistence.*; +import lombok.*; +import org.hibernate.annotations.GenericGenerator; +import org.springframework.data.jpa.domain.support.AuditingEntityListener; + +@Data +@Entity +@Builder +@ToString +@AllArgsConstructor +@NoArgsConstructor +@EntityListeners(AuditingEntityListener.class) +@EqualsAndHashCode(onlyExplicitlyIncluded = true) +@Table(name = "mdb_image_operators") +public class Operator { + + @Id + @EqualsAndHashCode.Include + @GeneratedValue(generator = "image-type-sequence") + @GenericGenerator(name = "image-type-sequence", strategy = "increment") + @Column(updatable = false, nullable = false) + public Long id; + + @Column(name = "display_name", nullable = false) + private String displayName; + + @Column(name = "value", nullable = false, unique = true) + private String value; + + @Column(nullable = false) + private String documentation; + + @ToString.Exclude + @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.MERGE}) + @JoinColumns({ + @JoinColumn(name = "image_id", referencedColumnName = "id") + }) + private ContainerImage image; + +} diff --git a/dbrepo-metadata-service/test/src/main/java/at/tuwien/test/AbstractUnitTest.java b/dbrepo-metadata-service/test/src/main/java/at/tuwien/test/AbstractUnitTest.java index 3ab89a39051326901f9b4029689bf4be82bd177f..8e613cfa7cad69c2de42d96ccacee6957e5f7939 100644 --- a/dbrepo-metadata-service/test/src/main/java/at/tuwien/test/AbstractUnitTest.java +++ b/dbrepo-metadata-service/test/src/main/java/at/tuwien/test/AbstractUnitTest.java @@ -9,6 +9,7 @@ import java.util.List; public abstract class AbstractUnitTest extends BaseTest { public void genesis() { + IMAGE_1.setOperators(new LinkedList<>(IMAGE_1_OPERATORS)); CONTAINER_1.setDatabases(new LinkedList<>(List.of(DATABASE_1, DATABASE_2, DATABASE_3))); CONTAINER_4.setDatabases(new LinkedList<>(List.of(DATABASE_4))); /* USER_1 */ diff --git a/dbrepo-metadata-service/test/src/main/java/at/tuwien/test/BaseTest.java b/dbrepo-metadata-service/test/src/main/java/at/tuwien/test/BaseTest.java index c6c0e4ec10150224ee4c21c6a1bf582649ba941e..767697c1e2abc9b1f409320c2fac763c38fc4138 100644 --- a/dbrepo-metadata-service/test/src/main/java/at/tuwien/test/BaseTest.java +++ b/dbrepo-metadata-service/test/src/main/java/at/tuwien/test/BaseTest.java @@ -63,6 +63,7 @@ import at.tuwien.api.user.*; import at.tuwien.api.user.internal.UpdateUserPasswordDto; import at.tuwien.entities.container.Container; import at.tuwien.entities.container.image.ContainerImage; +import at.tuwien.entities.container.image.Operator; import at.tuwien.entities.database.*; import at.tuwien.entities.database.table.Table; import at.tuwien.entities.database.table.columns.TableColumn; @@ -953,6 +954,15 @@ public abstract class BaseTest { .isDefault(IMAGE_1_IS_DEFAULT) .build(); + public final static List<Operator> IMAGE_1_OPERATORS = List.of( + Operator.builder() + .id(1L) + .image(IMAGE_1) + .displayName("XOR") + .value("XOR") + .documentation("https://mariadb.com/kb/en/xor/") + .build()); + public final static Long CONTAINER_1_ID = 1L; public final static ContainerImage CONTAINER_1_IMAGE = IMAGE_1; public final static ImageDto CONTAINER_1_IMAGE_DTO = IMAGE_1_DTO; diff --git a/dbrepo-ui/components/subset/Builder.vue b/dbrepo-ui/components/subset/Builder.vue index a6f53c6e4f0dba0ef1f8935c9112dc1e2d1d0df2..3a3cd3a142dce81172d23d1ee979515514c0326a 100644 --- a/dbrepo-ui/components/subset/Builder.vue +++ b/dbrepo-ui/components/subset/Builder.vue @@ -44,7 +44,7 @@ v-if="isView" class="mt-1" dense> - <v-col md="8"> + <v-col lg="8"> <v-text-field v-model="view.name" :disabled="isExecuted" @@ -74,7 +74,7 @@ <v-row v-if="isView" dense> - <v-col md="8"> + <v-col lg="8"> <v-select v-model="view.is_public" :items="visibilities" @@ -95,7 +95,7 @@ <v-window-item value="0"> <v-row dense> - <v-col md="4"> + <v-col lg="4"> <v-select v-model="table" :disabled="isExecuted" @@ -109,7 +109,7 @@ :hint="$t('pages.view.subpages.create.table.hint')" :rules="[v => !!v || $t('validation.required')]" /> </v-col> - <v-col md="4"> + <v-col lg="4"> <v-select v-model="select" item-title="internal_name" @@ -143,7 +143,7 @@ </v-col> </v-row> <v-row v-if="select.length > 0"> - <v-col md="8"> + <v-col lg="8"> <v-btn v-if="clauses.length === 0" size="small" @@ -157,15 +157,15 @@ <div class="mb-5"> <v-row v-if="clauses.length > 0"> <v-col - md="8" + lg="8" class="text-center"> - <pre>WHERE</pre> + <pre>FILTER</pre> </v-col> </v-row> <div v-for="(clause, idx) in clauses" :key="idx"> <v-row v-if="clause.type === 'where'"> - <v-col md="3"> + <v-col lg="3"> <v-select v-model="clause.params[0]" :disabled="clausesDisabled" @@ -177,16 +177,36 @@ :hint="$t('pages.subset.subpages.create.filter.column.hint')" :items="select" /> </v-col> - <v-col md="1"> + <v-col lg="2"> <v-select v-model="clause.params[1]" :disabled="clausesDisabled" + item-title="value" + item-value="value" persistent-hint - :label="$t('pages.subset.subpages.create.filter.operator.label')" - :hint="$t('pages.subset.subpages.create.filter.operator.hint')" - :items="operators" /> + :label="operatorHint(clause.params[1])" + :hint="$t('pages.subset.subpages.create.filter.operator.label')" + :items="operators"> + <template + v-slot:append> + <NuxtLink + target="_blank" + :href="documentationLink(clause.params[1])"> + <v-tooltip + location="bottom"> + <template + v-slot:activator="{ props }"> + <v-icon + v-bind="props" + icon="mdi-help-circle-outline" /> + </template> + {{ $t('navigation.help') }} + </v-tooltip> + </NuxtLink> + </template> + </v-select> </v-col> - <v-col md="3"> + <v-col lg="3"> <v-text-field v-model="clause.params[2]" :disabled="clausesDisabled" @@ -194,7 +214,7 @@ :label="$t('pages.subset.subpages.create.filter.value.label')" :hint="$t('pages.subset.subpages.create.filter.value.hint')" /> </v-col> - <v-col md="1"> + <v-col lg="1"> <v-btn :disabled="clausesDisabled" class="mt-4" @@ -208,7 +228,7 @@ <v-row v-else> <v-col - md="8" + lg="8" class="text-center"> <pre>{{ clause.type.toUpperCase() }}</pre> </v-col> @@ -308,48 +328,6 @@ export default { { title: this.$t('toolbars.database.public'), value: true }, { title: this.$t('toolbars.database.private'), value: false }, ], - operators: [ - '=', - '<', - '>', - '<=', - '>=', - '<>', - '!=', - 'like', - 'not like', - 'between', - 'not between', - 'ilike', - 'not ilike', - 'exists', - 'not exist', - 'rlike', - 'not rlike', - 'regexp', - 'not regexp', - 'match', - '&', - '|', - '^', - '<<', - '>>', - '~', - '~=', - '~*', - '!~', - '!~*', - '#', - '&&', - '@>', - '<@', - '||', - '&<', - '&>', - '-|-', - '@@', - '!!' - ], tableDetails: null, resultId: null, valid: false, @@ -375,6 +353,12 @@ export default { columnNames () { return this.columns && this.columns.map(s => s.internal_name) }, + operators () { + if (!this.database) { + return [] + } + return this.database.container.image.operators + }, columns () { if (!this.table) { return [] @@ -451,13 +435,13 @@ export default { return true } } - return false + return this.sql.includes(';') }, canExecute () { if (this.isView) { return this.view.name !== null && this.view.is_public !== null && this.view.query !== null } - return this.query.raw !== null + return this.sql !== null && !this.sql.includes(';') }, inputVariant () { const runtimeConfig = useRuntimeConfig() @@ -523,13 +507,13 @@ export default { await this.$router.push(`/database/${this.$route.params.database_id}/subset/${subset.id}/data`) this.loadingQuery = false }) - .catch(({code}) => { + .catch(({code, message}) => { this.loadingQuery = false const toast = useToastInstance() if (typeof code !== 'string') { return } - toast.error(this.$t(code)) + toast.error(`${this.$t(code)}: ${message}`) }) }, createView () { @@ -618,6 +602,20 @@ export default { } else { this.select = [] } + }, + documentationLink (value) { + const filter = this.operators.filter(o => o.value === value) + if (filter.length !== 1) { + return null + } + return filter[0].documentation + }, + operatorHint (value) { + const filter = this.operators.filter(o => o.value === value) + if (filter.length !== 1) { + return null + } + return filter[0].display_name } } } diff --git a/dbrepo-ui/dto/index.ts b/dbrepo-ui/dto/index.ts index 74b3911764fbd3da5d41d5d72cd269d79ee3963d..7658b4d1715af0b26d0b43bfd16493c84a02d391 100644 --- a/dbrepo-ui/dto/index.ts +++ b/dbrepo-ui/dto/index.ts @@ -75,18 +75,18 @@ interface ImageDto { version: string; dialect: string; driver_class: string; - date_formats: ImageDateDto[]; + data_types: DataTypeDto[]; + operators: OperatorDto[]; jdbc_method: string; default_port: number; } -interface ImageDateDto { +interface OperatorDto { id: number; - example: string; - database_format: string; - unix_format: string; - has_time: boolean; - created_at: Date; + image_id: number; + display_name: string; + documentation: string; + value: string; } interface TableBriefDto { diff --git a/dbrepo-ui/locales/en-US.json b/dbrepo-ui/locales/en-US.json index 3a3846e2efdb70cb02793834c3e018ea9c189f08..af39cb9bee8977e20117d032a9ae4e98a1963f48 100644 --- a/dbrepo-ui/locales/en-US.json +++ b/dbrepo-ui/locales/en-US.json @@ -920,17 +920,17 @@ "query": { "title": "Query" }, - "query-hash": { - "prefix": "sha256", - "title": "Query Hash" + "hash": { + "title": "Hash", + "prefix": "sha256" }, "executed": { "title": "Created" }, - "result-hash": { - "title": "Result Hash" + "result": { + "title": "Result" }, - "result-rows": { + "rows": { "title": "Result Rows" }, "tabs": { @@ -946,7 +946,7 @@ }, "expert": { "text": "Expert", - "warn": "It is not recommended to use comments, aggregation functions and the following operations" + "warn": "It is not recommended to use comments, aggregation functions, the semicolon and the following operations" }, "name": { "label": "" diff --git a/dbrepo-ui/nuxt.config.ts b/dbrepo-ui/nuxt.config.ts index 8def4012d992f9f998969ec2b247398706ec5db4..9291fb597d27c2d3e39d226a6b6a89bc638528b5 100644 --- a/dbrepo-ui/nuxt.config.ts +++ b/dbrepo-ui/nuxt.config.ts @@ -86,7 +86,7 @@ export default defineNuxtConfig({ prefix: '/' }, database: { - unsupported: '*,AVG,BIT_AND,BIT_OR,BIT_XOR,COUNT,COUNTDISTINCT,GROUP_CONCAT,JSON_ARRAYAGG,JSON_OBJECTAGG,MAX,MIN,STD,STDDEV,STDDEV_POP,STDDEV_SAMP,SUM,VARIANCE,VAR_POP,VAR_SAMP,--', + unsupported: 'AVG,BIT_AND,BIT_OR,BIT_XOR,COUNT,COUNTDISTINCT,GROUP_CONCAT,JSON_ARRAYAGG,JSON_OBJECTAGG,MAX,MIN,STD,STDDEV,STDDEV_POP,STDDEV_SAMP,SUM,VARIANCE,VAR_POP,VAR_SAMP,--', image: { width: 200, height: 200 diff --git a/dbrepo-ui/pages/database/[database_id]/subset/[subset_id]/info.vue b/dbrepo-ui/pages/database/[database_id]/subset/[subset_id]/info.vue index 01620ea35eebf78969c6353b9ccaa0e7e9fdfb05..0d59b1ed25e405db59c50e3f492d9122f9fbf5ae 100644 --- a/dbrepo-ui/pages/database/[database_id]/subset/[subset_id]/info.vue +++ b/dbrepo-ui/pages/database/[database_id]/subset/[subset_id]/info.vue @@ -50,9 +50,9 @@ <pre>{{ subset.query }}</pre> </v-list-item> <v-list-item - :title="$t('pages.subset.query-hash.title')" + :title="`${$t('pages.subset.query.title')} ${$t('pages.subset.hash.title')}`" density="compact"> - <pre>{{ $t('pages.subset.query-hash.prefix') }}{{ subset.query_hash }}</pre> + <pre>{{ $t('pages.subset.hash.prefix') }}:{{ subset.query_hash }}</pre> </v-list-item> <v-list-item v-if="executionUTC" @@ -61,9 +61,9 @@ {{ executionUTC }} </v-list-item> <v-list-item - :title="$t('pages.subset.result-hash.title')" + :title="`${$t('pages.subset.result.title')} ${$t('pages.subset.hash.title')}`" density="compact"> - <pre>{{ result_hash }}</pre> + <pre>{{ $t('pages.subset.hash.prefix') }}:{{ result_hash }}</pre> </v-list-item> <v-list-item :title="$t('pages.subset.result-rows.title')" @@ -215,7 +215,7 @@ export default { if (!this.subset.result_hash) { return '(none)' } - return `sha256:${this.subset.result_hash}` + return this.subset.result_hash }, publisher () { if (this.database.publisher === null) {