diff --git a/front/components/generic/GenericView.vue b/front/components/generic/GenericView.vue index 95bcb0d..911d014 100644 --- a/front/components/generic/GenericView.vue +++ b/front/components/generic/GenericView.vue @@ -7,6 +7,7 @@ const props = withDefaults(defineProps<{model: object, group:string, short:strin }); const { loader } = await import("../../libs/core/importer") const { defineAsyncComponent, onMounted, elude, getColor, timeAgo, useItem, getProperties, colorItem, itemDefinition, iconItem, extraColumns } = await loader(props.group,props.short) +const { ref } = await import('vue') const { useRouter } = await import('vue-router') const router = useRouter(); const { setNamespacedItemFromRoute, setItemFromRoute } = await import('../../libs/core/navigation.js') @@ -14,16 +15,30 @@ const { $q, can, onlyReadProperties, toParentView, viewer, viewerUpdate, toEdit, if (namespaced) setNamespacedItemFromRoute(); else setItemFromRoute(); onMounted(() => { viewerUpdate(onlyReadProperties(props.model)) }) + +const PipelineRun = defineAsyncComponent(() => import( '@/components/tekton/PipelineRun.vue')); const OpenApiEdit = defineAsyncComponent(() => import( '@/components/openapi/OpenApiEdit.vue')); const EventList = defineAsyncComponent(() => import( '@/components/core/EventList.vue')); const MonacoViewer = defineAsyncComponent(() => import( '@/components/core/MonacoViewer.vue')); const OpenApiNamedIcon = defineAsyncComponent(() => import( '@/components/openapi/OpenApiNamedIcon.vue')); +const logViewTab = ref(( + ['TaskRun','Job','ReplicaSet','DaemonSet','StatefulSet'].includes(props.short) && props.model.childk8sPod != undefined && props.model.childk8sPod.filter(x=>x!=undefined).map(pod=>pod.childcoreContainer.filter(c=>!c.init)).flat().length>0)?props.model.childk8sPod.filter(x=>x!=undefined).map(pod=>pod.childcoreContainer.filter(c=>!c.init)).flat()[0].name + :(['PipelineRun'].includes(props.short)&& props.model.childtektonTaskRun != undefined && props.model.childtektonTaskRun.filter(tr=>Array.isArray(tr.childk8sPod)&&tr.childk8sPod.length>0&&Array.isArray(tr.getcoreProblem)).length>0)?props.model.childtektonTaskRun.filter(tr=>Array.isArray(tr.childk8sPod)&&tr.childk8sPod.length>0&&Array.isArray(tr.getcoreProblem))[0].metadata.name + :(['PipelineRun'].includes(props.short)&& props.model.childtektonTaskRun != undefined && props.model.childtektonTaskRun.filter(tr=>Array.isArray(tr.childk8sPod)&&tr.childk8sPod.length>0).length>0)?props.model.childtektonTaskRun.filter(tr=>Array.isArray(tr.childk8sPod)&&tr.childk8sPod.length>0).sort((a,b)=>a.metadata.creationTimestamp