Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
minerva
frontend
Commits
cca246c2
Commit
cca246c2
authored
5 months ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
support for matomo added
parent
ed740e71
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!264
Resolve "add support for matomo"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG
+5
-0
5 additions, 0 deletions
CHANGELOG
src/redux/configuration/configuration.constants.ts
+1
-0
1 addition, 0 deletions
src/redux/configuration/configuration.constants.ts
src/redux/root/init.thunks.ts
+35
-1
35 additions, 1 deletion
src/redux/root/init.thunks.ts
with
41 additions
and
1 deletion
CHANGELOG
+
5
−
0
View file @
cca246c2
minerva-front (19.0.0~alpha.0) stable; urgency=medium
* Feature: support for matomo (#289)
-- Piotr Gawron <piotr.gawron@uni.lu> Thu, 19 Sep 2024 13:00:00 +0200
minerva-front (18.0.0~beta.2) stable; urgency=medium
* Feature: minerva frontend - first version
* Bugfix: when opening overlay provide loading info (#285)
...
...
This diff is collapsed.
Click to expand it.
src/redux/configuration/configuration.constants.ts
+
1
−
0
View file @
cca246c2
...
...
@@ -5,6 +5,7 @@ export const NEUTRAL_COLOR_VAL_NAME_ID = 'NEUTRAL_COLOR_VAL';
export
const
OVERLAY_OPACITY_NAME_ID
=
'
OVERLAY_OPACITY
'
;
export
const
SEARCH_DISTANCE_NAME_ID
=
'
SEARCH_DISTANCE
'
;
export
const
REQUEST_ACCOUNT_EMAIL
=
'
REQUEST_ACCOUNT_EMAIL
'
;
export
const
MATOMO_URL
=
'
MATOMO_URL
'
;
export
const
LEGEND_FILE_NAMES_IDS
=
[
'
LEGEND_FILE_1
'
,
...
...
This diff is collapsed.
Click to expand it.
src/redux/root/init.thunks.ts
+
35
−
1
View file @
cca246c2
import
{
PROJECT_ID
}
from
'
@/constants
'
;
import
{
openOverlaysDrawer
,
openSearchDrawerWithSelectedTab
}
from
'
@/redux/drawer/drawer.slice
'
;
import
{
AppDispatch
}
from
'
@/redux/store
'
;
import
{
AppDispatch
,
store
}
from
'
@/redux/store
'
;
import
{
QueryData
}
from
'
@/types/query
'
;
import
{
getDefaultSearchTab
}
from
'
@/components/FunctionalArea/TopBar/SearchBar/SearchBar.utils
'
;
import
{
PluginsManager
}
from
'
@/services/pluginsManager
'
;
...
...
@@ -16,6 +16,7 @@ import { openSelectProjectModal } from '@/redux/modal/modal.slice';
import
{
getProjects
}
from
'
@/redux/projects/projects.thunks
'
;
import
{
getSubmapConnectionsBioEntity
}
from
'
@/redux/bioEntity/thunks/getSubmapConnectionsBioEntity
'
;
import
{
getShapes
}
from
'
@/redux/shapes/shapes.thunks
'
;
import
{
MATOMO_URL
}
from
'
@/redux/configuration/configuration.constants
'
;
import
{
getAllBackgroundsByProjectId
}
from
'
../backgrounds/backgrounds.thunks
'
;
import
{
getConfiguration
,
getConfigurationOptions
}
from
'
../configuration/configuration.thunks
'
;
import
{
...
...
@@ -62,6 +63,39 @@ export const fetchInitialAppData = createAsyncThunk<
dispatch
(
getShapes
()),
]);
try
{
const
configuration
=
store
.
getState
().
configuration
.
main
.
data
;
if
(
configuration
)
{
const
options
=
configuration
.
options
.
filter
(
option
=>
option
.
type
===
MATOMO_URL
);
let
url
=
''
;
if
(
options
.
length
>
ZERO
)
{
url
=
options
[
ZERO
].
value
?
options
[
ZERO
].
value
:
''
;
}
if
(
!
url
.
startsWith
(
'
http
'
))
{
url
=
''
;
}
if
(
url
!==
''
)
{
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
// eslint-disable-next-line no-underscore-dangle,no-multi-assign
const
_mtm
=
(
window
.
_mtm
=
window
.
_mtm
||
[]);
_mtm
.
push
({
'
mtm.startTime
'
:
new
Date
().
getTime
(),
event
:
'
mtm.Start
'
});
const
d
=
document
;
const
g
=
d
.
createElement
(
'
script
'
);
const
s
=
d
.
getElementsByTagName
(
'
script
'
)[
ZERO
];
g
.
async
=
true
;
g
.
src
=
url
;
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
s
.
parentNode
.
insertBefore
(
g
,
s
);
}
}
}
catch
(
e
)
{
// eslint-disable-next-line no-console
console
.
log
(
e
);
}
if
(
queryData
.
pluginsId
)
{
await
dispatch
(
getInitPlugins
({
...
...
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