mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-10 23:47:39 +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
|
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 {
|
func checkUsed(imageID string, containers []container.Summary) bool {
|
||||||
for _, container := range containers {
|
for _, container := range containers {
|
||||||
if container.ImageID == imageID {
|
if container.ImageID == imageID {
|
||||||
|
|
|
@ -36,7 +36,7 @@ const container = ref('');
|
||||||
const globalStore = GlobalStore();
|
const globalStore = GlobalStore();
|
||||||
const logVisible = ref(false);
|
const logVisible = ref(false);
|
||||||
const compose = ref('');
|
const compose = ref('');
|
||||||
const highlightDiff = ref(320);
|
const highlightDiff = ref(150);
|
||||||
const node = ref('');
|
const node = ref('');
|
||||||
|
|
||||||
interface DialogProps {
|
interface DialogProps {
|
||||||
|
@ -49,7 +49,7 @@ interface DialogProps {
|
||||||
const defaultProps = defineProps({
|
const defaultProps = defineProps({
|
||||||
highlightDiff: {
|
highlightDiff: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 320,
|
default: 150,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<template #title>
|
<template #title>
|
||||||
<div>
|
<div>
|
||||||
<span class="version">{{ item.version }}</span>
|
<span class="version">{{ item.version }}</span>
|
||||||
<span class="date">{{ item.createdAt }}</span>
|
<span v-if="!mobile" class="date">{{ item.createdAt }}</span>
|
||||||
</div>
|
</div>
|
||||||
<svg-icon class="icon" iconName="p-featureshitu"></svg-icon>
|
<svg-icon class="icon" iconName="p-featureshitu"></svg-icon>
|
||||||
<span class="icon-span">{{ item.newCount }}</span>
|
<span class="icon-span">{{ item.newCount }}</span>
|
||||||
|
@ -55,6 +55,10 @@ import { GlobalStore } from '@/store';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
|
|
||||||
const globalStore = GlobalStore();
|
const globalStore = GlobalStore();
|
||||||
|
const mobile = computed(() => {
|
||||||
|
return globalStore.isMobile();
|
||||||
|
});
|
||||||
|
|
||||||
const { isDarkTheme } = storeToRefs(globalStore);
|
const { isDarkTheme } = storeToRefs(globalStore);
|
||||||
|
|
||||||
const drawerVisible = ref(false);
|
const drawerVisible = ref(false);
|
||||||
|
|
|
@ -341,7 +341,7 @@
|
||||||
<PruneDialog @search="search" ref="dialogPruneRef" />
|
<PruneDialog @search="search" ref="dialogPruneRef" />
|
||||||
|
|
||||||
<RenameDialog @search="search" ref="dialogRenameRef" />
|
<RenameDialog @search="search" ref="dialogRenameRef" />
|
||||||
<ContainerLogDialog ref="dialogContainerLogRef" :highlightDiff="235" />
|
<ContainerLogDialog ref="dialogContainerLogRef" :highlightDiff="210" />
|
||||||
<UpgradeDialog @search="search" ref="dialogUpgradeRef" />
|
<UpgradeDialog @search="search" ref="dialogUpgradeRef" />
|
||||||
<CommitDialog @search="search" ref="dialogCommitRef" />
|
<CommitDialog @search="search" ref="dialogCommitRef" />
|
||||||
<MonitorDialog ref="dialogMonitorRef" />
|
<MonitorDialog ref="dialogMonitorRef" />
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
<el-button :disabled="loading" @click="drawerVisible = false">
|
<el-button :disabled="loading" @click="drawerVisible = false">
|
||||||
{{ $t('commons.button.cancel') }}
|
{{ $t('commons.button.cancel') }}
|
||||||
</el-button>
|
</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') }}
|
{{ $t('commons.button.confirm') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -49,11 +49,13 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('container.volumeDir')" min-width="100">
|
<el-table-column :label="$t('container.volumeDir')" min-width="100">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button type="primary" link @click="routerToFileWithPath(row.mountpoint)">
|
<el-tooltip :content="row.mountpoint">
|
||||||
<el-icon>
|
<el-button type="primary" link @click="routerToFileWithPath(row.mountpoint)">
|
||||||
<FolderOpened />
|
<el-icon>
|
||||||
</el-icon>
|
<FolderOpened />
|
||||||
</el-button>
|
</el-icon>
|
||||||
|
</el-button>
|
||||||
|
</el-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|
Loading…
Add table
Reference in a new issue