Skip to content
Snippets Groups Projects
Commit 8ecd618c authored by Lukasz Lopatowski's avatar Lukasz Lopatowski
Browse files

Merge branch '294-add-domain-to-cluster' into 'develop'

294 add domain to cluster

See merge request !183
parents b292dc20 e44c7f7b
No related branches found
No related tags found
2 merge requests!184Develop,!183294 add domain to cluster
...@@ -15,4 +15,6 @@ export class ClusterManager { ...@@ -15,4 +15,6 @@ export class ClusterManager {
public externalNetworks: ClusterExtNetwork[] public externalNetworks: ClusterExtNetwork[]
public domainNames: string[]; public domainNames: string[];
public state : string; public state : string;
public currentStateSince: Date;
public contactEmail: string;
} }
\ No newline at end of file
<div style="display: flex; align-items: center; margin-top:20px"> <div style="display: flex; align-items: center; margin-top:20px">
<div style="margin-right:20px"> <div style="margin-right:20px">
<div > <div >
<button class="btn btn-primary" (click)="modal.show()">New Cluster</button> <button class="btn btn-primary" (click)="openModal()">New Cluster</button>
</div> </div>
</div> </div>
<div class="flex" style="margin-right:20px"> <div class="flex" style="margin-right:20px">
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
</a> </a>
<ul class="dropdown-menu pull-right-drop" > <ul class="dropdown-menu pull-right-drop" >
<li><a [routerLink]="[ cluster.id]" class=""> <li><a [routerLink]="[ cluster.id]" class="">
{{ 'CLUSTERS.CONFIGURATION' | translate }}</a> {{ 'CLUSTERS.DETAILS' | translate }}</a>
</li> </li>
</ul> </ul>
</span> </span>
...@@ -78,9 +78,14 @@ ...@@ -78,9 +78,14 @@
</div> </div>
<div class="mt-4"> <div class="mt-4">
<label for="name">{{'CLUSTERS.DESCRIPTION' | translate}}</label> <label for="desc">{{'CLUSTERS.DESCRIPTION' | translate}}</label>
<input id="name" type="text" class="form-control" [(ngModel)]="addedCluster.description" [ngModelOptions]="{standalone: true}"> <input id="desc" type="text" class="form-control" [(ngModel)]="addedCluster.description" [ngModelOptions]="{standalone: true}">
</div> </div>
<div class="mt-4">
<label for="contactEmail">{{'CLUSTERS.CONTACT_MAIL' | translate}}</label>
<input id="contactEmail" type="text" class="form-control" [(ngModel)]="addedCluster.contactEmail" [ngModelOptions]="{standalone: true}">
</div>
<div class="mt-4"> <div class="mt-4">
<label for="name">{{'CLUSTERS.DOMAIN' | translate}}</label> <label for="name">{{'CLUSTERS.DOMAIN' | translate}}</label>
......
...@@ -65,6 +65,12 @@ public onDomainSelection(event: any) { ...@@ -65,6 +65,12 @@ public onDomainSelection(event: any) {
} }
public openModal() {
if(this.domains.length > 0) {
this.addedCluster.domainNames = [this.domains[0].name];
}
this.modal.show();
}
......
...@@ -70,6 +70,16 @@ ...@@ -70,6 +70,16 @@
</div> </div>
</div> </div>
<div class="form-group">
<label for="state" class="col-sm-2 control-label">{{ 'CLUSTERS.STATE_SINCE' | translate }}</label>
<div class="col-sm-10">
<div class="col-sm-10">
<input type="text" class="form-control" id="state" name="state"
[ngModel]="formatDate(cluster.currentStateSince)" [disabled]="true">
</div>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label for="clusterCreationDate" class="col-sm-2 control-label">{{ 'CLUSTERS.CREATION_DATE' | translate }}</label> <label for="clusterCreationDate" class="col-sm-2 control-label">{{ 'CLUSTERS.CREATION_DATE' | translate }}</label>
......
...@@ -22,6 +22,8 @@ describe('ClusterManagerDetailsComponent', () => { ...@@ -22,6 +22,8 @@ describe('ClusterManagerDetailsComponent', () => {
id: 1, id: 1,
name: 'Test Cluster', name: 'Test Cluster',
state: "UP", state: "UP",
currentStateSince: new Date('2025-01-01'),
contactEmail: "test@test.test",
description: 'Test Description', description: 'Test Description',
externalNetworks: [], externalNetworks: [],
creationDate: new Date('2025-01-01'), creationDate: new Date('2025-01-01'),
...@@ -171,6 +173,8 @@ describe('ClusterManagerDetailsComponent', () => { ...@@ -171,6 +173,8 @@ describe('ClusterManagerDetailsComponent', () => {
id: 1, id: 1,
name: 'Test Cluster', name: 'Test Cluster',
state:"UP", state:"UP",
currentStateSince: new Date('2025-01-01'),
contactEmail: "test@test.test",
description: 'Test Description', description: 'Test Description',
externalNetworks: [], externalNetworks: [],
creationDate: new Date('2025-01-01'), creationDate: new Date('2025-01-01'),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment