Description
As per the new import capbility for documents https://issues.couchbase.com/browse/MB-40757 Eventing should allow the UI to import functions as a URL not just import from the local file system.
Consider a public Eventing function
https://raw.githubusercontent.com/couchbaselabs/blog-source-code/master/Strabala/CronFiles/cron_impl_2func_651.json
https://raw.githubusercontent.com/couchbaselabs/blog-source-code/master/Strabala/CronFiles/cron_impl_2func_651.json
|
This can be URL encoded as a parameter as follows:
load_functoin="https%3A%2F%2Fraw.githubusercontent.com%2Fcouchbaselabs%2Fblog-source-code%2Fmaster%2FStrabala%2FCronFiles%2Fcron_impl_2func_651.json"
|
And we could invoke the Eventing UI
http://192.168.3.150:8091/ui/index.html#!/eventing/summary?load_functoin=%22https%3A%2F%2Fraw.githubusercontent.com%2Fcouchbaselabs%2Fblog-source-code%2Fmaster%2FStrabala%2FCronFiles%2Fcron_impl_2func_651.json%22
|
We would use this link to pre-fill out a form similar to the new "Document import" screen.
Maybe this will only work with "localhost" instead of an IP or domain name but regardless it would be a nice integration between both the server UI and the official documentation.
These capabilities are even more important as we promote CouchbaseCloud which has no user shell.