Skip to content

Commit

Permalink
docs: DOC-1356 ATO message (#3738)
Browse files Browse the repository at this point in the history
* docs: DOC-1356

* docs: updated content

* docs: updated page and added component

* chore: remove comment

* docs: update text URL

* docs: Apply suggestions from code review

Co-authored-by: caroldelwing <[email protected]>

* chore: minor changes per feedback

* docs: README update

---------

Co-authored-by: caroldelwing <[email protected]>
  • Loading branch information
karl-cardenas-coding and caroldelwing authored Aug 30, 2024
1 parent 8ab2d3b commit 2f8833c
Show file tree
Hide file tree
Showing 11 changed files with 174 additions and 58 deletions.
81 changes: 41 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -531,11 +531,11 @@ For guidance on using admonitions, refer to
To add a video, use the following syntax. Ensure you capitalize the letter "V":
```
```mdx
<Video src="/aws-full-profile.mp4"></Video>
```
```
```mdx
<Video title="vsphere-pcg-creation" src="/cluster-creation-videos/vmware.mp4"></Video>
```
Expand Down Expand Up @@ -732,6 +732,29 @@ This is a <VersionedLink text="Internal Link" url="/getting-started/additional-c
The path of the link should be the path of the destination file from the root directory, without any back operators
`..`. External links can be referenced as usual.
## Palette/VerteX URLs
A special component has been created to handle the generation of URLs for Palette and VertX. The component is called
[PaletteVertexUrlMapper](./src/components/PaletteVertexUrlMapper/PaletteVertexUrlMapper.tsx). This component is intended
for usage withing partials. You can use the component to change the base path of the URL to either Palette or VerteX.
The component will automatically prefix the path to the URL. The component has the following props:
- `edition` - The edition of the URL. This can be either `Palette` or `Vertex`. Internally, the component will use this
value to determine the base URL.
- `text` - The text to display for the link.
- `url` - The path to append to the base URL.
Below is an example of how to use the component:
```mdx
- System administrator permissions, either a Root Administrator or Operations Administrator. Refer to the
<PaletteVertexUrlMapper
edition={props.edition}
text="System Administrators"
url="/system-management/account-management"
/> page to learn more about system administrator roles.
```
## Packs Component
The packs component is a custom component that displays all packs available in Palette SaaS by querying the Palette API
Expand Down Expand Up @@ -832,8 +855,11 @@ If you want to link to a heading inside the pack component, you must also use th
path to the component followed by the heading id. The following is an example of how to link to a heading inside the
pack component. Take note of the `#` symbol followed by the heading id.
```md
<VersionedLink text="Change Cluster DNS Service Domain" url="/integrations/packs/?pack=kubernetes-eks#change-cluster-dns-service-domain" />
```mdx
<VersionedLink
text="Change Cluster DNS Service Domain"
url="/integrations/packs/?pack=kubernetes-eks#change-cluster-dns-service-domain"
/>
```
Omit the `version=xxxx&parent=xxxx` value that is part of the query string. If you include the `version` and `parent`
Expand All @@ -844,7 +870,7 @@ values, the link will not work as expected.
You must use the `<VersionedLink />` component to link to a pack. The following is an example of how to link to a pack.
For more information, refer to the [Internal Links](#internal-links) section.
```md
```mdx
<VersionedLink text="Change Cluster DNS Service Domain" url="/integrations/packs/?pack=kubernetes-eks" />
```
Expand Down Expand Up @@ -874,20 +900,16 @@ documentation.
Next, download the required Vale plugins.
```
```shell
make sync-vale
```
To execute the writing check, issue the command below. The command below will identify files that are modified by
comparing the current git branch against the `master` branch. Ensure your local `master` branch is up to date for
accurate results.
```
```shell
make check-writing
```
You may also use the Vale CLI to directly scan a file and receive feedback.
Expand All @@ -898,31 +920,10 @@ Example:
vale content/docs/08-user-management.md
```
## Modify Writing Rules
The [vale.ini](vale.ini) file contains the configuration for Vale. Changes to [vale.ini](vale.ini),
[accept.txt](/vale/styles/Vocab/Internal/accept.txt), and [reject.txt](/vale/styles/Vocab/Internal/reject.txt) require
approval by the [docs-education](https://github.com/orgs/spectrocloud/teams/docs-education) team.
### Disable Rule
To disable a specific rule, add the rule name and the word "NO" to the vale.ini](vale.ini) file.
Example:
```
Google.Headings = NO
```
### Approved Words
## Vale
Approved words can be found in the [accept.txt](/vale/styles/Vocab/Internal/accept.txt) file. You can add or remove
words from the list by modifying the file.
### Rejected Words
Rejected words automatically get flagged by Vale. To modify the list of rejected words, modify the
[reject.txt](/vale/styles/Vocab/Internal/reject.txt) file.
The [vale.ini](vale.ini) file contains the configuration for Vale. We use the
[Spectro Cloud Vale](https://github.com/spectrocloud/spectro-vale-pkg) package to enforce our writing style.
## Check Formatting
Expand All @@ -932,32 +933,32 @@ the formatting in all files complies with our Prettier configuration.
> [!NOTE]
>
> The build fails if the Code Formatting check doesn't pass.
> The CI will automatically format the files and commit the changes, if necessary.
To manually check the formatting before pushing your work upstream, execute the following command in your terminal:
```
```shell
make format-check
```
Console output if all files are formatted:
```
```shell
Checking formatting...
All matched files use Prettier code style!
```
Console output if some of the files require re-formatting:
```
```shell
Checking formatting...
[warn] README.md
[warn] Code style issues found in the above file. Run Prettier to fix.
```
To manually format all files, issue the following command:
```
```shell
make format
```
Expand Down
22 changes: 6 additions & 16 deletions _partials/feature_flags/_feature_flags_overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ partial_category: feature-flags
partial_name: feature-flags-overview
---



<!-- prettier-ignore -->
Feature flags allow <PaletteURL text="system administrators" edition={props.edition} url="/system-management/account-management/#system-administrators" /> to
Feature flags allow <PaletteVertexUrlMapper text="system administrators" edition={props.edition} url="/system-management/account-management/#system-administrators" /> to
manage what features are available to the system's tenants. They can use this capability to roll out new features to {props.edition} tenants in a controlled manner or choose not to implement a feature for their tenants due to security or compliance reasons.

Features enabled by system administrators are applied to all tenants in the system. Once a feature is enabled, it cannot
Expand All @@ -31,9 +33,9 @@ Use the following steps to enable a feature flag.

## Enablement

<!-- prettier-ignore -->

1. Log in to the system console. For additional guidance on accessing the system console, check out the
<PaletteURL
<PaletteVertexUrlMapper
edition={props.edition}
text="Access the System Console"
url="/system-management/#access-the-system-console"
Expand All @@ -53,16 +55,4 @@ Use the following steps to validate that the feature flag is enabled.
1. Log in as a tenant administrator to one of the tenants in the system.

2. Attempt to access the enabled feature flag. If the feature is enabled, you will be able to use it. If the feature is
disabled, you will not be able to access it.

export function PaletteURL({ edition, text, url }) {
return (
<>
{edition.toLowerCase() === "palette" ? (
<VersionedLink text={text} url={`/enterprise-version${url}`} />
) : (
<VersionedLink text={text} url={`/vertex${url}`} />
)}
</>
);
}
disabled, you will not be able to access it.
70 changes: 70 additions & 0 deletions _partials/self-hosted/_login-banner.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
partial_category: self-hosted
partial_name: login-banner
---




{props.edition} allows you to add a Login banner, also known as an Authority to Operate (ATO) banner or System Message, to the login page. This banner can display important information to users before they log in to the system console or to an individual tenant.


:::warning

Setting a login banner at the system console will override any tenant-specific login banners configured. Refer to the <VersionedLink text="Tenant Login Banner" url="/tenant-settings/login-banner/"/> guide to learn more about tenant-specific login banners.

:::


Use the following steps to add a login banner to the {props.edition} login page.

## Prerequisites

- Access to the {props.edition} <PaletteVertexUrlMapper
edition={props.edition}
text="system console"
url="/system-management/#access-the-system-console"
/>
<!-- prettier-ignore -->
- System administrator permissions, either a Root Administrator or Operations Administrator. Refer to the
<PaletteVertexUrlMapper
edition={props.edition}
text="System Administrators"
url="/system-management/account-management"
/> page to learn more about system administrator roles.




## Setup Login Banner


<!-- prettier-ignore -->
1. Log in to the {props.edition} system console. Refer to the
<PaletteVertexUrlMapper
edition={props.edition}
text="Access System Console"
url="/system-management/#access-the-system-console"
/> guide for more information.

2. From the left **Main Menu**, select **Administration**.

3. Select the **ATO Message** tab, and toggle the **Display Login Banner** switch to enable the login banner.

4. Fill out the **Login Banner Title** and **Login Banner Message** fields with the desired content.

5. Click **Save** to apply the changes.

## Validate

1. Log out of the {props.edition} system console.

2. Visit the {props.edition} system console login page.

3. The Login banner is displayed before you are prompted to log in.






Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
sidebar_label: "Login Banner"
title: "Login Banner"
description: "Learn how to add an ATO banner in Palette."
icon: ""
hide_table_of_contents: false
sidebar_position: 100
tags: ["enterprise", "management", "ato"]
keywords: ["self-hosted", "enterprise", "ato"]
---

import LoginBanner from "../../../../_partials/self-hosted/_login-banner.mdx";

<LoginBanner name="login-banner" edition="Palette" />
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Platform administrators can use the system console to perform the following oper

- Manage Palette platform upgrades.

- Configuere login banner.
- [Configure login banner](./login-banner.md).

- [Manage tenants](tenant-management.md).

Expand Down
5 changes: 5 additions & 0 deletions docs/docs-content/tenant-settings/login-banner.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ The login banner message is only accessible when users attempt to log in to Pale
default Palette SaaS login URL of `https://console.spectrocloud.com` will not display the login banner message. Users of
self-hosted Palette use the tenant URL defined during the Palette installation.

Additionally, if you are using self-hosted Palette or VerteX and have a login banner configured at the system console,
the tenant login banner will not be displayed, as the system console login banner takes precedence. Refer to the
[System Login Banner](../enterprise-version/system-management/login-banner.md) page to learn more about system login
banners.

:::

## Prerequisite
Expand Down
14 changes: 14 additions & 0 deletions docs/docs-content/vertex/system-management/login-banner.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
sidebar_label: "Login Banner"
title: "Login Banner"
description: "Learn how to add an ATO banner in VerteX."
icon: ""
hide_table_of_contents: false
sidebar_position: 100
tags: ["vertex", "management", "ato"]
keywords: ["self-hosted", "vertex", "ato"]
---

import LoginBanner from "../../../../_partials/self-hosted/_login-banner.mdx";

<LoginBanner name="login-banner" edition="VerteX" />
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ System administrators can use the system console to perform the following operat

- [Manage VerteX platform upgrades](../upgrade/upgrade.md).

- Configuere login banner.
- [Configure login banner](./login-banner.md).

- [Manage tenants](tenant-management.md).

Expand Down
17 changes: 17 additions & 0 deletions src/components/PaletteVertexUrlMapper/PaletteVertexUrlMapper.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from "react";
import VersionedLink from "../VersionedLink/VersionedLink";

// This component is used to generate the correct URL for the palette and vertex versions of the documentation.
// It takes the edition, text, and URL as props and returns the correct URL based on the edition.

interface ComponentProperties {
[key: string]: string;
}

export default function PaletteVertexUrlMapper(props: ComponentProperties) {
const { edition, text, url } = props;
const isPalette = edition?.toLowerCase() === "palette";
const mappedUrl = isPalette ? `/enterprise-version${url}` : `/vertex${url}`;

return <VersionedLink url={mappedUrl} text={text} />;
}
3 changes: 3 additions & 0 deletions src/components/PaletteVertexUrlMapper/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import PaletteVertexUrlMapper from "./PaletteVertexUrlMapper";

export default PaletteVertexUrlMapper;
2 changes: 2 additions & 0 deletions src/theme/MDXComponents/MDXComponents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import SimpleCardGrid from "@site/src/components/SimpleCardGrid/index";
import ReleaseNotesVersions from "@site/src/components/ReleaseNotesVersions/index";
import PartialsComponent from "@site/src/components/PartialsComponent";
import VersionedLink from "@site/src/components/VersionedLink";
import PaletteVertexUrlMapper from "@site/src/components/PaletteVertexUrlMapper/PaletteVertexUrlMapper";

export default {
...MDXComponents,
Expand All @@ -34,4 +35,5 @@ export default {
ReleaseNotesVersions,
PartialsComponent,
VersionedLink,
PaletteVertexUrlMapper,
};

0 comments on commit 2f8833c

Please sign in to comment.