Skip to content
Snippets Groups Projects
Commit de488650 authored by AndiMajore's avatar AndiMajore
Browse files

added warning for empty network input

parent db122ce2
No related branches found
No related tags found
No related merge requests found
......@@ -431,6 +431,7 @@ export class AnalysisPanelComponent implements OnInit, OnChanges, AfterViewInit
this.proteins = [];
this.effects = [];
console.log(result.network)
const network = result.network;
network.nodes = [...new Set<string>(network.nodes)];
......
<div id="parser-issue-banner" *ngIf="!getClosedState()" class="center notification" style="background-color: rgba(255,41,41,0.6);">
<button class="delete" (click)="close()"></button>
<span class="px-6">Missing network groups: {{getGroupString()}} .Please contact the page developer to get this issue resolved or check the browser console.</span>
<span class="px-6">Missing network groups: {{getGroupString()}}! Please contact the page developer to get this issue resolved or check the browser console.</span>
</div>
......@@ -16,7 +16,7 @@ export class GroupWarningComponent implements OnInit {
}
getClosedState() {
return !this.drugstoneConfig.groupIssue;
return this.drugstoneConfig.gettingNetworkIssue || !this.drugstoneConfig.groupIssue;
}
getGroupString() {
......
<div id="parser-issue-banner" *ngIf="!getClosedState()" class="center notification" style="background-color: rgba(255,41,41,0.6);">
<span class="px-6">Network input is missing! Please contact the page developer to get this issue resolved or check the browser console.</span>
</div>
@import "src/stylesheets/variables";
#parser-issue-banner{
position: absolute;
bottom: 0;
z-index: $parser-issue-banner-z;
width: 100%;
padding-left: 0;
padding-right: 0;
&.disabled {
display: none;
}
}
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { NetworkWarningComponent } from './network-warning.component';
describe('NetworkWarningComponent', () => {
let component: NetworkWarningComponent;
let fixture: ComponentFixture<NetworkWarningComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ NetworkWarningComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(NetworkWarningComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
import {DrugstoneConfigService} from '../../services/drugstone-config/drugstone-config.service';
@Component({
selector: 'app-network-warning',
templateUrl: './network-warning.component.html',
styleUrls: ['./network-warning.component.scss']
})
export class NetworkWarningComponent implements OnInit {
constructor(public drugstoneConfig: DrugstoneConfigService) {
}
ngOnInit(): void {
}
getClosedState() {
return !this.drugstoneConfig.gettingNetworkIssue;
}
}
......@@ -15,7 +15,7 @@ export class ParserWarningComponent implements OnInit {
}
getClosedState() {
return this.drugstoneConfig.groupIssue || !(this.drugstoneConfig.parsingIssueGroups || this.drugstoneConfig.parsingIssueConfig || this.drugstoneConfig.parsingIssueNetwork);
return this.drugstoneConfig.gettingNetworkIssue || this.drugstoneConfig.groupIssue || !(this.drugstoneConfig.parsingIssueGroups || this.drugstoneConfig.parsingIssueConfig || this.drugstoneConfig.parsingIssueNetwork);
}
getConfigs() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment