Merge branch 'Dev' of https://github.com/dotnet/eShopOnContainers into Dev
This commit is contained in:
commit
e8c3a14717
@ -1,19 +0,0 @@
|
||||
param([switch]$Elevated)
|
||||
function Check-Admin {
|
||||
$currentUser = New-Object Security.Principal.WindowsPrincipal $([Security.Principal.WindowsIdentity]::GetCurrent())
|
||||
$currentUser.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)
|
||||
}
|
||||
if ((Check-Admin) -eq $false) {
|
||||
if ($elevated)
|
||||
{
|
||||
# could not elevate, quit
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
Start-Process powershell.exe -Verb RunAs -ArgumentList ('-noprofile -noexit -file "{0}" -elevated' -f ($myinvocation.MyCommand.Definition))
|
||||
}
|
||||
exit
|
||||
}
|
||||
|
||||
ac -Encoding UTF8 C:\Windows\system32\drivers\etc\hosts "127.0.0.1 identity.service"
|
@ -11,7 +11,7 @@ services:
|
||||
|
||||
webmvc:
|
||||
environment:
|
||||
- CatalogUrl=http://catalog.api
|
||||
- CatalogUrl=http://catalog.api:5101
|
||||
- OrderingUrl=http://ordering.api:5102
|
||||
#- IdentityUrl=http://13.88.8.119:5105 #Remote: VM Needs to have public access at 5105.
|
||||
- IdentityUrl=http://10.0.75.1:5105 #Local: You need to open windows firewall at range 5100-5105.
|
||||
@ -22,14 +22,14 @@ services:
|
||||
|
||||
webspa:
|
||||
environment:
|
||||
- CatalogUrl=http://catalog.api
|
||||
- OrderingUrl=http://ordering.api
|
||||
- CatalogUrl=http://catalog.api:5101
|
||||
- OrderingUrl=http://ordering.api:5102
|
||||
#- IdentityUrl=http://13.88.8.119:5105 #Remote: VM Needs to have public access at 5105.
|
||||
#- IdentityUrl=http://identity.service:5105 #Local: You need a entry in windows host file to run identity in local docker.
|
||||
- IdentityUrl=http://10.0.75.1:5105 #Local: You need to open windows firewall at range 5100-5105.
|
||||
- BasketUrl=http://basket.api:5103
|
||||
ports:
|
||||
- "5104:80"
|
||||
- "5104:5104"
|
||||
|
||||
basket.api:
|
||||
environment:
|
||||
@ -44,7 +44,7 @@ services:
|
||||
environment:
|
||||
- ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word
|
||||
ports:
|
||||
- "5101:80"
|
||||
- "5101:5101"
|
||||
|
||||
ordering.api:
|
||||
environment:
|
||||
|
@ -57,7 +57,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers
|
||||
.Take(pageSize)
|
||||
.ToListAsync();
|
||||
|
||||
itemsOnPage = ComposePicUri(itemsOnPage);
|
||||
//itemsOnPage = ComposePicUri(itemsOnPage);
|
||||
|
||||
var model = new PaginatedItemsViewModel<CatalogItem>(
|
||||
pageIndex, pageSize, totalItems, itemsOnPage);
|
||||
@ -90,7 +90,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers
|
||||
.Take(pageSize)
|
||||
.ToListAsync();
|
||||
|
||||
itemsOnPage = ComposePicUri(itemsOnPage);
|
||||
//itemsOnPage = ComposePicUri(itemsOnPage);
|
||||
|
||||
var model = new PaginatedItemsViewModel<CatalogItem>(
|
||||
pageIndex, pageSize, totalItems, itemsOnPage);
|
||||
|
@ -47,6 +47,7 @@
|
||||
"publishOptions": {
|
||||
"include": [
|
||||
"wwwroot",
|
||||
"Pics",
|
||||
"Views",
|
||||
"Areas/**/Views",
|
||||
"settings.json",
|
||||
|
0
src/Web/WebMVC/wwwroot/css/site.min.css
vendored
Normal file
0
src/Web/WebMVC/wwwroot/css/site.min.css
vendored
Normal file
@ -11,15 +11,17 @@ import { SecurityService } from '../../shared/services/security.service';
|
||||
templateUrl: './basket-status.component.html'
|
||||
})
|
||||
export class BasketStatusComponent implements OnInit {
|
||||
subscription: Subscription;
|
||||
basketItemAddedSubscription: Subscription;
|
||||
authSubscription: Subscription;
|
||||
basketDroppedSubscription: Subscription;
|
||||
|
||||
badge: number = 0;
|
||||
|
||||
constructor(private service: BasketService, private basketEvents: BasketWrapperService, private authService: SecurityService) { }
|
||||
|
||||
ngOnInit() {
|
||||
// Subscribe to Add Basket Observable:
|
||||
this.subscription = this.basketEvents.addItemToBasket$.subscribe(
|
||||
this.basketItemAddedSubscription = this.basketEvents.addItemToBasket$.subscribe(
|
||||
item => {
|
||||
this.service.setBasket(item).subscribe(res => {
|
||||
this.service.getBasket().subscribe(basket => {
|
||||
@ -28,6 +30,13 @@ export class BasketStatusComponent implements OnInit {
|
||||
});
|
||||
});
|
||||
|
||||
// Subscribe to Drop Basket Observable:
|
||||
this.basketDroppedSubscription = this.service.basketDroped$.subscribe(res =>
|
||||
this.service.getBasket().subscribe(basket => {
|
||||
this.badge = basket.items.length;
|
||||
})
|
||||
);
|
||||
|
||||
// Subscribe to login and logout observable
|
||||
this.authSubscription = this.authService.authenticationChallenge$.subscribe(res => {
|
||||
this.service.getBasket().subscribe(basket => {
|
||||
|
@ -14,6 +14,7 @@ import 'rxjs/add/observable/throw';
|
||||
import { Observer } from 'rxjs/Observer';
|
||||
import 'rxjs/add/operator/map';
|
||||
import 'rxjs/add/operator/catch';
|
||||
import { Subject } from 'rxjs/Subject';
|
||||
|
||||
@Injectable()
|
||||
export class BasketService {
|
||||
@ -23,6 +24,10 @@ export class BasketService {
|
||||
items: []
|
||||
};
|
||||
|
||||
//observable that is fired when the basket is dropped
|
||||
private basketDropedSource = new Subject();
|
||||
basketDroped$ = this.basketDropedSource.asObservable();
|
||||
|
||||
constructor(private service: DataService, private authService: SecurityService, private basketEvents: BasketWrapperService, private router: Router) {
|
||||
this.basket.items = [];
|
||||
|
||||
@ -55,7 +60,7 @@ export class BasketService {
|
||||
}
|
||||
|
||||
dropBasket() {
|
||||
console.log('drop basket!');
|
||||
this.service.delete(this.basketUrl + '/' + this.basket.buyerId);
|
||||
this.basketDropedSource.next();
|
||||
}
|
||||
}
|
@ -17,7 +17,7 @@ namespace eShopConContainers.WebSPA
|
||||
.UseKestrel()
|
||||
.UseConfiguration(config)
|
||||
.UseContentRoot(Directory.GetCurrentDirectory())
|
||||
.UseUrls("http://localhost:5104/")
|
||||
.UseUrls("http://0.0.0.0:5104")
|
||||
.UseIISIntegration()
|
||||
.UseStartup<Startup>()
|
||||
.Build();
|
||||
|
@ -11,7 +11,7 @@
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
"ASPNETCORE_ENVIRONMENT": "Production"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,4 @@
|
||||
{
|
||||
"ConnectionStrings": {
|
||||
"DefaultConnection": "Data Source=AspNetCore.db"
|
||||
},
|
||||
"Logging": {
|
||||
"IncludeScopes": false,
|
||||
"LogLevel": {
|
||||
@ -9,39 +6,5 @@
|
||||
"System": "Information",
|
||||
"Microsoft": "Information"
|
||||
}
|
||||
},
|
||||
"Email": {
|
||||
"From": "",
|
||||
"Subject": "",
|
||||
"SendGrid": {
|
||||
"Username": "",
|
||||
"Password": ""
|
||||
}
|
||||
},
|
||||
"Authentication": {
|
||||
"Google": {
|
||||
"ClientId": "",
|
||||
"ClientSecret": ""
|
||||
},
|
||||
"Facebook": {
|
||||
"AppId": "",
|
||||
"AppSecret": ""
|
||||
},
|
||||
"Microsoft": {
|
||||
"ClientId": "",
|
||||
"ClientSecret": ""
|
||||
},
|
||||
"Twitter": {
|
||||
"ConsumerKey": "",
|
||||
"ConsumerSecret": ""
|
||||
},
|
||||
"Github": {
|
||||
"ClientId": "",
|
||||
"ClientSecret": ""
|
||||
},
|
||||
"LinkedIn": {
|
||||
"ClientId": "",
|
||||
"ClientSecret": ""
|
||||
}
|
||||
}
|
||||
}
|
@ -97,8 +97,7 @@
|
||||
"web.config",
|
||||
"config",
|
||||
"wwwroot",
|
||||
"dockerfile",
|
||||
"wait-for-it.sh"
|
||||
"dockerfile"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user