mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Deployed e87b4836be to master with MkDocs 1.2.1 and mike 1.0.1
This commit is contained in:
1 parent
d341619ca5
commit
6322053115
13 files changed
+285
-285
No files matched your search
@@ -995,7 +995,7 @@
|
||||
</table>
|
||||
<h4 id="returns_2">Returns<a class="headerlink" href="#returns_2" title="Permanent link">#</a></h4>
|
||||
<p><code>Disposer</code></p>
|
||||
<p>An optional disopser, Lens will cleanup when the extension is disabled or uninstalled even if this is not called</p>
|
||||
<p>An optional disposer, Lens will cleanup when the extension is disabled or uninstalled even if this is not called</p>
|
||||
<hr />
|
||||
<h3 id="createinstance">createInstance<a class="headerlink" href="#createinstance" title="Permanent link">#</a></h3>
|
||||
<p>▸ <code>Static</code> <strong>createInstance</strong><T, R>(...<code>args</code>): <code>T</code></p>
|
||||
|
||||
@@ -1109,7 +1109,7 @@
|
||||
<p>▸ <strong>getExtensionFileFolder</strong>(): <code>Promise</code><string></p>
|
||||
<p>getExtensionFileFolder returns the path to an already created folder. This
|
||||
folder is for the sole use of this extension.</p>
|
||||
<p>Note: there is no security done on this folder, only obfiscation of the
|
||||
<p>Note: there is no security done on this folder, only obfuscation of the
|
||||
folder name.</p>
|
||||
<h4 id="returns_6">Returns<a class="headerlink" href="#returns_6" title="Permanent link">#</a></h4>
|
||||
<p><code>Promise</code><string></p>
|
||||
|
||||
@@ -1220,7 +1220,7 @@
|
||||
<p>▸ <strong>getExtensionFileFolder</strong>(): <code>Promise</code><string></p>
|
||||
<p>getExtensionFileFolder returns the path to an already created folder. This
|
||||
folder is for the sole use of this extension.</p>
|
||||
<p>Note: there is no security done on this folder, only obfiscation of the
|
||||
<p>Note: there is no security done on this folder, only obfuscation of the
|
||||
folder name.</p>
|
||||
<h4 id="returns_5">Returns<a class="headerlink" href="#returns_5" title="Permanent link">#</a></h4>
|
||||
<p><code>Promise</code><string></p>
|
||||
|
||||
@@ -806,7 +806,7 @@ In this section you will learn how this extension works under the hood.</p>
|
||||
<p>The Hello World sample extension does three things:</p>
|
||||
<ul>
|
||||
<li>Implements <code>onActivate()</code> and outputs a message to the console.</li>
|
||||
<li>Implements <code>onDectivate()</code> and outputs a message to the console.</li>
|
||||
<li>Implements <code>onDeactivate()</code> and outputs a message to the console.</li>
|
||||
<li>Registers <code>ClusterPage</code> so that the page is visible in the left-side menu of the cluster dashboard.</li>
|
||||
</ul>
|
||||
<p>Let's take a closer look at our Hello World sample's source code and see how these three things are achieved.</p>
|
||||
|
||||
@@ -849,7 +849,7 @@ To reload Lens, enter <code>CMD+R</code> on Mac and <code>Ctrl+R</code> on Windo
|
||||
<p>To dive deeper, consider looking at <a href="../../capabilities/common-capabilities/">Common Capabilities</a>, <a href="../../capabilities/styling/">Styling</a>, or <a href="../anatomy/">Extension Anatomy</a>.</p>
|
||||
<p>If you find problems with the Lens Extension Generator, or have feature requests, you are welcome to raise an <a href="https://github.com/lensapp/generator-lens-ext/issues">issue</a>.
|
||||
You can find the latest Lens contribution guidelines <a href="https://docs.k8slens.dev/latest/contributing">here</a>.</p>
|
||||
<p>The Generator source code is hosted at <a href="https://github.com/lensapp/generator-lens-ext">Github</a>.</p>
|
||||
<p>The Generator source code is hosted at <a href="https://github.com/lensapp/generator-lens-ext">GitHub</a>.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -937,7 +937,7 @@ Also, we can define needed sorting callbacks and search filters for the list:</p
|
||||
<span class="k">return</span> <span class="p">(</span>
|
||||
<span class="o"><</span><span class="nx">TabLayout</span><span class="o">></span>
|
||||
<span class="o"><</span><span class="nx">KubeObjectListLayout</span>
|
||||
<span class="nx">className</span><span class="o">=</span><span class="s2">"Certicates"</span> <span class="nx">store</span><span class="o">=</span><span class="p">{</span><span class="nx">certificatesStore</span><span class="p">}</span>
|
||||
<span class="nx">className</span><span class="o">=</span><span class="s2">"Certificates"</span> <span class="nx">store</span><span class="o">=</span><span class="p">{</span><span class="nx">certificatesStore</span><span class="p">}</span>
|
||||
<span class="nx">sortingCallbacks</span><span class="o">=</span><span class="p">{{</span>
|
||||
<span class="p">[</span><span class="nx">sortBy</span><span class="p">.</span><span class="nx">name</span><span class="p">]</span><span class="o">:</span> <span class="p">(</span><span class="nx">certificate</span>: <span class="kt">Certificate</span><span class="p">)</span> <span class="o">=></span> <span class="nx">certificate</span><span class="p">.</span><span class="nx">getName</span><span class="p">(),</span>
|
||||
<span class="p">[</span><span class="nx">sortBy</span><span class="p">.</span><span class="nx">namespace</span><span class="p">]</span><span class="o">:</span> <span class="p">(</span><span class="nx">certificate</span>: <span class="kt">Certificate</span><span class="p">)</span> <span class="o">=></span> <span class="nx">certificate</span><span class="p">.</span><span class="nx">metadata</span><span class="p">.</span><span class="nx">namespace</span><span class="p">,</span>
|
||||
|
||||
@@ -893,7 +893,7 @@ Note that pages are associated with the <a href="../renderer-extension/"><code>R
|
||||
<span class="p">}</span>
|
||||
</code></pre></div>
|
||||
<p>When the menu item is clicked the <code>navigate()</code> method looks for and displays a global page with id <code>"myGlobalPage"</code>.
|
||||
This page would be defined in your extension's <code>Renderer.LensExtension</code> implmentation (See <a href="../renderer-extension/"><code>Renderer.LensExtension</code></a>).</p>
|
||||
This page would be defined in your extension's <code>Renderer.LensExtension</code> implementation (See <a href="../renderer-extension/"><code>Renderer.LensExtension</code></a>).</p>
|
||||
<h3 id="addcatalogsource-and-removecatalogsource-methods"><code>addCatalogSource()</code> and <code>removeCatalogSource()</code> Methods<a class="headerlink" href="#addcatalogsource-and-removecatalogsource-methods" title="Permanent link">#</a></h3>
|
||||
<p>The <code>Main.LensExtension</code> class also provides the <code>addCatalogSource()</code> and <code>removeCatalogSource()</code> methods, for managing custom catalog items (or entities).
|
||||
See the <a href="../catalog/"><code>Catalog</code></a> documentation for full details about the catalog.</p>
|
||||
|
||||
@@ -797,7 +797,7 @@ This is the cluster that the resource stack will be applied to, and the construc
|
||||
<code>kubectlApplyFolder()</code> applies to the cluster all kubernetes resources found in the folder passed to it, in this case <code>../resources</code>.
|
||||
Similarly, <code>ExampleClusterFeature</code> implements an <code>uninstall()</code> method which simply invokes the <code>kubectlDeleteFolder()</code> method of the <code>Renderer.K8sApi.ResourceStack</code> class.
|
||||
<code>kubectlDeleteFolder()</code> tries to delete from the cluster all kubernetes resources found in the folder passed to it, again in this case <code>../resources</code>. </p>
|
||||
<p><code>ExampleClusterFeature</code> also implements an <code>isInstalled()</code> method, which demonstrates how you can utiliize the kubernetes api to inspect the resource stack status.
|
||||
<p><code>ExampleClusterFeature</code> also implements an <code>isInstalled()</code> method, which demonstrates how you can utilize the kubernetes api to inspect the resource stack status.
|
||||
<code>isInstalled()</code> simply tries to find a pod named <code>example-pod</code>, 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.</p>
|
||||
<p>To allow the end-user to control the life cycle of this cluster feature the following code sample shows how to implement a user interface based on React and custom Lens UI components:</p>
|
||||
|
||||
@@ -889,8 +889,8 @@ This can be done in <code>./renderer.ts</code>:</p>
|
||||
<span class="k">return</span> <span class="p">(</span>
|
||||
<span class="o"><</span><span class="nx">Checkbox</span>
|
||||
<span class="nx">label</span><span class="o">=</span><span class="s2">"I understand appPreferences"</span>
|
||||
<span class="nx">value</span><span class="o">=</span><span class="p">{</span><span class="nx">ExamplePreferencesStore</span><span class="p">.</span><span class="nx">getInstace</span><span class="p">().</span><span class="nx">enabled</span><span class="p">}</span>
|
||||
<span class="nx">onChange</span><span class="o">=</span><span class="p">{</span><span class="nx">v</span> <span class="o">=></span> <span class="p">{</span> <span class="nx">ExamplePreferencesStore</span><span class="p">.</span><span class="nx">getInstace</span><span class="p">().</span><span class="nx">enabled</span> <span class="o">=</span> <span class="nx">v</span><span class="p">;</span> <span class="p">}}</span>
|
||||
<span class="nx">value</span><span class="o">=</span><span class="p">{</span><span class="nx">ExamplePreferencesStore</span><span class="p">.</span><span class="nx">getInstance</span><span class="p">().</span><span class="nx">enabled</span><span class="p">}</span>
|
||||
<span class="nx">onChange</span><span class="o">=</span><span class="p">{</span><span class="nx">v</span> <span class="o">=></span> <span class="p">{</span> <span class="nx">ExamplePreferencesStore</span><span class="p">.</span><span class="nx">getInstance</span><span class="p">().</span><span class="nx">enabled</span> <span class="o">=</span> <span class="nx">v</span><span class="p">;</span> <span class="p">}}</span>
|
||||
<span class="o">/></span>
|
||||
<span class="p">);</span>
|
||||
<span class="p">}</span>
|
||||
|
||||
@@ -843,7 +843,7 @@ The following will be a quick walk through on how to make the tarball which will
|
||||
<p>Say you have your project folder at <code>~/my-extension/</code> and you want to create an NPM package we need to do the following within your git repo:</p>
|
||||
<div class="highlight"><pre><span></span><code>npm pack
|
||||
</code></pre></div>
|
||||
<p>This will create a NPM tarball that can be hosted on Github Releases or any other publicly available file hosting service.</p>
|
||||
<p>This will create a NPM tarball that can be hosted on GitHub Releases or any other publicly available file hosting service.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"Lens Extension API # Customize and enhance the Lens experience with the Lens Extension API. Use the extension API to create menus or page content. The same extension API was used to create many of Lens's core features. To install your first extension you should goto the extension page in lens. This documentation describes: How to build, run, test, and publish an extension. How to take full advantage of the Lens Extension API. Where to find guides and code samples to help get you started. What Extensions Can Do # Here are some examples of what you can achieve with the Extension API: Add custom components & views in the UI - Extending the Lens Workbench For an overview of the Lens Extension API, refer to the Common Capabilities page. Extension Guides Overview also includes a list of code samples and guides that illustrate various ways of using the Lens Extension API. How to Build Extensions # Here is what each section of the Lens Extension API docs can help you with: Getting Started teaches fundamental concepts for building extensions with the Hello World sample. Extension Capabilities dissects Lens's Extension API into smaller categories and points you to more detailed topics. Extension Guides includes guides and code samples that explain specific usages of Lens Extension API. Testing and Publishing includes in-depth guides on various extension development topics, such as testing and publishing extensions. API Reference contains exhaustive references for the Lens Extension API, Contribution Points, and many other topics. What's New # Just like Lens itself, the extension API updates on a monthly cadence, rolling out new features with every release. Keep up with Lens and the Lens Extension API by reviewing the release notes . Important changes since Lens v4 # Lens has undergone major design improvements in v5, which have resulted in several large changes to the extension API. Workspaces are gone, and the catalog is introduced for containing clusters, as well as other items, including custom entities. Lens has migrated from using mobx 5 to mobx 6 for internal state management, and this may have ramifications for extension implementations. Although the API retains many components from v4, given these changes, extensions written for Lens v4 are not compatible with the Lens v5 extension API. See the Lens v4 to v5 extension migration notes on getting old extensions working in Lens v5. Looking for Help # If you have questions for extension development, try asking on the Lens Dev Slack . It's a public chatroom for Lens developers, where Lens team members chime in from time to time. To provide feedback on the documentation or issues with the Lens Extension API, create new issues at lensapp/lens . Please use the labels area/documentation and/or area/extension . Downloading Lens # Download Lens for macOS, Windows, or Linux.","title":"Overview"},{"location":"#lens-extension-api","text":"Customize and enhance the Lens experience with the Lens Extension API. Use the extension API to create menus or page content. The same extension API was used to create many of Lens's core features. To install your first extension you should goto the extension page in lens. This documentation describes: How to build, run, test, and publish an extension. How to take full advantage of the Lens Extension API. Where to find guides and code samples to help get you started.","title":"Lens Extension API"},{"location":"#what-extensions-can-do","text":"Here are some examples of what you can achieve with the Extension API: Add custom components & views in the UI - Extending the Lens Workbench For an overview of the Lens Extension API, refer to the Common Capabilities page. Extension Guides Overview also includes a list of code samples and guides that illustrate various ways of using the Lens Extension API.","title":"What Extensions Can Do"},{"location":"#how-to-build-extensions","text":"Here is what each section of the Lens Extension API docs can help you with: Getting Started teaches fundamental concepts for building extensions with the Hello World sample. Extension Capabilities dissects Lens's Extension API into smaller categories and points you to more detailed topics. Extension Guides includes guides and code samples that explain specific usages of Lens Extension API. Testing and Publishing includes in-depth guides on various extension development topics, such as testing and publishing extensions. API Reference contains exhaustive references for the Lens Extension API, Contribution Points, and many other topics.","title":"How to Build Extensions"},{"location":"#whats-new","text":"Just like Lens itself, the extension API updates on a monthly cadence, rolling out new features with every release. Keep up with Lens and the Lens Extension API by reviewing the release notes .","title":"What's New"},{"locationLine truncated
|
||||
{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"Lens Extension API # Customize and enhance the Lens experience with the Lens Extension API. Use the extension API to create menus or page content. The same extension API was used to create many of Lens's core features. To install your first extension you should goto the extension page in lens. This documentation describes: How to build, run, test, and publish an extension. How to take full advantage of the Lens Extension API. Where to find guides and code samples to help get you started. What Extensions Can Do # Here are some examples of what you can achieve with the Extension API: Add custom components & views in the UI - Extending the Lens Workbench For an overview of the Lens Extension API, refer to the Common Capabilities page. Extension Guides Overview also includes a list of code samples and guides that illustrate various ways of using the Lens Extension API. How to Build Extensions # Here is what each section of the Lens Extension API docs can help you with: Getting Started teaches fundamental concepts for building extensions with the Hello World sample. Extension Capabilities dissects Lens's Extension API into smaller categories and points you to more detailed topics. Extension Guides includes guides and code samples that explain specific usages of Lens Extension API. Testing and Publishing includes in-depth guides on various extension development topics, such as testing and publishing extensions. API Reference contains exhaustive references for the Lens Extension API, Contribution Points, and many other topics. What's New # Just like Lens itself, the extension API updates on a monthly cadence, rolling out new features with every release. Keep up with Lens and the Lens Extension API by reviewing the release notes . Important changes since Lens v4 # Lens has undergone major design improvements in v5, which have resulted in several large changes to the extension API. Workspaces are gone, and the catalog is introduced for containing clusters, as well as other items, including custom entities. Lens has migrated from using mobx 5 to mobx 6 for internal state management, and this may have ramifications for extension implementations. Although the API retains many components from v4, given these changes, extensions written for Lens v4 are not compatible with the Lens v5 extension API. See the Lens v4 to v5 extension migration notes on getting old extensions working in Lens v5. Looking for Help # If you have questions for extension development, try asking on the Lens Dev Slack . It's a public chatroom for Lens developers, where Lens team members chime in from time to time. To provide feedback on the documentation or issues with the Lens Extension API, create new issues at lensapp/lens . Please use the labels area/documentation and/or area/extension . Downloading Lens # Download Lens for macOS, Windows, or Linux.","title":"Overview"},{"location":"#lens-extension-api","text":"Customize and enhance the Lens experience with the Lens Extension API. Use the extension API to create menus or page content. The same extension API was used to create many of Lens's core features. To install your first extension you should goto the extension page in lens. This documentation describes: How to build, run, test, and publish an extension. How to take full advantage of the Lens Extension API. Where to find guides and code samples to help get you started.","title":"Lens Extension API"},{"location":"#what-extensions-can-do","text":"Here are some examples of what you can achieve with the Extension API: Add custom components & views in the UI - Extending the Lens Workbench For an overview of the Lens Extension API, refer to the Common Capabilities page. Extension Guides Overview also includes a list of code samples and guides that illustrate various ways of using the Lens Extension API.","title":"What Extensions Can Do"},{"location":"#how-to-build-extensions","text":"Here is what each section of the Lens Extension API docs can help you with: Getting Started teaches fundamental concepts for building extensions with the Hello World sample. Extension Capabilities dissects Lens's Extension API into smaller categories and points you to more detailed topics. Extension Guides includes guides and code samples that explain specific usages of Lens Extension API. Testing and Publishing includes in-depth guides on various extension development topics, such as testing and publishing extensions. API Reference contains exhaustive references for the Lens Extension API, Contribution Points, and many other topics.","title":"How to Build Extensions"},{"location":"#whats-new","text":"Just like Lens itself, the extension API updates on a monthly cadence, rolling out new features with every release. Keep up with Lens and the Lens Extension API by reviewing the release notes .","title":"What's New"},{"locationLine truncated
|
||||
+273
-273
File diff suppressed because it is too large.
Load diff
Binary file not shown.
Reference in new issue
Block a user