Skip to content

Commit

Permalink
Use reverse proxy to redirect to containers
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 864979e9920a95e565bd74bba30aac7caba47ddc
  • Loading branch information
mohamedalibarkailluin authored and Gitlab-CI committed Dec 4, 2024
1 parent 6e87a12 commit a0c0890
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 2 deletions.
4 changes: 4 additions & 0 deletions front/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## Unreleased

### Added
- Redirect to containers through reverse proxy

## 2.24.6
### Fixed
- Hide autoscaling column when deployment_enabled is false
Expand Down
2 changes: 1 addition & 1 deletion front/src/app/app-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface IAppConfig {
login_url: string;
logout_url: string;
};
deployment_enabled: boolean
deployment_enabled: boolean;
}

export const APP_CONFIG = new InjectionToken<IAppConfig>('config');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { FlexLayoutModule } from "@angular/flex-layout";
import { RouterModule } from "@angular/router";
import { SnackNotificationModule } from "../utils/snack-notification/snack-notification.module";
import { DisplayCustomContainerPortComponent } from './display-custom-container-port/display-custom-container-port.component';
import { MatTooltipModule } from '@angular/material/tooltip';



Expand All @@ -29,6 +30,7 @@ import { DisplayCustomContainerPortComponent } from './display-custom-container-
MatInputModule,
MatButtonModule,
MatIconModule,
MatTooltipModule,
FlexLayoutModule,
RouterModule,
SnackNotificationModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@
<span *ngIf="containerPort?.description !== 'default'">à "{{ containerPort?.description }}"</span>:&nbsp;
</strong>
<div fxLayout="row" fxLayoutAlign="start center" style="margin-left: 15px">
<a mat-raised-button color="primary" href="http://{{ ipAddress }}:{{ containerPort?.portMapTo }}" target="_blank" rel="noopener noreferrer" style="margin-top: 5px">
<a
mat-raised-button
color="primary"
href="{{ getContainerUrl() }}"
target="_blank"
rel="noopener noreferrer"
style="margin-top: 5px"
matTooltip="http://{{ ipAddress }}:{{ containerPort?.portMapTo }}"
matTooltipShowDelay=1500
>
Connexion à l'interface
</a>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ import { IContainerPort } from "../../shell/interfaces/container-port";
export class HttpConnectionGuideComponent {
@Input() containerPort: IContainerPort | null = null;
@Input() ipAddress: string | undefined = '';

getContainerUrl(): string {
return this.containerPort?.hostname ? "https://" + this.containerPort?.hostname: "http://" + this.ipAddress + ':' + this.containerPort?.portMapTo
}
}
1 change: 1 addition & 0 deletions front/src/app/modules/ports-form/interfaces/port.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export interface IPort {
mapPort: number;
connectionType: ConnectionType;
requiredToAccessContainer: boolean;
hostname: string;
}

export enum ConnectionType {
Expand Down

0 comments on commit a0c0890

Please sign in to comment.