Commit 5b531d07 authored by Qianwen's avatar Qianwen
Browse files

fix error

parent 9ffa9eb8
Pipeline #501687 passed with stages
in 3 minutes and 20 seconds
<div>
<app-top-bar></app-top-bar>
<router-outlet></router-outlet>
\ No newline at end of file
<router-outlet></router-outlet>
</div>
\ No newline at end of file
......@@ -22,13 +22,14 @@ import { MatInputModule } from '@angular/material/input';
import { MatSelectModule } from '@angular/material/select';
import { MatIconModule } from '@angular/material/icon';
const materialModules = [
MatDatepickerModule,
MatNativeDateModule,
MatFormFieldModule,
MatInputModule,
MatIconModule,
MatSelectModule
MatSelectModule,
];
@NgModule({
......
......@@ -141,7 +141,6 @@ export class LoggerComponent implements OnInit {
this.masService.getMASById(params.masid).subscribe((res: any) => {
if (res.agents.counter !== 0) {
this.gridWidth = 600 / res.agents.counter;
console.log(this.gridWidth);
this.agentID = res.agents.instances.map(item => item.id);
for (let i = 0; i < res.agents.counter; i++) {
this.isAgentSelected.push(false);
......@@ -342,8 +341,6 @@ export class LoggerComponent implements OnInit {
drawScaledDates(scaledDates: number[]) {
this.logBoxes = [];
this.communications = [];
console.log(this.logs);
console.log(scaledDates);
for (let i = 0; i < scaledDates.length; i++) {
let currMsg = this.logs[i];
let idx = this.selectedID.indexOf(currMsg.agentid) + 1;
......@@ -361,7 +358,7 @@ export class LoggerComponent implements OnInit {
const data = this.logs[i].data.split(";");
const sender = Number(data[0].split(" ")[1]);
const senderIdx = this.selectedID.indexOf(sender) + 1;
const receiver = Number(data[1].split(" ")[2]);
const receiver = Number(data[1].split(" ")[1]);
const receiverIdx = this.selectedID.indexOf(receiver) + 1;
const direction = (senderIdx < receiverIdx) ? 1 : -1;
if (this.selectedID.includes(receiver) && this.selectedID.includes(sender)) {
......@@ -409,8 +406,7 @@ export class LoggerComponent implements OnInit {
if ("data" in this.logs[i]) {
if (this.logs[i].msg === "ACL send" || this.logs[i].msg === "ACL receive") {
this.popoverContent = this.logs[i].data.split(";");
this.popoverContent[2] = this.popoverContent[2].split(".")[0];
console.log(this.logs[i].data.split("; "))
this.popoverContent[2] = this.popoverContent[2].split(".")[0];
} else {
this.popoverContent = [this.logs[i].timestamp.toString().split(".")[0], this.logs[i].msg]
let data: string[] = this.logs[i].data.split(";");
......@@ -496,7 +492,6 @@ export class LoggerComponent implements OnInit {
this.datesSeries.push(date)
}
this.scaledDatesSeries = this.generateScaledDates(this.datesSeries);
console.log(this.scaledDatesSeries);
const maxDate : number = this.scaledDatesSeries[this.scaledDatesSeries.length - 1]
for (let i = 0; i < this.logSeries.length; i++) {
const x: number = maxDate - this.scaledDatesSeries[i];
......@@ -507,14 +502,12 @@ export class LoggerComponent implements OnInit {
r: 10
}
this.xAxisTicks.push(x)
console.log(typeof x)
this.mapAxisDate.set(x, new Date(this.logSeries[i].timestamp).toLocaleString('de-DE',{ hour12: false }) )
this.bubbleData.push({
name: "agent" + this.logSeries[i].agentid.toString(),
series: [point]
})
}
console.log(this.mapAxisDate);
}
onSelect(data): void {
......@@ -703,8 +696,6 @@ export class LoggerComponent implements OnInit {
}
this.colorPartitionEle = this.getColorPartitionEle();
this.colorLegendTexts = this.getColorLegendTexts(sortedSet);
console.log(this.colorLegendTexts)
console.log(this.colorPartitionEle)
for (const item of res) {
const idx = mapIdx.get(parseInt(item.split("-")[2]));
const color: string = this.colorPartitionEle[this.manualConvertColor(idx, sortedSet.length)];
......
......@@ -2,15 +2,24 @@
.status {
color: var(--primary-color);
text-align: center;
margin-top: 300px;
font-size: 50px;
font-weight: 300;
}
.process-spinner {
width: 8rem;
height: 8rem;
color: var(--primary-color);
}
.overview-empty {
height: 100%;
}
.overview-empty button {
position: relative;
margin-top: 60px;
margin-left: 750px;
height:60px;
width: 160px;
font-size: larger;
......@@ -63,17 +72,17 @@
/* overview with agency*/
.maincontainer {
height: 90%;
width:100%;
padding-top: 10px;
position: relative;
display:flex;
left: 0;
top:60px;
height: 100%;
width:100%;
}
.contentcontainer {
border-radius: 5px;
height: 100%;
position: relative;
display: flex;
flex-direction: column;
......@@ -102,7 +111,6 @@
margin-top: px;
margin-left:300px;
margin-right:10px;
}
......@@ -156,3 +164,6 @@
......@@ -38,7 +38,7 @@
</div>
</ng-template>
<div class="contentcontainer" >
<div class="contentcontainer">
<div *ngIf="MASID.length !== 0">
<div class="title">
<div class="title-name" >Overview</div>
......@@ -90,9 +90,11 @@
</div>
<pagination-controls class="pagination" (pageChange)="q = $event"></pagination-controls>
</div>
<div class="overview-empty" *ngIf="MASID.length === 0">
<div class="status">{{status}}</div>
<div class="overview-empty d-flex flex-column justify-content-center align-items-center" *ngIf="MASID.length === 0">
<div *ngIf="status==='Currently no MASs, create one......'" class="spinner-border process-spinner mb-5" role="status">
<span class="sr-only">Loading...</span>
</div>
<p class="status mb-5">{{status}}</p>
<button *ngIf="status==='Currently no MASs, create one......'" type='button' class="btn my-btn" (click)="openLg(content)">+ New MAS</button>
</div>
</div>
......
header {
height:60px;
height:10%;
position:absolute;
top:0;
left: 0;
......
/* You can add global styles to this file, and also import other style files */
html,body {
font-family: 'Lato', sans-serif;
/* height: 100%;
width:100%; */
height: 100%;
width:100%;
padding: 0;
margin: 0;
}
app-root {
width: 100%;
height: 100%;
display: inline-block;
}
:root {
--primary-color: rgb(102,102,255);
--light-primary-color: #9696f3;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment