summaryrefslogtreecommitdiffstats
path: root/cds-ui/client/src/app/feature-modules/blueprint
diff options
context:
space:
mode:
Diffstat (limited to 'cds-ui/client/src/app/feature-modules/blueprint')
-rw-r--r--cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts5
-rw-r--r--cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts2
2 files changed, 7 insertions, 0 deletions
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 09fa00315..b982fa29f 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
@@ -38,6 +38,7 @@ import { LoadBlueprintSuccess, SetBlueprintState } from '../../../../common/core
import { ApiService } from 'src/app/common/core/services/api.service';
import { IMetaData } from 'src/app/common/core/store/models/metadata.model';
import { EditorService } from './editor.service';
+import { SortPipe } from '../../../../common/shared/pipes/sort.pipe';
interface Node {
name: string;
@@ -390,6 +391,7 @@ export class EditorComponent implements OnInit {
newFileNode.data = '';
this.filesData.push(newFileNode);
}
+ this.filesData = new SortPipe().transform(this.filesData, 'asc', 'name');
this.arrangeTreeData(this.filesData);
}
}
@@ -431,7 +433,9 @@ export class EditorComponent implements OnInit {
if (this.validfile) {
this.fetchTOSACAMetadata();
+ this.paths = new SortPipe().transform(this.paths, 'asc', 'name');
this.filesData = this.paths;
+ this.paths = new SortPipe().transform(this.paths, 'asc', 'name');
this.tree = this.arrangeTreeData(this.paths);
} else {
alert('Please update proper file with TOSCA metadata');
@@ -505,6 +509,7 @@ export class EditorComponent implements OnInit {
i = i - 1;
}
}
+ this.filesData = new SortPipe().transform(this.filesData, 'asc', 'name');
this.arrangeTreeData(this.filesData);
}
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts
index c232414e0..92003c919 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts
+++ b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts
@@ -29,6 +29,7 @@ import { IBlueprintState } from '../../../../common/core/store/models/blueprintS
import { IAppState } from '../../../../common/core/store/state/app.state';
import { LoadBlueprintSuccess, SET_BLUEPRINT_STATE, SetBlueprintState } from '../../../../common/core/store/actions/blueprint.action';
import { json } from 'd3';
+import { SortPipe } from '../../../../common/shared/pipes/sort.pipe';
@Component({
selector: 'app-search-template',
@@ -116,6 +117,7 @@ export class SearchTemplateComponent implements OnInit {
if(this.validfile) {
this.fetchTOSACAMetadata();
+ this.paths = new SortPipe().transform(this.paths, 'asc', 'name');
this.tree = this.arrangeTreeData(this.paths);
} else {
alert('Please update proper file with TOSCA metadata');