Skip to content

Commit 63627fb

Browse files
ia-beklundJoshlhapaul-griffith
authored
Add QuestDB Tool to Kindling (#314)
Co-authored-by: Joshua Hansen <[email protected]> Co-authored-by: Paul Griffith <[email protected]>
1 parent e764c65 commit 63627fb

File tree

22 files changed

+530
-133
lines changed

22 files changed

+530
-133
lines changed

NOTICES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,5 @@ This repository incorporates material as listed below or described in the code.
2828

2929
### Assets
3030
- BoxIcons - MIT License - https://boxicons.com/usage#license
31+
- QuestDB - CC by SA 4.0 - https://en.wikipedia.org/wiki/File:Questdb-logo.svg
32+
- Modifications: Monochrome version of original, redistributed CC-by-SA

build.gradle.kts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ dependencies {
3333
isTransitive = false
3434
}
3535
api(libs.jfreechart)
36+
api(libs.questdb)
3637
api(libs.rsyntaxtextarea)
3738
api(libs.bundles.jackson)
3839
runtimeOnly(libs.bundles.ia.transitive)
39-
4040
testImplementation(libs.bundles.kotest)
4141
}
4242

@@ -103,6 +103,11 @@ kotlin {
103103
resources.srcDir(javadocDirectory)
104104
}
105105
}
106+
compilerOptions {
107+
freeCompilerArgs.addAll(
108+
"-Xcontext-parameters",
109+
)
110+
}
106111
}
107112

108113
spotless {

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
version=1.4.1-SNAPSHOT
22
org.gradle.jvmargs=-Xmx2G
33
org.gradle.caching=true
4+

gradle/libs.versions.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ ia-jython = { module = "org.python:jython-ia", version = "2.7.3.5" }
6060
kotest-junit = { group = "io.kotest", name = "kotest-runner-junit5", version.ref = "kotest" }
6161
kotest-assertions-core = { group = "io.kotest", name = "kotest-assertions-core", version.ref = "kotest" }
6262

63+
# questdb
64+
questdb = { module = "org.questdb:questdb", version = "9.0.3" }
65+
6366
[bundles]
6467
coroutines = [
6568
"coroutines-core",

readme.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ Has special handling for:
2727
- Images in the configuration DB
2828
- Tag configuration data
2929

30+
### QuestDB Viewer
31+
32+
Opens a QuestDB zip archive (such as a backup of the Core Historian's data) in a generic SQL exploration view.
33+
3034
### Log Viewer
3135

3236
Open one (or multiple) wrapper.log files. If the output format is Ignition's default, they will be automatically parsed
@@ -117,6 +121,7 @@ Contributions of any kind (additional tools, polish to existing tools, test file
117121
- [SerializationDumper](https://github.com/NickstaDB/SerializationDumper)
118122
- [Hydraulic Conveyor](https://www.hydraulic.software/)
119123
- [Terai Atsuhiro](https://java-swing-tips.blogspot.com/)
124+
- [Bsmth](https://bsky.app/profile/bsmth.de) for their original [Quest DB Logo](https://en.wikipedia.org/wiki/File:Questdb-logo.svg)
120125

121126
> [!WARNING]
122127
> Kindling is **not** an official Inductive Automation product and is provided as-is with no warranty.

src/main/kotlin/io/github/inductiveautomation/kindling/MainPanel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ class MainPanel : JPanel(MigLayout("ins 6, fill, hidemode 3")) {
144144
putClientProperty("FlatLaf.styleClass", "h1")
145145
},
146146
)
147-
for (tools in Tool.sortedByTitle.filterNot { it.isAdvanced }.chunked(3)) {
147+
for (tools in Tool.sortedByTitle.filterNot { it.isAdvanced }.chunked(4)) {
148148
add(toolTile(tools[0]), "sg tile, h 200!, newline, split, gaptop 20")
149149
for (tool in tools.drop(1)) {
150150
add(toolTile(tool), "sg tile, gap 20 0 20 0")

src/main/kotlin/io/github/inductiveautomation/kindling/cache/CacheView.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,6 @@ class CacheView(path: Path) : ToolPanel() {
277277

278278
add(JLabel("${data.size} ${if (data.size == 1) "entry" else "entries"}"))
279279
add(settings, "right, wrap")
280-
281280
add(mainSplitPane, "push, grow, span")
282281

283282
schemaList.selectionModel.addListSelectionListener {
@@ -341,7 +340,7 @@ data object CacheViewer : Tool {
341340
override val serialKey = "sf-cache"
342341
override val title = "Store & Forward Cache"
343342
override val description = "S&F Cache (.data, .script, .zip)"
344-
override val icon = FlatSVGIcon("icons/bx-data.svg")
343+
override val icon = FlatSVGIcon("icons/bx-hdd.svg")
345344
internal val extensions = arrayOf("data", "script", "zip")
346345
override val filter = FileFilter(description, *extensions)
347346

src/main/kotlin/io/github/inductiveautomation/kindling/core/Tool.kt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import io.github.inductiveautomation.kindling.gatewaynetwork.GatewayNetworkTool
77
import io.github.inductiveautomation.kindling.idb.IdbViewer
88
import io.github.inductiveautomation.kindling.localization.TranslationTool
99
import io.github.inductiveautomation.kindling.log.LogViewer
10+
import io.github.inductiveautomation.kindling.quest.QuestDbViewer
1011
import io.github.inductiveautomation.kindling.serial.SerialViewer
1112
import io.github.inductiveautomation.kindling.thread.MultiThreadViewer
1213
import io.github.inductiveautomation.kindling.utils.FileFilter
@@ -53,16 +54,17 @@ interface Tool : KindlingSerializable {
5354
companion object {
5455
val tools: List<Tool> by lazy {
5556
listOf(
56-
ZipViewer,
57-
MultiThreadViewer,
58-
LogViewer,
59-
IdbViewer,
57+
AlarmViewer,
6058
CacheViewer,
6159
GatewayNetworkTool,
62-
AlarmViewer,
63-
XmlTool,
60+
IdbViewer,
61+
LogViewer,
62+
MultiThreadViewer,
63+
QuestDbViewer,
6464
SerialViewer,
6565
TranslationTool,
66+
XmlTool,
67+
ZipViewer,
6668
)
6769
}
6870

src/main/kotlin/io/github/inductiveautomation/kindling/idb/generic/Column.kt renamed to src/main/kotlin/io/github/inductiveautomation/kindling/core/db/Column.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.github.inductiveautomation.kindling.idb.generic
1+
package io.github.inductiveautomation.kindling.core.db
22

33
import java.util.Collections
44
import java.util.Enumeration
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.github.inductiveautomation.kindling.idb.generic
1+
package io.github.inductiveautomation.kindling.core.db
22

33
import com.formdev.flatlaf.extras.components.FlatTree
44
import com.jidesoft.swing.TreeSearchable

0 commit comments

Comments
 (0)