summaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/import-package/import-package.component.html
blob: 0632fb47d73788cdfbbff1ac8558944f78b7c439 (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
<div class="modal fade" id="importPackageModal" tabindex="-1" role="dialog" aria-labelledby="importPackageModal"
     aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="importModalLabel">Import File</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <!-- <span aria-hidden="true">&times;</span> -->
                    <img src="assets/img/icon-close.svg"/>
                </button>
            </div>
            <div class="modal-body">
                <ngx-file-drop accept=".zip" dropZoneLabel="Drop files here" (onFileDrop)="dropped($event)"
                               (onFileOver)="fileOver($event)" (onFileLeave)="fileLeave($event)">
                    <ng-template ngx-file-drop-content-tmp let-openFileSelector="openFileSelector">
                        <div class="folder-upload">
                            <img src="assets/img/folder-upload.svg"/>
                        </div>
                        <div class="folder-upload-text">
                            Drag & Drop file
                        </div>
                        <div class="folder-upload-text">or
                            <button type="button" class="btn btn-sm btn-primary" (click)="openFileSelector()">Browse
                                Files
                            </button>
                        </div>
                        <div class="folder-upload-type">Allowed file type: zip</div>
                    </ng-template>
                </ngx-file-drop>
                <div class="upload-table">
                    <table class="table">
                        <thead>
                        <tr *ngFor="let item of uploadedFiles; let i=index">
                            <th width="40"><img src="assets/img/icon-file-code.svg"/></th>
                            <th>{{ item.name }}</th>
                            <th (click)="removeInitFile(i)" width="40" class="text-right"><img
                                    src="assets/img/icon-remove-file.svg"/></th>
                        </tr>
                        </thead>
                    </table>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal"
                        (click)="resetTheUploadedFiles()">Cancel
                </button>
                <button type="button" class="btn btn-sm btn-primary" [disabled]="uploadedFiles?.length<=0"
                        data-dismiss="modal" (click)="importAndSave()">
                    Import&Save
                </button>
                <button type="button" class="btn btn-sm btn-primary" [disabled]="uploadedFiles?.length<=0"
                        data-dismiss="modal" (click)="importAndDeploy()">
                    Import&Deploy
                </button>
                <button type="button" class="btn btn-sm btn-primary" [disabled]="uploadedFiles?.length<=0"
                        data-dismiss="modal" (click)="importPackageAndViewIt()">
                    Import
                </button>

            </div>
        </div>
    </div>
</div>