Home directory for Malawi's wwwroot
Duncan Ewan
2021-02-19 3e758c29e0fde36fc088efcfc88f9a3014432b64
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/**
 * This list of outbound connection types supported 
 * per flow item type
 */
var nodeConnectionTypes = {'ftp_list' : [{type : 'ftp_files_found', label : 'Files Found'}],
                           'file_filter' : [{type : 'matched', label : 'Matched'},
                                            {type : 'unmatched', label : 'Unmatched'}],
                           'ftp_server' : [{type : 'ftp_connection', label : 'FTP Connection'}]};
 
/**
 * The list of flow item connection targets supported per
 * connection type.
 
 */
var connectionRules = {'ftp_files_found' : ['file_filter', 'file_move', 'ftp_delete'],
                       'matched' : ['file_filter', 'file_move', 'ftp_delete'],
                       'unmatched' : ['file_filter', 'file_move', 'ftp_delete'],
                       'ftp_connection' : ['ftp_list']};
 
/**
 * The existing flow items configured
 * 'circle' and 'rect' are the only shapes currently supported
 */
var flowNodes = [{id      : 1, 
                   entity_id : 1,
                   type      : 'ftp_list', 
                   label     : '', 
                   icon_url  : '',
                   shape     : {type   : 'circle',
                                entity_id : 1,
                                x      : '445',
                                y      : '300',
                                radius : 45,
                                border_color : '#7f7f7f',
                                border_width : 1,
                                fill   : '90-#ffde82-#fff3d8'}},
                  {id        : 2, 
                   entity_id : 2,
                   type      : 'file_filter', 
                   label     : 'File Filter', 
                   icon_url  : 'images/flowItems/file_filter.png',
                   shape     : {type   : 'circle',
                                entity_id : 1,
                                x      : 600,
                                y      : 300,
                                radius : 45,
                                border_color : '#7f7f7f',
                                border_width : 1,
                                fill   : '90-#ffde82-#fff3d8'}},
                   {id        : 3,
                    entity_id : 3,
                    type      : 'ftp_delete', 
                    label     : 'FTP Delete', 
                    icon_url  : 'images/flowItems/ftp_delete.png',
                    shape     : {type          : 'rect',
                                 entity_id     :  2,
                                 x             : 700,
                                 y             : 200,
                                 width         : 100,
                                 height        : 65,
                                 border_radius : 5,
                                 border_color  : '#7f7f7f',
                                 border_width  : 1,
                                 fill          : '90-#d9d9d9-#f2f2f2'}},
                   {id        : 4,
                    entity_id : 4,
                    type      : 'file_move', 
                    label     : 'File Move', 
                    icon_url  : 'images/flowItems/file_move.png',
                    shape     : {type          : 'rect',
                                 entity_id     :  2,
                                 x             : 700,
                                 y             : 400,
                                 width         : 100,
                                 height        : 65,
                                 border_radius : 5,
                                 border_color  : '#7f7f7f',
                                 border_width  : 1,
                                 fill          : '90-#d9d9d9-#f2f2f2'}},
                    {id        : 5,
                     entity_id : 5,
                     type      : 'ftp_server', 
                     label     : 'FTP Server', 
                     icon_url  : 'images/flowItems/ftp_server.png',
                     shape     : {type          : 'rect',
                                  entity_id     :  2,
                                  x             : 400,
                                  y             : 100,
                                  width         : 100,
                                  height        : 65,
                                  border_radius : 5,
                                  border_color  : '#7f7f7f',
                                  border_width  : 1,
                                  fill          : '90-#d9d9d9-#f2f2f2'}}]; 
/**
 * The list of existing connections between flow items.
 * For from and to port positions use the following:
 * 0 - Top Port
 * 1 - Right Port
 * 2 - Bottom Port
 * 3 - Left Port
 */
var nodeConnections = [{id          : 1,
                       entity_id    : 1,
                       type         : 'ftp_files_found',
                       label        : 'File List',
                       from_node_id : 1,
                       from_port    : 2,
                       to_node_id   : 2,
                       to_port      : 3},
                      {id           : 2,
                       entity_id    : 2,
                       type         : 'matched',
                       label        : 'Matched',
                       from_node_id : 2,
                       from_port    : 2,
                       to_node_id   : 4,
                       to_port      : 3},
                      {id           : 3,
                       entity_id    : 3,
                       type         : 'unmatched',
                       label        : 'Unmatched',
                       from_node_id : 2,
                       from_port    : 0,
                       to_node_id   : 3,
                       to_port      : 3},
                      {id           : 4,
                       entity_id    : 4,
                       type         : 'ftp_connection',
                       label        : 'FTP Connection',
                       from_node_id : 5,
                       from_port    : 2,
                       to_node_id   : 1,
                       to_port      : 0}];