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

Function decodeKey

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

Source from the content-addressed store, hash-verified

883}
884
885function decodeKey (connectionId, key) {
886 if (typeof(connectionId) === 'object') {
887 // context menu click
888 var node = getKeyTree().get_node(connectionId.reference[0]);
889 key = getFullKeyPath(node);
890 connectionId = getRootConnection(node);
891 }
892
893 $.post('apiv2/key/' + encodeURIComponent(connectionId) + '/' + encodeURIComponent(key) + '?action=decode', function (data, status) {
894 if (status !== 'success') {
895 return alert('Could not decode key');
896 }
897
898 $('#base64Button').html('Encode <small>base64</small>')
899 .off('click')
900 .on('click', function() {
901 encodeString(connectionId, key)
902 });
903 $('#stringValue').val(data);
904 });
905}
906
907function clusterNodes (connectionId) {
908 if (typeof(connectionId) === 'object') {

Callers 1

encodeStringFunction · 0.70

Calls 5

getKeyTreeFunction · 0.85
getFullKeyPathFunction · 0.85
getRootConnectionFunction · 0.85
$Function · 0.85
encodeStringFunction · 0.70

Tested by

no test coverage detected