graphdb-workbench
Version:
The web application for GraphDB APIs
124 lines (108 loc) • 5.54 kB
HTML
<link href="css/autocomplete.css?v=1.11.3-TR1" rel="stylesheet">
<div id="autocomplete" class="page">
<h1>
{{title}}
<em class="btn btn-link"
uib-popover-template="'js/angular/templates/titlePopoverTemplate.html'"
popover-trigger="mouseenter"
popover-placement="bottom-right"
popover-append-to-body="true"><span class="icon-info"></span></em>
</h1>
<div onto-loader-new
ng-show="loader"
class="autocomplete-loader"
message="getLoaderMessage"
size="75">
</div>
<div core-errors write ontop fedx></div>
<inactive-plugin-directive
plugin-name="{{pluginName}}"
human-readable-plugin-name="Autocomplete Plugin"
load-saved="checkForPlugin()"
set-plugin-active="setPluginIsActive(isPluginActive)">
</inactive-plugin-directive>
<div ng-if="canWriteActiveRepo() && !loading && !isRestricted && pluginIsActive">
<div class="alert alert-info autocomplete-configuring-not-supported-alert" ng-if="!loader && pluginFound && getDegradedReason()">
<h4>Autocomplete not fully supported</h4>
<p>Configuring autocomplete is not supported. {{getDegradedReason()}}</p>
</div>
<div ng-if="pluginFound && !getDegradedReason()">
<div class="lead mb-1" id="toggleIndex">
<span class="autocomplete-header">Autocomplete for repository <strong>{{getActiveRepository()}}</strong> is <span class="tag {{autocompleteEnabled ? 'tag-primary' : 'tag-default'}}">{{autocompleteEnabled ? 'ON' : 'OFF'}}</span></span>
<span uib-tooltip="Click to {{autocompleteEnabled ? 'disable' : 'enable'}} autocomplete" tooltip-placement="top" tooltip-trigger="mouseenter" ng-click="toggleAutocomplete()" class="switch autocomplete-switch enable-autocomplete-switch">
<input type="checkbox" class="switch" ng-checked="autocompleteEnabled"/>
<label for="toggleIndex"></label>
</span>
<span ng-show="autocompleteEnabled" class="autocomplete-status">
with status
<span class="tag tag-success" ng-show="indexStatus.indexOf('READY') == 0"><em class="icon-check icon-lg"></em> Ready</span>
<span ng-show="indexStatus == 'BUILDING'">
<span class="tag tag-info">
<span class="icon-reload icon-lg loader"></span>
Building...
</span>
<button class="btn btn-link btn-sm" ng-click="interruptIndexing()"
uib-tooltip="Interrupt indexing" tooltip-trigger="mouseenter" tooltip-append-to-body="true"><span class="icon-close"></span></button>
</span>
<span class="tag tag-danger" ng-show="indexStatus.indexOf('ERROR') == 0"><em class="icon-warning icon-lg"></em> {{indexStatus}}</span>
<span class="tag tag-warning" ng-show="indexStatus == 'CANCELED'"><em class="icon-warning icon-lg"></em> Index building was cancelled.</span>
<span class="tag tag-warning" ng-show="indexStatus == 'NONE'"><em class="icon-info icon-lg"></em> Index not built yet.</span>
</span>
<p class="pull-right" ng-show="autocompleteEnabled">
<button ng-disabled="indexStatus == 'BUILDING'" ng-click="buildIndex()" class="btn btn-primary build-index-btn">Build Now</button>
</p>
</div>
<div ng-class="indexStatus != 'READY_CONFIG' ? 'invisible' : ''" class="alert alert-warning no-icon">
Indexing options have changed but they have not been applied yet. Rebuild the index to apply the changes.
</div>
<button id="wb-autocomplete-addLabel" type="submit" ng-click="addLabel()"
ng-disabled="indexStatus == 'BUILDING'" class="btn btn-sm btn-primary pull-right"
tooltip-trigger="mouseenter" uib-tooltip="Add label config">
<span class="icon-plus"></span>
Add label
</button>
<div id="toggleIRIs" class="pull-right">
Index IRIs is
<span class="tag {{shouldIndexIRIs ? 'tag-primary' : 'tag-default'}}">{{shouldIndexIRIs ? 'ON' : 'OFF'}}</span></span>
<span uib-tooltip="Click to {{shouldIndexIRIs ? 'disable' : 'enable'}} indexing of IRIs" tooltip-placement="top" tooltip-trigger="mouseenter" ng-click="toggleIndexIRIs()" class="switch">
<input type="checkbox" class="switch" ng-checked="shouldIndexIRIs"/>
<label for="toggleIRIs"></label>
</span>
</div>
<table id="wb-autocomplete-labels" class="table table-striped table-hover" aria-describedby="Autocomplete labels table">
<thead>
<tr>
<th id="labelIRIColumn">Label IRI</th>
<th id="languagesColumn">Languages</th>
<th id="actionsColumn" style="width: 100px"></th>
</tr>
</thead>
<tbody>
<tr ng-if="labelConfig.length == 0">
<td colspan="3">No labels are configured.</td>
</tr>
<tr ng-repeat="label in labelConfig"
class="wb-autocomplete-labels-row" loader-post-repeat-directive>
<td>
{{label.labelIri}}
</td>
<td>
<span ng-if="!label.languages">any language</span>
<span ng-repeat="language in label.languages.split(', ')">
<span class="tag tag-default">{{language}}</span>
</span>
</td>
<td class="actions-bar">
<button class="btn btn-link" ng-click="editLabel(label)" tooltip-trigger="mouseenter"
uib-tooltip="Edit label languages"><span class="icon-edit"></span></button>
<button class="btn btn-link secondary" ng-click="removeLabel(label)"
tooltip-trigger="mouseenter" uib-tooltip="Delete label config">
<span class="icon-trash"></span>
</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>