Compare commits

..

No commits in common. "aab2531d40d9bea86762be0a6d6f78110a1038a3" and "5d2080aafbf8f4ff4bf053bc8871c386f7bc2634" have entirely different histories.

19 changed files with 171 additions and 242 deletions

View File

@ -600,6 +600,7 @@ func (b *browserService) GetKeySummary(param types.KeySummaryParam) (resp types.
pipe := client.Pipeline()
typeVal := pipe.Type(ctx, key)
ttlVal := pipe.TTL(ctx, key)
sizeVal := pipe.MemoryUsage(ctx, key, 0)
_, err = pipe.Exec(ctx)
if err != nil {
resp.Msg = err.Error()
@ -610,10 +611,9 @@ func (b *browserService) GetKeySummary(param types.KeySummaryParam) (resp types.
resp.Msg = typeVal.Err().Error()
return
}
size, _ := client.MemoryUsage(ctx, key, 0).Result()
data := types.KeySummary{
Type: strings.ToLower(typeVal.Val()),
Size: size,
Size: sizeVal.Val(),
}
if data.Type == "none" {
resp.Msg = "key not exists"

View File

@ -14,13 +14,13 @@
"monaco-editor": "^0.45.0",
"pinia": "^2.1.7",
"sass": "^1.69.7",
"vue": "^3.4.8",
"vue": "^3.4.7",
"vue-i18n": "^9.9.0",
"xterm": "^5.3.0",
"xterm-addon-fit": "^0.8.0"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.0.3",
"@vitejs/plugin-vue": "^5.0.2",
"naive-ui": "^2.37.3",
"prettier": "^3.1.1",
"unplugin-auto-import": "^0.17.3",
@ -864,9 +864,9 @@
}
},
"node_modules/@vitejs/plugin-vue": {
"version": "5.0.3",
"resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.0.3.tgz",
"integrity": "sha512-b8S5dVS40rgHdDrw+DQi/xOM9ed+kSRZzfm1T74bMmBDCd8XO87NKlFYInzCtwvtWwXZvo1QxE2OSspTATWrbA==",
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.0.2.tgz",
"integrity": "sha512-kEjJHrLb5ePBvjD0SPZwJlw1QTRcjjCA9sB5VyfonoXVBxTS7TMnqL6EkLt1Eu61RDeiuZ/WN9Hf6PxXhPI2uA==",
"dev": true,
"engines": {
"node": "^18.0.0 || >=20.0.0"
@ -877,36 +877,36 @@
}
},
"node_modules/@vue/compiler-core": {
"version": "3.4.8",
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.8.tgz",
"integrity": "sha512-GjAwOydZV6UyVBi1lYW5v4jjfU6wOeyi3vBATKJOwV7muYF0/nZi4kfdJc0pwdT5lXwbbx57lyA2Y356rFpw1A==",
"version": "3.4.7",
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.7.tgz",
"integrity": "sha512-hhCaE3pTMrlIJK7M/o3Xf7HV8+JoNTGOQ/coWS+V+pH6QFFyqtoXqQzpqsNp7UK17xYKua/MBiKj4e1vgZOBYw==",
"dependencies": {
"@babel/parser": "^7.23.6",
"@vue/shared": "3.4.8",
"@vue/shared": "3.4.7",
"entities": "^4.5.0",
"estree-walker": "^2.0.2",
"source-map-js": "^1.0.2"
}
},
"node_modules/@vue/compiler-dom": {
"version": "3.4.8",
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.8.tgz",
"integrity": "sha512-GsPyji42zmkSJlaDFKXvwB97ukTlHzlFH/iVzPFYz/APnSzuhu/CMFQbsYmrtsnc2yscF39eC4rKzvKR27aBug==",
"version": "3.4.7",
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.7.tgz",
"integrity": "sha512-qDKBAIurCTub4n/6jDYkXwgsFuriqqmmLrIq1N2QDfYJA/mwiwvxi09OGn28g+uDdERX9NaKDLji0oTjE3sScg==",
"dependencies": {
"@vue/compiler-core": "3.4.8",
"@vue/shared": "3.4.8"
"@vue/compiler-core": "3.4.7",
"@vue/shared": "3.4.7"
}
},
"node_modules/@vue/compiler-sfc": {
"version": "3.4.8",
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.8.tgz",
"integrity": "sha512-3ZcurOa6bQdZ6VZLtMqYSUZqpsMqfX0MC3oCxQG0VIJFCqouZAgRYJN1c8QvGs7HW5wW8aXVvUOQU0ILVlYHKA==",
"version": "3.4.7",
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.7.tgz",
"integrity": "sha512-Gec6CLkReVswDYjQFq79O5rktri4R7TsD/VPCiUoJw40JhNNxaNJJa8mrQrWoJluW4ETy6QN0NUyC/JO77OCOw==",
"dependencies": {
"@babel/parser": "^7.23.6",
"@vue/compiler-core": "3.4.8",
"@vue/compiler-dom": "3.4.8",
"@vue/compiler-ssr": "3.4.8",
"@vue/shared": "3.4.8",
"@vue/compiler-core": "3.4.7",
"@vue/compiler-dom": "3.4.7",
"@vue/compiler-ssr": "3.4.7",
"@vue/shared": "3.4.7",
"estree-walker": "^2.0.2",
"magic-string": "^0.30.5",
"postcss": "^8.4.32",
@ -914,12 +914,12 @@
}
},
"node_modules/@vue/compiler-ssr": {
"version": "3.4.8",
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.8.tgz",
"integrity": "sha512-nxN79LHeAemhBpIa2PQ6rz57cW7W4C/XIJCOMSn2g49u6q2ekirmJI0osAOTErQPApOR0KwP2QyeTexX4zQCrw==",
"version": "3.4.7",
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.7.tgz",
"integrity": "sha512-PvYeSOvnCkST5mGS0TLwEn5w+4GavtEn6adcq8AspbHaIr+mId5hp7cG3ASy3iy8b+LuXEG2/QaV/nj5BQ/Aww==",
"dependencies": {
"@vue/compiler-dom": "3.4.8",
"@vue/shared": "3.4.8"
"@vue/compiler-dom": "3.4.7",
"@vue/shared": "3.4.7"
}
},
"node_modules/@vue/devtools-api": {
@ -928,29 +928,29 @@
"integrity": "sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q=="
},
"node_modules/@vue/reactivity": {
"version": "3.4.8",
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.8.tgz",
"integrity": "sha512-UJYMQ3S2rqIGw9IvKomD4Xw2uS5VlcKEEmwcfboGOdrI79oqebxnCgTvXWLMClvg3M5SF0Cyn+9eDQoyGMLu9Q==",
"version": "3.4.7",
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.7.tgz",
"integrity": "sha512-F539DO0ogH0+L8F9Pnw7cjqibcmSOh5UTk16u5f4MKQ8fraqepI9zdh+sozPX6VmEHOcjo8qw3Or9ZcFFw4SZA==",
"dependencies": {
"@vue/shared": "3.4.8"
"@vue/shared": "3.4.7"
}
},
"node_modules/@vue/runtime-core": {
"version": "3.4.8",
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.8.tgz",
"integrity": "sha512-sMRXOy89KnwY6fWG5epgPOsCWzpo/64FrA0QkjIeNeGnoA2YyZ6bBUxpFUyqhJ8VbrDhXEFH+6LHMOYrpzX/ZQ==",
"version": "3.4.7",
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.7.tgz",
"integrity": "sha512-QMMsWRQaD3BpGyjjChthpl4Mji4Fjx1qfdufsXlDkKU3HV+hWNor2z+29F+E1MmVcP0ZfRZUfqYgtsQoL7IGwQ==",
"dependencies": {
"@vue/reactivity": "3.4.8",
"@vue/shared": "3.4.8"
"@vue/reactivity": "3.4.7",
"@vue/shared": "3.4.7"
}
},
"node_modules/@vue/runtime-dom": {
"version": "3.4.8",
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.8.tgz",
"integrity": "sha512-L4gZcYo8f3d7rQqQIHkPvyczkjjQ55cJqz2G0v6Ptmqa1mO2zkqN9F8lBT6aGPYy3hd0RDiINbs4jxhSvvy10Q==",
"version": "3.4.7",
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.7.tgz",
"integrity": "sha512-XwegyUY1rw8zxsX1Z36vwYcqo+uOgih5ti7y9vx+pPFhNdSQmN4LqK2RmSeAJG1oKV8NqSUmjpv92f/x6h0SeQ==",
"dependencies": {
"@vue/runtime-core": "3.4.8",
"@vue/shared": "3.4.8",
"@vue/runtime-core": "3.4.7",
"@vue/shared": "3.4.7",
"csstype": "^3.1.3"
}
},
@ -960,21 +960,21 @@
"integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="
},
"node_modules/@vue/server-renderer": {
"version": "3.4.8",
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.8.tgz",
"integrity": "sha512-pBeHM59Owevr3P0Fl1XOjBmq4DTy5JDcjMG4NuzJEVDlZYzY8fHybx0wdjkY5lK5mCtUyBtw6Mz4d87aosc1Sw==",
"version": "3.4.7",
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.7.tgz",
"integrity": "sha512-3bWnYLEkLLhkDWqvNk7IvbQD4UcxvFKxELBiOO2iG3m6AniFIsBWfHOO5tLVQnjdWkODu4rq0GipmfEenVAK5Q==",
"dependencies": {
"@vue/compiler-ssr": "3.4.8",
"@vue/shared": "3.4.8"
"@vue/compiler-ssr": "3.4.7",
"@vue/shared": "3.4.7"
},
"peerDependencies": {
"vue": "3.4.8"
"vue": "3.4.7"
}
},
"node_modules/@vue/shared": {
"version": "3.4.8",
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.8.tgz",
"integrity": "sha512-ChLCWzXiJboQ009oVkemhEoUdrxHme7v3ip+Kh+/kDDeF1WtHWGt0knRLGm1Y4YqCRTSs9QxsZIY8paJj5Szrw=="
"version": "3.4.7",
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.7.tgz",
"integrity": "sha512-G+i4glX1dMJk88sbJEcQEGWRQnVm9eIY7CcQbO5dpdsD9SF8jka3Mr5OqZYGjczGN1+D6EUwdu6phcmcx9iuPA=="
},
"node_modules/acorn": {
"version": "8.11.2",
@ -2259,15 +2259,15 @@
}
},
"node_modules/vue": {
"version": "3.4.8",
"resolved": "https://registry.npmjs.org/vue/-/vue-3.4.8.tgz",
"integrity": "sha512-vJffFOe6DqWsAI10v3tDhb1nJrj7CF3CbdQwOznywAsFNoyvrQ1AWQdcIWJpmRpRnw7NFzstzh6fh4w7n1PNdg==",
"version": "3.4.7",
"resolved": "https://registry.npmjs.org/vue/-/vue-3.4.7.tgz",
"integrity": "sha512-4urmkWpudekq0CPNMO7p6mBGa9qmTXwJMO2r6CT4EzIJVG7WoSReiysiNb7OSi/WI113oX0Srn9Rz1k/DCXKFQ==",
"dependencies": {
"@vue/compiler-dom": "3.4.8",
"@vue/compiler-sfc": "3.4.8",
"@vue/runtime-dom": "3.4.8",
"@vue/server-renderer": "3.4.8",
"@vue/shared": "3.4.8"
"@vue/compiler-dom": "3.4.7",
"@vue/compiler-sfc": "3.4.7",
"@vue/runtime-dom": "3.4.7",
"@vue/server-renderer": "3.4.7",
"@vue/shared": "3.4.7"
},
"peerDependencies": {
"typescript": "*"
@ -2858,43 +2858,43 @@
}
},
"@vitejs/plugin-vue": {
"version": "5.0.3",
"resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.0.3.tgz",
"integrity": "sha512-b8S5dVS40rgHdDrw+DQi/xOM9ed+kSRZzfm1T74bMmBDCd8XO87NKlFYInzCtwvtWwXZvo1QxE2OSspTATWrbA==",
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.0.2.tgz",
"integrity": "sha512-kEjJHrLb5ePBvjD0SPZwJlw1QTRcjjCA9sB5VyfonoXVBxTS7TMnqL6EkLt1Eu61RDeiuZ/WN9Hf6PxXhPI2uA==",
"dev": true,
"requires": {}
},
"@vue/compiler-core": {
"version": "3.4.8",
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.8.tgz",
"integrity": "sha512-GjAwOydZV6UyVBi1lYW5v4jjfU6wOeyi3vBATKJOwV7muYF0/nZi4kfdJc0pwdT5lXwbbx57lyA2Y356rFpw1A==",
"version": "3.4.7",
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.7.tgz",
"integrity": "sha512-hhCaE3pTMrlIJK7M/o3Xf7HV8+JoNTGOQ/coWS+V+pH6QFFyqtoXqQzpqsNp7UK17xYKua/MBiKj4e1vgZOBYw==",
"requires": {
"@babel/parser": "^7.23.6",
"@vue/shared": "3.4.8",
"@vue/shared": "3.4.7",
"entities": "^4.5.0",
"estree-walker": "^2.0.2",
"source-map-js": "^1.0.2"
}
},
"@vue/compiler-dom": {
"version": "3.4.8",
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.8.tgz",
"integrity": "sha512-GsPyji42zmkSJlaDFKXvwB97ukTlHzlFH/iVzPFYz/APnSzuhu/CMFQbsYmrtsnc2yscF39eC4rKzvKR27aBug==",
"version": "3.4.7",
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.7.tgz",
"integrity": "sha512-qDKBAIurCTub4n/6jDYkXwgsFuriqqmmLrIq1N2QDfYJA/mwiwvxi09OGn28g+uDdERX9NaKDLji0oTjE3sScg==",
"requires": {
"@vue/compiler-core": "3.4.8",
"@vue/shared": "3.4.8"
"@vue/compiler-core": "3.4.7",
"@vue/shared": "3.4.7"
}
},
"@vue/compiler-sfc": {
"version": "3.4.8",
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.8.tgz",
"integrity": "sha512-3ZcurOa6bQdZ6VZLtMqYSUZqpsMqfX0MC3oCxQG0VIJFCqouZAgRYJN1c8QvGs7HW5wW8aXVvUOQU0ILVlYHKA==",
"version": "3.4.7",
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.7.tgz",
"integrity": "sha512-Gec6CLkReVswDYjQFq79O5rktri4R7TsD/VPCiUoJw40JhNNxaNJJa8mrQrWoJluW4ETy6QN0NUyC/JO77OCOw==",
"requires": {
"@babel/parser": "^7.23.6",
"@vue/compiler-core": "3.4.8",
"@vue/compiler-dom": "3.4.8",
"@vue/compiler-ssr": "3.4.8",
"@vue/shared": "3.4.8",
"@vue/compiler-core": "3.4.7",
"@vue/compiler-dom": "3.4.7",
"@vue/compiler-ssr": "3.4.7",
"@vue/shared": "3.4.7",
"estree-walker": "^2.0.2",
"magic-string": "^0.30.5",
"postcss": "^8.4.32",
@ -2902,12 +2902,12 @@
}
},
"@vue/compiler-ssr": {
"version": "3.4.8",
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.8.tgz",
"integrity": "sha512-nxN79LHeAemhBpIa2PQ6rz57cW7W4C/XIJCOMSn2g49u6q2ekirmJI0osAOTErQPApOR0KwP2QyeTexX4zQCrw==",
"version": "3.4.7",
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.7.tgz",
"integrity": "sha512-PvYeSOvnCkST5mGS0TLwEn5w+4GavtEn6adcq8AspbHaIr+mId5hp7cG3ASy3iy8b+LuXEG2/QaV/nj5BQ/Aww==",
"requires": {
"@vue/compiler-dom": "3.4.8",
"@vue/shared": "3.4.8"
"@vue/compiler-dom": "3.4.7",
"@vue/shared": "3.4.7"
}
},
"@vue/devtools-api": {
@ -2916,29 +2916,29 @@
"integrity": "sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q=="
},
"@vue/reactivity": {
"version": "3.4.8",
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.8.tgz",
"integrity": "sha512-UJYMQ3S2rqIGw9IvKomD4Xw2uS5VlcKEEmwcfboGOdrI79oqebxnCgTvXWLMClvg3M5SF0Cyn+9eDQoyGMLu9Q==",
"version": "3.4.7",
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.7.tgz",
"integrity": "sha512-F539DO0ogH0+L8F9Pnw7cjqibcmSOh5UTk16u5f4MKQ8fraqepI9zdh+sozPX6VmEHOcjo8qw3Or9ZcFFw4SZA==",
"requires": {
"@vue/shared": "3.4.8"
"@vue/shared": "3.4.7"
}
},
"@vue/runtime-core": {
"version": "3.4.8",
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.8.tgz",
"integrity": "sha512-sMRXOy89KnwY6fWG5epgPOsCWzpo/64FrA0QkjIeNeGnoA2YyZ6bBUxpFUyqhJ8VbrDhXEFH+6LHMOYrpzX/ZQ==",
"version": "3.4.7",
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.7.tgz",
"integrity": "sha512-QMMsWRQaD3BpGyjjChthpl4Mji4Fjx1qfdufsXlDkKU3HV+hWNor2z+29F+E1MmVcP0ZfRZUfqYgtsQoL7IGwQ==",
"requires": {
"@vue/reactivity": "3.4.8",
"@vue/shared": "3.4.8"
"@vue/reactivity": "3.4.7",
"@vue/shared": "3.4.7"
}
},
"@vue/runtime-dom": {
"version": "3.4.8",
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.8.tgz",
"integrity": "sha512-L4gZcYo8f3d7rQqQIHkPvyczkjjQ55cJqz2G0v6Ptmqa1mO2zkqN9F8lBT6aGPYy3hd0RDiINbs4jxhSvvy10Q==",
"version": "3.4.7",
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.7.tgz",
"integrity": "sha512-XwegyUY1rw8zxsX1Z36vwYcqo+uOgih5ti7y9vx+pPFhNdSQmN4LqK2RmSeAJG1oKV8NqSUmjpv92f/x6h0SeQ==",
"requires": {
"@vue/runtime-core": "3.4.8",
"@vue/shared": "3.4.8",
"@vue/runtime-core": "3.4.7",
"@vue/shared": "3.4.7",
"csstype": "^3.1.3"
},
"dependencies": {
@ -2950,18 +2950,18 @@
}
},
"@vue/server-renderer": {
"version": "3.4.8",
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.8.tgz",
"integrity": "sha512-pBeHM59Owevr3P0Fl1XOjBmq4DTy5JDcjMG4NuzJEVDlZYzY8fHybx0wdjkY5lK5mCtUyBtw6Mz4d87aosc1Sw==",
"version": "3.4.7",
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.7.tgz",
"integrity": "sha512-3bWnYLEkLLhkDWqvNk7IvbQD4UcxvFKxELBiOO2iG3m6AniFIsBWfHOO5tLVQnjdWkODu4rq0GipmfEenVAK5Q==",
"requires": {
"@vue/compiler-ssr": "3.4.8",
"@vue/shared": "3.4.8"
"@vue/compiler-ssr": "3.4.7",
"@vue/shared": "3.4.7"
}
},
"@vue/shared": {
"version": "3.4.8",
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.8.tgz",
"integrity": "sha512-ChLCWzXiJboQ009oVkemhEoUdrxHme7v3ip+Kh+/kDDeF1WtHWGt0knRLGm1Y4YqCRTSs9QxsZIY8paJj5Szrw=="
"version": "3.4.7",
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.7.tgz",
"integrity": "sha512-G+i4glX1dMJk88sbJEcQEGWRQnVm9eIY7CcQbO5dpdsD9SF8jka3Mr5OqZYGjczGN1+D6EUwdu6phcmcx9iuPA=="
},
"acorn": {
"version": "8.11.2",
@ -3884,15 +3884,15 @@
}
},
"vue": {
"version": "3.4.8",
"resolved": "https://registry.npmjs.org/vue/-/vue-3.4.8.tgz",
"integrity": "sha512-vJffFOe6DqWsAI10v3tDhb1nJrj7CF3CbdQwOznywAsFNoyvrQ1AWQdcIWJpmRpRnw7NFzstzh6fh4w7n1PNdg==",
"version": "3.4.7",
"resolved": "https://registry.npmjs.org/vue/-/vue-3.4.7.tgz",
"integrity": "sha512-4urmkWpudekq0CPNMO7p6mBGa9qmTXwJMO2r6CT4EzIJVG7WoSReiysiNb7OSi/WI113oX0Srn9Rz1k/DCXKFQ==",
"requires": {
"@vue/compiler-dom": "3.4.8",
"@vue/compiler-sfc": "3.4.8",
"@vue/runtime-dom": "3.4.8",
"@vue/server-renderer": "3.4.8",
"@vue/shared": "3.4.8"
"@vue/compiler-dom": "3.4.7",
"@vue/compiler-sfc": "3.4.7",
"@vue/runtime-dom": "3.4.7",
"@vue/server-renderer": "3.4.7",
"@vue/shared": "3.4.7"
}
},
"vue-i18n": {

View File

@ -15,13 +15,13 @@
"monaco-editor": "^0.45.0",
"pinia": "^2.1.7",
"sass": "^1.69.7",
"vue": "^3.4.8",
"vue": "^3.4.7",
"vue-i18n": "^9.9.0",
"xterm": "^5.3.0",
"xterm-addon-fit": "^0.8.0"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.0.3",
"@vitejs/plugin-vue": "^5.0.2",
"naive-ui": "^2.37.3",
"prettier": "^3.1.1",
"unplugin-auto-import": "^0.17.3",

View File

@ -1 +1 @@
b7b4dcba7bae9a407221c4105139adcb
af8db32947008da00ca6dfaef778b59f

View File

@ -298,10 +298,6 @@ const loadProgress = computed(() => {
return (len * 100) / Math.max(len, props.length)
})
const showMemoryUsage = computed(() => {
return !isNaN(props.size) && props.size > 0
})
const onAddRow = () => {
dialogStore.openAddFieldsDialog(props.name, props.db, props.keyPath, props.keyCode, types.HASH)
}
@ -419,8 +415,8 @@ defineExpose({
</div>
<div class="value-footer flex-box-h">
<n-text v-if="!isNaN(props.length)">{{ $t('interface.entries') }}: {{ entries }}</n-text>
<n-divider v-if="showMemoryUsage" vertical />
<n-text v-if="showMemoryUsage">{{ $t('interface.memory_usage') }}: {{ bytes(props.size) }}</n-text>
<n-divider v-if="!isNaN(props.length)" vertical />
<n-text v-if="!isNaN(props.size)">{{ $t('interface.memory_usage') }}: {{ bytes(props.size) }}</n-text>
<div class="flex-item-expand"></div>
<format-selector
v-show="!inEdit"

View File

@ -266,10 +266,6 @@ const loadProgress = computed(() => {
return (len * 100) / Math.max(len, props.length)
})
const showMemoryUsage = computed(() => {
return !isNaN(props.size) && props.size > 0
})
const onAddValue = (value) => {
dialogStore.openAddFieldsDialog(props.name, props.db, props.keyPath, props.keyCode, types.LIST)
}
@ -387,8 +383,8 @@ defineExpose({
</div>
<div class="value-footer flex-box-h">
<n-text v-if="!isNaN(props.length)">{{ $t('interface.entries') }}: {{ entries }}</n-text>
<n-divider v-if="showMemoryUsage" vertical />
<n-text v-if="showMemoryUsage">{{ $t('interface.memory_usage') }}: {{ bytes(props.size) }}</n-text>
<n-divider v-if="!isNaN(props.length)" vertical />
<n-text v-if="!isNaN(props.size)">{{ $t('interface.memory_usage') }}: {{ bytes(props.size) }}</n-text>
<div class="flex-item-expand"></div>
<format-selector
v-show="!inEdit"

View File

@ -263,10 +263,6 @@ const loadProgress = computed(() => {
return (len * 100) / Math.max(len, props.length)
})
const showMemoryUsage = computed(() => {
return !isNaN(props.size) && props.size > 0
})
const onAddValue = (value) => {
dialogStore.openAddFieldsDialog(props.name, props.db, props.keyPath, props.keyCode, types.SET)
}
@ -384,8 +380,8 @@ defineExpose({
</div>
<div class="value-footer flex-box-h">
<n-text v-if="!isNaN(props.length)">{{ $t('interface.entries') }}: {{ entries }}</n-text>
<n-divider v-if="showMemoryUsage" vertical />
<n-text v-if="showMemoryUsage">{{ $t('interface.memory_usage') }}: {{ bytes(props.size) }}</n-text>
<n-divider v-if="!isNaN(props.length)" vertical />
<n-text v-if="!isNaN(props.size)">{{ $t('interface.memory_usage') }}: {{ bytes(props.size) }}</n-text>
<div class="flex-item-expand"></div>
<format-selector
v-show="!inEdit"

View File

@ -149,10 +149,6 @@ const loadProgress = computed(() => {
return (len * 100) / Math.max(len, props.length)
})
const showMemoryUsage = computed(() => {
return !isNaN(props.size) && props.size > 0
})
const onAddRow = () => {
dialogStore.openAddFieldsDialog(props.name, props.db, props.keyPath, props.keyCode, types.STREAM)
}
@ -242,8 +238,8 @@ defineExpose({
<div class="value-footer flex-box-h">
<n-text v-if="!isNaN(props.length)">{{ $t('interface.entries') }}: {{ entries }}</n-text>
<n-divider v-if="showMemoryUsage" vertical />
<n-text v-if="showMemoryUsage">{{ $t('interface.memory_usage') }}: {{ bytes(props.size) }}</n-text>
<n-divider v-if="!isNaN(props.length)" vertical />
<n-text v-if="!isNaN(props.size)">{{ $t('interface.memory_usage') }}: {{ bytes(props.size) }}</n-text>
<div class="flex-item-expand"></div>
</div>
</div>

View File

@ -70,7 +70,6 @@ const editingContent = ref('')
const enableSave = computed(() => {
return editingContent.value !== viewAs.value && !props.loading
})
const displayValue = computed(() => {
if (props.loading) {
return ''
@ -78,10 +77,6 @@ const displayValue = computed(() => {
return viewAs.value || decodeRedisKey(props.value)
})
const showMemoryUsage = computed(() => {
return !isNaN(props.size) && props.size > 0
})
watchEffect(
() => {
if (props.value !== undefined) {
@ -214,8 +209,8 @@ defineExpose({
</div>
<div class="value-footer flex-box-h">
<n-text v-if="!isNaN(props.length)">{{ $t('interface.length') }}: {{ props.length }}</n-text>
<n-divider v-if="showMemoryUsage" vertical />
<n-text v-if="showMemoryUsage">{{ $t('interface.memory_usage') }}: {{ bytes(props.size) }}</n-text>
<n-divider v-if="!isNaN(props.length)" vertical />
<n-text v-if="!isNaN(props.size)">{{ $t('interface.memory_usage') }}: {{ bytes(props.size) }}</n-text>
<div class="flex-item-expand" />
<format-selector
:decode="viewAs.decode"

View File

@ -300,10 +300,6 @@ const loadProgress = computed(() => {
return (len * 100) / Math.max(len, props.length)
})
const showMemoryUsage = computed(() => {
return !isNaN(props.size) && props.size > 0
})
const onAddRow = () => {
dialogStore.openAddFieldsDialog(props.name, props.db, props.keyPath, props.keyCode, types.ZSET)
}
@ -419,8 +415,8 @@ defineExpose({
</div>
<div class="value-footer flex-box-h">
<n-text v-if="!isNaN(props.length)">{{ $t('interface.entries') }}: {{ entries }}</n-text>
<n-divider v-if="showMemoryUsage" vertical />
<n-text v-if="showMemoryUsage">{{ $t('interface.memory_usage') }}: {{ bytes(props.size) }}</n-text>
<n-divider v-if="!isNaN(props.length)" vertical />
<n-text v-if="!isNaN(props.size)">{{ $t('interface.memory_usage') }}: {{ bytes(props.size) }}</n-text>
<div class="flex-item-expand"></div>
<format-selector
v-show="!inEdit"

View File

@ -166,7 +166,7 @@ const onClose = () => {
:loading="loading"
type="primary"
@click="onConfirmImport">
{{ $t('dialogue.import.import') }}
{{ $t('dialogue.export.export') }}
</n-button>
</div>
</template>

View File

@ -1,35 +0,0 @@
<script setup>
const props = defineProps({
strokeWidth: {
type: [Number, String],
default: 3,
},
})
</script>
<template>
<svg fill="none" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg">
<path
:stroke-width="props.strokeWidth"
d="M20 6H6V20H20V6Z"
fill="none"
stroke="currentColor"
stroke-linejoin="round" />
<path
:stroke-width="props.strokeWidth"
d="M20 28H6V42H20V28Z"
fill="none"
stroke="currentColor"
stroke-linejoin="round" />
<path
:stroke-width="props.strokeWidth"
d="M42 6H28V20H42V6Z"
fill="none"
stroke="currentColor"
stroke-linejoin="round" />
<path :stroke-width="props.strokeWidth" d="M29 28V42" stroke="currentColor" stroke-linecap="round" />
<path :stroke-width="props.strokeWidth" d="M41 28V42" stroke="currentColor" stroke-linecap="round" />
</svg>
</template>
<style lang="scss" scoped></style>

View File

@ -25,7 +25,6 @@ import { useRender } from '@/utils/render.js'
import RedisTypeTag from '@/components/common/RedisTypeTag.vue'
import usePreferencesStore from 'stores/preferences.js'
import { typesIconStyle } from '@/consts/support_redis_type.js'
import { nativeRedisKey } from '@/utils/key_convert.js'
const props = defineProps({
server: String,
@ -200,7 +199,7 @@ const handleSelectContextMenu = (key) => {
break
case 'key_copy':
case 'value_copy':
ClipboardSetText(nativeRedisKey(redisKey))
ClipboardSetText(redisKey)
.then((succ) => {
if (succ) {
$message.success(i18n.t('interface.copy_succ'))
@ -231,11 +230,29 @@ const handleSelectContextMenu = (key) => {
}
const onUpdateSelectedKeys = (keys, options) => {
if (!isEmpty(keys)) {
tabStore.setSelectedKeys(props.server, keys)
} else {
try {
if (!isEmpty(options)) {
// prevent load duplicate key
for (const node of options) {
if (node.type === ConnectionType.RedisValue) {
const { key, db } = node
const redisKey = node.redisKeyCode || node.redisKey
if (!includes(selectedKeys.value, key)) {
browserStore.loadKeySummary({
server: props.server,
db,
key: redisKey,
clearValue: true,
})
}
return
}
}
}
// default is load blank key to display server status
// tabStore.openBlank(props.server)
} finally {
tabStore.setSelectedKeys(props.server, keys)
}
}
@ -467,19 +484,6 @@ const renderSuffix = ({ option }) => {
const nodeProps = ({ option }) => {
return {
onClick: () => {
if (option.type === ConnectionType.RedisValue) {
if (tabStore.setActivatedKey(props.server, option.key)) {
const { db, redisKey, redisKeyCode } = option
browserStore.loadKeySummary({
server: props.server,
db,
key: redisKeyCode || redisKey,
clearValue: true,
})
}
}
},
onDblclick: () => {
if (props.loading) {
console.warn('TODO: alert to ignore double click when loading')
@ -501,7 +505,7 @@ const nodeProps = ({ option }) => {
contextMenuParam.x = e.clientX
contextMenuParam.y = e.clientY
contextMenuParam.show = true
// onUpdateSelectedKeys([option.key], [option])
onUpdateSelectedKeys([option.key], [option])
})
},
// onMouseover() {
@ -567,7 +571,7 @@ defineExpose({
</script>
<template>
<div :style="{ backgroundColor }" class="flex-box-v browser-tree-wrapper" @contextmenu="(e) => e.preventDefault()">
<div :style="{ backgroundColor }" class="flex-box-v browser-tree-wrapper">
<n-spin v-if="props.loading" class="fill-height" />
<n-empty v-else-if="!props.loading && isEmpty(data)" class="empty-content" />
<n-tree

View File

@ -15,7 +15,6 @@ import { extraTheme } from '@/utils/extra_theme.js'
import useBrowserStore from 'stores/browser.js'
import { useRender } from '@/utils/render.js'
import wechatUrl from '@/assets/images/wechat_official.png'
import QRCode from '@/components/icons/QRCode.vue'
const themeVars = useThemeVars()
const render = useRender()
@ -83,6 +82,10 @@ const preferencesOptions = computed(() => {
type: 'divider',
key: 'd1',
},
{
label: 'menu.wechat_official',
key: 'wechat_official',
},
{
label: 'menu.about',
key: 'about',
@ -103,6 +106,9 @@ const onSelectPreferenceMenu = (key) => {
case 'report':
BrowserOpenURL('https://github.com/tiny-craft/tiny-rdm/issues')
break
case 'wechat_official':
showWechat.value = true
break
case 'about':
dialogStore.openAboutDialog()
break
@ -152,13 +158,6 @@ const exThemeVars = computed(() => {
@select="onSelectPreferenceMenu">
<icon-button :icon="Config" :size="iconSize" :stroke-width="3" class="nav-menu-button" />
</n-dropdown>
<icon-button
v-if="prefStore.currentLanguage === 'zh'"
:icon="QRCode"
:size="iconSize"
:tooltip="$t('ribbon.wechat_official')"
class="nav-menu-button"
@click="showWechat = true" />
<icon-button
:icon="Github"
:size="iconSize"
@ -247,7 +246,7 @@ const exThemeVars = computed(() => {
.nav-menu-item {
align-items: center;
padding: 10px 0 15px;
padding: 10px 0;
gap: 18px;
--wails-draggable: none;

View File

@ -43,7 +43,7 @@
"key_icon_style0": "Short",
"key_icon_style1": "Full",
"key_icon_style2": "Point",
"key_icon_style3": "Common",
"key_icon_style3": "Key Icon",
"proxy": "Proxy",
"use_system_proxy": "Use system proxy",
"use_system_proxy_http": "Use system proxy only for HTTP(S) request",
@ -143,7 +143,6 @@
"server": "Server",
"browser": "Data Browser",
"log": "Log",
"wechat_official": "Wechat Official Account",
"github": "Github"
},
"dialogue": {
@ -340,6 +339,7 @@
"help": "Help",
"check_update": "Check for Updates...",
"report_bug": "Report a Bug",
"wechat_official": "Wechat Official Account",
"about": "About"
},
"log": {

View File

@ -43,7 +43,7 @@
"key_icon_style0": "紧凑类型",
"key_icon_style1": "全称类型",
"key_icon_style2": "圆点类型",
"key_icon_style3": "通用图标",
"key_icon_style3": "图标",
"proxy": "代理",
"use_system_proxy": "使用系统代理",
"use_system_proxy_http": "仅在HTTP请求时使用系统代理",
@ -143,7 +143,6 @@
"server": "服务器",
"browser": "数据浏览",
"log": "日志",
"wechat_official": "微信公众号",
"github": "Github"
},
"dialogue": {
@ -340,6 +339,7 @@
"help": "帮助",
"check_update": "检查更新...",
"report_bug": "报告错误",
"wechat_official": "微信公众号",
"about": "关于"
},
"log": {

View File

@ -16,7 +16,6 @@ export class TabItem {
* @param {string} subTab secondary tab value
* @param {string} [title] tab title
* @param {string} [icon] tab icon
* @param {string} [activatedKey] current activated key on displaying
* @param {string[]} expandedKeys
* @param {string[]} selectedKeys
* @param {CheckedKey[]} checkedKeys
@ -64,7 +63,6 @@ export class TabItem {
this.blank = blank
this.subTab = subTab
this.icon = icon
this.activatedKey = ''
this.expandedKeys = expandedKeys
this.selectedKeys = selectedKeys
this.checkedKeys = checkedKeys

View File

@ -400,7 +400,7 @@ const useBrowserStore = defineStore('browser', {
$message.error('load key summary fail: ' + msg)
}
// its danger to delete "non-exists" key, just remove from tree view
// await this.deleteKey(server, db, key, true)
await this.deleteKey(server, db, key, true)
// TODO: show key not found page or check exists on server first?
}
}

View File

@ -101,6 +101,11 @@ const useTabStore = defineStore('tab', {
return get(this.tabs, [this.activatedIndex, 'name'])
},
currentSelectedKeys() {
const tab = this.currentTab
return get(tab, 'selectedKeys', [])
},
currentCheckedKeys() {
const tab = this.currentTab
return get(tab, 'checkedKeys', [])
@ -743,23 +748,6 @@ const useTabStore = defineStore('tab', {
}
}
},
/**
* set activated key
* @param {string} server
* @param {string} key
*/
setActivatedKey(server, key) {
/** @type TabItem**/
let tab = find(this.tabList, { name: server })
if (tab != null) {
if (!isEmpty(key) && key !== tab.activatedKey) {
tab.activatedKey = key
return true
}
}
return false
},
},
})