Show exact commit hash of Admin UI in interface (#1572)
This commit is contained in:
parent
bb46594d84
commit
71350cacd5
4 changed files with 21 additions and 0 deletions
|
@ -104,6 +104,19 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>io.github.git-commit-id</groupId>
|
||||
<artifactId>git-commit-id-maven-plugin</artifactId>
|
||||
<version>5.0.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>revision</goal>
|
||||
</goals>
|
||||
<phase>initialize</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.google.code.maven-replacer-plugin</groupId>
|
||||
<artifactId>maven-replacer-plugin</artifactId>
|
||||
|
@ -142,6 +155,7 @@
|
|||
"resourceUrl": "${resourceUrl}",
|
||||
"masterRealm": "${masterRealm}",
|
||||
"resourceVersion": "${resourceVersion}",
|
||||
"commitHash": "${git.commit.id}",
|
||||
"isRunningAsTheme": true
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -160,6 +160,9 @@ const Dashboard = () => {
|
|||
</Card>
|
||||
</GridItem>
|
||||
</Grid>
|
||||
<Text className="pf-u-font-size-sm pf-u-color-200 pf-u-mt-sm">
|
||||
{t("adminUiVersion", { version: environment.commitHash })}
|
||||
</Text>
|
||||
</PageSection>
|
||||
</>
|
||||
);
|
||||
|
|
|
@ -13,5 +13,6 @@ export default {
|
|||
infoEnabledFeatures: "Something about what enabled features are.",
|
||||
infoDisabledFeatures: "Something about what disabled features are.",
|
||||
disabledFeatures: "Disabled features",
|
||||
adminUiVersion: "Admin UI version: {{version}}",
|
||||
},
|
||||
};
|
||||
|
|
|
@ -12,6 +12,8 @@ export type Environment = {
|
|||
masterRealm: string;
|
||||
/** The version hash of the auth sever. */
|
||||
resourceVersion: string;
|
||||
/** The hash of the commit the Admin UI was built on, useful to determine the exact version the user is running. */
|
||||
commitHash: string;
|
||||
/** Indicates if the application is running as a Keycloak theme. */
|
||||
isRunningAsTheme: boolean;
|
||||
};
|
||||
|
@ -29,6 +31,7 @@ const defaultEnvironment: Environment = {
|
|||
resourceUrl: ".",
|
||||
masterRealm: "master",
|
||||
resourceVersion: "unknown",
|
||||
commitHash: "unknown",
|
||||
isRunningAsTheme: false,
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue