Merge "[ONOS-7340]: Add 'Last Updated' Date to All TestON Result Wiki Graphs"
diff --git a/TestON/JenkinsFile/scripts/SCPFIntentInstallWithdrawRerouteLat.R b/TestON/JenkinsFile/scripts/SCPFIntentInstallWithdrawRerouteLat.R
index 037b6d4..6f67b0d 100644
--- a/TestON/JenkinsFile/scripts/SCPFIntentInstallWithdrawRerouteLat.R
+++ b/TestON/JenkinsFile/scripts/SCPFIntentInstallWithdrawRerouteLat.R
@@ -303,7 +303,6 @@
 xLabel <- xlab( "Scale" )
 yLabel <- ylab( "Latency (ms)" )
 fillLabel <- labs( fill="Type" )
-title <- ggtitle( chartTitle )
 imageWidth <- 15
 imageHeight <- 10
 imageDPI <- 200
@@ -313,7 +312,12 @@
                 legend.position="bottom",
                 legend.text=element_text( size=22 ),
                 legend.title = element_blank(),
-                legend.key.size = unit( 1.5, 'lines' ) )
+                legend.key.size = unit( 1.5, 'lines' ),
+                plot.subtitle = element_text( size=16, hjust=1.0 ) )
+
+subtitle <- paste( "Last Updated: ", format( Sys.time(), format = "%b %d, %Y at %I:%M %p %Z" ), sep="" )
+
+title <- labs( title = chartTitle, subtitle = subtitle )
 
 colors <- scale_fill_manual( values=c( "#F77670",
                                        "#619DFA",
diff --git a/TestON/JenkinsFile/scripts/SCPFLineGraph.R b/TestON/JenkinsFile/scripts/SCPFLineGraph.R
index d063d0a..8417188 100644
--- a/TestON/JenkinsFile/scripts/SCPFLineGraph.R
+++ b/TestON/JenkinsFile/scripts/SCPFLineGraph.R
@@ -231,7 +231,12 @@
                 legend.text = element_text( size=22 ),
                 legend.title = element_blank(),
                 legend.key.size = unit( 1.5, 'lines' ),
-                legend.direction = 'horizontal' )
+                legend.direction = 'horizontal',
+                plot.subtitle = element_text( size=16, hjust=1.0 ) )
+
+subtitle <- paste( "Last Updated: ", format( Sys.time(), format = "%b %d, %Y at %I:%M %p %Z" ), sep="" )
+
+title <- labs( title = title, subtitle = subtitle )
 
 # Colors used for the lines.
 # Note: graphs that have X lines will use the first X colors in this list.
@@ -243,7 +248,6 @@
                                         "#E500FF") ) # purple (not used)
 
 wrapLegend <- guides( color = guide_legend( nrow = 2, byrow = TRUE ) )
-title <- ggtitle( title )
 
 fundamentalGraphData <- mainPlot +
                         limitExpansion +
diff --git a/TestON/JenkinsFile/scripts/SCPFbatchFlowResp.R b/TestON/JenkinsFile/scripts/SCPFbatchFlowResp.R
index d90c53e..b86ef67 100644
--- a/TestON/JenkinsFile/scripts/SCPFbatchFlowResp.R
+++ b/TestON/JenkinsFile/scripts/SCPFbatchFlowResp.R
@@ -263,7 +263,10 @@
                 legend.position = "bottom",
                 legend.text = element_text( size = 22 ),
                 legend.title = element_blank(),
-                legend.key.size = unit( 1.5, 'lines' ) )
+                legend.key.size = unit( 1.5, 'lines' ),
+                plot.subtitle = element_text( size=16, hjust=1.0 ) )
+
+subtitle <- paste( "Last Updated: ", format( Sys.time(), format = "%b %d, %Y at %I:%M %p %Z" ), sep="" )
 
 barGraphFormat <- geom_bar( stat = "identity",
                             width = barWidth )
@@ -286,8 +289,8 @@
 
 xScaleConfig <- scale_x_continuous( breaks = postDataFrame$iterative,
                                     label = postDataFrame$date )
