Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Newspapers Platform
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
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
labs-team
Newspapers Platform
Commits
4acbb510
Commit
4acbb510
authored
2 years ago
by
smayer
Browse files
Options
Downloads
Patches
Plain Diff
Changes for correct notification display when downloading files and adding documents to datasets
parent
082930b8
No related branches found
Branches containing commit
No related tags found
1 merge request
!2
Merging development into onb as preparation for Annolyzer release
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/javascript/channels/notification_channel.js
+2
-2
2 additions, 2 deletions
app/javascript/channels/notification_channel.js
app/workers/export_dataset_worker.rb
+1
-1
1 addition, 1 deletion
app/workers/export_dataset_worker.rb
config/cable.yml
+3
-1
3 additions, 1 deletion
config/cable.yml
with
6 additions
and
4 deletions
app/javascript/channels/notification_channel.js
+
2
−
2
View file @
4acbb510
...
...
@@ -19,7 +19,7 @@ consumer.subscriptions.create("NotificationChannel", {
$
(
"
#experiment_area
"
).
attr
(
"
data-refresh
"
,
(
!
$
(
"
#experiment_area
"
).
attr
(
"
data-refresh
"
)))
break
case
"
notify
"
:
if
(
window
.
location
.
pathname
==
"
/search
"
)
{
if
(
window
.
location
.
pathname
.
endsWith
(
"
/search
"
)
)
{
const
selected_dataset
=
$
(
"
#working_dataset_select
"
).
val
()
$
(
"
#working_dataset_select
"
).
html
(
data
.
dataset_options
)
$
(
"
#working_dataset_select
"
).
val
(
selected_dataset
)
...
...
@@ -35,7 +35,7 @@ consumer.subscriptions.create("NotificationChannel", {
}
break
case
"
completion_rate
"
:
if
(
window
.
location
.
pathname
==
`/experiment/
${
data
.
experiment_id
}
`
)
{
if
(
window
.
location
.
pathname
.
endsWith
(
`/experiment/
${
data
.
experiment_id
}
`
)
)
{
const
progress_bar
=
$
(
`#tool_
${
data
.
tool_id
}
`
).
find
(
"
.completion-rate
"
).
find
(
'
.progress-bar
'
)
progress_bar
.
attr
(
"
style
"
,
`width:
${
data
.
completion
}
%;`
)
progress_bar
.
attr
(
"
aria-valuenow
"
,
data
.
completion
)
...
...
This diff is collapsed.
Click to expand it.
app/workers/export_dataset_worker.rb
+
1
−
1
View file @
4acbb510
...
...
@@ -73,7 +73,7 @@ class ExportDatasetWorker
File
.
delete
(
"/tmp/
#{
filename
}
"
)
if
filename
end
end
content
=
"<p>Your dataset is ready. <a target=
\"
_blank
\"
href=
\"
/send?filename=
#{
File
.
basename
(
file
.
path
)
}
\"
>Click here</a> to download it.</p>"
content
=
"<p>Your dataset is ready. <a target=
\"
_blank
\"
href=
\"
/
en/tool/newspapers-platform/
send?filename=
#{
File
.
basename
(
file
.
path
)
}
\"
>Click here</a> to download it.</p>"
ActionCable
.
server
.
broadcast
(
"notifications.
#{
user_id
}
"
,
{
type:
"notify"
,
html:
ApplicationController
.
render
(
partial:
"shared/notification"
,
locals:
{
notif_title:
dataset
.
title
,
notif_content:
content
}),
...
...
This diff is collapsed.
Click to expand it.
config/cable.yml
+
3
−
1
View file @
4acbb510
development
:
adapter
:
async
adapter
:
redis
url
:
<%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
channel_prefix
:
newspapers_platform_production_dev
test
:
adapter
:
test
...
...
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