-
Notifications
You must be signed in to change notification settings - Fork 479
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Website: Add line number to edit page links on policies, queries and …
…vitals pages. (#25965) Changes: - Updated the `build-static-content` script to set a `lineNumberInYaml` value on queries, policies, and vitals. - Updated the edit page button on the policy-details, query-detail, and vital-details pages to take users to the specified query's line number in the YAML file.
- Loading branch information
Showing
4 changed files
with
26 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,7 +74,7 @@ | |
<a href="/docs">Docs</a> | ||
<a href="/docs/rest-api">REST API</a> | ||
<a href="/guides">Guides</a> | ||
<a purpose="edit-button" class="d-flex align-items-center text-nowrap" target="_blank" :href="'https://github.com/fleetdm/fleet/edit/main/'+queryLibraryYmlRepoPath"><img alt="A pencil icon" src="/images/[email protected]">Edit page</a> | ||
<a purpose="edit-button" class="d-flex align-items-center text-nowrap" target="_blank" :href="'https://github.com/fleetdm/fleet/edit/main/'+queryLibraryYmlRepoPath+'#L'+policy.lineNumberInYaml"><img alt="A pencil icon" src="/images/[email protected]">Edit page</a> | ||
</div> | ||
</div> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,7 +52,8 @@ | |
</div> | ||
</div> | ||
<div purpose="docs-links" class="order-3"> | ||
<a purpose="sidebar-link" :href="'https://github.com/fleetdm/fleet/edit/main/'+queryLibraryYmlRepoPath"> <img src="/images/[email protected]" alt="Suggest an edit">Edit</a> | ||
<a purpose="sidebar-link" :href="'https://github.com/fleetdm/fleet/edit/main/'+queryLibraryYmlRepoPath+'#L'+query.lineNumberInYaml"> <img src="/images/[email protected]" alt="Suggest an edit">Edit</a> | ||
<a purpose="sidebar-link" href="/contact"><img alt="Talk to an engineer" src="/images/[email protected]">Talk to us</a> | ||
</div> | ||
</div> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,7 +102,7 @@ | |
</div> | ||
<% } %> | ||
<div purpose="edit-button-container"> | ||
<a purpose="edit-button" class="d-flex align-items-center text-nowrap" target="_blank" :href="'https://github.com/fleetdm/fleet/edit/main/'+queryLibraryYmlRepoPath">Suggest an edit <img src="/images/[email protected]" alt="external link"></a> | ||
<a purpose="edit-button" class="d-flex align-items-center text-nowrap" target="_blank" :href="'https://github.com/fleetdm/fleet/edit/main/'+queryLibraryYmlRepoPath+'#L'+thisVital.lineNumberInYaml">Suggest an edit <img src="/images/[email protected]" alt="external link"></a> | ||
</div> | ||
</div> | ||
</div> | ||
|