aboutsummaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client
diff options
context:
space:
mode:
Diffstat (limited to 'cds-ui/designer-client')
-rw-r--r--cds-ui/designer-client/pom.xml5
-rw-r--r--cds-ui/designer-client/pom.xml-n95
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/imports-tab/imports-tab.component.html8
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/imports-tab/imports-tab.component.ts19
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.html4
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.ts9
6 files changed, 129 insertions, 11 deletions
diff --git a/cds-ui/designer-client/pom.xml b/cds-ui/designer-client/pom.xml
index 24e1d2305..0d3331d92 100644
--- a/cds-ui/designer-client/pom.xml
+++ b/cds-ui/designer-client/pom.xml
@@ -18,18 +18,19 @@ 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.
============LICENSE_END============================================ -->
+
<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>
<parent>
<groupId>org.onap.ccsdk.cds</groupId>
<artifactId>ui</artifactId>
- <version>0.7.1-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>designer-client</artifactId>
- <version>0.7.1-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>CDS designer Client</name>
diff --git a/cds-ui/designer-client/pom.xml-n b/cds-ui/designer-client/pom.xml-n
new file mode 100644
index 000000000..fc0c4232c
--- /dev/null
+++ b/cds-ui/designer-client/pom.xml-n
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2020 Orange. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software 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.
+============LICENSE_END============================================ -->
+<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>
+
+ <parent>
+ <groupId>org.onap.ccsdk.cds</groupId>
+ <artifactId>ui</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+
+ <artifactId>designer-client</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <name>CDS designer Client</name>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <npm.executable>npm</npm.executable>
+ <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>com.github.eirslett</groupId>
+ <artifactId>frontend-maven-plugin</artifactId>
+ <!-- Use the latest released version: https://repo1.maven.org/maven2/com/github/eirslett/frontend-maven-plugin/ -->
+ <version>1.3</version>
+ <configuration>
+ <nodeVersion>v13.7.0</nodeVersion>
+ <npmVersion>6.13.6</npmVersion>
+ <nodeDownloadRoot>https://nodejs.org/dist/</nodeDownloadRoot>
+ <installDirectory>./</installDirectory>
+ </configuration>
+ <executions>
+ <execution>
+ <id>install node and npm</id>
+ <goals>
+ <goal>install-node-and-npm</goal>
+ </goals>
+ <phase>generate-resources</phase>
+ </execution>
+
+ <execution>
+ <id>npm install</id>
+ <goals>
+ <goal>npm</goal>
+ </goals>
+
+ <phase>generate-resources</phase>
+
+ <configuration>
+ <arguments>install</arguments>
+ </configuration>
+ </execution>
+
+ <execution>
+ <id>npm build</id>
+ <goals>
+ <goal>npm</goal>
+ </goals>
+
+ <phase>generate-resources</phase>
+
+ <configuration>
+ <arguments>run build</arguments>
+ </configuration>
+ </execution>
+
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/imports-tab/imports-tab.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/imports-tab/imports-tab.component.html
index cfd110283..bf86c46ea 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/imports-tab/imports-tab.component.html
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/imports-tab/imports-tab.component.html
@@ -36,9 +36,9 @@
<div class="card">
<div class="card-header" [id]="'head-'+mapIndex">
<h5 class="mb-0 d-flex justify-content-between">
- <button class="btn btn-link collapsed" data-toggle="collapse"
- [attr.data-target]="'#id-'+mapIndex" aria-expanded="false"
- [attr.aria-controls]="'id-'+mapIndex">
+ <button class="btn btn-link " data-toggle="collapse"
+ aria-expanded="false"
+ (click)="changeDivShow(mapIndex)" >
<i class="icon-file-code"></i> {{file.key}}
</button>
<a class="accordion-delete" (click)="removeFile(mapIndex)"><i class="icon-delete"></i></a>
@@ -54,6 +54,7 @@
</div>
</div>
</div>
+
<!--
<div class="card">
<div class="card-header" id="headingThree">
@@ -77,6 +78,7 @@
</div>
</div>
-->
+
</div>
</div>
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/imports-tab/imports-tab.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/imports-tab/imports-tab.component.ts
index dc0cf7f3b..3b9d38c1a 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/imports-tab/imports-tab.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/imports-tab/imports-tab.component.ts
@@ -1,7 +1,7 @@
-import { Component, OnInit } from '@angular/core';
-import { FileSystemFileEntry, NgxFileDropEntry } from 'ngx-file-drop';
-import { PackageCreationStore } from '../package-creation.store';
-import { PackageCreationUtils } from '../package-creation.utils';
+import {Component, OnInit} from '@angular/core';
+import {FileSystemFileEntry, NgxFileDropEntry} from 'ngx-file-drop';
+import {PackageCreationStore} from '../package-creation.store';
+import {PackageCreationUtils} from '../package-creation.utils';
@Component({
@@ -19,6 +19,7 @@ export class ImportsTabComponent implements OnInit {
constructor(private packageCreationStore: PackageCreationStore, private packageCreationUtils: PackageCreationUtils) {
}
+
ngOnInit(): void {
this.packageCreationStore.state$.subscribe(cbaPackage => {
if (cbaPackage.definitions && cbaPackage.definitions.imports && cbaPackage.definitions.imports.size > 0) {
@@ -76,4 +77,14 @@ export class ImportsTabComponent implements OnInit {
textChanges(code: any, key: string) {
this.packageCreationStore.addDefinition(key, code);
}
+
+ changeDivShow(mapIndex: number) {
+ const divElement = document.getElementById('id-' + mapIndex) as HTMLElement;
+ if (divElement.getAttribute('class').includes('show')) {
+ divElement.setAttribute('class', 'collapse');
+ } else {
+ divElement.setAttribute('class', 'collapse show');
+ }
+ console.log(divElement.getAttribute('class'));
+ }
}
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.html
index 6186fe6ca..5b4e7c840 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.html
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.html
@@ -20,7 +20,7 @@
<div class="card">
<div [id]="'head-script-'+mapIndex" class="card-header">
<h5 class="mb-0 d-flex justify-content-between">
- <button [attr.aria-controls]="'id-script-'+mapIndex" [attr.data-target]="'#id-script-'+mapIndex"
+ <button (click)="changeDivShow(mapIndex)"
aria-expanded="false" class="btn btn-link collapsed" data-toggle="collapse">
<i class="icon-file-code"></i> {{file.key}}
</button>
@@ -92,4 +92,4 @@
</div>
</div>
</div>
-</div> \ No newline at end of file
+</div>
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.ts
index 5387489a2..efe28e9a4 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.ts
@@ -98,4 +98,13 @@ export class ScriptsTabComponent implements OnInit {
textChanges(code: any, key: string) {
this.packageCreationStore.addScripts(key, code);
}
+
+ changeDivShow(mapIndex: number) {
+ const divElement = document.getElementById('id-script-' + mapIndex) as HTMLElement;
+ if (divElement.getAttribute('class').includes('show')) {
+ divElement.setAttribute('class', 'collapse');
+ } else {
+ divElement.setAttribute('class', 'collapse show');
+ }
+ }
}