Skip to content

Commit e8c3a14

Browse files
author
Quique Fernandez
committed
Merge branch 'Dev' of https://github.com/dotnet/eShopOnContainers into Dev
2 parents 971c3ab + f2681b9 commit e8c3a14

11 files changed

Lines changed: 28 additions & 70 deletions

File tree

add-host-entry.ps1

Lines changed: 0 additions & 19 deletions
This file was deleted.

docker-compose.override.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ services:
1111

1212
webmvc:
1313
environment:
14-
- CatalogUrl=http://catalog.api
14+
- CatalogUrl=http://catalog.api:5101
1515
- OrderingUrl=http://ordering.api:5102
1616
#- IdentityUrl=http://13.88.8.119:5105 #Remote: VM Needs to have public access at 5105.
1717
- IdentityUrl=http://10.0.75.1:5105 #Local: You need to open windows firewall at range 5100-5105.
@@ -22,14 +22,14 @@ services:
2222

2323
webspa:
2424
environment:
25-
- CatalogUrl=http://catalog.api
26-
- OrderingUrl=http://ordering.api
25+
- CatalogUrl=http://catalog.api:5101
26+
- OrderingUrl=http://ordering.api:5102
2727
#- IdentityUrl=http://13.88.8.119:5105 #Remote: VM Needs to have public access at 5105.
2828
#- IdentityUrl=http://identity.service:5105 #Local: You need a entry in windows host file to run identity in local docker.
2929
- IdentityUrl=http://10.0.75.1:5105 #Local: You need to open windows firewall at range 5100-5105.
3030
- BasketUrl=http://basket.api:5103
3131
ports:
32-
- "5104:80"
32+
- "5104:5104"
3333

3434
basket.api:
3535
environment:
@@ -44,7 +44,7 @@ services:
4444
environment:
4545
- ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word
4646
ports:
47-
- "5101:80"
47+
- "5101:5101"
4848

4949
ordering.api:
5050
environment:

