pharo-launcher icon indicating copy to clipboard operation
pharo-launcher copied to clipboard

Include build date information in Image creation window

Open hernanmd opened this issue 1 year ago • 6 comments

Describe the request

When the "Image creation" window opens, a list of Template category appears. When you click on an item, a list of "templates" builds appears. Currently the build number is displayed, but it is not possible to know what date it corresponds to, or the time elapsed since the creation of a build.

Expected behavior

It would be useful to have a column with date information, so that you can choose a build "from a week ago" or similar.

Screenshots

Screenshot 2024-01-24 at 16 33 29

hernanmd avatar Jan 24 '24 15:01 hernanmd

I could do it but it takes some time since it has to get all template headers.

Screenshot 2024-01-30 at 14 01 00

I will check how to cache this info

hernanmd avatar Jan 30 '24 13:01 hernanmd

The listing comes from https://files.pharo.org/image/120/ and there is already the timestamp. It looks like it is doable without extra load. curl https://files.pharo.org/image/120/

index styled with h5ai 0.22.1 (http://larsjung.de/h5ai/)

demarey avatar Jan 30 '24 13:01 demarey

The listing comes from https://files.pharo.org/image/120/ and there is already the timestamp. It looks like it is doable without extra load. curl https://files.pharo.org/image/120/

**index · styled with h5ai 0.22.1 (http://larsjung.de/h5ai/)**index styled with h5ai 0.22.1 (http://larsjung.de/h5ai/)

I'm not sure parsing the page content is very reliable, it would need to parse the HTML and if the page changes for whatever reason, it would break PL.

But also I couldn't find which method is the one to hook if I wanted to do that (after clicking New).

index styled with h5ai 0.22.1 (http://larsjung.de/h5ai/)
h5ai · modern HTTP web server index for Apache httpd, lighttpd, nginx and Cherokee · larsjung.de
modern HTTP web server index for Apache httpd, lighttpd, nginx and Cherokee

hernanmd avatar Jan 30 '24 15:01 hernanmd

You can check in PhLHTTPListingTemplateGroup>>#templatesAndGroups Content of the web page is already downloaded. The regex, defined in the sources.list file, has to be updated to capture the date if any and used to produce the template.

demarey avatar Jan 31 '24 08:01 demarey

You can check in PhLHTTPListingTemplateGroup>>#templatesAndGroups Content of the web page is already downloaded. The regex, defined in the sources.list file, has to be updated to capture the date if any and used to produce the template.

Are you updating the sources.list by hand? Let me know if I should directy commit to update the regex from the file. Because I evaluated in the dev branch:

PhLPharoTemplateSources generateSourcesFile.

And it does not generate the entries after Pharo 7.0. This is the output:

OrderedCollection [
	PhLTemplateSource {
		#type : #Cache,
		#name : 'Templates'
	},
	PhLTemplateSource {
		#type : #URLGroup,
		#name : 'Pharo Mooc',
		#templates : [
			PhLTemplateSource {
				#type : #URL,
				#name : 'Pharo Mooc',
				#url : 'http://mooc.pharo.org/image/PharoWeb.zip'
			}
		]
	},
	PhLTemplateSource {
		#type : #URLGroup,
		#name : 'Official distributions',
		#templates : [
			PhLTemplateSource {
				#type : #URL,
				#name : 'Pharo 7.0 - 32bit (development version)',
				#url : 'http://files.pharo.org/image/70/latest.zip'
			},
			PhLTemplateSource {
				#type : #URL,
				#name : 'Pharo 7.0 - 64bit (development version)',
				#url : 'http://files.pharo.org/image/70/latest-64.zip'
			},
			PhLTemplateSource {
				#type : #URL,
				#name : 'Pharo 6.1 - 32bit (stable)',
				#url : 'http://files.pharo.org/image/60/latest.zip'
			},
			PhLTemplateSource {
				#type : #URL,
				#name : 'Pharo 6.1 - 64bit (tech preview)',
				#url : 'http://files.pharo.org/image/60/latest-64.zip'
			},
			PhLTemplateSource {
				#type : #URL,
				#name : 'Pharo 5.0',
				#url : 'http://files.pharo.org/image/50/latest.zip'
			},
			PhLTemplateSource {
				#type : #URL,
				#name : 'Moose Suite 6.1 (beta)',
				#url : 'https://ci.inria.fr/moose/job/moose-6.1/lastSuccessfulBuild/artifact/moose-6.1.zip'
			},
			PhLTemplateSource {
				#type : #URL,
				#name : 'Moose Suite 6.0 (stable)',
				#url : 'https://ci.inria.fr/moose/job/moose-6.0/lastSuccessfulBuild/artifact/moose-6.0.zip'
			}
		],
		#expanded : true
	},
	PhLTemplateSource {
		#type : #URLGroup,
		#name : 'Deprecated distributions',
		#templates : [
			PhLTemplateSource {
				#type : #URL,
				#name : 'Pharo 4.0',
				#url : 'http://files.pharo.org/image/40/latest.zip'
			},
			PhLTemplateSource {
				#type : #URL,
				#name : 'Pharo 3.0',
				#url : 'http://files.pharo.org/image/30/latest.zip'
			},
			PhLTemplateSource {
				#type : #URL,
				#name : 'Pharo 2.0',
				#url : 'http://files.pharo.org/image/20/latest.zip'
			},
			PhLTemplateSource {
				#type : #URL,
				#name : 'Moose Suite 5.1 (old stable)',
				#url : 'https://ci.inria.fr/moose/job/moose-5.1/lastSuccessfulBuild/artifact/moose-5.1.zip'
			},
			PhLTemplateSource {
				#type : #URL,
				#name : 'Moose Suite 5.0',
				#url : 'http://moosetechnology.org/res/download/moose_image_5_0.zip'
			}
		]
	},
	PhLTemplateSource {
		#type : #JenkinsServer,
		#name : 'Pharo Contribution Jenkins',
		#url : 'https://ci.inria.fr/pharo-contribution'
	},
	PhLTemplateSource {
		#type : #JenkinsServer,
		#name : 'Moose Jenkins',
		#url : 'https://ci.inria.fr/moose'
	},
	PhLTemplateSource {
		#type : #HttpListing,
		#name : 'Pharo 6.0 (stable)',
		#url : 'http://files.pharo.org/image/60/'
	},
	PhLTemplateSource {
		#type : #HttpListing,
		#name : 'Pharo 7.0 (development version)',
		#url : 'http://files.pharo.org/image/70/',
		#filterPattern : 'href="(Pharo-?7.0.0-(alpha|rc\\d+).build.[^"]*.zip)"'
	}
]

hernanmd avatar Jan 31 '24 13:01 hernanmd

Are you updating the sources.list by hand?

yes. but your request looks related to #667

demarey avatar Feb 01 '24 14:02 demarey