Skip to content

Commit

Permalink
chore(instrumentation) update userale-boundaries
Browse files Browse the repository at this point in the history
  • Loading branch information
EandrewJones committed Apr 30, 2024
1 parent b2bd69b commit b7e2ea3
Show file tree
Hide file tree
Showing 17 changed files with 30 additions and 16 deletions.
2 changes: 2 additions & 0 deletions superset-frontend/src/components/TableCollection/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ export default React.memo(
{...getTableProps()}
className="table table-hover"
data-test="listview-table"
data-userale-boundary="list-view-table"
>
<thead>
{headerGroups.map(headerGroup => (
Expand Down Expand Up @@ -281,6 +282,7 @@ export default React.memo(
const rowId = row.original.id;
return (
<tr
data-userale-boundary={`row-${rowId}`}
data-test="table-row"
{...row.getRowProps()}
className={cx('table-row', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const BUILDER_PANE_WIDTH = 374;

const BuilderComponentPane = ({ topOffset = 0 }) => (
<div
data-userale-boundary="builder-sidepane"
data-test="dashboard-builder-sidepane"
css={css`
position: sticky;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,7 @@ const DashboardBuilder: FC<DashboardBuilderProps> = () => {
width={filterBarWidth}
hidden={isReport}
data-test="dashboard-filters-panel"
data-userale-boundary="filters-panel"
>
<StickyPanel ref={containerRef} width={filterBarWidth}>
<ErrorBoundary>
Expand All @@ -631,6 +632,7 @@ const DashboardBuilder: FC<DashboardBuilderProps> = () => {
{/* @ts-ignore */}
<Droppable
data-test="top-level-tabs"
data-userale-boundary="top-level-tabs"
className={cx(!topLevelTabs && editMode && 'empty-droptarget')}
component={dashboardRoot}
parentComponent={null}
Expand All @@ -646,7 +648,10 @@ const DashboardBuilder: FC<DashboardBuilderProps> = () => {
{renderDraggableContent}
</Droppable>
</StyledHeader>
<StyledContent fullSizeChartId={fullSizeChartId}>
<StyledContent
data-userale-boundary="content"
fullSizeChartId={fullSizeChartId}
>
<Global
styles={css`
// @z-index-above-dashboard-header (100) + 1 = 101
Expand All @@ -672,6 +677,7 @@ const DashboardBuilder: FC<DashboardBuilderProps> = () => {
)}
<DashboardContentWrapper
data-test="dashboard-content-wrapper"
data-userale-boundary="content-wrapper"
className={cx('dashboard', editMode && 'dashboard--editing')}
>
<StyledDashboardContent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,11 @@ const DashboardContainer: FC<DashboardContainerProps> = ({ topLevelTabs }) => {
const activeKey = min === 0 ? DASHBOARD_GRID_ID : min.toString();

return (
<div className="grid-container" data-test="grid-container">
<div
className="grid-container"
data-test="grid-container"
data-userale-boundary="grid-container"
>
<ParentSize>
{({ width }) => (
/*
Expand All @@ -227,6 +231,7 @@ const DashboardContainer: FC<DashboardContainerProps> = ({ topLevelTabs }) => {
happen because of React's diffing algorithm
*/
<Tabs
data-userale-boundary={`tab-${DASHBOARD_GRID_ID}`}
id={DASHBOARD_GRID_ID}
activeKey={activeKey}
renderTabBar={() => <></>}
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/pages/AlertReportList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ function AlertList({
: [];
return (
<ListView<AlertObject>
useraleLabel="alert-object"
useraleLabel="alert-object-list-view"
className="alerts-list-view"
columns={columns}
count={alertsCount}
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/pages/AnnotationLayerList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ function AnnotationLayersList({

return (
<ListView<AnnotationLayerObject>
useraleLabel="annotation-layer-object"
useraleLabel="annotation-layer-object-list-view"
className="annotation-layers-list-view"
columns={columns}
count={layersCount}
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/pages/AnnotationList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ function AnnotationList({

return (
<ListView<AnnotationObject>
useraleLabel="annotation-object"
useraleLabel="annotation-object-list-view"
className="annotations-list-view"
bulkActions={bulkActions}
bulkSelectEnabled={bulkSelectEnabled}
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/pages/ChartList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ function ChartList(props: ChartListProps) {
}
return (
<ListView<Chart>
useraleLabel="chart"
useraleLabel="chart-list-view"
bulkActions={bulkActions}
bulkSelectEnabled={bulkSelectEnabled}
cardSortSelectOptions={sortTypes}
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/pages/CssTemplateList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ function CssTemplatesList({

return (
<ListView<TemplateObject>
useraleLabel="template-object"
useraleLabel="template-object-list-view"
className="css-templates-list-view"
columns={columns}
count={templatesCount}
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/pages/DashboardList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ function DashboardList(props: DashboardListProps) {
/>
)}
<ListView<Dashboard>
useraleLabel="dashboard"
useraleLabel="dashboard-list-view"
bulkActions={bulkActions}
bulkSelectEnabled={bulkSelectEnabled}
cardSortSelectOptions={sortTypes}
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/pages/DatabaseList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ function DatabaseList({
)}

<ListView<DatabaseObject>
useraleLabel="database-object"
useraleLabel="database-object-list-view"
className="database-list-view"
columns={columns}
count={databaseCount}
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/pages/DatasetList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ const DatasetList: FunctionComponent<DatasetListProps> = ({
}
return (
<ListView<Dataset>
useraleLabel="dataset"
useraleLabel="dataset-list-view"
className="dataset-list-view"
columns={columns}
data={datasets}
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/pages/ExecutionLogList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ function ExecutionLog({
}
/>
<ListView<LogObject>
useraleLabel="log-object"
useraleLabel="execution-log-object-list-view"
className="execution-log-list-view"
columns={columns}
count={logCount}
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/pages/RowLevelSecurityList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ function RowLevelSecurityList(props: RLSProps) {
show={ruleModalOpen}
/>
<ListView<RLSObject>
useraleLabel="row-level-security-object"
useraleLabel="row-level-security-object-list-view"
className="rls-list-view"
bulkActions={bulkActions}
bulkSelectEnabled={bulkSelectEnabled}
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/pages/SavedQueryList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ function SavedQueryList({
}
return (
<ListView<SavedQueryObject>
useraleLabel="saved-query-object"
useraleLabel="saved-query-object-list-view"
className="saved_query-list-view"
columns={columns}
count={queryCount}
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/pages/Tags/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ function TagList(props: TagListProps) {
return (
<>
<ListView<Tag>
useraleLabel="tag"
useraleLabel="tags-list-view"
bulkActions={bulkActions}
bulkSelectEnabled={bulkSelectEnabled}
cardSortSelectOptions={sortTypes}
Expand Down
4 changes: 2 additions & 2 deletions superset-frontend/src/views/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ const boundActions = bindActionCreators({ logEvent }, store.dispatch);
userale.options({
userId: bootstrapData.user?.username,
autostart: true,
url: 'http://localhost:8000', // Must be localhost because this is running client-side
url: 'http://localhost:8000',
logDetails: true,
});

userale.map((log: Object, e: Event) => ({
...log,
boundaries: buildBoundaries(e),
logType: 'boundaries',
}));

const LocationPathnameLogger = () => {
Expand Down

0 comments on commit b7e2ea3

Please sign in to comment.