mozilla / MozDef

DEPRECATED - MozDef: Mozilla Enterprise Defense Platform
Mozilla Public License 2.0
2.17k stars 328 forks source link

WebUI: Support Myo armband #258

Closed jeffbryner closed 9 years ago

jeffbryner commented 9 years ago

Myo is released along with a nice javascript library. Add support for myo gestures in alerts/attackers screens.

jeffbryner commented 9 years ago

Looks like it's mozdef.js: //init myo if present: //see if we have a myo armband try{ myMyo=Myo.create(); }catch(e){ debugLog('No myo found..you really should get one.') }

In each template: //setup myo gestures. if (myMyo){ myMyo.on('fist', function(edge){ if(!edge) return; console.log('Hello Myo!'); this.vibrate(); }); };

    template destroyed to clear event mappings:
    if (myMyo){
        myMyo.events=[]
    }
jeffbryner commented 9 years ago

I've got this working for pan/zoom and rotate in the attackers screen, but lack of wss support makes this fail when mozdef is running in https:

https://github.com/thalmiclabs/myo.js/issues/1

Holding this until wss is supported.