Remove automation for audit-logs.md (#39937)
- Instead, changes to activity will be specified as a PR to `audit-logs.md` in the reference doc release branch just like API and YAML (GitOps) changes
This commit is contained in:
@@ -32,7 +32,7 @@ It is [planned and ready](https://fleetdm.com/handbook/company/development-group
|
||||
- [ ] fleetdm.com changes: TODO <!-- Does this story include changes to fleetdm.com? (e.g. new API endpoints) If yes, create a blank subtask with the #g-website label, assign @eashaw, and add @eashaw and @lukeheath to the next design review meeting. fleetdm.com changes are up to @eashaw -->
|
||||
- [ ] GitOps mode UI changes: TODO <!-- Specify UI changes for read-only GitOps mode. Put "No changes" if there are no changes necessary. -->
|
||||
- [ ] GitOps generation changes: TODO <!-- Specify changes to results from the fleetctl generate-gitops command. Put "No changes" if there are no changes necessary. -->
|
||||
- [ ] Activity changes: TODO <!-- Specify the changes to the Audit log page in the contributor docs and the display name that will appear on the dashboard ("type" filter). Add Put "No changes" if there are no changes necessary. -->
|
||||
- [ ] Activity changes: TODO <!-- Specify the display name that will appear on the dashboard ("type" filter) and changes to the Audit log page in the contributor docs as a PR to reference docs release branch following the guidelines in the handbook here: https://fleetdm.com/handbook/product-design#drafting Put "No changes" if there are no changes necessary. -->
|
||||
- [ ] Permissions changes: TODO <!-- Specify changes in the permissions doc page here: https://fleetdm.com/docs/using-fleet/manage-access as a PR to the reference docs release branch. If doc changes aren't necessary, explicitly mention no changes to the doc page. Put "No changes" if there are no permissions changes. -->
|
||||
- [ ] Changes to paid features or tiers: TODO <!-- Specify changes in pricing-features-table.yml as a PR to reference docs release branch. Specify "Fleet Free" and/or "Fleet Premium" if there are no changes to the pricing page necessary. -->
|
||||
- [ ] My device and fleetdm.com/better changes: TODO <!-- If there are changes to the personal information Fleet can see on end user workstations, make sure wireframes include changes to the My device page. Also, specify changes as a PR to the fleetdm.com/better (aka Transparency page). Put "No changes" if there are no changes necessary. -->
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<!-- DO NOT EDIT. This document is automatically generated. -->
|
||||
# Audit logs
|
||||
|
||||
Fleet logs activities.
|
||||
|
||||
@@ -211,17 +211,6 @@ We leave large gaps between values to make future changes easier. For example, t
|
||||
|
||||
When adding or reordering a page, try to leave as much room between values as possible. If you were adding a new page that would go between the two pages from the example above, you would add `<meta name="pageOrderInSection" value="150">` to the page.
|
||||
|
||||
### Audit logs
|
||||
|
||||
The [Audit logs doc page](https://fleetdm.com/docs/Using-Fleet/Audit-logs) has a page generator that is used to speed up doc writing when Fleet adds new activity types.
|
||||
|
||||
- If you're making a copy change to an existing activity type, [edit the `activities.go` file](https://github.com/fleetdm/fleet/blob/main/server/fleet/activities.go).
|
||||
- If you're making a change to the top section or meta tags, [edit the `gen_activity_doc.go` file](https://github.com/fleetdm/fleet/blob/main/server/fleet/gen_activity_doc.go).
|
||||
- If you're adding a new activity type, add the activity to the `ActivityDetailsList` list in the `activities.go` file.
|
||||
|
||||
After making your changes, save them and run `make generate-doc`. This will generate a new `Audit-logs.md` file. Make sure you run the command in the top-level folder of your cloned Fleet repo.
|
||||
|
||||
|
||||
|
||||
## Writing style
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,52 +0,0 @@
|
||||
//go:build ignore
|
||||
// +build ignore
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/fleetdm/fleet/v4/server/fleet"
|
||||
)
|
||||
|
||||
func main() {
|
||||
var b strings.Builder
|
||||
|
||||
b.WriteString(`<!-- DO NOT EDIT. This document is automatically generated. -->
|
||||
# Audit logs
|
||||
|
||||
Fleet logs activities.
|
||||
|
||||
To see activities in Fleet, select the Fleet icon in the top navigation and see the **Activity** section.
|
||||
|
||||
This page includes a list of activities.
|
||||
|
||||
`)
|
||||
|
||||
activityMap := map[string]struct{}{}
|
||||
for _, activity := range fleet.ActivityDetailsList {
|
||||
if _, ok := activityMap[activity.ActivityName()]; ok {
|
||||
panic(fmt.Sprintf("type %s already used", activity.ActivityName()))
|
||||
}
|
||||
activityMap[activity.ActivityName()] = struct{}{}
|
||||
|
||||
fmt.Fprintf(&b, "## %s\n\n", activity.ActivityName())
|
||||
activityTypeDoc, detailsDoc, detailsExampleDoc := activity.Documentation()
|
||||
fmt.Fprintf(&b, activityTypeDoc+"\n\n"+detailsDoc+"\n\n")
|
||||
if detailsExampleDoc != "" {
|
||||
fmt.Fprintf(&b, "#### Example\n\n```json\n%s\n```\n\n", detailsExampleDoc)
|
||||
}
|
||||
}
|
||||
b.WriteString(`
|
||||
<meta name="title" value="Audit logs">
|
||||
<meta name="pageOrderInSection" value="1400">
|
||||
<meta name="description" value="Learn how Fleet logs administrative actions in JSON format.">
|
||||
<meta name="navSection" value="Dig deeper">
|
||||
`)
|
||||
|
||||
if err := os.WriteFile(os.Args[1], []byte(b.String()), 0600); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user