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:
1 parent
9903417fed
commit
e87b4836be
39 files changed
+54
-54
No files matched your search
@@ -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:
|
||||
|
||||
- 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.
|
||||
|
||||
Let's take a closer look at our Hello World sample's source code and see how these three things are achieved.
|
||||
|
||||
@@ -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).
|
||||
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).
|
||||
@@ -213,7 +213,7 @@ export class CertificatePage extends React.Component<{ extension: LensRendererEx
|
||||
return (
|
||||
<TabLayout>
|
||||
<KubeObjectListLayout
|
||||
className="Certicates" store={certificatesStore}
|
||||
className="Certificates" store={certificatesStore}
|
||||
sortingCallbacks={{
|
||||
[sortBy.name]: (certificate: Certificate) => certificate.getName(),
|
||||
[sortBy.namespace]: (certificate: Certificate) => certificate.metadata.namespace,
|
||||
|
||||
@@ -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"`.
|
||||
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
|
||||
|
||||
|
||||
@@ -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.
|
||||
`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.
|
||||
This method can be useful in creating a context-sensitive UI for installing/uninstalling the feature, as demonstrated in the next sample code.
|
||||
|
||||
|
||||
@@ -148,8 +148,8 @@ export class ExamplePreferenceInput extends React.Component {
|
||||
return (
|
||||
<Checkbox
|
||||
label="I understand appPreferences"
|
||||
value={ExamplePreferencesStore.getInstace().enabled}
|
||||
onChange={v => { ExamplePreferencesStore.getInstace().enabled = v; }}
|
||||
value={ExamplePreferencesStore.getInstance().enabled}
|
||||
onChange={v => { ExamplePreferencesStore.getInstance().enabled = v; }}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -43,4 +43,4 @@ Say you have your project folder at `~/my-extension/` and you want to create an
|
||||
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.
|
||||
Reference in new issue
Block a user