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

[Feature] Dashboards List Extensibility #2149

Conversation

pjfitzgibbons
Copy link
Contributor

@pjfitzgibbons pjfitzgibbons commented Aug 16, 2022

Description

Extend OSD Dashboard List to allow other plugins to supply their own list of "dashboards" to be appended to the OSD Dashboard List.

"Edit" column on Dashboard List availability is set per-row, dependent upon presence of editUrl value on each input row.

Screen Shot 2022-08-23 at 2 37 40 PM

Issues WIP

[FEATURE] Integrate Observability Panels/Apps lists into OpenSearch-Dashboards main List View

Related PR

Observability Plugin : [WIP] [FEATURE] Integrate Dashboards/Observability

Check List

  • New functionality includes testing.
    • All tests pass
      • yarn test:jest
      • yarn test:jest_integration
      • yarn test:ftr
  • New functionality has been documented.
  • Commits are signed per the DCO using --signoff

Peter Fitzgibbons added 4 commits August 11, 2022 14:57
Convert dashboards lists legacy_app.js to TS

Signed-off-by: Peter Fitzgibbons <[email protected]>
Moved types to ./types.ts modules.

Separated dependency of types between OSD and Observability Plugin

Signed-off-by: Peter Fitzgibbons <[email protected]>
Integrated Observability Panel List Provider
- added Type column to Dashboard List
- enabled Search on Dashboad List for all columns/records

Signed-off-by: Peter Fitzgibbons <[email protected]>
- Observability Apps integrated to Dashboard List
- "Edit" column availability per-row dependent upon item editUrl presence

Signed-off-by: Peter Fitzgibbons <[email protected]>
@pjfitzgibbons pjfitzgibbons requested a review from a team as a code owner August 16, 2022 21:50
@pjfitzgibbons pjfitzgibbons changed the title Feature/integrate dashboard lists.2 [Feature] Dashboards List Extensibility Aug 16, 2022
Copy link
Member

@ashwin-pc ashwin-pc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The approach looks good. A few comments/questions.

  1. Since this modifies a core part of the dashboard experience, can we add some tests to ensure that the new functionality does not break anything?
  2. Can you add some screenshots of how the new experience will look like since you seem to be adding a new column to the Dashboards listing table
  3. Existing tests are failing for the dashboard listing component.

Comment on lines 52 to 62
export interface DashboardListItem {
id: string;
title: string;
type: string;
description: string;
url: string;
listType: string;
}

export type DashboardListItems = DashboardListItem[];
export type DashboardListProviderFn = () => Observable<DashboardListItems>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have this defined in 2 places?

Comment on lines 69 to 74
export interface DashboardListSource {
name: string;
listProviderFn: () => Observable<DashboardListItem>;
}

export type DashboardListSources = DashboardListSource[];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we define this in multiple places?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in newest rev.

Peter Fitzgibbons added 2 commits August 23, 2022 12:39
Update dashboard_listing.test.js and snap to match added component fields

Signed-off-by: Peter Fitzgibbons <[email protected]>
Remove duplicated declarations for DashboardListSource/DashboardListSources types

Signed-off-by: Peter Fitzgibbons <[email protected]>
import { Storage } from '../../../opensearch_dashboards_utils/public';
// @ts-ignore
import { initDashboardApp } from './legacy_app';
import { DashboardListItem, DashboardListProviderFn, initDashboardApp } from './legacy_app';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see this import in the diff but DashboardListItem && DashboardListProviderFn dont seem to be used anywhere in this file

export type DashboardListItems = DashboardListItem[];
export type DashboardListProviderFn = () => Observable<DashboardListItems>;
export interface DashboardDisplay {
hits: DashboardListItem[];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: You already have DashboardListItems. Id either remove that or use that here

Comment on lines +147 to +161
export interface DashboardListSource {
name: string;
listProviderFn: () => Observable<DashboardListItem>;
}

export type DashboardListSources = DashboardListSource[];

export interface DashboardListItem {
id: string;
title: string;
type: string;
description: string;
url: string;
listType: string;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also defined in legacy_app.ts

@ashwin-pc
Copy link
Member

Hey @pjfitzgibbons, thanks for addressing most of the comments. I dont see any changes since my latest review though. The 3 remaining callouts I had for the PR are:

