mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Implement KubeObjectStatusText extension API (#1188)
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
1 parent
d15692a50e
commit
85c4a10114
64 files changed
+4050
-66
No files matched your search
@@ -13,10 +13,10 @@ import { eventStore } from "../+events/event.store";
|
||||
import { KubeObjectMenuProps } from "../kube-object/kube-object-menu";
|
||||
import { ICronJobsRouteParams } from "../+workloads";
|
||||
import { KubeObjectListLayout } from "../kube-object";
|
||||
import { KubeEventIcon } from "../+events/kube-event-icon";
|
||||
import { _i18n } from "../../i18n";
|
||||
import { CronJobTriggerDialog } from "./cronjob-trigger-dialog";
|
||||
import { kubeObjectMenuRegistry } from "../../../extensions/registries/kube-object-menu-registry";
|
||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||
|
||||
enum sortBy {
|
||||
name = "name",
|
||||
@@ -62,11 +62,7 @@ export class CronJobs extends React.Component<Props> {
|
||||
]}
|
||||
renderTableContents={(cronJob: CronJob) => [
|
||||
cronJob.getName(),
|
||||
<KubeEventIcon object={cronJob} filterEvents={events => {
|
||||
if (!cronJob.isNeverRun()) return events;
|
||||
return events.filter(event => event.reason != "FailedNeedsStart");
|
||||
}
|
||||
}/>,
|
||||
<KubeObjectStatusIcon object={cronJob} />,
|
||||
cronJob.getNs(),
|
||||
cronJob.isNeverRun() ? <Trans>never</Trans> : cronJob.getSchedule(),
|
||||
cronJob.getSuspendFlag(),
|
||||
|
||||
Reference in new issue
Block a user