Deployed e87b4836be to master with MkDocs 1.2.1 and mike 1.0.1

This commit is contained in:
GitHub Action committed 2021-07-16 12:59:47 +00:00
1 parent d341619ca5
commit 6322053115
13 files changed
+285 -285

No files matched your search

@@ -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">&lt;</span><span class="nx">TabLayout</span><span class="o">&gt;</span>
<span class="o">&lt;</span><span class="nx">KubeObjectListLayout</span>
<span class="nx">className</span><span class="o">=</span><span class="s2">&quot;Certicates&quot;</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">&quot;Certificates&quot;</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">=&gt;</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">=&gt;</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>
+2 -2
View File
@@ -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">&lt;</span><span class="nx">Checkbox</span>
<span class="nx">label</span><span class="o">=</span><span class="s2">&quot;I understand appPreferences&quot;</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">=&gt;</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">=&gt;</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">/&gt;</span>
<span class="p">);</span>
<span class="p">}</span>