Skip to content

Commit 39966b5

Browse files
committed
refactor: LiveView.liveViewConfig -> LiveView.viewConfig
1 parent f371dbf commit 39966b5

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

src/main/kotlin/spp/protocol/view/LiveView.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ data class LiveView(
3434
val entityIds: MutableSet<String>,
3535
val artifactQualifiedName: ArtifactQualifiedName? = null, //todo: remove, use artifactLocation
3636
val artifactLocation: LiveSourceLocation? = null, //todo: bottom?
37-
val liveViewConfig: LiveViewConfig
37+
val viewConfig: LiveViewConfig
3838
) {
3939
constructor(json: JsonObject) : this(
4040
subscriptionId = json.getString("subscriptionId"),
4141
entityIds = json.getJsonArray("entityIds").map { it.toString() }.toMutableSet(),
4242
artifactQualifiedName = json.getJsonObject("artifactQualifiedName")?.let { ArtifactQualifiedName(it) },
4343
artifactLocation = json.getJsonObject("artifactLocation")?.let { LiveSourceLocation(it) },
44-
liveViewConfig = LiveViewConfig(json.getJsonObject("liveViewConfig"))
44+
viewConfig = LiveViewConfig(json.getJsonObject("viewConfig"))
4545
)
4646

4747
fun toJson(): JsonObject {
@@ -50,7 +50,7 @@ data class LiveView(
5050
json.put("entityIds", JsonArray().apply { entityIds.forEach { add(it) } })
5151
artifactQualifiedName?.let { json.put("artifactQualifiedName", it.toJson()) }
5252
artifactLocation?.let { json.put("artifactLocation", it.toJson()) }
53-
json.put("liveViewConfig", liveViewConfig.toJson())
53+
json.put("viewConfig", viewConfig.toJson())
5454
return json
5555
}
5656

src/main/resources/graphql/schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2225,7 +2225,7 @@
22252225
"deprecationReason": null
22262226
},
22272227
{
2228-
"name": "liveViewConfig",
2228+
"name": "viewConfig",
22292229
"description": null,
22302230
"args": [],
22312231
"type": {
@@ -2271,7 +2271,7 @@
22712271
"defaultValue": null
22722272
},
22732273
{
2274-
"name": "liveViewConfig",
2274+
"name": "viewConfig",
22752275
"description": "artifactQualifiedName: ArtifactQualifiedNameInput!",
22762276
"type": {
22772277
"kind": "NON_NULL",

src/main/resources/graphql/view/add-live-view.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ mutation addLiveView($input: LiveViewInput!) {
1313
source
1414
line
1515
}
16-
liveViewConfig {
16+
viewConfig {
1717
viewName
1818
viewMetrics
1919
refreshRateLimit

src/main/resources/graphql/view/get-live-views.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ query getLiveViews {
1313
source
1414
line
1515
}
16-
liveViewConfig {
16+
viewConfig {
1717
viewName
1818
viewMetrics
1919
refreshRateLimit

src/test/kotlin/spp/protocol/view/LiveViewTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class LiveViewTest {
2727
val sub = LiveView(
2828
"id",
2929
mutableSetOf("entity-1"),
30-
liveViewConfig = LiveViewConfig("name", listOf("metrics"))
30+
viewConfig = LiveViewConfig("name", listOf("metrics"))
3131
)
3232
val subJson = sub.toJson()
3333
assertEquals(JsonArray(listOf("entity-1")), subJson.getJsonArray("entityIds"))

0 commit comments

Comments
 (0)