| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you 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. |
| --> |
| |
| <style> |
| .list-grid { |
| padding-left: 300px; |
| } |
| |
| span.fancytree-icon { |
| margin-left: 0; |
| } |
| |
| ._treeContainer { |
| width: 300px; |
| padding-right: 10px; |
| } |
| |
| .tree-header { |
| z-index: 4; |
| } |
| |
| #list-controller .tree-header { |
| height: auto; |
| } |
| |
| #list-controller select { |
| height: 25px; |
| width: 300px; |
| background-color: #333333; |
| border: 0; |
| } |
| |
| #list-controller div.list-grid select { |
| background-color: white; |
| } |
| |
| .list-grid { |
| position: absolute; |
| top: 0; |
| left: 0; |
| width: calc(100% - 40px); |
| margin-left: 20px; |
| } |
| |
| @media (min-width: 768px) { |
| .navbar-collapse.page-menu { |
| padding-right: 0; |
| min-height: calc(100vh - 71px) !important; |
| } |
| } |
| </style> |
| |
| <div id="list-controller" ng-controller="QDR.ListController"> |
| |
| <div class="page-menu navbar-collapse collapse"> |
| <div class="tree-header"><select id="routerSelect" |
| ng-options="node as node.name for node in nodes" |
| ng-model="currentNode" |
| ng-change="selectNode(currentNode)"></select></div> |
| <div class="_treeContainer"> |
| <div id="entityTree" onSelect="onTreeSelected" onRoot="onRootReady" hideRoot="true"></div> |
| <div ng-init="treeReady()"></div> |
| </div> |
| </div> |
| |
| <div class="list-grid"> |
| <div class="row-fluid qdrListActions"> |
| <ul class="nav nav-tabs"> |
| <li ng-repeat="mode in modes" ng-show="isValid(mode)" ng-click="selectMode(mode)" ng-class="{active : isModeSelected(mode)}" title="{{mode.title}}" ng-bind-html="mode.content"> </li> |
| </ul> |
| <h4>{{selectedRecordName | to_trusted}}</h4> |
| <div ng-show="currentMode.id === 'attributes'" class="selectedItems"> |
| <div ng-show="selectedRecordName === selectedEntity" class="no-content">There are no {{selectedEntity | safePlural | to_trusted}}</div> |
| <div id='details-grid' ng-hide="selectedRecordName === selectedEntity" ui-grid="details" ui-grid-resize-columns ui-grid-save-state |
| ui-grid-auto-resize ng-style="getTableHeight()"></div> |
| </div> |
| <div ng-show="currentMode.id === 'delete'"> |
| <div class="delete" ng-show="selectedRecordName !== selectedEntity"> |
| <button class="btn btn-primary" ng-click="remove()">Delete</button> {{selectedRecordName | to_trusted}} |
| </div> |
| <div ng-hide="selectedRecordName !== selectedEntity"> |
| There are no {{selectedEntity | safePlural | to_trusted}} |
| </div> |
| </div> |
| <div class="operations" ng-show="currentMode.id === 'operations'"> |
| <fieldset ng-show="operation != ''"> |
| <table> |
| <tr> |
| <th>Attribute</th> |
| <th>Value</th> |
| </tr> |
| <tr title="{{attribute.title}}" ng-repeat="attribute in detailFields"> |
| <td><label for="{{attribute.name}}">{{attribute.name | humanify | to_trusted}}</label></td> |
| <!-- we can't do <input type="{angular expression}"> because... jquery throws an exception because... --> |
| <td> |
| <div ng-if="attribute.input == 'input'"> |
| <!-- ng-pattern="testPattern(attribute)" --> |
| <div ng-if="attribute.type == 'number'"><input type="number" name="{{attribute.name}}" id="{{attribute.name}}" ng-model="attribute.rawValue" ng-required="attribute.required" ng-class="{required: attribute.required, unique: attribute.unique}" class="ui-widget-content ui-corner-all"/><span ng-if="attribute.required" title="required" class="required-indicator"></span><span ng-if="attribute.unique" title="unique" class="unique-indicator"></span></div> |
| <div ng-if="attribute.type == 'text'"><input type="text" name="{{attribute.name}}" id="{{attribute.name}}" ng-model="attribute.attributeValue" ng-required="attribute.required" ng-class="{required: attribute.required, unique: attribute.unique}" class="ui-widget-content ui-corner-all"/><span ng-if="attribute.required" title="required" class="required-indicator"></span><span ng-if="attribute.unique" title="unique" class="unique-indicator"></span></div> |
| <div ng-if="attribute.type == 'textarea'"><textarea name="{{attribute.name}}" id="{{attribute.name}}" ng-model="attribute.attributeValue" ng-required="attribute.required" ng-class="{required: attribute.required, unique: attribute.unique}" class="ui-widget-content ui-corner-all"></textarea><span ng-if="attribute.required" title="required" class="required-indicator"></span><span ng-if="attribute.unique" title="unique" class="unique-indicator"></span></div> |
| <span ng-if="attribute.type == 'disabled'" >{{getAttributeValue(attribute) | to_trusted}}</span> |
| </div> |
| <div ng-if="attribute.input == 'select'"> |
| <select id="{{attribute.name}}" ng-model="attribute.selected" ng-required="attribute.required" ng-class="{required: attribute.required, unique: attribute.unique}" ng-options="item for item in attribute.rawtype track by item"></select> |
| <span ng-if="attribute.required" title="required" class="required-indicator"></span><span ng-if="attribute.unique" title="unique" class="unique-indicator"></span> |
| </div> |
| <div ng-if="attribute.input == 'boolean'" class="boolean"> |
| <label><input type="radio" ng-model="attribute.rawValue" ng-value="true"> True</label> |
| <label><input type="radio" ng-model="attribute.rawValue" ng-value="false"> False</label> |
| </div> |
| </td> |
| </tr> |
| <tr><td></td><td><button class="btn btn-primary" type="button" ng-click="ok()">{{operation | Pascalcase | to_trusted}}</button></td></tr> |
| </table> |
| </fieldset> |
| </div> |
| <div ng-show="currentMode.id === 'log'"> |
| <div ng-if="logResults.length > 0"> |
| <table class="log-entry" ng-repeat="entry in logResults track by $index"> |
| <tr> |
| <td align="left" colspan="2">{{entry.time}}</td> |
| </tr> |
| <tr> |
| <td>Type</td><td>{{entry.type}}</td> |
| </tr> |
| <tr> |
| <td>Source</td><td>{{entry.source}}:{{entry.line}}</td> |
| </tr> |
| <tr> |
| <td valign="middle">Message</td><td valign="middle"><pre>{{entry.message}}</pre></td> |
| </tr> |
| </table> |
| </div> |
| <div ng-if="logResults.length == 0 && !fetchingLog">No log entries for {{selectedRecordName | to_trusted}}</div> |
| <div ng-if="fetchingLog">Fetching logs for {{selectedRecordName | to_trusted}}</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| |
| <style> |
| @media (min-width: 768px) { |
| .list-grid { |
| padding-left: 300px; |
| } |
| } |
| @media (max-width: 768px) { |
| .list-grid { |
| padding-left: 0; |
| } |
| |
| } |
| </style> |