Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
K9s
Commits
b114de6b
Commit
b114de6b
authored
5 years ago
by
derailed
Browse files
Options
Download
Email Patches
Plain Diff
update sorters
parent
3d128d42
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
internal/view/dp.go
+3
-2
internal/view/dp.go
internal/view/ds.go
+3
-0
internal/view/ds.go
internal/view/rs.go
+1
-0
internal/view/rs.go
internal/view/sts.go
+1
-2
internal/view/sts.go
with
8 additions
and
4 deletions
+8
-4
internal/view/dp.go
+
3
-
2
View file @
b114de6b
...
...
@@ -36,8 +36,9 @@ func NewDeploy(gvr client.GVR) ResourceViewer {
func
(
d
*
Deploy
)
bindKeys
(
aa
ui
.
KeyActions
)
{
aa
.
Add
(
ui
.
KeyActions
{
ui
.
KeyShiftD
:
ui
.
NewKeyAction
(
"Sort Desired"
,
d
.
GetTable
()
.
SortColCmd
(
1
,
true
),
false
),
ui
.
KeyShiftC
:
ui
.
NewKeyAction
(
"Sort Current"
,
d
.
GetTable
()
.
SortColCmd
(
2
,
true
),
false
),
ui
.
KeyShiftR
:
ui
.
NewKeyAction
(
"Sort Ready"
,
d
.
GetTable
()
.
SortColCmd
(
1
,
true
),
false
),
ui
.
KeyShiftU
:
ui
.
NewKeyAction
(
"Sort UpToDate"
,
d
.
GetTable
()
.
SortColCmd
(
2
,
true
),
false
),
ui
.
KeyShiftV
:
ui
.
NewKeyAction
(
"Sort Available"
,
d
.
GetTable
()
.
SortColCmd
(
3
,
true
),
false
),
})
}
...
...
This diff is collapsed.
Click to expand it.
internal/view/ds.go
+
3
-
0
View file @
b114de6b
...
...
@@ -33,6 +33,9 @@ func (d *DaemonSet) bindKeys(aa ui.KeyActions) {
aa
.
Add
(
ui
.
KeyActions
{
ui
.
KeyShiftD
:
ui
.
NewKeyAction
(
"Sort Desired"
,
d
.
GetTable
()
.
SortColCmd
(
1
,
true
),
false
),
ui
.
KeyShiftC
:
ui
.
NewKeyAction
(
"Sort Current"
,
d
.
GetTable
()
.
SortColCmd
(
2
,
true
),
false
),
ui
.
KeyShiftR
:
ui
.
NewKeyAction
(
"Sort Ready"
,
d
.
GetTable
()
.
SortColCmd
(
3
,
true
),
false
),
ui
.
KeyShiftU
:
ui
.
NewKeyAction
(
"Sort UpToDate"
,
d
.
GetTable
()
.
SortColCmd
(
4
,
true
),
false
),
ui
.
KeyShiftV
:
ui
.
NewKeyAction
(
"Sort Available"
,
d
.
GetTable
()
.
SortColCmd
(
5
,
true
),
false
),
})
}
...
...
This diff is collapsed.
Click to expand it.
internal/view/rs.go
+
1
-
0
View file @
b114de6b
...
...
@@ -43,6 +43,7 @@ func (r *ReplicaSet) bindKeys() {
r
.
Actions
()
.
Add
(
ui
.
KeyActions
{
ui
.
KeyShiftD
:
ui
.
NewKeyAction
(
"Sort Desired"
,
r
.
GetTable
()
.
SortColCmd
(
1
,
true
),
false
),
ui
.
KeyShiftC
:
ui
.
NewKeyAction
(
"Sort Current"
,
r
.
GetTable
()
.
SortColCmd
(
2
,
true
),
false
),
ui
.
KeyShiftR
:
ui
.
NewKeyAction
(
"Sort Ready"
,
r
.
GetTable
()
.
SortColCmd
(
3
,
true
),
false
),
tcell
.
KeyCtrlB
:
ui
.
NewKeyAction
(
"Rollback"
,
r
.
rollbackCmd
,
true
),
})
}
...
...
This diff is collapsed.
Click to expand it.
internal/view/sts.go
+
1
-
2
View file @
b114de6b
...
...
@@ -35,8 +35,7 @@ func NewStatefulSet(gvr client.GVR) ResourceViewer {
func
(
s
*
StatefulSet
)
bindKeys
(
aa
ui
.
KeyActions
)
{
aa
.
Add
(
ui
.
KeyActions
{
ui
.
KeyShiftD
:
ui
.
NewKeyAction
(
"Sort Desired"
,
s
.
GetTable
()
.
SortColCmd
(
1
,
true
),
false
),
ui
.
KeyShiftC
:
ui
.
NewKeyAction
(
"Sort Current"
,
s
.
GetTable
()
.
SortColCmd
(
2
,
true
),
false
),
ui
.
KeyShiftR
:
ui
.
NewKeyAction
(
"Sort Ready"
,
s
.
GetTable
()
.
SortColCmd
(
1
,
true
),
false
),
})
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment