mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
parent
7011cca4f9
commit
b76933f582
9 changed files with 31 additions and 31 deletions
2
.github/README.md
vendored
2
.github/README.md
vendored
|
|
@ -82,7 +82,7 @@ Execute:
|
|||
### Testing changes to the `Web` project
|
||||
|
||||
1. Execute `docker container ls` to find the `CONTAINER ID` of the `filterlists.web` container.
|
||||
2. Execute `docker-compose up -d --build [CONTAINER ID]` replacing `[CONTAINER ID]` with the hash from step 1.
|
||||
2. Execute `docker-compose up -d -V --build [CONTAINER ID]` replacing `[CONTAINER ID]` with the hash from step 1.
|
||||
|
||||
### Debugging
|
||||
|
||||
|
|
|
|||
|
|
@ -25,12 +25,12 @@ public FilterListDtoMappingProfile() =>
|
|||
opt => opt.MapFrom(src =>
|
||||
src.FilterListMaintainers
|
||||
.Select(ll => ll.MaintainerId)))
|
||||
.ForMember(dest => dest.RuleCount,
|
||||
opt => opt.MapFrom(src =>
|
||||
src.Snapshots
|
||||
.Where(s => s.WasSuccessful)
|
||||
.Select(s => (int?)s.SnapshotRules.Count)
|
||||
.FirstOrDefault()))
|
||||
//.ForMember(dest => dest.RuleCount,
|
||||
// opt => opt.MapFrom(src =>
|
||||
// src.Snapshots
|
||||
// .Where(s => s.WasSuccessful)
|
||||
// .Select(s => (int?)s.SnapshotRules.Count)
|
||||
// .FirstOrDefault()))
|
||||
.ForMember(dest => dest.SyntaxId,
|
||||
opt => opt.MapFrom(src =>
|
||||
src.SyntaxId))
|
||||
|
|
|
|||
|
|
@ -22,11 +22,11 @@ public class FilterListDto
|
|||
public string Name { get; set; }
|
||||
public string PolicyUrl { get; set; }
|
||||
public DateTime? PublishedDate { get; set; }
|
||||
public int? RuleCount { get; set; }
|
||||
//public int? RuleCount { get; set; }
|
||||
public string SubmissionUrl { get; set; }
|
||||
public int? SyntaxId { get; set; }
|
||||
public List<int> TagIds { get; set; }
|
||||
public DateTime? UpdatedDate { get; set; }
|
||||
//public DateTime? UpdatedDate { get; set; }
|
||||
public string ViewUrl { get; set; }
|
||||
public List<string> ViewUrlMirrors { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ const columnVisibilityDefaults: IColumnVisibility[] = [
|
|||
{ column: "Software", visible: true },
|
||||
{ column: "Languages", visible: true },
|
||||
{ column: "Tags", visible: true },
|
||||
{ column: "Updated", visible: false },
|
||||
{ column: "Rules", visible: false },
|
||||
//{ column: "Updated", visible: false },
|
||||
//{ column: "Rules", visible: false },
|
||||
{ column: "License", visible: false },
|
||||
{ column: "Maintainers", visible: false },
|
||||
{ column: "Subscribe", visible: false }
|
||||
|
|
@ -18,7 +18,7 @@ interface IProps {
|
|||
licenses: ILicense[];
|
||||
lists: IList[];
|
||||
maintainers: IMaintainer[];
|
||||
ruleCount: number;
|
||||
//ruleCount: number;
|
||||
software: ISoftware[];
|
||||
syntaxes: ISyntax[];
|
||||
tags: ITag[];
|
||||
|
|
@ -60,7 +60,7 @@ export class Home extends React.Component<IProps, IState> {
|
|||
|
||||
render() {
|
||||
return <div>
|
||||
<Oneliner listCount={this.props.lists.length} ruleCount={this.props.ruleCount}/>
|
||||
<Oneliner listCount={this.props.lists.length}/* ruleCount={this.props.ruleCount}*//>
|
||||
<ListsTable {...this.props} {...this.state}/>
|
||||
{this.renderColumnVisibilityCheckboxes()}
|
||||
</div>;
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
|
||||
interface IProps {
|
||||
listCount: number;
|
||||
ruleCount: number;
|
||||
//ruleCount: number;
|
||||
};
|
||||
|
||||
export const Oneliner = (props: IProps) =>
|
||||
props.listCount > 0 && props.ruleCount > 0
|
||||
props.listCount > 0/* && props.ruleCount > 0*/
|
||||
? <p className="ml-2 mr-2">
|
||||
The independent, comprehensive directory of <strong>{props.ruleCount.toLocaleString()
|
||||
}</strong> unique rules across <strong>{props.listCount.toLocaleString()
|
||||
The independent, comprehensive directory of {/*}<strong>{props.ruleCount.toLocaleString()
|
||||
}</strong> unique rules across */}<strong>{props.listCount.toLocaleString()
|
||||
}</strong> filter and host lists for advertisements, trackers, malware, and annoyances.
|
||||
</p>
|
||||
: <p className="ml-2 mr-2">
|
||||
|
|
|
|||
|
|
@ -16,11 +16,11 @@ export interface IListDetails {
|
|||
name: string;
|
||||
policyUrl: string;
|
||||
publishedDate: string;
|
||||
ruleCount: number;
|
||||
//ruleCount: number;
|
||||
submissionUrl: string;
|
||||
syntax: ISyntax;
|
||||
tags: ITag[];
|
||||
updatedDate: string;
|
||||
//updatedDate: string;
|
||||
viewUrl: string;
|
||||
viewUrlMirrors: string[];
|
||||
};
|
||||
|
|
@ -19,11 +19,11 @@ interface IProps {
|
|||
license: ILicense;
|
||||
name: string;
|
||||
publishedDate: string;
|
||||
ruleCount: number;
|
||||
//ruleCount: number;
|
||||
software: ISoftware[];
|
||||
syntax: ISyntax;
|
||||
tags: ITag[];
|
||||
updatedDate: string;
|
||||
//updatedDate: string;
|
||||
};
|
||||
|
||||
export const InfoCard = (props: IProps) =>
|
||||
|
|
@ -42,12 +42,12 @@ export const InfoCard = (props: IProps) =>
|
|||
<Description {...props} url={props.descriptionSourceUrl}/>
|
||||
<ul className="list-group list-group-flush">
|
||||
<Languages {...props}/>
|
||||
{props.columnVisibility.filter((c: IColumnVisibility) => c.column === "Rules")[0].visible
|
||||
{/*{props.columnVisibility.filter((c: IColumnVisibility) => c.column === "Rules")[0].visible
|
||||
? null
|
||||
: <RuleCount {...props}/>}
|
||||
{props.columnVisibility.filter((c: IColumnVisibility) => c.column === "Updated")[0].visible
|
||||
? null
|
||||
: <UpdatedDate {...props}/>}
|
||||
: <UpdatedDate {...props}/>}*/}
|
||||
<PublishedDate date={props.publishedDate}/>
|
||||
<Syntax {...props} />
|
||||
{props.columnVisibility.filter((c: IColumnVisibility) => c.column === "License")[0].visible
|
||||
|
|
|
|||
|
|
@ -10,11 +10,11 @@ import {
|
|||
License,
|
||||
Maintainers,
|
||||
Name,
|
||||
RuleCount,
|
||||
//RuleCount,
|
||||
Software,
|
||||
SubscribeButton,
|
||||
Tags,
|
||||
UpdatedDate
|
||||
//UpdatedDate
|
||||
} from "./columns";
|
||||
import { IListDetails } from "../../components/detailsExpander";
|
||||
import { DetailsExpander } from "../../components";
|
||||
|
|
@ -42,8 +42,8 @@ export const ListsTable = (props: IProps) =>
|
|||
Software(props.columnVisibility, props.software),
|
||||
Languages(props.columnVisibility, props.languages),
|
||||
Tags(props.columnVisibility, props.tags),
|
||||
UpdatedDate(props.columnVisibility),
|
||||
RuleCount(props.columnVisibility),
|
||||
//UpdatedDate(props.columnVisibility),
|
||||
//RuleCount(props.columnVisibility),
|
||||
License(props.columnVisibility, props.licenses),
|
||||
Maintainers(props.columnVisibility, props.maintainers),
|
||||
SubscribeButton(props.columnVisibility),
|
||||
|
|
@ -94,11 +94,11 @@ const mapListDetails = (props: ICreateListDtoProps): IListDetails =>
|
|||
name: props.list.name,
|
||||
policyUrl: props.list.policyUrl,
|
||||
publishedDate: props.list.publishedDate,
|
||||
ruleCount: props.list.ruleCount,
|
||||
//ruleCount: props.list.ruleCount,
|
||||
submissionUrl: props.list.submissionUrl,
|
||||
syntax: props.syntaxes.filter((s: ISyntax) => props.list.syntaxId === s.id)[0],
|
||||
tags: props.list.tagIds ? props.tags.filter((t: ITag) => props.list.tagIds.indexOf(t.id) > -1) : undefined,
|
||||
updatedDate: props.list.updatedDate,
|
||||
//updatedDate: props.list.updatedDate,
|
||||
viewUrl: props.list.viewUrl,
|
||||
viewUrlMirrors: props.list.viewUrlMirrors
|
||||
} as IListDetails);
|
||||
|
|
@ -14,11 +14,11 @@
|
|||
name: string;
|
||||
policyUrl: string;
|
||||
publishedDate: string;
|
||||
ruleCount: number;
|
||||
//ruleCount: number;
|
||||
submissionUrl: string;
|
||||
syntaxId: number;
|
||||
tagIds: number[];
|
||||
updatedDate: string;
|
||||
//updatedDate: string;
|
||||
viewUrl: string;
|
||||
viewUrlMirrors: string[];
|
||||
};
|
||||
Loading…
Reference in a new issue