MCPcopy
hub / github.com/joeferner/redis-commander / addKey

Function addKey

web/static/scripts/redisCommander.js:800–814  ·  view source on GitHub ↗
(connectionId, key)

Source from the content-addressed store, hash-verified

798}
799
800function addKey (connectionId, key) {
801 if (typeof(connectionId) === 'object') {
802 // context menu click
803 const node = getKeyTree().get_node(connectionId.reference[0]);
804 connectionId = getRootConnection(node);
805 const foldingChar = connections.findById(connectionId).foldingChar
806 key = getFullKeyPath(node);
807 if (key.length > 0 && !key.endsWith(foldingChar)) {
808 key = key + foldingChar;
809 }
810 }
811 $('#keyValue').val(key);
812 $('#addKeyModal').modal('show');
813 setupAddKeyButton(connectionId);
814}
815
816function renameKey (connectionId, key) {
817 if (typeof(connectionId) === 'object') {

Callers

nothing calls this directly

Calls 5

getKeyTreeFunction · 0.85
getRootConnectionFunction · 0.85
getFullKeyPathFunction · 0.85
$Function · 0.85
setupAddKeyButtonFunction · 0.85

Tested by

no test coverage detected