A custom web component for viewing audit logs in Facets.cloud.
This web component allows users to view and filter audit logs directly within the Facets.cloud interface. It's built using standard Web Components APIs and requires no external dependencies.
- Display audit logs in a tabular format
- Filter logs by date range, project name, environment name, and user
- Pagination support for navigating through large sets of logs
- Responsive design that works on all device sizes
To use this web component in Facets.cloud:
- Navigate to Organizational Settings in Facets
- Select "Web Component" from the menu
- Click "Add Component"
- Fill in the following details:
- Name:
audit-logs-viewer
- Remote URL:
https://anujhydrabadi.github.io/audit-web-component/audit-logs.js
- Icon URL: (Provide an appropriate icon URL)
- Enable the component
- Add an appropriate tooltip
- Name:
- Basic knowledge of HTML, CSS, and JavaScript
- Understanding of Web Components
- Access to Facets.cloud for testing
- Clone this repository
- Open the index.html file in a browser
- For API testing, you'll need to be logged into Facets in another tab
This component is hosted on GitHub Pages. To deploy changes:
- Push changes to the main branch
- GitHub Actions will automatically deploy to GitHub Pages
The component uses the following Facets Control Plane API:
- Endpoint:
/cc-ui/v1/audit-logs
- Method: GET
- Parameters:
start
(required): Start date for logs (ISO format)end
: End date for logs (ISO format)number
: Page number (default: 0)size
: Page size (default: 10)stackName
: Filter by project nameclusterName
: Filter by environment nameperformedBy
: Filter by username