diff --git a/doc/web-doc/adr/0001-record-architecture-decisions.md b/doc/adr/0001-record-architecture-decisions.md similarity index 100% rename from doc/web-doc/adr/0001-record-architecture-decisions.md rename to doc/adr/0001-record-architecture-decisions.md diff --git a/doc/web-doc/adr/0002-GraphQL.md b/doc/adr/0002-GraphQL.md similarity index 100% rename from doc/web-doc/adr/0002-GraphQL.md rename to doc/adr/0002-GraphQL.md diff --git a/doc/web-doc/adr/0002/graphql-server-prototype/README.md b/doc/adr/0002/graphql-server-prototype/README.md similarity index 100% rename from doc/web-doc/adr/0002/graphql-server-prototype/README.md rename to doc/adr/0002/graphql-server-prototype/README.md diff --git a/doc/web-doc/adr/0002/graphql-server-prototype/index.js b/doc/adr/0002/graphql-server-prototype/index.js similarity index 100% rename from doc/web-doc/adr/0002/graphql-server-prototype/index.js rename to doc/adr/0002/graphql-server-prototype/index.js diff --git a/doc/web-doc/adr/0002/graphql-server-prototype/package-lock.json b/doc/adr/0002/graphql-server-prototype/package-lock.json similarity index 100% rename from doc/web-doc/adr/0002/graphql-server-prototype/package-lock.json rename to doc/adr/0002/graphql-server-prototype/package-lock.json diff --git a/doc/web-doc/adr/0002/graphql-server-prototype/package.json b/doc/adr/0002/graphql-server-prototype/package.json similarity index 100% rename from doc/web-doc/adr/0002/graphql-server-prototype/package.json rename to doc/adr/0002/graphql-server-prototype/package.json diff --git a/doc/web-doc/adr/0002/graphql-server-prototype/test b/doc/adr/0002/graphql-server-prototype/test similarity index 100% rename from doc/web-doc/adr/0002/graphql-server-prototype/test rename to doc/adr/0002/graphql-server-prototype/test diff --git a/doc/web-doc/adr/0002/graphql-server-prototype/yarn.lock b/doc/adr/0002/graphql-server-prototype/yarn.lock similarity index 100% rename from doc/web-doc/adr/0002/graphql-server-prototype/yarn.lock rename to doc/adr/0002/graphql-server-prototype/yarn.lock diff --git a/doc/web-doc/adr/0003-D3-charts.md b/doc/adr/0003-D3-charts.md similarity index 100% rename from doc/web-doc/adr/0003-D3-charts.md rename to doc/adr/0003-D3-charts.md diff --git a/doc/web-doc/adr/0003/Example_ChartJS.png b/doc/adr/0003/Example_ChartJS.png similarity index 100% rename from doc/web-doc/adr/0003/Example_ChartJS.png rename to doc/adr/0003/Example_ChartJS.png diff --git a/doc/web-doc/adr/0003/Example_D3.png b/doc/adr/0003/Example_D3.png similarity index 100% rename from doc/web-doc/adr/0003/Example_D3.png rename to doc/adr/0003/Example_D3.png diff --git a/doc/web-doc/adr/0004-Using-Hotjar-to-track-user-happiness.md b/doc/adr/0004-Using-Hotjar-to-track-user-happiness.md similarity index 100% rename from doc/web-doc/adr/0004-Using-Hotjar-to-track-user-happiness.md rename to doc/adr/0004-Using-Hotjar-to-track-user-happiness.md diff --git a/doc/web-doc/adr/0004/keil-studio-1-0.0.1.png b/doc/adr/0004/keil-studio-1-0.0.1.png similarity index 100% rename from doc/web-doc/adr/0004/keil-studio-1-0.0.1.png rename to doc/adr/0004/keil-studio-1-0.0.1.png diff --git a/doc/web-doc/adr/0004/keil-studio-2-0.0.1.png b/doc/adr/0004/keil-studio-2-0.0.1.png similarity index 100% rename from doc/web-doc/adr/0004/keil-studio-2-0.0.1.png rename to doc/adr/0004/keil-studio-2-0.0.1.png diff --git a/doc/web-doc/adr/0005-tsp-update-experiment.md b/doc/adr/0005-tsp-update-experiment.md similarity index 100% rename from doc/web-doc/adr/0005-tsp-update-experiment.md rename to doc/adr/0005-tsp-update-experiment.md diff --git a/doc/web-doc/adr/0006-table-filtering.md b/doc/adr/0006-table-filtering.md similarity index 91% rename from doc/web-doc/adr/0006-table-filtering.md rename to doc/adr/0006-table-filtering.md index f48316b62..c24acd6d0 100644 --- a/doc/web-doc/adr/0006-table-filtering.md +++ b/doc/adr/0006-table-filtering.md @@ -35,9 +35,9 @@ sequenceDiagram User->>client: open Events Table client->>context: create TraceContextComponent context->>table: create TableOutputComponent - client->>server: POST /experiments/"{"expUUID"}"/outputs/table/"{"outputId"}"/columns + client->>server: POST /experiments/{expUUID}/outputs/table/{outputId}/columns server->>client: 200: TableColumnHeader[] - client->>server: POST /experiments/"{"expUUID"}"/outputs/table/"{"outputId"}"/lines + client->>server: POST /experiments/{expUUID}/outputs/table/{outputId}/lines Note over client,server: requested_items=list of columnIDs Note over client,server: requested_table_count=100 Note over client,server: requested_table_index=0 @@ -46,7 +46,7 @@ sequenceDiagram table->>table: Update table table->>table: Update table with nbEvents loop while indexingStatus==RUNNING - context->>server: GET /experiments/"{"expUUID"}"/ + context->>server: GET /experiments/{expUUID}/ server->>context: 200: Experiment context->>table: Update TableOutputComponent table->>table: this.gridApi.setInfiniteRowCount(this.props.nbEvents); @@ -73,9 +73,9 @@ sequenceDiagram User->>client: open Events Table client->>context: create TraceContextComponent context->>table: create TableOutputComponent - client->>server: POST /experiments/"{"expUUID"}"/outputs/table/"{"outputId"}"/columns + client->>server: POST /experiments/{expUUID}/outputs/table/{outputId}/columns server->>client: 200: TableColumnHeader[] - client->>server: POST /experiments/"{"expUUID"}"/outputs/table/"{"outputId"}"/lines + client->>server: POST /experiments/{expUUID}/outputs/table/{outputId}/lines Note over client,server: requested_items=list of columnIDs Note over client,server: requested_table_count=100 Note over client,server: requested_table_index=0 @@ -84,7 +84,7 @@ sequenceDiagram table->>table: Update table table->>table: Update table with nbEvents loop while indexingStatus==RUNNING - table->>server: GET /experiments/"{"expUUID"}"/outputs/table/"{"outputId"}"/ + table->>server: GET /experiments/{expUUID}/outputs/table/{outputId}/ server->>table: 200: DataProviderDescriptor/indexingStatus/nbEvents table->>table: this.gridApi.setInfiniteRowCount(experiment.nbEvents); table->>table: Update vertical scrollbar @@ -103,7 +103,7 @@ sequenceDiagram User->>table: enter column filter regex table->>table: reset nbEvents table->>table: Indicate that filter is active - table->>server: POST /experiments/"{"expUUID"}"/outputs/table/"{"outputId"}"/lines + table->>server: POST /experiments/{expUUID}/outputs/table/{outputId}/lines Note over table,server: requested_table_index=startIndex Note over table,server: requested_table_count=nbEvents Note over table,server: table_filter_expressions=[columnId->regEx,...] @@ -115,7 +115,7 @@ sequenceDiagram table->>table: Update table table->>table: Update table with nbEvents loop while indexingStatus==RUNNING - table->>server: GET /experiments/"{"expUUID"}"/outputs/table/"{"outputId"}"/ + table->>server: GET /experiments/{expUUID}/outputs/table/{outputId}/ server->>table: 200: DataProviderDescriptor/indexingStatus/nbEvents table->>table: this.gridApi.setInfiniteRowCount(experiment.nbEvents); table->>table: Update vertical scrollbar @@ -130,7 +130,7 @@ The following endpoint needs to be added to the TSP to query the indexing progre sequenceDiagram participant client as TSP Client participant server as Trace Server - client->>server: GET /experiments/"{"expUUID"}"/outputs/table/"{"outputId"}"/ + client->>server: GET /experiments/{expUUID}/outputs/table/{outputId}/ server->>client: 200: DataProviderEnhanced ``` @@ -152,7 +152,7 @@ The following query parameters need to be updated to support filtering of the vi ```mermaid sequenceDiagram - table->>server: POST /experiments/"{"expUUID"}"/outputs/table/"{"outputId"}"/lines + table->>server: POST /experiments/{expUUID}/outputs/table/{outputId}/lines Note over table,server: table_filter_expressions=[columnId->regEx,...] server->>table: 200: VirtualTableModel ``` diff --git a/doc/web-doc/.gitignore b/doc/web-doc/.gitignore index aa989f9a0..9cdd6ce01 100644 --- a/doc/web-doc/.gitignore +++ b/doc/web-doc/.gitignore @@ -5,6 +5,7 @@ .env.* /.svelte-kit /build +/doc-sources /package node_modules vite.config.js.timestamp-* diff --git a/doc/web-doc/adr-loader.js b/doc/web-doc/adr-loader.js deleted file mode 100644 index 255ef5510..000000000 --- a/doc/web-doc/adr-loader.js +++ /dev/null @@ -1,10 +0,0 @@ -import { copyFile } from 'node:fs' -import compare from 'dir-compare' - -const oldPath = '../adr/' -const newPath = 'adr/' - -copyFile(oldPath, newPath, (err) => { - if (err) throw err; - console.log('Copy complete!'); -}) diff --git a/doc/web-doc/doc-loader.js b/doc/web-doc/doc-loader.js new file mode 100644 index 000000000..3971dcd66 --- /dev/null +++ b/doc/web-doc/doc-loader.js @@ -0,0 +1,28 @@ +import fs from 'fs-extra' +import { compareSync } from 'dir-compare' + +const src = '../adr/' +const dest = 'doc-sources/adr-source/' + +const errorCallback = err => { + if (err) throw err; +} + +const options = { + excludeFilter: '.DS_Store', + compareSize: true +} + +// Compare folders + +const comparison = compareSync(src, dest, options) + +// Copy missing files and folders + +if (!comparison.same) { + comparison.diffSet.forEach(dif => { + if (dif.state === 'left' && dif.path1 === src) { + fs.copySync(src + dif.name1, dest + dif.name1, { recursive: true }, errorCallback) + } + }) +} diff --git a/doc/web-doc/package.json b/doc/web-doc/package.json index 4489ed984..75da11595 100644 --- a/doc/web-doc/package.json +++ b/doc/web-doc/package.json @@ -3,11 +3,12 @@ "version": "0.0.1", "private": true, "scripts": { - "dev": "vite dev", + "dev": "node doc-loader;vite dev", "build": "vite build", "preview": "vite preview", "lint": "prettier --plugin-search-dir . --check . && eslint .", - "format": "prettier --plugin-search-dir . --write ." + "format": "prettier --plugin-search-dir . --write .", + "load": "node doc-loader" }, "devDependencies": { "@sveltejs/adapter-auto": "^1.0.0", @@ -23,6 +24,8 @@ "type": "module", "dependencies": { "@ysuzuki19/remark-mermaid": "^1.0.2", + "dir-compare": "^4.0.0", + "fs-extra": "^11.1.0", "mdsvex": "^0.10.6", "mermaid": "^9.3.0" } diff --git a/doc/web-doc/src/lib/process-files.js b/doc/web-doc/src/lib/process-files.js index 810f61eb6..9187dd06b 100644 --- a/doc/web-doc/src/lib/process-files.js +++ b/doc/web-doc/src/lib/process-files.js @@ -1,4 +1,4 @@ -const allAdrFiles = import.meta.glob('/adr/*.md'); +const allAdrFiles = import.meta.glob('/doc-sources/adr-source/*.md'); const iterableAdrFiles = Object.entries(allAdrFiles); export const getAdrsContent = async () => { diff --git a/doc/web-doc/yarn.lock b/doc/web-doc/yarn.lock index 17330f8b8..9d76aa485 100644 --- a/doc/web-doc/yarn.lock +++ b/doc/web-doc/yarn.lock @@ -625,6 +625,14 @@ devalue@^4.2.0: resolved "https://registry.yarnpkg.com/devalue/-/devalue-4.2.0.tgz#3f542d7c828e317bab5fd3bcecde210af8f83d4b" integrity sha512-mbjoAaCL2qogBKgeFxFPOXAUsZchircF+B/79LD4sHH0+NHfYm8gZpQrskKDn5gENGt35+5OI1GUF7hLVnkPDw== +dir-compare@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/dir-compare/-/dir-compare-4.0.0.tgz#264835502ae5b41e2aa8980a6797cde5440b8bdb" + integrity sha512-wC7thVKL3V656tO61rbEDE4LTeeYrUC2pAUL00AaXYghBhjjVNRyBlpH6POzb44ZuK23OSrqF6TbSC/QYeqfAg== + dependencies: + minimatch "^3.0.4" + p-limit "^3.1.0 " + doctrine@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" @@ -838,6 +846,15 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== +fs-extra@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.1.0.tgz#5784b102104433bb0e090f48bfc4a30742c357ed" + integrity sha512-0rcTq621PD5jM/e0a3EJoGC/1TC5ZBCERW82LQuwfGnCa1V8w7dpYH1yNu+SLb6E5dkeCBzKEyLGlFrnr+dUyw== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -889,6 +906,11 @@ globrex@^0.1.2: resolved "https://registry.yarnpkg.com/globrex/-/globrex-0.1.2.tgz#dd5d9ec826232730cd6793a5e33a9302985e6098" integrity sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg== +graceful-fs@^4.1.6, graceful-fs@^4.2.0: + version "4.2.10" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" + integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== + grapheme-splitter@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" @@ -1005,6 +1027,15 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + khroma@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/khroma/-/khroma-2.0.0.tgz#7577de98aed9f36c7a474c4d453d94c0d6c6588b" @@ -1078,7 +1109,7 @@ mime@^3.0.0: resolved "https://registry.yarnpkg.com/mime/-/mime-3.0.0.tgz#b374550dca3a0c18443b0c950a6a58f1931cf7a7" integrity sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A== -minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: +minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -1139,7 +1170,7 @@ optionator@^0.9.1: type-check "^0.4.0" word-wrap "^1.2.3" -p-limit@^3.0.2: +p-limit@^3.0.2, "p-limit@^3.1.0 ": version "3.1.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== @@ -1442,6 +1473,11 @@ unist-util-visit@^4.1.1: unist-util-is "^5.0.0" unist-util-visit-parents "^5.1.1" +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + uri-js@^4.2.2: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e"