Merge "Metadata component css changes"
diff --git a/cds-ui/client/package.json b/cds-ui/client/package.json
index 8963be3..04dd308 100644
--- a/cds-ui/client/package.json
+++ b/cds-ui/client/package.json
@@ -28,11 +28,13 @@
"@ngrx/store": "^6.1.2",
"@ngrx/store-devtools": "^6.1.2",
"@types/d3": "^5.7.0",
+ "ang-jsoneditor": "1.6.1",
"core-js": "^2.5.4",
"d3": "^5.9.1",
"file-saver": "^2.0.1",
"font-awesome": "^4.7.0",
"hammerjs": "^2.0.8",
+ "jsoneditor": "^5.31.1",
"jszip": "^3.2.0",
"material-design-icons": "^3.0.1",
"ng2-ace-editor": "^0.3.9",
diff --git a/cds-ui/client/src/app/common/shared/pipes/search.pipe.ts b/cds-ui/client/src/app/common/shared/pipes/search.pipe.ts
index 092531e..b0d37c3 100644
--- a/cds-ui/client/src/app/common/shared/pipes/search.pipe.ts
+++ b/cds-ui/client/src/app/common/shared/pipes/search.pipe.ts
@@ -26,11 +26,12 @@
export class SearchPipe implements PipeTransform{
- transform(item: any, searchText: any): any {
- if(searchText == null) return item;
-
- return item.filter(function(search){
- return search.type.toLowerCase().indexOf(searchText.toLowerCase()) > -1;
- })
- }
+ transform(items: any[], searchText: string): any[] {
+ if(!items) return [];
+ if(!searchText) return items;
+ searchText = searchText.toLowerCase();
+ return items.filter( it => {
+ return it.toLowerCase().includes(searchText);
+ });
+ }
}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/designer/designer.component.scss b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/designer/designer.component.scss
index 1a3674c..4af1072 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/designer/designer.component.scss
+++ b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/designer/designer.component.scss
@@ -67,6 +67,6 @@
.designerTmp {
display: flex;
flex-direction: row;
- height: 524px;
+ height: 490px;
width: 100%
}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.html b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.html
index 64b201d..308f9cc 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.html
+++ b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.html
@@ -20,8 +20,8 @@
<div class="container">
<div class="fileViewContainer">
- <mat-tree [dataSource]="dataSource" [treeControl]="treeControl">
- <mat-tree-node *matTreeNodeDef="let node" matTreeNodePadding>
+ <mat-tree [dataSource]="dataSource" [treeControl]="treeControl" style="background-color: #ebebeb">
+ <mat-tree-node *matTreeNodeDef="let node" matTreeNodePadding (click)="selectFileToView(node);activeNode = node" [ngClass]="{ 'background-highlight': activeNode === node }">
<button mat-icon-button disabled></button>
<button mat-icon-button (click)="selectFileToView(node)">{{node.name}}</button>
</mat-tree-node>
@@ -31,7 +31,7 @@
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
</mat-icon>
</button>
- <button mat-icon-button (click)="selectFileToView(node)">{{node.name}}</button>
+ <button mat-icon-button>{{node.name}}</button>
</mat-tree-node>
</mat-tree>
</div>
@@ -39,50 +39,4 @@
<i class="fa fa-save save-icon" style="font-size:24px" (click)="updateBlueprint()"></i>
<ace-editor [(text)]="text" [(mode)]="mode" #editor class="aceEditor"></ace-editor>
</div>
-</div>
-
-<!-- <div style="display: flex;flex-direction: row">
- <div style="height: 6em;
- width: 30em;">
-
- </div>
- <div style="height: 6em;
- width: 16em">
- <button style="margin: 0.5em;
- background-color: #3f51b5;
- color: white;
- border-radius: 2em;
- padding: 0.5em;
- min-width: 6em;" (click)="updateBlueprint()">Save Changes</button>
- </div>
- <div style="height: 6em;
- width: 100%;">
- <div style="margin-left: 38em">
- <mat-form-field>
- <select matNativeControl required>
- <option value="volvo">SDC</option>
- <option value="saab">CCSDK</option>
- </select>
- </mat-form-field>
- <button style="margin: 0.5em;
- background-color: #3f51b5;
- color: white;
- border-radius: 2em;
- padding: 0.5em;
- min-width: 6em;">Deploy</button>
- <button style="margin: 0.5em;
- background-color: #3f51b5;
- color: white;
- border-radius: 2em;
- padding: 0.5em;
- min-width: 6em;">Save</button>
- <button style="margin: 0.5em;
- background-color: #3f51b5;
- color: white;
- border-radius: 2em;
- padding: 0.5em;
- min-width: 6em;" (click)="download()">Download</button>
-
- </div>
- </div>
-</div> -->
\ No newline at end of file
+</div>
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.scss b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.scss
index 136c08b..2f16af7 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.scss
+++ b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.scss
@@ -29,6 +29,7 @@
height: 490px !important;
overflow-x: scroll;
overflow-y: scroll;
+ background-color: #ebebeb;
}
.editorConatiner {
width: 80%;
@@ -57,4 +58,8 @@
font-size: 24px;
cursor: pointer;
z-index: 1;
-}
\ No newline at end of file
+}
+
+.background-highlight {
+ background-color: whitesmoke !important;
+ }
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts
index 7203dc8..e48177d 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts
+++ b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts
@@ -82,6 +82,7 @@
fileExtension: string;
mode: string;
private zipFile: JSZip = new JSZip();
+ activeNode: any;
private transformer = (node: Node, level: number) => {
return {
@@ -143,7 +144,7 @@
blueprint.push(this.blueprintdata[key]);
}
}
- this.text = JSON.stringify(this.blueprintdata, null, '\t');
+ // this.text = JSON.stringify(this.blueprintdata, null, '\t');
// this.editor.getEditor().getSession().setMode("ace/mode/json");
this.editor.getEditor().getSession().setTabSize(2);
this.editor.getEditor().getSession().setUseWrapMode(true);
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.html b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.html
index 66e3aeb..b58be9f 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.html
+++ b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.html
@@ -22,5 +22,5 @@
<input type="file" accept=".zip" (change)="fileChanged($event)">
</div>
<div>
- <button mat-button matStepperNext class="matStepNextBtn" (click)="updateBlueprintState()" [disabled]="!validfile">Upload</button>
+ <button mat-button matStepperNext (click)="updateBlueprintState()" [ngClass] = "{'mat-upload-btn-disabled': !validfile, 'matStepNextBtn': validfile}" [disabled]="!validfile">Upload</button>
</div>
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.scss b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.scss
index 66f3f28..beb05e2 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.scss
+++ b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.scss
@@ -25,5 +25,18 @@
margin-top: 10px;
position: absolute;
margin-bottom: 5px;
- border-radius: 2em;
+ border-radius: 4px;
+ min-width: 6em;
+ cursor: pointer;
+}
+
+.mat-upload-btn-disabled {
+ background-color: #c5cae8;
+ margin-top: 10px;
+ border-radius: 4px;
+ margin-bottom: 5px;
+ color: darkgray;
+ min-width: 6em;
+ border: none;
+ cursor: initial;
}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.scss b/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.scss
index 931e1d4..37d1feb 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.scss
+++ b/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.scss
@@ -25,14 +25,12 @@
margin-top: 10px;
position: absolute;
margin-bottom: 5px;
- border-radius: 2em;
+ border-radius: 4px;
+ min-width: 6em;
+ cursor: pointer;
}
.matStepContent {
margin-top: 15px !important;
margin-bottom: 20px !important;
-}
-
-// .mat-vertical-content {
-// margin: 10px !important;
-// }
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/browse-file/browse-file.component.html b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/browse-file/browse-file.component.html
deleted file mode 100644
index f85a2e4..0000000
--- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/browse-file/browse-file.component.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--/*
-* ============LICENSE_START=======================================================
-* ONAP : CDS
-* ================================================================================
-* Copyright 2019 TechMahindra
-*=================================================================================
-* 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.
-* ============LICENSE_END=========================================================
-*/-->
-
-
-<p>
- browse-file works!
-</p>
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/browse-file/browse-file.component.scss b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/browse-file/browse-file.component.scss
deleted file mode 100644
index cafd2bf..0000000
--- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/browse-file/browse-file.component.scss
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-* ============LICENSE_START=======================================================
-* ONAP : CDS
-* ================================================================================
-* Copyright 2019 TechMahindra
-*=================================================================================
-* 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.
-* ============LICENSE_END=========================================================
-*/
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/browse-file/browse-file.component.spec.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/browse-file/browse-file.component.spec.ts
deleted file mode 100644
index df67a60..0000000
--- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/browse-file/browse-file.component.spec.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-* ============LICENSE_START=======================================================
-* ONAP : CDS
-* ================================================================================
-* Copyright 2019 TechMahindra
-*=================================================================================
-* 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.
-* ============LICENSE_END=========================================================
-*/
-
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { BrowseFileComponent } from './browse-file.component';
-
-describe('BrowseFileComponent', () => {
- let component: BrowseFileComponent;
- let fixture: ComponentFixture<BrowseFileComponent>;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [ BrowseFileComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(BrowseFileComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/browse-file/browse-file.component.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/browse-file/browse-file.component.ts
deleted file mode 100644
index 5c00aa0..0000000
--- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/browse-file/browse-file.component.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-* ============LICENSE_START=======================================================
-* ONAP : CDS
-* ================================================================================
-* Copyright 2019 TechMahindra
-*=================================================================================
-* 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.
-* ============LICENSE_END=========================================================
-*/
-
-import { Component, OnInit } from '@angular/core';
-
-@Component({
- selector: 'app-browse-file',
- templateUrl: './browse-file.component.html',
- styleUrls: ['./browse-file.component.scss']
-})
-export class BrowseFileComponent implements OnInit {
-
- constructor() { }
-
- ngOnInit() {
- }
-
-}
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-definition.module.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-definition.module.ts
index c618e27..0e05653 100644
--- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-definition.module.ts
+++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-definition.module.ts
@@ -24,7 +24,6 @@
import { ResourceDefinitionRoutingModule } from './resource-definition-routing.module';
import { ResourceDefinitionComponent } from './resource-definition.component';
import { SharedModule } from '../../../app/common/shared/shared.module';
-import { SaveResourceModule } from './save-resource/save-resource.module';
import { ResourceCreationModule } from './resource-creation/resource-creation.module';
import { ResourceEditModule } from './resource-edit/resource-edit.module';
@@ -39,7 +38,6 @@
CommonModule,
ResourceDefinitionRoutingModule,
SharedModule,
- SaveResourceModule,
ResourceCreationModule,
ResourceEditModule,
MatToolbarModule,
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.module.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.module.ts
index 8f28021..2b25ae3 100644
--- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.module.ts
+++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.module.ts
@@ -29,6 +29,7 @@
import { SourcesTemplateComponent } from './sources-template/sources-template.component';
import { ResourceMetadataComponent } from './resource-metadata/resource-metadata.component';
import { DragDropModule } from '@angular/cdk/drag-drop';
+import { NgJsonEditorModule } from 'ang-jsoneditor';
@NgModule({
declarations: [ ResourceEditComponent,SourcesTemplateComponent,ResourceMetadataComponent ],
@@ -38,8 +39,8 @@
SharedModule,
FormsModule,ReactiveFormsModule,
DragDropModule,
- MatExpansionModule,MatToolbarModule,MatIconModule, MatButtonModule, MatSidenavModule, MatCheckboxModule, MatListModule, MatGridListModule, MatCardModule, MatMenuModule, MatTableModule, MatPaginatorModule, MatSortModule, MatInputModule, MatSelectModule, MatRadioModule, MatFormFieldModule, MatStepperModule
-
+ MatExpansionModule,MatToolbarModule,MatIconModule, MatButtonModule, MatSidenavModule, MatCheckboxModule, MatListModule, MatGridListModule, MatCardModule, MatMenuModule, MatTableModule, MatPaginatorModule, MatSortModule, MatInputModule, MatSelectModule, MatRadioModule, MatFormFieldModule, MatStepperModule,
+ NgJsonEditorModule
],
exports: [ ResourceEditComponent,SharedModule ]
})
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/sources-template/sources-template.component.html b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/sources-template/sources-template.component.html
index 123594a..903c6d3 100644
--- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/sources-template/sources-template.component.html
+++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/sources-template/sources-template.component.html
@@ -21,17 +21,17 @@
<div class="sources-container">
<div
cdkDropList
- [cdkDropListData]="todo"
+ [cdkDropListData]="sourcesOptions"
class="sources-list"
(cdkDropListDropped)="drop($event)">
- <div class="sources-box" *ngFor="let item of todo" cdkDrag>
+ <div class="sources-box" *ngFor="let item of sourcesOptions" cdkDrag>
<mat-expansion-panel class="expansion-panel">
<mat-expansion-panel-header>
<mat-panel-title>
- {{item.type}}
+ {{item}}
</mat-panel-title>
</mat-expansion-panel-header>
- {{item}}
+ <json-editor [options]="options" [data]="selected(item)" on-change="onChange()"></json-editor>
</mat-expansion-panel>
</div>
</div>
@@ -47,10 +47,10 @@
<br><br>
<div
cdkDropList
- [cdkDropListData]="sourcesOptions"
+ [cdkDropListData]="option"
class="options-list"
(cdkDropListDropped)="drop($event)">
- <div class="options-box" *ngFor="let item of sourcesOptions | search : searchText" cdkDrag>{{item.type}}</div>
+ <div class="options-box" *ngFor="let item of option | search :searchText" cdkDrag>{{item}}</div>
</div>
</div>
</div>
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/sources-template/sources-template.component.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/sources-template/sources-template.component.ts
index 8c6d99c..c43d1de 100644
--- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/sources-template/sources-template.component.ts
+++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/sources-template/sources-template.component.ts
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-import { Component, OnInit } from '@angular/core';
+import { Component, OnInit, ViewChild } from '@angular/core';
import { CdkDragDrop, moveItemInArray, transferArrayItem } from '@angular/cdk/drag-drop';
import { IResources } from 'src/app/common/core/store/models/resources.model';
import { IResourcesState } from 'src/app/common/core/store/models/resourcesState.model';
@@ -28,6 +28,7 @@
import { A11yModule } from '@angular/cdk/a11y';
import { LoadResourcesSuccess } from 'src/app/common/core/store/actions/resources.action';
import { ISourcesData } from 'src/app/common/core/store/models/sourcesData.model';
+import { JsonEditorComponent, JsonEditorOptions } from 'ang-jsoneditor';
@Component({
selector: 'app-sources-template',
@@ -35,14 +36,29 @@
styleUrls: ['./sources-template.component.scss']
})
export class SourcesTemplateComponent implements OnInit {
+// rdState: Observable<IResourcesState>;
+// resources: IResources;
+// todo = [];
+// sources:ISourcesData;
+// sourcesOptions = [];
+
+ @ViewChild(JsonEditorComponent) editor: JsonEditorComponent;
+ options = new JsonEditorOptions();
+
rdState: Observable<IResourcesState>;
resources: IResources;
- todo = [];
+ option = ['mdsal','default'];
sources:ISourcesData;
sourcesOptions = [];
-
+ sourcesData = [];
+
constructor(private store: Store<IAppState>) {
- this.rdState = this.store.select('resources');
+ this.rdState = this.store.select('resources');
+ this.options.mode = 'text';
+ this.options.modes = [ 'text', 'tree', 'view'];
+ this.options.statusBar = false;
+ this.options.onChange = () => console.log(this.editor.get());
+
}
ngOnInit() {
@@ -51,14 +67,22 @@
var resourcesState: IResourcesState = { resources: resourcesdata.resources, isLoadSuccess: resourcesdata.isLoadSuccess, isSaveSuccess: resourcesdata.isSaveSuccess, isUpdateSuccess: resourcesdata.isUpdateSuccess };
this.sources = resourcesState.resources.sources;
for (let key in this.sources) {
- if (this.sources.hasOwnProperty(key)) {
- this.sourcesOptions.push(this.sources[key]);
- }
+ this.sourcesOptions.push(key);
}
- console.log(this.sourcesOptions);
+ //console.log(this.sourcesOptions);
})
}
+ onChange() {
+ console.log(this.editor.get())
+ };
+
+ selected(value){
+ console.log(value);
+ this.sourcesData=this.sources[value];
+ return this.sourcesData;
+ }
+
drop(event: CdkDragDrop<string[]>) {
if (event.previousContainer === event.container) {
moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/save-resource/save-resource-routing.module.ts b/cds-ui/client/src/app/feature-modules/resource-definition/save-resource/save-resource-routing.module.ts
deleted file mode 100644
index c0346ca..0000000
--- a/cds-ui/client/src/app/feature-modules/resource-definition/save-resource/save-resource-routing.module.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
-* ============LICENSE_START=======================================================
-* ONAP : CDS
-* ================================================================================
-* Copyright 2019 TechMahindra
-*=================================================================================
-* 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.
-* ============LICENSE_END=========================================================
-*/
-
-import { NgModule } from '@angular/core';
-import { Routes, RouterModule } from '@angular/router';
-import { SaveResourceComponent } from './save-resource.component';
-
-const routes: Routes = [
- {
- path: '',
- component: SaveResourceComponent
- }
-];
-
-@NgModule({
- imports: [RouterModule.forChild(routes)],
- exports: [RouterModule]
-})
-export class SaveResourceRoutingModule { }
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/save-resource/save-resource.component.html b/cds-ui/client/src/app/feature-modules/resource-definition/save-resource/save-resource.component.html
deleted file mode 100644
index 2ecb4a0..0000000
--- a/cds-ui/client/src/app/feature-modules/resource-definition/save-resource/save-resource.component.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--/*
-* ============LICENSE_START=======================================================
-* ONAP : CDS
-* ================================================================================
-* Copyright 2019 TechMahindra
-*=================================================================================
-* 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.
-* ============LICENSE_END=========================================================
-*/-->
-
-
-<p>
- save-resource works!
-</p>
-<router-outlet></router-outlet>
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/save-resource/save-resource.component.scss b/cds-ui/client/src/app/feature-modules/resource-definition/save-resource/save-resource.component.scss
deleted file mode 100644
index cafd2bf..0000000
--- a/cds-ui/client/src/app/feature-modules/resource-definition/save-resource/save-resource.component.scss
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-* ============LICENSE_START=======================================================
-* ONAP : CDS
-* ================================================================================
-* Copyright 2019 TechMahindra
-*=================================================================================
-* 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.
-* ============LICENSE_END=========================================================
-*/
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/save-resource/save-resource.component.spec.ts b/cds-ui/client/src/app/feature-modules/resource-definition/save-resource/save-resource.component.spec.ts
deleted file mode 100644
index 6a32999..0000000
--- a/cds-ui/client/src/app/feature-modules/resource-definition/save-resource/save-resource.component.spec.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-* ============LICENSE_START=======================================================
-* ONAP : CDS
-* ================================================================================
-* Copyright 2019 TechMahindra
-*=================================================================================
-* 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.
-* ============LICENSE_END=========================================================
-*/
-
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { SaveResourceComponent } from './save-resource.component';
-
-describe('SaveResourceComponent', () => {
- let component: SaveResourceComponent;
- let fixture: ComponentFixture<SaveResourceComponent>;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [ SaveResourceComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(SaveResourceComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/save-resource/save-resource.component.ts b/cds-ui/client/src/app/feature-modules/resource-definition/save-resource/save-resource.component.ts
deleted file mode 100644
index f4a046b..0000000
--- a/cds-ui/client/src/app/feature-modules/resource-definition/save-resource/save-resource.component.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-* ============LICENSE_START=======================================================
-* ONAP : CDS
-* ================================================================================
-* Copyright 2019 TechMahindra
-*=================================================================================
-* 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.
-* ============LICENSE_END=========================================================
-*/
-
-import { Component, OnInit } from '@angular/core';
-
-@Component({
- selector: 'app-save-resource',
- templateUrl: './save-resource.component.html',
- styleUrls: ['./save-resource.component.scss']
-})
-export class SaveResourceComponent implements OnInit {
-
- constructor() { }
-
- ngOnInit() {
- }
-
-}
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/save-resource/save-resource.module.ts b/cds-ui/client/src/app/feature-modules/resource-definition/save-resource/save-resource.module.ts
deleted file mode 100644
index d87cfe3..0000000
--- a/cds-ui/client/src/app/feature-modules/resource-definition/save-resource/save-resource.module.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-* ============LICENSE_START=======================================================
-* ONAP : CDS
-* ================================================================================
-* Copyright 2019 TechMahindra
-*=================================================================================
-* 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.
-* ============LICENSE_END=========================================================
-*/
-
-import { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-
-import { SaveResourceComponent } from './save-resource.component';
-import { SaveResourceRoutingModule } from './save-resource-routing.module';
-
-@NgModule({
- declarations: [SaveResourceComponent],
- exports: [ SaveResourceComponent ],
- imports: [
- CommonModule,
- SaveResourceRoutingModule
- ]
-})
-export class SaveResourceModule { }
diff --git a/cds-ui/client/src/styles.scss b/cds-ui/client/src/styles.scss
index 10d5577..54eb746 100644
--- a/cds-ui/client/src/styles.scss
+++ b/cds-ui/client/src/styles.scss
@@ -20,7 +20,7 @@
*/
/* You can add global styles to this file, and also import other style files */
-
+@import "~jsoneditor/dist/jsoneditor.min.css";
.mat-card:not([class*=mat-elevation-z]) {
box-shadow: none !important;
}
diff --git a/docs/CBA/index.rst b/docs/CBA/index.rst
index 957c71e..c70f097 100644
--- a/docs/CBA/index.rst
+++ b/docs/CBA/index.rst
@@ -31,20 +31,64 @@
Installation:
=============
-.. toctree::
- :maxdepth: 1
- :glob:
-
- sections/installation/index
+Building client html and js files
+=================================
+
+ * FROM alpine:3.8 as builder
+
+ * RUN apk add --no-cache npm
+
+ * WORKDIR /opt/cds-ui/client/
+
+ * COPY client/package.json /opt/cds-ui/client/
+
+ * RUN npm install
+
+ * COPY client /opt/cds-ui/client/
+
+ * RUN npm run build
+
+
+Building and creating server
+============================
+
+ * FROM alpine:3.8
+
+ * WORKDIR /opt/cds-ui/
+
+ * RUN apk add --no-cache npm
+
+ * COPY server/package.json /opt/cds-ui/
+
+ * RUN npm install
+
+ * COPY server /opt/cds-ui/
+
+ * COPY --from=builder /opt/cds-ui/server/public /opt/cds-ui/public
+
+ * RUN npm run build
+
+ * EXPOSE 3000
+
+ * CMD [ "npm", "start" ]
Development:
=============
-.. toctree::
- :maxdepth: 1
- :glob:
-
- sections/development/index
+Pre-requiste:
+=============
+ Visual Studio code editor
+ Git bash
+
+Steps
+=====
+ To compile CDS code:
+
+ 1. Make sure your local Maven settings file ($HOME/.m2/settings.xml) contains
+ references to the ONAP repositories and OpenDaylight repositories.
+ 2. git clone https://(LFID)@gerrit.onap.org/r/a/ccsdk/cds
+ 3. cd cds ; mvn clean install ; cd ..
+ 4. Open the cds-ui/client code for development
Data Flow:
==========
diff --git a/docs/CBA/sections/development/index.rst b/docs/CBA/sections/development/index.rst
deleted file mode 100644
index dc61a23..0000000
--- a/docs/CBA/sections/development/index.rst
+++ /dev/null
@@ -1,26 +0,0 @@
-.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-.. http://creativecommons.org/licenses/by/4.0
-.. Copyright (C) 2019 IBM.
-
-Development
-------------
-.. toctree::
- :maxdepth: 1
-
-Pre-requiste:
-=============
- Visual Studio code editor
- Git bash
-
-Steps
-=====
- To compile CDS code:
-
- 1. Make sure your local Maven settings file ($HOME/.m2/settings.xml) contains
- references to the ONAP repositories and OpenDaylight repositories.
- 2. git clone https://(LFID)@gerrit.onap.org/r/a/ccsdk/cds
- 3. cd cds ; mvn clean install ; cd ..
- 4. Open the cds-ui/client code for development
-
-
-
diff --git a/docs/CBA/sections/installation/index.rst b/docs/CBA/sections/installation/index.rst
deleted file mode 100644
index eb7676d..0000000
--- a/docs/CBA/sections/installation/index.rst
+++ /dev/null
@@ -1,47 +0,0 @@
-.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-.. http://creativecommons.org/licenses/by/4.0
-.. Copyright (C) 2019 IBM.
-
-Installation
-------------
-
-Building client html and js files
-=================================
-
- * FROM alpine:3.8 as builder
-
- * RUN apk add --no-cache npm
-
- * WORKDIR /opt/cds-ui/client/
-
- * COPY client/package.json /opt/cds-ui/client/
-
- * RUN npm install
-
- * COPY client /opt/cds-ui/client/
-
- * RUN npm run build
-
-
-Building and creating server
-============================
-
- * FROM alpine:3.8
-
- * WORKDIR /opt/cds-ui/
-
- * RUN apk add --no-cache npm
-
- * COPY server/package.json /opt/cds-ui/
-
- * RUN npm install
-
- * COPY server /opt/cds-ui/
-
- * COPY --from=builder /opt/cds-ui/server/public /opt/cds-ui/public
-
- * RUN npm run build
-
- * EXPOSE 3000
-
- * CMD [ "npm", "start" ]
\ No newline at end of file