Update app cr displayType (#3152)

* Add type status hide/show system app.

Signed-off-by: zzjin <tczzjin@gmail.com>

* Fix typo

Signed-off-by: zzjin <tczzjin@gmail.com>

* Move status to spec displayType.

Signed-off-by: zzjin <tczzjin@gmail.com>

* Add default apps displayType.

Signed-off-by: zzjin <tczzjin@gmail.com>

---------

Signed-off-by: zzjin <tczzjin@gmail.com>
This commit is contained in:
zzjin
2023-05-28 11:12:39 +08:00
committed by GitHub
parent c34fbee89d
commit 655196af17
9 changed files with 17 additions and 23 deletions
-12
View File
@@ -54,20 +54,8 @@ type AppSpec struct {
MenuData MenuData `json:"menuData,omitempty"`
}
type DisplayStatusType string
// data types
const (
DisplayStatusNormal DisplayStatusType = "normal"
DisplayStatusMore DisplayStatusType = "more"
DisplayStatusHidden DisplayStatusType = "hidden"
)
// AppStatus defines the observed state of App
type AppStatus struct {
//+kubebuilder:validation:Enum={ normal, more, hidden, }
//+kubebuilder:validation:Optional
DisplayStatus DisplayStatusType `json:"displayStatus,omitempty"`
}
//+kubebuilder:object:root=true
@@ -66,13 +66,6 @@ spec:
type: object
status:
description: AppStatus defines the observed state of App
properties:
displayStatus:
enum:
- normal
- more
- hidden
type: string
type: object
type: object
served: true
@@ -12,4 +12,5 @@ spec:
menuData:
nameColor: text-black
helpDropDown: false
helpDocs:
helpDocs:
displayType: normal
+8 -1
View File
@@ -13,6 +13,7 @@ spec:
nameColor: text-black
name: Kubernetes-Dashboard
type: iframe
displayType: hide
---
apiVersion: app.sealos.io/v1
kind: App
@@ -30,6 +31,7 @@ spec:
nameColor: text-black
name: Postgres
type: app
displayType: normal
---
apiVersion: app.sealos.io/v1
kind: App
@@ -47,6 +49,7 @@ spec:
nameColor: '#0073D7'
name: sealos cloud provider
type: app
displayType: more
---
apiVersion: app.sealos.io/v1
kind: App
@@ -64,6 +67,7 @@ spec:
nameColor: text-black
name: Sealos Document
type: iframe
displayType: normal
---
apiVersion: app.sealos.io/v1
kind: App
@@ -81,6 +85,7 @@ spec:
nameColor: text-black
name: Image Hub
type: iframe
displayType: normal
---
apiVersion: app.sealos.io/v1
kind: App
@@ -98,6 +103,7 @@ spec:
nameColor: text-black
name: Terminal
type: iframe
displayType: normal
---
apiVersion: app.sealos.io/v1
kind: App
@@ -113,4 +119,5 @@ spec:
menuData:
nameColor: text-black
helpDropDown: false
helpDocs:
helpDocs:
displayType: normal
@@ -26,6 +26,7 @@ spec:
nameColor: text-black
helpDropDown:
helpDocs:
displayType: normal
```
![appyaml.png](./image/app-yaml.png)
@@ -26,6 +26,7 @@ spec:
nameColor: text-black
helpDropDown:
helpDocs:
displayType: normal
```
![appyaml.png](./image/app-yaml.png)
@@ -13,4 +13,5 @@ spec:
helpDropDown: false
nameColor: text-black
name: Adminer
type: iframe
type: iframe
displayType: normal
@@ -13,3 +13,4 @@ spec:
nameColor: text-black
name: App Launchpad
type: iframe
displayType: normal
@@ -13,4 +13,5 @@ spec:
helpDropDown: false
nameColor: text-black
name: Terminal
type: iframe
type: iframe
displayType: normal