Skip to content

Commit 1c0d0d4

Browse files
Pr@dev@dan (#1891)
#### What this PR does / why we need it? #### Summary of your change #### Please indicate you've done the following: - [ ] Made sure tests are passing and test coverage is added if needed. - [ ] Made sure commit message follow the rule of [Conventional Commits specification](https://www.conventionalcommits.org/). - [ ] Considered the docs impact and opened a new docs issue or PR with docs changes if needed.
1 parent 65b8d47 commit 1c0d0d4

File tree

12 files changed

+270
-171
lines changed

12 files changed

+270
-171
lines changed

frontend/src/components/container-log/index.vue

+4-9
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
11
<template>
22
<div>
3-
<div>
4-
<el-select @change="searchLogs" style="width: 10%; float: left" v-model="logSearch.mode">
3+
<div style="display: flex; flex-wrap: wrap">
4+
<el-select @change="searchLogs" v-model="logSearch.mode" style="width: 100px">
55
<template #prefix>{{ $t('container.fetch') }}</template>
66
<el-option v-for="item in timeOptions" :key="item.label" :value="item.value" :label="item.label" />
77
</el-select>
8-
<el-input
9-
@change="searchLogs"
10-
class="margin-button"
11-
style="width: 10%; float: left"
12-
v-model.number="logSearch.tail"
13-
>
8+
<el-input @change="searchLogs" class="margin-button" style="width: 100px" v-model.number="logSearch.tail">
149
<template #prefix>
1510
<div style="margin-left: 2px">{{ $t('container.lines') }}</div>
1611
</template>
1712
</el-input>
18-
<div class="margin-button" style="float: left">
13+
<div class="margin-button">
1914
<el-checkbox border @change="searchLogs" v-model="logSearch.isWatch">
2015
{{ $t('commons.button.watch') }}
2116
</el-checkbox>

frontend/src/styles/moblie.scss

+4-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
}
6666
}
6767
}
68-
68+
6969
.mini-form-item {
7070
width: 100% !important;
7171
}
@@ -84,4 +84,7 @@
8484
margin-bottom: 10px;
8585
}
8686
}
87+
.el-dialog {
88+
--el-dialog-width: 80% !important;
89+
}
8790
}

frontend/src/views/app-store/apps/index.vue

+9-2
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
v-model:page-size="paginationConfig.pageSize"
120120
v-bind="paginationConfig"
121121
@change="search(req)"
122-
:layout="'total, sizes, prev, pager, next, jumper'"
122+
:layout="mobile ? 'total, prev, pager, next' : 'total, sizes, prev, pager, next, jumper'"
123123
/>
124124
</div>
125125
</template>
@@ -129,13 +129,20 @@
129129

130130
<script lang="ts" setup>
131131
import { App } from '@/api/interface/app';
132-
import { onMounted, reactive, ref } from 'vue';
132+
import { onMounted, reactive, ref, computed } from 'vue';
133133
import { GetAppTags, SearchApp, SyncApp } from '@/api/modules/app';
134134
import i18n from '@/lang';
135135
import Detail from '../detail/index.vue';
136136
import router from '@/routers';
137137
import { MsgSuccess } from '@/utils/message';
138138
import { useI18n } from 'vue-i18n';
139+
import { GlobalStore } from '@/store';
140+
141+
const globalStore = GlobalStore();
142+
143+
const mobile = computed(() => {
144+
return globalStore.isMobile();
145+
});
139146
140147
const language = useI18n().locale.value;
141148

frontend/src/views/container/compose/index.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
:data="data"
5555
@search="search"
5656
>
57-
<el-table-column :label="$t('commons.table.name')" min-width="100" prop="name" fix>
57+
<el-table-column :label="$t('commons.table.name')" width="170" prop="name" fix>
5858
<template #default="{ row }">
5959
<Tooltip @click="loadDetail(row)" :text="row.name" />
6060
</template>

frontend/src/views/container/container/index.vue

