Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use full width where page is all tables #214

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 118 additions & 0 deletions preview-src/tables-wide.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
= Tables
: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
=== Bolt metrics

[options="header",cols="<5m,<8,2"]
|===
|Name |Description|Notes

|<prefix>.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)
|+++<div class="box">
<span class="label label--deprecated">Deprecated in 5.15</span>
</div>+++

|<prefix>.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)
|

|<prefix>.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)
|+++<div class="box">
<span class="label label--deprecated">Deprecated in 5.15</span>
</div>+++

|<prefix>.dbms.bolt.connections_idle
|The total number of Bolt connections that are not currently executing Cypher or returning results. (gauge)
|+++<div class="box">
<span class="label label--new">Added in 5.15</span>
</div>+++

|<prefix>.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)
|+++<div class="box">
<span class="label label--deprecated">Deprecated in 5.15</span>
</div>+++

|<prefix>.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)
|

|<prefix>.dbms.bolt.messages_done
|The total number of Bolt messages that have completed processing whether successfully or unsuccessfully. Useful for tracking overall load. (counter)
|

|<prefix>.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)
|

|<prefix>.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)
|

|<prefix>.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)
|

|<prefix>.dbms.bolt.response_success
|(unsupported feature) When `internal.server.bolt.response_metrics` is enabled, number of `encounteredsuccess` responses. (counter)
|

|<prefix>.dbms.bolt.response_ignored
|(unsupported feature) When `internal.server.bolt.response_metrics` is enabled, number of `encounteredignored` responses (counter)
|

|<prefix>.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
| <<table-link-target,nodeLabels>> | List of String | ['*'] | yes | Filter the named graph using the given node labels.
| <<table-link-target,relationshipTypes>> | List of String | ['*'] | yes | Filter the named graph using the given relationship types.
| <<table-link-target,concurrency>> | 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
| <<common-configuration-node-labels,nodeLabels>> | List of String | ['*'] | yes | Filter the named graph using the given node labels.
| <<common-configuration-relationship-types,relationshipTypes>> | List of String | ['*'] | yes | Filter the named graph using the given relationship types.
| <<common-configuration-concurrency,concurrency>> | 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
| `<<common-configuration-node-labels,nodeLabels>>` | List of String | ['*'] | yes | Filter the named graph using the given node labels.
| `<<common-configuration-relationship-types,relationshipTypes>>` | List of String | ['*'] | yes | Filter the named graph using the given relationship types.
| `<<common-configuration-concurrency,concurrency>>` | 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
4 changes: 4 additions & 0 deletions src/css/doc.css
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
26 changes: 26 additions & 0 deletions src/css/toc.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,32 @@
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 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;
}

.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;
}
Expand Down
1 change: 1 addition & 0 deletions src/css/vars.css
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,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;

Expand Down
28 changes: 28 additions & 0 deletions src/js/02-on-this-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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')
Expand Down
11 changes: 11 additions & 0 deletions src/layouts/page-wide.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
{{> head defaultPageTitle='Untitled'}}
</head>
<body class="page-wide article{{#with (or page.attributes.role page.role)}} {{{this}}}{{/with}}{{#with asciidoc.attributes.role}} {{{this}}}{{/with}}{{#with (or page.attributes.theme "developer")}} {{{this}}}{{/with}}{{#with (or page.attributes.styles page.styles)}} {{{this}}}{{/with}}{{#if (or page.attributes.show-labels page.show-labels)}} show-labels{{/if}}">
{{> header}}
{{> body}}
{{> footer}}
</body>
</html>
4 changes: 4 additions & 0 deletions src/partials/article.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ If you typed the URL of this page manually, please double check that you entered
</div>
{{/with}}

{{#if (eq page.attributes.layout 'page-wide')}}
{{> toc-wide}}
{{/if}}

{{!-- <span class="{{#with asciidoc.attributes.role}} {{{this}}}{{/with}}"></span> --}}


Expand Down
2 changes: 2 additions & 0 deletions src/partials/main.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

<div class="content">
{{> article}}
{{#if (ne page.attributes.layout 'page-wide')}}
{{> toc}}
{{/if}}
</div>

</main>
6 changes: 6 additions & 0 deletions src/partials/toc-wide.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<aside class="toc sidebar" data-title="{{or page.attributes.toctitle 'Contents'}}"
data-levels="{{{or page.attributes.toclevels 2}}}">
<div class="toc-menu">
<div class="toc-menu-placeholder"></div>
</div>
</aside>