[ARVADOS-WORKBENCH2] created: 1.1.4-638-gfce0018
Git user
git at public.curoverse.com
Sun Aug 19 06:53:46 EDT 2018
at fce00188736e1d25abf13f4f04cdff2d168e6cc6 (commit)
commit fce00188736e1d25abf13f4f04cdff2d168e6cc6
Author: Daniel Kos <daniel.kos at contractors.roche.com>
Date: Sun Aug 19 12:53:22 2018 +0200
Add build number to the main bar
Feature #14058
Arvados-DCO-1.1-Signed-off-by: Daniel Kos <daniel.kos at contractors.roche.com>
diff --git a/src/index.tsx b/src/index.tsx
index cfdbb46..443e76f 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -28,6 +28,14 @@ import { collectionFilesItemActionSet } from './views-components/context-menu/ac
import { collectionActionSet } from './views-components/context-menu/action-sets/collection-action-set';
import { collectionResourceActionSet } from './views-components/context-menu/action-sets/collection-resource-action-set';
+const getBuildNumber = () => "BN-" + (process.env.BUILD_NUMBER || "dev");
+const getGitCommit = () => "GIT-" + (process.env.GIT_COMMIT || "latest").substr(0, 7);
+const getBuildInfo = () => getBuildNumber() + " / " + getGitCommit();
+
+const buildInfo = getBuildInfo();
+
+console.log(`Starting arvados [${buildInfo}]`);
+
addMenuActionSet(ContextMenuKind.ROOT_PROJECT, rootProjectActionSet);
addMenuActionSet(ContextMenuKind.PROJECT, projectActionSet);
addMenuActionSet(ContextMenuKind.RESOURCE, resourceActionSet);
@@ -45,9 +53,9 @@ fetchConfig()
store.dispatch(initAuth());
store.dispatch(getProjectList(services.authService.getUuid()));
-
+
const TokenComponent = (props: any) => <ApiToken authService={services.authService} {...props}/>;
- const WorkbenchComponent = (props: any) => <Workbench authService={services.authService} {...props}/>;
+ const WorkbenchComponent = (props: any) => <Workbench authService={services.authService} buildInfo={buildInfo} {...props}/>;
const App = () =>
<MuiThemeProvider theme={CustomTheme}>
diff --git a/src/views-components/main-app-bar/main-app-bar.tsx b/src/views-components/main-app-bar/main-app-bar.tsx
index 8bce325..54d6a5d 100644
--- a/src/views-components/main-app-bar/main-app-bar.tsx
+++ b/src/views-components/main-app-bar/main-app-bar.tsx
@@ -26,6 +26,7 @@ interface MainAppBarDataProps {
breadcrumbs: Breadcrumb[];
user?: User;
menuItems: MainAppBarMenuItems;
+ buildInfo: string;
}
export interface MainAppBarActionProps {
@@ -44,10 +45,10 @@ export const MainAppBar: React.SFC<MainAppBarProps> = (props) => {
<Grid container justify="space-between">
<Grid item xs={3}>
<Typography variant="headline" color="inherit" noWrap>
- Arvados
+ Arvados 2
</Typography>
<Typography variant="body1" color="inherit" noWrap >
- Workbench 2
+ {props.buildInfo}
</Typography>
</Grid>
<Grid item xs={6} container alignItems="center">
diff --git a/src/views/workbench/workbench.tsx b/src/views/workbench/workbench.tsx
index 1efac8e..a2d61d5 100644
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@ -100,14 +100,15 @@ interface WorkbenchDataProps {
sidePanelItems: SidePanelItem[];
}
-interface WorkbenchServiceProps {
+interface WorkbenchGeneralProps {
authService: AuthService;
+ buildInfo: string;
}
interface WorkbenchActionProps {
}
-type WorkbenchProps = WorkbenchDataProps & WorkbenchServiceProps & WorkbenchActionProps & DispatchProp<any> & WithStyles<CssRules>;
+type WorkbenchProps = WorkbenchDataProps & WorkbenchGeneralProps & WorkbenchActionProps & DispatchProp<any> & WithStyles<CssRules>;
interface NavBreadcrumb extends Breadcrumb {
itemId: string;
@@ -192,6 +193,7 @@ export const Workbench = withStyles(styles)(
searchText={this.state.searchText}
user={this.props.user}
menuItems={this.state.menuItems}
+ buildInfo={this.props.buildInfo}
{...this.mainAppBarActions} />
</div>
{user &&
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list