summaryrefslogtreecommitdiffstats
path: root/openecomp-ui/src/sdc-app/flows/FlowsPunchOut.jsx
blob: 873003492bd7919cf45f7eb3c2ebee0067edc048 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/*!
 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */
import React from 'react';
import ReactDOM from 'react-dom';
import Configuration from 'sdc-app/config/Configuration.js';
import Application from 'sdc-app/Application.jsx';
import store from 'sdc-app/AppStore.js';
import FlowsListEditor from './FlowsListEditor.js';
import FlowsActions from './FlowsActions.js';

class FlowsListEditorPunchOutWrapper extends React.Component {

	componentDidMount() {
		let element = ReactDOM.findDOMNode(this);
		element.addEventListener('click', event => {
			if (event.target.tagName === 'A') {
				event.preventDefault();
			}
		});
		['wheel', 'mousewheel', 'DOMMouseScroll'].forEach(eventType =>
			element.addEventListener(eventType, event => event.stopPropagation())
		);
	}

	render() {
		return <FlowsListEditor/>;
	}
}

export default class DiagramPunchOut {

	render({options: {data, apiRoot, apiHeaders}, onEvent}, element) {

		if (!this.isConfigSet) {
			Configuration.setATTApiRoot(apiRoot);
			Configuration.setATTApiHeaders(apiHeaders);
			this.isConfigSet = true;
		}

		this.onEvent = onEvent;
		this.handleData(data);

		if (!this.rendered) {
			ReactDOM.render(<Application><div className='dox-ui'><FlowsListEditorPunchOutWrapper/></div></Application>, element);
			this.rendered = true;
		}
	}

	unmount(element) {
		let dispatch = action => store.dispatch(action);
		ReactDOM.unmountComponentAtNode(element);
		FlowsActions.reset(dispatch);
	}

