mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-08 22:46:51 +08:00
style: Adjust compose log display height (#10151)
This commit is contained in:
parent
ab0e0f3f43
commit
5f33c083bf
6 changed files with 16 additions and 26 deletions
|
@ -456,22 +456,6 @@ func (u *ImageService) ImageRemove(req dto.BatchDelete) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func formatFileSize(fileSize int64) (size string) {
|
||||
if fileSize < 1024 {
|
||||
return fmt.Sprintf("%.2fB", float64(fileSize)/float64(1))
|
||||
} else if fileSize < (1024 * 1024) {
|
||||
return fmt.Sprintf("%.2fKB", float64(fileSize)/float64(1024))
|
||||
} else if fileSize < (1024 * 1024 * 1024) {
|
||||
return fmt.Sprintf("%.2fMB", float64(fileSize)/float64(1024*1024))
|
||||
} else if fileSize < (1024 * 1024 * 1024 * 1024) {
|
||||
return fmt.Sprintf("%.2fGB", float64(fileSize)/float64(1024*1024*1024))
|
||||
} else if fileSize < (1024 * 1024 * 1024 * 1024 * 1024) {
|
||||
return fmt.Sprintf("%.2fTB", float64(fileSize)/float64(1024*1024*1024*1024))
|
||||
} else {
|
||||
return fmt.Sprintf("%.2fEB", float64(fileSize)/float64(1024*1024*1024*1024*1024))
|
||||
}
|
||||
}
|
||||
|
||||
func checkUsed(imageID string, containers []container.Summary) bool {
|
||||
for _, container := range containers {
|
||||
if container.ImageID == imageID {
|
||||
|
|
|
@ -36,7 +36,7 @@ const container = ref('');
|
|||
const globalStore = GlobalStore();
|
||||
const logVisible = ref(false);
|
||||
const compose = ref('');
|
||||
const highlightDiff = ref(320);
|
||||
const highlightDiff = ref(150);
|
||||
const node = ref('');
|
||||
|
||||
interface DialogProps {
|
||||
|
@ -49,7 +49,7 @@ interface DialogProps {
|
|||
const defaultProps = defineProps({
|
||||
highlightDiff: {
|
||||
type: Number,
|
||||
default: 320,
|
||||
default: 150,
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<template #title>
|
||||
<div>
|
||||
<span class="version">{{ item.version }}</span>
|
||||
<span class="date">{{ item.createdAt }}</span>
|
||||
<span v-if="!mobile" class="date">{{ item.createdAt }}</span>
|
||||
</div>
|
||||
<svg-icon class="icon" iconName="p-featureshitu"></svg-icon>
|
||||
<span class="icon-span">{{ item.newCount }}</span>
|
||||
|
@ -55,6 +55,10 @@ import { GlobalStore } from '@/store';
|
|||
import { storeToRefs } from 'pinia';
|
||||
|
||||
const globalStore = GlobalStore();
|
||||
const mobile = computed(() => {
|
||||
return globalStore.isMobile();
|
||||
});
|
||||
|
||||
const { isDarkTheme } = storeToRefs(globalStore);
|
||||
|
||||
const drawerVisible = ref(false);
|
||||
|
|
|
@ -341,7 +341,7 @@
|
|||
<PruneDialog @search="search" ref="dialogPruneRef" />
|
||||
|
||||
<RenameDialog @search="search" ref="dialogRenameRef" />
|
||||
<ContainerLogDialog ref="dialogContainerLogRef" :highlightDiff="235" />
|
||||
<ContainerLogDialog ref="dialogContainerLogRef" :highlightDiff="210" />
|
||||
<UpgradeDialog @search="search" ref="dialogUpgradeRef" />
|
||||
<CommitDialog @search="search" ref="dialogCommitRef" />
|
||||
<MonitorDialog ref="dialogMonitorRef" />
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
<el-button :disabled="loading" @click="drawerVisible = false">
|
||||
{{ $t('commons.button.cancel') }}
|
||||
</el-button>
|
||||
<el-button :disabled="loading" type="primary" @click="onSubmit(formRef)">
|
||||
<el-button :disabled="loading || form.names.length === 0" type="primary" @click="onSubmit(formRef)">
|
||||
{{ $t('commons.button.confirm') }}
|
||||
</el-button>
|
||||
</span>
|
||||
|
|
|
@ -49,11 +49,13 @@
|
|||
</el-table-column>
|
||||
<el-table-column :label="$t('container.volumeDir')" min-width="100">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" link @click="routerToFileWithPath(row.mountpoint)">
|
||||
<el-icon>
|
||||
<FolderOpened />
|
||||
</el-icon>
|
||||
</el-button>
|
||||
<el-tooltip :content="row.mountpoint">
|
||||
<el-button type="primary" link @click="routerToFileWithPath(row.mountpoint)">
|
||||
<el-icon>
|
||||
<FolderOpened />
|
||||
</el-icon>
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
|
Loading…
Add table
Reference in a new issue