Skip to content

Commit ed97c0a

Browse files
authored
Merge pull request #443 from CrocInc/croc_repo
Croc repo
2 parents 894442c + 318bcd1 commit ed97c0a

10 files changed

Lines changed: 28 additions & 19 deletions

File tree

src/main/kotlin/com/github/mgramin/sqlboot/model/resourcetype/impl/SqlResourceType.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class SqlResourceType(
105105

106106
override fun metaData(uri: Uri): List<Metadata> {
107107
val endpoint = endpoints
108-
.filter { it.properties().containsKey("tags") && it.properties()["tags"] == "history" }
108+
.filter { it.properties().containsKey("tags") && it.properties()["tags"].toString().contains("history") }
109109
.ifEmpty { endpoints.filter { it.properties().containsKey("default") } }
110110
.ifEmpty { endpoints }
111111
.first()

src/main/kotlin/com/github/mgramin/sqlboot/sql/select/wrappers/CustomFilteredSelectQuery.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class CustomFilteredSelectQuery(
5454
"int8" -> """${it.key} = ${it.value.asBigInteger}"""
5555
"varchar","text","name" -> """${it.key} like '${it.value.asString.replace("'", "''")}'"""
5656
"timestamptz" -> """${it.key} between '${it.value.asJsonObject["start"].asString}'::timestamptz and '${it.value.asJsonObject["end"].asString}'::timestamptz"""
57-
else -> """${it.key} = '${it.value.asString.replace("'", "''")}'"""
57+
else -> """${it.key} = '${it.value.toString().replace("'", "''")}'"""
5858
}
5959
}
6060
"""select *

src/main/malewicz/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# malewicz
22

3-
A hackable GUI SQL-manager written on SQL itself
3+
# A hackable GUI SQL-manager written on SQL itself
44

55
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/1b7fb7abccda4a16a4f698f40d3bd4dc)](https://app.codacy.com/app/mgramin/malewicz?utm_source=github.com&utm_medium=referral&utm_content=sql-boot/malewicz&utm_campaign=Badge_Grade_Dashboard)
66
[![Build Status](https://travis-ci.org/sql-boot/malewicz.svg?branch=master)](https://travis-ci.org/sql-boot/malewicz)
77

8-
:warning: This project is in early stage of development and is currently available only as a demo (online or local) based on [simple Oracle sql-scripts](https://github.com/sql-boot/sql-boot-oracle).
8+
:warning: This project is in early stage of development
99

1010
Backend powered by [sql-boot](https://github.com/sql-boot/sql-boot)
1111

src/main/malewicz/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"dependencies": {
1111
"core-js": "^2.6.5",
1212
"moment": "^2.24.0",
13+
"pev2": "^0.1.20",
1314
"url-parse": "^1.4.4",
1415
"vue": "^2.6.11",
1516
"vue-ctk-date-time-picker": "^2.1.1",
@@ -19,7 +20,7 @@
1920
"vue-notification": "^1.3.16",
2021
"vue-router": "^3.0.3",
2122
"vue-sse": "^1.0.2",
22-
"vuetify": "^2.2.6",
23+
"vuetify": "^2.2.12",
2324
"vuex": "^3.0.1"
2425
},
2526
"devDependencies": {

src/main/malewicz/public/index.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@
88
<title>malewicz</title>
99
<link rel="stylesheet" href='https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900|Material+Icons'>
1010
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css">
11+
12+
<link
13+
href="https://unpkg.com/bootstrap@4.3.1/dist/css/bootstrap.min.css"
14+
rel="stylesheet"
15+
/>
16+
<link
17+
href="https://unpkg.com/font-awesome@4.7.0/css/font-awesome.css"
18+
rel="stylesheet"
19+
/>
20+
1121
</head>
1222
<body>
1323
<noscript>

src/main/malewicz/src/components/Application.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import TypesListPanel from './TypesListPanel'
3636
import ConnectionsListPanel from './ConnectionsListPanel'
3737
import ObjectsTablePanel from "./ObjectsTablePanel";
3838
import i18n from '@/plugins/i18n';
39+
import pev2 from "pev2"
3940
4041
export default {
4142
data: () => ({
@@ -51,7 +52,7 @@ export default {
5152
}),
5253
props: ['panel'],
5354
name: 'Application',
54-
components: {ObjectsTablePanel, ConnectionsListPanel, TypesListPanel },
55+
components: {ObjectsTablePanel, ConnectionsListPanel, TypesListPanel, pev2 },
5556
methods: {
5657
goHome() {
5758
return "/" + this.$store.getters.getConnections.join("|")

src/main/malewicz/src/components/CustomComponent.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@
4343
<span v-else-if="(met.type==='inet') && props.item[met.name]">
4444
{{ props.item[met.name].value }}
4545
</span>
46+
<span v-else-if="(met.type==='interval') && props.item[met.name]">
47+
{{ props.item[met.name].value }}
48+
</span>
4649
<span v-else-if="met.format==='sql'">
4750
<CodeViewComponent :code="props.item[met.name]"/>
4851
</span>

src/main/malewicz/src/components/LightObjectsTableComponent.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
:no-data-text = "this.$t('noData')"
1616
:loading-text = "this.$t('loading')"
1717
:options.sync = "options"
18-
hide-default-footer="true">
18+
:hide-default-footer=true>
1919
<template v-slot:progress>
2020
<v-progress-linear color="green" :height="10" indeterminate></v-progress-linear>
2121
</template>

src/main/malewicz/src/components/ObjectsTablePanel.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
:loading="isLoading"
1818
:options.sync = "options"
1919
:no-data-text = "this.$t('noData')"
20-
hide-default-footer
20+
:hide-default-footer = true
2121
:fixed-header = "true"
2222
:loading-text = "this.$t('loading')"
2323
class="elevation-1">
@@ -148,6 +148,8 @@ export default {
148148
this.isLoading = false
149149
}
150150
)
151+
this.options.sortBy[0] = this.$store.getters.getUri.orderby.field
152+
this.options.sortDesc[0] = this.$store.getters.getUri.orderby.ord === 'desc';
151153
},
152154
nextPage () {
153155
return this.$store.commit('nextPage')

src/main/malewicz/src/store/store.js

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,6 @@ export const store = new Vuex.Store({
8383
},
8484
getConnections: state => {
8585
return state.uri.connections
86-
/*let defaultConnection = state.allConnections.find(v => {
87-
return v.properties.default === true
88-
})
89-
if (state.uri.connections.length === 0) {
90-
return Object.values(defaultConnection)
91-
} else {
92-
return state.uri.connections
93-
}*/
9486
},
9587
getFilter: state => {
9688
return state.uri.filter
@@ -126,12 +118,12 @@ export const store = new Vuex.Store({
126118
return v.name === type
127119
})
128120
const defaultSort = meta.metadata.filter(v => {
129-
return v.sort
121+
return v.default_sort
130122
}).map(v => v.name)[0]
131123
if (defaultSort) {
132124
const sortType = meta.metadata.filter(v => {
133-
return v.sort
134-
})[0].sort
125+
return v.default_sort
126+
})[0].default_sort
135127
state.uri = {
136128
connections: c,
137129
type: type,

0 commit comments

Comments
 (0)