-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from dmsej108/main
softwareCatalog update issue fixed
- Loading branch information
Showing
3 changed files
with
189 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 100 additions & 0 deletions
100
applicationFE/src/views/softwareCatalog/components/softwareCatalogLog.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<template> | ||
<div class="modal" id="softwareCatalogLog" tabindex="-1"> | ||
<div class="modal-dialog modal-xl" role="document"> | ||
<div class="modal-content"> | ||
|
||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> | ||
<div class="modal-body text-left py-4"> | ||
<h3 class="mb-5"> | ||
Build Log | ||
<div v-if="!firstLoadData" class="spinner-border" role="status"> | ||
<span class="visually-hidden">Loading...</span> | ||
</div> | ||
</h3> | ||
<div> | ||
<div v-if="buildLogList.length <= 0"> | ||
<p class="text-secondary">No Data</p> | ||
</div> | ||
<div v-else v-for="buildLog in buildLogList" :key="buildLog.buildIdx"> | ||
<div class="card mb-3"> | ||
<div class="card-header" @click="onClickedBuildIdx(buildLog.buildIdx)" style="cursor: pointer;"> | ||
<h3 class="card-title">{{ buildLog.buildIdx }}</h3> | ||
</div> | ||
<div v-if="clickedBuildIdx === buildLog.buildIdx" class="card-body"> | ||
<textarea :value="buildLog.buildLog" disabled style="width: 100%;" rows="20"></textarea> | ||
<!-- <p class="text-secondary">{{buildLog.buildLog}}</p> --> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="modal-footer"> | ||
<a href="#" class="btn btn-link link-secondary" data-bs-dismiss="modal" @click="setClear"> | ||
Cancel | ||
</a> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
// import type { Oss, OssType } from '@/views/type/type'; | ||
import { ref } from 'vue'; | ||
import { useToast } from 'vue-toastification'; | ||
import { onMounted } from 'vue'; | ||
import { computed } from 'vue'; | ||
import { watch } from 'vue'; | ||
import axios from 'axios' | ||
const toast = useToast() | ||
/** | ||
* @Title Props / Emit | ||
*/ | ||
interface Props { | ||
jobName: string | ||
} | ||
const props = defineProps<Props>() | ||
const firstLoadData = ref(false as boolean) | ||
const splitUrl = window.location.host.split(':'); | ||
const baseUrl = window.location.protocol + '//' + splitUrl[0] + ':18084' | ||
// const baseUrl = "http://210.217.178.130:18084"; | ||
const jobName = computed(() => props.jobName); | ||
watch(jobName, async () => { | ||
firstLoadData.value = false | ||
await setInit(); | ||
}); | ||
/** | ||
* @Title 초기화 Method | ||
* @Desc | ||
*/ | ||
const buildLogList = ref([] as any) | ||
const setInit = async () => { | ||
buildLogList.value = [] | ||
const response = await axios.get(baseUrl + '/ape/log/' + jobName.value) | ||
buildLogList.value = response.data.data; | ||
firstLoadData.value = true; | ||
} | ||
const setClear = () => { | ||
buildLogList.value = [] | ||
clickedBuildIdx.value = 1 | ||
} | ||
const clickedBuildIdx = ref(1 as number) | ||
const onClickedBuildIdx = (buildIdx: number) => { | ||
if (clickedBuildIdx.value === buildIdx) { | ||
clickedBuildIdx.value = 0 | ||
} | ||
else { | ||
clickedBuildIdx.value = buildIdx | ||
} | ||
} | ||
</script> |