	handleData(data) {
		let {serviceID, diagramType} = data;
		let dispatch = action => store.dispatch(action);

		if (serviceID !== this.prevServiceID || diagramType !== this.prevDiagramType) {
			this.prevServiceID = serviceID;
			this.prevDiagramType = diagramType;
			FlowsActions.fetchFlowArtifacts(dispatch, {...data});
		}
	}
}
{ color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <artifactId>sdc-onboarding</artifactId>
    <packaging>pom</packaging>

    <parent>
        <groupId>org.openecomp.sdc</groupId>
        <artifactId>sdc-main</artifactId>
        <version>1.3.0-SNAPSHOT</version>
    </parent>

    <modules>
        <module>../openecomp-be/tools/artifact-copy-plugin</module>
        <module>../openecomp-be/tools/compile-helper-plugin</module>
        <module>../openecomp-be/tools/pmd-helper-plugin</module>
        <module>../common</module>
        <module>../openecomp-be</module>
        <module>../openecomp-be/tools/build-data-installer</module>
        <module>../openecomp-be/tools/snapshot-signature-plugin</module>
        <module>../openecomp-ui</module>
    </modules>

    <properties>
        <!-- Maven plugin versions -->
        <jacoco.version>0.7.9</jacoco.version>
        <mvn.assembly.version>2.1</mvn.assembly.version>
        <mvn.compiler.version>3.7.0</mvn.compiler.version>
        <mvn.clean.version>2.5</mvn.clean.version>
        <mvn.resource.version>3.1.0</mvn.resource.version>
        <mvn.deploy.version>2.4</mvn.deploy.version>
        <mvn.hub.version>1.4.0</mvn.hub.version>
        <mvn.install.version>2.4</mvn.install.version>
        <mvn.jar.version>2.4</mvn.jar.version>
        <mvn.jaxb2.version>0.13.3</mvn.jaxb2.version>
        <mvn.license.version>1.10</mvn.license.version>
        <mvn.shade.version>2.3</mvn.shade.version>
        <mvn.surefire.version>2.19.1</mvn.surefire.version>
        <maven.dependency.version>2.8</maven.dependency.version>
        <mvn.swagger.version>3.1.0</mvn.swagger.version>
        <mvn.war.version>2.1.1</mvn.war.version>
        <maven-core.version>3.5.3</maven-core.version>
        <maven-plugin-plugin.version>3.5.1</maven-plugin-plugin.version>
        <maven-plugin-annotations.version>3.5.1</maven-plugin-annotations.version>
        <mvn.antrun.version>1.8</mvn.antrun.version>

        <!-- Onboarding 3rd party versions -->
        <aspectj.version>1.8.9</aspectj.version>
        <bsh.version>2.0b5</bsh.version>
        <cglib.nodep.version>3.2.4</cglib.nodep.version> <!--old : 2.1_3. new 3.2.4 -->
        <classmate.version>1.3.3</classmate.version>
        <commons.beanutils.version>1.9.3</commons.beanutils.version>
        <commons.codec.version>1.10
        </commons.codec.version> <!-- orignal 1.6 updated to resolve blackduck violation -->
        <commons.collections.version>4.1</commons.collections.version>
        <commons.digester.version>2.1</commons.digester.version>
        <commons.io.version>2.5</commons.io.version>
        <commons.lang.version>2.6
        </commons.lang.version> <!-- orignal 2.5. updated to resolve blackduck violation -->
        <commons.lang3.version>3.4</commons.lang3.version>
        <cxf.version>3.1.8</cxf.version>
        <datastax.cassandra.version>3.4.0</datastax.cassandra.version>
        <easymock.version>3.4</easymock.version>
        <groovy.version>2.4.7</groovy.version>
        <gson.version>2.3.1</gson.version>
        <fop.version>2.2</fop.version>
        <freemarker.version>2.3.26-incubating</freemarker.version>
        <hibernate.validator.version>5.3.3.Final
        </hibernate.validator.version> <!--5.3.1.Final changed to 5.3.3.Final to include jboss-logging 3.3.0.Final for 1702 -->
        <http.client.version>4.5.3</http.client.version>
        <http.core.version>4.4.1</http.core.version>
        <httpasyncclient.version>4.1.2</httpasyncclient.version>
        <janino.version>2.7.7</janino.version>
        <jaxb.impl.version>2.2.11</jaxb.impl.version>
        <java.source>1.8</java.source>
        <java.target>1.8</java.target>
        <javax.el.version>2.2.4</javax.el.version>
        <javax.el-api.version>3.0.1-b04
        </javax.el-api.version> <!-- orignal 2.2.4 updated to resolve blackduck violation -->
        <javax.inject.version>1</javax.inject.version>
        <javax.servlet.version>2.5</javax.servlet.version>
        <jackson.version>2.8.1</jackson.version>
        <jackson.annotations.version>2.7.4</jackson.annotations.version>
        <jackson.dataformat.version>2.7.4</jackson.dataformat.version>
        <jackson.mapper.version>1.9.13</jackson.mapper.version>
        <jcommander.version>1.58</jcommander.version>
        <jetty.servlets.version>9.0.6.v20130930</jetty.servlets.version>
        <jersey.core.version>1.19.1</jersey.core.version>
        <jersey.multipart.version>1.18.1</jersey.multipart.version>
        <junit.version>RELEASE</junit.version>
        <logback.version>1.1.2</logback.version>
        <mockito.all.version>1.10.19</mockito.all.version>
        <org.codehaus.jackson.version>1.9.13</org.codehaus.jackson.version> <!-- orignal 1.9.2 -->
        <org.everit.json.schema.version>1.5.1
        </org.everit.json.schema.version> <!--new 1.4.1 orignal 1.3.0 updated to resolve blackduck violation -->
        <org.reflections.version>0.9.10
        </org.reflections.version> <!-- orignal 0.9.9 updated to resolve blackduck violation -->
        <powermock.version>1.6.5</powermock.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <servlet.version>2.5</servlet.version>
        <slf4j.version>1.7.21</slf4j.version>
        <snakeyaml.version>1.17</snakeyaml.version>
        <spring.framework.version>4.3.15.RELEASE</spring.framework.version> <!-- orignal 4.0.7.RELEASE 4.1.3.RELEASE-->
        <swagger.version>1.5.3</swagger.version>
        <testng.version>6.9.10</testng.version> <!--new 6.9.13.6 still shows blackduck risk -->
        <woodstox.version>4.4.1</woodstox.version>
        <ws.rs.version>2.0.1
        </ws.rs.version>  <!--  New version 2.0.1 to fix blackduck violation Failing with comiplation issues-->
        <zusammen.version>1.0.1</zusammen.version>
        <zusammen-state-store.version>1.0.1</zusammen-state-store.version>
        <zusammen-collaboration-store.version>1.0.1</zusammen-collaboration-store.version>
        <zusammen-index-store.version>1.0.0</zusammen-index-store.version>
        <pmd.version>5.8.1</pmd.version>
        <build.tools.version>${project.version}</build.tools.version>
        <togglz.version>2.4.1.Final</togglz.version>
        <jacoco.skip>true</jacoco.skip>
        <maven.pmd.plugin.version>3.9.0</maven.pmd.plugin.version>
        <pmd.java.version>6.3.0</pmd.java.version>
        <pmd.core.version>6.3.0</pmd.core.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>1.16.20</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <scope>test</scope>
                <version>${testng.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-text</artifactId>
                <version>1.3</version>
                <scope>compile</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${mvn.jar.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                        <phase>none</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
                <version>${mvn.clean.version}</version>
                <configuration>
                    <excludeDefaultDirectories>true</excludeDefaultDirectories>
                    <filesets>
                        <fileset>
                            <directory>${project.build.directory}</directory>
                            <excludes>
                                <exclude>${classes}</exclude>
                                <exclude>${testClasses}</exclude>
                                <exclude>${mavenStatus}</exclude>
                                <exclude>${customGeneratedSources}</exclude>
                                <exclude>build-data/**</exclude>
                            </excludes>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${mvn.surefire.version}</version>
                <configuration>
                    <forkCount>${fork.count}</forkCount>
                    <forkMode>${fork.mode}</forkMode>
                    <printSummary>false</printSummary>
                    <redirectTestOutputToFile>true</redirectTestOutputToFile>
                    <additionalClasspathElements>
                        <additionalClasspathElement>${project.basedir}/src/test/resources</additionalClasspathElement>
                    </additionalClasspathElements>
                    <systemPropertyVariables>
                        <logback.configurationFile>src/test/resources/logback-test.xml</logback.configurationFile>
                        <artifactgenerator.config>
                            ${project.basedir}/src/test/resources/config/Artifact-Generator.properties
                        </artifactgenerator.config>
                        <config.location>${project.basedir}/configuration</config.location>
                    </systemPropertyVariables>
                    <useSystemClassLoader>${useSystemClassLoader}</useSystemClassLoader>
                    <skip>${skipTestRun}</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
                <version>${mvn.install.version}</version>
                <configuration>
                    <skip>${skipInstall}</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>${mvn.resource.version}</version>
                <configuration>
                    <skip>${skipResourceCollection}</skip>
                </configuration>
            </plugin>
        </plugins>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <excludes>
                    <exclude>**/*</exclude>
                </excludes>
            </testResource>
        </testResources>
    </build>

</project>