  1. There still seems to be a duplicate interface for DashboardListItem and DashboardListItems
  2. Tests for the new functionality (You can just add to the existing functional tests for the component)
  3. Fixing the existing Functional tests that are breaking in the CI runner

Correct sorting of Dashboard List by items' Title, Type, or Description.

Signed-off-by: Peter Fitzgibbons <[email protected]>
@seanneumann
Copy link
Contributor

Can we get an update?

@pjfitzgibbons
Copy link
Contributor Author

pjfitzgibbons commented Sep 26, 2022 via email

Peter Fitzgibbons added 2 commits September 28, 2022 11:26
Allow plugins to register as "Create provider", adding itself to the "Create" button of Dashboard List.

Signed-off-by: Peter Fitzgibbons <[email protected]>
Allow plugins to register as "Create provider", adding itself to the "Create" button of Dashboard List.

Signed-off-by: Peter Fitzgibbons <[email protected]>
Comment on lines +5470 to +5472
version "1.0.30001407"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001407.tgz"
integrity sha512-4ydV+t4P7X3zH83fQWNDX/mQEzYomossfpViCOx9zHBSMV+rIe3LFqglHHtVyvNl1FhTNxPxs3jei82iqOW04w==
Copy link
Member

@joshuarrrr joshuarrrr Sep 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should be removed from this PR and made as a separate PR if needed (it's also causing a merge conflict at the moment). I've also created a general tracking issue for this problem here: #2429

@joshuarrrr
Copy link
Member

@pjfitzgibbons Just following up to see if you're able to update the PR an resolve conflicts or remove the yarn.lock file.

opensearch-trigger-bot bot and others added 9 commits October 24, 2022 08:34
…ct#1550) (opensearch-project#1707)

* Fix WMS can't load when unable access maps services

Signed-off-by: Junqiu Lei <[email protected]>
(cherry picked from commit b2cfb6e)
…ct#1750)

Signed-off-by: Tommy Markley <[email protected]>
(cherry picked from commit 72a3424)

Co-authored-by: Tommy Markley <[email protected]>
) (opensearch-project#1774)

Incorrectly set the date range of the library. This sets the value
correctly and turns the dates into consts.

Issue:
n/a

Signed-off-by: Kawika Avilla <[email protected]>
(cherry picked from commit 4703abf)

Co-authored-by: Kawika Avilla <[email protected]>
…ch-project#2107)

Issue:
opensearch-project#1873

This was happening because of a prop useDefaultGroupDomain. This prop was introduced into the elastic charts to allow clustering for the multiple series which will share a common Y domain i.e for example the stacked and non- stacked bars will have the same Y common domain/axis. As per the elastic/charts whenever the useDefaultGroupDomain is set to true, it will force to group the series/visualiations groupId's to a default group domain. But, TSVB is not a shared Y domain. So the prop is unneeded.

Further insight:

From the code:
```
const groupId = hasSeparateAxis || isStackedWithinSeries ? seriesGroup.id : mainAxisGroupId;
```
where
```
const mainAxisGroupId = yAxisIdGenerator('main_group');
```
... which indicates that the global default `groupId` is not used by TSVB. Hence, TSVB should have not been using `useDefaultGroupDomain` ever.

Signed-off-by: AbhishekReddy1127 <[email protected]>
(cherry picked from commit 55181d4)

Co-authored-by: Abhishek Reddy <[email protected]>
…ns (opensearch-project#1946) (opensearch-project#1959)

Resolves issue - opensearch-project#1895

Signed-off-by: Manasvini B Suryanarayana <[email protected]>
(cherry picked from commit 2c428b8)

Co-authored-by: Manasvini B Suryanarayana <[email protected]>
Co-authored-by: Kawika Avilla <[email protected]>
…-project#2244)

Enable filtering with custom health checks based on node attributes:
```
opensearch.optimizedHealthcheck.filters: {
  attribute_key: "attribute_value",
}
```

Also, fixes issue that expects the response to array when it was a
dictionary.

Issue:
opensearch-project#2214
opensearch-project#2203

Signed-off-by: Kawika Avilla <[email protected]>
(cherry picked from commit e6bbb40)

Co-authored-by: Kawika Avilla <[email protected]>
…ch-project#2277) (opensearch-project#2298)

Original implementation incorrectly assumed the return list of
nodes was an object array.
This PR:
opensearch-project#2232

Addressed the return but didn't catch the nodes.find in the return
which is a function for an array.

Also, refactors to return a list of node_ids because the original
implementation indicated that it should but it can return node ids
but it never did. It only returned `null` or `_local`, the problem
with this approach is that it doesn't expect valid node version
with different DIs or filter out nodes when we pass `null` as the node
ID for the node info call because it was fan out the request to all
nodes.

Now this function will return `_local` if all the nodes share the
same cluster_id using a greedy approach since we can assume it is
all the same version.

Will return node ids, if the cluster_id are different so it will
pass a CSV to the node info call and return the info for those nodes.
And null if no cluster_id is present, ie, fan out the response.

Original issue:
opensearch-project#2203

Signed-off-by: Kawika Avilla <[email protected]>

Signed-off-by: Kawika Avilla <[email protected]>
…ch-project#1948) (opensearch-project#1955) (opensearch-project#2388)

Issue:
n/a

Backport PRs will also run actions for pushs and PRs which is just
unneeded double work everytime. So this prevents that.

Also, BWC will run a complete array for every job in the matrix.
Now we set the environment variable to prevents the running of
the default versions.

Finally updating date range of filter tests to be more inclusive for
new test data.

Signed-off-by: Kawika Avilla <[email protected]>
(cherry picked from commit 57a751e)
(cherry picked from commit dfe13d6)

Co-authored-by: Kawika Avilla <[email protected]>
opensearch-trigger-bot bot and others added 3 commits October 24, 2022 08:34
…roject#1823) (opensearch-project#2387)

Maps zoom level were updated to be 14 as noted here:
opensearch-project/maps#4 (comment)

Issue:
n/a

Signed-off-by: Kawika Avilla <[email protected]>
(cherry picked from commit e7362f9)

Co-authored-by: Kawika Avilla <[email protected]>
…pensearch-project#2366)

### Description
Updates `moment-timezone`

Dependabot PR:
opensearch-project#2229

### Issues Resolved
opensearch-project#2262
opensearch-project#2263

Signed-off-by: Ashwin Pc <[email protected]>
(cherry picked from commit 77b6068)

Co-authored-by: Ashwin P Chandran <[email protected]>
Co-authored-by: Kawika Avilla <[email protected]>
…search-project#2352) (opensearch-project#2371)

* Pass `options` to `vega.parse` to enable inclusion of parsed ASTs
* Introduce the forced CSP-compliant interpreter that prevents evaluation of unsafe methods
* Modified the consumed `leaflet-vega` package to one that honors `options`

Signed-off-by: Miki <[email protected]>

Signed-off-by: Miki <[email protected]>
(cherry picked from commit bebbcca)

Co-authored-by: Miki <[email protected]>
Co-authored-by: Ashwin P Chandran <[email protected]>
Co-authored-by: Kawika Avilla <[email protected]>
pjfitzgibbons pushed a commit to pjfitzgibbons/observability that referenced this pull request Oct 24, 2022
* Register App Analytics, Panels as "Dashboard List Providers" (requires opensearch-project/OpenSearch-Dashboards#2149)

* Register App Analytics, Event Analytics as "Dashboard Left-Nav Links", using existing app.register functions of OSD.  Create a new "top-level" Left-Nav section "Observability"

Signed-off-by: Peter Fitzgibbons <[email protected]>
* Configure types for registration of Dashboard List "Providers" and "Creators"

* Add Left-Nav "top-level" category for Observability

Signed-off-by: Peter Fitzgibbons <[email protected]>
@joshuarrrr
Copy link
Member

@pjfitzgibbons Should this PR be closed in favor of #2670, or are you still working on this? For now, I'm going to set it to draft since it's stale.

@joshuarrrr joshuarrrr marked this pull request as draft November 14, 2022 19:48
pjfitzgibbons pushed a commit to pjfitzgibbons/observability that referenced this pull request Dec 1, 2022
* Register App Analytics, Panels as "Dashboard List Providers" (requires opensearch-project/OpenSearch-Dashboards#2149)

* Register App Analytics, Event Analytics as "Dashboard Left-Nav Links", using existing app.register functions of OSD.  Create a new "top-level" Left-Nav section "Observability"

Signed-off-by: Peter Fitzgibbons <[email protected]>
derek-ho pushed a commit to opensearch-project/observability that referenced this pull request Dec 22, 2022
* Register App Analytics, Panels as "Dashboard List Providers" (requires opensearch-project/OpenSearch-Dashboards#2149)

* Register App Analytics, Event Analytics as "Dashboard Left-Nav Links", using existing app.register functions of OSD.  Create a new "top-level" Left-Nav section "Observability"

Signed-off-by: Peter Fitzgibbons <[email protected]>
pjfitzgibbons pushed a commit to opensearch-project/dashboards-observability that referenced this pull request Jan 4, 2023
* Register App Analytics, Panels as "Dashboard List Providers" (requires opensearch-project/OpenSearch-Dashboards#2149)

* Register App Analytics, Event Analytics as "Dashboard Left-Nav Links", using existing app.register functions of OSD.  Create a new "top-level" Left-Nav section "Observability"

Signed-off-by: Peter Fitzgibbons <[email protected]>
pjfitzgibbons pushed a commit to opensearch-project/dashboards-observability that referenced this pull request Jan 11, 2023
* Register App Analytics, Panels as "Dashboard List Providers" (requires opensearch-project/OpenSearch-Dashboards#2149)

* Register App Analytics, Event Analytics as "Dashboard Left-Nav Links", using existing app.register functions of OSD.  Create a new "top-level" Left-Nav section "Observability"

Signed-off-by: Peter Fitzgibbons <[email protected]>
pjfitzgibbons pushed a commit to pjfitzgibbons/OpenSearch-Dashboards that referenced this pull request Feb 16, 2023
* Register App Analytics, Panels as "Dashboard List Providers" (requires opensearch-project#2149)

* Register App Analytics, Event Analytics as "Dashboard Left-Nav Links", using existing app.register functions of OSD.  Create a new "top-level" Left-Nav section "Observability"

Signed-off-by: Peter Fitzgibbons <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants