Skip to content

Commit e4c14a9

Browse files
author
Jay Mathis
committed
Remove IP address
Minor tweaks to dashboard UX
1 parent cc9d5d3 commit e4c14a9

10 files changed

Lines changed: 515 additions & 517 deletions

File tree

Controllers/MapController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public HttpResponseMessage Get(int minutes)
3535
.ToList();
3636

3737
var recent_unique_visits = recent_visits
38-
.GroupBy(i => i.ip)
38+
.GroupBy(i => i.session_id)
3939
.Select(i => new
4040
{
4141
id = i.Max(o => o.id)

Controllers/VisitController.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ public VisitDTO ConvertItemToDto(Community_Visit item)
2929
dto.id = item.id;
3030
dto.date = item.date;
3131
dto.visitor_id = item.visitor_id;
32-
dto.tab_id = item.tab_id;
33-
dto.ip = item.ip;
32+
dto.tab_id = item.tab_id;
3433
dto.country = item.country;
3534
dto.region = item.region;
3635
dto.city = item.city;
@@ -70,8 +69,7 @@ public Community_Visit ConvertDtoToItem(Community_Visit item, VisitDTO dto)
7069
item.id = dto.id;
7170
item.date = dto.date;
7271
item.visitor_id = dto.visitor_id;
73-
item.tab_id = dto.tab_id;
74-
item.ip = dto.ip;
72+
item.tab_id = dto.tab_id;
7573
item.country = dto.country;
7674
item.region = dto.region;
7775
item.city = dto.city;
@@ -252,11 +250,7 @@ public HttpResponseMessage Get(string field, int portal_id, Nullable<DateTime> p
252250
case "url":
253251
grouped = list.GroupBy(i => i.url);
254252
break;
255-
256-
case "ip":
257-
grouped = list.GroupBy(i => i.ip);
258-
break;
259-
253+
260254
case "country":
261255
grouped = list.GroupBy(i => i.country);
262256
break;

DAL/WebAnalytics.dbml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,23 @@
9898
<Association Name="User_Community_Visitor" Member="Community_Visitors" ThisKey="UserID" OtherKey="user_id" Type="Community_Visitor" />
9999
</Type>
100100
</Table>
101+
<Table Name="dbo.Community_Visitors" Member="Community_Visitors">
102+
<Type Name="Community_Visitor">
103+
<Column Name="id" Type="System.Int32" DbType="Int NOT NULL IDENTITY" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
104+
<Column Name="portal_id" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
105+
<Column Name="user_id" Type="System.Int32" DbType="Int" CanBeNull="true" />
106+
<Column Name="created_on_date" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
107+
<Association Name="Community_Visitor_Community_Visit" Member="Community_Visits" ThisKey="id" OtherKey="visitor_id" Type="Community_Visit" />
108+
<Association Name="Portal_Community_Visitor" Member="Portal" ThisKey="portal_id" OtherKey="PortalID" Type="Portal" IsForeignKey="true" DeleteRule="CASCADE" DeleteOnNull="true" />
109+
<Association Name="User_Community_Visitor" Member="User" ThisKey="user_id" OtherKey="UserID" Type="User" IsForeignKey="true" DeleteRule="CASCADE" />
110+
</Type>
111+
</Table>
101112
<Table Name="dbo.Community_Visits" Member="Community_Visits">
102113
<Type Name="Community_Visit">
103114
<Column Name="id" Type="System.Int64" DbType="BigInt NOT NULL IDENTITY" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
104115
<Column Name="date" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
105116
<Column Name="visitor_id" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
106117
<Column Name="tab_id" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
107-
<Column Name="ip" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
108118
<Column Name="country" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
109119
<Column Name="region" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
110120
<Column Name="city" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
@@ -129,15 +139,4 @@
129139
<Association Name="Community_Visitor_Community_Visit" Member="Community_Visitor" ThisKey="visitor_id" OtherKey="id" Type="Community_Visitor" IsForeignKey="true" DeleteRule="CASCADE" DeleteOnNull="true" />
130140
</Type>
131141
</Table>
132-
<Table Name="dbo.Community_Visitors" Member="Community_Visitors">
133-
<Type Name="Community_Visitor">
134-
<Column Name="id" Type="System.Int32" DbType="Int NOT NULL IDENTITY" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
135-
<Column Name="portal_id" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
136-
<Column Name="user_id" Type="System.Int32" DbType="Int" CanBeNull="true" />
137-
<Column Name="created_on_date" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
138-
<Association Name="Community_Visitor_Community_Visit" Member="Community_Visits" ThisKey="id" OtherKey="visitor_id" Type="Community_Visit" />
139-
<Association Name="Portal_Community_Visitor" Member="Portal" ThisKey="portal_id" OtherKey="PortalID" Type="Portal" IsForeignKey="true" DeleteRule="CASCADE" DeleteOnNull="true" />
140-
<Association Name="User_Community_Visitor" Member="User" ThisKey="user_id" OtherKey="UserID" Type="User" IsForeignKey="true" DeleteRule="CASCADE" />
141-
</Type>
142-
</Table>
143142
</Database>

DAL/WebAnalytics.dbml.layout

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -34,44 +34,44 @@
3434
<elementListCompartment Id="5be63e36-2d0e-47ef-94d3-52abdcfc1358" absoluteBounds="1.1400000000000006, 3.3350000000000009, 1.9700000000000002, 3.518513997395833" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
3535
</nestedChildShapes>
3636
</classShape>
37-
<classShape Id="be77bfa8-028a-443a-909d-a5cddf822b0f" absoluteBounds="6.375, 6, 2, 5.6169254557291666">
38-
<DataClassMoniker Name="/DataContext/Community_Visit" />
39-
<nestedChildShapes>
40-
<elementListCompartment Id="73b74089-70f7-4c1a-8b02-0d441fbf9357" absoluteBounds="6.3900000000000006, 6.46, 1.9700000000000002, 5.0569254557291661" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
41-
</nestedChildShapes>
42-
</classShape>
4337
<classShape Id="296d1f44-ba1d-4fb5-95bc-cd32278eee45" absoluteBounds="6.625, 2.875, 2, 1.5785953776041666">
4438
<DataClassMoniker Name="/DataContext/Community_Visitor" />
4539
<nestedChildShapes>
4640
<elementListCompartment Id="33f97297-3371-405f-87ad-ccd72f664dd6" absoluteBounds="6.6400000000000006, 3.335, 1.9700000000000002, 1.0185953776041665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
4741
</nestedChildShapes>
4842
</classShape>
49-
<associationConnector edgePoints="[(11.375 : 9.99596272786458); (8.375 : 9.99596272786458)]" fixedFrom="Algorithm" fixedTo="Algorithm">
50-
<AssociationMoniker Name="/DataContext/Tab/Tab_Community_Visit" />
43+
<associationConnector edgePoints="[(11.375 : 3.66429768880208); (8.625 : 3.66429768880208)]" fixedFrom="NotFixed" fixedTo="NotFixed">
44+
<AssociationMoniker Name="/DataContext/Portal/Portal_Community_Visitor" />
5145
<nodes>
52-
<classShapeMoniker Id="70c43e36-453c-43f8-87b9-4a545a282911" />
53-
<classShapeMoniker Id="be77bfa8-028a-443a-909d-a5cddf822b0f" />
46+
<classShapeMoniker Id="b44221d4-76db-498c-a46b-b12e5c7c8258" />
47+
<classShapeMoniker Id="296d1f44-ba1d-4fb5-95bc-cd32278eee45" />
5448
</nodes>
5549
</associationConnector>
56-
<associationConnector edgePoints="[(7.5 : 4.45359537760417); (7.5 : 6)]" fixedFrom="Algorithm" fixedTo="Algorithm">
57-
<AssociationMoniker Name="/DataContext/Community_Visitor/Community_Visitor_Community_Visit" />
50+
<associationConnector edgePoints="[(3.125 : 3.66429768880208); (6.625 : 3.66429768880208)]" fixedFrom="Algorithm" fixedTo="Algorithm">
51+
<AssociationMoniker Name="/DataContext/User/User_Community_Visitor" />
5852
<nodes>
53+
<classShapeMoniker Id="101045dd-5a83-4504-b43d-b2592ae150a7" />
5954
<classShapeMoniker Id="296d1f44-ba1d-4fb5-95bc-cd32278eee45" />
60-
<classShapeMoniker Id="be77bfa8-028a-443a-909d-a5cddf822b0f" />
6155
</nodes>
6256
</associationConnector>
63-
<associationConnector edgePoints="[(11.375 : 3.66429768880208); (8.625 : 3.66429768880208)]" fixedFrom="Algorithm" fixedTo="Algorithm">
64-
<AssociationMoniker Name="/DataContext/Portal/Portal_Community_Visitor" />
57+
<classShape Id="2299eb06-b9a4-49a8-b17e-8f2553ffc7ca" absoluteBounds="6.625, 6.125, 2, 5.4246240234375">
58+
<DataClassMoniker Name="/DataContext/Community_Visit" />
59+
<nestedChildShapes>
60+
<elementListCompartment Id="655294b9-527b-4162-9aba-e8f0356e4efe" absoluteBounds="6.64, 6.585, 1.9700000000000002, 4.8646240234375" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
61+
</nestedChildShapes>
62+
</classShape>
63+
<associationConnector edgePoints="[(11.375 : 9.96231201171875); (8.625 : 9.96231201171875)]" fixedFrom="Algorithm" fixedTo="Algorithm">
64+
<AssociationMoniker Name="/DataContext/Tab/Tab_Community_Visit" />
6565
<nodes>
66-
<classShapeMoniker Id="b44221d4-76db-498c-a46b-b12e5c7c8258" />
67-
<classShapeMoniker Id="296d1f44-ba1d-4fb5-95bc-cd32278eee45" />
66+
<classShapeMoniker Id="70c43e36-453c-43f8-87b9-4a545a282911" />
67+
<classShapeMoniker Id="2299eb06-b9a4-49a8-b17e-8f2553ffc7ca" />
6868
</nodes>
6969
</associationConnector>
70-
<associationConnector edgePoints="[(3.125 : 3.66429768880208); (6.625 : 3.66429768880208)]" fixedFrom="Algorithm" fixedTo="Algorithm">
71-
<AssociationMoniker Name="/DataContext/User/User_Community_Visitor" />
70+
<associationConnector edgePoints="[(7.625 : 4.45359537760417); (7.625 : 6.125)]" fixedFrom="Algorithm" fixedTo="Algorithm">
71+
<AssociationMoniker Name="/DataContext/Community_Visitor/Community_Visitor_Community_Visit" />
7272
<nodes>
73-
<classShapeMoniker Id="101045dd-5a83-4504-b43d-b2592ae150a7" />
7473
<classShapeMoniker Id="296d1f44-ba1d-4fb5-95bc-cd32278eee45" />
74+
<classShapeMoniker Id="2299eb06-b9a4-49a8-b17e-8f2553ffc7ca" />
7575
</nodes>
7676
</associationConnector>
7777
</nestedChildShapes>

0 commit comments

Comments
 (0)