Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENDOC-588 7.1 update bundle filtering #599

Merged
merged 2 commits into from
Oct 24, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 13 additions & 29 deletions vuepress/docs/next/docs/curate/bundle-filters.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
# Filtering bundles
# Filtering Bundles

Entando Bundles are filterable by component, status or textual search.
Entando Bundles are filterable by component, status or textual search from the App Builder user interface.

## Filtering bundles by component
![Hub user interface in Entando App Builder](./img/local-hub-page.png)

Entando Bundles are filterable by component from the App Builder user interface.
## Filtering Bundles by Component

![App Builder bundle filtering](./img/app-builder-bundle-component-filters.png)
To filter a bundle by component, its custom resource on the Entando Cluster must contain appropriate labels. Valid labels are: widget, plugin, fragment, pageTemplate, contentType and contentTemplate. To correctly define a label in a k8s resource requires both a key and value, but Entando uses only the key when filtering. Although the value is arbitrary, we recommend a setting of `"true"` for clarity and simplicity.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

k8s >> K8s

since K8s requires both key and value, are the last two sentences saying you can use anything for value, including true or what?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

entando doesn't evaluate value but an entry is required by kubernetes and "true" is recommended


Behind the scenes, filtering is done using the label-based filtering provided out of the box from Kubernetes.

To enable filtering of a bundle, the custom-resource representing the bundle on the Entando Cluster needs to contain the correct labels. An important note on the values to add the `labels` field, even if to correctly define a label in a k8s resource both the key and the value are required, from an Entando point of view only the key part of the label is used for filtering. The value could be set to anything, but our reccomendation is to use `"true"` for clarity and simplicity.

### Supported labels keys are:
### Supported Labels Keys:

<table>
<colgroup>
Expand Down Expand Up @@ -54,7 +50,7 @@ To enable filtering of a bundle, the custom-resource representing the bundle on
</table>

### Example
Here is an example of the metadata for an Entando Bundle containg micro frontends, some microservices and page templates
Here is an example of the metadata for an Entando Bundle containg micro frontends, microservices and page templates:

```
apiVersion: entando.org/v1
Expand All @@ -70,27 +66,15 @@ spec:
...
```

## Filtering bundles by status

Entando Bundles are filterable by status from the App Builder user interface.

![App Builder bundle filtering](./img/app-builder-bundle-status-filters.png)

You can choose to see the full list of bundles available in the Kubernetes cluster by selecting the `Explore` tab, or the list of the currently installed bundles by clicking on the `Installed` tab.


## Filtering bundles by textual search
## Filtering Bundles by Status

You can search for bundles containing some keywords by executing a textual search.
Entando Bundles are filterable by availability and install status. Select the `Explore` tab to see the full list of bundles available in the Kubernetes cluster. Select the `Installed` tab to see the list of currently installed bundles.

![App Builder bundle filtering](./img/app-builder-bundle-textual-search.png)

You can open the menu on the left to select which field to target.
## Filtering Bundles by Textual Search

If you are creating a new bundle, keep in mind the textual search is performed against data extracted from the bundle CRD file.
Use the textual search to return bundles that contain certain keywords in their name, description or version. When creating a new bundle, bear in mind that a textual search is performed against data extracted from the bundle CRD file.

## Mixing search criteria
## Mixing Search Criteria

You can mix all previous search criteria to refine the scope of your search as you want.
For example, you could search for all available bundles (`Explore` tab) that contain `Page Templates` components
(using the checkboxes) and the word `Login` in their name (using the textual search).
Filtering can be refined by combining component, status and textual search criteria. For example, you could search for all available bundles (filter by status) that contain `Page Templates` (filter by component) and the word `Login` in their name (filter by textual search).
15 changes: 8 additions & 7 deletions vuepress/docs/next/docs/curate/bundle-presentation-config.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# How to customize bundle info shown in Entando App Builder
# Customize Bundle Info Shown in App Builder

An example of how a bundle is displayed in the Local Hub of the App Builder is shown below:

![Hub user interface in Entando App Builder](./img/local-hub-page.png)

In the image above you can see an example of a bundle as is displayed in the Hub user interface inside the Entando App Builder.

The corresponding custom-resource file on Kubernetes is similar to this:
The corresponding custom resource file on Kubernetes contains content similar to the following:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is minor but should this be "on Kubernetes" or "in kubernetes"? Does a CR file live/act in or on Kubernetes, this always kind of sits odd with me in different contexts

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it's "on"... kubernetes runs things on a cluster of hosts... i also think the concept of layering applies, where things are on layers, not in them. pretty sure "in kubernetes" refers to conceptual architecture and "on kubernetes" refers to implementation


```
apiVersion: entando.org/v1
Expand All @@ -14,7 +15,7 @@ metadata:
spec:
details:
name: "Entando Bundle"
description: An example of an Entando bundle
description: An example of an Entando Bundle
dist-tags:
latest: v0.0.1
time:
Expand All @@ -32,11 +33,11 @@ spec:
# ....
```

In order to change the UI elements, you need to update the custom-resource in accordance with this table:
To change the UI elements, update the custom resource in accordance with this table:

| Field | UI Element |
|---------------------------------|---------------------------------------------------------------------------|
| `spec.details.name` | Set the bundle title |
| `spec.details.description` | Set the bundle description (only visible in the list presentation format) |
| `spec.details.description` | Set the bundle description (only visible in list format) |
| `spec.details.thumbnail` | Set the bundle thumbnail, expressed as a base64 encoded string |
| `spec.details.dist-tags.latest` | Set what's the latest version of the bundle |
| `spec.details.dist-tags.latest` | Set the latest version of the bundle |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.