Skip to content

Commit

Permalink
OF-2892: admin console Available Plugins page: show releaseDate in IS…
Browse files Browse the repository at this point in the history
…O and store it
  • Loading branch information
stokito authored and Fishbowler committed Nov 11, 2024
1 parent 7a29a7c commit dfe92df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
public class AvailablePlugin extends PluginMetadata
{
private static final Logger Log = LoggerFactory.getLogger( AvailablePlugin.class );
private static final DateFormat RELEASE_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd");
private static final DateFormat RELEASE_DATE_DISPLAY_FORMAT = DateFormat.getDateInstance(DateFormat.MEDIUM);

/**
* URL from where the latest version of the plugin can be downloaded.
Expand Down Expand Up @@ -141,15 +139,7 @@ public static AvailablePlugin getInstance( Element plugin )
minJavaVersion = new JavaSpecVersion( minJavaVersionValue );
}

String releaseDate = null;
final String releaseDateString = plugin.attributeValue("releaseDate");
if( releaseDateString!= null) {
try {
releaseDate = RELEASE_DATE_DISPLAY_FORMAT.format(RELEASE_DATE_FORMAT.parse(releaseDateString));
} catch (final ParseException e) {
Log.warn("Unexpected exception parsing release date: " + releaseDateString, e);
}
}
final String releaseDate = plugin.attributeValue("releaseDate");

long fileSize = -1;
String fileSizeValue = plugin.attributeValue("fileSize");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,7 @@ private void saveAvailablePluginsInfo() {
Element component = xml.addElement("plugin");
component.addAttribute("name", plugin.getName());
component.addAttribute("latest", plugin.getVersion() != null ? plugin.getVersion().getVersionString() : null);
component.addAttribute("releaseDate", plugin.getReleaseDate());
component.addAttribute("changelog", plugin.getChangelog() != null ? plugin.getChangelog().toExternalForm() : null );
component.addAttribute("url", plugin.getDownloadURL() != null ? plugin.getDownloadURL().toExternalForm() : null );
component.addAttribute("author", plugin.getAuthor());
Expand Down

0 comments on commit dfe92df

Please sign in to comment.