[MediaWiki-commits] [Gerrit] analytics...WDCM-Overview-Dashboard[master]: Overview Dashboard 17 Dec 2017

2017-12-17 Thread GoranSMilovanovic (Code Review)
GoranSMilovanovic has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398693 )

Change subject: Overview Dashboard 17 Dec 2017
..


Overview Dashboard 17 Dec 2017

Change-Id: I4fc52a454f172c578e650a1ea8ce56face3b7c3d
---
M server.R
M ui.R
2 files changed, 37 insertions(+), 11 deletions(-)

Approvals:
  GoranSMilovanovic: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/server.R b/server.R
index 86149ee..a2ddf2d 100644
--- a/server.R
+++ b/server.R
@@ -129,9 +129,27 @@
 ### --- Disconnect
 dbDisconnect(con)
 
+### --- Fetch update info
+setwd('/srv/shiny-server/WDCM_OverviewDashboard/update/')
+update <- read.csv('toLabsReport.csv', 
+   header = T,
+   check.names = F,
+   stringsAsFactors = F,
+   row.names = 1)
+
 ### --- shinyServer
 shinyServer(function(input, output, session) {
   
+  ### --- output: updateInfo
+  output$updateInfo <- renderText({
+date <- update$timeStamp[dim(update)[1]]
+date <- strsplit(as.character(date), split = " ", fixed = T)[[1]][1]
+date <- strsplit(date, split = "-", fixed = T)
+date[[1]][2] <- month.name[as.numeric(date[[1]][2])]
+date <- paste(unlist(date), collapse = " ")
+return(paste("Last update: ", date, "", sep = 
""))
+  })
+  
   ### --
   ### --- TAB: Overview
   ### --
diff --git a/ui.R b/ui.R
index 33bbfc8..fa722ef 100644
--- a/ui.R
+++ b/ui.R
@@ -26,19 +26,27 @@
 
 # - fluidRow Title
 fluidRow(
-  column(width = 12,
- h2('WDCM Overview Dashboard'),
- HTML('Wikidata Concepts 
Monitor')
+  column(width = 5,
+ fluidRow(
+   column(width = 3,
+  img(src = 'Wikidata-logo-en.png',
+  align = "left")
+   ),
+   column(width = 1),
+   column(width = 8,
+  h1('WDCM Overview Dashboard'),
+  HTML('Wikidata Concepts 
Monitor')
+   )
  )
-), # - fluidRow Title END
-
-# - fluidRow Logo
-fluidRow(
-  column(width = 12,
- img(src='Wikidata-logo-en.png', 
- align = "left")
+  ),
+  column(width = 7,
+ br(),
+ HTML('Interactive visualizations of 
Wikidata use by other Wikimedia projects.'),
+ HTML('https://www.wikidata.org/wiki/Wikidata:Wikidata_Concepts_Monitor; 
target="_blank">Visit the WDCM wiki page'),
+ HTML('Did you spot a bug, a missing 
label, or wrong data? https://www.wikidata.org/wiki/Wikidata:Wikidata_Concepts_Monitor/UserFeedback; 
target="_blank">Give us feedback here'),
+ htmlOutput('updateInfo')
   )
-), # - fluidRow END
+), # - fluidRow Title END
 
 # - hr()
 fluidRow(

-- 
To view, visit https://gerrit.wikimedia.org/r/398693
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4fc52a454f172c578e650a1ea8ce56face3b7c3d
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wmde/WDCM-Overview-Dashboard
Gerrit-Branch: master
Gerrit-Owner: GoranSMilovanovic 
Gerrit-Reviewer: GoranSMilovanovic 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] analytics...WDCM-Overview-Dashboard[master]: Overview Dashboard 17 Dec 2017

2017-12-17 Thread GoranSMilovanovic (Code Review)
GoranSMilovanovic has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398693 )

Change subject: Overview Dashboard 17 Dec 2017
..

Overview Dashboard 17 Dec 2017

Change-Id: I4fc52a454f172c578e650a1ea8ce56face3b7c3d
---
M server.R
M ui.R
2 files changed, 37 insertions(+), 11 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/analytics/wmde/WDCM-Overview-Dashboard 
refs/changes/93/398693/1

diff --git a/server.R b/server.R
index 86149ee..a2ddf2d 100644
--- a/server.R
+++ b/server.R
@@ -129,9 +129,27 @@
 ### --- Disconnect
 dbDisconnect(con)
 
+### --- Fetch update info
+setwd('/srv/shiny-server/WDCM_OverviewDashboard/update/')
+update <- read.csv('toLabsReport.csv', 
+   header = T,
+   check.names = F,
+   stringsAsFactors = F,
+   row.names = 1)
+
 ### --- shinyServer
 shinyServer(function(input, output, session) {
   
+  ### --- output: updateInfo
+  output$updateInfo <- renderText({
+date <- update$timeStamp[dim(update)[1]]
+date <- strsplit(as.character(date), split = " ", fixed = T)[[1]][1]
+date <- strsplit(date, split = "-", fixed = T)
+date[[1]][2] <- month.name[as.numeric(date[[1]][2])]
+date <- paste(unlist(date), collapse = " ")
+return(paste("Last update: ", date, "", sep = 
""))
+  })
+  
   ### --
   ### --- TAB: Overview
   ### --
diff --git a/ui.R b/ui.R
index 33bbfc8..fa722ef 100644
--- a/ui.R
+++ b/ui.R
@@ -26,19 +26,27 @@
 
 # - fluidRow Title
 fluidRow(
-  column(width = 12,
- h2('WDCM Overview Dashboard'),
- HTML('Wikidata Concepts 
Monitor')
+  column(width = 5,
+ fluidRow(
+   column(width = 3,
+  img(src = 'Wikidata-logo-en.png',
+  align = "left")
+   ),
+   column(width = 1),
+   column(width = 8,
+  h1('WDCM Overview Dashboard'),
+  HTML('Wikidata Concepts 
Monitor')
+   )
  )
-), # - fluidRow Title END
-
-# - fluidRow Logo
-fluidRow(
-  column(width = 12,
- img(src='Wikidata-logo-en.png', 
- align = "left")
+  ),
+  column(width = 7,
+ br(),
+ HTML('Interactive visualizations of 
Wikidata use by other Wikimedia projects.'),
+ HTML('https://www.wikidata.org/wiki/Wikidata:Wikidata_Concepts_Monitor; 
target="_blank">Visit the WDCM wiki page'),
+ HTML('Did you spot a bug, a missing 
label, or wrong data? https://www.wikidata.org/wiki/Wikidata:Wikidata_Concepts_Monitor/UserFeedback; 
target="_blank">Give us feedback here'),
+ htmlOutput('updateInfo')
   )
-), # - fluidRow END
+), # - fluidRow Title END
 
 # - hr()
 fluidRow(

-- 
To view, visit https://gerrit.wikimedia.org/r/398693
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4fc52a454f172c578e650a1ea8ce56face3b7c3d
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wmde/WDCM-Overview-Dashboard
Gerrit-Branch: master
Gerrit-Owner: GoranSMilovanovic 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits