mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
1 parent
87babc8f2c
commit
fe212ad313
2 files changed
+2
-2
No files matched your search
@@ -230,7 +230,7 @@ export abstract class CatalogEntity<
|
|||||||
return this.metadata.name;
|
return this.metadata.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract onRun(context: CatalogEntityActionContext): void | Promise<void>;
|
public abstract onRun?(context: CatalogEntityActionContext): void | Promise<void>;
|
||||||
public abstract onContextMenuOpen(context: CatalogEntityContextMenuContext): void | Promise<void>;
|
public abstract onContextMenuOpen(context: CatalogEntityContextMenuContext): void | Promise<void>;
|
||||||
public abstract onSettingsOpen(context: CatalogEntitySettingsContext): void | Promise<void>;
|
public abstract onSettingsOpen(context: CatalogEntitySettingsContext): void | Promise<void>;
|
||||||
}
|
}
|
||||||
@@ -237,7 +237,7 @@ export class CatalogEntityRegistry {
|
|||||||
this.onBeforeRun(entity)
|
this.onBeforeRun(entity)
|
||||||
.then(doOnRun => {
|
.then(doOnRun => {
|
||||||
if (doOnRun) {
|
if (doOnRun) {
|
||||||
return entity.onRun(catalogEntityRunContext);
|
return entity.onRun?.(catalogEntityRunContext);
|
||||||
} else {
|
} else {
|
||||||
logger.debug(`onBeforeRun for ${entity.getId()} returned false`);
|
logger.debug(`onBeforeRun for ${entity.getId()} returned false`);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user