UNPKG

graphdb-workbench

Version:
169 lines (165 loc) 9.91 kB
<div class="ot-loader ot-main-loader" onto-loader size="50" ng-show="loader"></div> <div ng-hide="loader"> <div ng-show="showTable()" class="mb-1 clearfix"> <div class="pull-right form-inline"> <div class="btn-group d-inline mr-1" ng-show="viewType === 'server'"> <button type="button" class="btn btn-secondary" ng-model="showItems" uib-btn-radio="'file'" uib-tooltip="Show files only"> <em class="icon-file"></em> </button> <button type="button" class="btn btn-secondary" ng-model="showItems" uib-btn-radio="'all'" uib-tooltip="Show both files and directories"> <em class="icon-file"></em> <em class="icon-folder"></em> </button> <button type="button" class="btn btn-secondary" ng-model="showItems" uib-btn-radio="'directory'" uib-tooltip="Show directories only"> <em class="icon-folder"></em> </button> </div> <div class="input-group"> <label class="input-group-addon" for="fileQuery"><span class="icon-search icon-lg text-muted"></span></label> <input id="fileQuery" class="form-control" type="text" name="fileQuery" ng-model="fileQuery" placeholder="Type to filter"> </div> </div> <form class="form-inline"> <div class="btn btn-link"> <input class="form-check-input select-all-files" type="checkbox" ng-click="selectAllFiles()" ng-model="checkAll" ng-disabled="!hasImportable()" ng-change="switchBatch(true)" uib-tooltip="Select all"> </div> <div class="btn-group" uib-dropdown ng-hide="!hasImportable() || !batch" uib-popover="Import the selected items" popover-trigger="mouseenter" popover-placement="top"> <button type="button" class="btn btn-primary import-btn" ng-click="setSettingsFor('')"><span class="icon-import"></span> Import</button> <button type="button" class="btn btn-primary dropdown-toggle-split dropdown-toggle import-dropdown-btn" uib-dropdown-toggle> <span class="sr-only"></span> </button> <ul class="dropdown-menu" role="menu"> <li><button type="button" class="dropdown-item import-without-change-btn" ng-click="importSelected(true)">Import without changing settings</button></li> </ul> </div> <button id="wb-import-clearStatuses" ng-show="batch && showClearStatuses" class="btn btn-secondary" type="button" ng-click="resetStatusSelected()" uib-popover="Reset the last imported status of the selected items" popover-trigger="mouseenter" popover-placement="top"> Reset status </button> <button id="wb-import-removeEntries" ng-show="batch && viewType === 'user'" class="btn btn-secondary" type="button" ng-click="removeEntrySelected()" uib-popover="Remove the selected items from the list" popover-trigger="mouseenter" popover-placement="top"> Remove </button> </form> </div> <script type="text/ng-template" id="settingsPopoverTemplate.html"> <h4>Last import settings</h4> <table class="table table-sm m-0" ng-init="settings = filterSettings(file.name)"> <tr ng-repeat="setting in settings"> <td><strong>{{setting[0]}}</strong></td> <td ng-show="setting[0] == 'parserSettings' || setting[0] == 'requestIdHeadersToForward'"> <pre>{{pritifySettings(setting[1])}}</pre> </td> <td class="break-word" ng-show="!(setting[0] == 'parserSettings' || setting[0] == 'requestIdHeadersToForward')">{{setting[1]}}</td> </tr> </table> </script> <table id="wb-import-fileInFiles" class="table table-striped table-hover" aria-describedby="table rendering available for import files"> <tbody> <tr class="import-file-row" ng-repeat="file in files | filter: {name: fileQuery, type: getTypeFilter()}" ng-show="files.length > 0"> <td width="25"> <label class="m-0 d-inline-block"> <input type="checkbox" class="import-file-checkbox" ng-model="fileChecked[file.name]" ng-disabled="!importable(file)" ng-change="switchBatch()"> </label> </td> <td> <div class="d-inline-block" style="overflow: hidden; text-overflow: ellipsis;"> <div class="import-file-header"> <!-- no icon for server files --> <em class="icon-file" ng-show="viewType === 'server' && file.type === 'file'"></em> <em class="icon-folder" ng-show="file.type === 'directory'"></em> <em class="icon-upload" ng-show="viewType === 'user' && file.type === 'file'"></em> <em class="icon-link" ng-show="file.type === 'url'"></em> <em class="icon-edit" ng-show="file.type === 'text'"></em> <strong ng-show="file.type !== 'text'">{{file.name}}</strong> <strong ng-show="file.type === 'text'"><a href="#" ng-click="pasteData(file)">{{file.name}}</a></strong> </div> <div class="import-status"> <button role="button" class="btn btn-link btn-inline secondary b-0 p-0 import-status-reset" ng-click="resetStatus([file.name])" ng-show="file.status === 'DONE' || file.status === 'ERROR'" ng-disabled="batch" uib-tooltip="Reset status" tooltip-trigger="mouseenter"> <span class="icon-close"></span> </button> <span class="icon-info text-secondary import-status-info" popover-class="impex-popover" uib-popover-template="popoverTemplateUrl" popover-trigger="mouseenter" popover-placement="right" popover-append-to-body="true" ng-show="file.status === 'DONE' || file.status === 'ERROR'"> </span> <span class="import-status-message"> <span ng-show="file.status == 'NONE' && file.message" class="text-info"> <small>{{file.message}}</small> </span> <span ng-show="file.status == 'DONE'" class="text-success"> <em class="icon-check"></em> <small>{{file.message}}</small> </span> <span ng-show="file.status == 'ERROR'" class="text-danger"> <em class="icon-warning"></em> <small>{{file.message}}</small> </span> <span class="text-secondary import-status-loader" ng-show="file.status === 'IMPORTING' || file.status === 'UPLOADING' || file.status === 'PENDING' || file.status === 'INTERRUPTING'"> <em class="icon-reload loader"></em> <small>{{toTitleCase(file.status)}}...</small> </span> </span> </div> </div> </td> <td width="25" ng-show="viewType === 'user'"> <button class="btn btn-link secondary" ng-click="removeEntry([file.name])" ng-disabled="batch || file.status === 'IMPORTING' || file.status === 'UPLOADING' || file.status === 'PENDING' || file.status === 'INTERRUPTING'"> <em class="icon-trash"></em> </button> </td> <td width="100"> <button class="btn btn-primary btn-sm pull-right" ng-click="setSettingsFor(file.name)" ng-disabled="batch" ng-cloak ng-hide="!importable(file) || file.status === 'IMPORTING' || file.status === 'UPLOADING' || file.status === 'PENDING' || file.status === 'INTERRUPTING'" data-target="#{{viewType}}Modal"> <span class="icon-import"></span> Import </button> <button class="btn btn-sm pull-right" ng-click="stopImport(file)" ng-disabled="file.status === 'INTERRUPTING'" ng-cloak ng-show="file.status === 'IMPORTING' || file.status === 'UPLOADING' || file.status === 'PENDING' || file.status === 'INTERRUPTING'" uib-tooltip="Interrupt import" tooltip-trigger="mouseenter" tooltip-append-to-body="true"> <span class="icon-close"></span> Abort </button> </td> </tr> </tbody> <tbody ng-show="files.length == 0 && viewType == 'server'"> <tr> <td>No files found</td> </tr> </tbody> </table> </div>