fleetfolio/aws_vpc_list.sql
SELECT 'dynamic' AS component, sqlpage.run_sql('shell/shell.sql') AS properties;
-- not including breadcrumbs from sqlpage_aide_navigation
-- not including page title from sqlpage_aide_navigation
SELECT 'title' AS component, (SELECT COALESCE(title, caption)
FROM sqlpage_aide_navigation
WHERE namespace = 'prime' AND path = 'fleetfolio/aws_vpc_list.sql/index.sql') as contents;
;
--- Display breadcrumb
SELECT
'breadcrumb' AS component;
SELECT
'Home' AS title,
sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/' AS link;
SELECT
'FleetFolio' AS title,
sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/fleetfolio/index.sql' AS link;
SELECT
'Boundary' AS title,
sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/fleetfolio/boundary.sql' AS link;
SELECT
'AWS Trust Boundary' AS title,
sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/fleetfolio/aws_trust_boundary_list.sql' AS link;
SELECT
'AWS VPC' AS title,
sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/fleetfolio/aws_vpc_list.sql' AS link;
--- Dsply Page Title
SELECT
'title' as component,
"AWS VPC" contents;
select
'text' as component,
'Amazon Virtual Private Cloud (VPC) is a logically isolated section of the AWS Cloud where you can launch and manage AWS resources in a custom-defined network. You control key networking aspects like IP address ranges, subnets, route tables, internet gateways, and security settings.' as contents;
SET total_rows = (SELECT COUNT(*) FROM list_aws_vpc );
SET limit = COALESCE($limit, 50);
SET offset = COALESCE($offset, 0);
SET total_pages = ($total_rows + $limit - 1) / $limit;
SET current_page = ($offset / $limit) + 1;
SELECT 'table' AS component,
'host' as markdown,
TRUE as sort,
TRUE as search;
SELECT
vpc_name as name,
account,
owner,
region,
state,
cidr_block as 'cidr block',
dhcp_options_id as 'DHCP Options ID',
is_default as "is default",
partition
FROM list_aws_vpc;
SELECT 'text' AS component,
(SELECT CASE WHEN $current_page > 1 THEN '[Previous](?limit=' || $limit || '&offset=' || ($offset - $limit) || ')' ELSE '' END) || ' ' ||
'(Page ' || $current_page || ' of ' || $total_pages || ") " ||
(SELECT CASE WHEN $current_page < $total_pages THEN '[Next](?limit=' || $limit || '&offset=' || ($offset + $limit) || ')' ELSE '' END)
AS contents_md
;