-title <- ggtitle( postChartTitle )
 
+title <- labs( title = postChartTitle, subtitle = subtitle )
 
 fundamentalGraphData <- mainPlot +
                         xScaleConfig +
@@ -358,7 +361,8 @@
 
 xScaleConfig <- scale_x_continuous( breaks = delDataFrame$iterative,
                                     label = delDataFrame$date )
-title <- ggtitle( delChartTitle )
+
+title <- labs( title = delChartTitle, subtitle = subtitle )
 
 fundamentalGraphData <- mainPlot +
                         xScaleConfig +
diff --git a/TestON/JenkinsFile/scripts/SCPFcbench.R b/TestON/JenkinsFile/scripts/SCPFcbench.R
index 0a28024..9d1972a 100644
--- a/TestON/JenkinsFile/scripts/SCPFcbench.R
+++ b/TestON/JenkinsFile/scripts/SCPFcbench.R
@@ -204,9 +204,12 @@
 theme <- theme( plot.title = element_text( hjust = 0.5, size = 32, face = 'bold' ),
                 legend.position = "bottom",
                 legend.text = element_text( size = 18, face = "bold" ),
-                legend.title = element_blank() )
+                legend.title = element_blank(),
+                plot.subtitle = element_text( size=16, hjust=1.0 ) )
 
-title <- ggtitle( chartTitle )
+subtitle <- paste( "Last Updated: ", format( Sys.time(), format = "%b %d, %Y at %I:%M %p %Z" ), sep="" )
+
+title <- labs( title = chartTitle, subtitle = subtitle )
 
 fundamentalGraphData <- mainPlot +
                         xScaleConfig +
diff --git a/TestON/JenkinsFile/scripts/SCPFflowTp1g.R b/TestON/JenkinsFile/scripts/SCPFflowTp1g.R
index 3d3a95e..ffb91a9 100644
--- a/TestON/JenkinsFile/scripts/SCPFflowTp1g.R
+++ b/TestON/JenkinsFile/scripts/SCPFflowTp1g.R
@@ -258,8 +258,12 @@
 
 theme <- theme( plot.title = element_text( hjust = 0.5,
                                            size = 32,
-                                           face = 'bold' ) )
-title <- ggtitle( chartTitle )
+                                           face = 'bold' ),
+                plot.subtitle = element_text( size=16, hjust=1.0 ) )
+
+subtitle <- paste( "Last Updated: ", format( Sys.time(), format = "%b %d, %Y at %I:%M %p %Z" ), sep="" )
+
+title <- labs( title = chartTitle, subtitle = subtitle )
 
 # Store plot configurations as 1 variable
 fundamentalGraphData <- mainPlot +
diff --git a/TestON/JenkinsFile/scripts/SCPFhostLat.R b/TestON/JenkinsFile/scripts/SCPFhostLat.R
index 90781a3..b291551 100644
--- a/TestON/JenkinsFile/scripts/SCPFhostLat.R
+++ b/TestON/JenkinsFile/scripts/SCPFhostLat.R
@@ -193,8 +193,12 @@
 xLabel <- xlab( "Scale" )
 yLabel <- ylab( "Latency (ms)" )
 fillLabel <- labs( fill="Type" )
-theme <- theme( plot.title = element_text( hjust = 0.5, size = 32, face ='bold' ) )
-title <- ggtitle( chartTitle )
+theme <- theme( plot.title = element_text( hjust = 0.5, size = 32, face ='bold' ),
+                plot.subtitle = element_text( size=16, hjust=1.0 ) )
+
+subtitle <- paste( "Last Updated: ", format( Sys.time(), format = "%b %d, %Y at %I:%M %p %Z" ), sep="" )
+
+title <- labs( title = chartTitle, subtitle = subtitle )
 errorBarColor <- rgb( 140, 140, 140, maxColorValue = 255 )
 imageWidth <- 15
 imageHeight <- 10
