Compare commits
2 Commits
5a021b7e8f
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| c50a259541 | |||
| 6cf76641ed |
20
.Rprofile
20
.Rprofile
@@ -1 +1,21 @@
|
||||
source("renv/activate.R")
|
||||
|
||||
|
||||
(function() {
|
||||
|
||||
paths <- c(
|
||||
"FORM_AUTH_ENABLED",
|
||||
"FORM_VERSION",
|
||||
"FORM_TITLE"
|
||||
)
|
||||
|
||||
lines <- paths[Sys.getenv(paths) == ""]
|
||||
|
||||
if (length(lines) > 0) {
|
||||
cli::cli_h3("Настройка путей окружения")
|
||||
cli::cli_code(paste0(lines, "="))
|
||||
cli::cli_inform(c(
|
||||
"i" = "Для нормальной работы скриптов добавьте в {.file .Renviron}:"
|
||||
))
|
||||
}
|
||||
})()
|
||||
|
||||
10
app.R
10
app.R
@@ -118,9 +118,9 @@ server <- function(input, output, session) {
|
||||
if (AUTH_ENABLED) {
|
||||
reactiveValuesToList(res_auth)
|
||||
if (res_auth$admin) {
|
||||
print("admin")
|
||||
# print("admin")
|
||||
} else {
|
||||
print("not_admin")
|
||||
# print("not_admin")
|
||||
showing_buttons <- FALSE
|
||||
}
|
||||
}
|
||||
@@ -234,8 +234,8 @@ server <- function(input, output, session) {
|
||||
) {
|
||||
|
||||
nested_key_id <- mhcs()$get_key_id(table_name)
|
||||
input_types <- unname(id_and_types_list)
|
||||
input_ids <- names(id_and_types_list)
|
||||
input_types <- unname(id_and_types_list)
|
||||
input_ids <- names(id_and_types_list)
|
||||
|
||||
if (missing(ns)) ns <- NULL
|
||||
|
||||
@@ -1138,7 +1138,7 @@ server <- function(input, output, session) {
|
||||
append = TRUE
|
||||
)
|
||||
|
||||
message <- glue::glue("Данные таблицы '{table_name}' успешно обновлены")
|
||||
message <- glue::glue("Данные таблицы '{table_name}' успешно обновлены (добавлено {nrow(df)} записей)")
|
||||
showNotification(
|
||||
message,
|
||||
type = "message"
|
||||
|
||||
Binary file not shown.
@@ -5,7 +5,7 @@ set_global_options = function(
|
||||
APP.DEBUG = FALSE,
|
||||
# APP.FILE_DB = fs::path("data.sqlite"),
|
||||
shiny.host = "127.0.0.1",
|
||||
shiny.port = 1337,
|
||||
shiny.port = 1338,
|
||||
...
|
||||
) {
|
||||
options(
|
||||
|
||||
@@ -263,7 +263,8 @@ update_forms_with_data = function(
|
||||
local_delimeter = getOption("SYMBOL_DELIM"),
|
||||
ns
|
||||
) {
|
||||
|
||||
|
||||
options(box.path = here::here())
|
||||
box::use(modules/data_manipulations[is_this_empty_value])
|
||||
|
||||
# print("-----------------")
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# SETUP AUTH =============================
|
||||
# Init DB using credentials data
|
||||
credentials <- data.frame(
|
||||
user = c("admin", "user"),
|
||||
user = c("admin", "user"),
|
||||
password = c("admin", "user"),
|
||||
# password will automatically be hashed
|
||||
admin = c(TRUE, FALSE),
|
||||
|
||||
Reference in New Issue
Block a user