Skip to content

Commit 09441be

Browse files
author
Thinh Nguyen
authored
Merge pull request #13 from mahos/master
remove old codes, fix unit navigation plot logic
2 parents 938aae7 + 8b257bc commit 09441be

File tree

456 files changed

+318
-12949
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

456 files changed

+318
-12949
lines changed

map-frontend/Dockerfile.dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ RUN \
1111
npm install --only=dev &&\
1212
npm install -g @angular/cli > /dev/null
1313

14-
COPY ./frontend-content/src/assets/addons/indigo-pink-map.css /frontend/node_modules/\@angular/material/prebuilt-themes/
14+
COPY ./frontend-content/src/assets/addons/map-color-theme.css /frontend/node_modules/\@angular/material/prebuilt-themes/
1515
COPY ./frontend-content/src/assets/addons/plotly.js /frontend/node_modules/plotly.js-dist/
1616

1717
HEALTHCHECK \

map-frontend/frontend-content/src/app/app.component.css

Lines changed: 45 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
* {
2+
font-family: Ubuntu;
3+
}
14

25
.navigator-container {
36
width: 100%;
47
padding: 0;
8+
background-color: #f6f5fd;
59
}
610

711
.row {
@@ -11,29 +15,38 @@ a.logolink * {
1115
float: left;
1216
}
1317
.nav-item a {
14-
color: #0d143a;
18+
/* color: #2f25bd; */
19+
color: #2c3332;
20+
border: solid 0.5px #b7b3ee;
21+
}
22+
.nav-item a:hover {
23+
background-color: #25bd97;
24+
border: solid 0.5px #25bd97;
25+
color: #fff;
1526
}
16-
.nav-item a:hover,
27+
1728
.active a {
18-
background-color: #0d143a;
29+
background-color: #2f25bd;
1930
color: #fff;
2031
}
2132

33+
.title-container {
34+
margin-left: 12px;
35+
}
36+
2237
.title-container img {
23-
/* height: 100px; */
24-
margin-top:24px;
38+
margin: 15px 0px 25px 8px;
2539
height: 51px;
2640
}
2741

2842
.navigator-head {
2943
/* border-left: 1.5px solid rgb(151, 151, 151); */
30-
height: 71px;
31-
margin-top:14px;
44+
height: 71px;
3245
}
3346
.navigator-header-title {
34-
padding: 17px 14px;
35-
color: #413f40;
36-
font-family: 'Roboto Condensed', sans-serif;
47+
padding: 26px 14px;
48+
color: #2f25bd;
49+
font-family: 'Ubuntu', sans-serif;
3750
font-weight: 300;
3851
}
3952
.menu-button {
@@ -42,23 +55,34 @@ a.logolink * {
4255

4356
.menu-button button,
4457
.menu-button button:active {
45-
border: 2px solid #0d143a;
58+
border: 2px solid #2f25bd;
4659
background-color: transparent;
47-
color: #0d143a;
60+
color: #2f25bd;
61+
/* color: #2c3332; */
4862
}
4963
.menu-button button:hover {
50-
border: 2px solid #0d143a;
51-
background-color: #0d143a;
64+
border: 2px solid #2f25bd;
65+
background-color: #2f25bd;
5266
color: white;
5367
}
5468
.menu-container {
5569
width: 100%;
5670
}
71+
.menu-container ul.nav {
72+
margin-left: 18px;
73+
}
74+
75+
.menu-container li.nav-item {
76+
margin-left: 6px;
77+
}
5778

5879
.navBarLogin {
5980
padding: 0;
6081
margin-right: 10px;
6182
}
83+
.content-container {
84+
margin-left: 7px;
85+
}
6286

6387
.footer {
6488
position: relative;
@@ -71,12 +95,12 @@ a.logolink * {
7195
.footer p,
7296
.footer * {
7397
font-size: 0.8rem;
74-
color: rgb(32, 31, 34);
98+
color: rgb(41, 11, 100);
7599
margin: 8px auto;
76100
}
77101

78102
.footer p a:hover {
79-
color: #0d143a;
103+
color: #2f25bd;
80104
text-decoration: none;
81105
}
82106

@@ -99,15 +123,15 @@ a.logolink * {
99123
.title-container img {
100124
/* height: 80px; */
101125
height: 36px;
102-
margin-top: 22px;
126+
margin-top: 18px;
103127
}
104128

105129
.navigator-head {
106130
height: 56px;
107131
margin-top:12px;
108132
}
109133
.navigator-header-title {
110-
padding: 15px 14px;
134+
padding: 15px 10px;
111135
font-size: 120%;
112136
}
113137
.footer {
@@ -127,15 +151,15 @@ a.logolink * {
127151
.title-container img {
128152
/* height: 70px; */
129153
height: 31px;
130-
margin-top: 29.5px;
154+
margin-top: 19.5px;
131155
}
132156

133157
.navigator-head {
134158
height: 51px;
135-
margin-top:9.5px;
159+
margin-top: 9.5px;
136160
}
137161
.navigator-header-title {
138-
padding: 16px 14px;
162+
padding: 16px 8px;
139163
font-size: 110%;
140164
}
141165
.nav-tabs {

map-frontend/frontend-content/src/app/app.component.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
</div>
66
<div class="row title-container">
77
<a class="logolink" href="/">
8-
<img src="assets/images/monochromeDJ.png">
8+
<img src="../assets/images/MAP_logo.png">
99
<div class="navigator-head">
10-
<h3 class="navigator-header-title">MAP Data Navigator</h3>
10+
<h3 class="navigator-header-title">Data Navigator</h3>
1111
</div>
1212
</a>
1313
</div>
@@ -20,7 +20,7 @@ <h3 class="navigator-header-title">MAP Data Navigator</h3>
2020
</button>
2121
</div>
2222
<div *ngIf="!menuCollapsed" class="menu-container">
23-
<ul class="nav nav-tabs">
23+
<ul class="nav nav-pills">
2424
<li class="nav-item" routerLinkActive="active" [routerLinkActiveOptions]="{exact:true}">
2525
<a class="nav-link" routerLink="/">Home</a>
2626
</li>
@@ -40,7 +40,8 @@ <h3 class="navigator-header-title">MAP Data Navigator</h3>
4040
</div>
4141
</div>
4242
<div class="row content-container">
43-
<div class="col-xl-10 offset-xl-1">
43+
<!-- <div class="col-xl-10 offset-xl-1"> -->
44+
<div class="col-xl-11">
4445
<router-outlet></router-outlet>
4546
</div>
4647
</div>

map-frontend/frontend-content/src/app/app.module.ts

Lines changed: 19 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,13 @@ import { AppComponent } from './app.component';
3333
import { LoginComponent } from './auth/login/login.component';
3434
import { AuthService } from './auth/auth.service';
3535
import { SessionListComponent } from './session-list/session-list.component';
36-
import { SessionComponent, SessionPlotDialog } from './session-list/session/session.component';
37-
import { MouseListComponent } from './mouse-list/mouse-list.component';
38-
import { MouseComponent } from './mouse-list/mouse/mouse.component';
36+
import { SessionComponent } from './session-list/session/session.component';
37+
// import { MouseListComponent } from './mouse-list/mouse-list.component';
38+
// import { MouseComponent } from './mouse-list/mouse/mouse.component';
3939
import { CellListComponent } from './cell-list/cell-list.component';
4040
import { CellComponent } from './cell-list/cell/cell.component';
4141
import { OverviewComponent } from './overview/overview.component';
42-
import { WaterWeightPlotComponent } from './mouse-list/mouse/water-weight-plot/water-weight-plot.component';
43-
import { SessionPsychPlotComponent } from './session-list/session/session-psych-plot/session-psych-plot.component';
44-
import { TrialCountsSessionDurationComponent } from './mouse-list/mouse/trial-counts-session-duration/trial-counts-session-duration.component';
45-
import { PerformanceReactionTimePlotComponent } from './mouse-list/mouse/performance-reaction-time-plot/performance-reaction-time-plot.component';
46-
import { ContrastHeatmapPlotComponent } from './mouse-list/mouse/contrast-heatmap-plot/contrast-heatmap-plot.component';
47-
import { FitParPlotsComponent } from './mouse-list/mouse/fit-par-plots/fit-par-plots.component';
48-
import { ByDateResultPlotsComponent } from './mouse-list/mouse/by-date-result-plots/by-date-result-plots.component';
4942
import { AuthInterceptor } from './auth/auth-interceptor';
50-
import { DailySummaryComponent } from './daily-summary/daily-summary.component';
51-
import { SummaryPlotsComponent } from './daily-summary/summary-plots/summary-plots.component';
52-
import { AnimatedPsychCurvePlotComponent } from './mouse-list/mouse/animated-psych-curve-plot/animated-psych-curve-plot.component';
53-
import { SessionRTCPlotComponent } from './session-list/session/session-rtc-plot/session-rtc-plot.component';
54-
import { SessionRTTNPlotComponent } from './session-list/session/session-rttn-plot/session-rttn-plot.component';
5543
import { ProbeInsertionListComponent } from './probe-insertion-list/probe-insertion-list.component';
5644
import { ProbeInsertionComponent } from './probe-insertion-list/probe-insertion/probe-insertion.component';
5745
import { ProbeTracksComponent } from './probe-tracks/probe-tracks.component';
@@ -62,19 +50,18 @@ const appRoutes: Routes = [
6250
{ path: '', component: OverviewComponent, canActivate: [AuthGuard] },
6351
{ path: 'login', component: LoginComponent },
6452
{ path: 'cells', component: CellListComponent },
65-
{ path: 'water-weight', component: WaterWeightPlotComponent},
66-
{
67-
path: 'mouse/:mouseUUID',
68-
canActivate: [AuthGuard],
69-
canActivateChild: [AuthGuard],
70-
component: MouseComponent
71-
},
72-
{
73-
path: 'mice',
74-
canActivate: [AuthGuard],
75-
canActivateChild: [AuthGuard],
76-
component: MouseListComponent
77-
},
53+
// {
54+
// path: 'mouse/:mouseUUID',
55+
// canActivate: [AuthGuard],
56+
// canActivateChild: [AuthGuard],
57+
// component: MouseComponent
58+
// },
59+
// {
60+
// path: 'mice',
61+
// canActivate: [AuthGuard],
62+
// canActivateChild: [AuthGuard],
63+
// component: MouseListComponent
64+
// },
7865
{
7966
path: 'probe',
8067
canActivate: [AuthGuard],
@@ -102,11 +89,6 @@ const appRoutes: Routes = [
10289
canActivateChild: [AuthGuard],
10390
component: SessionListComponent
10491
},
105-
{
106-
path: 'summary',
107-
canActivate: [AuthGuard],
108-
component: DailySummaryComponent
109-
},
11092
{
11193
path: 'project-probe-tracks',
11294
canActivate: [AuthGuard],
@@ -118,30 +100,18 @@ const appRoutes: Routes = [
118100

119101

120102
@NgModule({
121-
entryComponents: [SessionComponent, SessionPlotDialog],
103+
// entryComponents: [SessionComponent, SessionPlotDialog],
104+
entryComponents: [SessionComponent],
122105
declarations: [
123106
AppComponent,
124107
LoginComponent,
125108
SessionListComponent,
126109
SessionComponent,
127-
MouseListComponent,
128-
MouseComponent,
110+
// MouseListComponent,
111+
// MouseComponent,
129112
CellListComponent,
130113
CellComponent,
131114
OverviewComponent,
132-
WaterWeightPlotComponent,
133-
SessionPsychPlotComponent,
134-
TrialCountsSessionDurationComponent,
135-
PerformanceReactionTimePlotComponent,
136-
ContrastHeatmapPlotComponent,
137-
FitParPlotsComponent,
138-
ByDateResultPlotsComponent,
139-
DailySummaryComponent,
140-
SummaryPlotsComponent,
141-
AnimatedPsychCurvePlotComponent,
142-
SessionRTCPlotComponent,
143-
SessionRTTNPlotComponent,
144-
SessionPlotDialog,
145115
ProbeInsertionListComponent,
146116
ProbeInsertionComponent,
147117
ProbeTracksComponent

map-frontend/frontend-content/src/app/cell-list/cell-list.component.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
h5 {
2+
font-weight: 300;
3+
}
4+
15
.clusterListTable thead th {
26
position: sticky;
37
top: -3px;

map-frontend/frontend-content/src/app/cell-list/cell-list.component.html

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,38 @@
1-
<div *ngIf="cells">
2-
<h3>Cells</h3>
3-
</div>
4-
<!-- <p>id: {{ clickedUnitId }}</p> -->
5-
<div class="probe-selection-area">
1+
<h5>Units</h5>
2+
<div class="probe-selection-area" *ngIf="cells">
63
<label for="insertion_number">Select Probe Insertion Number: </label>
74
<select name="insertion_number" (change)="probe_selected($event.target.value)">
85
<option *ngFor="let probeIns of probeInsertions" [value]="probeIns" [selected]="probeIns == probeInsertions[0]">{{ probeIns }}</option>
96
</select>
107
</div>
118
<div class="row">
12-
<div class="units-nav-area">
9+
<div class="units-nav-area" *ngIf="cells">
1310
<plotly-plot [data]="plot_data" [layout]="plot_layout" [config]="plot_config" (click)="clusterSelectedPlot($event)"></plotly-plot>
1411
<div class="plots-navigator" *ngIf="showController">
1512
<div *ngIf="cells" class="clusterListContainer">
16-
<table class="table table-sm table-hover col-5 ml-auto clusterListTable" #navTable>
13+
<!-- <table matSort (matSortChange)="sortData($event)" class="table table-sm table-hover col-5 ml-auto clusterListTable" #navTable> -->
14+
<table class="table table-sm table-hover col-5 ml-auto clusterListTable"
15+
#navTable>
1716
<thead class="thead-light">
17+
<!-- <th mat-sort-header="unit">Unit</th> -->
1818
<th>Unit</th>
1919
<!-- <th>Probe Index</th> -->
20+
<!-- <th mat-sort-header="unit_depth">Unit Depth</th> -->
2021
<th>Unit Depth</th>
22+
<!-- <th mat-sort-header="unit_amp">Unit Amp</th> -->
2123
<th>Unit Amp</th>
2224
<!-- <th>x position</th> -->
2325
<!-- <th>y position</th> -->
24-
<!-- <th>Details</th> -->
2526
</thead>
2627
<tbody>
27-
<tr *ngFor="let cl of cells" (click)="clusterSelectedTable(cl.unit)" [ngStyle]="{'backgroundColor': cl?.unit == clickedUnitId ? '#ffe5e5' : ''}">
28+
<tr *ngFor="let cl of sortedCellsByProbeIns" (click)="clusterSelectedTable(cl.unit)" [id]="cl?.unit == clickedUnitId ? 'highlighted-row' : ''" [ngStyle]="{'backgroundColor': cl?.unit == clickedUnitId ? '#e5ffec' : ''}">
29+
<!-- <tr *ngFor="let cl of cellsByProbeIns" (click)="clusterSelectedTable(cl.unit)" [ngStyle]="{'backgroundColor': cl?.unit == clickedUnitId ? '#e5ffec' : ''}"> -->
2830
<td>{{ cl.unit }}</td>
2931
<!-- <td>{{ cl.insertion_number }}</td> -->
3032
<td>{{ cl.unit_depth }}</td>
3133
<td>{{ cl.unit_amp }}</td>
3234
<!-- <td>{{ cl.unit_posx }}</td> -->
3335
<!-- <td>{{ cl.unit_posy }}</td> -->
34-
<!-- <td>
35-
<span class="oi oi-external-link" routerLink="/cell/{{cl?.subject_id}}/{{cl?.session}}/{{cl?.unit}}">
36-
<div hidden>
37-
<td>{{ cl.unit }}</td>
38-
<td>{{ cl.insertion_number }}</td>
39-
<td>{{ cl.unit_depth }}</td>
40-
<td>{{ cl.unit_amp }}</td>
41-
<td>{{ cl.unit_posx }}</td>
42-
<td>{{ cl.unit_posy }}</td>
43-
</div>
44-
</span>
45-
</td> -->
4636
</tr>
4737
</tbody>
4838
</table>
@@ -54,7 +44,7 @@ <h3><span class="oi oi-arrow-circle-bottom" (click)="navigate_cell_plots($event,
5444
</div>
5545
</div>
5646
<div class="unit-plots-area">
57-
Selected Unit Id: {{ targetUnitId }}
47+
<p *ngIf="!unitBehaviorLoading">Selected Unit Id: {{ targetUnitId }}</p>
5848
<div class="unit-plots-subarea" *ngIf="cellsByProbeIns">
5949
<div class="unit-plot unit-behavior-plot">
6050
<p *ngIf="unitBehaviorLoading">Unit Behavior Plot Loading...</p>

0 commit comments

Comments
 (0)