From 26365709d8eabd70d88cf2aa993098d1389dfb79 Mon Sep 17 00:00:00 2001 From: Maximilian Junker Date: Thu, 21 Feb 2019 10:43:41 +0100 Subject: [PATCH 01/13] small fixes in run config und web config --- .../config/specmate-config.properties | 15 +- web/src/app/config/config.ts | 134 +----------------- 2 files changed, 10 insertions(+), 139 deletions(-) diff --git a/bundles/specmate-config/config/specmate-config.properties b/bundles/specmate-config/config/specmate-config.properties index 0f10c5849..d545c2e7f 100644 --- a/bundles/specmate-config/config/specmate-config.properties +++ b/bundles/specmate-config/config/specmate-config.properties @@ -42,7 +42,7 @@ h2.jdbcConnection = jdbc:h2:./database/specmate ## missing numbers are replaced by 0s. ## example: day 13 will trigger every day at 13:00:00 # connectorPollSchedule = disabled -connectorPollSchedule = day +connectorPollSchedule = minute # Sarch Service search.allowedFields = extId, type, name, description @@ -55,12 +55,13 @@ search.maxResults = 100 ## Config for project jira -#project.jira.connector.pid = com.specmate.connectors.jira.JiraConnector -#project.jira.connector.jira.url = [URL] -#project.jira.connector.jira.project = [PROJECT-ID] -#project.jira.connector.jira.username = [USER] -#project.jira.connector.jira.password = [PASSWORD] -#project.jira.connector.connectorID = jira +project.projects = jira +project.jira.connector.pid = com.specmate.connectors.jira.JiraConnector +project.jira.connector.jira.url = https://qualicen.atlassian.net +project.jira.connector.jira.project = SPEM +project.jira.connector.jira.username = maximilian.junker@qualicen.de +project.jira.connector.jira.password = ***REMOVED*** +project.jira.connector.connectorID = jira diff --git a/web/src/app/config/config.ts b/web/src/app/config/config.ts index e829ca808..2c8f97b13 100644 --- a/web/src/app/config/config.ts +++ b/web/src/app/config/config.ts @@ -1,134 +1,3 @@ -<<<<<<< HEAD -export class Config { - - public static URL_BASE = 'services/rest/'; - public static URL_BATCH = '/batch'; - public static URL_CONTENTS = '/list'; - public static URL_ELEMENT = '/details'; - public static URL_DELETE = '/delete'; - - // If you change this, you also need to change the Jetty Redirects (jetty-redirects.xml) - public static VIEW_URL_PREFIX = '-/'; - - public static LOGIN_URL = Config.VIEW_URL_PREFIX + 'login'; - public static WELCOME_URL_PART = 'welcome'; - public static WELCOME_URL = Config.VIEW_URL_PREFIX + Config.WELCOME_URL_PART; - - // For all of these languages, we need to - // - have a .json file in assets/i18n - // - update it with the translation extractor in package.json (run 'npm run extract') - public static LANGUAGES = [ - {code: 'de', name: 'Deutsch'}, - {code: 'gb', name: 'English'} - ]; - public static DEFAULT_LANGUAGE = Config.LANGUAGES[0]; - public static LANGUAGE_CHOOSER_ENABLED = true; - public static USE_BROWSER_LANGUAGE = false; - - public static CONNECTIVITY_CHECK_DELAY = 10000; - public static NUM_HTTP_RETRIES = 10; - public static HTTP_RETRY_DELAY = 500; - public static HTTP_RETRY_ERRORS = [503, 404, 403, 401]; - - public static ACTIVATE_DEFAUTL_TOOL_ON_SUCCESS = false; - - public static LOG_START_MESSAGE = 'Specmate Started'; - public static LOG_LENGTH = 100; - public static LOG_DEFAULT_COLOR = 'muted'; - public static LOG_DEFAULT_ICON = 'comment'; - public static LOG_INITIALLY_SHOWN = false; - - public static MERGE_CONFLICT = 'Tried to merge commands with conflicting operations.'; - public static TRIED_TO_ADD_EXISTING_ELEMENT = 'Tried to add an existing element to parent! '; - - // Editor settings - public static GRAPHICAL_EDITOR_WIDTH = 1000; - public static GRAPHICAL_EDITOR_HEIGHT: number = (isNaN(window.innerHeight) ? window['clientHeight'] : window.innerHeight) * 0.75; - public static GRAPHICAL_EDITOR_PADDING_HORIZONTAL = 300; - public static GRAPHICAL_EDITOR_PADDING_VERTICAL = 300; - public static GRAPHICAL_EDITOR_VISIBILITY_HORIZONTAL = 100; - public static GRAPHICAL_EDITOR_VISIBILITY_VERTICAL = 100; - - public static GRAPHICAL_EDITOR_GRID_SPACE = 15; - public static GRAPHICAL_EDITOR_ZOOM_STEP = 0.1; - public static GRAPHICAL_EDITOR_ZOOM_MAX = 5; - - public static CEG_NODE_WIDTH = 150; - public static CEG_NODE_HEIGHT = 60; - public static CEG_NODE_ARC_DIST: number = 17 + - Math.sqrt((Config.CEG_NODE_WIDTH / 2.0) * (Config.CEG_NODE_WIDTH / 2.0) + - (Config.CEG_NODE_HEIGHT / 2.0) * (Config.CEG_NODE_HEIGHT / 2.0)); - - public static CEG_NEW_MODEL_NAME = 'New Model'; - public static CEG_NEW_MODEL_DESCRIPTION = ''; - - public static CEG_NEW_NODE_NAME = 'New Node'; - public static CEG_NEW_NODE_DESCRIPTION = ''; - public static CEG_NODE_NEW_TYPE = 'AND'; - public static CEG_NODE_NEW_VARIABLE = 'variable'; - public static CEG_NODE_NEW_CONDITION = 'is present'; - - public static CEG_NEW_CONNECTION_NAME = 'New Connection'; - public static CEG_NEW_CONNECTION_DESCRIPTION = ''; - - public static PROCESS_DECISION_NODE_DIM = 30; - public static PROCESS_START_END_NODE_RADIUS = 15; - public static PROCESS_NEW_PROCESS_NAME = 'New Process'; - public static PROCESS_NEW_PROCESS_DESCRIPTION = ''; - public static PROCESS_NEW_STEP_NAME = 'New Activity'; - public static PROCESS_NEW_STEP_DESCRIPTION = ''; - public static PROCESS_NEW_DECISION_NAME = 'New Decision'; - public static PROCESS_NEW_DECISION_DESCRIPTION = ''; - public static PROCESS_NEW_START_NAME = 'Start'; - public static PROCESS_NEW_START_DESCRIPTION = ''; - public static PROCESS_NEW_END_NAME = 'End'; - public static PROCESS_NEW_END_DESCRIPTION = ''; - public static PROCESS_NEW_CONNECTION_NAME = 'New Connection'; - public static PROCESS_NEW_CONNECTION_DESCRIPTION = ''; - - public static TESTSPEC_NAME = 'New Test Specification'; - public static TESTSPEC_DESCRIPTION = ''; - public static TESTSPEC_DESCRIPTION_TRUNC_LENGTH = 30; - - public static TESTPARAMETER_NAME = 'New Test Parameter'; - - public static TESTPARAMETERASSIGNMENT_NAME = 'New Test Parameter Assignment'; - public static TESTPARAMETERASSIGNMENT_DEFAULT_CONDITION = ''; - public static TESTPARAMETERASSIGNMENT_DEFAULT_VALUE = ''; - - public static TESTCASE_NAME = 'New Test Case'; - - public static TESTPROCEDURE_NAME = 'New Test Procedure'; - public static TESTPROCEDURE_DESCRIPTION = ''; - - public static TESTSTEP_NAME = 'New Test Step'; - public static TESTSTEP_ACTION = ''; - public static TESTSTEP_EXPECTED_OUTCOME = ''; - - public static FOLDER_NEW_NAME = 'New Folder'; - public static FOLDER_NEW_DESCRIPTION = ''; - - public static ERROR_UNCONNECTED_NODE = 'Unconnected node in model.'; - public static ERROR_DUPLICATE_IO_VARIABLE = 'Variable appears as cause and effect.'; - public static ERROR_DUPLICATE_NODE = 'Duplicate node.'; - public static ERROR_EMPTY_MODEL = 'Model empty.'; - public static ERROR_NOT_ONE_START_NODE = 'Not exactly one start node.'; - public static ERROR_NO_END_NODE = 'No end node.'; - public static ERROR_NODE_WITHOUT_INCOMING = 'Node without incoming connection.'; - public static ERROR_NODE_WITHOUT_OUTGOING = 'Node without outgoing connection.'; - public static ERROR_MISSING_CONDITION = 'Missing condition.'; - public static ERROR_MISSING_FIELDS = 'Missing fields: {{fields}}'; - public static ERROR_NO_STEPS = 'No steps in model.'; - public static ERROR_PROCESS_END_OUTGOING_CONNECTION = 'End node with outgoing connection.'; - public static ERROR_PROCESS_START_INCOMING_CONNECTION = 'Start node with incoming connection.'; - public static ERROR_PROCESS_NODE_MULTIPLE_OUTGOING_CONNECTIONS = 'Non-decision-node with multiple outgoing connections.'; - public static ERROR_PROCESS_DECISION_WITH_ONE_OR_LESS_OUTGOING_CONNECTIONS = 'Decision node not at least two outgoing connections.'; - public static ERROR_INVALID_NAME = 'Invalid character in name.'; - - // Number of elements to load at each step in the project explorer - public static ELEMENT_CHUNK_SIZE = 100; -} -======= export class Config { public static URL_BASE = 'services/rest/'; @@ -253,8 +122,9 @@ export class Config { public static ERROR_PROCESS_START_INCOMING_CONNECTION = 'Start node with incoming connection.'; public static ERROR_PROCESS_NODE_MULTIPLE_OUTGOING_CONNECTIONS = 'Non-decision-node with multiple outgoing connections.'; public static ERROR_PROCESS_DECISION_WITH_ONE_OR_LESS_OUTGOING_CONNECTIONS = 'Decision node not at least two outgoing connections.'; + public static ERROR_INVALID_NAME = 'Invalid character in name.'; // Number of elements to load at each step in the project explorer public static ELEMENT_CHUNK_SIZE = 100; } ->>>>>>> refs/remotes/origin/develop + From 3ccf8d8ee00ba463ca6fc0ebe2afa862e9256f96 Mon Sep 17 00:00:00 2001 From: Maximilian Junker Date: Thu, 21 Feb 2019 14:57:50 +0100 Subject: [PATCH 02/13] fix run cofnig --- bundles/specmate-std-env/prod-specmate-all.bndrun | 1 - 1 file changed, 1 deletion(-) diff --git a/bundles/specmate-std-env/prod-specmate-all.bndrun b/bundles/specmate-std-env/prod-specmate-all.bndrun index 76051ecb7..6f4585057 100644 --- a/bundles/specmate-std-env/prod-specmate-all.bndrun +++ b/bundles/specmate-std-env/prod-specmate-all.bndrun @@ -43,7 +43,6 @@ osgi.identity;filter:='(osgi.identity=specmate-dbprovider-api)',\ osgi.identity;filter:='(osgi.identity=specmate-dbprovider-h2)',\ osgi.identity;filter:='(osgi.identity=specmate-jira-connector)',\ - osgi.identity;filter:='(osgi.identity=specmate-nlp)',\ osgi.identity;filter:='(osgi.identity=specmate-model-generation)' -runbundles: \ javassist;version='[3.18.1,3.18.2)',\ From 83b3f8a499aa8520fcf9ef9c3b36ce7c4f1271c4 Mon Sep 17 00:00:00 2001 From: Maximilian Junker Date: Thu, 21 Feb 2019 15:40:52 +0100 Subject: [PATCH 03/13] fix run config --- bundles/specmate-nlp/.project.bak | 23 -- .../specmate-std-env/prod-specmate-all.bndrun | 226 ++---------------- 2 files changed, 25 insertions(+), 224 deletions(-) delete mode 100644 bundles/specmate-nlp/.project.bak diff --git a/bundles/specmate-nlp/.project.bak b/bundles/specmate-nlp/.project.bak deleted file mode 100644 index 3b42b0630..000000000 --- a/bundles/specmate-nlp/.project.bak +++ /dev/null @@ -1,23 +0,0 @@ - - - specmate-auth - - - - - - org.eclipse.jdt.core.javabuilder - - - - - bndtools.core.bndbuilder - - - - - - org.eclipse.jdt.core.javanature - bndtools.core.bndnature - - diff --git a/bundles/specmate-std-env/prod-specmate-all.bndrun b/bundles/specmate-std-env/prod-specmate-all.bndrun index 8d99f62ef..5e18c8853 100644 --- a/bundles/specmate-std-env/prod-specmate-all.bndrun +++ b/bundles/specmate-std-env/prod-specmate-all.bndrun @@ -1,5 +1,5 @@ -runfw: org.eclipse.osgi;version='[3.10.2.v20150203-1939,3.10.2.v20150203-1939]' --runee: JavaSE-1.8 +-runee: JavaSE-1.8 -runrequires: \ osgi.identity;filter:='(osgi.identity=specmate-cdo-server)',\ osgi.identity;filter:='(osgi.identity=org.glassfish.hk2.locator)',\ @@ -43,7 +43,7 @@ osgi.identity;filter:='(osgi.identity=specmate-dbprovider-api)',\ osgi.identity;filter:='(osgi.identity=specmate-dbprovider-h2)',\ osgi.identity;filter:='(osgi.identity=specmate-jira-connector)',\ - osgi.identity;filter:='(osgi.identity=specmate-nlp)',\ + osgi.identity;filter:='(osgi.identity=specmate-nlp)',\ osgi.identity;filter:='(osgi.identity=specmate-model-generation)' -runbundles: \ javassist;version='[3.18.1,3.18.2)',\ @@ -172,9 +172,22 @@ org.h2;version='[1.3.168,1.3.169)',\ specmate-cdo-server;version=snapshot,\ org.eclipse.emf.cdo.server.db;version='[4.4.0,4.4.1)',\ + specmate-jira-connector;version=snapshot,\ specmate-rest;version=snapshot,\ specmate-scheduler;version=snapshot,\ - specmate-jira-connector;version=snapshot,\ + com.ibm.icu;version='[63.1.0,63.1.1)',\ + io.reactivex.rxjava2.rxjava;version='[2.2.3,2.2.4)',\ + it.unimi.dsi.fastutil;version='[8.2.2,8.2.3)',\ + javax.money.api;version='[1.0.1,1.0.2)',\ + joda-time;version='[2.10.1,2.10.2)',\ + org.apache.commons.commons-compress;version='[1.18.0,1.18.1)',\ + org.apache.commons.commons-pool2;version='[2.6.0,2.6.1)',\ + org.apache.commons.lang;version='[2.6.0,2.6.1)',\ + org.apache.ivy;version='[2.4.0,2.4.1)',\ + org.apache.opennlp.tools;version='[1.9.1,1.9.2)',\ + org.reactivestreams.reactive-streams;version='[1.0.2,1.0.3)',\ + specmate-model-generation;version=snapshot,\ + specmate-nlp;version=snapshot,\ com.google.guava;version='[18.0.0,18.0.1)',\ org.apache.commons.lang3;version='[3.5.0,3.5.1)',\ slf4j.api;version='[1.7.25,1.7.26)',\ @@ -189,205 +202,16 @@ org.apache.servicemix.bundles.jcip-annotations;version='[1.0.0,1.0.1)',\ org.apache.servicemix.bundles.spring-beans;version='[4.1.7,4.1.8)',\ org.apache.servicemix.bundles.spring-core;version='[4.1.7,4.1.8)',\ - org.codehaus.jettison.jettison;version='[1.1.0,1.1.1)',\ - joda-time;version='[2.10.1,2.10.2)' -======= --runrequires: \ - osgi.identity;filter:='(osgi.identity=specmate-cdo-server)',\ - osgi.identity;filter:='(osgi.identity=org.glassfish.hk2.locator)',\ - osgi.identity;filter:='(osgi.identity=org.eclipse.equinox.log)',\ - osgi.identity;filter:='(osgi.identity=jul.to.slf4j)',\ - osgi.identity;filter:='(osgi.identity=log4j.over.slf4j)',\ - osgi.identity;filter:='(osgi.identity=specmate-common)',\ - osgi.identity;filter:='(osgi.identity=specmate-emfjson)',\ - osgi.identity;filter:='(osgi.identity=specmate-logging)',\ - osgi.identity;filter:='(osgi.identity=specmate-logging-slf4j)',\ - osgi.identity;filter:='(osgi.identity=specmate-logging-slf4j-julbridge)',\ - osgi.identity;filter:='(osgi.identity=specmate-persistency-api)',\ - osgi.identity;filter:='(osgi.identity=org.glassfish.jersey.containers.jersey-container-servlet)',\ - osgi.identity;filter:='(osgi.identity=org.eclipse.equinox.event)',\ - osgi.identity;filter:='(osgi.identity=specmate-emfrest)',\ - osgi.identity;filter:='(osgi.identity=specmate-model-gen)',\ - osgi.identity;filter:='(osgi.identity=org.eclipse.equinox.cm)',\ - osgi.identity;filter:='(osgi.identity=org.eclipse.equinox.metatype)',\ - osgi.identity;filter:='(osgi.identity=specmate-model-support)',\ - osgi.identity;filter:='(osgi.identity=specmate-ui-core)',\ - osgi.identity;filter:='(osgi.identity=specmate-config)',\ - osgi.identity;filter:='(osgi.identity=specmate-connectors)',\ - osgi.identity;filter:='(osgi.identity=specmate-testspecification)',\ - osgi.identity;filter:='(osgi.identity=specmate-hp-connector)',\ - osgi.identity;filter:='(osgi.identity=org.apache.felix.scr)',\ - osgi.identity;filter:='(&(osgi.identity=org.eclipse.jetty.osgi.boot)(version>=9.4.6))',\ - osgi.identity;filter:='(osgi.identity=org.eclipse.jetty.osgi.httpservice)',\ - osgi.identity;filter:='(osgi.identity=org.eclipse.jetty.rewrite)',\ - osgi.identity;filter:='(osgi.identity=specmate-jettystarter)',\ - osgi.identity;filter:='(osgi.identity=org.eclipse.emf.cdo.server.ocl)',\ - osgi.identity;filter:='(osgi.identity=org.json)',\ - osgi.identity;filter:='(osgi.identity=specmate-file-connector)',\ - osgi.identity;filter:='(osgi.identity=specmate-search)',\ - osgi.identity;filter:='(osgi.identity=specmate-migration)',\ - osgi.identity;filter:='(osgi.identity=specmate-persistency-cdo)',\ - osgi.identity;filter:='(osgi.identity=specmate-administration)',\ - osgi.identity;filter:='(osgi.identity=org.apache.commons.fileupload)',\ - osgi.identity;filter:='(osgi.identity=specmate-trello-connector)',\ - osgi.identity;filter:='(osgi.identity=specmate-auth-api)',\ - osgi.identity;filter:='(osgi.identity=specmate-auth)',\ - osgi.identity;filter:='(osgi.identity=specmate-dbprovider-api)',\ - osgi.identity;filter:='(osgi.identity=specmate-dbprovider-h2)',\ - bnd.identity;id='specmate-jira-connector' --runbundles: \ - javassist;version='[3.18.1,3.18.2)',\ - javax.annotation-api;version='[1.2.0,1.2.1)',\ - javax.validation.api;version='[1.1.0,1.1.1)',\ - javax.ws.rs-api;version='[2.0.1,2.0.2)',\ - jul.to.slf4j;version='[1.7.12,1.7.13)',\ - log4j.over.slf4j;version='[1.7.12,1.7.13)',\ - org.eclipse.core.contenttype;version='[3.4.200,3.4.201)',\ - org.eclipse.core.jobs;version='[3.6.1,3.6.2)',\ - org.eclipse.core.runtime;version='[3.10.0,3.10.1)',\ - org.eclipse.emf.ecore.change;version='[2.11.0,2.11.1)',\ - org.eclipse.equinox.app;version='[1.3.200,1.3.201)',\ - org.eclipse.equinox.cm;version='[1.1.0,1.1.1)',\ - org.eclipse.equinox.common;version='[3.6.200,3.6.201)',\ - org.eclipse.equinox.event;version='[1.3.100,1.3.101)',\ - org.eclipse.equinox.log;version='[1.2.300,1.2.301)',\ - org.eclipse.equinox.metatype;version='[1.4.0,1.4.1)',\ - org.eclipse.equinox.preferences;version='[3.5.200,3.5.201)',\ - org.eclipse.equinox.registry;version='[3.5.400,3.5.401)',\ - org.eclipse.osgi.services;version='[3.4.0,3.4.1)',\ - org.glassfish.hk2.api;version='[2.4.0,2.4.1)',\ - org.glassfish.hk2.external.aopalliance-repackaged;version='[2.4.0,2.4.1)',\ - org.glassfish.hk2.external.javax.inject;version='[2.4.0,2.4.1)',\ - org.glassfish.hk2.locator;version='[2.4.0,2.4.1)',\ - org.glassfish.hk2.osgi-resource-locator;version='[1.0.1,1.0.2)',\ - org.glassfish.hk2.utils;version='[2.4.0,2.4.1)',\ - org.glassfish.jersey.bundles.repackaged.jersey-guava;version='[2.17.0,2.17.1)',\ - org.glassfish.jersey.containers.jersey-container-servlet;version='[2.17.0,2.17.1)',\ - org.glassfish.jersey.containers.jersey-container-servlet-core;version='[2.17.0,2.17.1)',\ - org.glassfish.jersey.core.jersey-client;version='[2.17.0,2.17.1)',\ - org.glassfish.jersey.core.jersey-common;version='[2.17.0,2.17.1)',\ - org.glassfish.jersey.core.jersey-server;version='[2.17.0,2.17.1)',\ - org.glassfish.jersey.media.jersey-media-sse;version='[2.17.0,2.17.1)',\ - org.json;version=snapshot,\ - org.slf4j.api;version='[1.7.2,1.7.3)',\ - specmate-common;version=snapshot,\ - specmate-emfjson;version=snapshot,\ - specmate-emfrest;version=snapshot,\ - specmate-logging;version=snapshot,\ - specmate-logging-slf4j;version=snapshot,\ - specmate-logging-slf4j-julbridge;version=snapshot,\ - specmate-model-gen;version=snapshot,\ - specmate-persistency-api;version=snapshot,\ - specmate-persistency-cdo;version=snapshot,\ - specmate-model-support;version=snapshot,\ - specmate-ui-core;version=snapshot,\ - specmate-config;version=snapshot,\ - specmate-connectors;version=snapshot,\ - org.eclipse.emf.cdo;version='[4.5.0,4.5.1)',\ - org.eclipse.emf.cdo.common;version='[4.5.0,4.5.1)',\ - org.eclipse.emf.cdo.ecore.retrofit;version='[4.2.300,4.2.301)',\ - org.eclipse.emf.cdo.net4j;version='[4.1.400,4.1.401)',\ - org.eclipse.emf.cdo.server;version='[4.5.0,4.5.1)',\ - org.eclipse.emf.cdo.server.net4j;version='[4.1.300,4.1.301)',\ - org.eclipse.emf.common;version='[2.12.0,2.12.1)',\ - org.eclipse.emf.ecore;version='[2.12.0,2.12.1)',\ - org.eclipse.emf.ecore.xmi;version='[2.12.0,2.12.1)',\ - org.eclipse.net4j;version='[4.5.0,4.5.1)',\ - org.eclipse.net4j.tcp;version='[4.1.400,4.1.401)',\ - org.eclipse.net4j.util;version='[3.6.0,3.6.1)',\ - com.google.guava;version='[21.0.0,21.0.1)',\ - specmate-hp-connector;version=snapshot,\ - specmate-testspecification;version=snapshot,\ - org.apache.felix.scr;version='[2.0.8,2.0.9)',\ - org.apache.commons.fileupload;version='[1.3.1,1.3.2)',\ - org.apache.commons.io;version='[2.4.0,2.4.1)',\ - org.eclipse.equinox.http.servlet;version='[1.1.500,1.1.501)',\ - org.eclipse.jetty.deploy;version='[9.4.6,9.4.7)',\ - org.eclipse.jetty.http;version='[9.4.6,9.4.7)',\ - org.eclipse.jetty.io;version='[9.4.6,9.4.7)',\ - org.eclipse.jetty.osgi-servlet-api;version='[3.1.0,3.1.1)',\ - org.eclipse.jetty.osgi.boot;version='[9.4.6,9.4.7)',\ - org.eclipse.jetty.osgi.httpservice;version='[9.4.6,9.4.7)',\ - org.eclipse.jetty.rewrite;version='[9.4.6,9.4.7)',\ - org.eclipse.jetty.security;version='[9.4.6,9.4.7)',\ - org.eclipse.jetty.server;version='[9.4.6,9.4.7)',\ - org.eclipse.jetty.servlet;version='[9.4.6,9.4.7)',\ - org.eclipse.jetty.util;version='[9.4.6,9.4.7)',\ - org.eclipse.jetty.webapp;version='[9.4.6,9.4.7)',\ - org.eclipse.jetty.xml;version='[9.4.6,9.4.7)',\ - org.eclipse.equinox.http.jetty;version='[3.0.200,3.0.201)',\ - org.eclipse.jetty.continuation;version='[8.1.16,8.1.17)',\ - org.eclipse.jetty.http;version='[8.1.16,8.1.17)',\ - org.eclipse.jetty.io;version='[8.1.16,8.1.17)',\ - org.eclipse.jetty.security;version='[8.1.16,8.1.17)',\ - org.eclipse.jetty.server;version='[8.1.16,8.1.17)',\ - org.eclipse.jetty.servlet;version='[8.1.16,8.1.17)',\ - org.eclipse.jetty.util;version='[8.1.16,8.1.17)',\ - specmate-jettystarter;version=snapshot,\ - lpg.runtime.java;version='[2.0.17,2.0.18)',\ - org.eclipse.emf.cdo.server.ocl;version='[4.2.100,4.2.101)',\ - org.eclipse.ocl;version='[3.6.200,3.6.201)',\ - org.eclipse.ocl.common;version='[1.4.200,1.4.201)',\ - org.eclipse.ocl.ecore;version='[3.6.200,3.6.201)',\ - org.sat4j.core;version='[2.3.5,2.3.6)',\ - org.jgrapht.core;version='[1.0.1,1.0.2)',\ - org.apache.commons.cli;version='[1.4.0,1.4.1)',\ - org.sat4j.maxsat;version='[2.3.5,2.3.6)',\ - org.sat4j.pb;version='[2.3.5,2.3.6)',\ - specmate-file-connector;version=snapshot,\ - org.apache.servicemix.bundles.jakarta-regexp;version='[1.4.0,1.4.1)',\ - org.apache.servicemix.bundles.lucene;version='[7.2.0,7.2.1)',\ - org.apache.servicemix.bundles.lucene-queries;version='[7.2.0,7.2.1)',\ - org.apache.servicemix.bundles.lucene-queryparser;version='[7.2.0,7.2.1)',\ - org.apache.servicemix.bundles.lucene-sandbox;version='[7.2.0,7.2.1)',\ - specmate-search;version=snapshot,\ - specmate-migration;version=snapshot,\ - specmate-administration;version=snapshot,\ - specmate-emfrest-api;version=snapshot,\ - specmate-trello-connector;version=snapshot,\ - specmate-auth-api;version=snapshot,\ - specmate-auth;version=snapshot,\ - specmate-dbprovider-api;version=snapshot,\ - org.eclipse.net4j.db;version='[4.5.0,4.5.1)',\ - org.eclipse.net4j.db.jdbc;version='[4.3.100,4.3.101)',\ - org.eclipse.net4j.db.h2;version='[4.2.300,4.2.301)',\ - specmate-dbprovider-h2;version=snapshot,\ - specmate-config-api;version=snapshot,\ - com.diffplug.osgi.extension.sun.misc;version='[0.0.0,0.0.1)',\ - io.prometheus.simpleclient;version='[0.4.0,0.4.1)',\ - io.prometheus.simpleclient_common;version='[0.4.0,0.4.1)',\ - io.prometheus.simpleclient_servlet;version='[0.4.0,0.4.1)',\ - specmate-metrics;version=snapshot,\ - io.prometheus.simpleclient_hotspot;version='[0.4.0,0.4.1)',\ - org.h2;version='[1.3.168,1.3.169)',\ - specmate-cdo-server;version=snapshot,\ - org.eclipse.emf.cdo.server.db;version='[4.4.0,4.4.1)',\ - specmate-rest;version=snapshot,\ - specmate-scheduler;version=snapshot,\ - specmate-jira-connector;version=snapshot,\ - com.google.guava;version='[18.0.0,18.0.1)',\ - org.apache.commons.lang3;version='[3.5.0,3.5.1)',\ - slf4j.api;version='[1.7.25,1.7.26)',\ - com.atlassian.fugue;version='[2.7.0,2.7.1)',\ - com.atlassian.sal.api;version='[3.0.7,3.0.8)',\ - com.atlassian.util.concurrent.atlassian-util-concurrent;version='[3.0.0,3.0.1)',\ - joda-time;version='[2.9.9,2.9.10)',\ - org.apache.commons.codec;version='[1.10.0,1.10.1)',\ - org.apache.commons.logging;version='[1.1.1,1.1.2)',\ - org.apache.httpcomponents.httpasyncclient;version='[4.1.3,4.1.4)',\ - org.apache.httpcomponents.httpclient;version='[4.5.3,4.5.4)',\ - org.apache.httpcomponents.httpcore;version='[4.4.6,4.4.7)',\ - org.apache.servicemix.bundles.jcip-annotations;version='[1.0.0,1.0.1)',\ - org.apache.servicemix.bundles.spring-beans;version='[4.1.7,4.1.8)',\ - org.apache.servicemix.bundles.spring-core;version='[4.1.7,4.1.8)',\ - org.codehaus.jettison.jettison;version='[1.1.0,1.1.1)' --runproperties: \ - jetty.http.port=8080,\ - osgi.console=,\ - jetty.home.bundle=specmate-jettystarter,\ - jetty.etc.config.urls='etc/jetty.xml,etc/jetty-http.xml,etc/jetty-deployer.xml,etc/jetty-rewrite.xml',\ + org.codehaus.jettison.jettison;version='[1.1.0,1.1.1)' + +-runproperties: \ + jetty.http.port=8080,\ + jetty.etc.config.urls='etc/jetty.xml,etc/jetty-http.xml,etc/jetty-deployer.xml,etc/jetty-rewrite.xml',\ + osgi.console=,\ + jetty.home.bundle=specmate-jettystarter,\ osgi.compatibility.bootdelegation=true -runrepos: \ Workspace,\ Local --runvm: -Xmx6000m \ No newline at end of file +-runvm: -Xmx6000m\n\ + -Djdk.crypto.KeyAgreement.legacyKDF=true \ No newline at end of file From f8c7ab846af965faf57ad10804dbed789b0277c6 Mon Sep 17 00:00:00 2001 From: sebeder <23170307+sebeder@users.noreply.github.com> Date: Fri, 22 Feb 2019 11:13:36 +0100 Subject: [PATCH 04/13] Fix/connection without target or source (#389) * Remormatting and cleanup * Restructuring and refactoring * Fixing bug where connections are not deleted --- .../services/service-interface.ts | 6 -- .../components/graphical-editor.component.ts | 40 ++++----- .../tool-pallette/util/graph-transformer.ts | 88 +++++++++---------- 3 files changed, 61 insertions(+), 73 deletions(-) diff --git a/web/src/app/modules/data/modules/data-service/services/service-interface.ts b/web/src/app/modules/data/modules/data-service/services/service-interface.ts index 82324f6d2..aed2d6897 100644 --- a/web/src/app/modules/data/modules/data-service/services/service-interface.ts +++ b/web/src/app/modules/data/modules/data-service/services/service-interface.ts @@ -2,8 +2,6 @@ import { HttpClient, HttpParams, HttpHeaders, HttpErrorResponse } from '@angular import { Url } from '../../../../../util/url'; import { IContainer } from '../../../../../model/IContainer'; import { Objects } from '../../../../../util/objects'; -import { CEGConnection } from '../../../../../model/CEGConnection'; -import { Type } from '../../../../../util/type'; import 'rxjs/add/observable/of'; import { _throw } from 'rxjs/observable/throw'; import { UserToken } from '../../../../views/main/authentication/base/user-token'; @@ -131,10 +129,6 @@ export class ServiceInterface { let payload: any = Objects.clone(element); payload.url = undefined; delete payload.url; - if (Type.is(element, CEGConnection)) { - payload.source.___proxy = 'true'; - payload.target.___proxy = 'true'; - } if (!element.id) { payload['___proxy'] = 'true'; } diff --git a/web/src/app/modules/views/main/editors/modules/graphical-editor/components/graphical-editor.component.ts b/web/src/app/modules/views/main/editors/modules/graphical-editor/components/graphical-editor.component.ts index 7f433895e..5bdf7ae55 100644 --- a/web/src/app/modules/views/main/editors/modules/graphical-editor/components/graphical-editor.component.ts +++ b/web/src/app/modules/views/main/editors/modules/graphical-editor/components/graphical-editor.component.ts @@ -61,15 +61,13 @@ export class GraphicalEditor { constructor( private dataService: SpecmateDataService, - private modal: ConfirmationModal, protected editorToolsService: EditorToolsService, private selectedElementService: SelectedElementService, private validationService: ValidationService, - private viewController: ViewControllerService, private translate: TranslateService, public multiselectionService: MultiselectionService, private clipboardService: ClipboardService, - private renderer: Renderer ) { } + private renderer: Renderer) { } public get model(): IContainer { return this._model; @@ -156,13 +154,13 @@ export class GraphicalEditor { this.isGridShown = false; } - public get editorDimensions(): {width: number, height: number} { + public get editorDimensions(): { width: number, height: number } { let dynamicWidth: number = Config.GRAPHICAL_EDITOR_WIDTH; let dynamicHeight: number = Config.GRAPHICAL_EDITOR_HEIGHT; let nodes: ISpecmatePositionableModelObject[] = this.contents.filter((element: IContainer) => { return (element as ISpecmatePositionableModelObject).x !== undefined && - (element as ISpecmatePositionableModelObject).y !== undefined ; + (element as ISpecmatePositionableModelObject).y !== undefined; }) as ISpecmatePositionableModelObject[]; for (let i = 0; i < nodes.length; i++) { @@ -176,7 +174,7 @@ export class GraphicalEditor { dynamicHeight = nodeY; } } - return {width: dynamicWidth, height: dynamicHeight}; + return { width: dynamicWidth, height: dynamicHeight }; } public get gridSize(): number { @@ -199,8 +197,8 @@ export class GraphicalEditor { private isVisibleConnection(connection: IContainer): boolean { let nodes = this.nodes; - let start = nodes.find( node => node.url === (connection).source.url); - let end = nodes.find( node => node.url === (connection).target.url); + let start = nodes.find(node => node.url === (connection).source.url); + let end = nodes.find(node => node.url === (connection).target.url); if (!start || !end) { return false; } @@ -223,9 +221,9 @@ export class GraphicalEditor { * we sort the list so that all selected elements are drawn last (i.e. on top of the others). */ public get visibleConnections(): IContainer[] { - let selectedConnections = this.connections.filter( connection => this.isVisibleConnection(connection)); + let selectedConnections = this.connections.filter(connection => this.isVisibleConnection(connection)); // Sort the elements - selectedConnections.sort( (a: IContainer, b: IContainer) => this.isSelectedComparator(a, b)); + selectedConnections.sort((a: IContainer, b: IContainer) => this.isSelectedComparator(a, b)); return selectedConnections; } @@ -235,10 +233,10 @@ export class GraphicalEditor { * we sort the list so that all selected elements are drawn last (i.e. on top of the others). */ public get visibleNodes(): IContainer[] { - let visibleNodes = this.nodes.filter( node => Area.checkPointInArea(this.visibleArea, new Point( (node).x, (node).y))); + let visibleNodes = this.nodes.filter(node => Area.checkPointInArea(this.visibleArea, new Point((node).x, (node).y))); // Sort the elements - visibleNodes.sort( (a: IContainer, b: IContainer) => this.isSelectedComparator(a, b)); - return visibleNodes; + visibleNodes.sort((a: IContainer, b: IContainer) => this.isSelectedComparator(a, b)); + return this.nodes; } public get name(): string { @@ -261,18 +259,18 @@ export class GraphicalEditor { } public onScroll(event: UIEvent): void { - let target = event.target; + let target = event.target; this.setVisibleArea(target); } private setVisibleArea(target: any) { - let eWidth = this.editorDimensions.width; + let eWidth = this.editorDimensions.width; let eHeight = this.editorDimensions.height; - let xMin = eWidth * (target.scrollLeft / target.scrollWidth); - let xMax = xMin + (target.clientWidth / this.zoom); + let xMin = eWidth * (target.scrollLeft / target.scrollWidth); + let xMax = xMin + (target.clientWidth / this.zoom); let yMin = eHeight * (target.scrollTop / target.scrollHeight); - let yMax = yMin + (target.clientHeight / this.zoom); + let yMax = yMin + (target.clientHeight / this.zoom); xMin -= Config.GRAPHICAL_EDITOR_VISIBILITY_HORIZONTAL; yMin -= Config.GRAPHICAL_EDITOR_VISIBILITY_VERTICAL; @@ -282,7 +280,7 @@ export class GraphicalEditor { this.visibleArea = new Square(xMin, yMin, xMax, yMax); } - private checkAndReset(evt: MouseEvent|KeyboardEvent) { + private checkAndReset(evt: MouseEvent | KeyboardEvent) { if (this.editorToolsService.activeTool.done) { this.toolUseLock = evt.shiftKey; if (!this.toolUseLock && !this.editorToolsService.activeTool.sticky) { @@ -333,7 +331,7 @@ export class GraphicalEditor { private isDragDropTool(tool: ToolBase): boolean { let iTool = tool as IDragAndDropTool; let down = iTool.mouseDown !== undefined; - let up = iTool.mouseUp !== undefined; + let up = iTool.mouseUp !== undefined; let move = iTool.mouseDrag !== undefined; return down && up && move; } @@ -351,7 +349,7 @@ export class GraphicalEditor { private mousemove(evt: MouseEvent): void { // We only care about mousemovement when a button is pressed (i.e. drag & drop) - if (evt.buttons <= 0) { + if (evt.buttons <= 0) { return; } diff --git a/web/src/app/modules/views/main/editors/modules/tool-pallette/util/graph-transformer.ts b/web/src/app/modules/views/main/editors/modules/tool-pallette/util/graph-transformer.ts index 0d2920ca0..13dc7ca0b 100644 --- a/web/src/app/modules/views/main/editors/modules/tool-pallette/util/graph-transformer.ts +++ b/web/src/app/modules/views/main/editors/modules/tool-pallette/util/graph-transformer.ts @@ -45,60 +45,56 @@ export class GraphTransformer { } if (this.elementProvider.isNode(element)) { - return this.deleteNode(element as IModelNode, compoundId); + await this.deleteNode(element as IModelNode, compoundId); } else if (this.elementProvider.isConnection(element)) { - return this.deleteConnection(element as IModelConnection, compoundId); + await this.deleteConnection(element as IModelConnection, compoundId); } // Tried to delete element with type element.className. This type is not supported. } - public deleteElementAndDeselect(element: IContainer, compoundId: string): Promise { + public async deleteElementAndDeselect(element: IContainer, compoundId: string): Promise { if (this.selectionService !== undefined && this.selectionService !== null) { this.selectionService.deselectElement(element); } - return this.deleteElement(element, compoundId); + await this.deleteElement(element, compoundId); } - private deleteNode(node: IModelNode, compoundId: string): Promise { - return this.dataService.readContents(this.parent.url, true).then( (content: IContainer[]) => { - // Delete Connections - let chain = Promise.resolve(); - content.forEach(elem => { - if (this.elementProvider.isConnection(elem)) { - let currentConnection: IModelConnection = elem as IModelConnection; - if (currentConnection.source.url === node.url || currentConnection.target.url === node.url) { - chain = chain.then(() => this.deleteConnection(currentConnection, compoundId)); - } - } - }); - return chain; - }).then(() => this.dataService.deleteElement(node.url, true, compoundId)); + private async deleteNode(node: IModelNode, compoundId: string): Promise { + const contents: IContainer[] = await this.dataService.readContents(this.parent.url, true); + const connections = contents + .filter((element: IContainer) => this.elementProvider.isConnection(element)) + .map((element: IContainer) => element as IModelConnection) + .filter((connection: IModelConnection) => connection.source.url === node.url || connection.target.url === node.url); + for (let i = 0 ; i < connections.length; i++) { + await this.deleteConnection(connections[i], compoundId); + } + await this.dataService.deleteElement(node.url, true, compoundId); } - private deleteConnection(connection: IModelConnection, compoundId: string): Promise { - return this.removeConnectionFromSource(connection, compoundId) - .then(() => this.removeConnectionFromTarget(connection, compoundId)) - .then(() => this.dataService.deleteElement(connection.url, true, compoundId)); + private async deleteConnection(connection: IModelConnection, compoundId: string): Promise { + await this.removeConnectionFromSource(connection, compoundId); + await this.removeConnectionFromTarget(connection, compoundId); + await this.dataService.deleteElement(connection.url, true, compoundId); } - private removeConnectionFromSource(connection: IModelConnection, compoundId: string): Promise { - return this.dataService.readElement(connection.source.url, true) - .then((source: IModelNode) => { - let proxyToDelete: Proxy = source.outgoingConnections.find((proxy: Proxy) => proxy.url === connection.url); - Arrays.remove(source.outgoingConnections, proxyToDelete); - return source; - }) - .then((source: IContainer) => this.dataService.updateElement(source, true, compoundId)); + private async removeConnectionFromSource(connection: IModelConnection, compoundId: string): Promise { + const source = await this.dataService.readElement(connection.source.url, true) as IModelNode; + if (!source.outgoingConnections) { + return; + } + const proxy = source.outgoingConnections.find(proxy => proxy.url === connection.url); + Arrays.remove(source.outgoingConnections, proxy); + await this.dataService.updateElement(source, true, compoundId); } - private removeConnectionFromTarget(connection: IModelConnection, compoundId: string): Promise { - return this.dataService.readElement(connection.target.url, true) - .then((target: IModelNode) => { - let proxyToDelete: Proxy = target.incomingConnections.find((proxy: Proxy) => proxy.url === connection.url); - Arrays.remove(target.incomingConnections, proxyToDelete); - return target; - }) - .then((target: IContainer) => this.dataService.updateElement(target, true, compoundId)); + private async removeConnectionFromTarget(connection: IModelConnection, compoundId: string): Promise { + const target = await this.dataService.readElement(connection.target.url, true) as IModelNode; + if (!target.incomingConnections) { + return; + } + const proxy = target.incomingConnections.find(proxy => proxy.url === connection.url); + Arrays.remove(target.incomingConnections, proxy); + await this.dataService.updateElement(target, true, compoundId); } /** @@ -152,26 +148,26 @@ export class GraphTransformer { return Promise.resolve(out); } - private cloneNode(template: IModelNode, coords: Coords, compoundId: string, createNode: boolean): + private async cloneNode(template: IModelNode, coords: Coords, compoundId: string, createNode: boolean): Promise { if (!createNode) { - return Promise.resolve(Objects.clone(template)); + return Objects.clone(template); } let factory = GraphElementFactorySelector.getNodeFactory(template, coords, this.dataService); - return factory.create(this.parent, false, compoundId); + return await factory.create(this.parent, false, compoundId); } - private cloneEdge(template: IContainer, newSource: IModelNode, newTarget: IModelNode, compoundId: string, createEdge: boolean): + private async cloneEdge(template: IContainer, newSource: IModelNode, newTarget: IModelNode, compoundId: string, createEdge: boolean): Promise { if (!createEdge) { - return Promise.resolve(Objects.clone(template)); + return Objects.clone(template); } let factory = GraphElementFactorySelector.getConnectionFactory(template, newSource, newTarget, this.dataService); - return factory.create(this.parent, false, compoundId); + return await factory.create(this.parent, false, compoundId); } - private updateElement(element: IContainer, compoundId: string): Promise { - return this.dataService.updateElement(element, true, compoundId); + private async updateElement(element: IContainer, compoundId: string): Promise { + await this.dataService.updateElement(element, true, compoundId); } private transferData(from: IContainer, to: IContainer) { From b0b77f02e44c6aae2553f305f2573d80506bb745 Mon Sep 17 00:00:00 2001 From: Maximilian Junker Date: Fri, 22 Feb 2019 11:32:33 +0100 Subject: [PATCH 05/13] change config --- .../config/specmate-config.properties | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bundles/specmate-config/config/specmate-config.properties b/bundles/specmate-config/config/specmate-config.properties index d545c2e7f..1d87cb957 100644 --- a/bundles/specmate-config/config/specmate-config.properties +++ b/bundles/specmate-config/config/specmate-config.properties @@ -55,13 +55,13 @@ search.maxResults = 100 ## Config for project jira -project.projects = jira -project.jira.connector.pid = com.specmate.connectors.jira.JiraConnector -project.jira.connector.jira.url = https://qualicen.atlassian.net -project.jira.connector.jira.project = SPEM -project.jira.connector.jira.username = maximilian.junker@qualicen.de -project.jira.connector.jira.password = ***REMOVED*** -project.jira.connector.connectorID = jira +#project.projects = jira +#project.jira.connector.pid = com.specmate.connectors.jira.JiraConnector +#project.jira.connector.jira.url = +#project.jira.connector.jira.project = SPEM +#project.jira.connector.jira.username = +#project.jira.connector.jira.password = +#project.jira.connector.connectorID = jira From db33561e0dfc5e30e6f29e55458893dfba056173 Mon Sep 17 00:00:00 2001 From: Maximilian Junker Date: Fri, 22 Feb 2019 17:34:09 +0100 Subject: [PATCH 06/13] fix nullpointer exception when no hostandport parameter is given --- .../internal/CDOPersistencyServiceConfig.java | 46 ++++++++++--------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/bundles/specmate-persistency-cdo/src/com/specmate/persistency/cdo/internal/CDOPersistencyServiceConfig.java b/bundles/specmate-persistency-cdo/src/com/specmate/persistency/cdo/internal/CDOPersistencyServiceConfig.java index b711086fd..50b92e386 100644 --- a/bundles/specmate-persistency-cdo/src/com/specmate/persistency/cdo/internal/CDOPersistencyServiceConfig.java +++ b/bundles/specmate-persistency-cdo/src/com/specmate/persistency/cdo/internal/CDOPersistencyServiceConfig.java @@ -55,14 +55,14 @@ public class CDOPersistencyServiceConfig { */ @Activate private void activate() throws SpecmateException { - this.specmateRepository = configService.getConfigurationProperty(KEY_REPOSITORY_NAME); - this.specmateResource = configService.getConfigurationProperty(KEY_RESOURCE_NAME); - this.cdoUser = configService.getConfigurationProperty(KEY_CDO_USER); - this.cdoPassword = configService.getConfigurationProperty(KEY_CDO_PASSWORD); - this.host = configService.getConfigurationProperty(KEY_SERVER_HOST_PORT); + this.specmateRepository = this.configService.getConfigurationProperty(KEY_REPOSITORY_NAME); + this.specmateResource = this.configService.getConfigurationProperty(KEY_RESOURCE_NAME); + this.cdoUser = this.configService.getConfigurationProperty(KEY_CDO_USER); + this.cdoPassword = this.configService.getConfigurationProperty(KEY_CDO_PASSWORD); + this.host = this.configService.getConfigurationProperty(KEY_SERVER_HOST_PORT); this.connected = false; String[] hostport = StringUtils.split(this.host, ":"); - if (!(hostport.length == 2)) { + if (hostport == null || !(hostport.length == 2)) { throw new SpecmateInternalException(ErrorCode.CONFIGURATION, "Invalid format for CDO host: " + this.host + ". The expected format is [hostName]:[port]"); } @@ -77,31 +77,32 @@ private void deactivate() { } /** - * Starts a thread that periodically checks if the CDO server is still reachable + * Starts a thread that periodically checks if the CDO server is still + * reachable */ private void startMonitoringThread() { this.checkConnectionEexcutor = Executors.newScheduledThreadPool(1); - checkConnectionEexcutor.scheduleWithFixedDelay(() -> { + this.checkConnectionEexcutor.scheduleWithFixedDelay(() -> { if (this.connected) { if (!checkConnection()) { try { removeConfiguration(); this.connected = false; - logService.log(LogService.LOG_WARNING, "Lost connection to CDO server."); + this.logService.log(LogService.LOG_WARNING, "Lost connection to CDO server."); } catch (SpecmateException e) { - logService.log(LogService.LOG_ERROR, "Could not stop persistency."); + this.logService.log(LogService.LOG_ERROR, "Could not stop persistency."); } } } else { if (checkConnection()) { try { - logService.log(LogService.LOG_INFO, "Connection to CDO server established."); + this.logService.log(LogService.LOG_INFO, "Connection to CDO server established."); registerConfiguration(); this.connected = true; } catch (SpecmateException e) { - logService.log(LogService.LOG_ERROR, "Could not restart persistency."); + this.logService.log(LogService.LOG_ERROR, "Could not restart persistency."); } } } @@ -112,22 +113,23 @@ private void startMonitoringThread() { private void registerConfiguration() throws SpecmateException { Dictionary properties = new Hashtable<>(); - if (!StringUtil.isEmpty(specmateRepository) && !StringUtil.isEmpty(specmateResource) - && !StringUtil.isEmpty(host) && !StringUtil.isEmpty(cdoUser) && !StringUtil.isEmpty(cdoPassword)) { - properties.put(KEY_REPOSITORY_NAME, specmateRepository); - properties.put(KEY_RESOURCE_NAME, specmateResource); - properties.put(KEY_SERVER_HOST_PORT, host); - properties.put(KEY_CDO_USER, cdoUser); - properties.put(KEY_CDO_PASSWORD, cdoPassword); - logService.log(LogService.LOG_DEBUG, + if (!StringUtil.isEmpty(this.specmateRepository) && !StringUtil.isEmpty(this.specmateResource) + && !StringUtil.isEmpty(this.host) && !StringUtil.isEmpty(this.cdoUser) + && !StringUtil.isEmpty(this.cdoPassword)) { + properties.put(KEY_REPOSITORY_NAME, this.specmateRepository); + properties.put(KEY_RESOURCE_NAME, this.specmateResource); + properties.put(KEY_SERVER_HOST_PORT, this.host); + properties.put(KEY_CDO_USER, this.cdoUser); + properties.put(KEY_CDO_PASSWORD, this.cdoPassword); + this.logService.log(LogService.LOG_DEBUG, "Configuring CDO with:\n" + OSGiUtil.configDictionaryToString(properties)); - this.configuration = OSGiUtil.configureService(configurationAdmin, PID, properties); + this.configuration = OSGiUtil.configureService(this.configurationAdmin, PID, properties); } } private void removeConfiguration() throws SpecmateException { try { - configuration.delete(); + this.configuration.delete(); } catch (IOException e) { throw new SpecmateInternalException(ErrorCode.CONFIGURATION, "Could not delete configuration."); } From 5cb6745eb768cfa19414c63c89aa2491150303ab Mon Sep 17 00:00:00 2001 From: Maximilian Junker Date: Fri, 22 Feb 2019 17:34:29 +0100 Subject: [PATCH 07/13] version bump to 0.2.14 --- web/webpack/webpack.common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/webpack/webpack.common.js b/web/webpack/webpack.common.js index 5f661fbd8..25ae5cbc2 100644 --- a/web/webpack/webpack.common.js +++ b/web/webpack/webpack.common.js @@ -1,4 +1,4 @@ -const SPECMATE_VERSION = '0.2.13' +const SPECMATE_VERSION = '0.2.14' const webpack = require('webpack'); const HtmlWebpackPlugin = require('html-webpack-plugin'); From 34ba9160abccb265561d749b20f20d475247a0f2 Mon Sep 17 00:00:00 2001 From: sebeder <23170307+sebeder@users.noreply.github.com> Date: Wed, 27 Feb 2019 08:48:04 +0100 Subject: [PATCH 08/13] Added missing translations (#391) * Added missing translations * Translating field descriptions as well * Adding missing translation --- .../config/specmate-config.properties | 142 ++- web/src/app/model/meta/field-meta.ts | 1038 ++++++++--------- .../form-checkbox-input.component.html | 20 +- .../form-long-text-input.component.html | 16 +- ...form-single-selection-input.component.html | 20 +- .../components/form-text-input.component.html | 20 +- web/src/assets/i18n/de.json | 8 +- web/src/assets/i18n/gb.json | 8 +- 8 files changed, 641 insertions(+), 631 deletions(-) diff --git a/bundles/specmate-config/config/specmate-config.properties b/bundles/specmate-config/config/specmate-config.properties index 1d87cb957..2d343bc64 100644 --- a/bundles/specmate-config/config/specmate-config.properties +++ b/bundles/specmate-config/config/specmate-config.properties @@ -1,73 +1,71 @@ -# Logging -# Choose from debug, info, warning, error -logging.level = info - -# CDO Persistency Settings -## CDO Common -### Repository name, in case of Oracle, must be identical to the schema name -cdo.repositoryName = specmate_repository -cdo.user = cdoUser -cdo.password = cdoPass - -## CDO Server -### TCP port where the CDO server should listen -cdo.serverHostAndPort = localhost:2036 - -## CDO Client -### Name of the CDO resource to use -cdo.resourceName = specmate_resource -### CDO host to connect to. If client and server are started in same process, should match cdo.serverPort -cdo.host = localhost:2036 - -## H2 -### JDBC connection string for the H2 database -h2.jdbcConnection = jdbc:h2:./database/specmate - - -## Oracle -### JDBC connection string for the oracle database -#oracle.jdbcConnection = - -#oracle.username = -#oracle.password = - -# Connectors General Settings -## cron string to schedule, when connectors are triggered. -## Set to "disabled" (without quotes) to disable polling. -## default: disabled -## generic value (will trigger every hour): hour -## example: day 13 14 5 will trigger every day at 13:14:05 -## example: hour 14 5 will trigger every hour at xx:14:05 -## example: minute 5 will trigger every minute at xx:xx:05 -## missing numbers are replaced by 0s. -## example: day 13 will trigger every day at 13:00:00 -# connectorPollSchedule = disabled -connectorPollSchedule = minute - -# Sarch Service -search.allowedFields = extId, type, name, description -search.lucene.location = ./database/lucene -search.maxResults = 100 - -# Projects -## List of project ids, each project listed here needs to be configured below -#project.projects = jira - -## Config for project jira +# Logging +# Choose from debug, info, warning, error +logging.level = info + +# CDO Persistency Settings +## CDO Common +### Repository name, in case of Oracle, must be identical to the schema name +cdo.repositoryName = specmate_repository +cdo.user = cdoUser +cdo.password = cdoPass + +## CDO Server +### TCP port where the CDO server should listen +cdo.serverHostAndPort = localhost:2036 + +## CDO Client +### Name of the CDO resource to use +cdo.resourceName = specmate_resource +### CDO host to connect to. If client and server are started in same process, should match cdo.serverPort +cdo.host = localhost:2036 + +## H2 +### JDBC connection string for the H2 database +h2.jdbcConnection = jdbc:h2:./database/specmate + + +## Oracle +### JDBC connection string for the oracle database +#oracle.jdbcConnection = + +#oracle.username = +#oracle.password = + +# Connectors General Settings +## cron string to schedule, when connectors are triggered. +## Set to "disabled" (without quotes) to disable polling. +## default: disabled +## generic value (will trigger every hour): hour +## example: day 13 14 5 will trigger every day at 13:14:05 +## example: hour 14 5 will trigger every hour at xx:14:05 +## example: minute 5 will trigger every minute at xx:xx:05 +## missing numbers are replaced by 0s. +## example: day 13 will trigger every day at 13:00:00 +# connectorPollSchedule = disabled +connectorPollSchedule = minute + +# Sarch Service +search.allowedFields = extId, type, name, description +search.lucene.location = ./database/lucene +search.maxResults = 100 + +# Projects +## List of project ids, each project listed here needs to be configured below +#project.projects = jira + +## Config for project jira + +#project.projects = jira +#project.jira.connector.pid = com.specmate.connectors.jira.JiraConnector +#project.jira.connector.jira.url = +#project.jira.connector.jira.project = SPEM +#project.jira.connector.jira.username = +#project.jira.connector.jira.password = +#project.jira.connector.connectorID = jira + +# User session +## Number of minutes a session is valid after the last http request +session.maxIdleMinutes = 720 +## Persist sessions in database or keep in memory +session.persistent = true -#project.projects = jira -#project.jira.connector.pid = com.specmate.connectors.jira.JiraConnector -#project.jira.connector.jira.url = -#project.jira.connector.jira.project = SPEM -#project.jira.connector.jira.username = -#project.jira.connector.jira.password = -#project.jira.connector.connectorID = jira - - - -# User session -## Number of minutes a session is valid after the last http request -session.maxIdleMinutes = 720 -## Persist sessions in database or keep in memory -session.persistent = true - diff --git a/web/src/app/model/meta/field-meta.ts b/web/src/app/model/meta/field-meta.ts index 4ba5345d7..3d4dd5844 100644 --- a/web/src/app/model/meta/field-meta.ts +++ b/web/src/app/model/meta/field-meta.ts @@ -1,532 +1,532 @@ export class FieldMetaItem { - public name: string; + public name: string; public shortDesc: string; public longDesc: string; public type: string; public required?: boolean; public values?: string; - public rows?: string; - public position?: string; + public rows?: string; + public position?: string; public allowedPattern?: string; } export class MetaInfo { - public static INamed: FieldMetaItem[] = [ - { - name: "name", - shortDesc: 'Name', - longDesc: '', - required: true, - type: 'text', - position: '0', - allowedPattern: '^[^,;|]*$' - } ]; - public static IDescribed: FieldMetaItem[] = [ - { - name: "description", - shortDesc: 'Description', - longDesc: '', - required: false, - type: 'longText', - rows: '5', - position: '100' - } ]; - public static IID: FieldMetaItem[] = [ - ]; - public static IContentElement: FieldMetaItem[] = [ - { - name: "name", - shortDesc: 'Name', - longDesc: '', - required: true, - type: 'text', - position: '0', - allowedPattern: '^[^,;|]*$' - }, { - name: "description", - shortDesc: 'Description', - longDesc: '', - required: false, - type: 'longText', - rows: '5', - position: '100' - } ]; - public static IContainer: FieldMetaItem[] = [ - { - name: "name", - shortDesc: 'Name', - longDesc: '', - required: true, - type: 'text', - position: '0', - allowedPattern: '^[^,;|]*$' - }, { - name: "description", - shortDesc: 'Description', - longDesc: '', - required: false, - type: 'longText', - rows: '5', - position: '100' - } ]; - public static ISpecmateModelObject: FieldMetaItem[] = [ - { - name: "name", - shortDesc: 'Name', - longDesc: '', - required: true, - type: 'text', - position: '0', - allowedPattern: '^[^,;|]*$' - }, { - name: "description", - shortDesc: 'Description', - longDesc: '', - required: false, - type: 'longText', - rows: '5', - position: '100' - } ]; - public static Folder: FieldMetaItem[] = [ - { - name: "name", - shortDesc: 'Name', - longDesc: '', - required: true, - type: 'text', - position: '0', - allowedPattern: '^[^,;|]*$' - }, { - name: "description", - shortDesc: 'Description', - longDesc: '', - required: false, - type: 'longText', - rows: '5', - position: '100' - } ]; - public static IPositionable: FieldMetaItem[] = [ - ]; - public static IExternal: FieldMetaItem[] = [ - ]; - public static ISpecmatePositionableModelObject: FieldMetaItem[] = [ - { - name: "name", - shortDesc: 'Name', - longDesc: '', - required: true, - type: 'text', - position: '0', - allowedPattern: '^[^,;|]*$' - }, { - name: "description", - shortDesc: 'Description', - longDesc: '', - required: false, - type: 'longText', - rows: '5', - position: '100' - } ]; - public static IModelConnection: FieldMetaItem[] = [ - { - name: "name", - shortDesc: 'Name', - longDesc: '', - required: true, - type: 'text', - position: '0', - allowedPattern: '^[^,;|]*$' - }, { - name: "description", - shortDesc: 'Description', - longDesc: '', - required: false, - type: 'longText', - rows: '5', - position: '100' - } ]; - public static IModelNode: FieldMetaItem[] = [ - { - name: "name", - shortDesc: 'Name', - longDesc: '', - required: true, - type: 'text', - position: '0', - allowedPattern: '^[^,;|]*$' - }, { - name: "description", - shortDesc: 'Description', - longDesc: '', - required: false, - type: 'longText', - rows: '5', - position: '100' - } ]; - public static ITracingElement: FieldMetaItem[] = [ - ]; - public static Requirement: FieldMetaItem[] = [ - { - name: "name", - shortDesc: 'Name', - longDesc: '', - required: true, - type: 'text', - position: '0', - allowedPattern: '^[^,;|]*$' - }, { - name: "description", - shortDesc: 'Description', - longDesc: '', - required: false, - type: 'longText', - rows: '5', - position: '100' - } ]; - public static CEGModel: FieldMetaItem[] = [ - { - name: "name", - shortDesc: 'Name', - longDesc: '', - required: true, - type: 'text', - position: '0', - allowedPattern: '^[^,;|]*$' - }, { - name: "description", - shortDesc: 'Description', - longDesc: '', - required: false, - type: 'longText', - rows: '5', - position: '100' - }, { - name: "modelRequirements", - shortDesc: 'Model Requirements', - longDesc: '', - required: false, - type: 'longText', - rows: '5', - position: '110' - } ]; - public static CEGNode: FieldMetaItem[] = [ - { - name: "type", - shortDesc: 'Type', - longDesc: 'The type of a node', - required: true, - type: 'singleSelection', - values: '["AND", "OR"]', - position: '3' - }, { - name: "variable", - shortDesc: 'Variable', - longDesc: 'The variable of a node', - required: true, - type: 'text', - position: '1' - }, { - name: "condition", - shortDesc: 'Condition', - longDesc: 'The condition the variable has to fulfil', - required: true, - type: 'text', - position: '2' - } ]; - public static CEGConnection: FieldMetaItem[] = [ - { - name: "name", - shortDesc: 'Name', - longDesc: '', - required: true, - type: 'text', - position: '0', - allowedPattern: '^[^,;|]*$' - }, { - name: "description", - shortDesc: 'Description', - longDesc: '', - required: false, - type: 'longText', - rows: '5', - position: '100' - }, { - name: "negate", - shortDesc: 'Negate', - longDesc: 'Negation of this connection', - type: 'checkbox', - position: '1' - } ]; - public static TestSpecification: FieldMetaItem[] = [ - { - name: "name", - shortDesc: 'Name', - longDesc: '', - required: true, - type: 'text', - position: '0', - allowedPattern: '^[^,;|]*$' - }, { - name: "description", - shortDesc: 'Description', - longDesc: '', - required: false, - type: 'longText', - rows: '5', - position: '100' - } ]; - public static TestSpecificationSkeleton: FieldMetaItem[] = [ - { - name: "name", - shortDesc: 'Name', - longDesc: '', - required: true, - type: 'text', - position: '0', - allowedPattern: '^[^,;|]*$' - } ]; - public static TestParameter: FieldMetaItem[] = [ - { - name: "name", - shortDesc: 'Name', - longDesc: '', - required: true, - type: 'text', - position: '0', - allowedPattern: '^[^,;|]*$' - }, { - name: "description", - shortDesc: 'Description', - longDesc: '', - required: false, - type: 'longText', - rows: '5', - position: '100' - } ]; - public static TestCase: FieldMetaItem[] = [ - { - name: "name", - shortDesc: 'Name', - longDesc: '', - required: true, - type: 'text', - position: '0', - allowedPattern: '^[^,;|]*$' - }, { - name: "description", - shortDesc: 'Description', - longDesc: '', - required: false, - type: 'longText', - rows: '5', - position: '100' - } ]; - public static ParameterAssignment: FieldMetaItem[] = [ - { - name: "name", - shortDesc: 'Name', - longDesc: '', - required: true, - type: 'text', - position: '0', - allowedPattern: '^[^,;|]*$' - }, { - name: "description", - shortDesc: 'Description', - longDesc: '', - required: false, - type: 'longText', - rows: '5', - position: '100' - } ]; - public static TestProcedure: FieldMetaItem[] = [ - { - name: "name", - shortDesc: 'Name', - longDesc: '', - required: true, - type: 'text', - position: '0', - allowedPattern: '^[^,;|]*$' - }, { - name: "description", - shortDesc: 'Description', - longDesc: '', - required: false, - type: 'longText', - rows: '5', - position: '100' - }, { - name: "isRegressionTest", - shortDesc: 'Regression Test', - type: 'checkbox', - position: '3', - longDesc: '' - } ]; - public static TestStep: FieldMetaItem[] = [ - { - name: "name", - shortDesc: 'Name', - longDesc: '', - required: true, - type: 'text', - position: '0', - allowedPattern: '^[^,;|]*$' - }, { - name: "description", - shortDesc: 'Description', - longDesc: '', - required: false, - type: 'longText', - rows: '5', - position: '100' - } ]; - public static Process: FieldMetaItem[] = [ - { - name: "name", - shortDesc: 'Name', - longDesc: '', - required: true, - type: 'text', - position: '0', - allowedPattern: '^[^,;|]*$' - }, { - name: "description", - shortDesc: 'Description', - longDesc: '', - required: false, - type: 'longText', - rows: '5', - position: '100' - } ]; - public static ProcessNode: FieldMetaItem[] = [ - { - name: "name", - shortDesc: 'Name', - longDesc: '', - required: true, - type: 'text', - position: '0', - allowedPattern: '^[^,;|]*$' - }, { - name: "description", - shortDesc: 'Description', - longDesc: '', - required: false, - type: 'longText', - rows: '5', - position: '100' - } ]; - public static ProcessStep: FieldMetaItem[] = [ - { - name: "name", - shortDesc: 'Name', - longDesc: '', - required: true, - type: 'text', - position: '0', - allowedPattern: '^[^,;|]*$' - }, { - name: "description", - shortDesc: 'Description', - longDesc: '', - required: false, - type: 'longText', - rows: '5', - position: '100' - }, { - name: "expectedOutcome", - shortDesc: 'Expected Outcome', - longDesc: '', - required: false, - type: 'text', - position: '101' - } ]; - public static ProcessDecision: FieldMetaItem[] = [ - { - name: "name", - shortDesc: 'Name', - longDesc: '', - required: true, - type: 'text', - position: '0', - allowedPattern: '^[^,;|]*$' - }, { - name: "description", - shortDesc: 'Description', - longDesc: '', - required: false, - type: 'longText', - rows: '5', - position: '100' - } ]; - public static ProcessConnection: FieldMetaItem[] = [ - { - name: "description", - shortDesc: 'Description', - longDesc: '', - required: false, - type: 'longText', - rows: '5', - position: '100' - }, { - name: "condition", - shortDesc: 'Condition', - longDesc: 'The condition the variable has to fulfil', - required: false, - type: 'text', - position: '2' - } ]; - public static ProcessStart: FieldMetaItem[] = [ - { - name: "name", - shortDesc: 'Name', - longDesc: '', - required: true, - type: 'text', - position: '0', - allowedPattern: '^[^,;|]*$' - }, { - name: "description", - shortDesc: 'Description', - longDesc: '', - required: false, - type: 'longText', - rows: '5', - position: '100' - } ]; - public static ProcessEnd: FieldMetaItem[] = [ - { - name: "name", - shortDesc: 'Name', - longDesc: '', - required: true, - type: 'text', - position: '0', - allowedPattern: '^[^,;|]*$' - }, { - name: "description", - shortDesc: 'Description', - longDesc: '', - required: false, - type: 'longText', - rows: '5', - position: '100' - } ]; - public static History: FieldMetaItem[] = [ - ]; - public static HistoryEntry: FieldMetaItem[] = [ - ]; - public static Change: FieldMetaItem[] = [ - ]; - public static Status: FieldMetaItem[] = [ - ]; - public static ProblemDetail: FieldMetaItem[] = [ - ]; - public static BatchOperation: FieldMetaItem[] = [ - ]; - public static Operation: FieldMetaItem[] = [ - ]; + public static INamed: FieldMetaItem[] = [ + { + name: 'name', + shortDesc: 'Name', + longDesc: '', + required: true, + type: 'text', + position: '0', + allowedPattern: '^[^,;|]*$' + }]; + public static IDescribed: FieldMetaItem[] = [ + { + name: 'description', + shortDesc: 'Description', + longDesc: '', + required: false, + type: 'longText', + rows: '5', + position: '100' + }]; + public static IID: FieldMetaItem[] = [ + ]; + public static IContentElement: FieldMetaItem[] = [ + { + name: 'name', + shortDesc: 'Name', + longDesc: '', + required: true, + type: 'text', + position: '0', + allowedPattern: '^[^,;|]*$' + }, { + name: 'description', + shortDesc: 'Description', + longDesc: '', + required: false, + type: 'longText', + rows: '5', + position: '100' + }]; + public static IContainer: FieldMetaItem[] = [ + { + name: 'name', + shortDesc: 'Name', + longDesc: '', + required: true, + type: 'text', + position: '0', + allowedPattern: '^[^,;|]*$' + }, { + name: 'description', + shortDesc: 'Description', + longDesc: '', + required: false, + type: 'longText', + rows: '5', + position: '100' + }]; + public static ISpecmateModelObject: FieldMetaItem[] = [ + { + name: 'name', + shortDesc: 'Name', + longDesc: '', + required: true, + type: 'text', + position: '0', + allowedPattern: '^[^,;|]*$' + }, { + name: 'description', + shortDesc: 'Description', + longDesc: '', + required: false, + type: 'longText', + rows: '5', + position: '100' + }]; + public static Folder: FieldMetaItem[] = [ + { + name: 'name', + shortDesc: 'Name', + longDesc: '', + required: true, + type: 'text', + position: '0', + allowedPattern: '^[^,;|]*$' + }, { + name: 'description', + shortDesc: 'Description', + longDesc: '', + required: false, + type: 'longText', + rows: '5', + position: '100' + }]; + public static IPositionable: FieldMetaItem[] = [ + ]; + public static IExternal: FieldMetaItem[] = [ + ]; + public static ISpecmatePositionableModelObject: FieldMetaItem[] = [ + { + name: 'name', + shortDesc: 'Name', + longDesc: '', + required: true, + type: 'text', + position: '0', + allowedPattern: '^[^,;|]*$' + }, { + name: 'description', + shortDesc: 'Description', + longDesc: '', + required: false, + type: 'longText', + rows: '5', + position: '100' + }]; + public static IModelConnection: FieldMetaItem[] = [ + { + name: 'name', + shortDesc: 'Name', + longDesc: '', + required: true, + type: 'text', + position: '0', + allowedPattern: '^[^,;|]*$' + }, { + name: 'description', + shortDesc: 'Description', + longDesc: '', + required: false, + type: 'longText', + rows: '5', + position: '100' + }]; + public static IModelNode: FieldMetaItem[] = [ + { + name: 'name', + shortDesc: 'Name', + longDesc: '', + required: true, + type: 'text', + position: '0', + allowedPattern: '^[^,;|]*$' + }, { + name: 'description', + shortDesc: 'Description', + longDesc: '', + required: false, + type: 'longText', + rows: '5', + position: '100' + }]; + public static ITracingElement: FieldMetaItem[] = [ + ]; + public static Requirement: FieldMetaItem[] = [ + { + name: 'name', + shortDesc: 'Name', + longDesc: '', + required: true, + type: 'text', + position: '0', + allowedPattern: '^[^,;|]*$' + }, { + name: 'description', + shortDesc: 'Description', + longDesc: '', + required: false, + type: 'longText', + rows: '5', + position: '100' + }]; + public static CEGModel: FieldMetaItem[] = [ + { + name: 'name', + shortDesc: 'Name', + longDesc: '', + required: true, + type: 'text', + position: '0', + allowedPattern: '^[^,;|]*$' + }, { + name: 'description', + shortDesc: 'Description', + longDesc: '', + required: false, + type: 'longText', + rows: '5', + position: '100' + }, { + name: 'modelRequirements', + shortDesc: 'Model Requirements', + longDesc: '', + required: false, + type: 'longText', + rows: '5', + position: '110' + }]; + public static CEGNode: FieldMetaItem[] = [ + { + name: 'type', + shortDesc: 'Type', + longDesc: 'The type of a node', + required: true, + type: 'singleSelection', + values: '["AND", "OR"]', + position: '3' + }, { + name: 'variable', + shortDesc: 'Variable', + longDesc: 'The variable of a node', + required: true, + type: 'text', + position: '1' + }, { + name: 'condition', + shortDesc: 'Condition', + longDesc: 'The condition the variable has to fulfil', + required: true, + type: 'text', + position: '2' + }]; + public static CEGConnection: FieldMetaItem[] = [ + { + name: 'name', + shortDesc: 'Name', + longDesc: '', + required: true, + type: 'text', + position: '0', + allowedPattern: '^[^,;|]*$' + }, { + name: 'description', + shortDesc: 'Description', + longDesc: '', + required: false, + type: 'longText', + rows: '5', + position: '100' + }, { + name: 'negate', + shortDesc: 'Negate', + longDesc: 'Negation of this connection', + type: 'checkbox', + position: '1' + }]; + public static TestSpecification: FieldMetaItem[] = [ + { + name: 'name', + shortDesc: 'Name', + longDesc: '', + required: true, + type: 'text', + position: '0', + allowedPattern: '^[^,;|]*$' + }, { + name: 'description', + shortDesc: 'Description', + longDesc: '', + required: false, + type: 'longText', + rows: '5', + position: '100' + }]; + public static TestSpecificationSkeleton: FieldMetaItem[] = [ + { + name: 'name', + shortDesc: 'Name', + longDesc: '', + required: true, + type: 'text', + position: '0', + allowedPattern: '^[^,;|]*$' + }]; + public static TestParameter: FieldMetaItem[] = [ + { + name: 'name', + shortDesc: 'Name', + longDesc: '', + required: true, + type: 'text', + position: '0', + allowedPattern: '^[^,;|]*$' + }, { + name: 'description', + shortDesc: 'Description', + longDesc: '', + required: false, + type: 'longText', + rows: '5', + position: '100' + }]; + public static TestCase: FieldMetaItem[] = [ + { + name: 'name', + shortDesc: 'Name', + longDesc: '', + required: true, + type: 'text', + position: '0', + allowedPattern: '^[^,;|]*$' + }, { + name: 'description', + shortDesc: 'Description', + longDesc: '', + required: false, + type: 'longText', + rows: '5', + position: '100' + }]; + public static ParameterAssignment: FieldMetaItem[] = [ + { + name: 'name', + shortDesc: 'Name', + longDesc: '', + required: true, + type: 'text', + position: '0', + allowedPattern: '^[^,;|]*$' + }, { + name: 'description', + shortDesc: 'Description', + longDesc: '', + required: false, + type: 'longText', + rows: '5', + position: '100' + }]; + public static TestProcedure: FieldMetaItem[] = [ + { + name: 'name', + shortDesc: 'Name', + longDesc: '', + required: true, + type: 'text', + position: '0', + allowedPattern: '^[^,;|]*$' + }, { + name: 'description', + shortDesc: 'Description', + longDesc: '', + required: false, + type: 'longText', + rows: '5', + position: '100' + }, { + name: 'isRegressionTest', + shortDesc: 'Regression Test', + type: 'checkbox', + position: '3', + longDesc: '' + }]; + public static TestStep: FieldMetaItem[] = [ + { + name: 'name', + shortDesc: 'Name', + longDesc: '', + required: true, + type: 'text', + position: '0', + allowedPattern: '^[^,;|]*$' + }, { + name: 'description', + shortDesc: 'Description', + longDesc: '', + required: false, + type: 'longText', + rows: '5', + position: '100' + }]; + public static Process: FieldMetaItem[] = [ + { + name: 'name', + shortDesc: 'Name', + longDesc: '', + required: true, + type: 'text', + position: '0', + allowedPattern: '^[^,;|]*$' + }, { + name: 'description', + shortDesc: 'Description', + longDesc: '', + required: false, + type: 'longText', + rows: '5', + position: '100' + }]; + public static ProcessNode: FieldMetaItem[] = [ + { + name: 'name', + shortDesc: 'Name', + longDesc: '', + required: true, + type: 'text', + position: '0', + allowedPattern: '^[^,;|]*$' + }, { + name: 'description', + shortDesc: 'Description', + longDesc: '', + required: false, + type: 'longText', + rows: '5', + position: '100' + }]; + public static ProcessStep: FieldMetaItem[] = [ + { + name: 'name', + shortDesc: 'Name', + longDesc: '', + required: true, + type: 'text', + position: '0', + allowedPattern: '^[^,;|]*$' + }, { + name: 'description', + shortDesc: 'Description', + longDesc: '', + required: false, + type: 'longText', + rows: '5', + position: '100' + }, { + name: 'expectedOutcome', + shortDesc: 'Expected Outcome', + longDesc: '', + required: false, + type: 'text', + position: '101' + }]; + public static ProcessDecision: FieldMetaItem[] = [ + { + name: 'name', + shortDesc: 'Name', + longDesc: '', + required: true, + type: 'text', + position: '0', + allowedPattern: '^[^,;|]*$' + }, { + name: 'description', + shortDesc: 'Description', + longDesc: '', + required: false, + type: 'longText', + rows: '5', + position: '100' + }]; + public static ProcessConnection: FieldMetaItem[] = [ + { + name: 'description', + shortDesc: 'Description', + longDesc: '', + required: false, + type: 'longText', + rows: '5', + position: '100' + }, { + name: 'condition', + shortDesc: 'Condition', + longDesc: 'The condition the variable has to fulfil', + required: false, + type: 'text', + position: '2' + }]; + public static ProcessStart: FieldMetaItem[] = [ + { + name: 'name', + shortDesc: 'Name', + longDesc: '', + required: true, + type: 'text', + position: '0', + allowedPattern: '^[^,;|]*$' + }, { + name: 'description', + shortDesc: 'Description', + longDesc: '', + required: false, + type: 'longText', + rows: '5', + position: '100' + }]; + public static ProcessEnd: FieldMetaItem[] = [ + { + name: 'name', + shortDesc: 'Name', + longDesc: '', + required: true, + type: 'text', + position: '0', + allowedPattern: '^[^,;|]*$' + }, { + name: 'description', + shortDesc: 'Description', + longDesc: '', + required: false, + type: 'longText', + rows: '5', + position: '100' + }]; + public static History: FieldMetaItem[] = [ + ]; + public static HistoryEntry: FieldMetaItem[] = [ + ]; + public static Change: FieldMetaItem[] = [ + ]; + public static Status: FieldMetaItem[] = [ + ]; + public static ProblemDetail: FieldMetaItem[] = [ + ]; + public static BatchOperation: FieldMetaItem[] = [ + ]; + public static Operation: FieldMetaItem[] = [ + ]; } diff --git a/web/src/app/modules/forms/modules/generic-form/components/form-checkbox-input.component.html b/web/src/app/modules/forms/modules/generic-form/components/form-checkbox-input.component.html index 436fb8e7b..9f2a7514b 100644 --- a/web/src/app/modules/forms/modules/generic-form/components/form-checkbox-input.component.html +++ b/web/src/app/modules/forms/modules/generic-form/components/form-checkbox-input.component.html @@ -1,10 +1,10 @@ -
- - -
+
+ + +
diff --git a/web/src/app/modules/forms/modules/generic-form/components/form-long-text-input.component.html b/web/src/app/modules/forms/modules/generic-form/components/form-long-text-input.component.html index 983ed38b0..f9bfecb7f 100644 --- a/web/src/app/modules/forms/modules/generic-form/components/form-long-text-input.component.html +++ b/web/src/app/modules/forms/modules/generic-form/components/form-long-text-input.component.html @@ -1,8 +1,8 @@ -
- - - -
+
+ + + +
diff --git a/web/src/app/modules/forms/modules/generic-form/components/form-single-selection-input.component.html b/web/src/app/modules/forms/modules/generic-form/components/form-single-selection-input.component.html index daed41887..f253c3a43 100644 --- a/web/src/app/modules/forms/modules/generic-form/components/form-single-selection-input.component.html +++ b/web/src/app/modules/forms/modules/generic-form/components/form-single-selection-input.component.html @@ -1,10 +1,10 @@ -
- - - -
+
+ + + +
diff --git a/web/src/app/modules/forms/modules/generic-form/components/form-text-input.component.html b/web/src/app/modules/forms/modules/generic-form/components/form-text-input.component.html index 51ffa4c81..ba057d5e2 100644 --- a/web/src/app/modules/forms/modules/generic-form/components/form-text-input.component.html +++ b/web/src/app/modules/forms/modules/generic-form/components/form-text-input.component.html @@ -1,10 +1,10 @@ -
- - - - -
+
+ + + + +
diff --git a/web/src/assets/i18n/de.json b/web/src/assets/i18n/de.json index d06d615f4..a76cbf054 100644 --- a/web/src/assets/i18n/de.json +++ b/web/src/assets/i18n/de.json @@ -16,7 +16,7 @@ "ElementDeleted": "Element gelöscht", "Error": "Fehler", "ErrorsandWarnings": "Fehler & Warnungen", - "ExpectedOutcome": "Erwartetes Ergebnis", + "Expected Outcome": "Erwartetes Ergebnis", "GeneralInformation": "Allgemeine Informationen", "ImplementingBO-team": "Verantwortliches BO-Team", "ImplementingIT-team": "Verantwortliches IT-Team", @@ -27,6 +27,7 @@ "Model": "Modell", "ModelHasErrors": "Fehlerhaftes Model", "Name": "Name", + "Negation of this connection": "Negation der Verbindung", "NoWarnings": "Keine Warnungen", "NumberOfTestCases": "Anzahl Testfälle", "Output": "Ausgabe", @@ -53,10 +54,15 @@ "TestSpecifications": "Testspezifikationen", "TestSteps": "Test Schritte", "TestandRelease": "Test und Freigabe", + "The condition the variable has to fulfil": "Die Bedingung, welche eine Variable erfüllen muss", + "The type of a node": "Der Typ eines Knotens", + "The variable of a node": "Die Variable eines Knotens", "ThisPageWasNotFoundProbablyWeAreStillMissingAFeature": "Seite konnte nicht gefunden werden. Möglicherweise wurde das Feature noch nicht hinzugefügt.", "Title": "Titel", "Traces": "Traces", + "Type": "Typ", "Value": "Wert", + "Variable": "Variable", "addARequirement": "Anforderung hinzufügen", "addInputColumn": "Eingabespalte hinzufügen", "addOutputColumn": "Ausgabespalte hinzufügen", diff --git a/web/src/assets/i18n/gb.json b/web/src/assets/i18n/gb.json index 9075581aa..28c07a990 100644 --- a/web/src/assets/i18n/gb.json +++ b/web/src/assets/i18n/gb.json @@ -16,7 +16,7 @@ "ElementDeleted": "Element deleted", "Error": "Error", "ErrorsandWarnings": "Errors & Warnings", - "ExpectedOutcome": "Expected Outcome", + "Expected Outcome": "Expected Outcome", "GeneralInformation": "General Information", "ImplementingBO-team": "Implementing BO-Team", "ImplementingIT-team": "Implementing IT-Team", @@ -27,6 +27,7 @@ "Model": "Model", "ModelHasErrors": "The Model has Errors", "Name": "Name", + "Negation of this connection": "Negation of this connection", "NoWarnings": "No Warnings", "NumberOfTestCases": "Number of Test Cases", "Output": "Output", @@ -53,10 +54,15 @@ "TestSpecifications": "Test Specifications", "TestSteps": "Test Steps", "TestandRelease": "Test and Release", + "The condition the variable has to fulfil": "The condition the variable has to fulfil", + "The type of a node": "The type of a node", + "The variable of a node": "The variable of a node", "ThisPageWasNotFoundProbablyWeAreStillMissingAFeature": "This Page was not found. Probably, we are still missing a feature.", "Title": "Title", "Traces": "Traces", + "Type": "Type", "Value": "Value", + "Variable": "Variable", "addARequirement": "Add a Requirement", "addInputColumn": "Add input column", "addOutputColumn": "Add output column", From d2af9b74e45b978858f11f4e54e2438d0339d250 Mon Sep 17 00:00:00 2001 From: sebeder <23170307+sebeder@users.noreply.github.com> Date: Tue, 5 Mar 2019 16:06:27 +0100 Subject: [PATCH 09/13] Returning values from generic service calls. (#401) --- .../data/modules/data-service/services/service-interface.ts | 4 ++-- .../modules/data-service/services/specmate-data.service.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/src/app/modules/data/modules/data-service/services/service-interface.ts b/web/src/app/modules/data/modules/data-service/services/service-interface.ts index aed2d6897..38e0774a1 100644 --- a/web/src/app/modules/data/modules/data-service/services/service-interface.ts +++ b/web/src/app/modules/data/modules/data-service/services/service-interface.ts @@ -71,8 +71,8 @@ export class ServiceInterface { await this.http.delete(Url.urlDelete(url), { headers: this.getAuthHeader(token) }).toPromise(); } - public async performOperation(url: string, serviceSuffix: string, payload: any, token: UserToken): Promise { - await this.http.post(Url.urlCustomService(url, serviceSuffix), payload, { headers: this.getAuthHeader(token) }).toPromise(); + public async performOperation(url: string, serviceSuffix: string, payload: any, token: UserToken): Promise { + return await this.http.post(Url.urlCustomService(url, serviceSuffix), payload, { headers: this.getAuthHeader(token) }).toPromise(); } public async performQuery(url: string, serviceSuffix: string, parameters: { [key: string]: string }, token: UserToken): Promise { diff --git a/web/src/app/modules/data/modules/data-service/services/specmate-data.service.ts b/web/src/app/modules/data/modules/data-service/services/specmate-data.service.ts index 11b0a74c5..7c9bef6d3 100644 --- a/web/src/app/modules/data/modules/data-service/services/specmate-data.service.ts +++ b/web/src/app/modules/data/modules/data-service/services/specmate-data.service.ts @@ -314,9 +314,9 @@ export class SpecmateDataService { }).catch((error) => this.handleError(this.translate.instant('elementCouldNotBeDeleted'), url, error)); } - public performOperations(url: string, operation: string, payload?: any): Promise { + public performOperations(url: string, operation: string, payload?: any): Promise { if (!this.auth.isAuthenticatedForUrl(url)) { - return Promise.resolve(); + return Promise.resolve(false); } this.busy = true; return this.serviceInterface.performOperation(url, operation, payload, this.auth.token).then((result) => { From 2bcef32b6d70b7f533cea97668bd673a07491a08 Mon Sep 17 00:00:00 2001 From: sebeder <23170307+sebeder@users.noreply.github.com> Date: Thu, 7 Mar 2019 14:20:44 +0100 Subject: [PATCH 10/13] Ui/minor language fixes (#404) * Adding search bar title * Change tooltip of navigation items on language change --- .../navigator/directives/navigation-target.directive.ts | 8 ++++++-- .../components/project-explorer.component.html | 2 +- web/src/assets/i18n/de.json | 2 ++ web/src/assets/i18n/gb.json | 2 ++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/web/src/app/modules/navigation/modules/navigator/directives/navigation-target.directive.ts b/web/src/app/modules/navigation/modules/navigator/directives/navigation-target.directive.ts index e3699ba63..e75978a71 100644 --- a/web/src/app/modules/navigation/modules/navigator/directives/navigation-target.directive.ts +++ b/web/src/app/modules/navigation/modules/navigator/directives/navigation-target.directive.ts @@ -2,7 +2,6 @@ import { Directive, OnInit, Input, HostListener, ElementRef } from '@angular/cor import { IContainer } from '../../../../../model/IContainer'; import { NavigatorService } from '../services/navigator.service'; import { TranslateService } from '@ngx-translate/core'; -import { Key } from '../../../../../util/keycode'; @Directive({ selector: '[navigationTarget]' }) export class NavigationTargetDirective implements OnInit { @@ -17,11 +16,16 @@ export class NavigationTargetDirective implements OnInit { constructor(private elementRef: ElementRef, private navigatorService: NavigatorService, private translate: TranslateService) { elementRef.nativeElement.href = ''; + translate.onLangChange.subscribe(() => this.setTooltip()); } ngOnInit() { + this.setTooltip(); + } + + private setTooltip(): void { if (this.target) { - this.elementRef.nativeElement.title = this.translate.instant('navigateTo', {name: this.target.name}); + this.elementRef.nativeElement.title = this.translate.instant('navigateTo', { name: this.target.name }); } } } diff --git a/web/src/app/modules/navigation/modules/project-explorer/components/project-explorer.component.html b/web/src/app/modules/navigation/modules/project-explorer/components/project-explorer.component.html index b62d62e74..60be479aa 100644 --- a/web/src/app/modules/navigation/modules/project-explorer/components/project-explorer.component.html +++ b/web/src/app/modules/navigation/modules/project-explorer/components/project-explorer.component.html @@ -1,6 +1,6 @@
-
+
diff --git a/web/src/assets/i18n/de.json b/web/src/assets/i18n/de.json index a76cbf054..515f6e172 100644 --- a/web/src/assets/i18n/de.json +++ b/web/src/assets/i18n/de.json @@ -17,6 +17,7 @@ "Error": "Fehler", "ErrorsandWarnings": "Fehler & Warnungen", "Expected Outcome": "Erwartetes Ergebnis", + "ExpectedOutcome": "", "GeneralInformation": "Allgemeine Informationen", "ImplementingBO-team": "Verantwortliches BO-Team", "ImplementingIT-team": "Verantwortliches IT-Team", @@ -170,6 +171,7 @@ "restoreZoom": "Zoom wiederherstellen", "save": "Speichern", "saveBeforeTestprocedureExport": "Vor dem Export muss die Testprozedur gespeichert werden. Fortfahren?", + "search": "suchen", "searchRequirements": "Suchen", "searchResults": "Resultate", "searching": "suchen", diff --git a/web/src/assets/i18n/gb.json b/web/src/assets/i18n/gb.json index 28c07a990..b3e68fbe6 100644 --- a/web/src/assets/i18n/gb.json +++ b/web/src/assets/i18n/gb.json @@ -17,6 +17,7 @@ "Error": "Error", "ErrorsandWarnings": "Errors & Warnings", "Expected Outcome": "Expected Outcome", + "ExpectedOutcome": "", "GeneralInformation": "General Information", "ImplementingBO-team": "Implementing BO-Team", "ImplementingIT-team": "Implementing IT-Team", @@ -169,6 +170,7 @@ "restoreZoom": "Restore zoom", "save": "Save", "saveBeforeTestprocedureExport": "Before the export the test procedure will be saved. Continue?", + "search": "search", "searchRequirements": "Search", "searchResults": "Search results", "searching": "Searching", From 1bd59afa10dd7b029ffa67f0dcee093fdcf11393 Mon Sep 17 00:00:00 2001 From: junkerm Date: Thu, 7 Mar 2019 14:21:14 +0100 Subject: [PATCH 11/13] Fix/csv export umlauts and ordering (#402) * small fixes in run config und web config * fix run cofnig * fix run config * Fix/connection without target or source (#389) * Remormatting and cleanup * Restructuring and refactoring * Fixing bug where connections are not deleted * change config * fix nullpointer exception when no hostandport parameter is given * version bump to 0.2.14 * fix run configs fix umlauts in csv fix order of columns in csv --- .../specmate-std-env/dev-specmate-no-cdo-server.bndrun | 8 ++++---- .../prod-specmate-cdo-server-oracle.bndrun | 10 +++++----- .../prod-specmate-no-cdo-server.bndrun | 8 ++++---- .../internal/testskeleton/BaseSkeleton.java | 10 +++++++--- ...get-test-specification-skeleton-button.component.ts | 4 +++- 5 files changed, 23 insertions(+), 17 deletions(-) diff --git a/bundles/specmate-std-env/dev-specmate-no-cdo-server.bndrun b/bundles/specmate-std-env/dev-specmate-no-cdo-server.bndrun index 2a26f05c5..b13508305 100644 --- a/bundles/specmate-std-env/dev-specmate-no-cdo-server.bndrun +++ b/bundles/specmate-std-env/dev-specmate-no-cdo-server.bndrun @@ -42,7 +42,10 @@ osgi.identity;filter:='(osgi.identity=specmate-jira-connector)',\ osgi.identity;filter:='(osgi.identity=specmate-nlp)',\ osgi.identity;filter:='(osgi.identity=specmate-model-generation)' --runbundles: \ +-runbundles: \ + specmate-logging;version=snapshot,\ + specmate-logging-slf4j;version=snapshot,\ + specmate-logging-slf4j-julbridge;version=snapshot,\ javassist;version='[3.18.1,3.18.2)',\ javax.annotation-api;version='[1.2.0,1.2.1)',\ javax.validation.api;version='[1.1.0,1.1.1)',\ @@ -80,9 +83,6 @@ specmate-common;version=snapshot,\ specmate-emfjson;version=snapshot,\ specmate-emfrest;version=snapshot,\ - specmate-logging;version=snapshot,\ - specmate-logging-slf4j;version=snapshot,\ - specmate-logging-slf4j-julbridge;version=snapshot,\ specmate-model-gen;version=snapshot,\ specmate-persistency-api;version=snapshot,\ specmate-persistency-cdo;version=snapshot,\ diff --git a/bundles/specmate-std-env/prod-specmate-cdo-server-oracle.bndrun b/bundles/specmate-std-env/prod-specmate-cdo-server-oracle.bndrun index ee6d6b91a..e6a3bc099 100644 --- a/bundles/specmate-std-env/prod-specmate-cdo-server-oracle.bndrun +++ b/bundles/specmate-std-env/prod-specmate-cdo-server-oracle.bndrun @@ -28,7 +28,11 @@ Workspace,\ Local -runvm: -Xmx6000m --runbundles: \ +-runbundles: \ + org.eclipse.equinox.log;version='[1.2.300,1.2.301)',\ + specmate-logging;version=snapshot,\ + specmate-logging-slf4j;version=snapshot,\ + specmate-logging-slf4j-julbridge;version=snapshot,\ jul.to.slf4j;version='[1.7.12,1.7.13)',\ log4j.over.slf4j;version='[1.7.12,1.7.13)',\ lpg.runtime.java;version='[2.0.17,2.0.18)',\ @@ -49,7 +53,6 @@ org.eclipse.equinox.app;version='[1.3.200,1.3.201)',\ org.eclipse.equinox.cm;version='[1.1.0,1.1.1)',\ org.eclipse.equinox.common;version='[3.6.200,3.6.201)',\ - org.eclipse.equinox.log;version='[1.2.300,1.2.301)',\ org.eclipse.equinox.metatype;version='[1.4.0,1.4.1)',\ org.eclipse.equinox.preferences;version='[3.5.200,3.5.201)',\ org.eclipse.equinox.registry;version='[3.5.400,3.5.401)',\ @@ -69,9 +72,6 @@ specmate-config;version=snapshot,\ specmate-dbprovider-api;version=snapshot,\ specmate-dbprovider-oracle;version=snapshot,\ - specmate-logging;version=snapshot,\ - specmate-logging-slf4j;version=snapshot,\ - specmate-logging-slf4j-julbridge;version=snapshot,\ specmate-migration;version=snapshot,\ specmate-model-gen;version=snapshot,\ specmate-model-support;version=snapshot,\ diff --git a/bundles/specmate-std-env/prod-specmate-no-cdo-server.bndrun b/bundles/specmate-std-env/prod-specmate-no-cdo-server.bndrun index 4ed61ec78..f4a1f045d 100644 --- a/bundles/specmate-std-env/prod-specmate-no-cdo-server.bndrun +++ b/bundles/specmate-std-env/prod-specmate-no-cdo-server.bndrun @@ -42,7 +42,10 @@ osgi.identity;filter:='(osgi.identity=specmate-jira-connector)',\ osgi.identity;filter:='(osgi.identity=specmate-nlp)',\ osgi.identity;filter:='(osgi.identity=specmate-model-generation)' --runbundles: \ +-runbundles: \ + specmate-logging;version=snapshot,\ + specmate-logging-slf4j;version=snapshot,\ + specmate-logging-slf4j-julbridge;version=snapshot,\ javassist;version='[3.18.1,3.18.2)',\ javax.annotation-api;version='[1.2.0,1.2.1)',\ javax.validation.api;version='[1.1.0,1.1.1)',\ @@ -80,9 +83,6 @@ specmate-common;version=snapshot,\ specmate-emfjson;version=snapshot,\ specmate-emfrest;version=snapshot,\ - specmate-logging;version=snapshot,\ - specmate-logging-slf4j;version=snapshot,\ - specmate-logging-slf4j-julbridge;version=snapshot,\ specmate-model-gen;version=snapshot,\ specmate-persistency-api;version=snapshot,\ specmate-persistency-cdo;version=snapshot,\ diff --git a/bundles/specmate-testspecification/src/com/specmate/testspecification/internal/testskeleton/BaseSkeleton.java b/bundles/specmate-testspecification/src/com/specmate/testspecification/internal/testskeleton/BaseSkeleton.java index 521788a3f..d90bef8f7 100644 --- a/bundles/specmate-testspecification/src/com/specmate/testspecification/internal/testskeleton/BaseSkeleton.java +++ b/bundles/specmate-testspecification/src/com/specmate/testspecification/internal/testskeleton/BaseSkeleton.java @@ -23,14 +23,18 @@ public abstract class BaseSkeleton { private static Pattern startsNumerical = Pattern.compile("^[0-9]"); private static Pattern invalidChars = Pattern.compile("[^a-zA-Z_0-9\\_]"); - Comparator parameterComparator = (p1, p2) -> p1.getType().compareTo(p2.getType()); - Comparator assignmentComparator = (a1, a2) -> a1.getParameter().getType() - .compareTo(a2.getParameter().getType()); + Comparator parameterComparator = (p1, p2) -> compareParameter(p1, p2); + Comparator assignmentComparator = (a1, a2) -> compareParameter(a1.getParameter(), + a2.getParameter()); public BaseSkeleton(String language) { this.language = language; } + private static int compareParameter(TestParameter p1, TestParameter p2) { + return p1.getType().compareTo(p2.getType()) * 10 + p1.getName().compareTo(p2.getName()); + } + public TestSpecificationSkeleton generate(TestSpecification testSpecification) { StringBuilder sb = new StringBuilder(); diff --git a/web/src/app/modules/actions/modules/get-test-specification-skeleton-button/components/get-test-specification-skeleton-button.component.ts b/web/src/app/modules/actions/modules/get-test-specification-skeleton-button/components/get-test-specification-skeleton-button.component.ts index 1c6ac5838..24c767b7d 100644 --- a/web/src/app/modules/actions/modules/get-test-specification-skeleton-button/components/get-test-specification-skeleton-button.component.ts +++ b/web/src/app/modules/actions/modules/get-test-specification-skeleton-button/components/get-test-specification-skeleton-button.component.ts @@ -19,6 +19,8 @@ export class GetTestSpecificationSkeletonButton { private _lang: string; + private static UTF8_BOM = '\ufeff'; + @Input() public set testspecification(testspecification: TestSpecification) { if (!testspecification) { @@ -47,7 +49,7 @@ export class GetTestSpecificationSkeletonButton { throw new Error('Could not load test specification skeleton for ' + this._lang); } - saveAs(new Blob([data.code], {type: 'text/plain;charset=utf-8'}), data.name); + saveAs(new Blob([GetTestSpecificationSkeletonButton.UTF8_BOM + data.code], {type: 'text/plain;charset=utf-8'}), data.name); } public get language(): string { From 8f1f45f533334998c1582382ee7829ae6a2f6ba0 Mon Sep 17 00:00:00 2001 From: sebeder <23170307+sebeder@users.noreply.github.com> Date: Thu, 7 Mar 2019 14:46:00 +0100 Subject: [PATCH 12/13] Fix/show model errors in library (#400) * Extracting short error message display to component * Removing unnecessary css class --- ...-model-error-message-display.component.css | 0 ...model-error-message-display.component.html | 2 + ...t-model-error-message-display.component.ts | 55 +++++++++++++++++++ ...hort-model-error-message-display.module.ts | 28 ++++++++++ ...ecification-generator-button.component.css | 3 - ...cification-generator-button.component.html | 3 +- .../ceg-model-container.component.html | 1 + .../process-model-container.component.html | 1 + .../contents-container.module.ts | 7 ++- .../components/errors-warnings.component.html | 43 ++++++++------- .../components/errors-warnings.component.ts | 4 ++ .../errors-warnings/errors-warnings.module.ts | 5 +- 12 files changed, 125 insertions(+), 27 deletions(-) create mode 100644 web/src/app/modules/actions/modules/short-error-message-display/components/short-model-error-message-display.component.css create mode 100644 web/src/app/modules/actions/modules/short-error-message-display/components/short-model-error-message-display.component.html create mode 100644 web/src/app/modules/actions/modules/short-error-message-display/components/short-model-error-message-display.component.ts create mode 100644 web/src/app/modules/actions/modules/short-error-message-display/short-model-error-message-display.module.ts diff --git a/web/src/app/modules/actions/modules/short-error-message-display/components/short-model-error-message-display.component.css b/web/src/app/modules/actions/modules/short-error-message-display/components/short-model-error-message-display.component.css new file mode 100644 index 000000000..e69de29bb diff --git a/web/src/app/modules/actions/modules/short-error-message-display/components/short-model-error-message-display.component.html b/web/src/app/modules/actions/modules/short-error-message-display/components/short-model-error-message-display.component.html new file mode 100644 index 000000000..82a7ab39e --- /dev/null +++ b/web/src/app/modules/actions/modules/short-error-message-display/components/short-model-error-message-display.component.html @@ -0,0 +1,2 @@ + {{'ModelHasErrors' | translate}}  \ No newline at end of file diff --git a/web/src/app/modules/actions/modules/short-error-message-display/components/short-model-error-message-display.component.ts b/web/src/app/modules/actions/modules/short-error-message-display/components/short-model-error-message-display.component.ts new file mode 100644 index 000000000..2800883d9 --- /dev/null +++ b/web/src/app/modules/actions/modules/short-error-message-display/components/short-model-error-message-display.component.ts @@ -0,0 +1,55 @@ +import { Component, Input } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; +import { Config } from '../../../../../config/config'; +import { ElementFactoryBase } from '../../../../../factory/element-factory-base'; +import { CEGModel } from '../../../../../model/CEGModel'; +import { IContainer } from '../../../../../model/IContainer'; +import { Process } from '../../../../../model/Process'; +import { TestSpecification } from '../../../../../model/TestSpecification'; +import { Id } from '../../../../../util/id'; +import { Url } from '../../../../../util/url'; +import { ValidationResult } from '../../../../../validation/validation-result'; +import { SpecmateDataService } from '../../../../data/modules/data-service/services/specmate-data.service'; +import { ValidationService } from '../../../../forms/modules/validation/services/validation.service'; +import { NavigatorService } from '../../../../navigation/modules/navigator/services/navigator.service'; +import { ConfirmationModal } from '../../../../notification/modules/modals/services/confirmation-modal.service'; +import { LoggingService } from '../../../../views/side/modules/log-list/services/logging.service'; + +@Component({ + moduleId: module.id.toString(), + selector: 'short-model-error-message-display', + templateUrl: 'short-model-error-message-display.component.html', + styleUrls: ['short-model-error-message-display.component.css'] +}) + +export class ShortModelErrorMessageDisplay { + + private contents: IContainer[]; + + private _model: CEGModel | Process; + + public get model(): CEGModel | Process { + return this._model; + } + + @Input() + public set model(model: CEGModel | Process) { + if (!model) { + return; + } + this._model = model; + this.dataService.readContents(model.url).then((contents: IContainer[]) => { + this.contents = contents; + }); + } + + constructor(private dataService: SpecmateDataService, + private validator: ValidationService) { } + + public get hasErrors(): boolean { + if (this.model === undefined) { + return false; + } + return !this.validator.isValid(this.model, this.contents); + } +} diff --git a/web/src/app/modules/actions/modules/short-error-message-display/short-model-error-message-display.module.ts b/web/src/app/modules/actions/modules/short-error-message-display/short-model-error-message-display.module.ts new file mode 100644 index 000000000..8a291b31d --- /dev/null +++ b/web/src/app/modules/actions/modules/short-error-message-display/short-model-error-message-display.module.ts @@ -0,0 +1,28 @@ +import { NgModule } from '@angular/core'; +import { BrowserModule } from '@angular/platform-browser'; +import { TranslateModule } from '@ngx-translate/core'; +import { ShortModelErrorMessageDisplay } from './components/short-model-error-message-display.component'; + +@NgModule({ + imports: [ + // MODULE IMPORTS + BrowserModule, + TranslateModule + ], + declarations: [ + // COMPONENTS IN THIS MODULE + ShortModelErrorMessageDisplay + ], + exports: [ + // THE COMPONENTS VISIBLE TO THE OUTSIDE + ShortModelErrorMessageDisplay + ], + providers: [ + // SERVICES + ], + bootstrap: [ + // COMPONENTS THAT ARE BOOTSTRAPPED HERE + ] +}) + +export class ShortModelErrorDisplayModule { } diff --git a/web/src/app/modules/actions/modules/test-specification-generator-button/components/test-specification-generator-button.component.css b/web/src/app/modules/actions/modules/test-specification-generator-button/components/test-specification-generator-button.component.css index be2270467..e69de29bb 100644 --- a/web/src/app/modules/actions/modules/test-specification-generator-button/components/test-specification-generator-button.component.css +++ b/web/src/app/modules/actions/modules/test-specification-generator-button/components/test-specification-generator-button.component.css @@ -1,3 +0,0 @@ -.model-error { - color: red; -} \ No newline at end of file diff --git a/web/src/app/modules/actions/modules/test-specification-generator-button/components/test-specification-generator-button.component.html b/web/src/app/modules/actions/modules/test-specification-generator-button/components/test-specification-generator-button.component.html index 06eb41954..8f7ed4707 100644 --- a/web/src/app/modules/actions/modules/test-specification-generator-button/components/test-specification-generator-button.component.html +++ b/web/src/app/modules/actions/modules/test-specification-generator-button/components/test-specification-generator-button.component.html @@ -1,2 +1 @@ - {{'ModelHasErrors'|translate}}  - \ No newline at end of file + \ No newline at end of file diff --git a/web/src/app/modules/views/main/editors/modules/contents-container/components/ceg-model-container.component.html b/web/src/app/modules/views/main/editors/modules/contents-container/components/ceg-model-container.component.html index 9d42ad6ed..fe23aa72e 100644 --- a/web/src/app/modules/views/main/editors/modules/contents-container/components/ceg-model-container.component.html +++ b/web/src/app/modules/views/main/editors/modules/contents-container/components/ceg-model-container.component.html @@ -20,6 +20,7 @@
{{'Cause-EffectModels' | translate}}
{{element.description | truncate: 60}} + + -
- - - - - - - - - - - - -
ElementsMessage
- - {{'NoWarnings'|translate}}. - +
+

+ + +  {{'NoWarnings' | translate}}. + +

- + + + + + + + + + + + + +
ElementsMessage
\ No newline at end of file diff --git a/web/src/app/modules/views/side/modules/errors-warnings/components/errors-warnings.component.ts b/web/src/app/modules/views/side/modules/errors-warnings/components/errors-warnings.component.ts index 485e7914a..b1fa2a28a 100644 --- a/web/src/app/modules/views/side/modules/errors-warnings/components/errors-warnings.component.ts +++ b/web/src/app/modules/views/side/modules/errors-warnings/components/errors-warnings.component.ts @@ -2,6 +2,7 @@ import { Component } from '@angular/core'; import { ValidationResult } from '../../../../../../validation/validation-result'; import { ValidationService } from '../../../../../forms/modules/validation/services/validation.service'; import { AdditionalInformationService } from '../../links-actions/services/additional-information.service'; +import { IContainer } from '../../../../../../model/IContainer'; @Component({ @@ -23,6 +24,9 @@ export class ErrorsWarings { return this._isCollapsed; } + public get model(): IContainer { + return this.additionalInformationService.element; + } public visible = true; constructor(private validationService: ValidationService, diff --git a/web/src/app/modules/views/side/modules/errors-warnings/errors-warnings.module.ts b/web/src/app/modules/views/side/modules/errors-warnings/errors-warnings.module.ts index b2abe8295..aff2ac45a 100644 --- a/web/src/app/modules/views/side/modules/errors-warnings/errors-warnings.module.ts +++ b/web/src/app/modules/views/side/modules/errors-warnings/errors-warnings.module.ts @@ -5,6 +5,8 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { TranslateModule } from '@ngx-translate/core'; import { ErrorsWarings } from './components/errors-warnings.component'; import { Warning } from './components/warning.component'; +// tslint:disable-next-line:max-line-length +import { ShortModelErrorDisplayModule } from '../../../../actions/modules/short-error-message-display/short-model-error-message-display.module'; @NgModule({ imports: [ @@ -12,7 +14,8 @@ import { Warning } from './components/warning.component'; BrowserModule, NavigatorModule, NgbModule.forRoot(), - TranslateModule + TranslateModule, + ShortModelErrorDisplayModule ], declarations: [ // COMPONENTS IN THIS MODULE From 71399a25b23d37c0a505ac16eda1d434db0878af Mon Sep 17 00:00:00 2001 From: Maximilian Junker Date: Thu, 7 Mar 2019 15:06:26 +0100 Subject: [PATCH 13/13] version bump to 0.2.15 --- web/webpack/webpack.common.js | 242 +++++++++++++++++----------------- 1 file changed, 121 insertions(+), 121 deletions(-) diff --git a/web/webpack/webpack.common.js b/web/webpack/webpack.common.js index 25ae5cbc2..918e903ba 100644 --- a/web/webpack/webpack.common.js +++ b/web/webpack/webpack.common.js @@ -1,121 +1,121 @@ -const SPECMATE_VERSION = '0.2.14' - -const webpack = require('webpack'); -const HtmlWebpackPlugin = require('html-webpack-plugin'); -const GitRevisionPlugin = require('git-revision-webpack-plugin'); -const CopyWebpackPlugin = require('copy-webpack-plugin'); -const helpers = require('./helpers'); - - -const gitRevisionPlugin = new GitRevisionPlugin({ - commithashCommand: 'rev-parse --short HEAD' -}); - -module.exports = { - entry: { - 'polyfills': './src/polyfills.ts', - 'vendor': './src/vendor.ts', - 'specmate': './src/main.ts', - 'assets': './src/assets.ts', - }, - - resolve: { - extensions: ['.ts', '.js'] - }, - - module: { - rules: [{ - test: /\.ts$/, - loaders: [{ - loader: 'awesome-typescript-loader', - options: { configFileName: helpers.root('src', 'tsconfig.json') } - }, 'angular2-template-loader'] - }, - { - test: /\.(html|svg)$/, - loader: 'html-loader', - exclude: [helpers.root('node_modules', 'flag-icon-css'), helpers.root('node_modules', 'font-awesome')] - }, - { - test: /\.svg/, - loader: 'file-loader?name=img/[name]_[hash].[ext]', - include: [helpers.root('node_modules', 'flag-icon-css'), helpers.root('node_modules', 'font-awesome')] - }, - { - test: /\.(html|svg)$/, - loader: 'string-replace-loader', - query: { - search: '@@version', - replace: SPECMATE_VERSION - } - }, - { - test: /\.(png|jpe?g|gif|ico)$/, - loader: 'file-loader?name=img/[name]_[hash].[ext]' - }, - { - test: /\.css$/, - exclude: helpers.root('src', 'app'), - use: ['style-loader', 'css-loader'] - }, - { - test: /\.css$/, - include: helpers.root('src', 'app'), - loader: 'raw-loader' - }, - { - test: /\.(ttf|eot)(\?v=[0-9]\.[0-9]\.[0-9])?$/, - // We cannot use [hash] or anything similar here, since ng-split will not work then. - loader: 'file-loader?name=fonts/[name].[ext]' - }, - { - test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, - loader: "file-loader?name=fonts/[name].[ext]", - }, - { - test: /\.scss$/, - use: [{ - loader: "style-loader" - }, - { - loader: "postcss-loader", - options: { - sourceMap: true, - plugins: function() { - return [require("autoprefixer")]; - } - } - }, - { - loader: "sass-loader", - options: { - sourceMap: true - } - } - ] - } - ] - }, - - plugins: [ - new webpack.ContextReplacementPlugin(/angular(\\|\/)core(\\|\/)@angular/, helpers.root('../src'), {}), - new webpack.ContextReplacementPlugin(/\@angular(\\|\/)core(\\|\/)esm5/, helpers.root('../src'), {}), - new webpack.optimize.CommonsChunkPlugin({ name: ['specmate', 'vendor', 'polyfills', 'assets'] }), - new HtmlWebpackPlugin({ - template: 'src/index.html', - favicon: 'src/assets/img/favicon.ico' - }), - - new webpack.ProvidePlugin({ - $: 'jquery', - jQuery: 'jquery', - 'window.jQuery': 'jquery' - }), - - new CopyWebpackPlugin([{ - from: helpers.root('src', 'assets', 'i18n'), - to: 'i18n', - copyUnmodified: true - }]) - ] -}; +const SPECMATE_VERSION = '0.2.15' + +const webpack = require('webpack'); +const HtmlWebpackPlugin = require('html-webpack-plugin'); +const GitRevisionPlugin = require('git-revision-webpack-plugin'); +const CopyWebpackPlugin = require('copy-webpack-plugin'); +const helpers = require('./helpers'); + + +const gitRevisionPlugin = new GitRevisionPlugin({ + commithashCommand: 'rev-parse --short HEAD' +}); + +module.exports = { + entry: { + 'polyfills': './src/polyfills.ts', + 'vendor': './src/vendor.ts', + 'specmate': './src/main.ts', + 'assets': './src/assets.ts', + }, + + resolve: { + extensions: ['.ts', '.js'] + }, + + module: { + rules: [{ + test: /\.ts$/, + loaders: [{ + loader: 'awesome-typescript-loader', + options: { configFileName: helpers.root('src', 'tsconfig.json') } + }, 'angular2-template-loader'] + }, + { + test: /\.(html|svg)$/, + loader: 'html-loader', + exclude: [helpers.root('node_modules', 'flag-icon-css'), helpers.root('node_modules', 'font-awesome')] + }, + { + test: /\.svg/, + loader: 'file-loader?name=img/[name]_[hash].[ext]', + include: [helpers.root('node_modules', 'flag-icon-css'), helpers.root('node_modules', 'font-awesome')] + }, + { + test: /\.(html|svg)$/, + loader: 'string-replace-loader', + query: { + search: '@@version', + replace: SPECMATE_VERSION + } + }, + { + test: /\.(png|jpe?g|gif|ico)$/, + loader: 'file-loader?name=img/[name]_[hash].[ext]' + }, + { + test: /\.css$/, + exclude: helpers.root('src', 'app'), + use: ['style-loader', 'css-loader'] + }, + { + test: /\.css$/, + include: helpers.root('src', 'app'), + loader: 'raw-loader' + }, + { + test: /\.(ttf|eot)(\?v=[0-9]\.[0-9]\.[0-9])?$/, + // We cannot use [hash] or anything similar here, since ng-split will not work then. + loader: 'file-loader?name=fonts/[name].[ext]' + }, + { + test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, + loader: "file-loader?name=fonts/[name].[ext]", + }, + { + test: /\.scss$/, + use: [{ + loader: "style-loader" + }, + { + loader: "postcss-loader", + options: { + sourceMap: true, + plugins: function() { + return [require("autoprefixer")]; + } + } + }, + { + loader: "sass-loader", + options: { + sourceMap: true + } + } + ] + } + ] + }, + + plugins: [ + new webpack.ContextReplacementPlugin(/angular(\\|\/)core(\\|\/)@angular/, helpers.root('../src'), {}), + new webpack.ContextReplacementPlugin(/\@angular(\\|\/)core(\\|\/)esm5/, helpers.root('../src'), {}), + new webpack.optimize.CommonsChunkPlugin({ name: ['specmate', 'vendor', 'polyfills', 'assets'] }), + new HtmlWebpackPlugin({ + template: 'src/index.html', + favicon: 'src/assets/img/favicon.ico' + }), + + new webpack.ProvidePlugin({ + $: 'jquery', + jQuery: 'jquery', + 'window.jQuery': 'jquery' + }), + + new CopyWebpackPlugin([{ + from: helpers.root('src', 'assets', 'i18n'), + to: 'i18n', + copyUnmodified: true + }]) + ] +};