Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service selection: Starting with labels besides service_name #813

Merged
merged 55 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
2157dff
chore: wip
gtk-grafana Sep 23, 2024
9005ea7
chore: fix types
gtk-grafana Sep 23, 2024
6e6171a
chore: wip
gtk-grafana Sep 23, 2024
b248887
chore: update primary label in url
gtk-grafana Sep 23, 2024
f12ed7d
chore: wip, stuff is broken
gtk-grafana Sep 24, 2024
0443387
Merge remote-tracking branch 'origin/main' into gtk-grafana/service-n…
gtk-grafana Sep 25, 2024
d63c05f
chore: remove service_name everywhere besides service selection, fiel…
gtk-grafana Sep 25, 2024
0c8e41f
Merge remote-tracking branch 'origin/main' into gtk-grafana/service-n…
gtk-grafana Sep 25, 2024
e546ed3
chore: todos
gtk-grafana Sep 25, 2024
606c4df
chore: fix fields queries with metadata, clean up, fix fields count w…
gtk-grafana Sep 26, 2024
57ac417
chore: remove flag placeholder
gtk-grafana Sep 26, 2024
85a7266
chore: update unit test
gtk-grafana Sep 26, 2024
406bd21
Merge remote-tracking branch 'origin/main' into gtk-grafana/service-n…
gtk-grafana Sep 26, 2024
ffbe1c2
Merge remote-tracking branch 'origin/main' into gtk-grafana/service-n…
gtk-grafana Sep 26, 2024
9020084
chore: clean up, document
gtk-grafana Sep 26, 2024
7fd1ca0
chore: clean up
gtk-grafana Sep 26, 2024
195f4d2
Merge branch 'main' into gtk-grafana/service-not-required-poc
gtk-grafana Sep 30, 2024
7c056dc
Merge remote-tracking branch 'origin/main' into gtk-grafana/service-n…
gtk-grafana Sep 30, 2024
976b6ca
chore: add back in change that was overwritten by merge
gtk-grafana Sep 30, 2024
f462fda
chore: wip
gtk-grafana Oct 2, 2024
3226cc7
chore: assert url contains primary label name and value when calling …
gtk-grafana Oct 2, 2024
48798c8
chore: add more verbose logging for unexpected urls, remove bad error…
gtk-grafana Oct 2, 2024
525db5f
Merge branch 'gtk-grafana/service-not-required-poc' into gtk-grafana/…
gtk-grafana Oct 2, 2024
718a7e6
chore: wip, mostly functional
gtk-grafana Oct 2, 2024
debec32
chore: clean up
gtk-grafana Oct 3, 2024
932884b
Merge remote-tracking branch 'origin/main' into gtk-grafana/service-s…
gtk-grafana Oct 3, 2024
b7ee755
chore: refactor tabs out into new scene
gtk-grafana Oct 3, 2024
f07952b
chore: clean up, refactor
gtk-grafana Oct 3, 2024
d61b594
chore: clean up
gtk-grafana Oct 3, 2024
67c2ad1
chore: remove redundant state
gtk-grafana Oct 3, 2024
31ffdf9
feat: switch to detected_labels and display cardinality in tabs and d…
gtk-grafana Oct 3, 2024
3502ad2
chore: add browser history
gtk-grafana Oct 3, 2024
378182c
test: add test for new url params
gtk-grafana Oct 3, 2024
0a29feb
fix: fix browser history when changing labels, datasource
gtk-grafana Oct 8, 2024
207f6a2
Merge remote-tracking branch 'origin/main' into gtk-grafana/service-s…
gtk-grafana Oct 8, 2024
9a0bb0b
chore: fix e2e tests
gtk-grafana Oct 8, 2024
de6a3c4
feat: add favorites which work with new tabs
gtk-grafana Oct 8, 2024
43d1162
feat: add favorites which work with new tabs
gtk-grafana Oct 8, 2024
6cf5f4e
chore: ui clean up, fix bad browser history bug on redirect back to i…
gtk-grafana Oct 9, 2024
0ee54f4
chore: ui review, update favorite icon
gtk-grafana Oct 9, 2024
909b74c
chore: truncate long tab names, add tooltip
gtk-grafana Oct 9, 2024
875eace
chore: spelling
gtk-grafana Oct 9, 2024
13174b9
chore: fix e2e tests, update tooltip copy
gtk-grafana Oct 9, 2024
66aaeef
chore: add e2e coverage
gtk-grafana Oct 10, 2024
5c518eb
chore: clean up
gtk-grafana Oct 10, 2024
001a038
Merge remote-tracking branch 'origin/main' into gtk-grafana/service-s…
gtk-grafana Oct 10, 2024
bbac060
chore: fix urls, remove uncessary test
gtk-grafana Oct 10, 2024
01e1c9b
chore: remove cryptic comment
gtk-grafana Oct 10, 2024
a682175
fix: prevent runtime error if primary label is defined in url but empty
gtk-grafana Oct 10, 2024
a31d9c4
chore: remove capitalization, change input copy
gtk-grafana Oct 15, 2024
d7df5dd
chore: remove loading indicator that pushes content
gtk-grafana Oct 15, 2024
4209473
chore: design tweaks and review with UX
gtk-grafana Oct 15, 2024
bcb107b
chore: sort tabs by order added
gtk-grafana Oct 15, 2024
058f1b0
chore: update playwright, update testids
gtk-grafana Oct 15, 2024
4607a65
chore: clean up, ellipsis
gtk-grafana Oct 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: clean up
  • Loading branch information
gtk-grafana committed Oct 10, 2024
commit 5c518eb0cd01059c44b686d02670cf1fdff208a1
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export class FavoriteServiceHeaderActionScene extends SceneObjectBase<FavoriteSe
}}
icon={<Icon name={isFavorite ? 'favorite' : 'star'} size="lg" type={isFavorite ? 'mono' : 'default'} />}
color={isFavorite ? 'rgb(235, 123, 24)' : '#ccc'}
// iconType={model.getIconType(isFavorite)}
onClick={() => model.onClick(isFavorite)}
name={'star'}
aria-label={tooltipCopy}
Expand Down
10 changes: 0 additions & 10 deletions src/Components/ServiceSelectionScene/ServiceSelectionScene.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ export class ServiceSelectionScene extends SceneObjectBase<ServiceSelectionScene
}

/**
* I'm probably not doing this right
* Set changes from the URL to the state of the primary label variable
*/
getUrlState() {
Expand All @@ -211,7 +210,6 @@ export class ServiceSelectionScene extends SceneObjectBase<ServiceSelectionScene
updateFromUrl(values: SceneObjectUrlValues) {}

addDatasourceChangeToBrowserHistory(newDs: string) {
// this._urlSync.performBrowserHistoryAction(() => {
const location = locationService.getLocation();
const search = new URLSearchParams(location.search);
const dsUrl = search.get(datasourceUrlKey);
Expand All @@ -223,16 +221,13 @@ export class ServiceSelectionScene extends SceneObjectBase<ServiceSelectionScene
pushUrlHandler(newUrl);
}
}
// });
}

/**
* I'm probably not doing this right
* Attempting to add any change to the primary label variable (i.e. the selected tab) as a browser history event
* @param newKey
*/
addLabelChangeToBrowserHistory(newKey: string, replace = false) {
// this._urlSync.performBrowserHistoryAction(() => {
const { key: primaryLabelRaw, search, location } = getSelectedTabFromUrl();
if (primaryLabelRaw) {
const primaryLabelSplit = primaryLabelRaw?.split('|');
Expand All @@ -249,14 +244,9 @@ export class ServiceSelectionScene extends SceneObjectBase<ServiceSelectionScene
} else {
pushUrlHandler(newUrl);
}
} else {
console.log('not adding label to browser history:', newKey, replace);
}
}
} else {
console.log('no primary label in url yet?', primaryLabelRaw, replace);
}
// });
}

public static Component = ({ model }: SceneComponentProps<ServiceSelectionScene>) => {
Expand Down
12 changes: 0 additions & 12 deletions src/services/CustomAdHocFiltersVariable.tsx

This file was deleted.

4 changes: 1 addition & 3 deletions src/services/datasource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,6 @@ export class WrappedLokiDatasource extends RuntimeDataSource<DataQuery> {
start: request.range.from.utc().toISOString(),
end: request.range.to.utc().toISOString(),
limit: 5000,
// aggregatedMetrics: true,
},
{
requestId: request.requestId ?? 'volume',
Expand Down Expand Up @@ -472,8 +471,7 @@ export class WrappedLokiDatasource extends RuntimeDataSource<DataQuery> {

// Scenes will only emit dataframes from the SceneQueryRunner, so for now we need to convert the API response to a dataframe
const df = createDataFrame({
// Limit to 1000 results, @todo search labels
fields: [{ name: 'labels', values: labelsResponse?.data.slice(0, 1000) }],
fields: [{ name: 'labels', values: labelsResponse?.data }],
});
subscriber.next({ data: [df], state: LoadingState.Done });
} catch (e) {
Expand Down