aboutsummaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.html
blob: 18ce515b5fec874f46bd3d54ad320188721bd976 (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
<!--Header-->
<ngx-ui-loader></ngx-ui-loader>
<header>
    <div class="row m-0">
        <div class="col pl-0">
            <p class="logo mb-0"></p>
            <nav aria-label="breadcrumb">
                <ol class="breadcrumb designer-breadcrumb mb-0">
                    <li class="breadcrumb-item">
                        <a href="#">CBA Packages</a>
                    </li>
                    <i class="fa fa-angle-right ml-2 mr-2"></i>
                    <li class="breadcrumb-item">
                        <a routerLink="/packages/package/{{packageId}}">{{viewedPackage.artifactName}}</a>
                        <button type="button" class="btn package-info-btn tooltip-bottom" data-toggle="modal"
                            data-target="#exampleModalLong" data-tooltip="Package Details">
                            <i class="icon-info" aria-hidden="true"></i>
                        </button>
                    </li>
                    <i class="fa fa-angle-right ml-2 mr-2"></i>
                    <li class="breadcrumb-item active" aria-current="page">
                        <p class="mb-0">Designer Mode</p>
                    </li>
                </ol>
                <div class="modal fade" id="exampleModalLong" tabindex="-1" role="dialog"
                    aria-labelledby="exampleModalLongTitle" aria-hidden="true">
                    <div class="modal-dialog" role="document">
                        <div class="modal-content">
                            <div class="modal-header">
                                <h5 class="modal-title" id="exampleModalLongTitle">Package Details</h5>
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                    <img src="assets/img/icon-close.svg" />
                                </button>
                            </div>
                            <div class="modal-body package-info">
                                <div class="row">
                                    <div class="col">
                                        <h3>Test Package
                                            <span class="package-version">Version 1.0.2</span></h3>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col mb-3">
                                        <span class="badge badge-primary">test</span>
                                        <span class="badge badge-primary">vDNS-CDS</span>
                                        <span class="badge badge-primary">SCALE-OUT</span>
                                        <span class="badge badge-primary">MARCO</span>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-2 pr-0">
                                        <img src="/assets/img/img-user3.jpg" class="creator-pic">
                                    </div>
                                    <div class="col-10 pl-0">
                                        <p><b>Author information:</b></p>
                                        <p>Abdelmuhaimen Seaudi</p>
                                        <p>abdelmuhaimen.seaudi@orange.com</p>
                                    </div>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                            </div>
                        </div>
                    </div>
                </div>
            </nav>
        </div>
        <div class="col pr-0 text-right">
            <ul class="topology-actions">
                <li>
                    <div class="btn-group" role="group" aria-label="Basic example">
                        <a href="#" role="button" aria-pressed="true" class="btn-topology-action float tooltip-bottom"
                            data-tooltip="Preview">
                            <i class="fa fa-eye"></i>
                        </a>
                        <a href="#" role="button" aria-pressed="true" class="btn-topology-action float tooltip-bottom"
                            data-tooltip="Download">
                            <i class="fa fa-download"></i>
                        </a>
                        <a href="#" role="button" aria-pressed="true" class="btn-topology-action float tooltip-bottom"
                            data-tooltip="Share">
                            <i class="fa fa-share-square"></i>
                        </a>
                    </div>
                </li>
                <li>
                    <div class="dropdown">
                        <input class="dropdown-toggle" type="text">
                        <div class="dropdown-text">Save</div>
                        <ul class="dropdown-content save-blueprint">
                            <li>
                                <a (click)="saveBluePrint()"><i class="icon-save-sm" aria-hidden="true"></i> Save</a>
                            </li>
                            <!-- <li>
                                <a (click)="enrichBluePrint()"><i class="icon-enrich" aria-hidden="true"></i> Enrich</a>
                            </li> -->
                            <li>
                                <a (click)="enrichBluePrint()"><i class="fa fa-play-circle" aria-hidden="true"></i>
                                    Enrich & Deploy</a>
                            </li>
                        </ul>
                    </div>
                </li>
            </ul>


        </div>
    </div>
</header>
<!--Editor Bar-->
<nav class="editNavbar row source-button {{cl}} navbar navbar-expand-lg">
    <!--Actions/Functions Side Menu Toogole Button-->
    <button (click)="_toggleSidebar1()" class="toggoleBtn active btn tooltip-bottom" title="" aria-pressed="true"
        data-tooltip="Collapse Side bar">
        <i class="fa arr-size">&#xf100;</i>
    </button>
    <!--Nav Tabs-->
    <div class="collapse navbar-collapse ">
        <!--Action Tabs-->
        <ul class="navbar-nav">
            <li class="nav-item active">
                <nav class="row">
                    <div class="col-12">
                        <div class="nav nav-tabs " id="nav-tab" role="tablist">
                            <a class="nav-item nav-link active col-6" id=" " data-toggle="tab" href="" role="tab"
                                aria-controls=" " aria-selected="false" autofocus #nameit>Workflow</a>
                            <a class="nav-item nav-link col-6" id=" " data-toggle="tab" href="" role="tab"
                                aria-controls=" " aria-selected="false" style="visibility: hidden;">Template</a>
                        </div>
                    </div>
                </nav>
            </li>
        </ul>
        <!--Requirement/Capability Legend-->
        <ul class="templateLegend ml-auto mr-auto p-0" style="visibility: hidden;">
            <li class="requirement"><i class="icon-rectangle" aria-hidden="true"></i> Requirement</li>
            <li class="capability"><i class="icon-rectangle" aria-hidden="true"></i> Capability</li>
        </ul>
        <!--Undo/Redo Buttons-->
        <ul class="editor navbar">
            <li>
                <button type="button" class="btn tooltip-bottom" data-tooltip="Undo">
                    <img src="/assets/img/icon-undoActive.svg">
                </button>
            </li>
            <li>
                <button type="button" class="btn tooltip-bottom" data-tooltip="Redo">
                    <img src="/assets/img/icon-redo.svg">
                </button>
            </li>
            <li class="vertical_line"></li>
            <li>
                <button type="button" class="btn tooltip-bottom" data-tooltip="Zoom Out">
                    <img src="/assets/img/icon-zoomOut.svg">
                </button>
            </li>
            <li class="zoom-percent">100%</li>
            <li>
                <button type="button" class="btn tooltip-bottom" data-tooltip="Zoom In">
                    <img src="/assets/img/icon-zoomIn.svg"></button>
            </li>
        </ul>
        <!--Designer/Scripting View Tabs-->
        <ul class="navbar ml-2" style="list-style: none">
            <li class="nav-item">
                <div class="btn-group viewBtns" role="group">
                    <button type="button" class="btn btn-secondary topologySource active">Designer</button>
                    <button [routerLink]="['/designer/source', packageId]" type="button"
                        class="btn btn-secondary topologyView">Scripting
                    </button>
                </div>
            </li>
        </ul>
    </div>
</nav>

<ng-sidebar-container class="sidebar-container">
    <!--Left Side Menu-->
    <ng-sidebar [(opened)]="controllerSideBar" [sidebarClass]="'demo-sidebar controllerSidebar container-fluid'"
        [mode]="'push'" #sidebarLeft>
        <nav class="row">
            <!--Nav Tabs-->
            <div class="col">
                <div class="nav nav-tabs " id="nav-tab" role="tablist">
                    <a class="nav-item nav-link active col-6" id="nav-action-tab" data-toggle="tab" href="#nav-action"
                        role="tab" aria-controls="nav-action" aria-selected="false" autofocus #nameit>Actions</a>
                    <a class="nav-item nav-link col-6" id="nav-function-tab" data-toggle="tab" href="#nav-function"
                        role="tab" aria-controls="nav-function" aria-selected="false">Functions</a>
                </div>
            </div>
        </nav>
        <div class="row">
            <div class="col">
                <div class="tab-content" id="nav-tabContent">
                    <!--Action List-->
                    <div class="tab-pane fade show active" id="nav-action" role="tabpanel"
                        aria-labelledby="nav-action-tab">
                        <!--Action Search Box-->
                        <input type="text" class="form-control input-search-controller" placeholder="Search Actions">

                        <div class="row temp-buttons">
                            <div class="col text-center">
                                <!-- <button (click)="sidebarRight1.open()" type="button" class="btn btn-primary">
                                     Action Attributes
                                 </button> -->
                            </div>
                            <!-- <div class="col text-center">
                                <button (click)="sidebarRight2.open()" type="button" class="btn btn-secondary">
                                    Function Attributes
                                </button>
                            </div> -->
                        </div>
                        <button (click)="insertCustomActionIntoBoard()" type="button" class="btn new-action">
                            + &nbsp;&nbsp;New Action
                        </button>
                        <div class="actionsList">
                            <div *ngIf="showAction" class="custom-control">
                                <label><i class="icon-file" aria-hidden="true"></i>
                                    {{customActionName}} </label>
                            </div>
                            <div *ngIf="!showAction" class="custom-control">
                                <ul>
                                    <li *ngFor="let customActionName of actions">
                                        <label (click)="openActionAttributes(customActionName)"
                                            [attr.for]="customActionName">
                                            <i class="icon-file" aria-hidden="true" class="icon-file"></i>
                                            {{customActionName}} </label>

                                        <ul *ngIf="customActionName.includes(this.currentActionName)"
                                            class="actionSubList">
                                            <li (click)="openFunctionAttributes(currentFunction)"
                                                [attr.for]="customActionName" *ngFor="let currentFunction of steps">
                                                <span>{{getTarget(currentFunction)}}</span>
                                            </li>
                                        </ul>
                                    </li>

                                </ul>
                            </div>
                        </div>
                    </div>
                    <!--Function List-->
                    <div class="tab-pane fade" id="nav-function" role="tabpanel" aria-labelledby="nav-function-tab">
                        <!--Function Search Box-->
                        <input type="text" class="form-control input-search-controller" placeholder="Search Functions">
                        <div class="functionsList">
                            <div id="palette-paper"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="helpBox"><i class="icon-info" aria-hidden="true"></i>
            <a href="https://wiki.onap.org/display/DW/CDS+Designer+Guide" target="_blank">Help - Learn The Basics</a>
        </div>
    </ng-sidebar>
    <!--Page content-->
    <div ng-sidebar-content id="board-paper">
        <button class="rotate" (click)="_toggleSidebar1()">
            <span>
                Controller
                <i class="fa fa-angle-double-left"></i>
            </span>
        </button>


        <!-- CANVAS -->
        <!--Editor Bar-->
        <div class="editBar text-center">
            <div class="btn-group mr-2" role="group" aria-label="First group">
                <button type="button" class="btn btn-secondary tooltip-bottom" data-tooltip="Undo">
                    <img src="/assets/img/icon-undoActive.svg">
                </button>
                <button type="button" class="btn btn-secondary tooltip-bottom" data-tooltip="Redo">
                    <img src="/assets/img/icon-redo.svg">
                </button>
            </div>
            <div class="btn-group mr-2" role="group" aria-label="Second group">
                <button type="button" class="btn btn-secondary tooltip-bottom" data-tooltip="Zoom Out">
                    <img src="/assets/img/icon-zoomOut.svg">
                </button>
                <button type="button" class="btn btn-secondary pl-0 pr-0">100%</button>
                <button type="button" class="btn btn-secondary tooltip-bottom" data-tooltip="Zoom In">
                    <img src="/assets/img/icon-zoomIn.svg">
                </button>
            </div>
            <div class="btn-group viewBtns" role="group" aria-label="Third group">
                <button type="button" class="btn btn-secondary topologySource active">View</button>
                <button type="button" class="btn btn-secondary topologyView">Source</button>
            </div>
        </div>
        <!--<button (click)="_toggleSidebar2()" style="float:right;">Toggle sidebar right</button> -->
    </div>
    <ng-sidebar [(opened)]="actionAttributesSideBar" [sidebarClass]="'demo-sidebar attributesSideBar '" [mode]="'push'"
        [position]="'right'" #sidebarRight1>
        <div class="container-fluid0">
            <div class="row m-0">
                <div class="col attributesContainer">
                    <div class="row m-0 attributesContainertTitle">
                        <div class="col-2 pl-0">
                            <button (click)="sidebarRight1.close()" class="closeBar" tooltip="Close" placement="bottom">
                                <i class="icon-close" type="button" aria-hidden="true"></i></button>
                        </div>
                        <h6 class="col pl-0">Action Attributes</h6>
                        <div class="col-3 pl-0">
                            <div class="btn-group" role="group" aria-label="Basic example">
                                <button type="button" class="btn view-source" tooltip="View Action Source"
                                    placement="bottom"><i class="icon-source"></i></button>
                                <button type="button" data-toggle="modal" data-target="#exampleModalScrollable1"
                                    class="btn trash-item" tooltip="Delete Action" placement="bottom"><i
                                        class="icon-delete-sm" aria-hidden="true"></i></button>
                            </div>
                        </div>
                    </div>
                    <app-action-attributes></app-action-attributes>
                </div>
            </div>
        </div>
    </ng-sidebar>
    <!--Right Side Menu - Function Attribute-->
    <ng-sidebar [(opened)]="functionAttributeSidebar" [sidebarClass]="'demo-sidebar attributesSideBar'" [mode]="'push'"
        [position]="'right'" #sidebarRight2>
        <div class="container-fluid0">
            <div class="row m-0">
                <div class="col attributesContainer">
                    <div class="row m-0 attributesContainertTitle">
                        <div class="col-2 pl-0">
                            <button (click)="sidebarRight2.close()" class="closeBar" tooltip="Close"
                                placement="bottom"><i class="icon-close" type="button" aria-hidden="true"></i>
                            </button>
                        </div>
                        <h6 class="col pl-0">Function Attributes</h6>
                        <div class="col-3 pl-0">
                            <div class="btn-group" role="group" aria-label="Basic example">
                                <button type="button" class="btn view-source" tooltip="View Function Source"
                                    placement="bottom"><i class="icon-source"></i></button>
                                <button type="button" class="btn trash-item" tooltip="Delete Function"
                                    placement="bottom"><i class="icon-delete-sm" type="button"
                                        aria-hidden="true"></i></button>
                            </div>
                        </div>
                    </div>
                    <app-functions-attribute (saveEvent)="saveBluePrint()"></app-functions-attribute>
                </div>
            </div>
        </div>
    </ng-sidebar>


</ng-sidebar-container>