shell/shell.sql

SELECT 'shell' AS component,
       'Diabetes Research Hub Edge' AS title,
       NULL AS icon,
       'https://drh.diabetestechnology.org/_astro/favicon.CcrFY5y9.ico' AS favicon,
       'https://drh.diabetestechnology.org/images/diabetic-research-hub-logo.png' AS image,
       'fluid' AS layout,
       true AS fixed_top_menu,
       '/' AS link,
       '{"link":"/","title":"Home"}' AS menu_item,
       'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11/build/highlight.min.js' AS javascript,
       'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11/build/languages/sql.min.js' AS javascript,
       'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11/build/languages/handlebars.min.js' AS javascript,
       'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11/build/languages/json.min.js' AS javascript,
       'https://app.devl.drh.diabetestechnology.org/js/d3-aide.js' AS javascript,
       '/js/chart-component.js' AS javascript,
       json_object(
            'link', sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || ''||'ur',
            'title', 'Uniform Resource',      
            'target', '',      
            'submenu', (
                SELECT json_group_array(
                    json_object(
                        'title', title,
                        'link', sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/'||link,
                        'description', description,
                        'target', target                      
                    )
                )
                FROM (
                    SELECT
                        COALESCE(abbreviated_caption, caption) as title,
                        COALESCE(url, path) as link,
                        description,
                        elaboration as target
                    FROM sqlpage_aide_navigation
                    WHERE namespace = 'prime' AND parent_path = 'ur/index.sql'
                    ORDER BY sibling_order
                )
            )
        ) as menu_item,
       json_object(
            'link', sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || ''||'console',
            'title', 'Console',      
            'target', '',      
            'submenu', (
                SELECT json_group_array(
                    json_object(
                        'title', title,
                        'link', sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/'||link,
                        'description', description,
                        'target', target                      
                    )
                )
                FROM (
                    SELECT
                        COALESCE(abbreviated_caption, caption) as title,
                        COALESCE(url, path) as link,
                        description,
                        elaboration as target
                    FROM sqlpage_aide_navigation
                    WHERE namespace = 'prime' AND parent_path = 'console/index.sql'
                    ORDER BY sibling_order
                )
            )
        ) as menu_item,
       json_object(
            'link', sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || ''||'orchestration',
            'title', 'Orchestration',      
            'target', '',      
            'submenu', (
                SELECT json_group_array(
                    json_object(
                        'title', title,
                        'link', sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/'||link,
                        'description', description,
                        'target', target                      
                    )
                )
                FROM (
                    SELECT
                        COALESCE(abbreviated_caption, caption) as title,
                        COALESCE(url, path) as link,
                        description,
                        elaboration as target
                    FROM sqlpage_aide_navigation
                    WHERE namespace = 'prime' AND parent_path = 'orchestration/index.sql'
                    ORDER BY sibling_order
                )
            )
        ) as menu_item,
       json_object(
            'link', sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || ''||'https://drh.diabetestechnology.org/',
            'title', 'DRH Home',      
            'target', '__blank',      
            'submenu', (
                SELECT json_group_array(
                    json_object(
                        'title', title,
                        'link', sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/'||link,
                        'description', description,
                        'target', target                      
                    )
                )
                FROM (
                    SELECT
                        COALESCE(abbreviated_caption, caption) as title,
                        COALESCE(url, path) as link,
                        description,
                        elaboration as target
                    FROM sqlpage_aide_navigation
                    WHERE namespace = 'prime' AND parent_path = 'https://drh.diabetestechnology.org//index.sql'
                    ORDER BY sibling_order
                )
            )
        ) as menu_item,
       json_object(
            'link', sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || ''||'https://www.diabetestechnology.org/',
            'title', 'DTS Home',      
            'target', '__blank',      
            'submenu', (
                SELECT json_group_array(
                    json_object(
                        'title', title,
                        'link', sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/'||link,
                        'description', description,
                        'target', target                      
                    )
                )
                FROM (
                    SELECT
                        COALESCE(abbreviated_caption, caption) as title,
                        COALESCE(url, path) as link,
                        description,
                        elaboration as target
                    FROM sqlpage_aide_navigation
                    WHERE namespace = 'prime' AND parent_path = 'https://www.diabetestechnology.org//index.sql'
                    ORDER BY sibling_order
                )
            )
        ) as menu_item,
       'https://app.devl.drh.diabetestechnology.org/js/wc/d3/stacked-bar-chart.js' AS javascript_module,
       'https://app.devl.drh.diabetestechnology.org/js/wc/d3/gri-chart.js' AS javascript_module,
       'https://app.devl.drh.diabetestechnology.org/js/wc/d3/dgp-chart.js' AS javascript_module,
       'https://app.devl.drh.diabetestechnology.org/js/wc/d3/agp-chart.js' AS javascript_module,
       'https://app.devl.drh.diabetestechnology.org/js/wc/formula-component.js' AS javascript_module,
       'Resource Surveillance Web UI (v' || sqlpage.version() || ') ' || '📄 [' || substr(sqlpage.path(), 2) || '](' || sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/sqlpage-files/sqlpage-file.sql?path=' || substr(sqlpage.path(), 2) || ')' as footer;