Skip to content

Commit

Permalink
chore: icons updated
Browse files Browse the repository at this point in the history
  • Loading branch information
bastiandoetsch committed Aug 8, 2023
1 parent a1916df commit d649aa2
Show file tree
Hide file tree
Showing 20 changed files with 122 additions and 226 deletions.
5 changes: 3 additions & 2 deletions src/main/kotlin/icons/SnykIcons.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ object SnykIcons {

val LOGO = getIcon("/icons/logo_snyk.png", SnykIcons::class.java)

val VULNERABILITY_16 = getIconFromResources("/icons/vulnerability_16.png")
val VULNERABILITY_24 = getIconFromResources("/icons/vulnerability.png")
private val VULNERABILITY_16 = getIconFromResources("/icons/vulnerability_16.png")
private val VULNERABILITY_24 = getIconFromResources("/icons/vulnerability.png")

val OPEN_SOURCE_SECURITY = getIcon("/icons/oss.svg", SnykIcons::class.java)
val OPEN_SOURCE_SECURITY_DISABLED = getIcon("/icons/oss_disabled.svg", SnykIcons::class.java)
Expand All @@ -24,6 +24,7 @@ object SnykIcons {
val IAC_DISABLED = getIcon("/icons/iac_disabled.svg", SnykIcons::class.java)
val CONTAINER = getIcon("/icons/container.svg", SnykIcons::class.java)
val CONTAINER_DISABLED = getIcon("/icons/container_disabled.svg", SnykIcons::class.java)

val CONTAINER_IMAGE = getIcon("/icons/container_image.svg", SnykIcons::class.java)
val CONTAINER_IMAGE_24 = getIcon("/icons/container_image_24.svg", SnykIcons::class.java)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ object SnykBalloonNotificationHelper {
}
}

notification.setIcon(SnykIcons.LOGO)
notification.setIcon(SnykIcons.TOOL_WINDOW)
// workaround for https://youtrack.jetbrains.com/issue/IDEA-220408/notifications-with-project=null-is-not-shown-anymore
if (project != null) {
notification.notify(project)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ object SnykBalloonNotifications {
const val sastForOrgEnablementMessage = "Snyk Code is disabled by your organisation's configuration."
const val networkErrorAlertMessage = "Not able to connect to Snyk server."

internal val notificationGroup = NotificationGroupManager.getInstance().getNotificationGroup("Snyk")
private val notificationGroup = NotificationGroupManager.getInstance().getNotificationGroup("Snyk")

fun showWelcomeNotification(project: Project) {
val welcomeMessage = "Welcome to Snyk! Check out our tool window to start analyzing your code"
Expand Down
16 changes: 13 additions & 3 deletions src/main/kotlin/snyk/container/KubernetesImageCache.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ package snyk.container
import com.intellij.openapi.application.ReadAction
import com.intellij.openapi.components.Service
import com.intellij.openapi.diagnostic.Logger
import com.intellij.openapi.progress.PerformInBackgroundOption
import com.intellij.openapi.progress.ProgressIndicator
import com.intellij.openapi.progress.Task
import com.intellij.openapi.project.Project
import com.intellij.openapi.roots.ProjectRootManager
import com.intellij.openapi.vfs.VirtualFile
Expand All @@ -26,10 +29,17 @@ class KubernetesImageCache(val project: Project) {
true
}
}
object : Task.Backgroundable(
project,
"Scanning project for Kubernetes files",
true,
PerformInBackgroundOption.ALWAYS_BACKGROUND
) {
override fun run(indicator: ProgressIndicator) {
ReadAction.nonBlocking(callable).wrapProgress(indicator).submit(NonUrgentExecutor.getInstance())
}
}.queue()

ReadAction.nonBlocking(callable)
.inSmartMode(project)
.submit(NonUrgentExecutor.getInstance())
}

Check warning

Code scanning / detekt

Detects blank lines before rbraces Warning

Unexpected blank line(s) before "}"

fun getKubernetesWorkloadFilesFromCache(): Set<VirtualFile> = images.keys
Expand Down
23 changes: 11 additions & 12 deletions src/main/resources/icons/code.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 0 additions & 25 deletions src/main/resources/icons/code_dark.svg

This file was deleted.

15 changes: 6 additions & 9 deletions src/main/resources/icons/code_disabled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 0 additions & 25 deletions src/main/resources/icons/code_disabled_dark.svg

This file was deleted.

Loading

0 comments on commit d649aa2

Please sign in to comment.