diff --git a/TestON/JenkinsFile/scripts/SCPFintentEventTp.R b/TestON/JenkinsFile/scripts/SCPFintentEventTp.R
index 0b168ba..e9a9dc4 100644
--- a/TestON/JenkinsFile/scripts/SCPFintentEventTp.R
+++ b/TestON/JenkinsFile/scripts/SCPFintentEventTp.R
@@ -251,7 +251,10 @@
 theme <- theme( plot.title = element_text( hjust = 0.5, size = 32, face = 'bold' ),
                 legend.position = "bottom",
                 legend.text = element_text( size = 18, face = "bold" ),
-                legend.title = element_blank() )
+                legend.title = element_blank(),
+                plot.subtitle = element_text( size=16, hjust=1.0 ) )
+
+subtitle <- paste( "Last Updated: ", format( Sys.time(), format = "%b %d, %Y at %I:%M %p %Z" ), sep="" )
 
 values <- geom_text( aes( x = dataFrame$scale,
                           y = dataFrame$throughput + 0.03 * max( dataFrame$throughput ),
@@ -280,7 +283,7 @@
                             width = width,
                             fill = "#169EFF" )
 
-title <- ggtitle( chartTitle )
+title <- labs( title = chartTitle, subtitle = subtitle )
 
 result <- fundamentalGraphData +
           barGraphFormat +
diff --git a/TestON/JenkinsFile/scripts/SCPFmastershipFailoverLat.R b/TestON/JenkinsFile/scripts/SCPFmastershipFailoverLat.R
index 30f7bca..9a61592 100644
--- a/TestON/JenkinsFile/scripts/SCPFmastershipFailoverLat.R
+++ b/TestON/JenkinsFile/scripts/SCPFmastershipFailoverLat.R
@@ -202,7 +202,10 @@
                 legend.position = "bottom",
                 legend.text = element_text( size=22 ),
                 legend.title = element_blank(),
-                legend.key.size = unit( 1.5, 'lines' ) )
+                legend.key.size = unit( 1.5, 'lines' ),
+                plot.subtitle = element_text( size=16, hjust=1.0 ) )
+
+subtitle <- paste( "Last Updated: ", format( Sys.time(), format = "%b %d, %Y at %I:%M %p %Z" ), sep="" )
 
 barColors <- scale_fill_manual( values=c( "#F77670",
                                           "#619DFA" ) )
@@ -229,7 +232,7 @@
 
 errorBarColor <- rgb( 140, 140, 140, maxColorValue=255 )
 
-title <- ggtitle( chartTitle )
+title <- labs( title = chartTitle, subtitle = subtitle )
 
 fundamentalGraphData <- mainPlot +
                         xScaleConfig +
@@ -295,7 +298,7 @@
 
 print( "Generating fundamental graph data for the stacked bar graph." )
 
-title <- ggtitle( chartTitle )
+title <- labs( title = chartTitle, subtitle = subtitle )
 
 fundamentalGraphData <- mainPlot +
                         xScaleConfig +
diff --git a/TestON/JenkinsFile/scripts/SCPFportLat.R b/TestON/JenkinsFile/scripts/SCPFportLat.R
index 4637072..3398b0b 100644
--- a/TestON/JenkinsFile/scripts/SCPFportLat.R
+++ b/TestON/JenkinsFile/scripts/SCPFportLat.R
@@ -250,7 +250,10 @@
                 legend.position="bottom",
                 legend.text=element_text( size=22 ),
                 legend.title = element_blank(),
