File tree 8 files changed +35
-301
lines changed
8 files changed +35
-301
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " docker-dashboard" ,
3
- "version" : " 1.4.20 " ,
3
+ "version" : " 1.4.26a " ,
4
4
"author" :
" zero4994 <[email protected] >" ,
5
5
"scripts" : {
6
6
"lint" : " vue-cli-service lint" ,
13
13
"main" : " background.js" ,
14
14
"dependencies" : {
15
15
"dockerode" : " ^2.5.8" ,
16
- "express" : " ^4.16.4" ,
17
16
"moment" : " ^2.24.0" ,
18
17
"vue" : " ^2.5.16" ,
19
18
"vue-command" : " ^6.2.3" ,
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 13
13
<v-icon class =" icon-padding-left" >refresh</v-icon >
14
14
</v-btn >
15
15
</v-layout >
16
+ <v-layout >
17
+ <v-flex md8 ></v-flex >
18
+ <v-flex md4 >
19
+ <v-spacer ></v-spacer >
20
+ <v-text-field
21
+ v-model =" search"
22
+ append-icon =" search"
23
+ label =" Search"
24
+ single-line
25
+ hide-details
26
+ ></v-text-field >
27
+ </v-flex >
28
+ </v-layout >
16
29
<v-data-table
17
30
:headers =" headers"
18
31
:items =" this.volumes"
19
32
class =" elevation-1 mt-4 mb-4"
20
33
:rows-per-page-items =" [10]"
34
+ :search =" search"
21
35
>
22
36
<template v-slot :items =" props " >
23
- <td >{{ props.item.Name }}</td >
37
+ <td >{{ formatText( props.item.Name) }}</td >
24
38
<td >{{ formatDate(props.item.CreatedAt) }}</td >
25
39
<td >{{ props.item.Driver }}</td >
26
40
<td >{{ props.item.Scope }}</td >
27
- <td >{{ props.item.Mountpoint }}</td >
41
+ <td >{{ formatText( props.item.Mountpoint, 50) }}</td >
28
42
<v-btn icon @click =" deleteVolume(props.item.Name)" >
29
43
<v-icon >delete</v-icon >
30
44
</v-btn >
@@ -83,7 +97,8 @@ export default {
83
97
sortable: false ,
84
98
value: " Mountpoint"
85
99
}
86
- ]
100
+ ],
101
+ search: " "
87
102
}),
88
103
methods: {
89
104
fetchAllVolumes : async function () {
@@ -100,6 +115,11 @@ export default {
100
115
formatDate : function (date ) {
101
116
return moment (date).format (" LLL" );
102
117
},
118
+ formatText : function (text , maxLength = 20 ) {
119
+ return text .length <= maxLength
120
+ ? text
121
+ : ` ${ text .substr (0 , maxLength)} ...` ;
122
+ },
103
123
createVolume : async function () {
104
124
try {
105
125
const volumeName = await this .$dialog .prompt ({
Original file line number Diff line number Diff line change @@ -2,7 +2,17 @@ import { docker } from "./config";
2
2
3
3
export const allVolumes = async function ( ) {
4
4
console . log ( "Querying all volumes" ) ;
5
- return await docker . listVolumes ( ) ;
5
+ const volumes = await docker . listVolumes ( ) ;
6
+ volumes . Volumes . sort ( ( a , b ) => {
7
+ if ( a . Name . toLowerCase ( ) < b . Name . toLowerCase ( ) ) {
8
+ return - 1 ;
9
+ } else if ( a . Name . toLowerCase ( ) > b . Name . toLowerCase ( ) ) {
10
+ return 1 ;
11
+ } else {
12
+ return 0 ;
13
+ }
14
+ } ) ;
15
+ return volumes ;
6
16
} ;
7
17
8
18
export const createVolume = async function ( name ) {
You can’t perform that action at this time.
0 commit comments