From 960da23f53738a014f0ee6bc4157e1aa6761e09a Mon Sep 17 00:00:00 2001 From: Neil Dewhurst Date: Thu, 15 Feb 2024 18:23:00 +0000 Subject: [PATCH 1/5] initial poc --- preview-src/tables-wide.adoc | 118 +++++++++++++++++++++++++++++++++++ preview-src/ui-model.yml | 3 + src/css/doc.css | 4 ++ src/css/vars.css | 1 + src/layouts/page-wide.hbs | 11 ++++ src/partials/main.hbs | 2 + 6 files changed, 139 insertions(+) create mode 100644 preview-src/tables-wide.adoc create mode 100644 src/layouts/page-wide.hbs diff --git a/preview-src/tables-wide.adoc b/preview-src/tables-wide.adoc new file mode 100644 index 00000000..8c23bac3 --- /dev/null +++ b/preview-src/tables-wide.adoc @@ -0,0 +1,118 @@ += Tables +:nofooter: +:page-ogtitle: This page uses the page-ogtitle attribute to generate a custom title for SEO meta +:page-theme: docs +:page-layout: page-wide + + +[[metrics-general-purpose]] +== General-purpose metrics + +[[bolt-metrics]] +.Bolt metrics + +[options="header",cols="<5m,<8,2"] +|=== +|Name |Description|Notes + +|.dbms.bolt.connections_opened +|The total number of Bolt connections opened since startup. This includes both succeeded and failed connections. Useful for monitoring load via the Bolt drivers in combination with other metrics. (counter) +|+++
+ Deprecated in 5.15 +
+++ + +|.dbms.bolt.connections_closed|The total number of Bolt connections closed since startup. This includes both properly and abnormally ended connections. Useful for monitoring load via Bolt drivers in combination with other metrics. (counter) +| + +|.dbms.bolt.connections_running|The total number of Bolt connections that are currently executing Cypher and returning results. Useful to track the overall load on Bolt connections. This is limited to the number of Bolt worker threads that have been configured via `dbms.connector.bolt.thread_pool_max_size`. Reaching this maximum indicated the server is running at capacity. (gauge) +|+++
+ Deprecated in 5.15 +
+++ + +|.dbms.bolt.connections_idle +|The total number of Bolt connections that are not currently executing Cypher or returning results. (gauge) +|+++
+ Added in 5.15 +
+++ + +|.dbms.bolt.messages_received +|The total number of messages received via Bolt since startup. Useful to track general message activity in combination with other metrics. (counter) +|+++
+ Deprecated in 5.15 +
+++ + +|.dbms.bolt.messages_started +|The total number of messages that have started processing since being received. A received message may have begun processing until a Bolt worker thread becomes available. A large gap observed between `bolt.messages_received` and `bolt.messages_started` could indicate the server is running at capacity. (counter) +| + +|.dbms.bolt.messages_done +|The total number of Bolt messages that have completed processing whether successfully or unsuccessfully. Useful for tracking overall load. (counter) +| + +|.dbms.bolt.messages_failed +|The total number of messages that have failed while processing. A high number of failures may indicate an issue with the server and further investigation of the logs is recommended. (counter) +| + +|.dbms.bolt.accumulated_queue_time +|(unsupported feature) When `internal.server.bolt.thread_pool_queue_size` is enabled, the total time in milliseconds that a Bolt message waits in the processing queue before a Bolt worker thread becomes available to process it. Sharp increases in this value indicate that the server is running at capacity. If `internal.server.bolt.thread_pool_queue_size` is disabled, the value should be `0`, meaning that messages are directly handed off to worker +threads. (counter) +| + +|.dbms.bolt.accumulated_processing_time +|The total amount of time in milliseconds that worker threads have been processing messages. Useful for monitoring load via Bolt drivers in combination with other metrics. (counter) +| + +|.dbms.bolt.response_success +|(unsupported feature) When `internal.server.bolt.response_metrics` is enabled, number of `encounteredsuccess` responses. (counter) +| + +|.dbms.bolt.response_ignored +|(unsupported feature) When `internal.server.bolt.response_metrics` is enabled, number of `encounteredignored` responses (counter) +| + +|.dbms.bolt.response_failed +|(unsupported feature) When `internal.server.bolt.response_metrics` is enabled, number of `encounteredinstances` of a given error code. (counter) +| + +|=== + + +=== Table with better column widths: + +[opts="header",cols="2,1,1m,1,5"] +|=== +| Name | Type | Default | Optional | Description +| <> | List of String | ['*'] | yes | Filter the named graph using the given node labels. +| <> | List of String | ['*'] | yes | Filter the named graph using the given relationship types. +| <> | Integer | 4 | yes | The number of concurrent threads used for running the algorithm. +|=== + +=== Tables with `role=no-break`: + +[role="no-break",opts="header",cols="1,1,1m,1,8"] +|=== +| Name | Type | Default | Optional | Description +| <> | List of String | ['*'] | yes | Filter the named graph using the given node labels. +| <> | List of String | ['*'] | yes | Filter the named graph using the given relationship types. +| <> | Integer | 4 | yes | The number of concurrent threads used for running the algorithm. +|=== + +[role="no-break",opts="header",cols="1,1,1m,1,8"] +|=== +| Name | Type | Default | Optional | Description +| `<>` | List of String | ['*'] | yes | Filter the named graph using the given node labels. +| `<>` | List of String | ['*'] | yes | Filter the named graph using the given relationship types. +| `<>` | Integer | 4 | yes | The number of concurrent threads used for running the algorithm. +|=== + +[role="no-break",opts="header",cols="1,1,1m,1,8"] +|=== +| Name | Type | Default | Optional | Description +| `nodeLabels` | List of String | ['*'] | yes | Filter the named graph using the given node labels. +| `relationshipTypes` | List of String | ['*'] | yes | Filter the named graph using the given relationship types. +| `concurrency` | Integer | 4 | yes | The number of concurrent threads used for running the algorithm. +|=== + +== table link target + +A section for table links to point to \ No newline at end of file diff --git a/preview-src/ui-model.yml b/preview-src/ui-model.yml index c3c1d5be..9979f95b 100644 --- a/preview-src/ui-model.yml +++ b/preview-src/ui-model.yml @@ -175,6 +175,9 @@ page: - content: Course Yelp url: applied-graph-algo-course-yelp.html urlType: internal + - content: Tables (wide) + url: tables-wide.html + urlType: internal - content: Tables url: tables.html urlType: internal diff --git a/src/css/doc.css b/src/css/doc.css index 81c58daa..f4c9f89a 100644 --- a/src/css/doc.css +++ b/src/css/doc.css @@ -20,6 +20,10 @@ body { min-width: 0; padding-bottom: 4rem; } + + body.page-wide .doc { + max-width: var(--page-wide-max-width--desktop) + } } .doc h1, diff --git a/src/css/vars.css b/src/css/vars.css index 6d2cdcdc..815fee01 100644 --- a/src/css/vars.css +++ b/src/css/vars.css @@ -392,6 +392,7 @@ --toolbar-wrapper-width: 69rem; --doc-max-width: calc(720 / var(--rem-base) * 1rem); --doc-max-width--desktop: calc(980 / var(--rem-base) * 1rem); + --page-wide-max-width--desktop: var(--toolbar-wrapper-width); --cheat-sheet-max-width--desktop: calc(1100 / var(--rem-base) * 1rem); --feedback-height: 2.75rem; diff --git a/src/layouts/page-wide.hbs b/src/layouts/page-wide.hbs new file mode 100644 index 00000000..17e1b9e4 --- /dev/null +++ b/src/layouts/page-wide.hbs @@ -0,0 +1,11 @@ + + + +{{> head defaultPageTitle='Untitled'}} + + +{{> header}} +{{> body}} +{{> footer}} + + diff --git a/src/partials/main.hbs b/src/partials/main.hbs index 6f89d30b..418df131 100644 --- a/src/partials/main.hbs +++ b/src/partials/main.hbs @@ -2,6 +2,8 @@ {{#unless page.attributes.no-toolbar}}{{> toolbar}}{{/unless}}
{{> article}} +{{#if (ne page.attributes.layout 'page-wide')}} {{> toc}} +{{/if}}
From 36500c6becb6a55b9355925b4231c6463fe6ca19 Mon Sep 17 00:00:00 2001 From: Neil Dewhurst Date: Thu, 15 Feb 2024 18:23:24 +0000 Subject: [PATCH 2/5] linted --- src/css/doc.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/css/doc.css b/src/css/doc.css index f4c9f89a..520ddc52 100644 --- a/src/css/doc.css +++ b/src/css/doc.css @@ -22,7 +22,7 @@ body { } body.page-wide .doc { - max-width: var(--page-wide-max-width--desktop) + max-width: var(--page-wide-max-width--desktop); } } From 0c17e32e673f19e59f66eceed4a1b49d6b7e498a Mon Sep 17 00:00:00 2001 From: Neil Dewhurst Date: Fri, 7 Jun 2024 09:23:08 +0100 Subject: [PATCH 3/5] Add page contens above content --- preview-src/tables-wide.adoc | 2 +- src/css/toc.css | 16 ++++++++++++++++ src/js/02-on-this-page.js | 28 ++++++++++++++++++++++++++++ src/partials/article.hbs | 4 ++++ src/partials/toc-wide.hbs | 6 ++++++ 5 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 src/partials/toc-wide.hbs diff --git a/preview-src/tables-wide.adoc b/preview-src/tables-wide.adoc index 8c23bac3..915c8d4b 100644 --- a/preview-src/tables-wide.adoc +++ b/preview-src/tables-wide.adoc @@ -1,5 +1,4 @@ = Tables -:nofooter: :page-ogtitle: This page uses the page-ogtitle attribute to generate a custom title for SEO meta :page-theme: docs :page-layout: page-wide @@ -10,6 +9,7 @@ [[bolt-metrics]] .Bolt metrics +=== Bolt metrics [options="header",cols="<5m,<8,2"] |=== diff --git a/src/css/toc.css b/src/css/toc.css index d8ff76e0..0bdc9190 100644 --- a/src/css/toc.css +++ b/src/css/toc.css @@ -45,6 +45,22 @@ scrollbar-width: none; } +.page-wide .toc.sidebar .toc-menu ul { + max-height: 12rem; + overflow-y: scroll; + scrollbar-width: thin; + border: 1px solid; + padding: .25rem; +} + +.page-wide .toc.sidebar .toc-menu ul li a { + border: none; +} + +.page-wide .toc.sidebar .toc-menu ul li a:hover { + color: var(--link_hover-font-color); +} + .toc .toc-menu ul::-webkit-scrollbar { width: 0; } diff --git a/src/js/02-on-this-page.js b/src/js/02-on-this-page.js index 580fb0ab..faf0e425 100644 --- a/src/js/02-on-this-page.js +++ b/src/js/02-on-this-page.js @@ -29,6 +29,24 @@ return accum }, document.createElement('ul')) + // var sel = document.createElement('select') + // var options = headings.reduce(function (accum, heading) { + // // var link = document.createElement('a') + // // link.textContent = heading.textContent + // // links[(link.href = '#' + heading.id)] = link + // var option = document.createElement('option') + // option.value = heading.id + // option.text = heading.textContent + // // listItem.dataset.level = parseInt(heading.nodeName.slice(1)) - 1 + // // listItem.appendChild(link) + // accum.appendChild(option) + // return accum + // }, sel) + + // options.classList.add('version-selector', 'dropdown-styles', 'page-wide-selector') + + // console.log(options) + var menu = sidebar.querySelector('.toc-menu-placeholder') if (!menu) (menu = document.createElement('div')).className = 'toc-menu-placeholder' @@ -37,6 +55,16 @@ menu.appendChild(title) menu.appendChild(list) + // var tableSelector = document.querySelector('.page-wide-selector') + // if (tableSelector) { + // tableSelector.addEventListener('change', function (e) { + // const target = e.target + // const url = target.value + // window.location.hash = url + // location.reload() + // }) + // } + var startOfContent = !document.getElementById('toc') && article.querySelector('h1.page ~ :not(.is-before-toc)') if (startOfContent) { var embeddedToc = document.createElement('aside') diff --git a/src/partials/article.hbs b/src/partials/article.hbs index 63847c47..3e7934ce 100644 --- a/src/partials/article.hbs +++ b/src/partials/article.hbs @@ -22,6 +22,10 @@ If you typed the URL of this page manually, please double check that you entered {{/with}} +{{#if (eq page.attributes.layout 'page-wide')}} + {{> toc-wide}} +{{/if}} + {{!-- --}} diff --git a/src/partials/toc-wide.hbs b/src/partials/toc-wide.hbs new file mode 100644 index 00000000..3990349e --- /dev/null +++ b/src/partials/toc-wide.hbs @@ -0,0 +1,6 @@ + \ No newline at end of file From d1c900ccc52511fc67dd3bcdaafb3d60e7ac9f44 Mon Sep 17 00:00:00 2001 From: Neil Dewhurst Date: Fri, 7 Jun 2024 09:23:31 +0100 Subject: [PATCH 4/5] linted css --- src/css/toc.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/css/toc.css b/src/css/toc.css index 0bdc9190..cf4300a2 100644 --- a/src/css/toc.css +++ b/src/css/toc.css @@ -50,7 +50,7 @@ overflow-y: scroll; scrollbar-width: thin; border: 1px solid; - padding: .25rem; + padding: 0.25rem; } .page-wide .toc.sidebar .toc-menu ul li a { From ab3d77f6921b40ea882ee7bc0632341bf0d2498a Mon Sep 17 00:00:00 2001 From: Neil Dewhurst Date: Fri, 30 Aug 2024 10:20:01 +0100 Subject: [PATCH 5/5] style the contents list a bit --- src/css/toc.css | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/css/toc.css b/src/css/toc.css index cdb93ff4..dcbc29cd 100644 --- a/src/css/toc.css +++ b/src/css/toc.css @@ -46,11 +46,21 @@ scrollbar-width: none; } +.page-wide .toc-menu { + width: fit-content !important; + min-width: 50%; +} + +.page-wide .toc-menu h2 { + border: none; +} + .page-wide .toc.sidebar .toc-menu ul { max-height: 12rem; overflow-y: scroll; scrollbar-width: thin; - border: 1px solid; + border: 1px solid rgba(var(--theme-light-palette-neutral-bg-strong)); + box-shadow: 0 2px 4px var(--code-header-background), 0 1px 2px 0 var(--code-header-background); padding: 0.25rem; }