forked from mirrors/thatmattlove-hyperglass
Fix docs build errors
This commit is contained in:
parent
c98e244637
commit
622f48c237
6 changed files with 30 additions and 36 deletions
|
|
@ -6,9 +6,6 @@ keywords: [configuration, messages, text, ui, customization]
|
||||||
description: hyperglass messages configuration
|
description: hyperglass messages configuration
|
||||||
---
|
---
|
||||||
|
|
||||||
import Link from "@docusaurus/Link";
|
|
||||||
import Code from "../src/components/JSXCode";
|
|
||||||
|
|
||||||
All user-facing status messages can be customized if needed.
|
All user-facing status messages can be customized if needed.
|
||||||
|
|
||||||
<div class="table--full-width" />
|
<div class="table--full-width" />
|
||||||
|
|
@ -20,14 +17,14 @@ All user-facing status messages can be customized if needed.
|
||||||
| `authentication_error` | String | `'Authentication error occurred.'` | Displayed when hyperglass is unable to authenticate to a configured device. Usually, this indicates a configuration error. `{device_name}` and `{error}` will be replaced with the device in question and the specific connection error. |
|
| `authentication_error` | String | `'Authentication error occurred.'` | Displayed when hyperglass is unable to authenticate to a configured device. Usually, this indicates a configuration error. `{device_name}` and `{error}` will be replaced with the device in question and the specific connection error. |
|
||||||
| `connection_error` | String | `'Error connecting to {device_name}: {error}'` | Displayed when hyperglass is unable to connect to a configured device. Usually, this indicates a configuration error. `{device_name}` and `{error}` will be replaced with the device in question and the specific connection error. |
|
| `connection_error` | String | `'Error connecting to {device_name}: {error}'` | Displayed when hyperglass is unable to connect to a configured device. Usually, this indicates a configuration error. `{device_name}` and `{error}` will be replaced with the device in question and the specific connection error. |
|
||||||
| `feature_not_enabled` | String | `'{feature} is not enabled for {device_name}.'` | Displayed when a query type is submitted that is not supported or disabled. The UI performs validation of supported query types prior to submitting any requests, so this is primarily relevant to the hyperglass API. `{feature}` and `{device_name}` will be replaced with the disabled feature and the selected device/location. |
|
| `feature_not_enabled` | String | `'{feature} is not enabled for {device_name}.'` | Displayed when a query type is submitted that is not supported or disabled. The UI performs validation of supported query types prior to submitting any requests, so this is primarily relevant to the hyperglass API. `{feature}` and `{device_name}` will be replaced with the disabled feature and the selected device/location. |
|
||||||
| `general` | String | `'Something went wrong.'` | Displayed when generalized errors occur. Seeing this error message may indicate a bug in hyperglass, as most other errors produced are highly contextual. If you see this in the wild, try enabling <Link to="/docs/configuration#global-settings"><Code>debug</Code></Link> mode and review the logs to pinpoint the source of the error. |
|
| `general` | String | `'Something went wrong.'` | Displayed when generalized errors occur. Seeing this error message may indicate a bug in hyperglass, as most other errors produced are highly contextual. If you see this in the wild, try enabling [`debug`](parameters.mdx#global-settings) mode and review the logs to pinpoint the source of the error. |
|
||||||
| `invalid_field` | String | `'{input} is an invalid {field}.'` | Displayed when a query field contains an invalid or unsupported value. `{input}` and `{field}` will be replaced with the invalid input value and corresponding field name. |
|
| `invalid_field` | String | `'{input} is an invalid {field}.'` | Displayed when a query field contains an invalid or unsupported value. `{input}` and `{field}` will be replaced with the invalid input value and corresponding field name. |
|
||||||
| `invalid_input` | String | `'{target} is not a valid {query_type} target.'` | Displayed when a query target's value is invalid in relation to the corresponding query type. `{target}` and `{query_type}` will be replaced with the invalid target and corresponding query type. |
|
| `invalid_input` | String | `'{target} is not a valid {query_type} target.'` | Displayed when a query target's value is invalid in relation to the corresponding query type. `{target}` and `{query_type}` will be replaced with the invalid target and corresponding query type. |
|
||||||
| `no_input` | String | `'{field} must be specified.'` | Displayed when no a required field is not specified. `{field}` will be replaced with the `display_name` of the field that was omitted. |
|
| `no_input` | String | `'{field} must be specified.'` | Displayed when no a required field is not specified. `{field}` will be replaced with the `display_name` of the field that was omitted. |
|
||||||
| `no_output` | String | `'The query completed, but no matching results were found.'` | Displayed when hyperglass can connect to a device and execute a query, but the response is empty. |
|
| `no_output` | String | `'The query completed, but no matching results were found.'` | Displayed when hyperglass can connect to a device and execute a query, but the response is empty. |
|
||||||
| `no_response` | String | `'No response.'` | Displayed when hyperglass can connect to a device, but no output is able to be read. Seeing this error may indicate a bug in hyperglass or one of its dependencies. If you see this in the wild, try enabling <Link to="/docs/configuration#global-settings"><Code>debug</Code></Link> mode and review the logs to pinpoint the source of the error. |
|
| `no_response` | String | `'No response.'` | Displayed when hyperglass can connect to a device, but no output is able to be read. Seeing this error may indicate a bug in hyperglass or one of its dependencies. If you see this in the wild, try enabling [`debug`](parameters.mdx#global-settings) mode and review the logs to pinpoint the source of the error. |
|
||||||
| `parsing_error` | String | `'An error occurred while parsing the query output.'` | Displayed when hyperglass can connect to a device and execute a query, but the response cannot be parsed. |
|
| `parsing_error` | String | `'An error occurred while parsing the query output.'` | Displayed when hyperglass can connect to a device and execute a query, but the response cannot be parsed. |
|
||||||
| `request_timeout` | String | `'Request timed out.'` | Displayed when the <Link to="/docs/configuration#global-settings"><Code>request_timeout</Code></Link> time expires. |
|
| `request_timeout` | String | `'Request timed out.'` | Displayed when the [`request_timeout`](parameters.mdx#global-settings) time expires. |
|
||||||
| `vrf_not_associated` | String | `'VRF {vrf_name} is not associated with {device_name}.'` | Displayed when a query request's VRF field value contains a VRF that is not configured or associated with the corresponding location/device. The UI automatically filters out VRFs that are not configured on a selected device, so this error is most likely to appear when using the hyperglass API. `{vrf_name}` and `{device_name}` will be replaced with the VRF in question and corresponding device. |
|
| `vrf_not_associated` | String | `'VRF {vrf_name} is not associated with {device_name}.'` | Displayed when a query request's VRF field value contains a VRF that is not configured or associated with the corresponding location/device. The UI automatically filters out VRFs that are not configured on a selected device, so this error is most likely to appear when using the hyperglass API. `{vrf_name}` and `{device_name}` will be replaced with the VRF in question and corresponding device. |
|
||||||
| `vrf_not_found` | String | `'VRF {vrf_name} is not defined.'` | Displayed when a query VRF is not configured on any devices. The UI only shows configured VRFs, so this error is most likely to appear when using the hyperglass API. `{vrf_name}` will be replaced with the VRF in question. |
|
| `vrf_not_found` | String | `'VRF {vrf_name} is not defined.'` | Displayed when a query VRF is not configured on any devices. The UI only shows configured VRFs, so this error is most likely to appear when using the hyperglass API. `{vrf_name}` will be replaced with the VRF in question. |
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ While hyperglass is, to the extent possible, fully [asynchronous](https://docs.p
|
||||||
To combat this, hyperglass uses the above worker strategy. **Ultimately, it's important to provision the appropriate number of CPU cores, corresponding to the number of concurrent sessions you might expect to have in your environment** (keeping in mind that if your system supports hyperthreading, each core equates to two workers).
|
To combat this, hyperglass uses the above worker strategy. **Ultimately, it's important to provision the appropriate number of CPU cores, corresponding to the number of concurrent sessions you might expect to have in your environment** (keeping in mind that if your system supports hyperthreading, each core equates to two workers).
|
||||||
|
|
||||||
:::note
|
:::note
|
||||||
When [debug](configuration.mdx#global-settings) is set to `true`, the number of workers is set to 1.
|
When [debug](parameters.mdx#global-settings) is set to `true`, the number of workers is set to 1.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
### Memory
|
### Memory
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ keywords: [configuration, api, rest]
|
||||||
description: Configure the REST API
|
description: Configure the REST API
|
||||||
---
|
---
|
||||||
|
|
||||||
import Link from "@docusaurus/Link";
|
|
||||||
import MiniNote from "../src/components/MiniNote";
|
import MiniNote from "../src/components/MiniNote";
|
||||||
import Code from "../src/components/JSXCode";
|
import Code from "../src/components/JSXCode";
|
||||||
import PageLink from "../src/components/PageLink";
|
import PageLink from "../src/components/PageLink";
|
||||||
|
|
@ -17,18 +16,18 @@ FastAPI provides built in support for both [Swagger UI](https://swagger.io/tools
|
||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
|
|
||||||
| Parameter | Type | Default | Description |
|
| Parameter | Type | Default | Description |
|
||||||
| :------------ | :-----: | :--------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| :------------ | :-----: | :--------------------------------- | :----------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `enable` | Boolean | `true` | Enable or disable the API documentation. |
|
| `enable` | Boolean | `true` | Enable or disable the API documentation. |
|
||||||
| `title` | String | `'{site_title} API Documentation'` | API documentation title. `{site_title}` will be replaced with the <Link to="/docs/configuration#global-settings"><Code>site_title</Code></Link> parameter. |
|
| `title` | String | `'{site_title} API Documentation'` | API documentation title. `{site_title}` will be replaced with the [`site_title`](parameters.mdx#global-settings) parameter. |
|
||||||
| `description` | String | | API documentation description appearing below the title. |
|
| `description` | String | | API documentation description appearing below the title. |
|
||||||
| `base_url` | String | `'https://lg.example.net'` | The base URL for your hyperglass site. Used by OpenAPI for dynamically creating hyperlinks. |
|
| `base_url` | String | `'https://lg.example.net'` | The base URL for your hyperglass site. Used by OpenAPI for dynamically creating hyperlinks. |
|
||||||
| `mode` | String | `'redoc'` | OpenAPI UI library to use for the hyperglass API docs. <MiniNote>Must be <Code>redoc</Code> or <Code>swagger</Code></MiniNote> |
|
| `mode` | String | `'redoc'` | OpenAPI UI library to use for the hyperglass API docs. <MiniNote>Must be <Code>redoc</Code> or <Code>swagger</Code></MiniNote> |
|
||||||
| `uri` | String | `'/api/docs'` | HTTP URI/path where API documentation can be accessed. |
|
| `uri` | String | `'/api/docs'` | HTTP URI/path where API documentation can be accessed. |
|
||||||
| `openapi_uri` | String | `'/openapi.json'` | Path to the automatically generated `openapi.json` file. |
|
| `openapi_uri` | String | `'/openapi.json'` | Path to the automatically generated `openapi.json` file. |
|
||||||
| `queries` | | | `/queries` endpoint settings <PageLink to="#queries">➡️</PageLink> |
|
| `queries` | | | `/queries` endpoint settings <PageLink to="#queries">➡️</PageLink> |
|
||||||
| `query` | | | `/query` endpoint settings <PageLink to="#query">➡️</PageLink> |
|
| `query` | | | `/query` endpoint settings <PageLink to="#query">➡️</PageLink> |
|
||||||
| `devices` | | | `/devices` endpoint settings <PageLink to="#devices">➡️</PageLink> |
|
| `devices` | | | `/devices` endpoint settings <PageLink to="#devices">➡️</PageLink> |
|
||||||
|
|
||||||
### `queries`
|
### `queries`
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ keywords: [hyperglass, looking glass, web ui, gui, theme, colors, branding]
|
||||||
description: Customize the Web UI
|
description: Customize the Web UI
|
||||||
---
|
---
|
||||||
|
|
||||||
import Link from "@docusaurus/Link";
|
|
||||||
import R from "../../src/components/Required";
|
import R from "../../src/components/Required";
|
||||||
import MiniNote from "../../src/components/MiniNote";
|
import MiniNote from "../../src/components/MiniNote";
|
||||||
import Code from "../../src/components/JSXCode";
|
import Code from "../../src/components/JSXCode";
|
||||||
|
|
@ -14,7 +13,7 @@ import PageLink from "../../src/components/PageLink";
|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
|
|
||||||
hyperglass is build with [NextJS](https://nextjs.org/), a [React](https://reactjs.org/)-based UI framework that supports server-side rendering and static exporting, which contribute to hyperglass's speed and SEO-friendliness. At startup, hyperglass creates a new "UI build", which is a static export of the site and includes some elements of the [configuration](parameters).
|
hyperglass is build with [NextJS](https://nextjs.org/), a [React](https://reactjs.org/)-based UI framework that supports server-side rendering and static exporting, which contribute to hyperglass's speed and SEO-friendliness. At startup, hyperglass creates a new "UI build", which is a static export of the site and includes some elements of the [configuration](parameters.mdx).
|
||||||
|
|
||||||
This UI build process can be run manually via the hyperglass CLI:
|
This UI build process can be run manually via the hyperglass CLI:
|
||||||
|
|
||||||
|
|
@ -70,13 +69,13 @@ If your organization's policy allows, and you don't mind, I request that you kee
|
||||||
|
|
||||||
Specify an array/list of links to show in the footer. By default, a link to your ASN's PeeringDB page is used.
|
Specify an array/list of links to show in the footer. By default, a link to your ASN's PeeringDB page is used.
|
||||||
|
|
||||||
| Parameter | Type | Default | Description |
|
| Parameter | Type | Default | Description |
|
||||||
| :---------- | :-----: | :---------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| :---------- | :-----: | :---------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `title` | String | `'PeeringDB'` | Link title/label |
|
| `title` | String | `'PeeringDB'` | Link title/label |
|
||||||
| `url` | String | `'https://www.peeringdb.com/asn/{primary_asn}'` | Target URL. `{primary_asn}` will be replaced with the `primary_asn` value from <Link to="/docs/configuration#global-settings">Global Settings</Link> |
|
| `url` | String | `'https://www.peeringdb.com/asn/{primary_asn}'` | Target URL. `{primary_asn}` will be replaced with the `primary_asn` value from [Global Settings](parameters.mdx#global-settings) |
|
||||||
| `show_icon` | Boolean | `true` | Show an icon on the right side of the link indicating that the link will take the user away from the hyperglass page. |
|
| `show_icon` | Boolean | `true` | Show an icon on the right side of the link indicating that the link will take the user away from the hyperglass page. |
|
||||||
| `side` | String | `'left'` | Show the link on the `'left'` or `'right'` side of the footer. |
|
| `side` | String | `'left'` | Show the link on the `'left'` or `'right'` side of the footer. |
|
||||||
| `order` | Integer | `0` | Specify the order of the links (left to right). During rendering, `links` and [`menus`](#menus) are merged, so the order is used to sort both. |
|
| `order` | Integer | `0` | Specify the order of the links (left to right). During rendering, `links` and [`menus`](#menus) are merged, so the order is used to sort both. |
|
||||||
|
|
||||||
#### Example
|
#### Example
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,9 @@ The `title_mode` parameter behaves in the following manner:
|
||||||
|
|
||||||
<div className="table--full-width" />
|
<div className="table--full-width" />
|
||||||
|
|
||||||
| Mode | Behavior |
|
| Mode | Behavior |
|
||||||
| --------------- | ------------------------------------------------------------------- |
|
| --------------- | ----------------------------------------------------------------------- |
|
||||||
| `text_only` | Shows the [`title`](#text) and [`subtitle`](#text) only. |
|
| `text_only` | Shows the [`title`](#text) and [`subtitle`](#text) only. |
|
||||||
| `logo_only` | Shows the [`logo`](ui/logo) only. |
|
| `logo_only` | Shows the [`logo`](ui/logo.mdx) only. |
|
||||||
| `logo_subtitle` | Shows the [`logo`](ui/logo) and [`subtitle`](#text) only. |
|
| `logo_subtitle` | Shows the [`logo`](ui/logo.mdx) and [`subtitle`](#text) only. |
|
||||||
| `all` | Shows the [`logo`](ui/logo), [`title`](#text), [`subtitle`](#text). |
|
| `all` | Shows the [`logo`](ui/logo.mdx), [`title`](#text), [`subtitle`](#text). |
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,6 @@ const docusaurusConfig = {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
plugins: ["@docusaurus/plugin-google-analytics"],
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = docusaurusConfig;
|
module.exports = docusaurusConfig;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue