mirror of
https://github.com/bakhirev/assayo.git
synced 2024-11-16 16:21:41 +00:00
update
This commit is contained in:
parent
dae224d169
commit
c992c6a94f
|
@ -1 +1 @@
|
|||
<!doctype html><html><head><meta name="viewport" content="width=device-width,height=device-height,initial-scale=1,user-scalable=no,maximum-scale=1"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="Cache-Control" content="no-cache"><meta http-equiv="cleartype" content="on"><meta name="HandheldFriendly" content="True"><meta name="format-detection" content="telephone=no"><meta name="format-detection" content="address=no"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="default"><meta name="theme-color" content="white"/><script type="text/javascript">var report=[]</script><script src='../log.txt'></script><script src='../log-1.txt'></script><script src='../log-2.txt'></script><script src='../log-3.txt'></script><script src='../log-4.txt'></script><script src='../log-5.txt'></script><script src='../log-6.txt'></script><script src='../../log.txt'></script><script src='../../log-1.txt'></script><script src='../../log-2.txt'></script><script src='../../log-3.txt'></script><script src='../../log-4.txt'></script><script src='../../log-5.txt'></script><script src='../../log-6.txt'></script><script src='./log.txt'></script><script src='./log-1.txt'></script><script src='./log-2.txt'></script><script src='./log-3.txt'></script><script src='./log-4.txt'></script><script src='./log-5.txt'></script><script src='./log-6.txt'></script><script src='/log.txt'></script><script src='/log-1.txt'></script><script src='/log-2.txt'></script><script src='/log-3.txt'></script><script src='/log-4.txt'></script><script src='/log-5.txt'></script><script src='/log-6.txt'></script><link rel="icon" href="./favicon.svg"/><link rel="apple-touch-icon" href="./logo192.png"/><link rel="manifest" href="./manifest.json"/><title>Git Statistics</title><meta name="description" content="Simple and fast report on git commit history."><meta name="keywords" content="git, statistics, audit, history, log, monitoring, employee control"><meta name="author" content="Bakhirev Aleksei"><meta name="copyright" content="(c) Bakhirev Aleksei"><meta http-equiv="Reply-to" content="alexey-bakhirev@yandex.ru"><meta name="application-name" content="Git statistics"><meta name="msapplication-tooltip" content="Simple and fast report on Git commit history."><meta property="og:title" content="Git Statistics"><meta property="og:description" content="Simple and fast report on Git commit history."><meta property="og:image" content="https://assayo.online/assets/seo/custom_icon_256.png"><meta property="og:site_name" content="Assayo"><meta property="og:url" content="https://assayo.online/"><meta name="twitter:card" content="summary"><meta name="twitter:title" content="Git Statistics"><meta name="twitter:description" content="Simple and fast report on Git commit history."><meta name="twitter:creator" content="Bakhirev Aleksei"><meta name="twitter:image:src" content="https://assayo.online/assets/seo/custom_icon_256.png"><meta name="twitter:domain" content="assayo.online"><meta name="twitter:site" content="assayo.online"><meta itemprop="name" content="Git Statistics"><meta itemprop="description" content="Simple and fast report on Git commit history."><meta itemprop="image" content="https://assayo.online/assets/seo/custom_icon_256.png"><script defer="defer" src="./static/index.js"></script><link href="./static/index.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
||||
<!doctype html><html><head><meta name="viewport" content="width=device-width,height=device-height,initial-scale=1,user-scalable=no,maximum-scale=1"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="Cache-Control" content="no-cache"><meta http-equiv="cleartype" content="on"><meta name="HandheldFriendly" content="True"><meta name="format-detection" content="telephone=no"><meta name="format-detection" content="address=no"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="default"><meta name="theme-color" content="white"/><script type="text/javascript">var report=[]</script><script src='./log.txt'></script><script src='./log-1.txt'></script><script src='./log-2.txt'></script><script src='./log-3.txt'></script><script src='./log-4.txt'></script><script src='./log-5.txt'></script><script src='./log-6.txt'></script><script src='../log.txt'></script><script src='../log-1.txt'></script><script src='../log-2.txt'></script><script src='../log-3.txt'></script><script src='../log-4.txt'></script><script src='../log-5.txt'></script><script src='../log-6.txt'></script><script src='../../log.txt'></script><script src='../../log-1.txt'></script><script src='../../log-2.txt'></script><script src='../../log-3.txt'></script><script src='../../log-4.txt'></script><script src='../../log-5.txt'></script><script src='../../log-6.txt'></script><script src='/log.txt'></script><script src='/log-1.txt'></script><script src='/log-2.txt'></script><script src='/log-3.txt'></script><script src='/log-4.txt'></script><script src='/log-5.txt'></script><script src='/log-6.txt'></script><link rel="icon" href="./favicon.svg"/><link rel="apple-touch-icon" href="./logo192.png"/><link rel="manifest" href="./manifest.json"/><title>Git Statistics</title><meta name="description" content="Simple and fast report on git commit history."><meta name="keywords" content="git, statistics, audit, history, log, monitoring, employee control"><meta name="author" content="Bakhirev Aleksei"><meta name="copyright" content="(c) Bakhirev Aleksei"><meta http-equiv="Reply-to" content="alexey-bakhirev@yandex.ru"><meta name="application-name" content="Git statistics"><meta name="msapplication-tooltip" content="Simple and fast report on Git commit history."><meta property="og:title" content="Git Statistics"><meta property="og:description" content="Simple and fast report on Git commit history."><meta property="og:image" content="https://assayo.online/assets/seo/custom_icon_256.png"><meta property="og:site_name" content="Assayo"><meta property="og:url" content="https://assayo.online/"><meta name="twitter:card" content="summary"><meta name="twitter:title" content="Git Statistics"><meta name="twitter:description" content="Simple and fast report on Git commit history."><meta name="twitter:creator" content="Bakhirev Aleksei"><meta name="twitter:image:src" content="https://assayo.online/assets/seo/custom_icon_256.png"><meta name="twitter:domain" content="assayo.online"><meta name="twitter:site" content="assayo.online"><meta itemprop="name" content="Git Statistics"><meta itemprop="description" content="Simple and fast report on Git commit history."><meta itemprop="image" content="https://assayo.online/assets/seo/custom_icon_256.png"><script defer="defer" src="./static/index.js"></script><link href="./static/index.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -22,12 +22,16 @@ function getMarkdownFromJson(json, languages, language) {
|
|||
custom.getLanguageLinks(languages, language),
|
||||
firstTag ? `> ${firstTag.warning}\n` : '',
|
||||
custom.getTitle(language),
|
||||
custom.getSocialLinks(),
|
||||
];
|
||||
|
||||
(json || []).forEach((tag) => {
|
||||
(json || []).forEach((tag, index) => {
|
||||
if (!tag) return;
|
||||
|
||||
if (index === 1) {
|
||||
markdown.push(custom.getSocialLinks());
|
||||
markdown.push(custom.getSreenshot());
|
||||
}
|
||||
|
||||
if (tag.p) markdown.push(tag.p);
|
||||
else if (tag.warning) markdown.push(`> ${tag.warning}\n`);
|
||||
else if (tag.tableOfContent) markdown.push('tableOfContent');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react';
|
||||
import { HashRouter } from 'react-router-dom';
|
||||
import { render } from 'react-dom';
|
||||
import { HashRouter } from 'react-router-dom';
|
||||
|
||||
import localization from 'ts/helpers/Localization';
|
||||
import de from 'ts/translations/de';
|
||||
|
@ -16,6 +16,7 @@ import initializationI18n from './ts/helpers/i18n';
|
|||
|
||||
import Authorization from 'ts/pages/Authorization';
|
||||
import userSettings from 'ts/store/UserSettings';
|
||||
import themeSettings from 'ts/store/ThemeSettings';
|
||||
import Notifications from 'ts/components/Notifications';
|
||||
import printStore from 'ts/pages/PageWrapper/store/Print';
|
||||
import applyUrlCommands from 'ts/helpers/RPC';
|
||||
|
@ -57,6 +58,7 @@ function renderReactApplication() {
|
|||
|
||||
applyUrlCommands((parameters: any) => {
|
||||
initializationI18n(parameters.lang || parameters.language);
|
||||
themeSettings.setUrlParameters(parameters);
|
||||
userSettings.loadUserSettings().then(() => {
|
||||
renderReactApplication();
|
||||
});
|
||||
|
|
|
@ -59,10 +59,10 @@ export default class DataGripByExtension {
|
|||
|
||||
#getNewExtension(file: IDirtyFile) {
|
||||
return {
|
||||
extension: file.extension,
|
||||
extension: file?.extension,
|
||||
authors: {},
|
||||
task: file.created.task,
|
||||
path: file.name,
|
||||
task: file?.firstCommit?.task,
|
||||
path: file?.name,
|
||||
current: {
|
||||
files: {},
|
||||
count: 0,
|
||||
|
|
|
@ -27,9 +27,10 @@ export function getNewFileInfo(
|
|||
firstName: nameParts.shift(),
|
||||
suffixes: nameParts,
|
||||
lines: addedLines,
|
||||
created: commit,
|
||||
firstCommit: commit,
|
||||
lastCommit: commit,
|
||||
authors: {
|
||||
[commit?.author || '']: getNewFileAuthor(addedLines, commit),
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,10 +24,12 @@ export function getNewFileName(fileName: string, allFiles: any) {
|
|||
return newPath;
|
||||
}
|
||||
|
||||
function getFolder(name?: string): IFileTree {
|
||||
function getFolder(name: string, file: IDirtyFile): IFileTree {
|
||||
return {
|
||||
id: Math.random(),
|
||||
name: name || '',
|
||||
firstCommit: file?.firstCommit,
|
||||
lastCommit: file?.firstCommit,
|
||||
content: {},
|
||||
};
|
||||
}
|
||||
|
@ -37,7 +39,9 @@ function getFolderTree(fileTree: any, file: IDirtyFile) {
|
|||
let fileName: string = file.path.pop() || '';
|
||||
file.path.forEach((folder: any) => {
|
||||
if (!prev[folder] || !prev[folder].content) {
|
||||
prev[folder] = getFolder(folder);
|
||||
prev[folder] = getFolder(folder, file);
|
||||
} else {
|
||||
prev[folder].lastCommit = file?.lastCommit;
|
||||
}
|
||||
prev = prev[folder].content;
|
||||
});
|
||||
|
@ -46,7 +50,7 @@ function getFolderTree(fileTree: any, file: IDirtyFile) {
|
|||
|
||||
|
||||
export function getFileList(allFiles: IHashMap<IDirtyFile>) {
|
||||
const fileList = Object.values(allFiles);
|
||||
const fileList = Object.values(allFiles); // @ts-ignore
|
||||
const fileTree: IFileTree = getFolder();
|
||||
|
||||
fileList.forEach((file: IDirtyFile) => {
|
||||
|
|
|
@ -37,6 +37,7 @@ export default function Parser(report: string[]) {
|
|||
|
||||
if (allFiles[fileName]) {
|
||||
const fileInfo: IDirtyFile = allFiles[fileName];
|
||||
fileInfo.lastCommit = prev;
|
||||
fileInfo.lines += diff;
|
||||
if (!fileInfo.authors[prev?.author || '']) {
|
||||
fileInfo.authors[prev?.author || ''] = {
|
||||
|
|
|
@ -10,10 +10,12 @@ function getParametersFromString(text: string): IHashMap<string> {
|
|||
}
|
||||
|
||||
function getParametersFromURL(): IHashMap<string> {
|
||||
return {
|
||||
const parameters = {
|
||||
...getParametersFromString(location.search),
|
||||
...getParametersFromString(location.hash),
|
||||
};
|
||||
delete parameters[''];
|
||||
return parameters;
|
||||
}
|
||||
|
||||
function loadJsLocal(url: string, callback: Function) {
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import ICommit from './Commit';
|
||||
import ICommit, { ISystemCommit } from './Commit';
|
||||
import IHashMap from './HashMap';
|
||||
|
||||
export interface IDirtyFile {
|
||||
name: string; // ".gitignore",
|
||||
lines: number; // 38, line in file for this moment
|
||||
created: ICommit,
|
||||
firstCommit: ICommit | ISystemCommit | null,
|
||||
lastCommit: ICommit | ISystemCommit | null,
|
||||
path: string[],
|
||||
extension: string,
|
||||
firstName: string,
|
||||
|
@ -30,5 +31,7 @@ export interface IDirtyFile {
|
|||
export interface IFileTree {
|
||||
id?: number;
|
||||
name?: string;
|
||||
firstCommit: ICommit | ISystemCommit | null,
|
||||
lastCommit: ICommit | ISystemCommit | null,
|
||||
content: IHashMap<IDirtyFile>,
|
||||
}
|
||||
|
|
|
@ -1,14 +1,28 @@
|
|||
import React from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import themeSettings from 'ts/store/ThemeSettings';
|
||||
|
||||
import style from '../../styles/logo.module.scss';
|
||||
|
||||
function Logo() {
|
||||
const {
|
||||
icon, link, title, isOpenInNewTab,
|
||||
} = themeSettings.getLogo();
|
||||
|
||||
return (
|
||||
<figure className={style.logo}>
|
||||
<img
|
||||
src="./assets/logo.svg"
|
||||
className={style.logo_icon}
|
||||
/>
|
||||
<Link
|
||||
to={link}
|
||||
target={isOpenInNewTab ? '_blank' : ''}
|
||||
className={style.logo_link}
|
||||
>
|
||||
<img
|
||||
src={icon}
|
||||
title={title}
|
||||
className={style.logo_icon}
|
||||
/>
|
||||
</Link>
|
||||
</figure>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -10,9 +10,15 @@
|
|||
box-sizing: border-box;
|
||||
border: none;
|
||||
|
||||
&_link {
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&_icon {
|
||||
height: 20px;
|
||||
margin: 0 auto;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,8 @@ import LineChart from 'ts/components/LineChart';
|
|||
import getOptions from 'ts/components/LineChart/helpers/getOptions';
|
||||
import NothingFound from 'ts/components/NothingFound';
|
||||
|
||||
import { getDate } from 'ts/helpers/formatter';
|
||||
|
||||
import TreeFilters from './TreeFilters';
|
||||
import { getSubTreeByPath, getArrayFromTree } from '../helpers/tree';
|
||||
import treeStore from '../store/Tree';
|
||||
|
@ -43,6 +45,7 @@ function TreeView({ response }: ITreeViewProps) {
|
|||
'page.team.tree.lineRemove',
|
||||
], suffix: 'page.team.tree.line' });
|
||||
|
||||
console.log(response.content);
|
||||
return (
|
||||
<Table
|
||||
rows={response.content}
|
||||
|
@ -64,9 +67,37 @@ function TreeView({ response }: ITreeViewProps) {
|
|||
treeStore.updateFilter('selectedPath', row.path || []);
|
||||
}}
|
||||
/>
|
||||
<Column
|
||||
isSortable
|
||||
template={ColumnTypesEnum.STRING}
|
||||
title="page.team.pr.firstCommitTime"
|
||||
formatter={(item: any) => getDate(item?.file?.firstCommit?.timestamp)}
|
||||
width={130}
|
||||
/>
|
||||
<Column
|
||||
isSortable
|
||||
template={ColumnTypesEnum.STRING}
|
||||
title="page.team.pr.author"
|
||||
formatter={(item: any) => item?.file?.firstCommit?.author || ''}
|
||||
width={150}
|
||||
/>
|
||||
<Column
|
||||
isSortable
|
||||
template={ColumnTypesEnum.STRING}
|
||||
title="page.team.pr.lastCommitTime"
|
||||
formatter={(item: any) => getDate(item?.file?.lastCommit?.timestamp)}
|
||||
width={130}
|
||||
/>
|
||||
<Column
|
||||
isSortable
|
||||
template={ColumnTypesEnum.STRING}
|
||||
title="page.team.pr.author"
|
||||
formatter={(item: any) => item?.file?.lastCommit?.author || ''}
|
||||
width={150}
|
||||
/>
|
||||
<Column
|
||||
properties="file"
|
||||
minWidth={250}
|
||||
minWidth={200}
|
||||
template={(file: any) => (
|
||||
<LineChart
|
||||
value={file ? 100 : 0}
|
||||
|
|
29
src/ts/store/ThemeSettings.ts
Normal file
29
src/ts/store/ThemeSettings.ts
Normal file
|
@ -0,0 +1,29 @@
|
|||
import { makeObservable, observable, action } from 'mobx';
|
||||
|
||||
class ThemeSettings {
|
||||
urlParameters: any = {};
|
||||
|
||||
constructor() {
|
||||
makeObservable(this, {
|
||||
urlParameters: observable,
|
||||
setUrlParameters: action,
|
||||
});
|
||||
}
|
||||
|
||||
setUrlParameters(urlParameters: any) {
|
||||
this.urlParameters = urlParameters || {};
|
||||
}
|
||||
|
||||
getLogo() {
|
||||
return {
|
||||
icon: './assets/logo.svg',
|
||||
link: '',
|
||||
title: '',
|
||||
isOpenInNewTab: false,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
const themeSettings = new ThemeSettings();
|
||||
|
||||
export default themeSettings;
|
Loading…
Reference in a new issue