You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: deploy/basic/terraform/schema.yaml
+83-3
Original file line number
Diff line number
Diff line change
@@ -70,6 +70,14 @@ groupings:
70
70
- object_storage_mushop_media_compartment_ocid
71
71
- object_storage_mushop_media_visibility
72
72
73
+
- title: "Advanced Resource Options - Oracle Digital Assistant"
74
+
variables:
75
+
- oda_enabled
76
+
- oda_uri
77
+
- oda_channel_id
78
+
- oda_secret
79
+
- oda_user_init_message
80
+
73
81
- title: "Extras Hidden"
74
82
variables:
75
83
- user_ocid
@@ -464,23 +472,90 @@ variables:
464
472
- not:
465
473
- use_only_always_free_eligible_resources
466
474
475
+
oda_enabled:
476
+
type: boolean
477
+
title: "Enable Oracle Digital Assistant?"
478
+
description: "Enables the Oracle Digital Assistant as widget on the storefront. (chatbot balloon will appear on the MuShop UI) \nNOTE: This stack currently does not provision ODA, you need to bring your ODA instance and bot details."
479
+
visible:
480
+
and:
481
+
- show_advanced
482
+
483
+
oda_uri:
484
+
type: string
485
+
title: "Oracle Digital Assistant URI"
486
+
description: "The ODA URI. Do not include https: and slashes. e.g.: oda-xxxxxxx-x.data..digitalassistant.oci.oraclecloud.com"
487
+
visible:
488
+
and:
489
+
- show_advanced
490
+
- oda_enabled
491
+
492
+
oda_channel_id:
493
+
type: string
494
+
title: "Oracle Digital Assistant Channel ID"
495
+
description: "Oracle Digital Assistant Channel Id to be used with MuShop."
496
+
visible:
497
+
and:
498
+
- show_advanced
499
+
- oda_enabled
500
+
501
+
oda_secret:
502
+
type: string
503
+
title: "Oracle Digital Assistant Channel Secret"
504
+
description: "Oracle Digital Assistant Channel Secret. Only used if client auth is enabled."
505
+
visible:
506
+
and:
507
+
- show_advanced
508
+
- oda_enabled
509
+
510
+
oda_user_init_message:
511
+
type: string
512
+
title: "Oracle Digital Assistant user hidden init message"
513
+
description: "Hidden Init Message if any. Makes the Digital Assistant proactive. e.g.: Trending Today"
echo"$ME: Preparing index.html to enable Oracle Digital Assistant"
85
+
storefrontindex="$WWW_DIR/index.html"
86
+
[ -w$WWW_DIR ] &&echo"$ME: Enabling ODA SDK..."|| (echo "$ME: File System Not Writable. Exiting..."&&exit 0)
87
+
sed -i -e 's|<!-- head placeholder 1 -->|<script src="scripts/oda/settings.js"></script>|g'"$storefrontindex"|| (echo "$ME: *** Failed to enable ODA SDK. Exiting..."&&exit 0)
88
+
sed -i -e 's|<!-- head placeholder 2 -->|<script src="scripts/oda/web-sdk.js" onload="initSdk('$(echo -e "\x27")'Bots'$(echo -e "\x27")')"></script>|g'"$storefrontindex"|| (echo "$ME: *** Failed to enable ODA SDK. Exiting..."&&exit 0)
89
+
90
+
echo"$ME: Setting ODA variables"
91
+
odasettingsfile="$ODA_SCRIPTS_DIR/settings.js"
92
+
[ -w$odasettingsfile ] &&echo"$ME: Running envsubst to update ODA settings.js"|| (echo "$ME: settings.js Not Writable. Exiting..."&&exit 0)
0 commit comments