From 6349cf629c92c029a1e5c788812b316ccf87f4a5 Mon Sep 17 00:00:00 2001 From: Sebastian Costinel Date: Wed, 23 Feb 2022 12:46:23 +0100 Subject: [PATCH 1/2] Function render tutorials --- index.js | 74 ++++++++++++++++++++++++++++++-- tutorials/index.asciidoc | 0 tutorials/pom.xml | 93 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 163 insertions(+), 4 deletions(-) create mode 100644 tutorials/index.asciidoc create mode 100644 tutorials/pom.xml diff --git a/index.js b/index.js index 964e66c..6b04a96 100644 --- a/index.js +++ b/index.js @@ -1,8 +1,74 @@ +function renderTutorials(tutorialDictionary) { + for (const key in tutorialDictionary) { + const tutorial = tutorialDictionary[key]; + console.log(tutorial); + console.log(key); + var tutorialDiv = $( + '
' + ); + var tutorialHeadlineDiv = $( + '

' + ); + + tutorialHeadlineDiv.text(tutorial.title); + + var tutorialHeadSubtitle = $( + '

prueba

' + ); + tutorialHeadSubtitle.text(tutorial.subtitle); + + tutorialDiv.append(tutorialHeadlineDiv); + tutorialDiv.append(tutorialHeadSubtitle); + + var solutionBodyDiv = $( + '
' + ); + var solutionSnippetDiv = $( + '
' + ); + + if (tutorial.links.length > 0) { + var tutorialsLinksList = $( + '' + ); + for (let tutorialLinks = 0;tutorialLinks < tutorial.links.length;tutorialLinks++) { + let name = tutorial.links[tutorialLinks].name; + let link = tutorial.links[tutorialLinks].url; + let tutorialSite = $('
  • '); + let tutorialSiteLink = $(''); + + tutorialSiteLink.text(name); + tutorialSite.append(tutorialSiteLink); + tutorialsLinksList.append(tutorialSite); + } + } + solutionSnippetDiv.text(tutorial.description); + solutionBodyDiv.append(solutionSnippetDiv); + solutionBodyDiv.append(tutorialsLinksList); + tutorialDiv.append(solutionBodyDiv); + $("#solutioncontent").append(tutorialDiv); + } +} + +window.onpopstate = () => { + search(); +}; async function main() { - - var resultspanel = $('
    '); - $("#content").append(resultspanel); + let tutorialsJson = await $.ajax({ + url: "tutorials.json?r=" + Math.random() * 10000, + }); + console.log(tutorialsJson); + + $("head").append( + '' + ); + var flexDiv = $('
    '); + $("#content").append(flexDiv); + + renderTutorials(tutorialsJson); } -main(); \ No newline at end of file +main(); diff --git a/tutorials/index.asciidoc b/tutorials/index.asciidoc new file mode 100644 index 0000000..e69de29 diff --git a/tutorials/pom.xml b/tutorials/pom.xml new file mode 100644 index 0000000..6ed07ef --- /dev/null +++ b/tutorials/pom.xml @@ -0,0 +1,93 @@ + + 4.0.0 + com.devonfw.website + website-learning-browser-tutorials + dev-SNAPSHOT + pom + + + com.devonfw.website + website-learning-browser + dev-SNAPSHOT + + + + + + index.asciidoc + ${basedir}/../../asciidoctor-backend/erb/html5/ + ${basedir}/../../asciidoctor-stylesheet/target/stylesheets/ + toc=false + + + + + + org.apache.maven.plugins + maven-deploy-plugin + 3.0.0-M1 + + true + + + + + org.apache.maven.plugins + maven-resources-plugin + 3.1.0 + + + copy-website-includes + initialize + + copy-resources + + + true + ${project.build.directory}/generated-docs/website/_includes/ + + + ${basedir}/../../website/target/generated-docs/components/ + false + + **/*.html + **/*.css + **/*.js + **/*.jpg + **/*.jpeg + **/*.png + **/*.svg + **/*.gif + **/*.ico + + + + + + + copy-css + initialize + + copy-resources + + + true + ${project.build.directory}/generated-docs/ + + + ${stylesheet.target.dir} + false + + devonfw.css + + + + + + + + + + + From 87d3adffd1f876dc25762c8e743147812c0db3e3 Mon Sep 17 00:00:00 2001 From: Sebastian Costinel Date: Fri, 25 Feb 2022 09:56:33 +0100 Subject: [PATCH 2/2] added tags.json fo tests --- tags.json | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 tags.json diff --git a/tags.json b/tags.json new file mode 100644 index 0000000..dcb36b9 --- /dev/null +++ b/tags.json @@ -0,0 +1,99 @@ +{ + "Category": { + "Performance": [], + "Scaling": [], + "Provisioning": [ + "provisioning_azure_azuredevops", + "provisioning_azure_github", + "provisioning_platforms", + "provisioning_problem" + ], + "Deployment": [], + "Networking": [], + "Backup": [], + "Database": [], + "Storage": ["cloud_storage_overview"], + "Availability": [], + "Disaster recovery": [], + "Analytics": [], + "Architecture": ["architecture_hexgagonal"], + "Communication": ["communication"], + "Enduser Management": [ + "endusermgmt_azure_aad", + "endusermgmt_platforms", + "endusermgmt_problem" + ], + "Microservice Platforms": [ + "microservices_platforms", + "microservices_problem" + ], + "Kubernetes": ["microservices_platforms", "microservices_problem"], + "Monitoring": [ + "monitoring_aws_cloudwatchCustomAlarm", + "monitoring_azure_native", + "monitoring_openTelemetry", + "monitoring_platforms", + "monitoring_problem" + ], + "Security": ["security_authentication", "security_authorization"], + "Authentication": ["security_authentication"], + "Authorization": ["security_authorization"] + }, + "Platform": { + "AWS": ["monitoring_aws_cloudwatchCustomAlarm"], + "Azure": [ + "endusermgmt_azure_aad", + "endusermgmt_platforms", + "endusermgmt_problem", + "microservices_azure_aks", + "microservices_platforms", + "monitoring_azure_native", + "monitoring_platforms", + "provisioning_azure_azuredevops", + "provisioning_azure_github", + "provisioning_platforms", + "provisioning_problem" + ], + "Kubernetes": [] + }, + "Maturity level": { + "Initial": [ + "architecture_hexgagonal", + "cloud_storage_overview", + "monitoring_aws_cloudwatchCustomAlarm" + ], + "Complete": [ + "Angular_Data_Mocking_and_Service", + "Generate_Java_app", + "devon4j_architecture" + ], + "Advanced": ["endusermgmt_problem"] + }, + "Product": { + "cloudwatch": ["monitoring_aws_cloudwatchCustomAlarm"], + "lambda": ["monitoring_aws_cloudwatchCustomAlarm"], + "ses": ["monitoring_aws_cloudwatchCustomAlarm"], + "Storage": ["cloud_storage_overview"], + "Kafka": ["communication"], + "Istio": ["communication"], + "Azure Kubernetes Service": ["microservices_platforms"], + "Azure Container Instances": ["microservices_platforms"], + "Azure Red Hat OpenShift": ["microservices_platforms"], + "OpenTelemetry": ["monitoring_openTelemetry"], + "Zipkin": ["monitoring_openTelemetry"], + "Jaeger": ["monitoring_openTelemetry"], + "Victoria Metrics": ["monitoring_openTelemetry"], + "Grafana": ["monitoring_openTelemetry"], + "Keycloak": ["security_authentication", "security_authorization"], + "WSO2": ["security_authentication", "security_authorization"], + "Gluu": ["security_authentication", "security_authorization"], + "ForgeRock": ["security_authentication", "security_authorization"] + }, + "Standard": { + "OAuth": ["security_authentication", "security_authorization"], + "OIDC": ["security_authentication", "security_authorization"], + "JWT": ["security_authentication", "security_authorization"], + "SAML": ["security_authentication", "security_authorization"], + "WebAuthn": ["security_authentication", "security_authorization"] + } +}