mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
RHDEVDOCS-4280: Added a procedure to customize the user perspective
This commit is contained in:
committed by
openshift-cherrypick-robot
parent
051d39d1d6
commit
5e5a83c218
BIN
images/customizing-user-perspective.png
Normal file
BIN
images/customizing-user-perspective.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
79
modules/odc-customizing-a-perspective-using-YAML-view.adoc
Normal file
79
modules/odc-customizing-a-perspective-using-YAML-view.adoc
Normal file
@@ -0,0 +1,79 @@
|
||||
// Module included in the following assembly:
|
||||
//
|
||||
// * web_console/customizing-the-web-console.adoc
|
||||
|
||||
:_content-type: PROCEDURE
|
||||
[id="odc-customizing-a-perspective-using-YAML-view_{context}"]
|
||||
= Customizing a perspective using YAML view
|
||||
|
||||
.Prerequisites
|
||||
* You must have administrator privileges.
|
||||
|
||||
.Procedure
|
||||
. In the *Administrator* perspective, navigate to *Administration* -> *Cluster Settings*.
|
||||
. Select the *Configuration* tab and click the *Console (operator.openshift.io)* resource.
|
||||
. Click the *YAML* tab and make your customization:
|
||||
.. To enable or disable a perspective, insert the snippet for *Add user perspectives* and edit the YAML code as needed:
|
||||
+
|
||||
[source,yaml]
|
||||
----
|
||||
apiVersion: operator.openshift.io/v1
|
||||
kind: Console
|
||||
metadata:
|
||||
name: cluster
|
||||
spec:
|
||||
customization:
|
||||
perspectives:
|
||||
- id: admin
|
||||
visibility:
|
||||
state: Enabled
|
||||
- id: dev
|
||||
visibility:
|
||||
state: Enabled
|
||||
----
|
||||
.. To hide a perspective based on RBAC permissions, insert the snippet for *Hide user perspectives* and edit the YAML code as needed:
|
||||
+
|
||||
[source,yaml]
|
||||
----
|
||||
apiVersion: operator.openshift.io/v1
|
||||
kind: Console
|
||||
metadata:
|
||||
name: cluster
|
||||
spec:
|
||||
customization:
|
||||
perspectives:
|
||||
- id: admin
|
||||
requiresAccessReview:
|
||||
- group: rbac.authorization.k8s.io
|
||||
resource: clusterroles
|
||||
verb: list
|
||||
- id: dev
|
||||
state: Enabled
|
||||
----
|
||||
.. To customize a perspective based on your needs, create your own YAML snippet:
|
||||
+
|
||||
[source,yaml]
|
||||
----
|
||||
apiVersion: operator.openshift.io/v1
|
||||
kind: Console
|
||||
metadata:
|
||||
name: cluster
|
||||
spec:
|
||||
customization:
|
||||
perspectives:
|
||||
- id: admin
|
||||
visibility:
|
||||
state: AccessReview
|
||||
accessReview:
|
||||
missing:
|
||||
- resource: deployment
|
||||
verb: list
|
||||
required:
|
||||
- resource: namespaces
|
||||
verb: list
|
||||
- id: dev
|
||||
visibility:
|
||||
state: Enabled
|
||||
----
|
||||
|
||||
. Click *Save*.
|
||||
29
modules/odc-customizing-a-perspective-using-form-view.adoc
Normal file
29
modules/odc-customizing-a-perspective-using-form-view.adoc
Normal file
@@ -0,0 +1,29 @@
|
||||
// Module included in the following assembly:
|
||||
//
|
||||
// * web_console/customizing-the-web-console.adoc
|
||||
|
||||
:_content-type: PROCEDURE
|
||||
[id="odc-customizing-a-perspective-using-form-view_{context}"]
|
||||
= Customizing a perspective using form view
|
||||
|
||||
.Prerequisites
|
||||
* You must have administrator privileges.
|
||||
|
||||
.Procedure
|
||||
. In the *Administrator* perspective, navigate to *Administration* -> *Cluster Settings*.
|
||||
. Select the *Configuration* tab and click the *Console (operator.openshift.io)* resource.
|
||||
. Click *Actions* -> *Customize* on the right side of the page.
|
||||
. In the *General* settings, customize the perspective by selecting one of the following options from the dropdown list:
|
||||
* *Enabled*: Enables the perspective for all users
|
||||
* *Only visible for privileged users*: Enables the perspective for users who can list all namespaces
|
||||
* *Only visible for unprivileged users*: Enables the perspective for users who cannot list all namespaces
|
||||
* *Disabled*: Disables the perspective for all users
|
||||
+
|
||||
A notification opens to confirm that your changes are saved.
|
||||
+
|
||||
image::customizing-user-perspective.png[]
|
||||
+
|
||||
[NOTE]
|
||||
====
|
||||
When you customize the user perspective, your changes are automatically saved and take effect after a browser refresh.
|
||||
====
|
||||
22
modules/odc-customizing-user-perspectives.adoc
Normal file
22
modules/odc-customizing-user-perspectives.adoc
Normal file
@@ -0,0 +1,22 @@
|
||||
// Module included in the following assembly:
|
||||
//
|
||||
// * web_console/customizing-the-web-console.adoc
|
||||
|
||||
:_content-type: CONCEPT
|
||||
[id="odc-customizing-user-perspectives_{context}"]
|
||||
= Customizing user perspectives
|
||||
|
||||
The {product-title} web console provides two perspectives by default, *Administrator* and *Developer*. You might have more perspectives available depending on installed console plug-ins. As a cluster administrator, you can show or hide a perspective for all users or for a specific user role. Customizing perspectives ensures that users can view only the perspectives that are applicable to their role and tasks. For example, you can hide the *Administrator* perspective from unprivileged users so that they cannot manage cluster resources, users, and projects. Similarly, you can show the *Developer* perspective to users with the developer role so that they can create, deploy, and monitor applications.
|
||||
|
||||
You can also customize the perspective visibility for users based on role-based access control (RBAC). For example, if you customize a perspective for monitoring purposes, which requires specific permissions, you can define that the perspective is visible only to users with required permissions.
|
||||
|
||||
Each perspective includes the following mandatory parameters, which you can edit in the YAML view:
|
||||
|
||||
* `id`: Defines the ID of the perspective to show or hide
|
||||
* `visibility`: Defines the state of the perspective along with access review checks, if needed
|
||||
* `state`: Defines whether the perspective is enabled, disabled, or needs an access review check
|
||||
|
||||
[NOTE]
|
||||
====
|
||||
By default, all perspectives are enabled. When you customize the user perspective, your changes are applicable to the entire cluster.
|
||||
====
|
||||
@@ -26,3 +26,9 @@ include::modules/adding-custom-notification-banners.adoc[leveloffset=+1]
|
||||
include::modules/customizing-cli-downloads.adoc[leveloffset=+1]
|
||||
|
||||
include::modules/adding-yaml-examples-to-kube-resources.adoc[leveloffset=+1]
|
||||
|
||||
include::modules/odc-customizing-user-perspectives.adoc[leveloffset=+1]
|
||||
|
||||
include::modules/odc-customizing-a-perspective-using-YAML-view.adoc[leveloffset=+2]
|
||||
|
||||
include::modules/odc-customizing-a-perspective-using-form-view.adoc[leveloffset=+2]
|
||||
|
||||
Reference in New Issue
Block a user