Skip to content

Commit

Permalink
fix logs height in popup
Browse files Browse the repository at this point in the history
  • Loading branch information
mms-gianni committed Jul 20, 2024
1 parent 8091362 commit aa1aa98
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 75 deletions.
2 changes: 1 addition & 1 deletion client/src/components/apps/builds.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
</v-row>
<v-expand-transition>
<v-row v-if="b.metadata.name == activeLogs">
<Logs :pipeline=pipeline :phase=phase :app=app :deploymentstrategy=appData?.spec.deploymentstrategy logType="buildlogs" :buildID="b.metadata.name"/>
<Logs :pipeline=pipeline :phase=phase :app=app :deploymentstrategy=appData?.spec.deploymentstrategy logType="buildlogs" :buildID="b.metadata.name" height="400px"/>
</v-row>
</v-expand-transition>
</v-card-text>
Expand Down
6 changes: 5 additions & 1 deletion client/src/components/apps/logs.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div style="height: 600px; width: 100%;">
<div :style="'height: ' + height + '; width: 100%;'">
<v-tabs class="console-bar" style="position: relative; z-index: 3000;">
<v-tab v-if="logType == 'runlogs'" @click="getLogHistory('web')">run</v-tab>
<v-tab v-if="logType == 'runlogs' && deploymentstrategy == 'git' && buildstrategy=='plain'" @click="getLogHistory('builder')">build</v-tab>
Expand Down Expand Up @@ -97,6 +97,10 @@ export default defineComponent({
type: String,
default: "MISSING"
},
height: {
type: String,
default: "100%"
},
},
data: () => ({
loglines: [
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/apps/logstab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</v-row>
<v-row>
<v-col cols="12" sm="12" md="12">
<Logs :pipeline=pipeline :phase=phase :app=app :deploymentstrategy=deploymentstrategy logType="runlogs"/>
<Logs :pipeline=pipeline :phase=phase :app=app :deploymentstrategy=deploymentstrategy logType="runlogs" height="600px"/>
</v-col>
</v-row>

Expand Down
72 changes: 0 additions & 72 deletions server/src/modules/deployments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,78 +140,6 @@ export class Deployments {
// load jobn details
const job = await this.kubectl.getJob(namespace, `${deployment.spec.app}-${deployment.spec.pipeline}-${deployment.spec.id}`) //TODO: Naming might change, since it is the wrong order
if (job) {
/*
[1] status: V1JobStatus {
[1] active: undefined,
[1] completedIndexes: undefined,
[1] completionTime: 2024-07-12T20:05:05.000Z,
[1] conditions: [ [V1JobCondition] ],
[1] failed: 1,
[1] failedIndexes: undefined,
[1] ready: 0,
[1] startTime: 2024-07-12T20:02:53.000Z,
[1] succeeded: 1,
[1] terminating: 0,
[1] uncountedTerminatedPods: V1UncountedTerminatedPods {
[1] failed: undefined,
[1] succeeded: undefined
[1] }
[1] }
[1] }
[1] status: V1JobStatus {
[1] active: 1,
[1] completedIndexes: undefined,
[1] completionTime: undefined,
[1] conditions: undefined,
[1] failed: 1,
[1] failedIndexes: undefined,
[1] ready: 0,
[1] startTime: 2024-07-13T12:21:27.000Z,
[1] succeeded: undefined,
[1] terminating: 0,
[1] uncountedTerminatedPods: V1UncountedTerminatedPods {
[1] failed: undefined,
[1] succeeded: undefined
[1] }
[1] }
[1] }
[1] status: V1JobStatus {
[1] active: undefined,
[1] completedIndexes: undefined,
[1] completionTime: undefined,
[1] conditions: [ [V1JobCondition] ],
[1] failed: 2,
[1] failedIndexes: undefined,
[1] ready: 0,
[1] startTime: 2024-07-13T12:21:27.000Z,
[1] succeeded: undefined,
[1] terminating: 0,
[1] uncountedTerminatedPods: V1UncountedTerminatedPods {
[1] failed: undefined,
[1] succeeded: undefined
[1] }
[1] }
[1] }
[1] status: V1JobStatus {
[1] active: 1,
[1] completedIndexes: undefined,
[1] completionTime: undefined,
[1] conditions: undefined,
[1] failed: undefined,
[1] failedIndexes: undefined,
[1] ready: 0,
[1] startTime: 2024-07-13T12:21:27.000Z,
[1] succeeded: undefined,
[1] terminating: 0,
[1] uncountedTerminatedPods: V1UncountedTerminatedPods {
[1] failed: undefined,
[1] succeeded: undefined
[1] }
[1] }
*/
const duration = new Date(job.status.completionTime).getTime() - new Date(job.status.startTime).getTime()

let status: "Unknown" | "Active" | "Succeeded" | "Failed" = 'Unknown'
Expand Down

0 comments on commit aa1aa98

Please sign in to comment.