Skip to content

Commit

Permalink
Merge branch 'main' into integrations-mds
Browse files Browse the repository at this point in the history
  • Loading branch information
sumukhswamy authored Aug 9, 2024
2 parents 93eab4e + df6266a commit 029c0ca
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@
"type": "host-name"
}
],
"info": ["https://github.com/opensearch-project/opensearch-catalog/tree/main/integrations/observability/csv_file/getting-started/fluent-bit/.env"],
"content": "wget https://raw.githubusercontent.com/opensearch-project/opensearch-catalog/main/integrations/observability/csv_file/getting-started/fluent-bit/.env",
"info": ["https://github.com/opensearch-project/opensearch-catalog/blob/main/integrations/observability/csv_file/getting-started/.env"],
"content": "wget https://raw.githubusercontent.com/opensearch-project/opensearch-catalog/main/integrations/observability/csv_file/getting-started/.env",
"description": "Setup docker-compose env variables "
},
{
Expand All @@ -96,7 +96,7 @@
"label": "live container",
"type": "file-url",
"phase": "docker",
"info": ["https://github.com/opensearch-project/opensearch-catalog/blob/main/integrations/observability/csv_file/getting-started/fluent-bit/fluent-bit.yml"],
"info": ["https://github.com/opensearch-project/opensearch-catalog/blob/main/integrations/observability/csv_file/getting-started/docker-compose.yml"],
"description": "Run docker-compose for the nginx live example and see the generated index",
"content": "wget -O docker-compose.yml https://raw.githubusercontent.com/opensearch-project/opensearch-catalog/main/integrations/observability/csv_file/getting-started/docker-compose.yml && docker-compose up -d fluent-bit \n"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,14 @@ export function ServiceView(props: ServiceViewProps) {
useEffect(() => {
if (page !== 'serviceFlyout')
setNavBreadCrumbs(
[props.parentBreadcrumb],
[
props.parentBreadcrumb,
{
text: 'Trace analytics',
href: '#/',
href: '#/services',
},
],
[
{
text: 'Services',
href: '#/services',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,14 @@ export function TraceView(props: TraceViewProps) {

useEffect(() => {
setNavBreadCrumbs(
[props.parentBreadcrumb],
[
props.parentBreadcrumb,
{
text: 'Trace analytics',
href: '#/',
href: '#/services',
},
],
[
{
text: 'Traces',
href: '#/traces',
Expand Down
32 changes: 23 additions & 9 deletions public/components/trace_analytics/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,13 @@ export const Home = (props: HomeProps) => {

const [dataSourceMDSId, setDataSourceMDSId] = useState([{ id: '', label: '' }]);
const [currentSelectedService, setCurrentSelectedService] = useState('');
const { defaultRoute = '/services' } = props;
let defaultRoute = props.defaultRoute ?? '/services';
const currentHash = window.location.hash.split('#')[1] || '';

if (currentHash.startsWith('/traces') || currentHash.startsWith('/services')) {
defaultRoute = currentHash;
}

const { chrome } = props;
const isNavGroupEnabled = chrome.navGroup.getNavGroupEnabled();

Expand Down Expand Up @@ -190,21 +196,29 @@ export const Home = (props: HomeProps) => {
}, [mode]);

const serviceBreadcrumbs = [
{
text: 'Trace analytics',
href: '#/services',
},
...(!isNavGroupEnabled
? [
{
text: 'Trace analytics',
href: '#/services',
},
]
: []),
{
text: 'Services',
href: '#/services',
},
];

const traceBreadcrumbs = [
{
text: 'Trace analytics',
href: '#/services',
},
...(!isNavGroupEnabled
? [
{
text: 'Trace analytics',
href: '#/services',
},
]
: []),
{
text: 'Traces',
href: '#/traces',
Expand Down
2 changes: 1 addition & 1 deletion public/components/trace_analytics/trace_side_nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function TraceSideBar(props: { children: React.ReactNode }) {
{
name: 'Trace analytics',
id: 1,
href: '#/',
href: '#/services',
items: [
{
name: 'Services',
Expand Down
7 changes: 0 additions & 7 deletions public/plugin_nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,6 @@ export function registerAllPluginNavGroups(core: CoreSetup<AppPluginStartDepende
order: 400,
},
]);
core.chrome.navGroup.addNavLinksToGroup(DEFAULT_NAV_GROUPS.analytics, [
{
id: observabilityNotebookID,
category: DEFAULT_APP_CATEGORIES.visualizeAndReport,
order: 400,
},
]);

core.chrome.navGroup.addNavLinksToGroup(DEFAULT_NAV_GROUPS.observability, [
{
Expand Down

0 comments on commit 029c0ca

Please sign in to comment.