Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
admin-fe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Pleroma
admin-fe
Merge requests
!129
Update status count when an instance was selected
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Update status count when an instance was selected
feature/update-status-count
into
develop
Overview
0
Commits
12
Pipelines
1
Changes
2
Merged
Angelina Filippova
requested to merge
feature/update-status-count
into
develop
4 years ago
Overview
0
Commits
12
Pipelines
1
Changes
2
Expand
Closes
#112 (closed)
0
0
Merge request reports
Viewing commit
8d1d9940
Prev
Next
Show latest version
2 files
+
13
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
8d1d9940
Clear state after vue instance was destroyed
· 8d1d9940
Angelina Filippova
authored
4 years ago
src/store/modules/status.js
+
10
−
3
Options
@@ -58,6 +58,14 @@ const status = {
dispatch
(
'
FetchStatusesByInstance
'
)
}
},
ClearState
({
commit
})
{
commit
(
'
CHANGE_SELECTED_INSTANCE
'
,
''
)
commit
(
'
SET_STATUSES_BY_INSTANCE
'
,
[])
commit
(
'
CHANGE_LOCAL_CHECKBOX_VALUE
'
,
false
)
commit
(
'
CHANGE_GODMODE_CHECKBOX_VALUE
'
,
false
)
commit
(
'
SET_ALL_LOADED
'
,
false
)
commit
(
'
CHANGE_PAGE
'
,
1
)
},
async
DeleteStatus
({
dispatch
,
getters
},
{
statusId
,
reportCurrentPage
,
userId
,
godmode
,
fetchStatusesByInstance
})
{
await
deleteStatus
(
statusId
,
getters
.
authHost
,
getters
.
token
)
if
(
reportCurrentPage
!==
0
)
{
// called from Reports
@@ -74,10 +82,9 @@ const status = {
commit
(
'
SET_STATUS_VISIBILITY
'
,
data
.
status_visibility
)
commit
(
'
SET_LOADING
'
,
false
)
},
async
FetchStatusesByInstance
({
commit
,
getters
,
state
,
rootState
})
{
const
{
data
}
=
await
fetchStatusesCount
(
state
.
statusesByInstance
.
selectedInstance
,
getters
.
authHost
,
getters
.
token
)
commit
(
'
SET_STATUS_VISIBILITY
'
,
data
.
status_visibility
)
async
FetchStatusesByInstance
({
commit
,
dispatch
,
getters
,
state
,
rootState
})
{
commit
(
'
SET_LOADING
'
,
true
)
dispatch
(
'
FetchStatusesCount
'
,
state
.
statusesByInstance
.
selectedInstance
)
if
(
state
.
statusesByInstance
.
selectedInstance
===
''
)
{
commit
(
'
SET_STATUSES_BY_INSTANCE
'
,
[])
}
else
{
Loading