Skip to content

Commit

Permalink
clean packages
Browse files Browse the repository at this point in the history
  • Loading branch information
makamekm committed May 6, 2020
1 parent 7b287f6 commit 61ca038
Show file tree
Hide file tree
Showing 53 changed files with 248 additions and 2,359 deletions.
50 changes: 1 addition & 49 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 1 addition & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "git-activity-team-tracker",
"version": "0.2.5",
"version": "0.2.6",
"private": false,
"description": "The tool visualize git activities, for teams, users, repositories",
"author": "Maxim Karpov <[email protected]>",
Expand Down Expand Up @@ -74,7 +74,6 @@
"electron-settings": "^3.2.0",
"electron-updater": "^4.2.5",
"faker": "^4.1.0",
"font-awesome": "^4.7.0",
"fs-backwards-stream": "^1.0.0",
"fs-extra": "^9.0.0",
"holderjs": "^2.9.7",
Expand All @@ -97,11 +96,6 @@
"react": "^16.13.1",
"react-beautiful-dnd": "^13.0.0",
"react-big-calendar": "^0.24.3",
"react-bootstrap-table-next": "^4.0.0",
"react-bootstrap-table2-editor": "^1.4.0",
"react-bootstrap-table2-filter": "^1.3.1",
"react-bootstrap-table2-paginator": "^2.1.2",
"react-bootstrap-table2-toolkit": "^2.1.2",
"react-bootstrap-typeahead": "^4.2.2",
"react-content-loader": "^5.0.4",
"react-datepicker": "^2.14.1",
Expand Down
1 change: 0 additions & 1 deletion src/app/Configuration/ConfigurationAllUsers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ export const ConfigurationAllUsers = observer(
<div style={{ flex: 1 }}>
<Input
style={{ width: "150px" }}
outline
placeholder="Search..."
bsSize="sm"
className="ml-auto align-self-end no-print"
Expand Down
2 changes: 1 addition & 1 deletion src/app/Dashboard/DashboardToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const DashboardToolbar = observer(
className="no-print mb-2"
placeholder="Activity Max Value"
type="number"
value={state.maxValue}
value={state.maxValue || ""}
style={{
width: "150px",
minWidth: "150px",
Expand Down
2 changes: 1 addition & 1 deletion src/app/Dashboard/TrackerActivities.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { observer } from "mobx-react";
import { List } from "react-content-loader";
import { groupBy } from "underscore";
import { groupBy } from "lodash";

import {
Card,
Expand Down
2 changes: 1 addition & 1 deletion src/app/Dashboard/TrackerSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
MenuItem,
Highlighter,
} from "react-bootstrap-typeahead";
import { groupBy } from "underscore";
import { groupBy } from "lodash";
import { FavouriteService, trackerMap } from "../FavouriteService";

const TypeaheadMenu = (
Expand Down
1 change: 0 additions & 1 deletion src/app/Details/LastMessages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export const LatestMessages = observer(() => {
<div style={{ flex: 1 }}>
<Input
style={{ width: "150px" }}
outline
placeholder="Search..."
bsSize="sm"
className="ml-auto align-self-end no-print"
Expand Down
1 change: 0 additions & 1 deletion src/app/Details/RepositoryUsersDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ export const RepositoryUsersDashboard = observer(() => {
<div style={{ flex: 1 }}>
<Input
style={{ width: "150px" }}
outline
placeholder="Search..."
bsSize="sm"
className="ml-auto align-self-end no-print"
Expand Down
25 changes: 16 additions & 9 deletions src/app/Log/LogsScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ const levelColorMap = {
};

interface LogsState {
isDirty: boolean;
search: string;
limit: number;
logs: {
Expand All @@ -43,11 +42,11 @@ interface LogsState {
}[];
isLoading: boolean;
load: () => Promise<void>;
clear: () => Promise<void>;
}

export const LogsScreen = observer(() => {
const state = useLocalStore<LogsState>(() => ({
isDirty: false,
search: "",
limit: 50,
logs: {
Expand Down Expand Up @@ -95,9 +94,15 @@ export const LogsScreen = observer(() => {
load: async () => {
state.isLoading = true;
state.logs = await ipc.handlers.GET_LOGS(state.search, state.limit);
state.isDirty = false;
state.isLoading = false;
},
clear: async () => {
// state.isLoading = true;
throw new Error("sdfsdfsdf");
// await ipc.handlers.CLEAR_LOGS();
// state.logs = await ipc.handlers.GET_LOGS(state.search, state.limit);
// state.isLoading = false;
},
}));

useOnLoad(state.load);
Expand All @@ -119,11 +124,11 @@ export const LogsScreen = observer(() => {
<Col lg={12}>
<div className="d-flex flex-wrap mb-4 pb-2">
<HeaderMain title="Logs" className="mt-0 mb-3" />
{/* <div className="ml-auto d-flex align-self-center">
<Link to="/" className="ml-auto text-decoration-none">
<i className="fa fa-home mr-2"></i> Back Home
</Link>
</div> */}
<div className="ml-auto d-flex align-self-center">
<Button outline onClick={state.clear}>
<i className="fa fa-trash mr-2"></i> Clear Logs
</Button>
</div>
</div>
</Col>
</Row>
Expand Down Expand Up @@ -151,7 +156,7 @@ export const LogsScreen = observer(() => {
<Card className="mt-2">
{state.isLoading ? (
<List height={"300px"} className="m-4" />
) : (
) : state.aggregatedLogs.length > 0 ? (
<Table className="m-0">
<tbody>
{state.aggregatedLogs.map((line, index) => {
Expand All @@ -178,6 +183,8 @@ export const LogsScreen = observer(() => {
})}
</tbody>
</Table>
) : (
<div className="text-center py-3">There are no logs...</div>
)}
</Card>
</div>
Expand Down
12 changes: 7 additions & 5 deletions src/app/RepositoryUserService.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,13 @@ export const RepositoryUserService = createService<RepositoryUserState>(
.includes(state.usersQueryDelay.toLowerCase());
})
: state.repositoryUsers;
values = values.sort(
(a, b) =>
(a[state.sortBy] - b[state.sortBy]) *
(state.sortDirectionDesc ? -1 : 1)
);
values = values
.slice()
.sort(
(a, b) =>
(a[state.sortBy] - b[state.sortBy]) *
(state.sortDirectionDesc ? -1 : 1)
);
return values;
},
load: async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/app/SearchBar/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
MenuItem,
Highlighter,
} from "react-bootstrap-typeahead";
import { groupBy } from "underscore";
import { groupBy } from "lodash";
import { searchMap, SearchService } from "../SearchService";
import { useHistory } from "react-router";
import { Nav, NavItem } from "~/components";
Expand Down
4 changes: 2 additions & 2 deletions src/app/SearchService.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createService } from "~/components/ServiceProvider/ServiceProvider";
import { useOnLoad } from "~/hooks";
import { Config } from "~/shared/Config";
import { ipc } from "~/shared/ipc";
import { debounce } from "underscore";
import { debounce } from "lodash";

export type SearchType = "repository" | "team" | "user";

Expand Down Expand Up @@ -64,7 +64,7 @@ export const SearchService = createService<SearchState>(
state.config = await ipc.handlers.GET_CONFIG();
state.isLoading = false;
},
reload: debounce(() => state.load(), 1000, false),
reload: debounce(() => state.load(), 1000),
}));
return state;
},
Expand Down
Loading

0 comments on commit 61ca038

Please sign in to comment.