Skip to content

Commit

Permalink
Update Platform Version of JetBrains Backend Plugin (EAP) (gitpod-io#…
Browse files Browse the repository at this point in the history
…19430)

* Update Platform Version of JetBrains Backend Plugin (EAP) to 241.11761-EAP-CANDIDATE-SNAPSHOT

* Fix compilation error

* Fix

* Fix

---------

Co-authored-by: Robo Quat <[email protected]>
  • Loading branch information
jeanp413 and roboquat authored Feb 16, 2024
1 parent cc335e8 commit 2c8143c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
pluginSinceBuild=241.9959
pluginSinceBuild=241.11761
pluginUntilBuild=241.*
# Plugin Verifier integration -> https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl
# See https://jb.gg/intellij-platform-builds-list for available build versions.
pluginVerifierIdeVersions=2024.1
# Version from "com.jetbrains.intellij.idea" which can be found at https://www.jetbrains.com/intellij-repository/snapshots
platformVersion=241.9959-EAP-CANDIDATE-SNAPSHOT
platformVersion=241.11761-EAP-CANDIDATE-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
package io.gitpod.jetbrains.remote

import com.jetbrains.ide.model.uiautomation.BeControl
import com.jetbrains.ide.model.uiautomation.BeMargin
import com.jetbrains.ide.model.uiautomation.DefiniteProgress
import com.jetbrains.rd.platform.codeWithMe.unattendedHost.metrics.Metric
import com.jetbrains.rd.ui.bedsl.dsl.*
import com.jetbrains.rd.ui.bedsl.dsl.util.BeMarginsBuilder
import com.jetbrains.rd.util.lifetime.Lifetime
import com.jetbrains.rd.util.reactive.Property
import com.jetbrains.rdserver.diagnostics.BackendDiagnosticsService
Expand All @@ -16,9 +18,15 @@ import com.jetbrains.rdserver.unattendedHost.customization.controlCenter.perform

abstract class AbstractGitpodMetricControlProvider : MetricControlProvider {
override val id: String = "gitpodMetricsControl"

private fun getMargin(left: Int, top: Int, right: Int, bottom: Int): BeMarginsBuilder.() -> BeMargin {
val result: BeMarginsBuilder.() -> BeMargin = { margin(left, top, right, bottom) }
return result
}

override fun getControl(lifetime: Lifetime): BeControl {
val backendDiagnosticsService = BackendDiagnosticsService.Companion.getInstance()

val self = this
return verticalGrid {
row {
horizontalGrid {
Expand All @@ -32,14 +40,14 @@ abstract class AbstractGitpodMetricControlProvider : MetricControlProvider {
verticalGrid {
createCpuControl(this, backendDiagnosticsService, lifetime)
createMemoryControl(this, backendDiagnosticsService, lifetime)
}.withMargin { margin(0, 15, 0, 25) }
}.withMargin(self.getMargin(0, 15, 0, 25))
}
row {
horizontalGrid {
column {
label("Shared Node Resources")
}
}.withMargin { margin(0, 0, 0, 15) }.withHelpTooltip("Shared Node Resources", "The shared metrics represent the used and available resources of the cluster node on which your workspace is running")
}.withMargin(self.getMargin(0, 0, 0, 15)).withHelpTooltip("Shared Node Resources", "The shared metrics represent the used and available resources of the cluster node on which your workspace is running")
}
}
}
Expand All @@ -64,13 +72,13 @@ abstract class AbstractGitpodMetricControlProvider : MetricControlProvider {
if (workspaceClass == "") {
return
}

val self = this
return ctx.row {
horizontalGrid {
column {
label(workspaceClass)
}
}.withMargin { margin(0, 15, 0, 0) }
}.withMargin(self.getMargin(0, 15, 0, 0))
}
}

Expand Down

0 comments on commit 2c8143c

Please sign in to comment.