highcharts::resource_info (public)

 highcharts::resource_info [ -version version ]

Defined in packages/highcharts/tcl/resource-procs.tcl

Get information about available version(s) of Highcharts, from the local filesystem, or from CDN.

Switches:
-version
(optional)

Partial Call Graph (max 5 caller/called nodes):
%3 highcharts::download highcharts::download (private) highcharts::resource_info highcharts::resource_info highcharts::download->highcharts::resource_info highcharts::register_urns highcharts::register_urns (private) highcharts::register_urns->highcharts::resource_info packages/highcharts/www/sitewide-admin/index.tcl packages/highcharts/ www/sitewide-admin/index.tcl packages/highcharts/www/sitewide-admin/index.tcl->highcharts::resource_info acs_package_root_dir acs_package_root_dir (public) highcharts::resource_info->acs_package_root_dir

Testcases:
No testcase defined.
Source code:
        #
        # If no version is specified, use the namespaced variable.
        #
        if {$version eq ""} {
            set version $::highcharts::version
        }

        #
        # Setup variables for access via CDN vs. local resources.
        #
        set resourceDir [acs_package_root_dir highcharts/www/resources]
        set resourceUrl /resources/highcharts/$version
        set cdnHost     cdnjs.cloudflare.com
        set cdn         //$cdnHost/

        if {[file exists $resourceDir/$version]} {
            #
            # Local version is installed
            #
            set prefix $resourceUrl/code
            set cdnHost ""
            set cspMap ""
        } else {
            #
            # Use CDN
            #
            # cloudflare has the following resources:
            #
            #    https://cdnjs.cloudflare.com/ajax/libs/highcharts/10.2.1/highcharts.js
            #    https://cdnjs.cloudflare.com/ajax/libs/highcharts/10.2.1/highcharts.min.js
            #
            #    https://cdnjs.cloudflare.com/ajax/libs/highcharts/10.2.1/modules/exporting.js
            #    https://cdnjs.cloudflare.com/ajax/libs/highcharts/10.2.1/modules/exporting.min.js
            #
            set prefix ${cdn}ajax/libs/highcharts/$version
            set cspMap [subst {
                urn:ad:js:highcharts {
                    script-src $cdnHost
                }}]
            #
            #
            # Other potential sources:
            #
            # https://www.highcharts.com/blog/download/
            # https://www.jsdelivr.com/package/npm/highcharts
        }

        #
        # Return the dict with at least the required fields
        #
        lappend result  resourceName "Highcharts"  resourceDir $resourceDir  cdn $cdn  cdnHost $cdnHost  prefix $prefix  cssFiles {}  jsFiles  {}  extraFiles {}  downloadURLs [subst {
                https://code.highcharts.com/zips/Highcharts-$version.zip
            }]  cspMap $cspMap  urnMap {}  versionCheckURL "https://cdnjs.com/libraries?q=highcharts"

        return $result
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: