Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
Razz4780 committed Jan 29, 2025
1 parent 307242f commit 73581ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class MirrordApi(private val service: MirrordProjectService, private val project
private data class RichOutput(
val targets: Array<FoundTarget>,
@SerializedName("current_namespace") val currentNamespace: String,
val namespaces: Array<String>,
val namespaces: Array<String>
) {
override fun equals(other: Any?): Boolean {
if (this === other) return true
Expand All @@ -185,7 +185,6 @@ class MirrordApi(private val service: MirrordProjectService, private val project

class MirrordLsOutput(val targets: List<FoundTarget>, val currentNamespace: String?, val namespaces: List<String>?)


private class MirrordLsTask(cli: String, projectEnvVars: Map<String, String>?) : MirrordCliTask<MirrordLsOutput>(cli, "ls", null, projectEnvVars) {
override fun compute(project: Project, process: Process, setText: (String) -> Unit): MirrordLsOutput {
setText("mirrord is listing targets...")
Expand All @@ -208,7 +207,7 @@ class MirrordApi(private val service: MirrordProjectService, private val project
MirrordLsOutput(
simpleOutput.map { FoundTarget(it, true) },
null,
null,
null
)
} else {
throw error
Expand All @@ -221,8 +220,8 @@ class MirrordApi(private val service: MirrordProjectService, private val project
.notifier
.notifySimple(
"No mirrord target available in the configured namespace. " +
"You can run targetless, or set a different target namespace " +
"or kubeconfig in the mirrord configuration file.",
"You can run targetless, or set a different target namespace " +
"or kubeconfig in the mirrord configuration file.",
NotificationType.INFORMATION
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ class MirrordExecDialog(private val project: Project, private val getTargets: (S
.map { it.path }
.filter {
(showPods.isSelected && it.startsWith("pod/")) ||
(showDeployments.isSelected && it.startsWith("deployment/")) ||
(showRollouts.isSelected && it.startsWith("rollout/"))
(showDeployments.isSelected && it.startsWith("deployment/")) ||
(showRollouts.isSelected && it.startsWith("rollout/"))
}
.filter { targetFilter.text == TARGET_FILTER_PLACEHOLDER || it.contains(targetFilter.text) }
.toMutableList()
Expand Down

0 comments on commit 73581ee

Please sign in to comment.