mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-20 13:33:06 +00:00
Symbols converter
This commit is contained in:
parent
600bb91ad1
commit
17e59fde68
@ -1,8 +1,8 @@
|
||||
import { Injectable } from "@angular/core";
|
||||
|
||||
import { Converter } from "./converter";
|
||||
import { Drawing } from "../models/drawing";
|
||||
import { MapDrawing } from "../models/map/map-drawing";
|
||||
import { Converter } from "../converter";
|
||||
import { Drawing } from "../../models/drawing";
|
||||
import { MapDrawing } from "../../models/map/map-drawing";
|
||||
|
||||
|
||||
@Injectable()
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { Injectable } from "@angular/core";
|
||||
|
||||
import { Converter } from "./converter";
|
||||
import { Label } from "../models/label";
|
||||
import { MapLabel } from "../models/map/map-label";
|
||||
import { Converter } from "../converter";
|
||||
import { Label } from "../../models/label";
|
||||
import { MapLabel } from "../../models/map/map-label";
|
||||
|
||||
|
||||
@Injectable()
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { Injectable } from "@angular/core";
|
||||
|
||||
import { Converter } from "./converter";
|
||||
import { LinkNode } from "../../models/link-node";
|
||||
import { MapLinkNode } from "../models/map/map-link-node";
|
||||
import { Converter } from "../converter";
|
||||
import { LinkNode } from "../../../models/link-node";
|
||||
import { MapLinkNode } from "../../models/map/map-link-node";
|
||||
import { LabelToMapLabelConverter } from "./label-to-map-label-converter";
|
||||
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { Injectable } from "@angular/core";
|
||||
|
||||
import { Converter } from "./converter";
|
||||
import { MapLink } from "../models/map/map-link";
|
||||
import { Link } from "../../models/link";
|
||||
import { Converter } from "../converter";
|
||||
import { MapLink } from "../../models/map/map-link";
|
||||
import { Link } from "../../../models/link";
|
||||
import { LinkNodeToMapLinkNodeConverter } from "./link-node-to-map-link-node-converter";
|
||||
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { Injectable } from "@angular/core";
|
||||
|
||||
import { Converter } from "./converter";
|
||||
import { Drawing } from "../models/drawing";
|
||||
import { MapDrawing } from "../models/map/map-drawing";
|
||||
import { Converter } from "../converter";
|
||||
import { Drawing } from "../../models/drawing";
|
||||
import { MapDrawing } from "../../models/map/map-drawing";
|
||||
|
||||
|
||||
@Injectable()
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { Injectable } from "@angular/core";
|
||||
|
||||
import { Converter } from "./converter";
|
||||
import { Label } from "../models/label";
|
||||
import { MapLabel } from "../models/map/map-label";
|
||||
import { Converter } from "../converter";
|
||||
import { Label } from "../../models/label";
|
||||
import { MapLabel } from "../../models/map/map-label";
|
||||
|
||||
|
||||
@Injectable()
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { Injectable } from "@angular/core";
|
||||
|
||||
import { Converter } from "./converter";
|
||||
import { LinkNode } from "../../models/link-node";
|
||||
import { MapLinkNode } from "../models/map/map-link-node";
|
||||
import { Converter } from "../converter";
|
||||
import { LinkNode } from "../../../models/link-node";
|
||||
import { MapLinkNode } from "../../models/map/map-link-node";
|
||||
import { MapLabelToLabelConverter } from "./map-label-to-label-converter";
|
||||
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { Injectable } from "@angular/core";
|
||||
|
||||
import { Converter } from "./converter";
|
||||
import { MapLink } from "../models/map/map-link";
|
||||
import { Link } from "../../models/link";
|
||||
import { Converter } from "../converter";
|
||||
import { MapLink } from "../../models/map/map-link";
|
||||
import { Link } from "../../../models/link";
|
||||
import { MapLinkNodeToLinkNodeConverter } from "./map-link-node-to-link-node-converter";
|
||||
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { Injectable } from "@angular/core";
|
||||
|
||||
import { Converter } from "./converter";
|
||||
import { MapNode } from "../models/map/map-node";
|
||||
import { Node } from "../models/node";
|
||||
import { Converter } from "../converter";
|
||||
import { MapNode } from "../../models/map/map-node";
|
||||
import { Node } from "../../models/node";
|
||||
import { MapLabelToLabelConverter } from "./map-label-to-label-converter";
|
||||
import { MapPortToPortConverter } from "./map-port-to-port-converter";
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { Injectable } from "@angular/core";
|
||||
|
||||
import { Converter } from "./converter";
|
||||
import { MapPort } from "../models/map/map-port";
|
||||
import { Port } from "../../models/port";
|
||||
import { Converter } from "../converter";
|
||||
import { MapPort } from "../../models/map/map-port";
|
||||
import { Port } from "../../../models/port";
|
||||
|
||||
|
||||
@Injectable()
|
||||
|
@ -0,0 +1,18 @@
|
||||
import { Injectable } from "@angular/core";
|
||||
|
||||
import { Converter } from "../converter";
|
||||
import { MapSymbol } from "../../models/map/map-symbol";
|
||||
import { Symbol } from "../../../models/symbol";
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class MapSymbolToSymbolConverter implements Converter<MapSymbol, Symbol> {
|
||||
convert(mapSymbol: MapSymbol) {
|
||||
const symbol = new Symbol();
|
||||
symbol.symbol_id = mapSymbol.id;
|
||||
symbol.builtin = mapSymbol.builtin;
|
||||
symbol.filename = mapSymbol.filename;
|
||||
symbol.raw = mapSymbol.raw;
|
||||
return symbol;
|
||||
}
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
import { Injectable } from "@angular/core";
|
||||
|
||||
import { Converter } from "./converter";
|
||||
import { MapNode } from "../models/map/map-node";
|
||||
import { Node } from "../models/node";
|
||||
import { Converter } from "../converter";
|
||||
import { MapNode } from "../../models/map/map-node";
|
||||
import { Node } from "../../models/node";
|
||||
import { LabelToMapLabelConverter } from "./label-to-map-label-converter";
|
||||
import { PortToMapPortConverter } from "./port-to-map-port-converter";
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { Injectable } from "@angular/core";
|
||||
|
||||
import { Converter } from "./converter";
|
||||
import { MapPort } from "../models/map/map-port";
|
||||
import { Port } from "../../models/port";
|
||||
import { Converter } from "../converter";
|
||||
import { MapPort } from "../../models/map/map-port";
|
||||
import { Port } from "../../../models/port";
|
||||
|
||||
|
||||
@Injectable()
|
||||
|
@ -0,0 +1,18 @@
|
||||
import { Injectable } from "@angular/core";
|
||||
|
||||
import { Converter } from "../converter";
|
||||
import { MapSymbol } from "../../models/map/map-symbol";
|
||||
import { Symbol } from "../../../models/symbol";
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class SymbolToMapSymbolConverter implements Converter<Symbol, MapSymbol> {
|
||||
convert(symbol: Symbol) {
|
||||
const mapSymbol = new MapSymbol();
|
||||
mapSymbol.id = symbol.symbol_id;
|
||||
mapSymbol.builtin = symbol.builtin;
|
||||
mapSymbol.filename = symbol.filename;
|
||||
mapSymbol.raw = symbol.raw;
|
||||
return mapSymbol;
|
||||
}
|
||||
}
|
6
src/app/cartography/models/map/map-symbol.ts
Normal file
6
src/app/cartography/models/map/map-symbol.ts
Normal file
@ -0,0 +1,6 @@
|
||||
export class MapSymbol {
|
||||
id: string;
|
||||
builtin: boolean;
|
||||
filename: string;
|
||||
raw: string;
|
||||
}
|
Loading…
Reference in New Issue
Block a user