summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.html
blob: 6fe6825ecb7d5df8401cf4d5ad62d617e08e85e3 (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

@media only all and (prefers-color-scheme: dark) {
.highlight .hll { background-color: #49483e }
.highlight .c { color: #75715e } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #66d9ef } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #f92672 } /* Operator */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight .ch { color: #75715e } /* Comment.Hashbang */
.highlight .cm { color: #75715e } /* Comment.Multiline */
.highlight .cp { color: #75715e } /* Comment.Preproc */
.highlight .cpf { color: #75715e } /* Comment.PreprocFile */
.highlight .c1 { color: #75715e } /* Comment.Single */
.highlight .cs { color: #75715e } /* Comment.Special */
.highlight .gd { color: #f92672 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gi { color: #a6e22e } /* Generic.Inserted */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #75715e } /* Generic.Subheading */
.highlight .kc { color: #66d9ef } /* Keyword.Constant */
.highlight .kd { color: #66d9ef } /* Keyword.Declaration */
.highlight .kn { color: #f92672 } /* Keyword.Namespace */
.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
.highlight .kr { color: #66d9ef } /* Keyword.Reserved */
.highlight .kt { color: #66d9ef } /* Keyword.Type */
.highlight .ld { color: #e6db74 } /* Literal.Date */
.highlight .m { color: #ae81ff } /* Literal.Number */
.highlight .s { color: #e6db74 } /* Literal.String */
.highlight .na { color: #a6e22e } /* Name.Attribute */
.highlight .nb { color: #f8f8f2 } /* Name.Builtin */
.highlight .nc { color: #a6e22e } /* Name.Class */
.highlight .no { color: #66d9ef } /* Name.Constant */
.highlight .nd { color: #a6e22e } /* Name.Decorator */
.highlight .ni { color: #f8f8f2 } /* Name.Entity */
.highlight .ne { color: #a6e22e } /* Name.Exception */
.highlight .nf { color: #a6e22e } /* Name.Function */
.highlight .nl { color: #f8f8f2 } /* Name.Label */
.highlight .nn { color: #f8f8f2 } /* Name.Namespace */
.highlight .nx { color: #a6e22e } /* Name.Other */
.highlight .py { color: #f8f8f2 } /* Name.Property */
.highlight .nt { color: #f92672 } /* Name.Tag */
.highlight .nv { color: #f8f8f2 } /* Name.Variable */
.highlight .ow { color: #f92672 } /* Operator.Word */
.highlight .w { color: #f8f8f2 } /* Text.Whitespace */
.highlight .mb { color: #ae81ff } /* Literal.Number.Bin */
.highlight .mf { color: #ae81ff } /* Literal.Number.Float */
.highlight .mh { color: #ae81ff } /* Literal.Number.Hex */
.highlight .mi { color: #ae81ff } /* Literal.Number.Integer */
.highlight .mo { color: #ae81ff } /* Literal.Number.Oct */
.highlight .sa { color: #e6db74 } /* Literal.String.Affix */
.highlight .sb { color: #e6db74 } /* Literal.String.Backtick */
.highlight .sc { color: #e6db74 } /* Literal.String.Char */
.highlight .dl { color: #e6db74 } /* Literal.String.Delimiter */
.highlight .sd { color: #e6db74 } /* Literal.String.Doc */
.highlight .s2 { color: #e6db74 } /* Literal.String.Double */
.highlight .se { color: #ae81ff } /* Literal.String.Escape */
.highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */
.highlight .si { color: #e6db74 } /* Literal.String.Interpol */
.highlight .sx { color: #e6db74 } /* Literal.String.Other */
.highlight .sr { color: #e6db74 } /* Literal.String.Regex */
.highlight .s1 { color: #e6db74 } /* Literal.String.Single */
.highlight .ss { color: #e6db74 } /* Literal.String.Symbol */
.highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #a6e22e } /* Name.Function.Magic */
.highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */
.highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */
.highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */
.highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */
.highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */
}
@media (prefers-color-scheme: light) {
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp 
<!--
    Copyright (C) 2019 CMCC, Inc. and others. All rights reserved.

    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.
-->
<!--<h3 class="title"> Services List </h3>-->
<!--<hr>-->
<div class="model creation-model">
    
    <div class="top-title">
        <h3 class="title fl">{{createParams.commonParams.templateType}}  {{"i18nTextDefine_InstanceCreation" | translate}} </h3>
        <div class="fl" style="width: 20%">
            <button class="submit" nz-button (click)="submit()"><span> {{"i18nTextDefine_Create" | translate}} </span>
            </button>
            <button class="back" nz-button (click)="goback()">
               <i class="anticon anticon-arrow-left" style="transform: scale(1.5)"></i>
            </button>
        </div>
    </div>
    <!-- chart -->
    <div class="chart">
       <span style="padding: 25px;display: inline-block;">
            {{"i18nTextDefine_InstanceTopology" | translate}}
       </span>
        <div id="createChart">
            <svg width="100%" height="100%">
                <image id="domain" xlink:href="../../assets/images/domain1.png" style="width: 15%"
                       x="40%" y="0"/>
            </svg>
        </div>
    </div>
    <div class="creation">
        <nz-tabset [nzTabPosition]="'top'" [nzShowPagination]=false [nzTabBarGutter]="'2'" [nzTabBarStyle]=tabBarStyle>
            <nz-tab nzTitle="Service Info">
                <div class="service-title" style="clear: both">
                    <span style="color: red;">*</span><span class="lable" style="width: 60px">name:</span>
                    <input nz-input [(ngModel)]="this.templateParameters.service['name']" required="required">
                    <span style="color: red;">*</span><span class="lable">description:</span>
                    <input nz-input [(ngModel)]="this.templateParameters.service['description']">
                </div>
            </nz-tab>
            <nz-tab nzTitle="Sdwanvpnresource List">
                <div class="sotnvpn clearfix">
                    <div style="clear: both;height: 10px">
                        <h3 style="float: left;color: #3C4F8C">sdwanVPN List</h3>
                        <button nz-button (click)="addSotnvpn()" class="addListBtn"
                                style="float: right;margin-right: 10px"><i class="anticon anticon-plus"
                                                                           style="transform: scale(1.2);font-weight: 700"></i> {{"i18nTextDefine_Add" | translate}}
                        </button>
                    </div>
                    <nz-table #sotnVpnTable [nzData]="sotnVpnTableData"
                              [nzShowPagination]="false"
                              nzSize="small">
                        <thead>
                        <tr>
                            <th width="30%"> NO.</th>
                            <th width="30%"> Name</th>
                            <th width="30%"> topology</th>
                            <th width="10%"> Action</th>
                        </tr>
                        </thead>
                        <tbody>
                        <!-- <ng-template ngFor let-data [ngForOf]="siteTable.data" let-i="index"> -->
                        <tr *ngFor="let item of sotnVpnTable.data; let i = index; ">
                            <td>{{i+1}}</td>
                            <td>{{item.sdwanvpn_name}}</td>
                            <td>{{item.sdwanvpn_topology}}</td>
                            <td>
                                <span class="action" (click)="editSotnVpn(i+1)"><i class="anticon anticon-edit"></i></span>
                                &nbsp;
                                <span class="action" (click)="deleteSotnVpn(i+1)"><i
                                        class="anticon anticon-delete"></i></span>
                            </td>
                        </tr>
                        <!-- </ng-template> -->
                        </tbody>
                    </nz-table>
                </div>
            </nz-tab>
            <nz-tab nzTitle="Sdwansiteresource List">
                <div class="site">
                    <div style="height: 10px">
                        <h3 style="float: left;color: #3C4F8C">Site List</h3>
                        <button nz-button (click)="addSite()" class="addListBtn"
                                style="float: right;margin-right: 10px"><i class="anticon anticon-plus"
                                                                           style="transform: scale(1.2);font-weight: 700"></i>{{"i18nTextDefine_Add" | translate}}
                        </button>
                    </div>
                    <nz-table #siteTable [nzData]="siteTableData"
                              [nzShowPagination]="false"
                              nzSize="small">
                        <thead>
                        <tr>
                            <th nzWidth="10%"> NO.</th>
                            <th nzWidth="15%"> Name</th>
                            <th nzWidth="15%"> Description</th>
                            <th nzWidth="15%"> Post Code</th>
                            <th nzWidth="15%"> Address</th>
                            <th nzWidth="15%"> emails</th>
                            <th nzWidth="15%"> Action</th>
                        </tr>
                        </thead>
                        <tbody>
                        <!-- <ng-template ngFor let-data [ngForOf]="siteTable.data" let-i="index"> -->
                        <tr *ngFor="let item of siteTable.data; let i = index; ">
                            <td>{{i+1}}</td>
                            <td>{{item.sdwandevice_list[0].name}}</td>
                            <td>{{item.sdwansite_description}}</td>
                            <td>{{item.sdwansite_postcode}}</td>
                            <td>{{item.sdwansite_address}}</td>
                            <td>{{item.sdwansite_emails}}</td>
                            <td>
                                <span class="action" (click)="editSite(i+1)"><i class="anticon anticon-edit"></i></span>
                                &nbsp;
                                <span class="action" (click)="deleteSite(i+1)"><i
                                        class="anticon anticon-delete"></i></span>
                            </td>
                        </tr>
                        <!-- </ng-template> -->
                        </tbody>
                    </nz-table>
                </div>
            </nz-tab>
        </nz-tabset>
    </div>
    <!-- sotnVpnmodel -->
    <div class="sotnnpnmodel" *ngIf="sotnVpnModelShow">
        <h3> {{"i18nTextDefine_Base" | translate}} </h3>
        <div class="inputs">
            <ul>
                <li *ngFor="let item of this.templateParameters.sotnvpn.sdwanvpnresource_list">
                    <span *ngIf="item.required" style="color: red;margin: 0;margin-right: -5px;">*</span><span>{{item.lableShow}}:</span>
                    <input nz-input [(ngModel)]="sotnInfo[item.lable]" title="{{item.description ? item.description:null }}"
                           required="{{item.required==true ? 'required':null}}"></li>
            </ul>
        </div>
        <div>
            <h3>Sdwansitelan List</h3>
            <div>
                <div style="width: 100%;text-align: right">
                    <button nz-button (click)="addSotnSdwansitelan()" class="addListBtn"><i class="anticon anticon-plus"
                                                                                   style="transform: scale(1.2);font-weight: 700;"></i>{{"i18nTextDefine_Add" | translate}}
                    </button>
                </div>
                <table class="siteWanTab">
                    <thead>
                    <tr>
                        <th width="4%"> NO.</th>
                        <th *ngFor="let key of getKeys(this.sotnSdwansitelanParams)">{{key}}</th>
                        <th width="7%"> Action</th>
                    </tr>
                    </thead>
                    <tbody>
                    <!-- <ng-template ngFor let-data [ngForOf]="siteModalTable.data" let-i="index"> -->
                    <tr *ngFor="let item of sotnSdwansitelanData; let i = index;"
                        [ngClass]="{'tr-border':item.tabInputShowSdwansitelan ==false}">
                        <td>{{i+1}}</td>
                        <td *ngFor="let key of getKeys(item);let a = index;">
                            <span *ngIf="!tabInputShowSdwansitelan[i]"
                                  title="{{this.templateParameters.sotnvpn.sdwansitelan_list[a]['lable']==getKeys(item)[a] ? this.templateParameters.site.sdwansitewan_list[a].description:null}}">{{item[key]}}</span>
                            <input nz-input [(ngModel)]="item[key]" *ngIf="tabInputShowSdwansitelan[i] "
                                   title="{{this.templateParameters.sotnvpn.sdwansitelan_list[a]['lable']==getKeys(item)[a] ? this.templateParameters.site.sdwansitewan_list[a].description:null}}"
                                   required="{{item.required==true ? 'required':null}}">
                        </td>
                        <td>
                            <span class="action" (click)="editSotnSdwansitelan(i+1,item,sotnSdwansitelanData)"><i
                                    class="anticon anticon-edit" style="margin: 0 5px;"></i></span>
                            <span class="action" (click)="deleteSotnSdwansitelan(i+1,item,sotnSdwansitelanData)"><i
                                    class="anticon anticon-delete"></i></span>
                        </td>
                    </tr>
                    <!-- </ng-template> -->
                    </tbody>
                </table>
            </div>
        </div>

        <div class="action">
            <button nz-button nzType="primary" (click)="addSotnVpn_cancel()">{{"i18nTextDefine_Cancel" | translate}}</button>
            <button nz-button nzType="primary" (click)="addSotnVpn_OK()">{{"i18nTextDefine_Add" | translate}}</button>
        </div>
    </div>
    <!-- sitemodel -->
    <div class="sitemodel" *ngIf="siteModelShow">
        <h3> {{"i18nTextDefine_Base" | translate}} </h3>
        <div class="inputs">
            <ul>
                <li *ngFor="let item of this.templateParameters.site.sdwansiteresource_list">
                    <span *ngIf="item.required" style="color: red;margin: 0;margin-right: -5px;">*</span><span>{{item.lableShow}}:</span>
                    <input nz-input [(ngModel)]="siteBaseData[item.lable]" title="{{item.description}}"
                           required="{{item.required==true ? 'required':null}}"></li>
            </ul>
        </div>
        <div>
            <h3>Sdwandevice</h3>
            <div class="inputs">
                <ul>
                    <li *ngFor="let item of this.templateParameters.site.sdwandevice_list">
                        <span *ngIf="item.required" style="color: red;margin: 0;margin-right: -5px;">*</span><span>{{item.lable}}:</span>
                        <input nz-input [(ngModel)]="siteCpeData[item.lable]" title="{{item.description}}"
                               required="{{item.required==true ? 'required':null}}"></li>
                </ul>
            </div>
            <h3>Sdwansitewan List</h3>
            <div>
                <div style="width: 100%;text-align: right">
                    <button nz-button (click)="addSiteWan()" class="addListBtn"><i class="anticon anticon-plus"
                                                                                   style="transform: scale(1.2);font-weight: 700;"></i>{{"i18nTextDefine_Add" | translate}}
                    </button>
                </div>
                <table class="siteWanTab">
                    <thead>
                    <tr>
                        <th width="4%"> NO.</th>
                        <th *ngFor="let key of getKeys(this.siteWanParams)">{{key}}</th>
                        <th width="7%"> Action</th>
                    </tr>
                    </thead>
                    <tbody>
                    <!-- <ng-template ngFor let-data [ngForOf]="siteModalTable.data" let-i="index"> -->
                    <tr *ngFor="let item of siteWanData; let i = index;"
                        [ngClass]="{'tr-border':item.tabInputShowWanPort ==false}">
                        <td>{{i+1}}</td>
                        <td *ngFor="let key of getKeys(item);let a = index;">
                            <span *ngIf="!tabInputShowWanPort[i]"
                                  title="{{this.templateParameters.site.sdwansitewan_list[a]['lable']==getKeys(item)[a] ? this.templateParameters.site.sdwansitewan_list[a].description:null}}">{{item[key]}}</span>
                            <input nz-input [(ngModel)]="item[key]" *ngIf="tabInputShowWanPort[i] "
                                   title="{{this.templateParameters.site.sdwansitewan_list[a]['lable']==getKeys(item)[a] ? this.templateParameters.site.sdwansitewan_list[a].description:null}}"
                                   required="{{item.required==true ? 'required':null}}">
                        </td>
                        <td>
                            <span class="action" (click)="editWanPort(i+1,item,siteWanData)"><i
                                    class="anticon anticon-edit" style="margin: 0 5px;"></i></span>
                            <span class="action" (click)="deleteWanPort(i+1,item,siteWanData)"><i
                                    class="anticon anticon-delete"></i></span>
                        </td>
                    </tr>
                    <!-- </ng-template> -->
                    </tbody>
                </table>
            </div>
        </div>

        <div class="action">
            <button nz-button nzType="primary" (click)="addsite_cancel()">{{"i18nTextDefine_Cancel" | translate}}</button>
            <button nz-button nzType="primary" (click)="addsite_OK()">{{"i18nTextDefine_Add" | translate}}</button>
        </div>
    </div>
    <div class="mask" *ngIf="siteModelShow || sotnVpnModelShow"></div>
</div>