summaryrefslogtreecommitdiffstats
path: root/cds-ui
diff options
context:
space:
mode:
Diffstat (limited to 'cds-ui')
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.html267
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts37
2 files changed, 169 insertions, 135 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.html
index f34058eb6..5a0c9aaad 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.html
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.html
@@ -14,13 +14,13 @@
<div class="row">
<div class="col pr-0 text-center">
<button type="button" data-toggle="modal" data-target="#exampleModalScrollable"
- class="btn btn-secondary"><i class="icon-custom-attribute" type="button"
- aria-hidden="true"></i></button>
+ class="btn btn-secondary"><i class="icon-custom-attribute" type="button"
+ aria-hidden="true"></i></button>
<span>Create Custom</span>
</div>
<div class="col text-center">
<button (click)="printSomethings()" [disabled]="!isFunctionAttributeActive" type="button"
- data-toggle="modal" data-target="#exampleModalScrollable3" class="btn btn-secondary"><i
+ data-toggle="modal" data-target="#exampleModalScrollable3" class="btn btn-secondary"><i
class="icon-function-attribute" type="button" aria-hidden="true"></i></button>
<span>Import From Function</span>
</div>
@@ -33,7 +33,7 @@
<div class="card-header" id="headingOne">
<h2 class="mb-0">
<button class="btn btn-link" type="button" data-toggle="collapse" data-target="#collapseOne"
- aria-expanded="true" aria-controls="collapseOne">
+ aria-expanded="true" aria-controls="collapseOne">
Inputs
</button>
</h2>
@@ -45,16 +45,16 @@
<div class="form-group" *ngFor="let input of inputs">
<label for="exampleFormControlTextarea1">{{input.name}}
<i [hidden]="!input.required" class="icon-required-star" type="button"
- aria-hidden="true"></i>
+ aria-hidden="true"></i>
<i [hidden]="input.required" class="icon-required-star optional-attribute"
- type="button" aria-hidden="true"></i>
+ type="button" aria-hidden="true"></i>
</label>
<div class="attributeOptions">
<a data-toggle="modal" data-target="#exampleModalScrollable2"
- class="accordion-delete editAttribute" tooltip="Edit Attribute"
- placement="bottom"><i class="icon-edit"></i></a>
+ class="accordion-delete editAttribute" tooltip="Edit Attribute"
+ placement="bottom"><i class="icon-edit"></i></a>
<a class="accordion-delete deleteAttribute" tooltip="Delete Attribute"
- placement="bottom"><i class="icon-delete-sm"></i></a>
+ placement="bottom"><i class="icon-delete-sm"></i></a>
</div>
</div>
</div>
@@ -69,7 +69,7 @@
<div class="card-header" id="headingOne">
<h2 class="mb-0">
<button class="btn btn-link" type="button" data-toggle="collapse" data-target="#collapseTwo"
- aria-expanded="true" aria-controls="collapseTwo">
+ aria-expanded="true" aria-controls="collapseTwo">
Outputs
</button>
</h2>
@@ -82,9 +82,9 @@
<div class="form-group" *ngFor="let output of outputs">
<label for="exampleFormControlTextarea1">{{output.name}}
<i [hidden]="!output.required" class="icon-required-star" type="button"
- aria-hidden="true"></i>
+ aria-hidden="true"></i>
<i [hidden]="output.required" class="icon-required-star optional-attribute"
- type="button" aria-hidden="true"></i>
+ type="button" aria-hidden="true"></i>
</label>
</div>
@@ -97,14 +97,14 @@
</div>
<!--Action - Add Custom Attribute - Modal-->
<div class="modal fade" id="exampleModalScrollable" tabindex="-1" role="dialog"
- aria-labelledby="exampleModalScrollableTitle" aria-hidden="true">
+ aria-labelledby="exampleModalScrollableTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-scrollable" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalScrollableTitle">
Add Custom Attributes</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
- <img src="assets/img/icon-close.svg" />
+ <img src="assets/img/icon-close.svg"/>
</button>
</div>
<div class="modal-body createAttributeTabs">
@@ -112,29 +112,29 @@
<ul class="nav nav-tabs" id="myTab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="home-tab" data-toggle="tab" href="#home" role="tab"
- aria-controls="home" aria-selected="true">Inputs</a>
+ aria-controls="home" aria-selected="true">Inputs</a>
</li>
<li class="nav-item">
<a class="nav-link" id="profile-tab" data-toggle="tab" href="#profile" role="tab"
- aria-controls="profile" aria-selected="false">Outputs</a>
+ aria-controls="profile" aria-selected="false">Outputs</a>
</li>
</ul>
<div class="tab-content" id="myTabContent">
<!--INPUTS Tab-->
<div class="tab-pane fade show active create-form" id="home" role="tabpanel"
- aria-labelledby="home-tab">
+ aria-labelledby="home-tab">
<div class="form-group row">
<label for="inputEmail3" class="col-sm-3 col-form-label">Name <span>*</span></label>
<div class="col-sm-9">
<input [(ngModel)]="inputActionAttribute.name" type="email" class="form-control"
- id="inputEmail3" placeholder="Attribute name">
+ id="inputEmail3" placeholder="Attribute name">
</div>
</div>
<div class="form-group row">
<label for="inputPassword3" class="col-sm-3 col-form-label">Description</label>
<div class="col-sm-9">
<input [(ngModel)]="inputActionAttribute.description" type="text" class="form-control"
- id="inputPassword3" placeholder="Add some description">
+ id="inputPassword3" placeholder="Add some description">
</div>
</div>
<div class="form-group row">
@@ -142,25 +142,26 @@
<div class="col-sm-9">
<div class="list-group list-group-horizontal">
<button type="button" class="list-group-item list-group-item-action"
- (click)="setInputType('String')">
+ (click)="setInputType('String')">
String
</button>
<button type="button" class="list-group-item list-group-item-action"
- (click)="setInputType('Integer')">Integer
+ (click)="setInputType('Integer')">Integer
</button>
<button type="button" class="list-group-item list-group-item-action"
- (click)="setInputType('Boolean')">Boolean
+ (click)="setInputType('Boolean')">Boolean
</button>
<button type="button" class="list-group-item list-group-item-action"
- (click)="setInputType('List')">List
+ (click)="setInputType('List')">List
</button>
<button type="button" class="list-group-item list-group-item-action"
- (click)="setInputType('Other')">Other
+ (click)="setInputType('Other')">Other
</button>
</div>
<input [hidden]="!isInputOtherType" type="text" class="form-control mt-2 mb-2"
- id="inputPassword4" placeholder="Add Other type name" [(ngModel)]="inputOtherType"
- (change)="setInputType(inputOtherType)">
+ id="inputPassword4" placeholder="Add Other type name"
+ [(ngModel)]="inputOtherType"
+ (change)="setInputType(inputOtherType)">
</div>
</div>
@@ -169,12 +170,12 @@
<div class="col-sm-9">
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" id="customRadioInline1" name="customRadioInline1"
- class="custom-control-input" (click)="setInputRequired(true)">
+ class="custom-control-input" (click)="setInputRequired(true)">
<label class="custom-control-label" for="customRadioInline1">True</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" id="customRadioInline2" name="customRadioInline1"
- class="custom-control-input" (click)="setInputRequired(false)">
+ class="custom-control-input" (click)="setInputRequired(false)">
<label class="custom-control-label" for="customRadioInline2">False</label>
</div>
</div>
@@ -186,14 +187,14 @@
<label for="inputEmail3" class="col-sm-3 col-form-label">Name <span>*</span></label>
<div class="col-sm-9">
<input [(ngModel)]="outputActionAttribute.name" type="email" class="form-control"
- id="inputEmail3" placeholder="Attribute name">
+ id="inputEmail3" placeholder="Attribute name">
</div>
</div>
<div class="form-group row">
<label for="inputPassword3" class="col-sm-3 col-form-label">Description</label>
<div class="col-sm-9">
<input [(ngModel)]="outputActionAttribute.description" type="text" class="form-control"
- id="inputPassword3" placeholder="Add some description">
+ id="inputPassword3" placeholder="Add some description">
</div>
</div>
<div class="form-group row">
@@ -201,14 +202,14 @@
<div class="col-sm-9">
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" id="customRadioInline3" name="customRadioInline3"
- class="custom-control-input" (click)="setOutputRequired(true)">
+ class="custom-control-input" (click)="setOutputRequired(true)">
<label class="custom-control-label" for="customRadioInline3">True</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" id="customRadioInline4" name="customRadioInline3"
- class="custom-control-input">
+ class="custom-control-input">
<label class="custom-control-label" for="customRadioInline4"
- (click)="setOutputRequired(false)">False</label>
+ (click)="setOutputRequired(false)">False</label>
</div>
</div>
</div>
@@ -217,28 +218,29 @@
<div class="col-sm-9">
<div class="list-group list-group-horizontal">
<button type="button" class="list-group-item list-group-item-action"
- (click)="setOutputType('String')">String
+ (click)="setOutputType('String')">String
</button>
<button type="button" class="list-group-item list-group-item-action"
- (click)="setOutputType('Integer')">
+ (click)="setOutputType('Integer')">
Integer
</button>
<button type="button" class="list-group-item list-group-item-action"
- (click)="setOutputType('Boolean')">
+ (click)="setOutputType('Boolean')">
Boolean
</button>
<button type="button" class="list-group-item list-group-item-action"
- (click)="setOutputType('List')">
+ (click)="setOutputType('List')">
List
</button>
<button type="button" class="list-group-item list-group-item-action"
- (click)="setOutputType('Other')">
+ (click)="setOutputType('Other')">
Other
</button>
</div>
<input [hidden]="!isOutputOtherType" type="text" class="form-control mt-2 mb-2"
- id="inputPassword3" placeholder="Add Other type name" [(ngModel)]="outputOtherType"
- (change)="setOutputType(outputOtherType)">
+ id="inputPassword3" placeholder="Add Other type name"
+ [(ngModel)]="outputOtherType"
+ (change)="setOutputType(outputOtherType)">
</div>
</div>
<!--Get Attribute Value-->
@@ -251,14 +253,12 @@
<div class="col">
<input type="email" class="form-control" id="inputEmail3" placeholder="Attributes">
<div class="container">
- <div *ngFor="let tempInput of steps">{{tempInput}}</div>
+ <!-- <div *ngFor="let tempInput of steps">{{tempInput}}</div>-->
</div>
</div>
</div>
-
-
<section class="carousel" aria-label="Gallery">
<ol class="carousel__viewport">
@@ -267,118 +267,109 @@
<b class="listBoxTitle">1. Choose Function Name</b>
<div class="list-group addedFunctionsList" id="list-tab" role="tablist">
<input type="text" class="form-control input-search-controller"
- placeholder="Functions">
+ placeholder="Functions">
<div class="scrollWrapper" *ngFor="let step of steps">
<a class="list-group-item list-group-item-action active" id="list-home-list"
- data-toggle="list" href="#list-home" role="tab" aria-controls="home">
+ data-toggle="list" href="#list-home" role="tab" aria-controls="home">
<i class="icon-resource_resolution mr-1" aria-hidden="true"></i>
{{step}} <i class="icon-next_arrow" aria-hidden="true" (click)="getAttributesAndOutputs(
this.designerState.template.workflows[actionName]['steps'][step]['target']
)"></i></a>
</div>
</div>
- <div class="carousel__snapper">
- <a href="#carousel__slide4" class="carousel__prev">Parmeters</a>
+ <div class="carousel__snapper" [hidden]="!isNotComponentResourceResolution">
+ <a href="#carousel__slide4" [hidden]="isParametersHidden"
+ class="carousel__prev">Parameters</a>
<a href="#carousel__slide2" class="carousel__next">Attributes</a>
</div>
</li>
<!--Attribute-->
- <li id="carousel__slide2" tabindex="0" class="carousel__slide">
+ <li id="carousel__slide2" tabindex="1" class="carousel__slide">
<b class="listBoxTitle">2. Choose Attribute Name</b>
<div class="tab-content nestedAttributes mt-0 p-0" id="nav-tabContent">
<input type="text" class="form-control input-search-controller"
- placeholder="Attributes">
+ placeholder="Attributes">
<div class="tab-pane fade show active" id="list-home" role="tabpanel"
- aria-labelledby="list-home-list">
+ aria-labelledby="list-home-list">
<div class="scrollWrapper">
<div *ngIf="suggestedAttributes.length>0"
- class="btn-group btn-group-toggle" data-toggle="buttons">
+ class="btn-group btn-group-toggle" data-toggle="buttons">
<label class="btn btn-secondary active"
- *ngFor="let suggestedAttribute of suggestedAttributes"
- (click)="addTempOutputAttr(suggestedAttribute)">
- <input type="radio" name="options" [id]="suggestedAttribute"
- autocomplete="off"
- (click)="addTempOutputAttr(suggestedAttribute)">
+ *ngFor="let suggestedAttribute of suggestedAttributes"
+ [id]="suggestedAttribute"
+ (click)="addTempOutputAttr(suggestedAttribute)">
+ <input type="radio" name="options"
+ [id]="suggestedAttribute+'.,.'"
+ autocomplete="off">
{{suggestedAttribute}}
</label>
</div>
<div *ngIf="suggestedAttributes.length == 0">
<p class="noAttributes">No Attributes Available</p>
- <!--Attribute Details
- <div class="nav-item dropdown helpMenu">
- <input class="dropdown-toggle" type="text">
- <div class="dropdown-text"><i class="icon-info" aria-hidden="true"></i></div>
- <ul class="dropdown-content">
- <li>
- <i class="icon-get_started" aria-hidden="true"></i>
- <p>
- <input id="clicker3" type="checkbox" />
- <label for="clicker">
- Getting Started
- <span>Quick steps to help you get started</span>
- </label>
- </p>
- </li>
- </ul>
- </div>
- -->
</div>
</div>
</div>
</div>
<div class="carousel__snapper"></div>
<a href="#carousel__slide1" class="carousel__prev">Functions</a>
- <a href="#carousel__slide3" class="carousel__next">Artifacts</a>
+ <a href="#carousel__slide3" [hidden]="!isNotComponentResourceResolution"
+ class="carousel__next">Artifacts</a>
+
</li>
<!--Artifact-->
- <li id="carousel__slide3" tabindex="0" class="carousel__slide">
+ <li id="carousel__slide3" [hidden]="isNotComponentResourceResolution" tabindex="2"
+ class="carousel__slide">
<b class="listBoxTitle">3. Choose Artifact Name</b>
<div class="tab-content nestedAttributes mt-0 p-0" id="nav-tabContent">
<input type="text" class="form-control input-search-controller"
- placeholder="Attributes">
+ placeholder="Attributes">
<div class="tab-pane fade show active" id="list-home" role="tabpanel"
- aria-labelledby="list-home-list">
+ aria-labelledby="list-home-list">
<div class="scrollWrapper">
- <div *ngIf="suggestedAttributes.length>0"
- class="btn-group btn-group-toggle" data-toggle="buttons">
+ <div *ngIf="currentArtifacts.length>0"
+ class="btn-group btn-group-toggle" data-toggle="buttons">
<label class="btn btn-secondary active"
- *ngFor="let suggestedAttribute of suggestedAttributes"
- (click)="addTempOutputAttr(suggestedAttribute)">
- <input type="radio" name="options" [id]="suggestedAttribute"
- autocomplete="off"
- (click)="addTempOutputAttr(suggestedAttribute)">
- {{suggestedAttribute}}
+ *ngFor="let suggestedArtifact of currentArtifacts"
+ (click)="addArtifactFile(suggestedArtifact)">
+ <input type="radio" name="options" [id]="suggestedArtifact"
+ autocomplete="off"
+ (click)="addTempOutputAttr(suggestedArtifact)">
+ {{suggestedArtifact}}
</label>
</div>
- <div *ngIf="suggestedAttributes.length == 0">
- <p class="noAttributes">No Attributes Available</p>
+ <div *ngIf="currentArtifacts.length == 0">
+ <p class="noAttributes">No Artifacts Available</p>
</div>
</div>
</div>
</div>
- <div class="carousel__snapper"></div>
- <a href="#carousel__slide2" class="carousel__prev">Attributes</a>
- <a href="#carousel__slide4" class="carousel__next">Parmeters</a>
+ <div class="carousel__snapper" [hidden]="!isNotComponentResourceResolution">
+ <a href="#carousel__slide2" class="carousel__prev">Attributes</a>
+ <a href="#carousel__slide4" [hidden]="isParametersHidden"
+ class="carousel__next">Parmeters</a>
+ </div>
</li>
<!--Parameter-->
- <li id="carousel__slide4" tabindex="0" class="carousel__slide">
+ <li id="carousel__slide4"
+ [hidden]="isParametersHidden" tabindex="3"
+ class="carousel__slide">
<b class="listBoxTitle">4. Choose Parameter Name</b>
<div class="tab-content nestedAttributes mt-0 p-0" id="nav-tabContent">
<input type="text" class="form-control input-search-controller"
- placeholder="Attributes">
+ placeholder="Attributes">
<div class="tab-pane fade show active" id="list-home" role="tabpanel"
- aria-labelledby="list-home-list">
+ aria-labelledby="list-home-list">
<div class="scrollWrapper">
<div *ngIf="suggestedAttributes.length>0"
- class="btn-group btn-group-toggle" data-toggle="buttons">
+ class="btn-group btn-group-toggle" data-toggle="buttons">
<label class="btn btn-secondary active"
- *ngFor="let suggestedAttribute of suggestedAttributes"
- (click)="addTempOutputAttr(suggestedAttribute)">
+ *ngFor="let suggestedAttribute of suggestedAttributes"
+ (click)="addTempOutputAttr(suggestedAttribute)">
<input type="radio" name="options" [id]="suggestedAttribute"
- autocomplete="off"
- (click)="addTempOutputAttr(suggestedAttribute)">
+ autocomplete="off"
+ (click)="addTempOutputAttr(suggestedAttribute)">
{{suggestedAttribute}}
</label>
@@ -390,8 +381,10 @@
</div>
</div>
<div class="carousel__snapper"></div>
- <a href="#carousel__slide3" class="carousel__prev">Artifacts</a>
+ <a href="#carousel__slide3" [hidden]="isNotComponentResourceResolution"
+ class="carousel__prev">Artifacts</a>
<a href="#carousel__slide1" class="carousel__next">Functions</a>
+
</li>
</ol>
<aside class="carousel__navigation">
@@ -402,11 +395,13 @@
<li class="carousel__navigation-item">
<a href="#carousel__slide2" class="carousel__navigation-button">Attributes</a>
</li>
- <li class="carousel__navigation-item">
+ <li class="carousel__navigation-item" [hidden]="isNotComponentResourceResolution">
<a href="#carousel__slide3" class="carousel__navigation-button">Artifacts</a>
</li>
- <li class="carousel__navigation-item">
- <a href="#carousel__slide4" class="carousel__navigation-button">Parameters</a>
+ <li class="carousel__navigation-item"
+ [hidden]="isParametersHidden">
+ <a href="#carousel__slide4"
+ class="carousel__navigation-button">Parameters</a>
</li>
</ol>
</aside>
@@ -424,14 +419,14 @@
<!--Action - Add Attribute From Function - Modal-->
<div class="modal fade" id="exampleModalScrollable3" tabindex="-1" role="dialog"
- aria-labelledby="exampleModalScrollableTitle3" aria-hidden="true">
+ aria-labelledby="exampleModalScrollableTitle3" aria-hidden="true">
<div class="modal-dialog modal-dialog-scrollable" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalScrollableTitle3">
Add Attributes from Function</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
- <img src="assets/img/icon-close.svg" />
+ <img src="assets/img/icon-close.svg"/>
</button>
</div>
<div class="modal-body createAttributeTabs">
@@ -439,17 +434,17 @@
<ul class="nav nav-tabs" id="myTab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="home-tab" data-toggle="tab" href="#input" role="tab"
- aria-controls="home" aria-selected="true">Inputs</a>
+ aria-controls="home" aria-selected="true">Inputs</a>
</li>
<li class="nav-item">
<a class="nav-link" id="profile-tab" data-toggle="tab" href="#output" role="tab"
- aria-controls="profile" aria-selected="false">Outputs</a>
+ aria-controls="profile" aria-selected="false">Outputs</a>
</li>
</ul>
<div class="tab-content border-0 mt-2" id="myTabContent">
<!--INPUTS Tab-->
<div class="tab-pane fade show active create-form" id="input" role="tabpanel"
- aria-labelledby="input-tab">
+ aria-labelledby="input-tab">
<div class="form-group row">
<div class="col">
<input type="email" class="form-control" id="inputEmail3" placeholder="Attributes">
@@ -464,10 +459,10 @@
<b class="listBoxTitle">1. Choose Function Name</b>
<div class="list-group addedFunctionsList" id="list-tab" role="tablist">
<input type="text" class="form-control input-search-controller"
- placeholder="Functions">
+ placeholder="Functions">
<div class="scrollWrapper" *ngFor="let step of steps">
<a class="list-group-item list-group-item-action active" id="list-home-list"
- data-toggle="list" href="#list-home" role="tab" aria-controls="home"><i
+ data-toggle="list" href="#list-home" role="tab" aria-controls="home"><i
class="icon-resource_resolution mr-1" aria-hidden="true"></i>
{{step}} <i class="icon-next_arrow" aria-hidden="true" (click)="setInputAndOutputs(
this.designerState.template.workflows[actionName]['steps'][step]['target']
@@ -479,17 +474,17 @@
<b class="listBoxTitle">2. Choose Input Attribute Name</b>
<div class="tab-content nestedAttributes mt-0 p-0" id="nav-tabContent">
<input type="text" class="form-control input-search-controller"
- placeholder="Attributes">
+ placeholder="Attributes">
<div class="tab-pane fade show active" id="list-home" role="tabpanel"
- aria-labelledby="list-home-list">
+ aria-labelledby="list-home-list">
<div class="scrollWrapper">
<div *ngIf="suggestedInputs.length>0" class="btn-group btn-group-toggle"
- data-toggle="buttons">
+ data-toggle="buttons">
<label class="btn btn-secondary active"
- *ngFor="let suggestedInput of suggestedInputs"
- (click)="addTempInput(suggestedInput)">
+ *ngFor="let suggestedInput of suggestedInputs"
+ (click)="addTempInput(suggestedInput)">
<input type="radio" name="options" [id]="suggestedInput"
- autocomplete="off" (click)="addTempInput(suggestedInput)">
+ autocomplete="off" (click)="addTempInput(suggestedInput)">
{{suggestedInput}}
</label>
</div>
@@ -518,10 +513,10 @@
<b class="listBoxTitle">1. Choose Function Name</b>
<div class="list-group addedFunctionsList" id="list-tab" role="tablist">
<input type="text" class="form-control input-search-controller"
- placeholder="Functions">
+ placeholder="Functions">
<div class="scrollWrapper" *ngFor="let step of steps">
<a class="list-group-item list-group-item-action active" id="list-home-list"
- data-toggle="list" href="#list-home" role="tab" aria-controls="home"><i
+ data-toggle="list" href="#list-home" role="tab" aria-controls="home"><i
class="icon-resource_resolution mr-1" aria-hidden="true"></i>
{{step}} <i class="icon-next_arrow" aria-hidden="true" (click)="setInputAndOutputs(
this.designerState.template.workflows[actionName]['steps'][step]['target']
@@ -533,16 +528,17 @@
<b class="listBoxTitle">2. Choose output Attribute Name</b>
<div class="tab-content nestedAttributes mt-0 p-0" id="nav-tabContent">
<input type="text" class="form-control input-search-controller"
- placeholder="Attributes">
+ placeholder="Attributes">
<div class="tab-pane fade show active" id="list-home" role="tabpanel"
- aria-labelledby="list-home-list">
+ aria-labelledby="list-home-list">
<div class="scrollWrapper">
<div *ngIf="suggestedOutputs.length > 0" class="btn-group btn-group-toggle"
- data-toggle="buttons">
+ data-toggle="buttons">
<label class="btn btn-secondary active"
- *ngFor="let suggestedOutput of suggestedOutputs">
+ *ngFor="let suggestedOutput of suggestedOutputs">
<input type="radio" name="options" [id]="suggestedOutput"
- autocomplete="off" (dblclick)="addTempOutput(suggestedOutput)">
+ autocomplete="off"
+ (dblclick)="addTempOutput(suggestedOutput)">
{{suggestedOutput}}
</label>
@@ -561,7 +557,8 @@
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary" (click)="submitTempAttributes()">Submit
- Attributes</button>
+ Attributes
+ </button>
</div>
</div>
</div>
@@ -569,14 +566,14 @@
<!--Delete Action - Modal-->
<div class="modal fade" id="exampleModalScrollable1" tabindex="-1" role="dialog"
- aria-labelledby="exampleModalScrollableTitle1" aria-hidden="true">
+ aria-labelledby="exampleModalScrollableTitle1" aria-hidden="true">
<div class="modal-dialog modal-dialog-scrollable" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalScrollableTitle1">
Delete Action</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
- <img src="assets/img/icon-close.svg" />
+ <img src="assets/img/icon-close.svg"/>
</button>
</div>
<div class="modal-body">
@@ -591,14 +588,14 @@
</div>
<!--Action - Edit Custom Attribute - Modal-->
<div class="modal fade" id="exampleModalScrollable2" tabindex="-1" role="dialog"
- aria-labelledby="exampleModalScrollableTitle2" aria-hidden="true">
+ aria-labelledby="exampleModalScrollableTitle2" aria-hidden="true">
<div class="modal-dialog modal-dialog-scrollable" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalScrollableTitle2">
Edit Custom Attributes</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
- <img src="assets/img/icon-close.svg" />
+ <img src="assets/img/icon-close.svg"/>
</button>
</div>
<div class="modal-body createAttributeTabs">
@@ -607,15 +604,15 @@
<label for="inputEmail3" class="col-sm-3 col-form-label">Name <span>*</span></label>
<div class="col-sm-9">
<input type="email" class="form-control" id="inputEmail3" placeholder="Attribute name"
- value="resource-assignment-properties">
+ value="resource-assignment-properties">
</div>
</div>
<div class="form-group row">
<label for="inputPassword3" class="col-sm-3 col-form-label">Description</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="inputPassword3"
- placeholder="Add some description"
- value="Dynamic PropertyDefinition for workflow(resource-assignment).">
+ placeholder="Add some description"
+ value="Dynamic PropertyDefinition for workflow(resource-assignment).">
</div>
</div>
<div class="form-group row">
@@ -631,7 +628,7 @@
</button>
</div>
<input type="text" class="form-control mt-2 mb-2" id="inputPassword3"
- placeholder="Add Other type name" value="dt-resource-assignment-properties">
+ placeholder="Add Other type name" value="dt-resource-assignment-properties">
</div>
</div>
<div class="form-group row">
@@ -639,12 +636,12 @@
<div class="col-sm-9">
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" id="customRadioInline1" name="customRadioInline1"
- class="custom-control-input" checked>
+ class="custom-control-input" checked>
<label class="custom-control-label" for="customRadioInline1">True</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" id="customRadioInline2" name="customRadioInline1"
- class="custom-control-input">
+ class="custom-control-input">
<label class="custom-control-label" for="customRadioInline2">False</label>
</div>
</div>
@@ -657,4 +654,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/designer/action-attributes/action-attributes.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts
index 9f96e2ccf..babfec772 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts
@@ -41,12 +41,17 @@ export class ActionAttributesComponent implements OnInit {
suggestedAttributes: string[] = [];
selectedFunctionName = '';
selectedAttributeName = '';
+ isNotComponentResourceResolution = true;
+ currentArtifacts: string[] = [];
+ isParametersHidden = true;
constructor(private designerStore: DesignerStore, private functionsStore: FunctionsStore) {
}
ngOnInit() {
+ console.log('is paramters hidden' + this.isParametersHidden);
+ console.log('is artifacts hidden' + this.isNotComponentResourceResolution);
this.designerStore.state$.subscribe(designerState => {
this.designerState = designerState;
if (this.designerState && this.designerState.actionName) {
@@ -323,9 +328,17 @@ export class ActionAttributesComponent implements OnInit {
private getNodeTemplate = (value: string) => this.designerState.template.node_templates[value];
+
getAttributesAndOutputs(functionName: string) {
this.suggestedAttributes = [];
console.log(functionName);
+ if (functionName.includes('component-resource-resolution')) {
+ this.isNotComponentResourceResolution = false;
+ this.isParametersHidden = true;
+ } else {
+ this.isNotComponentResourceResolution = true;
+ this.isParametersHidden = true;
+ }
const nodeTemplate = this.designerState.template.node_templates[functionName];
console.log(this.designerState.template.node_templates);
console.log(nodeTemplate);
@@ -338,15 +351,33 @@ export class ActionAttributesComponent implements OnInit {
if (currentFunction.definition['attributes']) {
Object.keys(currentFunction.definition['attributes']).forEach(attribute => {
this.suggestedAttributes.push(attribute);
+ this.suggestedAttributes.push('assignment-map');
});
}
console.log(this.suggestedAttributes);
+
this.selectedFunctionName = functionName;
+
+
});
}
addTempOutputAttr(suggestedOutputAndAttribute: string) {
+ console.log('ssss');
this.selectedAttributeName = suggestedOutputAndAttribute;
+ this.currentArtifacts = [];
+ const nodeTemplate = this.designerState.template.node_templates[this.selectedFunctionName];
+ if (nodeTemplate['artifacts']
+ ) {
+ Object.keys(nodeTemplate['artifacts']).forEach(key => {
+ const mappingName = key.split('-')[0];
+ if (!this.currentArtifacts.includes(mappingName)) {
+ this.currentArtifacts.push(mappingName);
+ }
+ });
+ }
+ console.log('happend');
+
}
@@ -361,4 +392,10 @@ export class ActionAttributesComponent implements OnInit {
' },';
}
+
+ addArtifactFile(suggestedArtifact: string) {
+ console.log(suggestedArtifact);
+ this.isParametersHidden = !this.selectedAttributeName.includes('assignment-map');
+ console.log('assignement map ' + this.isParametersHidden);
+ }
}