mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-02-20 17:52:46 +00:00
Disabling experimental features
This commit is contained in:
parent
63987f5df8
commit
8def343892
@ -3,7 +3,6 @@
|
||||
<div class="row">
|
||||
<h1 class="col">Projects</h1>
|
||||
<button
|
||||
*ngIf="settings.experimental_features"
|
||||
class="col"
|
||||
mat-raised-button
|
||||
color="primary"
|
||||
@ -13,7 +12,6 @@
|
||||
Add blank project
|
||||
</button>
|
||||
<button
|
||||
*ngIf="settings.experimental_features"
|
||||
class="col"
|
||||
mat-raised-button
|
||||
color="primary"
|
||||
|
@ -15,11 +15,11 @@
|
||||
>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<!-- <div>
|
||||
<mat-checkbox [(ngModel)]="settings.experimental_features"
|
||||
>Enable experimental features (WARNING: IT CAN BREAK YOU LABS!)</mat-checkbox
|
||||
>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- <div>
|
||||
<mat-checkbox [(ngModel)]="settings.angular_map"
|
||||
|
@ -158,20 +158,4 @@ describe('ProjectService', () => {
|
||||
|
||||
expect(service.isReadOnly(project)).toEqual(true);
|
||||
});
|
||||
|
||||
it('project should be readonly when experimentalFeatures disabled ', () => {
|
||||
const project = new Project();
|
||||
project.readonly = false;
|
||||
spyOn(settingsService, 'isExperimentalEnabled').and.returnValue(false);
|
||||
|
||||
expect(service.isReadOnly(project)).toEqual(true);
|
||||
});
|
||||
|
||||
it('project should not be readonly when experimentalFeatures enabled ', () => {
|
||||
const project = new Project();
|
||||
project.readonly = false;
|
||||
spyOn(settingsService, 'isExperimentalEnabled').and.returnValue(true);
|
||||
|
||||
expect(service.isReadOnly(project)).toEqual(false);
|
||||
});
|
||||
});
|
||||
|
@ -91,6 +91,6 @@ export class ProjectService {
|
||||
if (project.readonly) {
|
||||
return project.readonly;
|
||||
}
|
||||
return !this.settingsService.isExperimentalEnabled();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user