Skip to content

Commit

Permalink
check validity of url
Browse files Browse the repository at this point in the history
  • Loading branch information
mdshamoon committed Jan 13, 2021
1 parent 901b5b6 commit 449659d
Show file tree
Hide file tree
Showing 7 changed files with 274 additions and 160 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"private": false,
"dependencies": {
"react": "^16.8.6",
"react-dom": "^16.8.6"
"react-dom": "^16.8.6",
"react-notifications": "1.7.2"
},
"scripts": {
"lambda:serve": "netlify-lambda serve lambda -p 6000",
Expand Down
203 changes: 101 additions & 102 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,105 +118,104 @@
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>

<script>
var base = 'http://api.glific.test:4000/flow-editor/';

var uuid = '3fa22108-f464-41e5-81d9-d8a298854429';
var config = {
flow: uuid,
flowType: 'message',
localStorage: true,
mutable: true,
filters: ['facebook', 'whatsapp', 'airtime', 'resthook', 'classifier', 'ticketer'],
excludeTypes: [
'send_broadcast',
'add_contact_urn',
'remove_contact_groups',
'send_email',
'set_run_result',
'call_resthook',
'start_session',
'open_ticket',
'split_by_expression',
'transfer_airtime',
'split_by_intent',
'split_by_contact_field',
'split_by_run_result',
'split_by_random',
'split_by_groups',
'split_by_scheme'
],

excludeOperators: [
'has_beginning',
'has_text',
'has_number_lt',
'has_number_lte',
'has_number_gte',
'has_number_gt',
'has_date',
'has_date_category',
'has_date_lt',
'has_number_lte',
'has_number_gte',
'has_number_gt',
'has_date',
'has_date_category',
'has_date_lt',
'has_date_eq',
'has_date_gt',
'has_time',
'has_group',
'has_category',
'has_phone',
'has_phone_category',
'has_email',
'has_email_category',
'has_state',
'has_state_category',
'has_district',
'has_ward',
'has_error',
'has_value',
'has_pattern'
],

help: {
legacy_extra: 'help.html',
missing_dependency: 'help.html',
invalid_regex: 'help.html'
},
endpoints: {
globals: base + 'globals',
groups: base + 'groups',
fields: base + 'fields',
labels: base + 'labels',
channels: base + 'channels',
classifiers: base + 'classifiers',
ticketers: base + 'ticketers',
resthooks: base + 'resthooks',
templates: base + 'templates',
flows: base + 'flows',
revisions: base + 'revisions/' + uuid,
recents: base + 'recents',
languages: base + 'languages',
environment: base + 'environment',
recipients: base + 'recipients',
functions: base + 'functions',
completion: base + 'completion',
attachments: base + 'attachments',
activity: base + 'activity',

editor: '/',

simulateStart: null,
simulateResume: null
}
};

showFlowEditor(document.getElementById('floweditor'), config);
</script>

</html>
</body>

<script>
var base = 'http://localhost:4000/flow-editor/';

var uuid = '3fa22108-f464-41e5-81d9-d8a298854429';
var config = {
flow: uuid,
flowType: 'message',
localStorage: true,
mutable: true,
filters: ['facebook', 'whatsapp', 'airtime', 'resthook', 'classifier', 'ticketer'],
excludeTypes: [
'send_broadcast',
'add_contact_urn',
'remove_contact_groups',
'send_email',
'set_run_result',
'call_resthook',
'start_session',
'open_ticket',
'split_by_expression',
'transfer_airtime',
'split_by_intent',
'split_by_contact_field',
'split_by_run_result',
'split_by_random',
'split_by_groups',
'split_by_scheme'
],

excludeOperators: [
'has_beginning',
'has_text',
'has_number_lt',
'has_number_lte',
'has_number_gte',
'has_number_gt',
'has_date',
'has_date_category',
'has_date_lt',
'has_number_lte',
'has_number_gte',
'has_number_gt',
'has_date',
'has_date_category',
'has_date_lt',
'has_date_eq',
'has_date_gt',
'has_time',
'has_group',
'has_category',
'has_phone',
'has_phone_category',
'has_email',
'has_email_category',
'has_state',
'has_state_category',
'has_district',
'has_ward',
'has_error',
'has_value',
'has_pattern'
],

help: {
legacy_extra: 'help.html',
missing_dependency: 'help.html',
invalid_regex: 'help.html'
},
endpoints: {
globals: base + 'globals',
groups: base + 'groups',
fields: base + 'fields',
labels: base + 'labels',
channels: base + 'channels',
classifiers: base + 'classifiers',
ticketers: base + 'ticketers',
resthooks: base + 'resthooks',
templates: base + 'templates',
flows: base + 'flows',
revisions: base + 'revisions/' + uuid,
recents: base + 'recents',
languages: base + 'languages',
environment: base + 'environment',
recipients: base + 'recipients',
functions: base + 'functions',
completion: base + 'completion',
attachments: base + 'attachments',
activity: base + 'activity',

editor: '/',

simulateStart: null,
simulateResume: null
}
};

showFlowEditor(document.getElementById('floweditor'), config);
</script>
</html>
Loading

0 comments on commit 449659d

Please sign in to comment.