+25-6
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,14 @@
6464
@search="search"
6565
>
6666
<el-table-column type="selection" fix />
67-
<el-table-column :label="$t('commons.table.name')" min-width="80" prop="name" sortable fix>
67+
<el-table-column
68+
:label="$t('commons.table.name')"
69+
:width="mobile ? 300 : 'auto'"
70+
min-width="80"
71+
prop="name"
72+
sortable
73+
fix
74+
>
6875
<template #default="{ row }">
6976
<Tooltip @click="onInspect(row.containerID)" :text="row.name" />
7077
</template>
@@ -75,12 +82,12 @@
7582
min-width="80"
7683
prop="imageName"
7784
/>
78-
<el-table-column :label="$t('commons.table.status')" min-width="60" prop="state" sortable fix>
85+
<el-table-column :label="$t('commons.table.status')" min-width="80" prop="state" sortable fix>
7986
<template #default="{ row }">
8087
<Status :key="row.state" :status="row.state"></Status>
8188
</template>
8289
</el-table-column>
83-
<el-table-column :label="$t('container.source')" show-overflow-tooltip min-width="75" fix>
90+
<el-table-column :label="$t('container.source')" show-overflow-tooltip min-width="100" fix>
8491
<template #default="{ row }">
8592
<div v-if="row.hasLoad">
8693
<div>CPU: {{ row.cpuPercent.toFixed(2) }}%</div>
@@ -91,7 +98,13 @@
9198
</div>
9299
</template>
93100
</el-table-column>
94-
<el-table-column :label="$t('commons.table.port')" min-width="120" prop="ports" fix>
101+
<el-table-column
102+
:label="$t('commons.table.port')"
103+
:width="mobile ? 260 : 'auto'"
104+
min-width="120"
105+
prop="ports"
106+
fix
107+
>
95108
<template #default="{ row }">
96109
<div v-if="row.ports">
97110
<div v-for="(item, index) in row.ports" :key="index">
@@ -127,7 +140,7 @@
127140
</el-table-column>
128141
<el-table-column
129142
:label="$t('container.upTime')"
130-
min-width="70"
143+
min-width="80"
131144
show-overflow-tooltip
132145
prop="runTime"
133146
fix
@@ -168,7 +181,7 @@ import TerminalDialog from '@/views/container/container/terminal/index.vue';
168181
import CodemirrorDialog from '@/components/codemirror-dialog/index.vue';
169182
import PortJumpDialog from '@/components/port-jump/index.vue';
170183
import Status from '@/components/status/index.vue';
171-
import { reactive, onMounted, ref } from 'vue';
184+
import { reactive, onMounted, ref, computed } from 'vue';
172185
import {
173186
containerListStats,
174187
containerOperator,
@@ -184,6 +197,12 @@ import i18n from '@/lang';
184197
import router from '@/routers';
185198
import { MsgSuccess, MsgWarning } from '@/utils/message';
186199
import { computeSize } from '@/utils/util';
200+
import { GlobalStore } from '@/store';
201+
const globalStore = GlobalStore();
202+
203+
const mobile = computed(() => {
204+
return globalStore.isMobile();
205+
});
187206
188207
const loading = ref();
189208
const data = ref();

frontend/src/views/container/image/index.vue

+21-4
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,25 @@
4141
</template>
4242
<template #main>
4343
<ComplexTable :pagination-config="paginationConfig" :data="data" @search="search">
44-
<el-table-column label="ID" prop="id" min-width="50">
44+
<el-table-column label="ID" prop="id" width="120">
4545
<template #default="{ row }">
4646
<span>{{ row.id.replaceAll('sha256:', '').substring(0, 12) }}</span>
4747
</template>
4848
</el-table-column>
49-
<el-table-column :label="$t('container.tag')" prop="tags" min-width="160" fix>
49+
<el-table-column
50+
:label="$t('container.tag')"
51+
prop="tags"
52+
min-width="160"
53+
:width="mobile ? 400 : 'auto'"
54+
fix
55+
>
5056
<template #default="{ row }">
51-
<el-tag style="margin-left: 5px" v-for="(item, index) of row.tags" :key="index">
57+
<el-tag
58+
style="margin-left: 5px"
59+
v-for="(item, index) of row.tags"
60+
:key="index"
61+
:title="item"
62+
>
5263
{{ item }}
5364
</el-tag>
5465
</template>
@@ -83,7 +94,7 @@
8394

8495
<script lang="ts" setup>
8596
import TableSetting from '@/components/table-setting/index.vue';
86-
import { reactive, onMounted, ref } from 'vue';
97+
import { reactive, onMounted, ref, computed } from 'vue';
8798
import { dateFormat } from '@/utils/util';
8899
import { Container } from '@/api/interface/container';
89100
import Pull from '@/views/container/image/pull/index.vue';
@@ -98,6 +109,12 @@ import { searchImage, listImageRepo, loadDockerStatus, imageRemove } from '@/api
98109
import i18n from '@/lang';
99110
import router from '@/routers';
100111
import { useDeleteData } from '@/hooks/use-delete-data';
112+
import { GlobalStore } from '@/store';
113+
const globalStore = GlobalStore();
114+
115+
const mobile = computed(() => {
116+
return globalStore.isMobile();
117+
});
101118
102119
const loading = ref(false);
103120

frontend/src/views/container/network/index.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,20 @@
4444
@search="search"
4545
>
4646
<el-table-column type="selection" :selectable="selectable" fix />
47-
<el-table-column :label="$t('commons.table.name')" min-width="80" prop="name" fix>
47+
<el-table-column :label="$t('commons.table.name')" width="130" prop="name" fix>
4848
<template #default="{ row }">
4949
<Tooltip @click="onInspect(row.id)" :text="row.name" />
5050
</template>
5151
</el-table-column>
52-
<el-table-column min-width="50">
52+
<el-table-column width="90">
5353
<template #default="{ row }">
5454
<el-tag effect="dark" round v-if="row.isSystem">system</el-tag>
5555
</template>
5656
</el-table-column>
5757
<el-table-column
5858
:label="$t('container.driver')"
5959
show-overflow-tooltip
60-
min-width="40"
60+
min-width="60"
6161
prop="driver"
6262
/>
6363
<el-table-column :label="$t('container.subnet')" min-width="80" prop="subnet" fix />

frontend/src/views/container/volume/index.vue

+15-3
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,18 @@
4444
@search="search"
4545
>
4646
<el-table-column type="selection" fix />
47-
<el-table-column :label="$t('commons.table.name')" min-width="80" prop="name" fix>
47+
<el-table-column
48+
:label="$t('commons.table.name')"
49+
min-width="100"
50+
:width="mobile ? 220 : 'auto'"
51+
prop="name"
52+
fix
53+
>
4854
<template #default="{ row }">
4955
<Tooltip @click="onInspect(row.name)" :text="row.name" />
5056
</template>
5157
</el-table-column>
52-
<el-table-column :label="$t('container.volumeDir')" min-width="50">
58+
<el-table-column :label="$t('container.volumeDir')" min-width="100">
5359
<template #default="{ row }">
5460
<el-button type="primary" link @click="toFolder(row.mountpoint)">
5561
<el-icon>
@@ -91,7 +97,7 @@ import Tooltip from '@/components/tooltip/index.vue';
9197
import TableSetting from '@/components/table-setting/index.vue';
9298
import CreateDialog from '@/views/container/volume/create/index.vue';
9399
import CodemirrorDialog from '@/components/codemirror-dialog/index.vue';
94-
import { reactive, onMounted, ref } from 'vue';
100+
import { reactive, onMounted, ref, computed } from 'vue';
95101
import { computeSize, dateFormat } from '@/utils/util';
96102
import { deleteVolume, searchVolume, inspect, loadDockerStatus, containerPrune } from '@/api/modules/container';
97103
import { Container } from '@/api/interface/container';
@@ -100,6 +106,12 @@ import { useDeleteData } from '@/hooks/use-delete-data';
100106
import router from '@/routers';
101107
import { MsgSuccess } from '@/utils/message';
102108
import { ElMessageBox } from 'element-plus';
109+
import { GlobalStore } from '@/store';
110+
const globalStore = GlobalStore();
111+
112+
const mobile = computed(() => {
113+
return globalStore.isMobile();
114+
});
103115
104116
const loading = ref();
105117
const detailInfo = ref();

0 commit comments

Comments
 (0)