mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Deployed cd4660b8 to master with MkDocs 1.1.2 and mike 0.5.5
This commit is contained in:
1 parent
50ac71f737
commit
ac88b735dc
191 files changed
+3814
-3268
No files matched your search
@@ -882,7 +882,7 @@
|
||||
<span class="p">}</span>
|
||||
<span class="p">}</span>
|
||||
</code></pre></div>
|
||||
<p>There are two methods that you can implement to facilitate running your custom code. <code>onActivate()</code> is called when your extension has been successfully enabled. By overriding <code>onActivate()</code> you can initiate your custom code. <code>onDeactivate()</code> is called when the extension is disabled (typically from the <a href="">Lens Extensions Page</a>) and when implemented gives you a chance to clean up after your extension, if necessary. The example above simply logs messages when the extension is enabled and disabled. Note that to see standard output from the main process there must be a console connected to it. This is typically achieved by starting Lens from the command prompt.</p>
|
||||
<p>There are two methods that you can implement to facilitate running your custom code. <code>onActivate()</code> is called when your extension has been successfully enabled. By implementing <code>onActivate()</code> you can initiate your custom code. <code>onDeactivate()</code> is called when the extension is disabled (typically from the <a href="">Lens Extensions Page</a>) and when implemented gives you a chance to clean up after your extension, if necessary. The example above simply logs messages when the extension is enabled and disabled. Note that to see standard output from the main process there must be a console connected to it. This is typically achieved by starting Lens from the command prompt.</p>
|
||||
<p>The following example is a little more interesting in that it accesses some Lens state data and periodically logs the name of the currently active cluster in Lens.</p>
|
||||
<div class="highlight"><pre><span></span><code><span class="kr">import</span> <span class="p">{</span> <span class="nx">LensMainExtension</span><span class="p">,</span> <span class="nx">Store</span> <span class="p">}</span> <span class="nx">from</span> <span class="s2">"@k8slens/extensions"</span><span class="p">;</span>
|
||||
|
||||
|
||||
Reference in new issue
Block a user