Skip to content

Commit

Permalink
Merge branch 'develop' into feature/MARP-810-German-translation-for-d…
Browse files Browse the repository at this point in the history
…etail-page-with-missing-sections
  • Loading branch information
Phạm Duy Linh authored Aug 16, 2024
2 parents b32735e + 76f49c2 commit 361370d
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ui-ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ jobs:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

steps:
- name: Setup chrome
uses: browser-actions/setup-chrome@v1

- name: Execute Tests
run: |
cd ./marketplace-ui
Expand Down
4 changes: 2 additions & 2 deletions marketplace-build/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Get starts with Marketplace build

### Set up MongoDB with authentication mode
* Navigate to ``marketplace-build/config/mongodb`` and execute the ``docker-compose up -d`` to start MongoDB with non-auth mode and create a root admin user.
* Navigate to ``marketplace-build/config/mongodb`` and execute the ``docker-compose -f non-authen-docker-compose.yml up -d`` to start MongoDB with non-auth mode and create a root admin user.

* [Optional] Execute authentication test for the created user
```
Expand All @@ -23,7 +23,7 @@ This command should return the ``OK`` code

* Run ``docker-compose up -d --build`` to start a Marketplace DEV at the local

> In case you want to set up the MongoDB as a standalone compose. Please run `docker-compose -f mongodb-docker-compose.yml up`
> In case you want to set up the MongoDB as a standalone compose. Please run `docker-compose -f authen-docker-compose.yml up -d` in ``marketplace-build/config/mongodb``
### Docker release
To release a new version for marketplace images, please trigger the ``Docker Release`` actions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ services:
mongodb:
container_name: mongodb
build:
context: ../config/mongodb
dockerfile: Dockerfile
restart: always
ports:
Expand All @@ -14,7 +13,7 @@ services:
MONGODB_INITDB_ROOT_PASSWORD: ${MONGODB_INITDB_ROOT_PASSWORD}
volumes:
- mongodata:/data/db
- ../config/mongodb/mongod.conf:/etc/mongod.conf
- ./mongod.conf:/etc/mongod.conf

volumes:
mongodata:
3 changes: 0 additions & 3 deletions marketplace-build/dev/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,3 @@ services:
- BUILD_VERSION=${BUILD_VERSION}
ports:
- "8080:8080"

volumes:
mongodata:
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { AuthService } from '../../../auth/auth.service';
import { ProductStarRatingNumberComponent } from './product-star-rating-number/product-star-rating-number.component';
import { ProductInstallationCountActionComponent } from './product-installation-count-action/product-installation-count-action.component';
import { ProductTypeIconPipe } from '../../../shared/pipes/icon.pipe';
import { Observable } from 'rxjs';
import { interval, Observable } from 'rxjs';
import { ProductStarRatingService } from './product-detail-feedback/product-star-rating-panel/product-star-rating.service';
import { RoutingQueryParamService } from '../../../shared/services/routing.query.param.service';

Expand All @@ -42,6 +42,7 @@ export interface DetailTab {

const STORAGE_ITEM = 'activeTab';
const DEFAULT_ACTIVE_TAB = 'description';
const SCROLL_INTERVAL = 500;
@Component({
selector: 'app-product-detail',
standalone: true,
Expand Down Expand Up @@ -102,7 +103,9 @@ export class ProductDetailComponent {
this.updateDropdownSelection();
}


constructor() {
this.scrollToTop();
this.resizeObserver = new ResizeObserver(() => {
this.updateDropdownSelection();
});
Expand Down Expand Up @@ -130,6 +133,15 @@ export class ProductDetailComponent {
this.updateDropdownSelection();
}

scrollToTop() {
const intervalSub = interval(SCROLL_INTERVAL).subscribe(() => {
window.scrollTo({left: 0, top: 0, behavior: 'instant'});
});
setTimeout(() => {
intervalSub.unsubscribe();
}, 1000);
}

getProductById(productId: string): Observable<ProductDetail> {
const targetVersion =
this.routingQueryParamService.getDesignerVersionFromCookie();
Expand Down

0 comments on commit 361370d

Please sign in to comment.