Skip to content

Commit

Permalink
sps updates no_render
Browse files Browse the repository at this point in the history
  • Loading branch information
lz100 committed Apr 22, 2021
1 parent 7efe963 commit 2270d8d
Show file tree
Hide file tree
Showing 130 changed files with 4,069 additions and 6,412 deletions.
3 changes: 2 additions & 1 deletion blogdown/md5sum.txt
Expand Up @@ -22,9 +22,10 @@
"content/en/sps/adv_features/app_security.Rmd" "316d7de8ff8f0f8ebf1cc4fcf1b9047a"
"content/en/sps/adv_features/config.Rmarkdown" "0bf3ce1dbfbabc23b335ab2316fc9c09"
"content/en/sps/adv_features/config.Rmd" "f924895bca86ed9328fd821931e6a3ec"
"content/en/sps/adv_features/database.Rmd" "e5269c5d9e1780532b8116d5843c2579"
"content/en/sps/adv_features/database.Rmd" "56953d35770c1c1ce4b7320a86a0c65e"
"content/en/sps/adv_features/debug.Rmd" "0aca84fb178355952987758b38f61593"
"content/en/sps/adv_features/login.Rmd" "80338a0d44223289b7ac3577f94041e3"
"content/en/sps/adv_features/overwritetabs.Rmd" "75850101d8d21cae8613413758c401be"
"content/en/sps/adv_features/sps_security.Rmd" "ed4993fa7c93789e93c332c52c644303"
"content/en/sps/adv_features/tabs.Rmarkdown" "fe5d1c5a26323e41ef5ec6acb93e8ecd"
"content/en/sps/adv_features/tabs.Rmd" "90362ef199db468ce49d09e19dca8fec"
Expand Down
Binary file added content/en/sps/adv_features/cicerone.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified content/en/sps/adv_features/config/sps.db
Binary file not shown.
2 changes: 2 additions & 0 deletions content/en/sps/adv_features/database.Rmd
Expand Up @@ -160,3 +160,5 @@ try({
## `spsAcount` class
This class is discussed in details in the [Accounts, login and admin](../login).



50 changes: 26 additions & 24 deletions content/en/sps/adv_features/database.md
Expand Up @@ -32,9 +32,9 @@ spsInit(app_path = app_path, overwrite = TRUE, open_files = FALSE)


```
## [SPS-DANGER] 2021-04-20 12:54:52 Done, Db created at '/tmp/RtmpOJVGEa/SPS_20210420/config/sps.db'. DO NOT share this file with others or upload to open access domains.
## [SPS-INFO] 2021-04-20 12:54:52 Key md5 0b4402aa760dff52851ca2cc0a46125f
## [SPS-INFO] 2021-04-20 12:54:52 SPS project setup done!
## [SPS-DANGER] 2021-04-22 15:45:04 Done, Db created at '/tmp/Rtmp3KQ3pG/SPS_20210422/config/sps.db'. DO NOT share this file with others or upload to open access domains.
## [SPS-INFO] 2021-04-22 15:45:04 Key md5 1d1f76c8eecddb382ee2db097d6edbe9
## [SPS-INFO] 2021-04-22 15:45:04 SPS project setup done!
```

You can see a database created on a SPS project initiation, you should see a message
Expand All @@ -55,7 +55,7 @@ mydb <- spsDb$new()
```

```
## [SPS-INFO] 2021-04-20 12:54:52 Created SPS database method container
## [SPS-INFO] 2021-04-22 15:45:04 Created SPS database method container
```

### create new db
Expand All @@ -67,9 +67,9 @@ try(file.remove("config/sps.db"))
## [1] TRUE
# create a new one
mydb$createDb()
## [SPS-INFO] 2021-04-20 12:54:52 Creating SPS db...
## [SPS-DANGER] 2021-04-20 12:54:53 Done, Db created at 'config/sps.db'. DO NOT share this file with others or upload to open access domains.
## [SPS-INFO] 2021-04-20 12:54:53 Key md5 64ebf9eaaecc16311b95fdb2a98d733c
## [SPS-INFO] 2021-04-22 15:45:04 Creating SPS db...
## [SPS-DANGER] 2021-04-22 15:45:04 Done, Db created at 'config/sps.db'. DO NOT share this file with others or upload to open access domains.
## [SPS-INFO] 2021-04-22 15:45:04 Key md5 6306a50abcf3c7618566911a793b0405
```

<p class="text-danger">If you create a new database, all information in the old database
Expand All @@ -84,7 +84,7 @@ mydb$queryValue("sps_meta")

```
## info value
## 1 creation_date 20210420125452
## 1 creation_date 20210422154504
```

```r
Expand All @@ -94,7 +94,7 @@ mydb$queryValue("sps_raw")

```
## info value
## 1 key blob[1.37 kB]
## 1 key blob[1.36 kB]
```

```r
Expand All @@ -104,8 +104,8 @@ mydb$queryValue("sps_account")

```
## account pass
## 1 admin c8f48db9ec1688ed213aeb94c5cd81faf6cdfb825f1deb7274eac3419a203a02
## 2 user aafcbc2569a9a7064e9c86889bb0d591fbccd292479027cdc7b6c015ddcdaa6f
## 1 admin bef2094c429fa5b0ff7a37abc6bf8dd31c29fa2acd783a2303935d2b8664ea21
## 2 user 12842a62c410af0f4b4dc866283a90f7b7c42c9d5ca0d0e1c812dca11021b052
## role
## 1 admin
## 2 user
Expand All @@ -119,7 +119,7 @@ mydb$queryInsert("sps_meta", value = "'new1', '1'")
```

```
## [SPS-INFO] 2021-04-20 12:54:53 Inerted 1 rows
## [SPS-INFO] 2021-04-22 15:45:04 Inerted 1 rows
```

Or pass in a vector:
Expand All @@ -129,7 +129,7 @@ mydb$queryInsert("sps_meta", value = c("'new2'", "'2'"))
```

```
## [SPS-INFO] 2021-04-20 12:54:53 Inerted 1 rows
## [SPS-INFO] 2021-04-22 15:45:04 Inerted 1 rows
```

```r
Expand All @@ -139,7 +139,7 @@ mydb$queryValue("sps_meta")

```
## info value
## 1 creation_date 20210420125452
## 1 creation_date 20210422154504
## 2 new1 1
## 3 new2 2
```
Expand All @@ -151,7 +151,7 @@ mydb$queryUpdate("sps_meta", value = '234', col = "value", WHERE = "info = 'new1
```

```
## [SPS-INFO] 2021-04-20 12:54:53 Updated 1 rows
## [SPS-INFO] 2021-04-22 15:45:04 Updated 1 rows
```

```r
Expand All @@ -161,7 +161,7 @@ mydb$queryValue("sps_meta")

```
## info value
## 1 creation_date 20210420125452
## 1 creation_date 20210422154504
## 2 new1 234
## 3 new2 2
```
Expand All @@ -173,7 +173,7 @@ mydb$queryDel("sps_meta", WHERE = "value = '234'")
```

```
## [SPS-INFO] 2021-04-20 12:54:53 Deleted 1 rows
## [SPS-INFO] 2021-04-22 15:45:05 Deleted 1 rows
```

```r
Expand All @@ -183,7 +183,7 @@ mydb$queryValue("sps_meta")

```
## info value
## 1 creation_date 20210420125452
## 1 creation_date 20210422154504
## 2 new2 2
```

Expand All @@ -195,8 +195,8 @@ Start by creating a class object

```r
my_ecpt <- spsEncryption$new()
## [SPS-INFO] 2021-04-20 12:54:53 Created SPS encryption method container
## [SPS-INFO] 2021-04-20 12:54:53 Default SPS-db found and is working
## [SPS-INFO] 2021-04-22 15:45:05 Created SPS encryption method container
## [SPS-INFO] 2021-04-22 15:45:05 Default SPS-db found and is working
```

### Get current key
Expand All @@ -209,7 +209,7 @@ my_ecpt$keyGet()

```
## [2048-bit rsa private key]
## md5: 64ebf9eaaecc16311b95fdb2a98d733c
## md5: 6306a50abcf3c7618566911a793b0405
```

```r
Expand All @@ -219,7 +219,7 @@ my_ecpt$keyGet()$pubkey

```
## [2048-bit rsa public key]
## md5: 64ebf9eaaecc16311b95fdb2a98d733c
## md5: 6306a50abcf3c7618566911a793b0405
```

### Change the encyption key
Expand All @@ -235,7 +235,7 @@ my_ecpt$keyChange()
```

```
## [SPS-DANGER] 2021-04-20 12:54:53
## [SPS-DANGER] 2021-04-22 15:45:05
## change this key will result all accounts' password failed to
## authenticate. You have to regenerate all password for all
## accounts. All encrypted file using the old key will fail to
Expand All @@ -251,7 +251,7 @@ my_ecpt$keyChange(confirm = TRUE)
```

```
## [SPS-INFO] 2021-04-20 12:54:53 md5 8b5d140803e82ecf0e55b7fe24171c38
## [SPS-INFO] 2021-04-22 15:45:05 md5 42e4b167ba388a9e797608eb4e466a18
```


Expand Down Expand Up @@ -284,3 +284,5 @@ readLines('test_decpt.txt')
## `spsAcount` class
This class is discussed in details in the [Accounts, login and admin](../login).



Binary file added content/en/sps/adv_features/default_ui.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2270d8d

Please sign in to comment.