mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
added port-forward details (#4080)
* added port-forward details Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com> * address review comments, plus added toolbar/menu to port-forward details Drawer Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com> * added getById() to portForwardStore to eliminate direct items access from outside Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
This commit is contained in:
1 parent
f52a2295a2
commit
731f119b1b
5 files changed
+191
-2
No files matched your search
@@ -81,6 +81,16 @@ export class PortForwardStore extends ItemStore<PortForwardItem> {
|
||||
async removeSelectedItems() {
|
||||
return Promise.all(this.selectedItems.map(removePortForward));
|
||||
}
|
||||
|
||||
getById(id: string) {
|
||||
const index = this.getIndexById(id);
|
||||
|
||||
if (index === -1) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return this.getItems()[index];
|
||||
}
|
||||
}
|
||||
|
||||
interface PortForwardResult {
|
||||
|
||||
Reference in new issue
Block a user