mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-01-18 02:39:50 +00:00
Reorganize structure of files
This commit is contained in:
parent
80f3a63b6f
commit
e793d288a3
@ -9,17 +9,17 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { MapComponent } from './map/map.component';
|
||||
import { MapComponent } from './cartography/map/map.component';
|
||||
import { ProjectMapComponent } from './project-map/project-map.component';
|
||||
import { ServersComponent, AddServerDialogComponent } from './servers/servers.component';
|
||||
import { ProjectsComponent } from './projects/projects.component';
|
||||
|
||||
import { VersionService } from './services/version.service';
|
||||
import { ProjectService } from './services/project.service';
|
||||
import { SymbolService } from "./services/symbol.service";
|
||||
import { ServerService } from "./services/server.service";
|
||||
import { IndexedDbService } from "./services/indexed-db.service";
|
||||
import { HttpServer } from "./services/http-server.service";
|
||||
import { VersionService } from './shared/services/version.service';
|
||||
import { ProjectService } from './shared/services/project.service';
|
||||
import { SymbolService } from "./shared/services/symbol.service";
|
||||
import { ServerService } from "./shared/services/server.service";
|
||||
import { IndexedDbService } from "./shared/services/indexed-db.service";
|
||||
import { HttpServer } from "./shared/services/http-server.service";
|
||||
import { DefaultLayoutComponent } from './default-layout/default-layout.component';
|
||||
|
||||
|
||||
|
11
src/app/cartography/cartography.module.ts
Normal file
11
src/app/cartography/cartography.module.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { MapComponent } from './map/map.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule
|
||||
],
|
||||
declarations: [MapComponent]
|
||||
})
|
||||
export class CartographyModule { }
|
@ -1,4 +1,4 @@
|
||||
import {Link} from "../../../models/link";
|
||||
import {Link} from "../../shared/models/link.model";
|
||||
|
||||
export class MultiLinkCalculatorHelper {
|
||||
LINK_WIDTH = 2;
|
1
src/app/cartography/map/map.component.html
Normal file
1
src/app/cartography/map/map.component.html
Normal file
@ -0,0 +1 @@
|
||||
<svg preserveAspectRatio="none"></svg>
|
After Width: | Height: | Size: 39 B |
3
src/app/cartography/map/map.component.scss
Normal file
3
src/app/cartography/map/map.component.scss
Normal file
@ -0,0 +1,3 @@
|
||||
svg {
|
||||
display: block;
|
||||
}
|
25
src/app/cartography/map/map.component.spec.ts
Normal file
25
src/app/cartography/map/map.component.spec.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { MapComponent } from './map.component';
|
||||
|
||||
describe('MapComponent', () => {
|
||||
let component: MapComponent;
|
||||
let fixture: ComponentFixture<MapComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ MapComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
// beforeEach(() => {
|
||||
// fixture = TestBed.createComponent(MapComponent);
|
||||
// component = fixture.componentInstance;
|
||||
// fixture.detectChanges();
|
||||
// });
|
||||
//
|
||||
// it('should create', () => {
|
||||
// expect(component).toBeTruthy();
|
||||
// });
|
||||
});
|
@ -2,17 +2,17 @@ import { Component, ElementRef, Input, OnChanges, OnDestroy, OnInit, SimpleChang
|
||||
import { D3, D3Service } from 'd3-ng2-service';
|
||||
import { Selection } from 'd3-selection';
|
||||
|
||||
import { Node } from "../models/node";
|
||||
import { Link } from "../models/link";
|
||||
import { GraphLayout } from "./models/graph-layout";
|
||||
import { Context } from "./models/context";
|
||||
import { Size } from "./models/size";
|
||||
import { Node } from "../shared/models/node.model";
|
||||
import { Link } from "../shared/models/link.model";
|
||||
import { GraphLayout } from "../shared/widgets/graph.widget";
|
||||
import { Context } from "../../map/models/context";
|
||||
import { Size } from "../shared/models/size.model";
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-map',
|
||||
templateUrl: './map.component.html',
|
||||
styleUrls: ['./map.component.css']
|
||||
templateUrl: '../../map/map.component.html',
|
||||
styleUrls: ['../../map/map.component.css']
|
||||
})
|
||||
export class MapComponent implements OnInit, OnChanges, OnDestroy {
|
||||
@Input() nodes: Node[] = [];
|
@ -1,4 +1,4 @@
|
||||
import {Node} from "./node";
|
||||
import {Node} from "./node.model";
|
||||
|
||||
export class Link {
|
||||
capture_file_name: string;
|
@ -1,5 +1,5 @@
|
||||
import {Label} from "./label";
|
||||
import {Symbol} from "./symbol";
|
||||
import {Label} from "./label.model";
|
||||
import {Symbol} from "../../../shared/models/symbol";
|
||||
|
||||
export class Node {
|
||||
command_line: string;
|
3
src/app/cartography/shared/models/size.model.ts
Normal file
3
src/app/cartography/shared/models/size.model.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export class Size {
|
||||
constructor(public width: number, public height: number) {}
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
import { Context } from "./context";
|
||||
import { Node } from "../../models/node";
|
||||
import { Link } from "../../models/link";
|
||||
import { NodesWidget } from "./nodes-widget";
|
||||
import { Context } from "../../../map/models/context";
|
||||
import { Node } from "../models/node.model";
|
||||
import { Link } from "../models/link.model";
|
||||
import { NodesWidget } from "./nodes.widget";
|
||||
import { Widget } from "./widget";
|
||||
import { SVGSelection } from "./types";
|
||||
import { LinksWidget } from "./links-widget";
|
||||
import { SVGSelection } from "../../../map/models/types";
|
||||
import { LinksWidget } from "./links.widget";
|
||||
import { D3ZoomEvent, zoom } from "d3-zoom";
|
||||
import { event } from "d3-selection";
|
||||
|
@ -2,10 +2,10 @@ import { select } from "d3-selection";
|
||||
import { line } from "d3-shape";
|
||||
|
||||
import { Widget } from "./widget";
|
||||
import { SVGSelection } from "./types";
|
||||
import { Link } from "../../models/link";
|
||||
import { LinkStatus } from "../../models/link-status";
|
||||
import { MultiLinkCalculatorHelper } from "./helpers/multi-link-calculator-helper";
|
||||
import { SVGSelection } from "../../../map/models/types";
|
||||
import { Link } from "../models/link.model";
|
||||
import { LinkStatus } from "../models/link-status";
|
||||
import { MultiLinkCalculatorHelper } from "../../map/helpers/multi-link-calculator-helper";
|
||||
|
||||
|
||||
export class LinksWidget implements Widget {
|
@ -1,6 +1,6 @@
|
||||
import {Widget} from "./widget";
|
||||
import {Node} from "../../models/node";
|
||||
import {SVGSelection} from "./types";
|
||||
import {Node} from "../models/node.model";
|
||||
import {SVGSelection} from "../../../map/models/types";
|
||||
import {D3DragEvent} from "d3-drag";
|
||||
import {select} from "d3-selection";
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { MapComponent } from './map.component';
|
||||
import { MapComponent } from '../cartography/map/map.component';
|
||||
import {D3Service} from "d3-ng2-service";
|
||||
|
||||
describe('MapComponent', () => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Size} from "./size";
|
||||
import {Size} from "../../cartography/shared/models/size.model";
|
||||
import {Selection} from "d3-selection";
|
||||
|
||||
export class Context {
|
||||
|
@ -1,8 +0,0 @@
|
||||
export class Size {
|
||||
width: number;
|
||||
height: number;
|
||||
constructor(width: number, height: number) {
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
import {Node} from "./node";
|
||||
|
||||
export class NodeLink {
|
||||
source: Node;
|
||||
target: Node;
|
||||
}
|
@ -11,14 +11,14 @@ import 'rxjs/add/observable/fromPromise';
|
||||
import 'rxjs/add/observable/dom/webSocket';
|
||||
|
||||
|
||||
import { Project } from '../models/project';
|
||||
import { Node } from '../models/node';
|
||||
import { SymbolService } from '../services/symbol.service';
|
||||
import { Link } from "../models/link";
|
||||
import { MapComponent } from "../map/map.component";
|
||||
import { ServerService } from "../services/server.service";
|
||||
import { ProjectService } from '../services/project.service';
|
||||
import { Server } from "../models/server";
|
||||
import { Project } from '../shared/models/project';
|
||||
import { Node } from '../cartography/shared/models/node.model';
|
||||
import { SymbolService } from '../shared/services/symbol.service';
|
||||
import { Link } from "../cartography/shared/models/link.model";
|
||||
import { MapComponent } from "../cartography/map/map.component";
|
||||
import { ServerService } from "../shared/services/server.service";
|
||||
import { ProjectService } from '../shared/services/project.service';
|
||||
import { Server } from "../shared/models/server";
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,13 +1,13 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, ParamMap } from '@angular/router';
|
||||
|
||||
import { Project } from "../models/project";
|
||||
import { ProjectService } from "../services/project.service";
|
||||
import { Server } from "../models/server";
|
||||
import { ServerService } from "../services/server.service";
|
||||
import {BehaviorSubject} from "rxjs/BehaviorSubject";
|
||||
import {DataSource} from "@angular/cdk/collections";
|
||||
import {Observable} from "rxjs/Observable";
|
||||
import { Project } from "../shared/models/project";
|
||||
import { ProjectService } from "../shared/services/project.service";
|
||||
import { Server } from "../shared/models/server";
|
||||
import { ServerService } from "../shared/services/server.service";
|
||||
import { BehaviorSubject } from "rxjs/BehaviorSubject";
|
||||
import { DataSource } from "@angular/cdk/collections";
|
||||
import { Observable } from "rxjs/Observable";
|
||||
|
||||
@Component({
|
||||
selector: 'app-projects',
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {Component, Inject, OnInit} from '@angular/core';
|
||||
|
||||
import { Server } from "../models/server";
|
||||
import { ServerService } from "../services/server.service";
|
||||
import { Server } from "../shared/models/server";
|
||||
import { ServerService } from "../shared/services/server.service";
|
||||
import {DataSource} from "@angular/cdk/collections";
|
||||
import {Observable} from "rxjs/Observable";
|
||||
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material';
|
||||
|
@ -1,13 +1,11 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Http, Headers } from '@angular/http';
|
||||
import { Project } from '../models/project';
|
||||
import { Node } from '../models/node';
|
||||
import { Node } from '../../cartography/shared/models/node.model';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
import 'rxjs/add/operator/map';
|
||||
import { Link } from "../models/link";
|
||||
import { Link } from "../../cartography/shared/models/link.model";
|
||||
import { Server } from "../models/server";
|
||||
import { ServerService } from "./server.service";
|
||||
import { HttpServer } from "./http-server.service";
|
||||
|
||||
@Injectable()
|
Loading…
Reference in New Issue
Block a user