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>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</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>
|
<plugin>
|
||||||
<groupId>com.google.code.maven-replacer-plugin</groupId>
|
<groupId>com.google.code.maven-replacer-plugin</groupId>
|
||||||
<artifactId>maven-replacer-plugin</artifactId>
|
<artifactId>maven-replacer-plugin</artifactId>
|
||||||
|
@ -142,6 +155,7 @@
|
||||||
"resourceUrl": "${resourceUrl}",
|
"resourceUrl": "${resourceUrl}",
|
||||||
"masterRealm": "${masterRealm}",
|
"masterRealm": "${masterRealm}",
|
||||||
"resourceVersion": "${resourceVersion}",
|
"resourceVersion": "${resourceVersion}",
|
||||||
|
"commitHash": "${git.commit.id}",
|
||||||
"isRunningAsTheme": true
|
"isRunningAsTheme": true
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -160,6 +160,9 @@ const Dashboard = () => {
|
||||||
</Card>
|
</Card>
|
||||||
</GridItem>
|
</GridItem>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
<Text className="pf-u-font-size-sm pf-u-color-200 pf-u-mt-sm">
|
||||||
|
{t("adminUiVersion", { version: environment.commitHash })}
|
||||||
|
</Text>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
|
@ -13,5 +13,6 @@ export default {
|
||||||
infoEnabledFeatures: "Something about what enabled features are.",
|
infoEnabledFeatures: "Something about what enabled features are.",
|
||||||
infoDisabledFeatures: "Something about what disabled features are.",
|
infoDisabledFeatures: "Something about what disabled features are.",
|
||||||
disabledFeatures: "Disabled features",
|
disabledFeatures: "Disabled features",
|
||||||
|
adminUiVersion: "Admin UI version: {{version}}",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,6 +12,8 @@ export type Environment = {
|
||||||
masterRealm: string;
|
masterRealm: string;
|
||||||
/** The version hash of the auth sever. */
|
/** The version hash of the auth sever. */
|
||||||
resourceVersion: string;
|
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. */
|
/** Indicates if the application is running as a Keycloak theme. */
|
||||||
isRunningAsTheme: boolean;
|
isRunningAsTheme: boolean;
|
||||||
};
|
};
|
||||||
|
@ -29,6 +31,7 @@ const defaultEnvironment: Environment = {
|
||||||
resourceUrl: ".",
|
resourceUrl: ".",
|
||||||
masterRealm: "master",
|
masterRealm: "master",
|
||||||
resourceVersion: "unknown",
|
resourceVersion: "unknown",
|
||||||
|
commitHash: "unknown",
|
||||||
isRunningAsTheme: false,
|
isRunningAsTheme: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue