From: Ben Soares Date: Wed, 28 Jun 2023 13:57:56 +0000 (+0100) Subject: Merge branch 'task/JAL-4001_Plausible_API' into improvement/JAL-3830_remove_dock_icon... X-Git-Tag: Release_2_11_3_0~8^2~30^2~8^2~1 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=630433b886aee11eae5b7ff09d24182b29772adb;hp=-c;p=jalview.git Merge branch 'task/JAL-4001_Plausible_API' into improvement/JAL-3830_remove_dock_icon_in_headless_mode --- 630433b886aee11eae5b7ff09d24182b29772adb diff --combined src/jalview/bin/Jalview.java index 1f86926,57f2575..38df53c --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@@ -633,8 -633,7 +633,7 @@@ public class Jalvie { headless = true; } - System.setProperty("http.agent", - "Jalview Desktop/" + Cache.getDefault("VERSION", "Unknown")); + System.setProperty("http.agent", HttpUtils.getUserAgent()); try { @@@ -823,11 -822,6 +822,11 @@@ } else { + // record usage stats if in headless mode + if (Cache.getDefault("USAGESTATS", false)) + { + Cache.initGoogleTracker(headlessArg); + } Jalview.exit("Successfully completed commands in headless mode", 0); } @@@ -1579,7 -1573,7 +1578,7 @@@ + "-questionnaire URL\tQueries the given URL for information about any Jalview user questionnaires.\n" + "-noquestionnaire\tTurn off questionnaire check.\n" + "-nonews\tTurn off check for Jalview news.\n" - + "-nousagestats\tTurn off google analytics tracking for this session.\n" + + "-nousagestats\tTurn off analytics tracking for this session.\n" + "-sortbytree OR -nosortbytree\tEnable or disable sorting of the given alignment by the given tree\n" // + // "-setprop PROPERTY=VALUE\tSet the given Jalview property, @@@ -1602,16 -1596,15 +1601,15 @@@ */ PromptUserConfig prompter = new PromptUserConfig(Desktop.desktop, "USAGESTATS", - MessageManager.getString("prompt.google_analytics_title"), - MessageManager.getString("prompt.google_analytics"), + MessageManager.getString("prompt.plausible_analytics_title"), + MessageManager.getString("prompt.plausible_analytics"), new Runnable() { @Override public void run() { - Console.debug( - "Initialising googletracker for usage stats."); - Cache.initGoogleTracker(); + Console.debug("Initialising analytics for usage stats."); + Cache.initAnalytics(); Console.debug("Tracking enabled."); } }, new Runnable() @@@ -1619,7 -1612,7 +1617,7 @@@ @Override public void run() { - Console.debug("Not enabling Google Tracking."); + Console.debug("Not enabling analytics."); } }, null, true); desktop.addDialogThread(prompter);