This is an automated email from the ASF dual-hosted git repository. urfree pushed a commit to branch matrix-page in repository https://gitbox.apache.org/repos/asf/pulsar-site.git
commit 22baf3b53e3d54f1172f5085091b8944bdf09894 Author: Li Li <[email protected]> AuthorDate: Wed Apr 12 14:14:20 2023 +0800 update Signed-off-by: Li Li <[email protected]> --- data/matrix.js | 230 +++++++++++++++++++++++++++++++++++++++++++++++++++- src/pages/matrix.js | 74 +++++++++++------ 2 files changed, 279 insertions(+), 25 deletions(-) diff --git a/data/matrix.js b/data/matrix.js index 4b5076e8acc..aa1046ab6d2 100644 --- a/data/matrix.js +++ b/data/matrix.js @@ -173,7 +173,235 @@ module.exports = { "NET(C#/F#/VB)": 2, }, ], - producer: [], + producer: [ + { + Feature: "Batching", + Java: 2, + "C++": 2, + Go: 2, + Python: 2, + Nodejs: 2, + "C#/DotPulsar": 0, + Websocket: 2, + REST: 0, + "NET(C#/F#/VB)": 2, + }, + { + Feature: "Chunking", + Java: 2, + "C++": 2, + Go: 2, + Python: 2, + Nodejs: 2, + "C#/DotPulsar": 0, + Websocket: 0, + REST: 0, + "NET(C#/F#/VB)": 2, + }, + { + Feature: "Delayed message delivery", + Java: 2, + "C++": 2, + Go: 2, + Python: 2, + Nodejs: 2, + "C#/DotPulsar": 2, + Websocket: 0, + REST: 2, + "NET(C#/F#/VB)": 2, + }, + { + Feature: "Compression", + Children: [ + { + Feature: "LZ4", + Java: 2, + "C++": 2, + Go: 2, + Python: 2, + Nodejs: 2, + "C#/DotPulsar": 2, + Websocket: 2, + REST: 0, + "NET(C#/F#/VB)": 2, + }, + { + Feature: "ZLIB", + Java: 2, + "C++": 2, + Go: 2, + Python: 2, + Nodejs: 2, + "C#/DotPulsar": 2, + Websocket: 0, + REST: 0, + "NET(C#/F#/VB)": 2, + }, + { + Feature: "ZSTD", + Java: 2, + "C++": 2, + Go: 2, + Python: 2, + Nodejs: 2, + "C#/DotPulsar": 2, + Websocket: 0, + REST: 0, + "NET(C#/F#/VB)": 2, + }, + { + Feature: "SNAPPY", + Java: 2, + "C++": 2, + Go: 2, + Python: 2, + Nodejs: 2, + "C#/DotPulsar": 2, + Websocket: 0, + REST: 0, + "NET(C#/F#/VB)": 2, + }, + ], + }, + { + Feature: "Schema", + Children: [ + { + Feature: "Primitive", + Java: 2, + "C++": 2, + Go: 2, + Python: 2, + Nodejs: 2, + "C#/DotPulsar": 2, + Websocket: 0, + REST: 2, + "NET(C#/F#/VB)": 2, + }, + { + Feature: "Avro", + Java: 2, + "C++": 2, + Go: 2, + Python: 2, + Nodejs: 2, + "C#/DotPulsar": 0, + Websocket: 0, + REST: 2, + "NET(C#/F#/VB)": 2, + }, + { + Feature: "JSON", + Java: 2, + "C++": 2, + Go: 2, + Python: 2, + Nodejs: 2, + "C#/DotPulsar": 0, + Websocket: 0, + REST: 2, + "NET(C#/F#/VB)": 2, + }, + { + Feature: "Protobuf", + Java: 2, + "C++": 2, + Go: 2, + Python: 0, + Nodejs: 0, + "C#/DotPulsar": 0, + Websocket: 0, + REST: 0, + "NET(C#/F#/VB)": 2, + }, + { + Feature: "Protobuf-native", + Java: 2, + "C++": 2, + Go: 2, + Python: 0, + Nodejs: 0, + "C#/DotPulsar": 0, + Websocket: 0, + REST: 0, + "NET(C#/F#/VB)": 2, + }, + { + Feature: "Native avro", + Java: 2, + "C++": 0, + Go: 0, + Python: 0, + Nodejs: 0, + "C#/DotPulsar": 0, + Websocket: 0, + REST: 0, + "NET(C#/F#/VB)": 0, + }, + { + Feature: "KeyValue", + Java: 2, + "C++": 2, + Go: 0, + Python: 0, + Nodejs: 0, + "C#/DotPulsar": 0, + Websocket: 2, + REST: 2, + "NET(C#/F#/VB)": 2, + }, + { + Feature: "Autoschema", + Java: 2, + "C++": 0, + Go: 0, + Python: 0, + Nodejs: 0, + "C#/DotPulsar": 0, + Websocket: 0, + REST: 0, + "NET(C#/F#/VB)": 2, + }, + ], + }, + { + Feature: "Transaction", + Java: 2, + "C++": 0, + Go: 0, + Python: 0, + Nodejs: 0, + "C#/DotPulsar": 0, + Websocket: 0, + REST: 0, + "NET(C#/F#/VB)": 2, + }, + { + Feature: "End-to-end encryption", + Java: 2, + "C++": 2, + Go: 2, + Python: 2, + Nodejs: 2, + "C#/DotPulsar": 0, + Websocket: 0, + REST: 0, + "NET(C#/F#/VB)": 2, + }, + { + Feature: "Sync | Async Send", + Java: 2, + "C++": 2, + Go: 2, + Python: 2, + Nodejs: 2, + "C#/DotPulsar": 2, + Websocket: 2, + REST: 0, + "NET(C#/F#/VB)": 2, + }, + ], consumer: [], reader: [], + tableview: [], }; diff --git a/src/pages/matrix.js b/src/pages/matrix.js index a8cb6681ecb..921351ea3a5 100644 --- a/src/pages/matrix.js +++ b/src/pages/matrix.js @@ -8,6 +8,7 @@ import { producer, reader, consumer, + tableview, } from "../../data/matrix.js"; const _key = (language) => language.replace(".", "").replace(" ", ""); @@ -17,7 +18,7 @@ const genColomns = () => { key: _key(language), dataKey: _key(language), title: language === "Sub" ? "" : language, - width: index > 1 ? 132 : 154, + width: index > 1 ? 126 : 180, dataGetter: ({ column, rowData }) => { if (parseInt(rowData[column.dataKey]) === 0) { return "🚫"; @@ -82,8 +83,15 @@ const genCount = (values) => { return count; }; -const getHeigh = (values) => { - return "h-[" + genCount(values) * 50 + "px]"; +const titles = ["Client", "Producer", "Consumer", "Reader", "TableView"]; +const getHeight = (values, index) => { + console.log("h-[" + genCount(values) * 50 + "px]"); + if (index === 0) return "h-[700px]"; + if (index === 1) return "h-[950px]"; + if (index === 2) return "h-[700px]"; + if (index === 3) return "h-[700px]"; + if (index === 4) return "h-[700px]"; + return "h-[700px]"; }; const columns = genColomns(); @@ -113,33 +121,51 @@ const rowRenderer = ({ rowData, rowIndex, cells, columns }) => { return cells; }; -const titles = ["Client", "Producer", "Consumer", "Reader"]; export default function Matrix() { return ( <Layout> <div className="tailwind"> <div className="my-12 container"> - {[client, producer, consumer, reader].map((values, index) => { - return ( - <div className="mb-8" key={index}> - <div className="font-bold text-xl mb-4">{titles[index]}</div> - <div className={`w-full ${getHeigh(values)}`}> - <AutoResizer> - {({ width, height }) => ( - <BaseTable - fixed - width={width} - height={height} - columns={fixedColumns} - data={genData(values)} - rowRenderer={rowRenderer} - /> - )} - </AutoResizer> + {/* <div className="mb-8"> + <div className="font-bold text-xl mb-4">Client</div> + <div className={clsx("w-full", getHeigh(client))}> + <AutoResizer> + {({ width, height }) => ( + <BaseTable + fixed + width={width} + height={height} + columns={fixedColumns} + data={genData(client)} + rowRenderer={rowRenderer} + /> + )} + </AutoResizer> + </div> + </div> */} + {[client, producer, consumer, reader, tableview].map( + (values, index) => { + return ( + <div className="mb-8" key={index}> + <div className="font-bold text-xl mb-4">{titles[index]}</div> + <div className={`w-full ${getHeight(values, index)}`}> + <AutoResizer> + {({ width, height }) => ( + <BaseTable + fixed + width={width} + height={height} + columns={fixedColumns} + data={genData(values)} + rowRenderer={rowRenderer} + /> + )} + </AutoResizer> + </div> </div> - </div> - ); - })} + ); + } + )} </div> </div> </Layout>
