mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-01-02 02:56:42 +00:00
Merge branch 'master-3.0' into Remove-GNS3-VM-specific-code
This commit is contained in:
commit
5270134626
@ -54,6 +54,7 @@ import { ConsoleGuard } from './guards/console-guard';
|
||||
import { LoginGuard } from './guards/login-guard';
|
||||
import { DefaultLayoutComponent } from './layouts/default-layout/default-layout.component';
|
||||
import { ServerResolve } from './resolvers/server-resolve';
|
||||
import { UserManagementComponent } from './components/user-management/user-management.component';
|
||||
import { LoggedUserComponent } from './components/users/logged-user/logged-user.component';
|
||||
|
||||
const routes: Routes = [
|
||||
@ -207,10 +208,15 @@ const routes: Routes = [
|
||||
component: WebConsoleFullWindowComponent,
|
||||
canActivate: [LoginGuard]
|
||||
},
|
||||
{
|
||||
path: 'user_management',
|
||||
component: UserManagementComponent
|
||||
},
|
||||
{
|
||||
path: '**',
|
||||
component: PageNotFoundComponent,
|
||||
},
|
||||
}
|
||||
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
@ -267,6 +267,7 @@ import { MarkedDirective } from './directives/marked.directive';
|
||||
import { LoginComponent } from './components/login/login.component';
|
||||
import { LoginService } from './services/login.service';
|
||||
import { HttpRequestsInterceptor } from './interceptors/http.interceptor';
|
||||
import { UserManagementComponent } from './components/user-management/user-management.component'
|
||||
import { UserService } from './services/user.service';
|
||||
import { LoggedUserComponent } from './components/users/logged-user/logged-user.component';
|
||||
|
||||
@ -453,6 +454,7 @@ import { LoggedUserComponent } from './components/users/logged-user/logged-user.
|
||||
TemplateNameDialogComponent,
|
||||
ConfigureCustomAdaptersDialogComponent,
|
||||
EditNetworkConfigurationDialogComponent,
|
||||
UserManagementComponent,
|
||||
ProjectReadmeComponent
|
||||
],
|
||||
imports: [
|
||||
|
@ -0,0 +1,3 @@
|
||||
<p>
|
||||
user-management works!
|
||||
</p>
|
@ -0,0 +1,28 @@
|
||||
/* tslint:disable:no-unused-variable */
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { DebugElement } from '@angular/core';
|
||||
|
||||
import { UserManagementComponent } from './user-management.component';
|
||||
|
||||
describe('UserManagementComponent', () => {
|
||||
let component: UserManagementComponent;
|
||||
let fixture: ComponentFixture<UserManagementComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ UserManagementComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(UserManagementComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-user-management',
|
||||
templateUrl: './user-management.component.html',
|
||||
styleUrls: ['./user-management.component.scss']
|
||||
})
|
||||
export class UserManagementComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
@ -23,6 +23,10 @@
|
||||
<mat-icon>settings</mat-icon>
|
||||
<span>Settings</span>
|
||||
</button>
|
||||
<button mat-menu-item routerLink="/user_management">
|
||||
<mat-icon>groups</mat-icon>
|
||||
<span>User management</span>
|
||||
</button>
|
||||
<button mat-menu-item routerLink="/installed-software" [disabled]="!isInstalledSoftwareAvailable">
|
||||
<mat-icon>cloud_download</mat-icon>
|
||||
<span>Installed software</span>
|
||||
|
@ -14,7 +14,6 @@ import { ServerManagementService, ServerStateEvent } from '../../services/server
|
||||
import { ToasterService } from '../../services/toaster.service';
|
||||
import { MockedToasterService } from '../../services/toaster.service.spec';
|
||||
import { DefaultLayoutComponent } from './default-layout.component';
|
||||
import { IndexedDbService } from '../../services/indexed-db.service';
|
||||
import { HttpServer, ServerErrorHandler } from '../../services/http-server.service';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
|
||||
@ -33,7 +32,6 @@ describe('DefaultLayoutComponent', () => {
|
||||
let electronServiceMock: ElectronServiceMock;
|
||||
let serverManagementService = new MockedServerManagementService();
|
||||
let serverService: ServerService;
|
||||
let indexedDbService: IndexedDbService;
|
||||
let httpServer: HttpServer;
|
||||
let errorHandler: ServerErrorHandler;
|
||||
|
||||
@ -62,14 +60,12 @@ describe('DefaultLayoutComponent', () => {
|
||||
useClass: RecentlyOpenedProjectService,
|
||||
},
|
||||
{ provide: ServerService },
|
||||
{ provide: IndexedDbService },
|
||||
{ provide: HttpServer },
|
||||
{ provide: ServerErrorHandler },
|
||||
ProgressService,
|
||||
],
|
||||
}).compileComponents();
|
||||
|
||||
indexedDbService = TestBed.inject(IndexedDbService);
|
||||
errorHandler = TestBed.inject(ServerErrorHandler);
|
||||
httpServer = TestBed.inject(HttpServer);
|
||||
serverService = TestBed.inject(ServerService);
|
||||
|
Loading…
Reference in New Issue
Block a user