Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
i2dash
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
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
loosolab
software
i2dash
Merge requests
!18
Generic htm lwidget
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Generic htm lwidget
genericHTMLwidget
into
master
Overview
2
Commits
5
Pipelines
4
Changes
4
Merged
arsenij.ustjanzew
requested to merge
genericHTMLwidget
into
master
4 years ago
Overview
2
Commits
5
Pipelines
4
Changes
2
Expand
0
0
Merge request reports
Compare
version 3
version 3
e5678577
4 years ago
version 2
65cbb1b6
4 years ago
version 1
890c8657
4 years ago
master (base)
and
latest version
latest version
c29df689
5 commits,
4 years ago
version 3
e5678577
4 commits,
4 years ago
version 2
65cbb1b6
3 commits,
4 years ago
version 1
890c8657
2 commits,
4 years ago
Show latest version
2 files
+
17
−
11
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
R/vis_objects.R
+
15
−
9
Options
@@ -64,14 +64,20 @@ setMethod("add_component",
setMethod
(
"add_component"
,
signature
=
signature
(
dashboard
=
"i2dashboard"
,
component
=
"ANY"
),
definition
=
function
(
dashboard
,
component
,
page
=
"default"
,
title
=
NULL
,
...
)
{
if
(
!
inherits
(
component
,
"htmlwidget"
))
{
warning
(
"The object has to inherit from the class 'htmlwidget'."
)
return
(
dashboard
)
}
package
<-
packageSlot
(
component
)
if
(
is.null
(
package
))
{
warning
(
"The package name of this HTML widget could not be determined. The component was not added to the dashboard."
)
return
(
dashboard
)
# HTMLWIDGETS
if
(
inherits
(
component
,
"htmlwidget"
))
{
package
<-
packageSlot
(
component
)
if
(
is.null
(
package
))
{
warning
(
"No component added, since the package name of the HTML widget could not be determined."
)
return
(
dashboard
)
}
return
(
add_vis_object
(
dashboard
,
component
,
package
,
page
,
title
,
...
))
}
add_vis_object
(
dashboard
,
component
,
package
,
page
,
title
,
...
)
# OTHER
warning
(
"The component did not inherit from any of the currently supported classes ('htmlwidget')."
)
return
(
dashboard
)
})
Loading