Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
bef731d6
Commit
bef731d6
authored
4 years ago
by
Nithya
Browse files
Options
Downloads
Patches
Plain Diff
TMSS-297
Function and variable names updated
parent
f9c8203f
No related branches found
No related tags found
1 merge request
!209
Resolve TMSS-297
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
SAS/TMSS/frontend/tmss_webapp/src/App.js
+7
-7
7 additions, 7 deletions
SAS/TMSS/frontend/tmss_webapp/src/App.js
SAS/TMSS/frontend/tmss_webapp/src/layout/components/AppBreadcrumb.js
+2
-2
2 additions, 2 deletions
...ontend/tmss_webapp/src/layout/components/AppBreadcrumb.js
with
9 additions
and
9 deletions
SAS/TMSS/frontend/tmss_webapp/src/App.js
+
7
−
7
View file @
bef731d6
...
...
@@ -23,7 +23,7 @@ class App extends Component {
layoutMode
:
'
static
'
,
currentMenu
:
''
,
currentPath
:
'
/
'
,
currentPageNam
e
:
''
,
PageTitl
e
:
''
,
staticMenuInactive
:
false
,
overlayMenuActive
:
false
,
mobileMenuActive
:
false
,
...
...
@@ -32,7 +32,7 @@ class App extends Component {
this
.
onToggleMenu
=
this
.
onToggleMenu
.
bind
(
this
);
this
.
onSidebarClick
=
this
.
onSidebarClick
.
bind
(
this
);
this
.
onMenuItemClick
=
this
.
onMenuItemClick
.
bind
(
this
);
this
.
set
CurrentPageName
=
this
.
setCurrentPageNam
e
.
bind
(
this
);
this
.
set
PageTitle
=
this
.
setPageTitl
e
.
bind
(
this
);
this
.
menu
=
[
{
label
:
'
Dashboard
'
,
icon
:
'
pi pi-fw pi-home
'
,
to
:
'
/dashboard
'
},
...
...
@@ -90,9 +90,9 @@ class App extends Component {
return
window
.
innerWidth
>
1024
;
}
set
CurrentPageName
(
currentPageNam
e
)
{
if
(
currentPageNam
e
!==
this
.
state
.
currentPageNam
e
)
{
this
.
setState
({
currentPageNam
e
})
set
PageTitle
(
PageTitl
e
)
{
if
(
PageTitl
e
!==
this
.
state
.
PageTitl
e
)
{
this
.
setState
({
PageTitl
e
})
}
}
...
...
@@ -116,9 +116,9 @@ class App extends Component {
<
Router
basename
=
{
this
.
state
.
currentPath
}
>
<
AppMenu
model
=
{
this
.
menu
}
onMenuItemClick
=
{
this
.
onMenuItemClick
}
/
>
<
div
className
=
"
layout-main
"
>
<
AppBreadCrumbWithRouter
set
CurrentPageName
=
{
this
.
setCurrentPageNam
e
}
/
>
<
AppBreadCrumbWithRouter
set
PageTitle
=
{
this
.
setPageTitl
e
}
/
>
{
/* Display current pagename */
}
<
h2
>
{
this
.
state
.
currentPageNam
e
}
<
/h2>
<
h2
>
{
this
.
state
.
PageTitl
e
}
<
/h2>
<
RoutedContent
/>
<
/div
>
<
/Router
>
...
...
This diff is collapsed.
Click to expand it.
SAS/TMSS/frontend/tmss_webapp/src/layout/components/AppBreadcrumb.js
+
2
−
2
View file @
bef731d6
...
...
@@ -27,13 +27,13 @@ export class AppBreadcrumb extends Component {
onRoute
()
{
const
{
breadcrumbs
}
=
this
.
state
;
const
{
set
CurrentPageNam
e
}
=
this
.
props
;
const
{
set
PageTitl
e
}
=
this
.
props
;
const
currentRoute
=
routes
.
find
(
route
=>
matchPath
(
this
.
props
.
location
.
pathname
,
{
path
:
route
.
path
,
exact
:
true
,
strict
:
true
}));
//for intial route ,there wont be any route object so it failed
if
(
!
currentRoute
){
return
;
}
set
CurrentPageNam
e
(
currentRoute
.
pageTitle
);
set
PageTitl
e
(
currentRoute
.
pageTitle
);
if
(
!
breadcrumbs
.
length
)
{
this
.
setState
({
breadcrumbs
:
[{...
this
.
props
.
location
,
name
:
currentRoute
.
name
}]
});
return
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment