Skip to content

Commit

Permalink
Enhance feature data processing and update JSON structure for pricing…
Browse files Browse the repository at this point in the history
… page

Signed-off-by: Lee Calcote <[email protected]>
  • Loading branch information
leecalcote committed Dec 9, 2024
1 parent 526febd commit 3530ba2
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 59 deletions.
10 changes: 8 additions & 2 deletions .github/build/features-to-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const fs = require("fs").promises; // Use fs.promises
const csv = require("csvtojson");
const [major, minor, patch] = process.versions.node.split(".").map(Number);
console.log(`Node.js version: ${major}.${minor}.${patch}`);
console.log(`Using Node.js version: ${major}.${minor}.${patch}`);

const headers = [
"Theme",
Expand All @@ -25,6 +25,9 @@ const headers = [
async function processCSV() {
try {
const csvFilePath = process.argv[2] || ".github/build/spreadsheet.csv";
if (process.argv[2]) {
console.log("Downloading features to: " + process.argv[2]);
}
const rows = await csv({
noheader: true,
headers: headers,
Expand Down Expand Up @@ -69,8 +72,11 @@ async function processCSV() {

// Read existing JSON data
// const featuresFile = process.env.FEATURES_FILE;
console.log("process.argv[3]: " + process.argv[3]);

const featuresFile = process.argv[3] || "src/sections/Pricing/feature_data.json";
if (process.argv[3]) {
console.log("Converting CSV to JSON in: " + process.argv[3]);
}
// const featuresFile = "src/sections/Pricing/feature_data.json";


Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ lint:

## Prepare a list of features for the pricing page.
features:
#`which nvm` use 18
curl -L https://docs.google.com/spreadsheets/d/e/2PACX-1vQwzrUSKfuSRcpkp7sJTw1cSB63s4HCjYLJeGPWECsvqn222hjaaONQlN4X8auKvlaB0es3BqV5rQyz/pub\?gid\=1153419764\&single\=true\&output\=csv -o .github/build/spreadsheet.csv
node .github/build/features-to-json.js .github/build/spreadsheet.csv src/sections/Pricing/feature_data.json
rm .github/build/spreadsheet.csv

.PHONY: setup build site clean site-fast lint features
129 changes: 73 additions & 56 deletions src/sections/Pricing/feature_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@
},
{
"theme": "",
"categoryOrder": "4",
"categoryOrder": "0",
"category": "Configuration Management",
"functionOrder": "2",
"function": "350 Built-in Models",
Expand All @@ -492,6 +492,74 @@
"pricing_page": "x",
"docs": ""
},
{
"theme": "",
"categoryOrder": "0",
"category": "Configuration Management",
"functionOrder": "3",
"function": "400 Cloud Native Patterns",
"feature": "",
"subscription_tier": "",
"comparison_tiers": {
"free": "x",
"teamDesigner": "x",
"teamOperator": "x",
"enterprise": "x"
},
"pricing_page": "x",
"docs": "https://cloud.layer5.io/catalog"
},
{
"theme": "",
"categoryOrder": "0",
"category": "Configuration Management",
"functionOrder": "1",
"function": "Whiteboarding",
"feature": "Ability to freeform draw any shapes, draw edges",
"subscription_tier": "Free",
"comparison_tiers": {
"free": "x",
"teamDesigner": "x",
"teamOperator": "x",
"enterprise": "x"
},
"pricing_page": "x",
"docs": "https://docs.layer5.io/kanvas/designer/whiteboarding/"
},
{
"theme": "",
"categoryOrder": "0",
"category": "Configuration Management",
"functionOrder": "1",
"function": "Visual Design",
"feature": "Drag-n-drop cloud native infrastructure designer to configure, model, and deploy your workloads",
"subscription_tier": "Free",
"comparison_tiers": {
"free": "x",
"teamDesigner": "x",
"teamOperator": "x",
"enterprise": "x"
},
"pricing_page": "x",
"docs": ""
},
{
"theme": "",
"categoryOrder": "0",
"category": "Configuration Management",
"functionOrder": "2",
"function": "Collaborative Design Review",
"feature": "Kanvas’s Designer enables you to place comments “inline” within designs. Comments can be used to offer feedback to team members, take detailed design notes, capture helpful tips for team members, and include justification as to infrastructure and application configuration decisions. In-line commenting. Threaded discussions. Notifications w/user mentions. Silence notifications. Resolve and reopen comments. Comment history.",
"subscription_tier": "TeamDesigner",
"comparison_tiers": {
"free": "",
"teamDesigner": "x",
"teamOperator": "",
"enterprise": "x"
},
"pricing_page": "x",
"docs": "https://docs.layer5.io/kanvas/designer/comments/"
},
{
"theme": "",
"categoryOrder": "5",
Expand Down Expand Up @@ -730,57 +798,6 @@
"pricing_page": "x",
"docs": ""
},
{
"theme": "",
"categoryOrder": "0",
"category": "Configuration Management",
"functionOrder": "1",
"function": "Whiteboarding",
"feature": "Ability to freeform draw any shapes, draw edges",
"subscription_tier": "Free",
"comparison_tiers": {
"free": "x",
"teamDesigner": "x",
"teamOperator": "x",
"enterprise": "x"
},
"pricing_page": "x",
"docs": "https://docs.layer5.io/kanvas/designer/whiteboarding/"
},
{
"theme": "",
"categoryOrder": "0",
"category": "Configuration Management",
"functionOrder": "1",
"function": "Visual Design",
"feature": "Drag-n-drop cloud native infrastructure designer to configure, model, and deploy your workloads",
"subscription_tier": "Free",
"comparison_tiers": {
"free": "x",
"teamDesigner": "x",
"teamOperator": "x",
"enterprise": "x"
},
"pricing_page": "x",
"docs": ""
},
{
"theme": "",
"categoryOrder": "0",
"category": "Configuration Management",
"functionOrder": "2",
"function": "Collaborative Design Review",
"feature": "Kanvas’s Designer enables you to place comments “inline” within designs. Comments can be used to offer feedback to team members, take detailed design notes, capture helpful tips for team members, and include justification as to infrastructure and application configuration decisions. In-line commenting. Threaded discussions. Notifications w/user mentions. Silence notifications. Resolve and reopen comments. Comment history.",
"subscription_tier": "TeamDesigner",
"comparison_tiers": {
"free": "",
"teamDesigner": "x",
"teamOperator": "",
"enterprise": "x"
},
"pricing_page": "x",
"docs": "https://docs.layer5.io/kanvas/designer/comments/"
},
{
"theme": "",
"categoryOrder": "0",
Expand Down Expand Up @@ -1055,7 +1072,7 @@
},
{
"theme": "",
"categoryOrder": "",
"categoryOrder": "1",
"category": "Catalog",
"functionOrder": "",
"function": "Export Design",
Expand All @@ -1072,7 +1089,7 @@
},
{
"theme": "",
"categoryOrder": "",
"categoryOrder": "1",
"category": "Catalog",
"functionOrder": "",
"function": "Export Design",
Expand All @@ -1089,7 +1106,7 @@
},
{
"theme": "",
"categoryOrder": "",
"categoryOrder": "1",
"category": "Catalog",
"functionOrder": "",
"function": "Export Design",
Expand All @@ -1106,7 +1123,7 @@
},
{
"theme": "",
"categoryOrder": "",
"categoryOrder": "1",
"category": "Catalog",
"functionOrder": "",
"function": "Export Design",
Expand Down

0 comments on commit 3530ba2

Please sign in to comment.