diff --git a/ui/src/visualizations/File-Evolution/chart/chart.js b/ui/src/visualizations/File-Evolution/chart/chart.js
index 113e0506..e3fbbc71 100644
--- a/ui/src/visualizations/File-Evolution/chart/chart.js
+++ b/ui/src/visualizations/File-Evolution/chart/chart.js
@@ -19,11 +19,13 @@ export default class FileEvolution extends React.Component {
const commitBoxes = this.getCommitsDraw(space);
//const svgHeight = (commitRects.length / 2 + 1) * this.props.commitBoxHeight + (commitRects.length / 2) * space;
const svgHeight = this.props.commitBoxHeight + space;
- const svgWidth = (commitBoxes.length / 2 + 1) * this.props.commitBoxHeight + (commitBoxes.length / 2) * space;
+ const svgWidth = (commitBoxes.length / 2 + 1) * this.props.commitBoxHeight + commitBoxes.length / 2 * space;
return (
props.onSetShowCommitMessage(value)}
+ onChange={value => props.onSetShowCommitSha(value)}
/>
diff --git a/ui/src/visualizations/File-Evolution/reducers/config.js b/ui/src/visualizations/File-Evolution/reducers/config.js
index 98679091..c2887172 100644
--- a/ui/src/visualizations/File-Evolution/reducers/config.js
+++ b/ui/src/visualizations/File-Evolution/reducers/config.js
@@ -11,9 +11,11 @@ export default handleActions(
SET_SELECTED_AUTHORS: (state, action) => _.assign({}, state, { selectedAuthors: [...action.payload] }),
SET_SELECTED_BRANCHES: (state, action) => _.assign({}, state, { selectedBranches: [...action.payload] }),
SET_SHOW_COMMIT_DATE: (state, action) => _.assign({}, state, { showCommitDate: action.payload }),
- SET_SHOW_COMMIT_MESSAGE: (state, action) => _.assign({}, state, { showCommitMessage: action.payload }),
+ SET_SHOW_COMMIT_SHA: (state, action) => _.assign({}, state, { showCommitSha: action.payload }),
SET_SHOW_COMMIT_AUTHOR: (state, action) => _.assign({}, state, { showCommitAuthor: action.payload }),
- SET_SHOW_COMMIT_FILES: (state, action) => _.assign({}, state, { showCommitFiles: action.payload })
+ SET_SHOW_COMMIT_FILES: (state, action) => _.assign({}, state, { showCommitFiles: action.payload }),
+ SET_SHOW_COMMIT_WEBLINK: (state, action) => _.assign({}, state, { showCommitWeblink: action.payload }),
+ SET_SHOW_COMMIT_MESSAGE: (state, action) => _.assign({}, state, { showCommitMessage: action.payload })
},
{
commitBoxWidth: 200,
@@ -22,8 +24,10 @@ export default handleActions(
selectedAuthors: [],
selectedBranches: [],
showCommitDate: true,
- showCommitMessage: 'header',
+ showCommitSha: 'short',
showCommitAuthor: false,
- showCommitFiles: true
+ showCommitFiles: true,
+ showCommitMessage: true,
+ showCommitWeblink: false
}
);
diff --git a/ui/src/visualizations/File-Evolution/sagas/getCommitData.js b/ui/src/visualizations/File-Evolution/sagas/getCommitData.js
index 99c5a33a..58fac717 100644
--- a/ui/src/visualizations/File-Evolution/sagas/getCommitData.js
+++ b/ui/src/visualizations/File-Evolution/sagas/getCommitData.js
@@ -25,6 +25,8 @@ const getCommitsPage = until => (page, perPage) => {
data {
sha
date
+ branch
+ shortSha
message
messageHeader
signature
diff --git a/ui/src/visualizations/File-Evolution/sagas/index.js b/ui/src/visualizations/File-Evolution/sagas/index.js
index 7ce2cc7f..214e0b6a 100644
--- a/ui/src/visualizations/File-Evolution/sagas/index.js
+++ b/ui/src/visualizations/File-Evolution/sagas/index.js
@@ -18,7 +18,9 @@ export const setSelectedAuthors = createAction('SET_SELECTED_AUTHORS');
export const setSelectedBranches = createAction('SET_SELECTED_BRANCHES');
export const setShowCommitDate = createAction('SET_SHOW_COMMIT_DATE');
+export const setShowCommitSha = createAction('SET_SHOW_COMMIT_SHA');
export const setShowCommitMessage = createAction('SET_SHOW_COMMIT_MESSAGE');
+export const setShowCommitWeblink = createAction('SET_SHOW_COMMIT_WEBLINK');
export const setShowCommitAuthor = createAction('SET_SHOW_COMMIT_AUTHOR');
export const setShowCommitFiles = createAction('SET_SHOW_COMMIT_FILES');
@@ -65,7 +67,7 @@ export const fetchFileEvolutionData = fetchFactory(
//const commiters = yield getCommiters();
return yield Promise.join(getCommitData(), getBranches(), getCommiters(), getFiles())
.spread((commits, branches, commiters, files) => {
- console.log(files);
+ console.log(commits);
const authorsColorPalette = getAuthorColorPalette(commiters);
const branchesColorPalette = getBranchesColorPalette(branches);
const commitFiles = addFilesToCommit(files, commits);
@@ -128,6 +130,11 @@ function getBranchesColorPalette(branches) {
}
colorPalette[branches[i].branch] = randomColor;
}
+ let randomColor = '#' + Math.floor(Math.random() * 16777215).toString(16);
+ while (randomColor.length !== 7) {
+ randomColor = randomColor + '0';
+ }
+ colorPalette['tags/v1.0.0'] = randomColor;
console.log(colorPalette);
return colorPalette;
}