-
Notifications
You must be signed in to change notification settings - Fork 410
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
Add more info on deployed version like commit sha date etc #7934
Comments
@offtherailz @allyoucanmap @tdipisa let's discuss on how you would like do this i don't have preferences, it can even be a flag button in the footer with a popover |
@MV88 These seems more information for debugging purposes so I would prefer a separate html compiled during build phase instead of a react component, maybe using html replacement plugin in webpack.. |
@allyoucanmap it's just about to know which commit is effectively deployed I'm ok also on your proposal, |
I think we could create the html file on the fly with a node script to avoid to update project |
@allyoucanmap anyway I'm open to any proposal |
yes, it seems so anyway my it's only a proposal based on the description |
probably the script is the best option because is more portable |
I did not test it but I mean something like this const path = require('path');
const fs = require('fs-extra');
const { GitRevisionPlugin } = require('git-revision-webpack-plugin');
const gitRevPlugin = new GitRevisionPlugin({
branchCommand: 'log -n1 --format=format:"Message: %s%nCommit: %H%nDate: %aD%nAuthor: %an"'
});
const versionHtmlFileDestination = path.join('path', 'to', 'dist', 'version.html');
const __COMMITHASH__ = gitRevPlugin.commithash();
const __COMMIT_DATA__ = gitRevPlugin.branch()
.replace("Message:", "<strong>Message:</strong>")
.replace("Author:", "<br/><strong>Author:</strong>")
.replace("Date:", "<br/><strong>Date:</strong>")
.replace("Commit:", "<br/><strong>Commit:</strong>");
const htmlContent = `
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<style>
</style>
</head>
<body>
<ul class="version">
<li>
<span class="value-git commit-data">
${__COMMIT_DATA__}
</span>
</li>
<li>
<span class="label-git">
GITHUB:
</span>
<span class="value-git link-github">
<a href="https://github.com/geosolutions-it/webmapper-halliburton/tree/${__COMMITHASH__}" target="_blank" >Open github tree in a new tab </a>
</span>
</li>
</ul>
</body>
</html>
`;
fs.writeFileSync(versionHtmlFileDestination, htmlContent); |
I would like to have a kind of Version plugin in options that may opens a modal window with relevantinfo or improve what we currently already have in Settings. In the first option we should clean up the Settings part. |
@tdipisa @offtherailz I can suggest that these info can be shown in the footer in a panel (no modal) opened by a click on a button similarly on what we do for CRS selector plugin |
As agreed with Tobia I would like to do as follows:
you can take some inspiration from here |
if you can't access the link these are the needed chagges for the first point package.json
webpack-config.json or buildConfig const { GitRevisionPlugin } = require('git-revision-webpack-plugin');
const DefinePlugin = require("webpack/lib/DefinePlugin");
const gitRevPlugin = new GitRevisionPlugin({
branchCommand: 'log -n1 --format=format:"Message: %s%nCommit: %H%nDate: %aD%nAuthor: %an"'
});
[
extractThemesPlugin,
ModuleFederationPlugin,
new DefinePlugin({
__COMMITHASH__: JSON.stringify(gitRevPlugin.commithash()),
__COMMIT_DATA__: JSON.stringify(gitRevPlugin.branch())
})
], example of usage
button info
|
@barema4 after a review of the current implementation it would be better if we leverage on the About for what is requested in this issue and we remove the version plugin completely from MS. Below is what we can do in my opinion: Then, the About plugin should be also added to the Burger Menu of both dashboards and geostories @MV88 @allyoucanmap let me know your thoughts |
@tdipisa sounds good to me as we agreed in our internal call |
…lugin (geosolutions-it#8504) * geosolutions-it#7934 refactor to version plugin, moving it to About plugin * update migration guideline # Conflicts: # web/client/hooks/useModulePlugins.js # web/client/plugins/Version.jsx # web/client/product/plugins.js
…gration guideline (geosolutions-it#8709)
Description
In a different project I've implemented a specific page called version that shows the following
I would like to include this info also in mapstore and i wan to open the discussion about it
Proposal and ideas are welcome:
Acceptance criteria
Other useful information
The text was updated successfully, but these errors were encountered: