3 /* Expected format of the node (there are no required fields)
5 id : "string" // will be autogenerated if omitted
6 text : "string" // node text
7 icon : "string" // string for custom
9 opened : boolean // is the node open
10 disabled : boolean // is the node disabled
11 selected : boolean // is the node selected
13 children : [] // array of strings or objects
17 var getQueuesChildren = function(prefix) {
20 id: prefix + 'answered',
23 id: prefix + 'unanswered',
26 id: prefix + 'distribution',
31 var getVoiceChildren = function(prefix) {
34 id: prefix + 'queues',
36 icon: 'icon s20 icon-stackoverflow',
37 children: getQueuesChildren(prefix + 'queues')
41 icon: 'icon s20 icon-phone-dots'
43 id: prefix + 'agents',
45 icon: 'icon s20 icon-account-multiple'
47 id: prefix + 'callysquare',
49 icon: 'icon s20 icon-sitemap'
51 id: prefix + 'recordings',
53 icon: 'icon s20 icon-microphone'
57 var getBullChildren = function(prefix) {
60 id: prefix + 'queue_campaigns',
61 text: 'Queue Campaigns',
62 icon: 'icon s20 icon-stackoverflow'
64 id: prefix + 'ivr_campaigns',
65 text: 'IVR Campaigns',
66 icon: 'icon s20 icon-sitemap'
71 var getMotionChildren = function(prefix) {
76 icon: 'icon s20 icon-phone-log',
77 children: getVoiceChildren(prefix + 'voice')
81 icon: 'icon s20 icon-fire',
82 children: getBullChildren(prefix + 'bull')
86 icon: 'icon s20 icon-hangouts'
90 icon: 'icon s20 icon-email'
92 id: prefix + 'openchannel',
94 icon: 'icon s20 icon-google-earth'
98 icon: 'icon s20 icon-message-text'
102 icon: 'icon s20 icon-deskphone'
104 id: prefix + 'whatsapp',
105 text: 'WhatsApp Connector',
106 icon: 'icon s20 icon-whatsapp'
108 id: prefix + 'agents',
110 icon: 'icon s20 icon-account-multiple'
114 var getTree = function(custom) {
116 id: custom ? 'custom' : 'motion',
117 text: (custom ? 'Custom' : 'Motion') + ' Reports',
118 icon: 'icon s20 ' + (custom ? 'icon-laptop-chromebook' : 'icon-cloud'),
123 children: getMotionChildren(custom ? 'custom' : 'motion')
127 exports.motion = getTree(false);
128 exports.custom = getTree(true);