-                legend.key.size = unit( 1.5, 'lines' ) )
+                legend.key.size = unit( 1.5, 'lines' ),
+                plot.subtitle = element_text( size=16, hjust=1.0 ) )
+
+subtitle <- paste( "Last Updated: ", format( Sys.time(), format = "%b %d, %Y at %I:%M %p %Z" ), sep="" )
 
 colors <- scale_fill_manual( values=c( "#F77670",
                                        "#619DFA",
@@ -274,7 +277,7 @@
 
 print( "Generating fundamental graph data (Port Up Latency)." )
 
-title <- ggtitle( "Port Up Latency" )
+title <- labs( title = "Port Up Latency", subtitle = subtitle )
 
 fundamentalGraphData <- mainPlot +
                         xScaleConfig +
@@ -348,7 +351,7 @@
 
 print( "Generating fundamental graph data (Port Down Latency)." )
 
-title <- ggtitle( "Port Down Latency" )
+title <- labs( title = "Port Down Latency", subtitle = subtitle )
 
 fundamentalGraphData <- mainPlot +
                         xScaleConfig +
diff --git a/TestON/JenkinsFile/scripts/SCPFscaleTopo.R b/TestON/JenkinsFile/scripts/SCPFscaleTopo.R
index e69a383..f6da0d2 100644
--- a/TestON/JenkinsFile/scripts/SCPFscaleTopo.R
+++ b/TestON/JenkinsFile/scripts/SCPFscaleTopo.R
@@ -208,7 +208,10 @@
                 legend.position = "bottom",
                 legend.text = element_text( size=22 ),
                 legend.title = element_blank(),
-                legend.key.size = unit( 1.5, 'lines' ) )
+                legend.key.size = unit( 1.5, 'lines' ),
+                plot.subtitle = element_text( size=16, hjust=1.0 ) )
+
+subtitle <- paste( "Last Updated: ", format( Sys.time(), format = "%b %d, %Y at %I:%M %p %Z" ), sep="" )
 
 values <- geom_text( aes( x = dataFrame$iterative,
                           y = sum + 0.02 * max( sum ),
@@ -220,7 +223,7 @@
 
 wrapLegend <- guides( fill = guide_legend( nrow=2, byrow=TRUE ) )
 
-title <- ggtitle( chartTitle, "" )
+title <- labs( title = chartTitle, subtitle = subtitle )
 
 # Store plot configurations as 1 variable
 fundamentalGraphData <- mainPlot +
diff --git a/TestON/JenkinsFile/scripts/SCPFscalingMaxIntents.R b/TestON/JenkinsFile/scripts/SCPFscalingMaxIntents.R
index 21dd70f..045f5e7 100644
--- a/TestON/JenkinsFile/scripts/SCPFscalingMaxIntents.R
+++ b/TestON/JenkinsFile/scripts/SCPFscalingMaxIntents.R
@@ -223,13 +223,17 @@
                 legend.position = "bottom",
                 legend.text = element_text( size=22 ),
                 legend.title = element_blank(),
-                legend.key.size = unit( 1.5, 'lines' ) )
+                legend.key.size = unit( 1.5, 'lines' ),
+                plot.subtitle = element_text( size=16, hjust=1.0 ) )
+
+subtitle <- paste( "Last Updated: ", format( Sys.time(), format = "%b %d, %Y at %I:%M %p %Z" ), sep="" )
 
 colors <- scale_fill_manual( values = c( "#F77670",
                                          "#619DFA" ) )
 
 wrapLegend <- guides( fill = guide_legend( nrow = 1, byrow = TRUE ) )
-title <- ggtitle( chartTitle )
+
+title <- labs( title = chartTitle, subtitle = subtitle )
 
 fundamentalGraphData <- mainPlot +
                         xScaleConfig +
diff --git a/TestON/JenkinsFile/scripts/SCPFswitchLat.R b/TestON/JenkinsFile/scripts/SCPFswitchLat.R
index de506a3..3535a5a 100644
--- a/TestON/JenkinsFile/scripts/SCPFswitchLat.R
+++ b/TestON/JenkinsFile/scripts/SCPFswitchLat.R
@@ -256,7 +256,10 @@
                 legend.position = "bottom",
                 legend.text = element_text( size = 22 ),
                 legend.title = element_blank(),
-                legend.key.size = unit( 1.5, 'lines' ) )
+                legend.key.size = unit( 1.5, 'lines' ),
+                plot.subtitle = element_text( size=16, hjust=1.0 ) )
+
+subtitle <- paste( "Last Updated: ", format( Sys.time(), format = "%b %d, %Y at %I:%M %p %Z" ), sep="" )
 
 # ----------------------------
 # Switch Up Generate Main Plot
@@ -276,7 +279,7 @@
 
 print( "Generating fundamental graph data (Switch Up Latency)." )
 
-title <- ggtitle( "Switch Up Latency" )
+title <- labs( title = "Switch Up Latency", subtitle = subtitle )
 
 fundamentalGraphData <- mainPlot +
                         xScaleConfig +
@@ -352,7 +355,7 @@
                                        "#619DFA",       # Blue
                                        "#18BA48" ) )    # Green
 
-title <- ggtitle( "Switch Down Latency" )
+title <- labs( title = "Switch Down Latency", subtitle = subtitle )
 
 fundamentalGraphData <- mainPlot +
                         xScaleConfig +
diff --git a/TestON/JenkinsFile/scripts/testCaseGraphGenerator.R b/TestON/JenkinsFile/scripts/testCaseGraphGenerator.R
index 1938ceb..5671a38 100644
--- a/TestON/JenkinsFile/scripts/testCaseGraphGenerator.R
+++ b/TestON/JenkinsFile/scripts/testCaseGraphGenerator.R
@@ -268,9 +268,12 @@
                 legend.position = "bottom",
                 legend.text = element_text( size = 22 ),
                 legend.title = element_blank(),
-                legend.key.size = unit( 1.5, 'lines' ) )
+                legend.key.size = unit( 1.5, 'lines' ),
+                plot.subtitle = element_text( size=16, hjust=1.0 ) )
 
-title <- ggtitle( title )
+subtitle <- paste( "Last Updated: ", format( Sys.time(), format = "%b %d, %Y at %I:%M %p %Z" ), sep="" )
+
+title <- labs( title = title, subtitle = subtitle )
 
 # Store plot configurations as 1 variable
 fundamentalGraphData <- mainPlot +
diff --git a/TestON/JenkinsFile/scripts/testCategoryBuildStats.R b/TestON/JenkinsFile/scripts/testCategoryBuildStats.R
index c0211bc..0b4d4b5 100644
--- a/TestON/JenkinsFile/scripts/testCategoryBuildStats.R
+++ b/TestON/JenkinsFile/scripts/testCategoryBuildStats.R
@@ -263,9 +263,12 @@
                 legend.position = "bottom",
                 legend.text = element_text( size = 22 ),
                 legend.title = element_blank(),
-                legend.key.size = unit( 1.5, 'lines' ) )
+                legend.key.size = unit( 1.5, 'lines' ),
+                plot.subtitle = element_text( size=16, hjust=1.0 ) )
 
-title <- ggtitle( title )
+subtitle <- paste( "Last Updated: ", format( Sys.time(), format = "%b %d, %Y at %I:%M %p %Z" ), sep="" )
+
+title <- labs( title = title, subtitle = subtitle )
 
 # Store plot configurations as 1 variable
 fundamentalGraphData <- mainPlot +
diff --git a/TestON/JenkinsFile/scripts/testCategoryTrend.R b/TestON/JenkinsFile/scripts/testCategoryTrend.R
index 7552f65..33664b0 100644
--- a/TestON/JenkinsFile/scripts/testCategoryTrend.R
+++ b/TestON/JenkinsFile/scripts/testCategoryTrend.R
@@ -271,9 +271,12 @@
                 legend.position = "bottom",
                 legend.text = element_text( size = 22 ),
                 legend.title = element_blank(),
-                legend.key.size = unit( 1.5, 'lines' ) )
+                legend.key.size = unit( 1.5, 'lines' ),
+                plot.subtitle = element_text( size=16, hjust=1.0 ) )
 
-title <- ggtitle( title )
+subtitle <- paste( "Last Updated: ", format( Sys.time(), format = "%b %d, %Y at %I:%M %p %Z" ), sep="" )
+
+title <- labs( title = title, subtitle = subtitle )
 
 # Store plot configurations as 1 variable
 fundamentalGraphData <- mainPlot +