<!--
  #%L
  thinkbig-ui-feed-manager
  %%
  Copyright (C) 2017 ThinkBig Analytics
  %%
  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.
  #L%
  -->
<md-dialog aria-label="Unable to Register the Template"  ng-cloak>
        <div  class="md-toolbar-tools md-warn">
            <h4 class="md-warn">Unable to register the template: {{templateName}}</h4>
            <span flex></span>
            <md-button class="md-icon-button" ng-click="cancel()">
                <ng-md-icon md-icon icon="close" aria-label="Close dialog"></ng-md-icon>
            </md-button>
        </div>
        <md-dialog-content layout="column" flex style="min-width:500px;" layout-padding>
           <div class="md-warn">The following properties require the existence of a controller service in Nifi.
            <br/>
            Please go to Nifi, create the following controller service(s), save the template, and try again.
               <br/>
               <b>NOTE:</b> You may need to re-create the template again once you have created the required controller services in Nifi.
               <ol>
                   <li>Create the required Services</li>
                   <li>Re create/save the template in Nifi</li>
               </ol>
               </div>
            <section ng-repeat="(name,services) in servicesNeeded" flex>
                            <md-subheader class="md-warn">{{::name}}</md-subheader>
                            <md-list class="padding-left">
                                <md-list-item ng-repeat="service in ::services">
                                    <div class="md-list-item-text">
                                        <div>Processor: {{::service.processor}}</div>
                                        <div>Property: {{::service.name}}</div>
                                        <div class="hint">{{::service.description}}</div>
                                    </div>
                                    <md-divider ng-if="!$last"></md-divider>
                                </md-list-item>
                            </md-list>
                            <md-divider ng-if="!$last"></md-divider>
            </section>
            <br/><br/>
        </md-dialog-content>
</md-dialog>
