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
Commits
c29df689
Commit
c29df689
authored
5 years ago
by
jens.preussner
Browse files
Options
Downloads
Patches
Plain Diff
Updated ANY signature of add_component
parent
e5678577
No related branches found
No related tags found
1 merge request
!18
Generic htm lwidget
Pipeline
#129962
failed
5 years ago
Stage: build
Stage: check
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
DESCRIPTION
+2
-2
2 additions, 2 deletions
DESCRIPTION
R/vis_objects.R
+15
-9
15 additions, 9 deletions
R/vis_objects.R
with
17 additions
and
11 deletions
DESCRIPTION
+
2
−
2
View file @
c29df689
...
...
@@ -21,9 +21,9 @@ Imports:
rmarkdown,
stringr,
glue,
ymlthis,
switchr
ymlthis
Suggests:
switchr,
highcharter,
plotly,
crosstalk,
...
...
This diff is collapsed.
Click to expand it.
R/vis_objects.R
+
15
−
9
View file @
c29df689
...
...
@@ -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
)
})
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