| <!-- |
| 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 flex="70"> |
| <md-toolbar> |
| <div class="md-toolbar-tools"> |
| <h2>{{ "schemaTest" | translate }}</h2> |
| <span flex></span> |
| <md-button class="md-icon-button" ng-click="cancel()"> |
| <md-icon class="glyphicon glyphicon-remove" aria-label="Close dialog"></md-icon> |
| </md-button> |
| </div> |
| </md-toolbar> |
| <md-dialog-content> |
| <div ng-show="showSchema"> |
| <div ng-if="testSchema" class="swaggerDiv" swagger-ui input-type="yaml" input="testSchema" api-explorer="true" |
| try-it="true"></div> |
| <div ng-if="!testSchema"> |
| <h2 class="text-center">{{ "noSchemaExists" | translate }}</h2> |
| </div> |
| </div> |
| |
| <div ng-show="!showSchema"> |
| <div ng-if="(instances.length > 0)" layout="row" style="margin-top:15px;"> |
| <div flex="25"></div> |
| <div flex="50"> |
| <label>{{ "instanceName" | translate }}:</label> |
| <select class="form-control" ng-model="selectedInstance" ng-change="setInstance(selectedInstance)"> |
| <option ng-repeat="instance in instances" value="{{instance}}"> {{ instance }} </option> |
| </select> |
| <label>{{ "address" | translate }}:</label> |
| <select class="form-control" ng-model="selectedAddress" ng-change="setAddress(selectedAddress)"> |
| <option ng-repeat="address in addresses" value="{{address}}"> {{ address }} </option> |
| </select> |
| </div> |
| <div flex="25"></div> |
| </div> |
| <div ng-if="(instances.length == 0)"> |
| <h3 class="text-center">{{ "noInstance" | translate }}</h3> |
| </div> |
| </div> |
| |
| </md-dialog-content> |
| <md-dialog-actions layout="row"> |
| <span flex></span> |
| <md-button class="md-raised schemaBtn" ng-show="(!showSchema) && (instances.length != 0) " ng-click="getSchema()"> |
| {{ "next" | translate}} |
| </md-button> |
| <md-button ng-click="cancel()"> |
| {{ "close" | translate}} |
| </md-button> |
| </md-dialog-actions> |
| </md-dialog> |