Commit 74ef0d21 authored by Richard Marston's avatar Richard Marston
Browse files

Use generic icons for unknown graphical components

parent 3ea68e9a
Pipeline #195768 passed with stage
in 1 minute and 13 seconds
FROM node:8-stretch AS xslt-builder
RUN mkdir /xslt
WORKDIR /xslt
COPY cimmenu/templates/xslt/package.json /xslt/package.json
RUN npm install
RUN mkdir /data_model
RUN mkdir /generated
COPY data_model/cim16/ /data_model/cim16/
COPY data_model/cim16_entsoe/ /data_model/cim16_entsoe/
COPY cimmenu/templates/xslt/generateClassStructure.js \
cimmenu/templates/xslt/generateHandlebarTemplates.js \
cimmenu/templates/xslt/xslt.js \
cimmenu/templates/xslt/terminalAndPointLimits.js \
cimmenu/templates/xslt/cim_add_components_menu.xslt \
cimmenu/templates/xslt/cim_add_raw_components_menu.xslt \
cimmenu/templates/xslt/cim_xml_scheme.xslt \
cimmenu/templates/xslt/merge_xml_files.xslt \
cimmenu/templates/xslt/sort_menu.xslt /xslt/
RUN chown -R node:node /data_model /generated /xslt
USER node
RUN ls /data_model
RUN npm run build
FROM node AS builder
COPY --from=xslt-builder /generated /pintura/cimmenu/templates/generated/
COPY . /pintura
WORKDIR pintura
RUN rm -rf node_modules
RUN npm install
RUN npm run build-dev
FROM nginx
RUN mkdir -p /usr/share/nginx/html/templates
COPY images /usr/share/nginx/html/images
COPY css /usr/share/nginx/html/css
COPY index.js /usr/share/nginx/html
COPY --from=builder /pintura/dist /usr/share/nginx/html/dist/
COPY --from=builder /pintura/index.html /usr/share/nginx/html/
LABEL \
org.label-schema.schema-version = "1.0" \
org.label-schema.name = "Pintura" \
org.label-schema.license = "GPL-3.0" \
org.label-schema.vendor = "Institute for Automation of Complex Power Systems, RWTH Aachen University" \
org.label-schema.author.name = "Richard Marston" \
org.label-schema.author.email = "rmarston@eonerc.rwth-aachen.de" \
org.label-schema.maintainer.name = "Steffen Vogel" \
org.label-schema.maintainer.email = "stvogel@eonerc.rwth-aachen.de" \
org.label-schema.description = "Pintura is a graphical editor for CIM XML-RDF files. CIM refers to the Common Information Model (CIM) standard (i.e. IEC61970/61968/62325) for the energy sector." \
org.label-schema.url = "http://fein-aachen.org/projects/pintura/" \
org.label-schema.vcs-url = "http://git.rwth-aachen.de/acs/core/cim/pintura"
......@@ -29,6 +29,13 @@ ATTRIBUTE_DIR=$(TEMPLATE_DIR)/attributes
all: docker
dev: cimsvg cimmenu
docker build \
--file Dockerfile.dev \
--tag $(DOCKER_IMAGE) \
--iidfile $@ \
.
docker: cimsvg cimmenu
docker build \
--tag $(DOCKER_IMAGE) \
......@@ -42,4 +49,4 @@ start: stop
stop:
$(shell echo ./stop_docker.sh)
.PHONY: all docker start stop
.PHONY: all dev docker start stop
......@@ -11,7 +11,7 @@
"generateCgmesHandlebars": "node templates/generateCgmesTemplates.js",
"createIndex": "cd templates && node createIndex.js > index.js && node createCgmesIndex.js > cgmesIndex.js",
"templates": "npm run generateCgmesHandlebars && npm run createIndex",
"package": "rollup -c",
"package": "rollup -c ${ROLLUP_FLAGS}",
"build": "npm install && npm run templates && npm run package"
},
"devDependencies": {
......
<?xml version="0.5" encoding="UTF-8" standalone="no"?>
<svg
height="22.194"
id="svg1825"
width="21.9744"
version="1.1"
transform='rotate(90)'>
<g id="g1835">
<g
id="g1837">
<path
d="m 10.9872,22.194 c 6.06795,0 10.9872,-4.9685 10.9872,-11.097 C 21.9744,4.9684 17.05515,0 10.9872,0 4.91935,0 0,4.9684 0,11.097 0,17.2255 4.91935,22.194 10.9872,22.194 Z"
id="path1839"
style="fill:#000000;stroke:none" />
<path
d="M 10.9872,11.097"
id="path1841"
style="fill:#000000;stroke:none" />
</g>
<g
id="g1843">
<path
d="m 10.9872,19.6357 c 4.6692,0 8.4543,-3.82295 8.4543,-8.5387 0,-4.71585 -3.7851,-8.5387 -8.4543,-8.5387 -4.6691,0 -8.45425,3.82285 -8.45425,8.5387 0,4.71575 3.78515,8.5387 8.45425,8.5387 z"
id="path1845"
style="fill:#ffffff;stroke:none" />
<path
d="M 10.9872,11.097"
id="path1847"
style="fill:#ffffff;stroke:none" />
</g>
<g
id="g1849">
<path
d="m 9.84815,15.0137 2.47655,-0.0051 V 13.0845 c 0,-0.5219 0.2433,-1.015 0.8943,-1.44205 0.65095,-0.42685 2.4682,-1.29305 2.4682,-3.57045 0,-2.2775 -1.90835,-3.8429 -3.5125,-4.175 -1.6039,-0.3321 -3.34175,-0.1136 -4.575,1.2375 -1.10435,1.20985 -1.33705,2.16685 -1.33705,4.27825 h 2.47455 v -0.49075 c 0,-1.12505 0.13015,-2.3127 1.7375,-2.6375 0.8773,-0.1773 1.6997,0.0979 2.1875,0.575 0.558,0.5456 0.5625,1.775 -0.32665,2.38715 l -1.3948,0.94895 c -0.8136,0.5219 -1.0926,11.0295 -1.0926,1.95695 z"
id="path1851"
style="fill:#000000;stroke:none" />
<g
id="g1853">
<path
d="m 9.8319,18.5346 v -2.55025 h 2.5106 v 2.55025 z"
id="path1855"
style="fill:#000000;stroke:none" />
<path
d="M 11.0872,17.2595"
id="path1857"
style="fill:#000000;stroke:none" />
</g>
</g>
</g>
</svg>
......@@ -8,7 +8,7 @@
"url": "https://git.rwth-aachen.de/acs/core/cim/pintura.git"
},
"scripts": {
"build": "rollup -c",
"build": "rollup -c ${ROLLUP_FLAGS}",
"test": ""
},
"devDependencies": {
......
......@@ -20,17 +20,26 @@ import term from "../images/term.svg";
import brea from "../images/brea.svg";
import conn from "../images/conn.svg";
import cons from "../images/cons.svg";
import gene from "../images/gene.svg";
import net from "../images/net.svg";
import tran from "../images/trans.svg";
import sola from "../images/sol.svg";
import sync from "../images/sync.svg";
import common from "./common.js";
import cimedit from "./cimedit.js";
class cimjson {
static getImageName(type) {
return cimjson.imageNames[type];
let imageName;
if (cimjson.imageNames[type] !== undefined) {
imageName = cimjson.imageNames[type];
}
else {
imageName = cimjson.imageNames["generic"];
}
return imageName;
}
static convertDiagramObjectToTemplateFormat(diagramObject, graph, categoryGraphName) {
......@@ -245,6 +254,7 @@ cimjson.imageNames = {
"cim:SynchronousMachine": sync,
"cim:TopologicalNode": conn,
"cim:TransformerWinding": tran,
"generic": gene
};
......
......@@ -11,19 +11,19 @@
"scripts": {
"makeDirs": "mkdir -p cimmenu/templates/generated/attributes/cgmes && mkdir -p cimmenu/lib && mkdir -p cimsvg/lib && mkdir -p dist",
"cimmenu_base": "cd cimmenu && npm install && node templates/generateCgmesTemplates.js && cp templates/packageIndex.js ../cimsvg/src",
"cimsvg": "cd cimsvg && npm install && npm run build ${FLAGS}",
"cimmenu": "cd cimmenu && npm install && npm run build ${FLAGS}",
"cimsvg": "cd cimsvg && npm install && npm run build",
"cimmenu": "cd cimmenu && npm install && npm run build",
"libs": "npm run cimmenu_base && npm run cimsvg && npm run cimmenu",
"generateIndex": "node generateIndex.js $(npm config get mode) > index.html",
"makeDist": "cp -a cimmenu/templates/generated/*.xml cimmenu/lib/*.js cimsvg/lib/*.js dist",
"build-tasks": "npm run makeDirs && npm run libs && npm run generateIndex && npm run makeDist && npm run test",
"build": "npm config set mode production && npm run build-tasks",
"build-dev": "export FLAGS=' -- --sourcemap inline' npm config set mode development && npm run build-tasks",
"build-dev": "export ROLLUP_FLAGS=' --sourcemap inline'; export ESLINT_FLAGS=' --rule no-console:off '; npm config set mode development && npm run build-tasks",
"initializeTests": "node node_modules/jasmine/bin/jasmine init",
"test": "node test/runTests.js && npm run lint && npm run ctlint",
"lintfix": "eslint --fix index.js cimsvg/*.js cimsvg/src/*.js cimmenu/*.js cimmenu/src/*.js",
"ctlint": "cd cimmenu/templates && eslint -c .eslintrc.js *.js && cd ../..",
"lint": "eslint index.js cimsvg/*.js cimsvg/src/*.js cimmenu/*.js cimmenu/src/*.js",
"lintfix": "eslint --fix index.js cimsvg/*.js cimsvg/src/*.js cimmenu/*.js cimmenu/src/*.js ${ESLINT_FLAGS}",
"ctlint": "cd cimmenu/templates && eslint -c .eslintrc.js *.js ${ESLINT_FLAGS} && cd ../..",
"lint": "eslint index.js cimsvg/*.js cimsvg/src/*.js cimmenu/*.js cimmenu/src/*.js ${ESLINT_FLAGS}",
"mockNpmInstall": "./npm/mockInstall.sh"
},
"devDependencies": {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment