MCPcopy Create free account
hub / github.com/redis/RedisInsight / sortingFunc

Function sortingFunc

redisinsight/ui/src/utils/instance/instanceNavigation.ts:17–25  ·  view source on GitHub ↗
(ins)

Source from the content-addressed store, hash-verified

15 })
16
17 const sortingFunc = (ins) => {
18 if (sort.field === 'lastConnection') {
19 return ins.lastConnection ? -new Date(`${ins.lastConnection}`) : -Infinity
20 }
21 if (sort.field === 'host') {
22 return `${ins.host}:${ins.port}`
23 }
24 return sort.field
25 }
26
27 return orderBy(filtered, sortingFunc, sort.direction)
28}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected