1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Fix spelling (#3181)

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
This commit is contained in:
Josh Soref 2021-07-16 08:53:01 -04:00 committed by GitHub
parent 9903417fed
commit e87b4836be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
39 changed files with 54 additions and 54 deletions

View File

@ -6,7 +6,7 @@ In this section you will learn how this extension works under the hood.
The Hello World sample extension does three things: The Hello World sample extension does three things:
- Implements `onActivate()` and outputs a message to the console. - Implements `onActivate()` and outputs a message to the console.
- Implements `onDectivate()` and outputs a message to the console. - Implements `onDeactivate()` and outputs a message to the console.
- Registers `ClusterPage` so that the page is visible in the left-side menu of the cluster dashboard. - Registers `ClusterPage` so that the page is visible in the left-side menu of the cluster dashboard.
Let's take a closer look at our Hello World sample's source code and see how these three things are achieved. Let's take a closer look at our Hello World sample's source code and see how these three things are achieved.

View File

@ -72,4 +72,4 @@ To dive deeper, consider looking at [Common Capabilities](../capabilities/common
If you find problems with the Lens Extension Generator, or have feature requests, you are welcome to raise an [issue](https://github.com/lensapp/generator-lens-ext/issues). If you find problems with the Lens Extension Generator, or have feature requests, you are welcome to raise an [issue](https://github.com/lensapp/generator-lens-ext/issues).
You can find the latest Lens contribution guidelines [here](https://docs.k8slens.dev/latest/contributing). You can find the latest Lens contribution guidelines [here](https://docs.k8slens.dev/latest/contributing).
The Generator source code is hosted at [Github](https://github.com/lensapp/generator-lens-ext). The Generator source code is hosted at [GitHub](https://github.com/lensapp/generator-lens-ext).

View File

@ -213,7 +213,7 @@ export class CertificatePage extends React.Component<{ extension: LensRendererEx
return ( return (
<TabLayout> <TabLayout>
<KubeObjectListLayout <KubeObjectListLayout
className="Certicates" store={certificatesStore} className="Certificates" store={certificatesStore}
sortingCallbacks={{ sortingCallbacks={{
[sortBy.name]: (certificate: Certificate) => certificate.getName(), [sortBy.name]: (certificate: Certificate) => certificate.getName(),
[sortBy.namespace]: (certificate: Certificate) => certificate.metadata.namespace, [sortBy.namespace]: (certificate: Certificate) => certificate.metadata.namespace,

View File

@ -94,7 +94,7 @@ export default class SamplePageMainExtension extends Main.LensExtension {
``` ```
When the menu item is clicked the `navigate()` method looks for and displays a global page with id `"myGlobalPage"`. When the menu item is clicked the `navigate()` method looks for and displays a global page with id `"myGlobalPage"`.
This page would be defined in your extension's `Renderer.LensExtension` implmentation (See [`Renderer.LensExtension`](renderer-extension.md)). This page would be defined in your extension's `Renderer.LensExtension` implementation (See [`Renderer.LensExtension`](renderer-extension.md)).
### `addCatalogSource()` and `removeCatalogSource()` Methods ### `addCatalogSource()` and `removeCatalogSource()` Methods

View File

@ -90,7 +90,7 @@ This is the cluster that the resource stack will be applied to, and the construc
Similarly, `ExampleClusterFeature` implements an `uninstall()` method which simply invokes the `kubectlDeleteFolder()` method of the `Renderer.K8sApi.ResourceStack` class. Similarly, `ExampleClusterFeature` implements an `uninstall()` method which simply invokes the `kubectlDeleteFolder()` method of the `Renderer.K8sApi.ResourceStack` class.
`kubectlDeleteFolder()` tries to delete from the cluster all kubernetes resources found in the folder passed to it, again in this case `../resources`. `kubectlDeleteFolder()` tries to delete from the cluster all kubernetes resources found in the folder passed to it, again in this case `../resources`.
`ExampleClusterFeature` also implements an `isInstalled()` method, which demonstrates how you can utiliize the kubernetes api to inspect the resource stack status. `ExampleClusterFeature` also implements an `isInstalled()` method, which demonstrates how you can utilize the kubernetes api to inspect the resource stack status.
`isInstalled()` simply tries to find a pod named `example-pod`, as a way to determine if the pod is already installed. `isInstalled()` simply tries to find a pod named `example-pod`, as a way to determine if the pod is already installed.
This method can be useful in creating a context-sensitive UI for installing/uninstalling the feature, as demonstrated in the next sample code. This method can be useful in creating a context-sensitive UI for installing/uninstalling the feature, as demonstrated in the next sample code.

View File

@ -148,8 +148,8 @@ export class ExamplePreferenceInput extends React.Component {
return ( return (
<Checkbox <Checkbox
label="I understand appPreferences" label="I understand appPreferences"
value={ExamplePreferencesStore.getInstace().enabled} value={ExamplePreferencesStore.getInstance().enabled}
onChange={v => { ExamplePreferencesStore.getInstace().enabled = v; }} onChange={v => { ExamplePreferencesStore.getInstance().enabled = v; }}
/> />
); );
} }

View File

@ -43,4 +43,4 @@ Say you have your project folder at `~/my-extension/` and you want to create an
npm pack npm pack
``` ```
This will create a NPM tarball that can be hosted on Github Releases or any other publicly available file hosting service. This will create a NPM tarball that can be hosted on GitHub Releases or any other publicly available file hosting service.

View File

@ -56,7 +56,7 @@ class TestCatalogCategory2 extends CatalogCategory {
} }
describe("CatalogCategoryRegistry", () => { describe("CatalogCategoryRegistry", () => {
it("should remove only the category registered when running the disopser", () => { it("should remove only the category registered when running the disposer", () => {
const registry = new TestCatalogCategoryRegistry(); const registry = new TestCatalogCategoryRegistry();
expect(registry.items.length).toBe(0); expect(registry.items.length).toBe(0);

View File

@ -52,7 +52,7 @@ export interface HotbarStoreModel {
activeHotbarId: string; activeHotbarId: string;
} }
export const defaultHotbarCells = 12; // Number is choosen to easy hit any item with keyboard export const defaultHotbarCells = 12; // Number is chosen to easy hit any item with keyboard
export class HotbarStore extends BaseStore<HotbarStoreModel> { export class HotbarStore extends BaseStore<HotbarStoreModel> {
@observable hotbars: Hotbar[] = []; @observable hotbars: Hotbar[] = [];
@ -203,7 +203,7 @@ export class HotbarStore extends BaseStore<HotbarStoreModel> {
} }
/** /**
* Remvove all hotbar items that reference the `uid`. * Remove all hotbar items that reference the `uid`.
* @param uid The `EntityId` that each hotbar item refers to * @param uid The `EntityId` that each hotbar item refers to
* @returns A function that will (in an action) undo the removing of the hotbar items. This function will not complete if the hotbar has changed. * @returns A function that will (in an action) undo the removing of the hotbar items. This function will not complete if the hotbar has changed.
*/ */

View File

@ -193,9 +193,9 @@ const hiddenTableColumns: PreferenceDescription<[string, string[]][], Map<string
toStore(val) { toStore(val) {
const res: [string, string[]][] = []; const res: [string, string[]][] = [];
for (const [table, columnes] of val) { for (const [table, columns] of val) {
if (columnes.size) { if (columns.size) {
res.push([table, Array.from(columnes)]); res.push([table, Array.from(columns)]);
} }
} }

View File

@ -27,7 +27,7 @@ export class ExtendedMap<K, V> extends Map<K, V> {
} }
/** /**
* Get the value behind `key`. If it was not pressent, first insert the value returned by `getVal` * Get the value behind `key`. If it was not present, first insert the value returned by `getVal`
* @param key The key to insert into the map with * @param key The key to insert into the map with
* @param getVal A function that returns a new instance of `V`. * @param getVal A function that returns a new instance of `V`.
* @returns The value in the map * @returns The value in the map

View File

@ -84,7 +84,7 @@ jest.mock(
(channel: string, listener: (event: any, ...args: any[]) => void) => { (channel: string, listener: (event: any, ...args: any[]) => void) => {
if (channel === "extensions:main") { if (channel === "extensions:main") {
// First initialize with extensions 1 and 2 // First initialize with extensions 1 and 2
// and then broadcast event to remove extensioin 2 and add extension number 3 // and then broadcast event to remove extension 2 and add extension number 3
setTimeout(() => { setTimeout(() => {
listener({}, [ listener({}, [
[ [

View File

@ -36,7 +36,7 @@ export abstract class IpcMain extends IpcRegistrar {
* Listen for broadcasts within your extension * Listen for broadcasts within your extension
* @param channel The channel to listen for broadcasts on * @param channel The channel to listen for broadcasts on
* @param listener The function that will be called with the arguments of the broadcast * @param listener The function that will be called with the arguments of the broadcast
* @returns An optional disopser, Lens will cleanup when the extension is disabled or uninstalled even if this is not called * @returns An optional disposer, Lens will cleanup when the extension is disabled or uninstalled even if this is not called
*/ */
listen(channel: string, listener: (event: Electron.IpcRendererEvent, ...args: any[]) => any): Disposer { listen(channel: string, listener: (event: Electron.IpcRendererEvent, ...args: any[]) => any): Disposer {
const prefixedChannel = `extensions@${this[IpcPrefix]}:${channel}`; const prefixedChannel = `extensions@${this[IpcPrefix]}:${channel}`;

View File

@ -74,7 +74,7 @@ export class LensExtension {
* getExtensionFileFolder returns the path to an already created folder. This * getExtensionFileFolder returns the path to an already created folder. This
* folder is for the sole use of this extension. * folder is for the sole use of this extension.
* *
* Note: there is no security done on this folder, only obfiscation of the * Note: there is no security done on this folder, only obfuscation of the
* folder name. * folder name.
*/ */
async getExtensionFileFolder(): Promise<string> { async getExtensionFileFolder(): Promise<string> {

View File

@ -207,7 +207,7 @@ describe("ContextHandler", () => {
expect(service.id === "id_0"); expect(service.id === "id_0");
}); });
it("shouldn't pick the second provider of 2 succcess(es) after 1 failure(s)", async () => { it("shouldn't pick the second provider of 2 success(es) after 1 failure(s)", async () => {
const reg = PrometheusProviderRegistry.getInstance(); const reg = PrometheusProviderRegistry.getInstance();
let count = 0; let count = 0;

View File

@ -146,7 +146,7 @@ export class HelmRepoManager extends Singleton {
return stdout; return stdout;
} }
public static async addСustomRepo(repoAttributes : HelmRepo) { public static async addCustomRepo(repoAttributes : HelmRepo) {
logger.info(`[HELM]: adding repo "${repoAttributes.name}" from ${repoAttributes.url}`); logger.info(`[HELM]: adding repo "${repoAttributes.name}" from ${repoAttributes.url}`);
const helm = await helmCli.binaryPath(); const helm = await helmCli.binaryPath();

View File

@ -137,7 +137,7 @@ app.on("ready", async () => {
/** /**
* The following sync MUST be done before HotbarStore creation, because that * The following sync MUST be done before HotbarStore creation, because that
* store has migrations that will remove items that previous migrations add * store has migrations that will remove items that previous migrations add
* if this is not presant * if this is not present
*/ */
syncGeneralEntities(); syncGeneralEntities();

View File

@ -93,7 +93,7 @@ function createTrayMenu(windowManager: WindowManager): Menu {
click() { click() {
windowManager windowManager
.navigate(preferencesURL()) .navigate(preferencesURL())
.catch(error => logger.error(`${TRAY_LOG_PREFIX}: Failed to nativate to Preferences`, { error })); .catch(error => logger.error(`${TRAY_LOG_PREFIX}: Failed to navigate to Preferences`, { error }));
}, },
} }
]; ];

View File

@ -114,7 +114,7 @@ function _parseKubeApi(path: string): IKubeApiParsed {
* There is no well defined selection from an array of items that were * There is no well defined selection from an array of items that were
* separated by '/' * separated by '/'
* *
* Solution is to create a huristic. Namely: * Solution is to create a heuristic. Namely:
* 1. if '.' in left[0] then apiGroup <- left[0] * 1. if '.' in left[0] then apiGroup <- left[0]
* 2. if left[1] matches /^v[0-9]/ then apiGroup, apiVersion <- left[0], left[1] * 2. if left[1] matches /^v[0-9]/ then apiGroup, apiVersion <- left[0], left[1]
* 3. otherwise assume apiVersion <- left[0] * 3. otherwise assume apiVersion <- left[0]

View File

@ -53,7 +53,7 @@ import { TerminalStore } from "./components/dock/terminal.store";
configurePackages(); configurePackages();
/** /**
* If this is a development buid, wait a second to attach * If this is a development build, wait a second to attach
* Chrome Debugger to renderer process * Chrome Debugger to renderer process
* https://stackoverflow.com/questions/52844870/debugging-electron-renderer-process-with-vscode * https://stackoverflow.com/questions/52844870/debugging-electron-renderer-process-with-vscode
*/ */

View File

@ -58,7 +58,7 @@ export class ReleaseStore extends ItemStore<HelmRelease> {
}); });
} }
watchSelecteNamespaces(): (() => void) { watchSelectedNamespaces(): (() => void) {
return reaction(() => namespaceStore.context.contextNamespaces, namespaces => { return reaction(() => namespaceStore.context.contextNamespaces, namespaces => {
this.loadAll(namespaces); this.loadAll(namespaces);
}); });

View File

@ -56,7 +56,7 @@ export class HelmReleases extends Component<Props> {
componentDidMount() { componentDidMount() {
disposeOnUnmount(this, [ disposeOnUnmount(this, [
releaseStore.watchAssociatedSecrets(), releaseStore.watchAssociatedSecrets(),
releaseStore.watchSelecteNamespaces(), releaseStore.watchSelectedNamespaces(),
]); ]);
} }

View File

@ -225,7 +225,7 @@ export class ExtensionInstallationStateStore {
} }
/** /**
* If there is at least one extension currently ininstalling * If there is at least one extension currently uninstalling
*/ */
static get anyUninstalling(): boolean { static get anyUninstalling(): boolean {
return ExtensionInstallationStateStore.uninstalling > 0; return ExtensionInstallationStateStore.uninstalling > 0;

View File

@ -49,7 +49,7 @@ import { docsUrl } from "../../../common/vars";
function getMessageFromError(error: any): string { function getMessageFromError(error: any): string {
if (!error || typeof error !== "object") { if (!error || typeof error !== "object") {
return "an error has occured"; return "an error has occurred";
} }
if (error.message) { if (error.message) {
@ -63,7 +63,7 @@ function getMessageFromError(error: any): string {
const rawMessage = String(error); const rawMessage = String(error);
if (rawMessage === String({})) { if (rawMessage === String({})) {
return "an error has occured"; return "an error has occurred";
} }
return rawMessage; return rawMessage;

View File

@ -107,7 +107,7 @@ export class AddHelmRepoDialog extends React.Component<Props> {
async addCustomRepo() { async addCustomRepo() {
try { try {
await HelmRepoManager.addСustomRepo(this.helmRepo); await HelmRepoManager.addCustomRepo(this.helmRepo);
Notifications.ok(<>Helm repository <b>{this.helmRepo.name}</b> has added</>); Notifications.ok(<>Helm repository <b>{this.helmRepo.name}</b> has added</>);
this.props.onAddRepo(); this.props.onAddRepo();
this.close(); this.close();
@ -145,7 +145,7 @@ export class AddHelmRepoDialog extends React.Component<Props> {
/> />
{this.renderFileInput(`Key file`, FileType.KeyFile, AddHelmRepoDialog.keyExtensions)} {this.renderFileInput(`Key file`, FileType.KeyFile, AddHelmRepoDialog.keyExtensions)}
{this.renderFileInput(`Ca file`, FileType.CaFile, AddHelmRepoDialog.certExtensions)} {this.renderFileInput(`Ca file`, FileType.CaFile, AddHelmRepoDialog.certExtensions)}
{this.renderFileInput(`Cerificate file`, FileType.CertFile, AddHelmRepoDialog.certExtensions)} {this.renderFileInput(`Certificate file`, FileType.CertFile, AddHelmRepoDialog.certExtensions)}
<SubTitle title="Chart Repository Credentials" /> <SubTitle title="Chart Repository Credentials" />
<Input <Input
placeholder="Username" placeholder="Username"

View File

@ -81,7 +81,7 @@ export class Preferences extends React.Component {
const fragment = hash.slice(1); // hash is /^(#\w.)?$/ const fragment = hash.slice(1); // hash is /^(#\w.)?$/
if (fragment) { if (fragment) {
// ignore empty framents // ignore empty fragments
document.getElementById(fragment)?.scrollIntoView(); document.getElementById(fragment)?.scrollIntoView();
} }
}, { }, {

View File

@ -47,7 +47,7 @@ describe("<BottomBar />", () => {
expect(container).toBeInstanceOf(HTMLElement); expect(container).toBeInstanceOf(HTMLElement);
}); });
it("renders w/o errors when .getItems() returns unexpected (not type complient) data", async () => { it("renders w/o errors when .getItems() returns unexpected (not type compliant) data", async () => {
StatusBarRegistry.getInstance().getItems = jest.fn().mockImplementationOnce(() => undefined); StatusBarRegistry.getInstance().getItems = jest.fn().mockImplementationOnce(() => undefined);
expect(() => render(<BottomBar />)).not.toThrow(); expect(() => render(<BottomBar />)).not.toThrow();
StatusBarRegistry.getInstance().getItems = jest.fn().mockImplementationOnce(() => "hello"); StatusBarRegistry.getInstance().getItems = jest.fn().mockImplementationOnce(() => "hello");

View File

@ -52,8 +52,8 @@ export class ClusterAccessibleNamespaces extends React.Component<Props> {
}} }}
validators={systemName} validators={systemName}
items={Array.from(this.namespaces)} items={Array.from(this.namespaces)}
remove={({ oldItem: oldNamesapce }) => { remove={({ oldItem: oldNamespace }) => {
this.namespaces.delete(oldNamesapce); this.namespaces.delete(oldNamespace);
this.props.cluster.accessibleNamespaces = Array.from(this.namespaces); this.props.cluster.accessibleNamespaces = Array.from(this.namespaces);
}} }}
inputTheme="round-black" inputTheme="round-black"

View File

@ -35,7 +35,7 @@ export class ErrorBoundary extends React.Component {
<Sentry.ErrorBoundary <Sentry.ErrorBoundary
fallback={({ error, componentStack, resetError }) => { fallback={({ error, componentStack, resetError }) => {
const slackLink = <a href={slackUrl} rel="noreferrer" target="_blank">Slack</a>; const slackLink = <a href={slackUrl} rel="noreferrer" target="_blank">Slack</a>;
const githubLink = <a href={issuesTrackerUrl} rel="noreferrer" target="_blank">Github</a>; const githubLink = <a href={issuesTrackerUrl} rel="noreferrer" target="_blank">GitHub</a>;
const pageUrl = location.pathname; const pageUrl = location.pathname;
return ( return (

View File

@ -127,7 +127,7 @@ export class FilePicker extends React.Component<Props> {
return files; return files;
} }
handleIndiviualFileSizes(files: File[]): File[] { handleIndividualFileSizes(files: File[]): File[] {
const { onOverSizeLimit, maxSize } = this.props; const { onOverSizeLimit, maxSize } = this.props;
switch (onOverSizeLimit) { switch (onOverSizeLimit) {
@ -178,7 +178,7 @@ export class FilePicker extends React.Component<Props> {
try { try {
const numberLimitedFiles = this.handleFileCount(files); const numberLimitedFiles = this.handleFileCount(files);
const sizeLimitedFiles = this.handleIndiviualFileSizes(numberLimitedFiles); const sizeLimitedFiles = this.handleIndividualFileSizes(numberLimitedFiles);
const totalSizeLimitedFiles = this.handleTotalFileSizes(sizeLimitedFiles); const totalSizeLimitedFiles = this.handleTotalFileSizes(sizeLimitedFiles);
if ("uploadDir" in this.props) { if ("uploadDir" in this.props) {

View File

@ -63,7 +63,7 @@ interface SplitStatusesByLevel {
} }
/** /**
* This fuction returns the class level for corresponding to the highest status level * This function returns the class level for corresponding to the highest status level
* and the statuses split by their levels. * and the statuses split by their levels.
* @param src a list of status items * @param src a list of status items
*/ */

View File

@ -383,8 +383,8 @@
blockquote { blockquote {
padding: 8px 1em; padding: 8px 1em;
color: $helmDescriptionBlockqouteColor; color: $helmDescriptionBlockquoteColor;
border-left: 0.25em solid $helmDescriptionBlockqouteBorder; border-left: 0.25em solid $helmDescriptionBlockquoteBorder;
background: $helmDescriptionBlockquoteBackground; background: $helmDescriptionBlockquoteBackground;
} }

View File

@ -39,7 +39,7 @@ export interface Notification {
message: NotificationMessage; message: NotificationMessage;
status?: NotificationStatus; status?: NotificationStatus;
timeout?: number; // auto-hiding timeout in milliseconds, 0 = no hide timeout?: number; // auto-hiding timeout in milliseconds, 0 = no hide
onClose?(): void; // additonal logic on when the notification times out or is closed by the "x" onClose?(): void; // additional logic on when the notification times out or is closed by the "x"
} }
export class NotificationsStore { export class NotificationsStore {

View File

@ -100,7 +100,7 @@ interface Props {
minExtent?: number; minExtent?: number;
/** /**
* The following events are triggerred with respect to the above values. * The following events are triggered with respect to the above values.
* - The "__Exceed" call will be made when the unbounded extent goes from * - The "__Exceed" call will be made when the unbounded extent goes from
* < the above to >= the above * < the above to >= the above
* - The "__Subceed" call is similar but is triggered when the unbounded * - The "__Subceed" call is similar but is triggered when the unbounded

View File

@ -44,8 +44,8 @@
"helmStableRepo": "#3d90ce", "helmStableRepo": "#3d90ce",
"helmIncubatorRepo": "#ff7043", "helmIncubatorRepo": "#ff7043",
"helmDescriptionHr": "#41474a", "helmDescriptionHr": "#41474a",
"helmDescriptionBlockqouteColor": "#bbb", "helmDescriptionBlockquoteColor": "#bbb",
"helmDescriptionBlockqouteBorder": "#8a8f93", "helmDescriptionBlockquoteBorder": "#8a8f93",
"helmDescriptionBlockquoteBackground": "#3b4348", "helmDescriptionBlockquoteBackground": "#3b4348",
"helmDescriptionHeaders": "#3e4147", "helmDescriptionHeaders": "#3e4147",
"helmDescriptionH6": "#6a737d", "helmDescriptionH6": "#6a737d",
@ -113,7 +113,7 @@
"iconActiveColor": "#ffffff", "iconActiveColor": "#ffffff",
"iconActiveBackground": "#ffffff18", "iconActiveBackground": "#ffffff18",
"filterAreaBackground": "#23272b", "filterAreaBackground": "#23272b",
"chartLiveBarBackgound": "#00000033", "chartLiveBarBackground": "#00000033",
"chartStripesColor": "#ffffff08", "chartStripesColor": "#ffffff08",
"chartCapacityColor": "#4c545f", "chartCapacityColor": "#4c545f",
"pieChartDefaultColor": "#30353a", "pieChartDefaultColor": "#30353a",

View File

@ -45,8 +45,8 @@
"helmStableRepo": "#3d90ce", "helmStableRepo": "#3d90ce",
"helmIncubatorRepo": "#ff7043", "helmIncubatorRepo": "#ff7043",
"helmDescriptionHr": "#dddddd", "helmDescriptionHr": "#dddddd",
"helmDescriptionBlockqouteColor": "#555555", "helmDescriptionBlockquoteColor": "#555555",
"helmDescriptionBlockqouteBorder": "#8a8f93", "helmDescriptionBlockquoteBorder": "#8a8f93",
"helmDescriptionBlockquoteBackground": "#eeeeee", "helmDescriptionBlockquoteBackground": "#eeeeee",
"helmDescriptionHeaders": "#3e4147", "helmDescriptionHeaders": "#3e4147",
"helmDescriptionH6": "#6a737d", "helmDescriptionH6": "#6a737d",
@ -114,7 +114,7 @@
"iconActiveColor": "#ffffff", "iconActiveColor": "#ffffff",
"iconActiveBackground": "#a6a6a694", "iconActiveBackground": "#a6a6a694",
"filterAreaBackground": "#f7f7f7", "filterAreaBackground": "#f7f7f7",
"chartLiveBarBackgound": "#00000033", "chartLiveBarBackground": "#00000033",
"chartStripesColor": "#00000009", "chartStripesColor": "#00000009",
"chartCapacityColor": "#cccccc", "chartCapacityColor": "#cccccc",
"pieChartDefaultColor": "#efefef", "pieChartDefaultColor": "#efefef",

View File

@ -74,8 +74,8 @@ $helmImgBackground: var(--helmImgBackground);
$helmStableRepo: var(--helmStableRepo); $helmStableRepo: var(--helmStableRepo);
$helmIncubatorRepo: var(--helmIncubatorRepo); $helmIncubatorRepo: var(--helmIncubatorRepo);
$helmDescriptionHr: var(--helmDescriptionHr); $helmDescriptionHr: var(--helmDescriptionHr);
$helmDescriptionBlockqouteColor: var(--helmDescriptionBlockqouteColor); $helmDescriptionBlockquoteColor: var(--helmDescriptionBlockquoteColor);
$helmDescriptionBlockqouteBorder: var(--helmDescriptionBlockqouteBorder); $helmDescriptionBlockquoteBorder: var(--helmDescriptionBlockquoteBorder);
$helmDescriptionBlockquoteBackground: var(--helmDescriptionBlockquoteBackground); $helmDescriptionBlockquoteBackground: var(--helmDescriptionBlockquoteBackground);
$helmDescriptionHeaders: var(--helmDescriptionHeaders); $helmDescriptionHeaders: var(--helmDescriptionHeaders);
$helmDescriptionH6: var(--helmDescriptionH6); $helmDescriptionH6: var(--helmDescriptionH6);
@ -132,7 +132,7 @@ $drawerItemNameColor: var(--drawerItemNameColor);
$drawerItemValueColor: var(--drawerItemValueColor); $drawerItemValueColor: var(--drawerItemValueColor);
// Charts // Charts
$chartLiveBarBackgound: var(--chartLiveBarBackgound); $chartLiveBarBackground: var(--chartLiveBarBackground);
$chartStripesColor: var(--chartStripesColor); $chartStripesColor: var(--chartStripesColor);
$chartCapacityColor: var(--chartCapacityColor); $chartCapacityColor: var(--chartCapacityColor);
$pieChartDefaultColor: var(--pieChartDefaultColor); $pieChartDefaultColor: var(--pieChartDefaultColor);

View File

@ -28,7 +28,7 @@ describe("parseJsonPath", () => {
expect(res).toBe(".metadata.labels['kubesphere.io/alias-name']"); expect(res).toBe(".metadata.labels['kubesphere.io/alias-name']");
}); });
test("should convert keys with escpaped charatecrs to use indexed notation", () => { test("should convert keys with escaped characters to use indexed notation", () => {
const res = parseJsonPath(".metadata.labels.kubesphere\\\"io/alias-name"); const res = parseJsonPath(".metadata.labels.kubesphere\\\"io/alias-name");
expect(res).toBe(".metadata.labels['kubesphere\"io/alias-name']"); expect(res).toBe(".metadata.labels['kubesphere\"io/alias-name']");

View File

@ -48,7 +48,7 @@ function convertToIndexNotation(key: string, firstItem = false) {
} }
return `['${key}']`; return `['${key}']`;
} else { // no illegal chracters found, do not touch } else { // no illegal characters found, do not touch
const prefix = firstItem ? "" : "."; const prefix = firstItem ? "" : ".";
return `${prefix}${key}`; return `${prefix}${key}`;