Skip to content

Commit

Permalink
🔭 [Frontend/ProductCatalogService] Updated Product Catalog Service Da…
Browse files Browse the repository at this point in the history
…ta to Match Astronomy Store (#285)
  • Loading branch information
xoscar authored Aug 19, 2022
1 parent eca1ae1 commit f948dcd
Show file tree
Hide file tree
Showing 21 changed files with 131 additions and 130 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,5 @@ significant modifications will be credited to OpenTelemetry Authors.
([#316](https://github.com/open-telemetry/opentelemetry-demo/pull/316))
* Simplified and cleaned up ProductCatalogService
([#317](https://github.com/open-telemetry/opentelemetry-demo/pull/317))
* Updated Product Catalog to Match Astronomy Webstore
([#285](https://github.com/open-telemetry/opentelemetry-demo/pull/285))
39 changes: 19 additions & 20 deletions src/adservice/src/main/java/hipstershop/AdService.java
Original file line number Diff line number Diff line change
Expand Up @@ -181,48 +181,47 @@ private void blockUntilShutdown() throws InterruptedException {
}

private static ImmutableListMultimap<String, Ad> createAdsMap() {
Ad hairdryer =
Ad binoculars =
Ad.newBuilder()
.setRedirectUrl("/product/2ZYFJ3GM2N")
.setText("Hairdryer for sale. 50% off.")
.setText("Roof Binoculars for sale. 50% off.")
.build();
Ad tankTop =
Ad explorerTelescope =
Ad.newBuilder()
.setRedirectUrl("/product/66VCHSJNUP")
.setText("Tank top for sale. 20% off.")
.setText("Starsense Explorer Refractor Telescope for sale. 20% off.")
.build();
Ad candleHolder =
Ad colorImager =
Ad.newBuilder()
.setRedirectUrl("/product/0PUK6V6EV0")
.setText("Candle holder for sale. 30% off.")
.setText("Solar System Color Imager for sale. 30% off.")
.build();
Ad bambooGlassJar =
Ad opticalTube =
Ad.newBuilder()
.setRedirectUrl("/product/9SIQT8TOJO")
.setText("Bamboo glass jar for sale. 10% off.")
.setText("Optical Tube Assembly for sale. 10% off.")
.build();
Ad watch =
Ad travelTelescope =
Ad.newBuilder()
.setRedirectUrl("/product/1YMWWN1N4O")
.setText("Watch for sale. Buy one, get second kit for free")
.setText("Eclipsmart Travel Refractor Telescope for sale. Buy one, get second kit for free")
.build();
Ad mug =
Ad solarFilter =
Ad.newBuilder()
.setRedirectUrl("/product/6E92ZMYYFZ")
.setText("Mug for sale. Buy two, get third one for free")
.setText("Solar Filter for sale. Buy two, get third one for free")
.build();
Ad loafers =
Ad cleaningKit =
Ad.newBuilder()
.setRedirectUrl("/product/L9ECAV7KIM")
.setText("Loafers for sale. Buy one, get second one for free")
.setText("Lens Cleaning Kit for sale. Buy one, get second one for free")
.build();
return ImmutableListMultimap.<String, Ad>builder()
.putAll("clothing", tankTop)
.putAll("accessories", watch)
.putAll("footwear", loafers)
.putAll("hair", hairdryer)
.putAll("decor", candleHolder)
.putAll("kitchen", bambooGlassJar, mug)
.putAll("binoculars", binoculars)
.putAll("telescopes", explorerTelescope)
.putAll("accessories", colorImager, solarFilter, cleaningKit)
.putAll("assembly", opticalTube)
.putAll("travel", travelTelescope)
.build();
}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed src/frontend/public/static/img/products/loafers.jpg
Binary file not shown.
Binary file removed src/frontend/public/static/img/products/mug.jpg
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed src/frontend/public/static/img/products/watch.jpg
Binary file not shown.
220 changes: 110 additions & 110 deletions src/productcatalogservice/products.json
Original file line number Diff line number Diff line change
@@ -1,112 +1,112 @@
{
"products": [
{
"id": "OLJCESPC7Z",
"name": "Sunglasses",
"description": "Add a modern touch to your outfits with these sleek aviator sunglasses.",
"picture": "/static/img/products/sunglasses.jpg",
"priceUsd": {
"currencyCode": "USD",
"units": 19,
"nanos": 990000000
},
"categories": ["accessories"]
},
{
"id": "66VCHSJNUP",
"name": "Tank Top",
"description": "Perfectly cropped cotton tank, with a scooped neckline.",
"picture": "/static/img/products/tank-top.jpg",
"priceUsd": {
"currencyCode": "USD",
"units": 18,
"nanos": 990000000
},
"categories": ["clothing", "tops"]
},
{
"id": "1YMWWN1N4O",
"name": "Watch",
"description": "This gold-tone stainless steel watch will work with most of your outfits.",
"picture": "/static/img/products/watch.jpg",
"priceUsd": {
"currencyCode": "USD",
"units": 109,
"nanos": 990000000
},
"categories": ["accessories"]
},
{
"id": "L9ECAV7KIM",
"name": "Loafers",
"description": "A neat addition to your summer wardrobe.",
"picture": "/static/img/products/loafers.jpg",
"priceUsd": {
"currencyCode": "USD",
"units": 89,
"nanos": 990000000
},
"categories": ["footwear"]
},
{
"id": "2ZYFJ3GM2N",
"name": "Hairdryer",
"description": "This lightweight hairdryer has 3 heat and speed settings. It's perfect for travel.",
"picture": "/static/img/products/hairdryer.jpg",
"priceUsd": {
"currencyCode": "USD",
"units": 24,
"nanos": 990000000
},
"categories": ["hair", "beauty"]
},
{
"id": "0PUK6V6EV0",
"name": "Candle Holder",
"description": "This small but intricate candle holder is an excellent gift.",
"picture": "/static/img/products/candle-holder.jpg",
"priceUsd": {
"currencyCode": "USD",
"units": 18,
"nanos": 990000000
},
"categories": ["decor", "home"]
},
{
"id": "LS4PSXUNUM",
"name": "Salt & Pepper Shakers",
"description": "Add some flavor to your kitchen.",
"picture": "/static/img/products/salt-and-pepper-shakers.jpg",
"priceUsd": {
"currencyCode": "USD",
"units": 18,
"nanos": 490000000
},
"categories": ["kitchen"]
},
{
"id": "9SIQT8TOJO",
"name": "Bamboo Glass Jar",
"description": "This bamboo glass jar can hold 57 oz (1.7 l) and is perfect for any kitchen.",
"picture": "/static/img/products/bamboo-glass-jar.jpg",
"priceUsd": {
"currencyCode": "USD",
"units": 5,
"nanos": 490000000
},
"categories": ["kitchen"]
},
{
"id": "6E92ZMYYFZ",
"name": "Mug",
"description": "A simple mug with a mustard interior.",
"picture": "/static/img/products/mug.jpg",
"priceUsd": {
"currencyCode": "USD",
"units": 8,
"nanos": 990000000
},
"categories": ["kitchen"]
}
]
"products": [
{
"id": "OLJCESPC7Z",
"name": "Natiolal Park Foundation Explorascope",
"description": "The National Park Foundation’s (NPF) Explorascope 60AZ is a manual alt-azimuth, refractor telescope perfect for celestial viewing on the go. The NPF Explorascope 60 can view the planets, moon, star clusters and brighter deep sky objects like the Orion Nebula and Andromeda Galaxy.",
"picture": "/images/products/NatiolalParkFoundationExplorascope.jpg",
"priceUsd": {
"currencyCode": "USD",
"units": 101,
"nanos": 960000000
},
"categories": ["telescopes"]
},
{
"id": "66VCHSJNUP",
"name": "Starsense Explorer Refractor Telescope",
"description": "The first telescope that uses your smartphone to analyze the night sky and calculate its position in real time. StarSense Explorer is ideal for beginners thanks to the app’s user-friendly interface and detailed tutorials. It’s like having your own personal tour guide of the night sky",
"picture": "/images/products/StarsenseExplorer.jpg",
"priceUsd": {
"currencyCode": "USD",
"units": 349,
"nanos": 950000000
},
"categories": ["telescopes"]
},
{
"id": "1YMWWN1N4O",
"name": "Eclipsmart Travel Refractor Telescope",
"description": "Dedicated white-light solar scope for the observer on the go. The 50mm refracting solar scope uses Solar Safe, ISO compliant, full-aperture glass filter material to ensure the safest view of solar events. The kit comes complete with everything you need, including the dedicated travel solar scope, a Solar Safe finderscope, tripod, a high quality 20mm (18x) Kellner eyepiece and a nylon backpack to carry everything in. This Travel Solar Scope makes it easy to share the Sun as well as partial and total solar eclipses with the whole family and offers much higher magnifications than you would otherwise get using handheld solar viewers or binoculars.",
"picture": "/images/products/EclipsmartTravelRefractorTelescope.jpg",
"priceUsd": {
"currencyCode": "USD",
"units": 129,
"nanos": 950000000
},
"categories": ["telescopes", "travel"]
},
{
"id": "L9ECAV7KIM",
"name": "Lens Cleaning Kit",
"description": "Wipe away dust, dirt, fingerprints and other particles on your lenses to see clearly with the Lens Cleaning Kit. This cleaning kit works on all glass and optical surfaces, including telescopes, binoculars, spotting scopes, monoculars, microscopes, and even your camera lenses, computer screens, and mobile devices. The kit comes complete with a retractable lens brush to remove dust particles and dirt and two options to clean smudges and fingerprints off of your optics, pre-moistened lens wipes and a bottled lens cleaning fluid with soft cloth.",
"picture": "/images/products/LensCleaningKit.jpg",
"priceUsd": {
"currencyCode": "USD",
"units": 21,
"nanos": 950000000
},
"categories": ["accessories"]
},
{
"id": "2ZYFJ3GM2N",
"name": "Roof Binoculars",
"description": "This versatile, all-around binocular is a great choice for the trail, the stadium, the arena, or just about anywhere you want a close-up view of the action without sacrificing brightness or detail. It’s an especially great companion for nature observation and bird watching, with ED glass that helps you spot the subtlest field markings and a close focus of just 6.5 feet.",
"picture": "/images/products/RoofBinoculars.jpg",
"priceUsd": {
"currencyCode": "USD",
"units": 209,
"nanos": 950000000
},
"categories": ["binoculars"]
},
{
"id": "0PUK6V6EV0",
"name": "Solar System Color Imager",
"description": "You have your new telescope and have observed Saturn and Jupiter. Now you're ready to take the next step and start imaging them. But where do you begin? The NexImage 10 Solar System Imager is the perfect solution.",
"picture": "/images/products/SolarSystemColorImager.jpg",
"priceUsd": {
"currencyCode": "USD",
"units": 175,
"nanos": 0
},
"categories": ["accessories", "telescopes"]
},
{
"id": "LS4PSXUNUM",
"name": "Red Flashlight",
"description": "This 3-in-1 device features a 3-mode red flashlight, a hand warmer, and a portable power bank for recharging your personal electronics on the go. Whether you use it to light the way at an astronomy star party, a night walk, or wildlife research, ThermoTorch 3 Astro Red’s rugged, IPX4-rated design will withstand your everyday activities.",
"picture": "/images/products/RedFlashlight.jpg",
"priceUsd": {
"currencyCode": "USD",
"units": 57,
"nanos": 80000000
},
"categories": ["accessories", "flashlights"]
},
{
"id": "9SIQT8TOJO",
"name": "Optical Tube Assembly",
"description": "Capturing impressive deep-sky astroimages is easier than ever with Rowe-Ackermann Schmidt Astrograph (RASA) V2, the perfect companion to today’s top DSLR or astronomical CCD cameras. This fast, wide-field f/2.2 system allows for shorter exposure times compared to traditional f/10 astroimaging, without sacrificing resolution. Because shorter sub-exposure times are possible, your equatorial mount won’t need to accurately track over extended periods. The short focal length also lessens equatorial tracking demands. In many cases, autoguiding will not be required.",
"picture": "/images/products/OpticalTubeAssembly.jpg",
"priceUsd": {
"currencyCode": "USD",
"units": 3599,
"nanos": 0
},
"categories": ["accessories", "telescopes", "assembly"]
},
{
"id": "6E92ZMYYFZ",
"name": "Solar Filter",
"description": "Enhance your viewing experience with EclipSmart Solar Filter for 8” telescopes. With two Velcro straps and four self-adhesive Velcro pads for added safety, you can be assured that the solar filter cannot be accidentally knocked off and will provide Solar Safe, ISO compliant viewing.",
"picture": "/images/products/SolarFilter.jpg",
"priceUsd": {
"currencyCode": "USD",
"units": 69,
"nanos": 950000000
},
"categories": ["accessories", "telescopes"]
}
]
}

0 comments on commit f948dcd

Please sign in to comment.