Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include build date information in Image creation window #660

Open
hernanmd opened this issue Jan 24, 2024 · 6 comments
Open

Include build date information in Image creation window #660

hernanmd opened this issue Jan 24, 2024 · 6 comments

Comments

@hernanmd
Copy link
Contributor

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
Copy link
Contributor Author

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

@demarey
Copy link
Contributor

demarey commented Jan 30, 2024

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/)

@hernanmd
Copy link
Contributor Author

hernanmd commented Jan 30, 2024

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/)
modern HTTP web server index for Apache httpd, lighttpd, nginx and Cherokee

@demarey
Copy link
Contributor

demarey commented Jan 31, 2024

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.

@hernanmd
Copy link
Contributor Author

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)"'
	}
]

@demarey
Copy link
Contributor

demarey commented Feb 1, 2024

Are you updating the sources.list by hand?

yes. but your request looks related to #667

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants