aboutsummaryrefslogtreecommitdiffstats
path: root/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/serviceUpload.html
blob: 2c813fb3db9d4b8b07b437507c7941da4ac6ce9a (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
<!--
  Copyright 2017 Huawei Technologies Co., Ltd.
 
  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.
-->
<md-dialog aria-label="Upload Service dialog" flex="40" id="uploadDialog">

    <md-toolbar class="md-hue-3 dialogHeader">
        <div class="md-toolbar-tools" id="uploadStyle">
            <h2  ng-if="vm.isUpload" >{{'module.marketplace.serviceUpload.title' | translate}}</h2>
			<h2  ng-if="!vm.isUpload" >{{'module.marketplace.serviceUpload.updateTitle' | translate}}</h2>
            <span flex></span>
            <button class="btnTransparency" ng-click="vm.cancel()" ng-hide="vm.status == 'progress'">
                    <i class="fa fa-close fa-sm" aria-hidden="true"></i>
            </button>
        </div>
    </md-toolbar>
    <form ng-cloak name="service">
        <md-dialog-content ng-show="vm.status == 'Idle'">
            <span class="UploadPageIndicator"> </span>
            <div class="md-dialog-content">
                <div layout="column">
                    <label>{{'module.marketplace.serviceUpload.fields.fileUpload.label' | translate}}</label>
                    <div class="">
                        <label for="file" class="btn btnDefault"> {{'common.actions.add' | translate}} </label>
                        <label>
                            <span ng-if="!vm.service.file"> {{'module.marketplace.serviceUpload.fields.fileUpload.noFileSelected' | translate}}</span>
                            <span ng-if="vm.service.file">  {{ vm.service.file.name}}</span>
                        </label>
                    </div>
                    <input class="hidden" id="file" type="file" file-upload="vm.service.file" md-asterisk accept=".csar">

                </div>

                <div>
                        <label for="shortDesc" class="labels">{{'module.marketplace.serviceUpload.fields.shortDescription.placeholder' | translate}}</label>
                        <input ng-model="vm.service.shortDesc" type="text" id="shortDesc" name="shortDesc">
                </div>
                <div>
                    
                        <label class="labels">{{'module.marketplace.serviceUpload.fields.details.placeholder' | translate}}</label>
                        <textarea name="details" ng-model="vm.service.details" maxlength="150" rows="3" md-select-on-focus></textarea>
                </div>
                <div>
                   
                        <label for="remarks" class="labels">{{'module.marketplace.serviceUpload.fields.remarks.placeholder' | translate}}</label>
                        <input ng-model="vm.service.remarks" type="text" id="remarks" name="remarks">
                </div>
            </div>
        </md-dialog-content>

    </form>

    <md-dialog-content ng-show="(vm.status == 'progress') || (vm.status == 'success')">
        <div class="md-dialog-content" layout="column" layout-sm="column">
            <div flex layout="row">
                <div flex="25" layout="column">
                </div>
                <div flex="50" layout="column">
                    <h4 class="text-center" ng-if="vm.status != 'success'"> {{'module.marketplace.serviceUpload.messages.onUploading' | translate}} </h4>
                    <div class="fullWidth center" ng-if="vm.status == 'success'">
                        <div class="row">
                            <div class="col-xs-2 col-sm-2 col-md-1 col-lg-1 deleteIconSize glyphicon glyphicon-info-sign icon_info con_confirm"></div>
                            <h4 class="msg col-xs-10 col-sm-10 col-md-10 col-lg-10" style="text-align:left;vertical-align: middle;">{{'module.marketplace.serviceUpload.messages.onSuccessful' | translate}}</h4>
                        </div>
                    </div>
                    <md-progress-linear md-mode="determinate" value="{{vm.apiInfo}}"></md-progress-linear>
                    <h4 class="text-center"> {{vm.apiInfo}} % </h4>
                    <span class="text-center" ng-if="vm.status == 'success'">{{'module.marketplace.serviceUpload.fields.funcTestReport.label' | translate}} <a href="{{vm.funcTestReportUrl}}" target="_blank">{{'common.actions.clickHere' | translate}}</a></span>
                </div>
                <div flex="25" layout="column">
                </div>
            </div>
        </div>
    </md-dialog-content>



    <md-dialog-actions layout="row" ng-show="vm.status == 'Idle'" class="marginAuto">
        <!-- <span flex></span> -->
        
		<button ng-if="!vm.isUpload" class="md-raised btn btnPrimary btnPrimaryPadding btnSpacing" ng-click="vm.answer('Uploaded')" ng-disabled="!vm.service.file">
            {{'common.actions.update' | translate}}
        </button>
		
        <button ng-if="vm.isUpload" class="md-raised btn btnPrimary btnPrimaryPadding btnSpacing" ng-click="vm.answer('Uploaded')" ng-disabled="!vm.service.file">
            {{'common.actions.upload' | translate}}
        </button>

        <button class="md-raised btn btnDefault btnPrimaryPadding btnSpacing" ng-click="vm.cancel()">
            {{'common.actions.close' | translate}}
        </button>
       

    </md-dialog-actions>
    <md-dialog-actions class="marginAuto" layout="row" ng-show="vm.status == 'success'">
        <button class="btn btnDefault" ng-click="vm.hide('Uploaded')">
            {{'common.actions.ok' | translate}}
        </button>
    </md-dialog-actions>
</md-dialog>