Skip to content

Commit 9947fd7

Browse files
authored
Branch was updated using the 'autoupdate branch' Actions workflow.
2 parents e4b96cc + bf31f3e commit 9947fd7

7 files changed

Lines changed: 69 additions & 1 deletion

File tree

content/admin/configuration/configuring-code-scanning-for-your-appliance.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ For the users of {% data variables.product.product_location %} to be able to ena
4242
![Checkbox to enable or disable {% data variables.product.prodname_code_scanning %}](/assets/images/enterprise/management-console/enable-code-scanning-checkbox.png)
4343
{% data reusables.enterprise_management_console.save-settings %}
4444

45-
4645
### Running {% data variables.product.prodname_code_scanning %} using {% data variables.product.prodname_actions %}
4746

4847
#### Setting up a self-hosted runner
@@ -89,3 +88,25 @@ The {% data variables.product.prodname_codeql_runner %} is a command-line tool t
8988
1. Under "{% data variables.product.prodname_advanced_security %}", unselect **{% data variables.product.prodname_code_scanning_capc %}**.
9089
![Checkbox to enable or disable {% data variables.product.prodname_code_scanning %}](/assets/images/enterprise/management-console/code-scanning-disable.png)
9190
{% data reusables.enterprise_management_console.save-settings %}
91+
92+
### Enabling or disabling {% data variables.product.prodname_code_scanning %} via the administrative shell (SSH)
93+
94+
You can enable or disable {% data variables.product.prodname_code_scanning %} programmatically on {% data variables.product.product_location %}. For example, you can enable {% data variables.product.prodname_code_scanning %} with your infrastructure-as-code tooling when you deploy an instance for staging or disaster recovery.
95+
96+
For more information about the administrative shell and command-line utilities for {% data variables.product.prodname_ghe_server %}, see "[Accessing the administrative shell (SSH)](/admin/configuration/accessing-the-administrative-shell-ssh)" and "[Command-line utilities](/admin/configuration/command-line-utilities#ghe-config)."
97+
98+
1. SSH into {% data variables.product.product_location %}.
99+
1. Enable {% data variables.product.prodname_code_scanning %}.
100+
```shell
101+
ghe-config app.minio.enabled true
102+
ghe-config app.code-scanning.enabled true
103+
```
104+
2. Optionally, disable {% data variables.product.prodname_code_scanning %}.
105+
```shell
106+
ghe-config app.minio.enabled false
107+
ghe-config app.code-scanning.enabled false
108+
```
109+
3. Apply the configuration.
110+
```shell
111+
ghe-config-apply
112+
```

includes/scroll-button.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<button class="arrow-for-scrolling-top" id="js-scroll-top">
2+
{% octicon "chevron-up" %}
3+
</button>

javascripts/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import '../stylesheets/index.scss'
33
import displayPlatformSpecificContent from './display-platform-specific-content'
44
import explorer from './explorer'
5+
import scrollUp from './scroll-up'
56
import search from './search'
67
import nav from './nav'
78
import browserDateFormatter from 'browser-date-formatter'
@@ -23,6 +24,7 @@ import airgapLinks from './airgap-links'
2324
document.addEventListener('DOMContentLoaded', async () => {
2425
displayPlatformSpecificContent()
2526
explorer()
27+
scrollUp()
2628
search()
2729
nav()
2830
browserDateFormatter()

javascripts/scroll-up.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
export default function () {
2+
// function to scroll up to page top
3+
const PageTopBtn = document.getElementById('js-scroll-top')
4+
if (!PageTopBtn) return
5+
6+
PageTopBtn.addEventListener('click', (e) => {
7+
window.scrollTo({
8+
top: 0,
9+
behavior: 'smooth'
10+
})
11+
})
12+
13+
// show scroll button only when display is scroll down
14+
window.addEventListener('scroll', function () {
15+
const y = document.documentElement.scrollTop // get the height from page top
16+
if (y < 100) {
17+
PageTopBtn.classList.remove('show')
18+
} else if (y >= 100) {
19+
PageTopBtn.classList.add('show')
20+
}
21+
})
22+
}

layouts/default.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
{% endif %}
1616
{% include support-section %}
1717
{% include small-footer %}
18+
{% include scroll-button %}
1819
</main>
1920
</body>
2021
</html>

stylesheets/index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ $marketing-font-path: "/dist/fonts/";
4747
@import "search.scss";
4848
@import "overrides.scss";
4949
@import "sidebar.scss";
50+
@import "scroll-button.scss";
5051
@import "explorer.scss";
5152
// from https://unpkg.com/highlight.js@9.15.8/styles/github.css
5253
@import "syntax-highlighting.scss";

stylesheets/scroll-button.scss

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
button.arrow-for-scrolling-top {
2+
opacity: 0;
3+
transition: 1s;
4+
background-color: #0367d6;
5+
color: #fff;
6+
position: fixed;
7+
bottom: 10px;
8+
right: 10px;
9+
display: block;
10+
width: 40px;
11+
height: 40px;
12+
border-radius: 50%;
13+
&.show {
14+
opacity: 1;
15+
border: none;
16+
transition: 1s;
17+
}
18+
}

0 commit comments

Comments
 (0)