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
1
Merged
arsenij.ustjanzew
requested to merge
genericHTMLwidget
into
master
4 years ago
Overview
2
Commits
5
Pipelines
4
Changes
1
Expand
0
0
Merge request reports
Viewing commit
65cbb1b6
Prev
Next
Show latest version
1 file
+
5
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
65cbb1b6
removed default value and added warning if the package name could not be determined.
· 65cbb1b6
arsenij.ustjanzew
authored
4 years ago
R/vis_objects.R
+
5
−
3
Options
@@ -5,7 +5,7 @@
#' @param package The name of the R package that defines the class(object).
#' @param page The name of the page to add the object to.
#' @param title An optional component title.
add_vis_object
<-
function
(
dashboard
,
object
,
package
=
NULL
,
page
=
"default"
,
title
=
NULL
,
...
){
add_vis_object
<-
function
(
dashboard
,
object
,
package
,
page
=
"default"
,
title
=
NULL
,
...
){
sanitised_page
<-
i2dash
:::
.create_page_name
(
page
)
if
(
!
(
sanitised_page
%in%
names
(
dashboard
@
pages
)))
{
warning
(
sprintf
(
"i2dashboard does not contain a page named '%s'"
,
sanitised_page
))
@@ -17,8 +17,6 @@ add_vis_object <- function(dashboard, object, package = NULL, page = "default",
return
(
dashboard
)
}
if
(
is.null
(
package
))
package
<-
"unknown package name"
# Create random component for RDS filename
component_id
<-
paste0
(
"obj_"
,
stringi
::
stri_rand_strings
(
1
,
6
))
@@ -71,5 +69,9 @@ setMethod("add_component",
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
)
}
add_vis_object
(
dashboard
,
component
,
package
,
page
,
title
,
...
)
})
Loading