Introduce components directories

This commit is contained in:
ziajka 2018-06-27 10:34:15 +02:00
parent 4f3ad287f0
commit e82b4e48cd
65 changed files with 115 additions and 115 deletions

View File

@ -3,12 +3,12 @@ import { environment } from "../environments/environment";
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router'; import { RouterModule, Routes } from '@angular/router';
import { ProjectMapComponent } from './project-map/project-map.component'; import { ProjectMapComponent } from './components/project-map/project-map.component';
import { ServersComponent } from "./servers/servers.component"; import { ServersComponent } from "./components/servers/servers.component";
import { ProjectsComponent } from "./projects/projects.component"; import { ProjectsComponent } from "./components/projects/projects.component";
import { DefaultLayoutComponent } from "./layouts/default-layout/default-layout.component"; import { DefaultLayoutComponent } from "./layouts/default-layout/default-layout.component";
import { SettingsComponent } from "./settings/settings.component"; import { SettingsComponent } from "./components/settings/settings.component";
import { LocalServerComponent } from "./local-server/local-server.component"; import { LocalServerComponent } from "./components/local-server/local-server.component";
const routes: Routes = [ const routes: Routes = [

View File

@ -47,19 +47,19 @@ import { NodeService } from "./services/node.service";
import { ApplianceService } from "./services/appliance.service"; import { ApplianceService } from "./services/appliance.service";
import { LinkService } from "./services/link.service"; import { LinkService } from "./services/link.service";
import { ProjectsComponent } from './projects/projects.component'; import { ProjectsComponent } from './components/projects/projects.component';
import { DefaultLayoutComponent } from './layouts/default-layout/default-layout.component'; import { DefaultLayoutComponent } from './layouts/default-layout/default-layout.component';
import { ProgressDialogComponent } from './common/progress-dialog/progress-dialog.component'; import { ProgressDialogComponent } from './common/progress-dialog/progress-dialog.component';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
import { CreateSnapshotDialogComponent, ProjectMapComponent } from './project-map/project-map.component'; import { CreateSnapshotDialogComponent, ProjectMapComponent } from './components/project-map/project-map.component';
import { ServersComponent, AddServerDialogComponent } from './servers/servers.component'; import { ServersComponent, AddServerDialogComponent } from './components/servers/servers.component';
import { NodeContextMenuComponent } from './project-map/node-context-menu/node-context-menu.component'; import { NodeContextMenuComponent } from './components/project-map/node-context-menu/node-context-menu.component';
import { StartNodeActionComponent } from './project-map/node-context-menu/actions/start-node-action/start-node-action.component'; import { StartNodeActionComponent } from './components/project-map/node-context-menu/actions/start-node-action/start-node-action.component';
import { StopNodeActionComponent } from './project-map/node-context-menu/actions/stop-node-action/stop-node-action.component'; import { StopNodeActionComponent } from './components/project-map/node-context-menu/actions/stop-node-action/stop-node-action.component';
import { ApplianceComponent } from './appliance/appliance.component'; import { ApplianceComponent } from './components/appliance/appliance.component';
import { ApplianceListDialogComponent } from './appliance/appliance-list-dialog/appliance-list-dialog.component'; import { ApplianceListDialogComponent } from './components/appliance/appliance-list-dialog/appliance-list-dialog.component';
import { NodeSelectInterfaceComponent } from './project-map/node-select-interface/node-select-interface.component'; import { NodeSelectInterfaceComponent } from './components/project-map/node-select-interface/node-select-interface.component';
import { CartographyModule } from './cartography/cartography.module'; import { CartographyModule } from './cartography/cartography.module';
import { ToasterService } from './services/toaster.service'; import { ToasterService } from './services/toaster.service';
import { ProjectWebServiceHandler } from "./handlers/project-web-service-handler"; import { ProjectWebServiceHandler } from "./handlers/project-web-service-handler";
@ -67,16 +67,16 @@ import { LinksDataSource } from "./cartography/datasources/links-datasource";
import { NodesDataSource } from "./cartography/datasources/nodes-datasource"; import { NodesDataSource } from "./cartography/datasources/nodes-datasource";
import { SymbolsDataSource } from "./cartography/datasources/symbols-datasource"; import { SymbolsDataSource } from "./cartography/datasources/symbols-datasource";
import { SelectionManager } from "./cartography/managers/selection-manager"; import { SelectionManager } from "./cartography/managers/selection-manager";
import { InRectangleHelper } from "./cartography/map/helpers/in-rectangle-helper"; import { InRectangleHelper } from "./cartography/components/map/helpers/in-rectangle-helper";
import { DrawingsDataSource } from "./cartography/datasources/drawings-datasource"; import { DrawingsDataSource } from "./cartography/datasources/drawings-datasource";
import { MoveLayerDownActionComponent } from './project-map/node-context-menu/actions/move-layer-down-action/move-layer-down-action.component'; import { MoveLayerDownActionComponent } from './components/project-map/node-context-menu/actions/move-layer-down-action/move-layer-down-action.component';
import { MoveLayerUpActionComponent } from './project-map/node-context-menu/actions/move-layer-up-action/move-layer-up-action.component'; import { MoveLayerUpActionComponent } from './components/project-map/node-context-menu/actions/move-layer-up-action/move-layer-up-action.component';
import { ProjectMapShortcutsComponent } from './project-map/project-map-shortcuts/project-map-shortcuts.component'; import { ProjectMapShortcutsComponent } from './components/project-map/project-map-shortcuts/project-map-shortcuts.component';
import { SettingsComponent } from './settings/settings.component'; import { SettingsComponent } from './components/settings/settings.component';
import { SettingsService } from "./services/settings.service"; import { SettingsService } from "./services/settings.service";
import { RavenErrorHandler } from "./raven-error-handler"; import { RavenErrorHandler } from "./raven-error-handler";
import { LocalServerComponent } from './local-server/local-server.component'; import { LocalServerComponent } from './components/local-server/local-server.component';
import { ProgressComponent } from './common/progress/progress.component'; import { ProgressComponent } from './common/progress/progress.component';
import { ProgressService } from "./common/progress/progress.service"; import { ProgressService } from "./common/progress/progress.service";

View File

@ -1,6 +1,6 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { MapComponent } from './map/map.component'; import { MapComponent } from './components/map/map.component';
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -1,5 +1,5 @@
import { InRectangleHelper } from "./in-rectangle-helper"; import { InRectangleHelper } from "./in-rectangle-helper";
import { Rectangle } from "../../models/rectangle"; import { Rectangle } from "../../../models/rectangle";

View File

@ -1,7 +1,7 @@
import { Injectable } from "@angular/core"; import { Injectable } from "@angular/core";
import { Selectable } from "../../managers/selection-manager"; import { Selectable } from "../../../managers/selection-manager";
import { Rectangle } from "../../models/rectangle"; import { Rectangle } from "../../../models/rectangle";
@Injectable() @Injectable()

View File

@ -1,4 +1,4 @@
import {Link} from "../../models/link"; import {Link} from "../../../models/link";
export class MultiLinkCalculatorHelper { export class MultiLinkCalculatorHelper {
LINK_WIDTH = 2; LINK_WIDTH = 2;

View File

Before

Width:  |  Height:  |  Size: 52 B

After

Width:  |  Height:  |  Size: 52 B

View File

@ -4,13 +4,13 @@ import {
import { D3, D3Service } from 'd3-ng2-service'; import { D3, D3Service } from 'd3-ng2-service';
import {select, Selection} from 'd3-selection'; import {select, Selection} from 'd3-selection';
import { Node } from "../models/node"; import { Node } from "../../models/node";
import { Link } from "../models/link"; import { Link } from "../../models/link";
import { GraphLayout } from "../widgets/graph-layout"; import { GraphLayout } from "../../widgets/graph-layout";
import { Context } from "../models/context"; import { Context } from "../../models/context";
import { Size } from "../models/size"; import { Size } from "../../models/size";
import { Drawing } from "../models/drawing"; import { Drawing } from "../../models/drawing";
import {Symbol} from "../models/symbol"; import {Symbol} from "../../models/symbol";
@Component({ @Component({

View File

@ -7,7 +7,7 @@ import { Rectangle } from "../models/rectangle";
import { SelectionManager } from "./selection-manager"; import { SelectionManager } from "./selection-manager";
import { NodesDataSource } from "../datasources/nodes-datasource"; import { NodesDataSource } from "../datasources/nodes-datasource";
import { LinksDataSource } from "../datasources/links-datasource"; import { LinksDataSource } from "../datasources/links-datasource";
import { InRectangleHelper } from "../map/helpers/in-rectangle-helper"; import { InRectangleHelper } from "../components/map/helpers/in-rectangle-helper";
import { DrawingsDataSource } from "../datasources/drawings-datasource"; import { DrawingsDataSource } from "../datasources/drawings-datasource";

View File

@ -6,7 +6,7 @@ import { Subscription } from "rxjs/Subscription";
import { NodesDataSource } from "../datasources/nodes-datasource"; import { NodesDataSource } from "../datasources/nodes-datasource";
import { LinksDataSource } from "../datasources/links-datasource"; import { LinksDataSource } from "../datasources/links-datasource";
import { Node } from "../models/node"; import { Node } from "../models/node";
import { InRectangleHelper } from "../map/helpers/in-rectangle-helper"; import { InRectangleHelper } from "../components/map/helpers/in-rectangle-helper";
import { Rectangle } from "../models/rectangle"; import { Rectangle } from "../models/rectangle";
import { Link} from "../models/link"; import { Link} from "../models/link";
import { DataSource } from "../datasources/datasource"; import { DataSource } from "../datasources/datasource";

View File

@ -4,7 +4,7 @@ import { Widget } from "./widget";
import { SVGSelection } from "../models/types"; import { SVGSelection } from "../models/types";
import { Link } from "../models/link"; import { Link } from "../models/link";
import { LinkStatus } from "../models/link-status"; import { LinkStatus } from "../models/link-status";
import { MultiLinkCalculatorHelper } from "../map/helpers/multi-link-calculator-helper"; import { MultiLinkCalculatorHelper } from "../components/map/helpers/multi-link-calculator-helper";
import { SerialLinkWidget } from "./serial-link"; import { SerialLinkWidget } from "./serial-link";
import { EthernetLinkWidget } from "./ethernet-link"; import { EthernetLinkWidget } from "./ethernet-link";
import { Layer } from "../models/layer"; import { Layer } from "../models/layer";

View File

@ -2,8 +2,8 @@ import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
import {MatDialog} from "@angular/material"; import {MatDialog} from "@angular/material";
import {ApplianceListDialogComponent} from "./appliance-list-dialog/appliance-list-dialog.component"; import {ApplianceListDialogComponent} from "./appliance-list-dialog/appliance-list-dialog.component";
import {Server} from "../models/server"; import {Server} from "../../models/server";
import {Appliance} from "../models/appliance"; import {Appliance} from "../../models/appliance";
@Component({ @Component({
selector: 'app-appliance', selector: 'app-appliance',

View File

@ -4,8 +4,8 @@ import { LocalServerComponent } from './local-server.component';
import { Location } from "@angular/common"; import { Location } from "@angular/common";
import { RouterTestingModule } from "@angular/router/testing"; import { RouterTestingModule } from "@angular/router/testing";
import { Router } from "@angular/router"; import { Router } from "@angular/router";
import { ServerService } from "../services/server.service"; import { ServerService } from "../../services/server.service";
import { MockedServerService } from "../services/server.service.spec"; import { MockedServerService } from "../../services/server.service.spec";
class MockedLocation { class MockedLocation {

View File

@ -2,8 +2,8 @@ import { Component, OnInit } from '@angular/core';
import { Location } from "@angular/common"; import { Location } from "@angular/common";
import { Router } from "@angular/router"; import { Router } from "@angular/router";
import { ServerService } from "../services/server.service"; import { ServerService } from "../../services/server.service";
import { Server } from "../models/server"; import { Server } from "../../models/server";
@Component({ @Component({

View File

@ -1,8 +1,8 @@
import { Component, OnInit, Input } from '@angular/core'; import { Component, OnInit, Input } from '@angular/core';
import { Server } from '../../../../models/server'; import { Server } from '../../../../../models/server';
import { Node } from '../../../../cartography/models/node'; import { Node } from '../../../../../cartography/models/node';
import { NodesDataSource } from '../../../../cartography/datasources/nodes-datasource'; import { NodesDataSource } from '../../../../../cartography/datasources/nodes-datasource';
import { NodeService } from '../../../../services/node.service'; import { NodeService } from '../../../../../services/node.service';
@Component({ @Component({
selector: 'app-move-layer-down-action', selector: 'app-move-layer-down-action',

View File

@ -1,8 +1,8 @@
import { Component, OnInit, Input } from '@angular/core'; import { Component, OnInit, Input } from '@angular/core';
import { Server } from '../../../../models/server'; import { Server } from '../../../../../models/server';
import { Node } from '../../../../cartography/models/node'; import { Node } from '../../../../../cartography/models/node';
import { NodesDataSource } from '../../../../cartography/datasources/nodes-datasource'; import { NodesDataSource } from '../../../../../cartography/datasources/nodes-datasource';
import { NodeService } from '../../../../services/node.service'; import { NodeService } from '../../../../../services/node.service';
@Component({ @Component({
selector: 'app-move-layer-up-action', selector: 'app-move-layer-up-action',

View File

@ -1,7 +1,7 @@
import {Component, Input, OnInit} from '@angular/core'; import {Component, Input, OnInit} from '@angular/core';
import {Server} from "../../../../models/server"; import {Server} from "../../../../../models/server";
import {NodeService} from "../../../../services/node.service"; import {NodeService} from "../../../../../services/node.service";
import {Node} from "../../../../cartography/models/node"; import {Node} from "../../../../../cartography/models/node";
@Component({ @Component({

View File

@ -1,7 +1,7 @@
import {Component, Input, OnInit} from '@angular/core'; import {Component, Input, OnInit} from '@angular/core';
import {Server} from "../../../../models/server"; import {Server} from "../../../../../models/server";
import {NodeService} from "../../../../services/node.service"; import {NodeService} from "../../../../../services/node.service";
import {Node} from "../../../../cartography/models/node"; import {Node} from "../../../../../cartography/models/node";
@Component({ @Component({

View File

@ -1,10 +1,10 @@
import { ChangeDetectorRef, Component, Input, OnInit, ViewChild } from '@angular/core'; import { ChangeDetectorRef, Component, Input, OnInit, ViewChild } from '@angular/core';
import { MatMenuTrigger } from "@angular/material"; import { MatMenuTrigger } from "@angular/material";
import { DomSanitizer } from "@angular/platform-browser"; import { DomSanitizer } from "@angular/platform-browser";
import { Node } from "../../cartography/models/node"; import { Node } from "../../../cartography/models/node";
import { Server } from "../../models/server"; import { Server } from "../../../models/server";
import { Project } from "../../models/project"; import { Project } from "../../../models/project";
import { ProjectService } from "../../services/project.service"; import { ProjectService } from "../../../services/project.service";
@Component({ @Component({

View File

@ -1,8 +1,8 @@
import {ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core'; import {ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core';
import {MatMenuTrigger} from "@angular/material"; import {MatMenuTrigger} from "@angular/material";
import {DomSanitizer} from "@angular/platform-browser"; import {DomSanitizer} from "@angular/platform-browser";
import {Node} from "../../cartography/models/node"; import {Node} from "../../../cartography/models/node";
import {Port} from "../../models/port"; import {Port} from "../../../models/port";
@Component({ @Component({

View File

@ -7,17 +7,17 @@ import { HotkeyModule, HotkeysService, Hotkey } from "angular2-hotkeys";
import { Observable } from "rxjs"; import { Observable } from "rxjs";
import { ProjectMapShortcutsComponent } from './project-map-shortcuts.component'; import { ProjectMapShortcutsComponent } from './project-map-shortcuts.component';
import { ToasterService, } from "../../services/toaster.service"; import { ToasterService, } from "../../../services/toaster.service";
import { NodeService } from "../../services/node.service"; import { NodeService } from "../../../services/node.service";
import { HttpServer } from "../../services/http-server.service"; import { HttpServer } from "../../../services/http-server.service";
import { SelectionManager } from "../../cartography/managers/selection-manager"; import { SelectionManager } from "../../../cartography/managers/selection-manager";
import { Server } from "../../models/server"; import { Server } from "../../../models/server";
import { Node } from "../../cartography/models/node"; import { Node } from "../../../cartography/models/node";
import { Project } from "../../models/project"; import { Project } from "../../../models/project";
import { ProjectService } from "../../services/project.service"; import { ProjectService } from "../../../services/project.service";
import { MockedProjectService } from "../../services/project.service.spec"; import { MockedProjectService } from "../../../services/project.service.spec";
import { SettingsService } from "../../services/settings.service"; import { SettingsService } from "../../../services/settings.service";
import { MockedToasterService } from "../../services/toaster.service.spec"; import { MockedToasterService } from "../../../services/toaster.service.spec";
describe('ProjectMapShortcutsComponent', () => { describe('ProjectMapShortcutsComponent', () => {

View File

@ -1,12 +1,12 @@
import { Component, OnInit, OnDestroy, Input } from '@angular/core'; import { Component, OnInit, OnDestroy, Input } from '@angular/core';
import { HotkeysService, Hotkey } from 'angular2-hotkeys'; import { HotkeysService, Hotkey } from 'angular2-hotkeys';
import { SelectionManager } from '../../cartography/managers/selection-manager'; import { SelectionManager } from '../../../cartography/managers/selection-manager';
import { NodeService } from '../../services/node.service'; import { NodeService } from '../../../services/node.service';
import { Server } from '../../models/server'; import { Server } from '../../../models/server';
import { ToasterService } from '../../services/toaster.service'; import { ToasterService } from '../../../services/toaster.service';
import { Project } from "../../models/project"; import { Project } from "../../../models/project";
import { ProjectService } from "../../services/project.service"; import { ProjectService } from "../../../services/project.service";
@Component({ @Component({

View File

@ -11,36 +11,36 @@ import 'rxjs/add/observable/fromPromise';
import 'rxjs/add/observable/dom/webSocket'; import 'rxjs/add/observable/dom/webSocket';
import { Project } from '../models/project'; import { Project } from '../../models/project';
import { Node } from '../cartography/models/node'; import { Node } from '../../cartography/models/node';
import { SymbolService } from '../services/symbol.service'; import { SymbolService } from '../../services/symbol.service';
import { Link } from "../cartography/models/link"; import { Link } from "../../cartography/models/link";
import { MapComponent } from "../cartography/map/map.component"; import { MapComponent } from "../../cartography/components/map/map.component";
import { ServerService } from "../services/server.service"; import { ServerService } from "../../services/server.service";
import { ProjectService } from '../services/project.service'; import { ProjectService } from '../../services/project.service';
import { Server } from "../models/server"; import { Server } from "../../models/server";
import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from "@angular/material"; import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from "@angular/material";
import { SnapshotService } from "../services/snapshot.service"; import { SnapshotService } from "../../services/snapshot.service";
import { Snapshot } from "../models/snapshot"; import { Snapshot } from "../../models/snapshot";
import { ProgressDialogService } from "../common/progress-dialog/progress-dialog.service"; import { ProgressDialogService } from "../../common/progress-dialog/progress-dialog.service";
import { ProgressDialogComponent } from "../common/progress-dialog/progress-dialog.component"; import { ProgressDialogComponent } from "../../common/progress-dialog/progress-dialog.component";
import { Drawing } from "../cartography/models/drawing"; import { Drawing } from "../../cartography/models/drawing";
import { NodeContextMenuComponent } from "./node-context-menu/node-context-menu.component"; import { NodeContextMenuComponent } from "./node-context-menu/node-context-menu.component";
import { Appliance } from "../models/appliance"; import { Appliance } from "../../models/appliance";
import { NodeService } from "../services/node.service"; import { NodeService } from "../../services/node.service";
import { Symbol } from "../cartography/models/symbol"; import { Symbol } from "../../cartography/models/symbol";
import { NodeSelectInterfaceComponent } from "./node-select-interface/node-select-interface.component"; import { NodeSelectInterfaceComponent } from "./node-select-interface/node-select-interface.component";
import { Port } from "../models/port"; import { Port } from "../../models/port";
import { LinkService } from "../services/link.service"; import { LinkService } from "../../services/link.service";
import { ToasterService } from '../services/toaster.service'; import { ToasterService } from '../../services/toaster.service';
import { NodesDataSource } from "../cartography/datasources/nodes-datasource"; import { NodesDataSource } from "../../cartography/datasources/nodes-datasource";
import { LinksDataSource } from "../cartography/datasources/links-datasource"; import { LinksDataSource } from "../../cartography/datasources/links-datasource";
import { ProjectWebServiceHandler } from "../handlers/project-web-service-handler"; import { ProjectWebServiceHandler } from "../../handlers/project-web-service-handler";
import { SelectionManager } from "../cartography/managers/selection-manager"; import { SelectionManager } from "../../cartography/managers/selection-manager";
import { InRectangleHelper } from "../cartography/map/helpers/in-rectangle-helper"; import { InRectangleHelper } from "../../cartography/components/map/helpers/in-rectangle-helper";
import { DrawingsDataSource } from "../cartography/datasources/drawings-datasource"; import { DrawingsDataSource } from "../../cartography/datasources/drawings-datasource";
import { Subscription } from "rxjs/Subscription"; import { Subscription } from "rxjs/Subscription";
import { SettingsService } from "../services/settings.service"; import { SettingsService } from "../../services/settings.service";
@Component({ @Component({

View File

@ -2,15 +2,15 @@ import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, ParamMap } from '@angular/router'; import { ActivatedRoute, ParamMap } from '@angular/router';
import { MatSort, MatSortable } from "@angular/material"; import { MatSort, MatSortable } from "@angular/material";
import { Project } from "../models/project"; import { Project } from "../../models/project";
import { ProjectService } from "../services/project.service"; import { ProjectService } from "../../services/project.service";
import { Server } from "../models/server"; import { Server } from "../../models/server";
import { ServerService } from "../services/server.service"; import { ServerService } from "../../services/server.service";
import { BehaviorSubject } from "rxjs/BehaviorSubject"; import { BehaviorSubject } from "rxjs/BehaviorSubject";
import { DataSource } from "@angular/cdk/collections"; import { DataSource } from "@angular/cdk/collections";
import { Observable } from "rxjs/Observable"; import { Observable } from "rxjs/Observable";
import { SettingsService, Settings } from "../services/settings.service"; import { SettingsService, Settings } from "../../services/settings.service";
import { ProgressService } from "../common/progress/progress.service"; import { ProgressService } from "../../common/progress/progress.service";
@Component({ @Component({

View File

@ -6,9 +6,9 @@ import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
import { PersistenceModule } from "angular-persistence"; import { PersistenceModule } from "angular-persistence";
import { SettingsComponent } from './settings.component'; import { SettingsComponent } from './settings.component';
import { SettingsService } from "../services/settings.service"; import { SettingsService } from "../../services/settings.service";
import { ToasterService } from "../services/toaster.service"; import { ToasterService } from "../../services/toaster.service";
import { MockedToasterService } from "../services/toaster.service.spec"; import { MockedToasterService } from "../../services/toaster.service.spec";
describe('SettingsComponent', () => { describe('SettingsComponent', () => {

View File

@ -1,6 +1,6 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { SettingsService } from "../services/settings.service"; import { SettingsService } from "../../services/settings.service";
import { ToasterService } from "../services/toaster.service"; import { ToasterService } from "../../services/toaster.service";
@Component({ @Component({
selector: 'app-settings', selector: 'app-settings',