intellij-kubernetes icon indicating copy to clipboard operation
intellij-kubernetes copied to clipboard

"Push" notification should disappear if editor is empty

Open olkornii opened this issue 1 year ago • 1 comments

  1. No toolbar should be visible if if the editor is empty
  2. A toolbar/notification should be displayed if the editor contains at least:
apiVersion: ...
kind: ...
  1. An error should be displayed if there's more than the bare minimum (apiVersion, kind) but the content is not valid k8s yaml/json

olkornii avatar Apr 16 '24 10:04 olkornii

Steps:

  1. EXEC: create an empty yaml file and add
---
apiVersion: v1
kind: PersistentVolume
metadata:
  annotations:
    pv.kubernetes.io/bound-by-controller: "yes"
  finalizers:
  - kubernetes.io/pv-protection
  labels:
    volume: pv0001
  name: pv0001
  resourceVersion: "227035"
  selfLink: /api/v1/persistentvolumes/pv0001
spec:
  accessModes:
  - ReadWriteOnce
  capacity:
    storage: 5Gi
  claimRef:
    apiVersion: v1
    kind: PersistentVolumeClaim
    name: myclaim
    namespace: default
    resourceVersion: "227033"
  hostPath:
    path: /mnt/pv-data/pv0001
    type: ""
  persistentVolumeReclaimPolicy: Recycle
  volumeMode: Filesystem
status:
  phase: Bound
  1. ASSERT: editor gets the toolbar and a notification to push the editor to the cluster in order to create the resource.
  2. EXEC: select all content and delete it

Result: The editor still displays the notification to push to the cluster. It should not, since there's no resource content any more.

Image

adietish avatar Feb 07 '25 19:02 adietish