src/Services/Catalog/Catalog.API/Controllers/CatalogController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public async Task<IActionResult> Items(string name, int pageSize = 10, int pageI
5757
.Take(pageSize)
5858
.ToListAsync();
5959

60-
itemsOnPage = ComposePicUri(itemsOnPage);
60+
//itemsOnPage = ComposePicUri(itemsOnPage);
6161

6262
var model = new PaginatedItemsViewModel<CatalogItem>(
6363
pageIndex, pageSize, totalItems, itemsOnPage);
@@ -90,7 +90,7 @@ public async Task<IActionResult> Items(int? catalogTypeId, int? catalogBrandId,
9090
.Take(pageSize)
9191
.ToListAsync();
9292

93-
itemsOnPage = ComposePicUri(itemsOnPage);
93+
//itemsOnPage = ComposePicUri(itemsOnPage);
9494

9595
var model = new PaginatedItemsViewModel<CatalogItem>(
9696
pageIndex, pageSize, totalItems, itemsOnPage);

src/Services/Catalog/Catalog.API/project.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"publishOptions": {
4848
"include": [
4949
"wwwroot",
50+
"Pics",
5051
"Views",
5152
"Areas/**/Views",
5253
"settings.json",

src/Web/WebMVC/wwwroot/css/site.min.css

Whitespace-only changes.

src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/basket/basket-status/basket-status.component.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,17 @@ import { SecurityService } from '../../shared/services/security.service';
1111
templateUrl: './basket-status.component.html'
1212
})
1313
export class BasketStatusComponent implements OnInit {
14-
subscription: Subscription;
14+
basketItemAddedSubscription: Subscription;
1515
authSubscription: Subscription;
16+
basketDroppedSubscription: Subscription;
17+
1618
badge: number = 0;
1719

1820
constructor(private service: BasketService, private basketEvents: BasketWrapperService, private authService: SecurityService) { }
1921

2022
ngOnInit() {
2123
// Subscribe to Add Basket Observable:
22-
this.subscription = this.basketEvents.addItemToBasket$.subscribe(
24+
this.basketItemAddedSubscription = this.basketEvents.addItemToBasket$.subscribe(
2325
item => {
2426
this.service.setBasket(item).subscribe(res => {
2527
this.service.getBasket().subscribe(basket => {
@@ -28,6 +30,13 @@ export class BasketStatusComponent implements OnInit {
2830
});
2931
});
3032

33+
// Subscribe to Drop Basket Observable:
34+
this.basketDroppedSubscription = this.service.basketDroped$.subscribe(res =>
35+
this.service.getBasket().subscribe(basket => {
36+
this.badge = basket.items.length;
37+
})
38+
);
39+
3140
// Subscribe to login and logout observable
3241
this.authSubscription = this.authService.authenticationChallenge$.subscribe(res => {
3342
this.service.getBasket().subscribe(basket => {

src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/basket/basket.service.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import 'rxjs/add/observable/throw';
1414
import { Observer } from 'rxjs/Observer';
1515
import 'rxjs/add/operator/map';
1616
import 'rxjs/add/operator/catch';
17+
import { Subject } from 'rxjs/Subject';
1718

1819
@Injectable()
1920
export class BasketService {
@@ -23,6 +24,10 @@ export class BasketService {
2324
items: []
2425
};
2526

27+
//observable that is fired when the basket is dropped
28+
private basketDropedSource = new Subject();
29+
basketDroped$ = this.basketDropedSource.asObservable();
30+
2631
constructor(private service: DataService, private authService: SecurityService, private basketEvents: BasketWrapperService, private router: Router) {
2732
this.basket.items = [];
2833

@@ -55,7 +60,7 @@ export class BasketService {
5560
}
5661

5762
dropBasket() {
58-
console.log('drop basket!');
5963
this.service.delete(this.basketUrl + '/' + this.basket.buyerId);
64+
this.basketDropedSource.next();
6065
}
6166
}

src/Web/WebSPA/eShopOnContainers.WebSPA/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public static void Main(string[] args)
1717
.UseKestrel()
1818
.UseConfiguration(config)
1919
.UseContentRoot(Directory.GetCurrentDirectory())
20-
.UseUrls("http://localhost:5104/")
20+
.UseUrls("http://0.0.0.0:5104")
2121
.UseIISIntegration()
2222
.UseStartup<Startup>()
2323
.Build();

src/Web/WebSPA/eShopOnContainers.WebSPA/Properties/launchSettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"IIS Express": {
1212
"commandName": "IISExpress",
1313
"environmentVariables": {
14-
"ASPNETCORE_ENVIRONMENT": "Development"
14+
"ASPNETCORE_ENVIRONMENT": "Production"
1515
}
1616
}
1717
}
Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,10 @@
11
{
2-
"ConnectionStrings": {
3-
"DefaultConnection": "Data Source=AspNetCore.db"
4-
},
52
"Logging": {
63
"IncludeScopes": false,
74
"LogLevel": {
85
"Default": "Debug",
96
"System": "Information",
107
"Microsoft": "Information"
118
}
12-
},
13-
"Email": {
14-
"From": "",
15-
"Subject": "",
16-
"SendGrid": {
17-
"Username": "",
18-
"Password": ""
19-
}
20-
},
21-
"Authentication": {
22-
"Google": {
23-
"ClientId": "",
24-
"ClientSecret": ""
25-
},
26-
"Facebook": {
27-
"AppId": "",
28-
"AppSecret": ""
29-
},
30-
"Microsoft": {
31-
"ClientId": "",
32-
"ClientSecret": ""
33-
},
34-
"Twitter": {
35-
"ConsumerKey": "",
36-
"ConsumerSecret": ""
37-
},
38-
"Github": {
39-
"ClientId": "",
40-
"ClientSecret": ""
41-
},
42-
"LinkedIn": {
43-
"ClientId": "",
44-
"ClientSecret": ""
45-
}
469
}
4710
}

0 commit comments

Comments
 (0)