removed bootstrap UI
This commit is contained in:
parent
2ae7ff4a5c
commit
721b55294d
Binary file not shown.
|
@ -1,56 +0,0 @@
|
||||||
<page-title title="Context Editor"></page-title>
|
|
||||||
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col">
|
|
||||||
<p>
|
|
||||||
<b>Context ID: </b>{{ctxId}}<br /> <b>Label: </b>{{ctxInfo.label}}<br /> <b>Type: </b>{{ctxInfo.type}}<br /> <b>Parameters: </b><a href="javascript:void(0)" data-toggle="modal"
|
|
||||||
data-target="#showParametersModal" ng-click="loadContextParameters()">[show]</a>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="btn btn-sm btn-info" href="#!/contexts">Return to contexts list</a> <a class="btn btn-sm btn-success" href="/api/contexts/{{ctxId}}" target="_blank">Download</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li ng-repeat="cat in categories" style="display: in"><a href="javascript:void(0)" ng-click="populateNode(0, cat)" ng-hide="cat.populated || cat.nChilds == 0">[+{{cat.nChilds}}]</a> <span
|
|
||||||
class="badge badge-info" ng-show="cat.claim">claim</span> <a href="javascript:void(0)" title="{{cat.label}}" data-toggle="modal" data-target="#showParametersModal"
|
|
||||||
ng-click="initShowParameters(cat.parameters)">{{cat.id}}</a>
|
|
||||||
<ul ng-show="cat.concepts.length > 0">
|
|
||||||
<li ng-repeat="c0 in cat.concepts"><a href="javascript:void(0)" ng-click="populateNode(1, c0)" ng-hide="c0.populated || c0.nChilds == 0">[+{{c0.nChilds}}]</a> <span class="badge badge-info"
|
|
||||||
ng-show="c0.claim">claim</span> <a href="javascript:void(0)" title="{{c0.label}}" data-toggle="modal" data-target="#showParametersModal" ng-click="initShowParameters(c0.parameters)">{{c0.id}}</a>
|
|
||||||
<ul ng-show="c0.concepts.length > 0">
|
|
||||||
<li ng-repeat="c1 in c0.concepts"><a href="javascript:void(0)" ng-click="populateNode(2, c1)" ng-hide="c1.populated || c1.nChilds == 0">[+{{c1.nChilds}}]</a> <span class="badge badge-info"
|
|
||||||
ng-show="c1.claim">claim</span> <a href="javascript:void(0)" title="{{c1.label}}" data-toggle="modal" data-target="#showParametersModal" ng-click="initShowParameters(c1.parameters)">{{c1.id}}</a>
|
|
||||||
<ul ng-show="c1.concepts.length > 0">
|
|
||||||
<li ng-repeat="c2 in c1.concepts"><span class="badge badge-info" ng-show="c2.claim">claim</span> <a href="javascript:void(0)" title="{{c2.label}}" data-toggle="modal"
|
|
||||||
data-target="#showParametersModal" ng-click="initShowParameters(c2.parameters)">{{c2.id}}</a></li>
|
|
||||||
</ul></li>
|
|
||||||
</ul></li>
|
|
||||||
</ul></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Modals -->
|
|
||||||
|
|
||||||
<div class="modal fade" tabindex="-1" id="showParametersModal">
|
|
||||||
<div class="modal-dialog modal-xl">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h4 class="modal-title">Parameters</h4>
|
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
||||||
</div>
|
|
||||||
<table class="table table-sm table-striped" style="table-layout: fixed;">
|
|
||||||
<tr ng-show="parameters.length == 0">
|
|
||||||
<td colspan="2" align="center">0 parameter(s)</td>
|
|
||||||
</tr>
|
|
||||||
<tr ng-repeat="p in parameters">
|
|
||||||
<th style="width: 25%; padding-left: 20px">{{p.name}}</th>
|
|
||||||
<td style="overflow-x: auto;"><pre style="margin: 0;">{{p.value}}</pre></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
|
@ -1,102 +0,0 @@
|
||||||
<page-title title="Contexts"></page-title>
|
|
||||||
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col">
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<button class="btn btn-sm btn-primary" data-toggle="modal" data-target="#editContextModal" ng-click="prepareNewCtx()">create a new context</button>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<page-filter filter="ctxFilter" list="contexts"></page-filter>
|
|
||||||
|
|
||||||
<table class="table table-sm table-striped">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th style="width: 20%">ID</th>
|
|
||||||
<th style="width: 30%">Label</th>
|
|
||||||
<th style="width: 10%">Type</th>
|
|
||||||
<th></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr ng-show="(contexts|filter:ctxFilter).length == 0">
|
|
||||||
<td colspan="4" class="text-muted">no contexts</td>
|
|
||||||
</tr>
|
|
||||||
<tr ng-repeat="ctx in contexts|filter:ctxFilter">
|
|
||||||
<th><a href="#!/context/{{ctx.id}}">{{ctx.id}}</a></th>
|
|
||||||
<td>{{ctx.label}}</td>
|
|
||||||
<td>{{ctx.type}}</td>
|
|
||||||
<td align="right">
|
|
||||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#editContextModal" ng-click="prepareEditCtx(ctx)">edit</button>
|
|
||||||
<button type="button" class="btn btn-sm btn-danger" ng-click="deleteContext(ctx.id)">delete</button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Modals -->
|
|
||||||
|
|
||||||
<div class="modal fade" tabindex="-1" id="editContextModal">
|
|
||||||
<form>
|
|
||||||
<div class="modal-dialog modal-xl">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h4 class="modal-title" ng-if="mode == 'new'">New context</h4>
|
|
||||||
<h4 class="modal-title" ng-if="mode == 'edit'">Edit context</h4>
|
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<form-textfield label="ID" value="tmpCtx.id" ng-show="mode == 'new'"></form-textfield>
|
|
||||||
<form-textfield-static label="ID" value="tmpCtx.id" ng-show="mode == 'edit'"></form-textfield-static>
|
|
||||||
<form-textfield label="Label" value="tmpCtx.label"></form-textfield>
|
|
||||||
<form-textfield label="Type" value="tmpCtx.type"></form-textfield>
|
|
||||||
<div class="form-group">
|
|
||||||
<table class="table table-sm table-striped" style="table-layout: fixed;">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th style="width: 20%">Parameter Name</th>
|
|
||||||
<th style="width: 75%">Parameter Value</th>
|
|
||||||
<th></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr ng-show="tmpCtx.parameters.length == 0">
|
|
||||||
<td colspan="3">0 parameter(s)</td>
|
|
||||||
</tr>
|
|
||||||
<tr ng-repeat="p in tmpCtx.parameters">
|
|
||||||
<th>{{p.name}}</th>
|
|
||||||
<td><textarea class="form-control" ng-model="p.value"></textarea></td>
|
|
||||||
<td align="right">
|
|
||||||
<button class="btn btn-sm btn-danger" type="button" ng-click="tmpCtx.parameters.splice($index, 1)">
|
|
||||||
<i class="fa fa-trash"></i>
|
|
||||||
</button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
<tfoot>
|
|
||||||
<tr ng-init="newParamName=newParamValue=''">
|
|
||||||
<td><input type="text" class="form-control form-control-sm" placeholder="new param name..." ng-model="newParamName" /></td>
|
|
||||||
<td><textarea class="form-control form-control-sm" placeholder="new param value..." ng-model="newParamValue"></textarea></td>
|
|
||||||
<td align="right">
|
|
||||||
<button type="button" class="btn btn-sm btn-outline-success" ng-click="tmpCtx.parameters.push({'name': newParamName, 'value': newParamValue}); newParamName=newParamValue=''"
|
|
||||||
ng-disabled="!newParamValue || !newParamValue">
|
|
||||||
<i class="fa fa-plus"></i>
|
|
||||||
</button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tfoot>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">Close</button>
|
|
||||||
<button type="submit" class="btn btn-sm btn-primary" data-dismiss="modal" ng-click="saveContext(tmpCtx)" ng-disabled="!tmpCtx.id || !tmpCtx.label || !tmpCtx.type">Submit</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
|
@ -1,29 +0,0 @@
|
||||||
<page-title title="Datasource Manager: Add API"></page-title>
|
|
||||||
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row mt-5">
|
|
||||||
<div class="col">
|
|
||||||
|
|
||||||
<form>
|
|
||||||
|
|
||||||
<form-textfield-static label="Datasource" value="dsName"></form-textfield-static>
|
|
||||||
<form-textfield-with-prefix label="API Id" prefix="{{prefix}}" value="api.id"></form-textfield-with-prefix>
|
|
||||||
<form-select label="Compatibility level" terms="compatibilityLevels" value="api.compliance"></form-select>
|
|
||||||
<form-select label="Content description" terms="contentDescTypes" value="api.contentdescription"></form-select>
|
|
||||||
<form-select label="Protocol" terms="protocols" value="api.protocol"></form-select>
|
|
||||||
<form-textfield label="BaseURL" value="api.baseUrl" regex="^(http|https|ftp|file|sftp|jar|mongodb):\/\/"></form-textfield>
|
|
||||||
|
|
||||||
<div ng-show="api.protocol" ng-repeat="p in selProtParams">
|
|
||||||
<form-textfield label="Parameter: {{p.label}}" value="api.apiParams[p.name]" type="{{p.type}}" optional="{{p.optional}}"></form-textfield>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{api}}<br />
|
|
||||||
|
|
||||||
<button type="submit" class="btn btn-sm btn-primary">Add API</button>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
|
@ -1,9 +0,0 @@
|
||||||
<page-title title="Datasource Manager: API"></page-title>
|
|
||||||
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row mt-5">
|
|
||||||
<div class="col">
|
|
||||||
{{api}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
|
@ -1,83 +0,0 @@
|
||||||
<page-title title="Datasource Manager: Results"></page-title>
|
|
||||||
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row mt-5">
|
|
||||||
<div class="col">
|
|
||||||
<page-filter filter="apiFilter" list="results" description="Filter in current page..." total-label="Filtered in current page"></page-filter>
|
|
||||||
|
|
||||||
<p class="text-muted">
|
|
||||||
<span></span><b>Number of results:</b> {{nResults}}<br />
|
|
||||||
<b>Page:</b> <span ng-if="nPages > 0">{{currPage + 1}} / {{nPages}}</span><span ng-if="nPages == 0">- / -</span>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<nav ng-show="nPages > 1">
|
|
||||||
<ul class="pagination small">
|
|
||||||
<li class="page-item" ng-class="{'disabled' : currPage <= 0}">
|
|
||||||
<a class="page-link" href="javascript:void(0)" ng-click="gotoPage(currPage - 1)">« Previous</a>
|
|
||||||
</li>
|
|
||||||
<li class="page-item" ng-class="{'disabled': currPage + 1 >= nPages}">
|
|
||||||
<a class="page-link" href="javascript:void(0)" ng-click="gotoPage(currPage + 1)">Next »</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<div class="card mb-4 small" ng-repeat="r in results|filter:apiFilter">
|
|
||||||
<div class="card-body">
|
|
||||||
<h5 class="card-title" title="{{r.id}}">{{r.name}}
|
|
||||||
<span style="font-size: 0.6em" ng-if="r.otherName && r.name != r.otherName"><br />{{r.otherName}}</span>
|
|
||||||
</h5>
|
|
||||||
|
|
||||||
<table class="table table-sm">
|
|
||||||
<tr>
|
|
||||||
<th style="width: 20em;">Id</th>
|
|
||||||
<td>{{r.id}}</td>
|
|
||||||
</tr><tr>
|
|
||||||
<th>Type</th>
|
|
||||||
<td>{{r.type}}</td>
|
|
||||||
</tr><tr>
|
|
||||||
<th>Collected From</th>
|
|
||||||
<td>{{r.collectedFrom}}</td>
|
|
||||||
</tr><tr ng-if="r.websiteUrl">
|
|
||||||
<th>URL</th>
|
|
||||||
<td><a href="{{r.websiteUrl}}" target="_blank">{{r.websiteUrl}}</a></td>
|
|
||||||
</tr><tr>
|
|
||||||
<th>Namespace Prefix</th>
|
|
||||||
<td>{{r.nsprefix}}</td>
|
|
||||||
</tr>
|
|
||||||
<tr ng-if="r.organizations">
|
|
||||||
<th>Organization(s)</th>
|
|
||||||
<td>
|
|
||||||
<span ng-repeat="o in r.organizations">
|
|
||||||
{{o.name}}
|
|
||||||
<img ng-src="common/images/flags/{{o.country}}.gif" title="{{o.country}}" alt="" ng-if="o.country"/>
|
|
||||||
<br />
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
</tr><tr>
|
|
||||||
<th>APIs</th>
|
|
||||||
<td>
|
|
||||||
<div ng-repeat="a in r.apis" ng-if="a.id">
|
|
||||||
<span class="monospaced">
|
|
||||||
<a href="#!/dsm/api?id={{a.id}}">{{a.id}}</a>
|
|
||||||
</span>
|
|
||||||
<span class="badge badge-primary" title="protocol">{{a.protocol}}</span>
|
|
||||||
<span class="badge badge-info" title="compliance">{{a.compliance}}</span>
|
|
||||||
<span class="badge badge-success" ng-if="a.active">active</span><span class="badge badge-danger" ng-if="!a.active">not active</span>
|
|
||||||
<span ng-if="a.aggrDate"><br/><b>Last aggregation:</b> {{a.aggrDate}} <b>(total: {{a.aggrTotal}})</b></span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a class="btn btn-primary btn-sm mt-2" href="#!/dsm/addApi?dsId={{r.id}}&dsName={{r.name}}">add api</a>
|
|
||||||
</td>
|
|
||||||
</tr><tr ng-if="r.consenttermsofuse">
|
|
||||||
<th>Consent Terms of Use</th>
|
|
||||||
<td><span class="badge badge-success">YES</span></td>
|
|
||||||
</tr><tr ng-if="r.fulltextdownload">
|
|
||||||
<th>Fulltext Download</th>
|
|
||||||
<td><span class="badge badge-success">YES</span></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
|
@ -1,74 +0,0 @@
|
||||||
<page-title title="Datasource Manager: Search"></page-title>
|
|
||||||
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row mt-5">
|
|
||||||
<div class="offset-md-3 col-md-6 offset-lg-4 col-lg-4">
|
|
||||||
<form>
|
|
||||||
<div class="input-group">
|
|
||||||
<input type="text" class="form-control" ng-model="textApiSearch" placeholder="Search..."/>
|
|
||||||
<span class="input-group-append">
|
|
||||||
<button type="submit" class="btn btn-primary" ng-click="search('', textApiSearch)">Search</button>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row mt-5">
|
|
||||||
<div class="offset-md-3 col-md-6 offset-lg-4 col-lg-4">
|
|
||||||
<p>
|
|
||||||
<b>Or browse using:</b>
|
|
||||||
<ul>
|
|
||||||
<li ng-repeat="f in browsableFields">
|
|
||||||
<a href="javascript:void(0)" data-toggle="modal" data-target="#showBrowseData" ng-click="browseField(f.k, f.v)">{{f.v}}</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="showBrowseData" class="modal fade" tabindex="-1">
|
|
||||||
<div class="modal-dialog modal-lg">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h4 class="modal-title">{{browseFieldName}}</h4>
|
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal-body small">
|
|
||||||
|
|
||||||
<page-filter filter="filterBrowseData" list="browseData"></page-filter>
|
|
||||||
|
|
||||||
<table class="table table-sm table-striped mt-4" style="table-layout: fixed;">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
<a href="javascript:void(0)" ng-click="sortType = 'name'; sortReverse = !sortReverse">
|
|
||||||
Name
|
|
||||||
<i class="fa fa-sort-up" ng-show="sortType == 'name' && sortReverse" ></i>
|
|
||||||
<i class="fa fa-sort-down" ng-show="sortType == 'name' && !sortReverse"></i>
|
|
||||||
</a>
|
|
||||||
</th>
|
|
||||||
<th class="text-right">
|
|
||||||
<a href="javascript:void(0)" ng-click="sortType = 'total'; sortReverse = !sortReverse">
|
|
||||||
# datasources
|
|
||||||
<i class="fa fa-sort-up" ng-show="sortType == 'total' && sortReverse" ></i>
|
|
||||||
<i class="fa fa-sort-down" ng-show="sortType == 'total' && !sortReverse"></i>
|
|
||||||
</a>
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr ng-repeat="row in browseData | orderBy:sortType:sortReverse | filter:filterBrowseData">
|
|
||||||
<th><a href="javascript:void(0)" ng-click="search(browseFieldId, row.term)" data-dismiss="modal">{{row.name}}</a></td>
|
|
||||||
<td class="text-right">{{row.total}}</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
|
@ -1,41 +0,0 @@
|
||||||
<page-title title="Container Info"></page-title>
|
|
||||||
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col">
|
|
||||||
<p>
|
|
||||||
<input type="text" class="form-control form-control-sm" ng-model="infoFilter" placeholder="Filter..."/>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="card mb-3" ng-repeat="section in info" ng-show="(section.data|filter:infoFilter).length > 0">
|
|
||||||
|
|
||||||
<div class="card-body">
|
|
||||||
<h5 class="card-title">{{section.name}}</h5>
|
|
||||||
|
|
||||||
<table class="table table-striped table-sm small" style="table-layout: fixed;">
|
|
||||||
<thead ng-if="section.name == 'Modules'">
|
|
||||||
<tr>
|
|
||||||
<th>Group ID</th>
|
|
||||||
<th>Artifact ID</th>
|
|
||||||
<th>Version</th>
|
|
||||||
<th>POM</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr ng-repeat="r in section.data|filter:infoFilter" ng-if="section.name != 'Modules'">
|
|
||||||
<th style="width: 25%;">{{r.k}}</th>
|
|
||||||
<td style="overflow-x: auto;"><pre style="margin: 0;">{{r.v}}</pre></td>
|
|
||||||
</tr>
|
|
||||||
<tr ng-repeat="r in section.data|filter:infoFilter" ng-if="section.name == 'Modules'" ng-class="{'table-warning' : r.files.length > 1}">
|
|
||||||
<td>{{r.group}}</td>
|
|
||||||
<td>{{r.name}}</td>
|
|
||||||
<td class="text-monospace"><span ng-repeat="v in r.versions">{{v}}<br /></span></td>
|
|
||||||
<td class="text-monospace"><span ng-repeat="f in r.files">{{f}}<br /></span></td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
|
@ -1,12 +0,0 @@
|
||||||
<div class="form-group row">
|
|
||||||
<label class="col-sm-2 col-form-label col-form-label-sm">{{label}}</label>
|
|
||||||
<div class="col-sm-10">
|
|
||||||
<select class="custom-select custom-select-sm is-valid"
|
|
||||||
ng-model="value"
|
|
||||||
ng-required="required"
|
|
||||||
ng-class="{'is-invalid': required && (!value || value.trim() == '')}">
|
|
||||||
<option ng-repeat="t in terms">{{t}}</option>
|
|
||||||
</select>
|
|
||||||
<small class="form-text text-muted" ng-if="!required">(Optional)</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
|
@ -1,10 +0,0 @@
|
||||||
<div class="form-group row">
|
|
||||||
<label class="col-sm-2 col-form-label col-form-label-sm">{{label}}</label>
|
|
||||||
<div class="col-sm-10">
|
|
||||||
<textarea class="form-control form-control-sm is-valid"
|
|
||||||
ng-required="required"
|
|
||||||
ng-class="{'is-invalid': required && (!value || value.trim() == '')}"
|
|
||||||
ng-model="value"></textarea>
|
|
||||||
<small class="form-text text-muted" ng-if="!required">(Optional)</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
|
@ -1,11 +0,0 @@
|
||||||
<div class="form-group row">
|
|
||||||
<label class="col-sm-2 col-form-label col-form-label-sm">{{label}}</label>
|
|
||||||
<div class="col-sm-10">
|
|
||||||
<input type="text" class="form-control form-control-sm is-valid"
|
|
||||||
ng-pattern="mypattern"
|
|
||||||
ng-required="required"
|
|
||||||
ng-class="{'is-invalid': required && (!value || value.trim() == '')}"
|
|
||||||
ng-model="value" />
|
|
||||||
<small class="form-text text-muted" ng-if="!required">(Optional)</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
|
@ -1,8 +0,0 @@
|
||||||
<div class="form-group row">
|
|
||||||
<label class="col-sm-2 col-form-label col-form-label-sm">{{label}}</label>
|
|
||||||
<div class="col-sm-10">
|
|
||||||
<input type="text" readonly="readonly"
|
|
||||||
class="form-control-plaintext form-control-sm"
|
|
||||||
ng-model="value"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
|
@ -1,15 +0,0 @@
|
||||||
<div class="form-group row">
|
|
||||||
<label class="col-sm-2 col-form-label col-form-label-sm">{{label}}</label>
|
|
||||||
<div class="col-sm-10">
|
|
||||||
<div class="input-group input-group-sm">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text">{{prefix}}</span>
|
|
||||||
</div>
|
|
||||||
<input type="text" class="form-control form-control-sm is-valid"
|
|
||||||
ng-required="required"
|
|
||||||
ng-class="{'is-invalid': required && (!suffix || suffix.trim() == '')}"
|
|
||||||
ng-model="suffix" />
|
|
||||||
<small class="form-text text-muted" ng-if="!required">(Optional)</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
|
@ -1,4 +0,0 @@
|
||||||
<p ng-show="list.length > 0">
|
|
||||||
<input type="text" class="form-control form-control-sm" ng-model="filter" placeholder="{{description}}" />
|
|
||||||
<small class="form-text text-muted"><b>{{totalLabel}}:</b> {{(list | filter:filter).length}}</small>
|
|
||||||
</p>
|
|
|
@ -1 +0,0 @@
|
||||||
<h1 class="ml-3 mb-4 mt-3">{{title}}</h1>
|
|
|
@ -1,34 +0,0 @@
|
||||||
<page-title title="Harvesting Protocols"></page-title>
|
|
||||||
|
|
||||||
<div class="container-fluid">
|
|
||||||
|
|
||||||
<p><b>NOTE:</b> Use the api to register new protocols</p>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col">
|
|
||||||
<div class="card mt-4" ng-repeat="prot in protocols">
|
|
||||||
<div class="card-body">
|
|
||||||
<h5 class="card-title">{{prot.id}}</h5>
|
|
||||||
<p class="card-text" ng-if="prot.params.length == 0">No parameters</p>
|
|
||||||
<table class="table table-sm table-striped" ng-if="prot.params.length > 0">
|
|
||||||
<thead>
|
|
||||||
<th style="width: 20%">Parameter</th>
|
|
||||||
<th>Description</th>
|
|
||||||
<th style="width: 15%" class="text-center">Type</th>
|
|
||||||
<th style="width: 15%" class="text-center">Required</th>
|
|
||||||
<th style="width: 15%" class="text-center">Has Sel Function</th>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr ng-repeat="p in prot.params">
|
|
||||||
<th>{{p.name}}</th>
|
|
||||||
<td>{{p.label}}</td>
|
|
||||||
<td class="text-center">{{p.type}}</td>
|
|
||||||
<td class="text-center"><i class="fa fa-check" ng-if="!p.optional"></i></td>
|
|
||||||
<td class="text-center"><i class="fa fa-check" ng-if="p.hasSelFunction"></i></td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
|
@ -1,120 +0,0 @@
|
||||||
<page-title title="{{typeDesc.name}}"></page-title>
|
|
||||||
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col">
|
|
||||||
<p>
|
|
||||||
<button class="btn btn-sm btn-primary" data-toggle="modal" data-target="#newResourceModal" ng-click="prepareNewResource()">create a new resource</button>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<page-filter filter="resFilter" list="resources"></page-filter>
|
|
||||||
|
|
||||||
<div class="card mb-4" ng-repeat="r in resources|filter:resFilter">
|
|
||||||
<div class="card-body small">
|
|
||||||
<span class="badge badge-primary float-right">{{typeDesc.contentType}}</span>
|
|
||||||
<h5 class="card-title" title="{{r.id}}">{{r.name}}</h5>
|
|
||||||
<p class="card-text">{{r.description}}</p>
|
|
||||||
<p class="text-muted small">
|
|
||||||
<b>Id:</b> {{r.id}}<br /> <b>Creation date:</b> {{r.creationDate}}<br /> <b>Modification date:</b> {{r.modificationDate}}
|
|
||||||
</p>
|
|
||||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#editMetadataModal" ng-click="prepareEditMetadata(r)">edit metadata</button>
|
|
||||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#editContentModal" ng-click="prepareEditContent(r)">edit content</button>
|
|
||||||
<a href="./api/resources/{{r.id}}/content" class="btn btn-sm btn-success" target="_blank">raw content</a>
|
|
||||||
<button type="button" class="btn btn-sm btn-danger" ng-click="deleteResource(r)">delete</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Modals -->
|
|
||||||
|
|
||||||
<div class="modal fade" tabindex="-1" id="editMetadataModal">
|
|
||||||
<div class="modal-dialog modal-lg">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h4 class="modal-title">Edit metadata</h4>
|
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
||||||
</div>
|
|
||||||
<form>
|
|
||||||
<div class="modal-body">
|
|
||||||
<div class="form-group">
|
|
||||||
<label>ID</label> <input type="text" readonly class="form-control-plaintext" ng-model="tmpRes.id" />
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Type</label> <input type="text" readonly class="form-control-plaintext" ng-model="tmpRes.type" />
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Name</label> <input type="text" class="form-control" ng-model="tmpRes.name" />
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Description</label>
|
|
||||||
<textarea class="form-control" ng-model="tmpRes.description" rows="3"></textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">Close</button>
|
|
||||||
<button type="submit" class="btn btn-sm btn-primary" data-dismiss="modal" ng-click="saveMetadata(tmpRes.id, tmpRes)" ng-disabled="!tmpRes.id || !tmpRes.name">Submit</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal fade" tabindex="-1" id="newResourceModal">
|
|
||||||
<div class="modal-dialog modal-xl">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h4 class="modal-title">New resource ({{type}})</h4>
|
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
||||||
</div>
|
|
||||||
<form>
|
|
||||||
<div class="modal-body">
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Name</label> <input type="text" class="form-control" ng-model="tmpRes.name" />
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Description</label>
|
|
||||||
<textarea class="form-control" ng-model="tmpRes.description"></textarea>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Content ({{typeDesc.contentType}})</label>
|
|
||||||
<textarea class="form-control" ng-model="tmpRes.content" rows="25"></textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">Close</button>
|
|
||||||
<button type="submit" class="btn btn-sm btn-primary" ng-click="createNewResource(tmpRes)" ng-disabled="!tmpRes.name || !tmpRes.content">Submit</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal fade" tabindex="-1" id="editContentModal">
|
|
||||||
<div class="modal-dialog modal-xl">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h4 class="modal-title">Edit content</h4>
|
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
||||||
</div>
|
|
||||||
<form>
|
|
||||||
<div class="modal-body">
|
|
||||||
<div class="form-group">
|
|
||||||
<label>{{typeDesc.contentType}}</label>
|
|
||||||
<textarea class="form-control" ng-model="tmpContent" rows="25"></textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">Close</button>
|
|
||||||
<button type="submit" class="btn btn-sm btn-primary" ng-click="saveContent(tmpRes.id, tmpContent)" ng-disabled="!tmpContent">Submit</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,108 +0,0 @@
|
||||||
<page-title title="Vocabulary Editor"></page-title>
|
|
||||||
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col">
|
|
||||||
<p>
|
|
||||||
<b>Vocabulary ID: </b>{{vocId}}<br />
|
|
||||||
<b>Vocabulary Name: </b>{{vocInfo.name}}<br />
|
|
||||||
<b>Description: </b>{{vocInfo.description}}
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="btn btn-sm btn-info" href="#!/vocs">Return to vocabulary list</a>
|
|
||||||
<button class="btn btn-sm btn-primary" data-toggle="modal" data-target="#editVocabularyTermModal" ng-click="prepareNewTerm()">create a new term</button>
|
|
||||||
<a class="btn btn-sm btn-success" href="/api/vocs/{{vocId}}/terms" target="_blank">Download</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<page-filter filter="termFilter" list="terms"></page-filter>
|
|
||||||
|
|
||||||
<table class="table table-sm table-striped">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th style="width: 20%">Code</th>
|
|
||||||
<th style="width: 20%">Name</th>
|
|
||||||
<th style="width: 10%">Encoding</th>
|
|
||||||
<th style="width: 40%">Synonyms</th>
|
|
||||||
<th></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr ng-show="(terms|filter:termFilter).length == 0">
|
|
||||||
<td colspan="5" class="text-muted">no terms</td>
|
|
||||||
</tr>
|
|
||||||
<tr ng-repeat="t in terms|filter:termFilter">
|
|
||||||
<th>{{t.code}}</th>
|
|
||||||
<td>{{t.name}}</td>
|
|
||||||
<td><span class="badge badge-warning">{{t.encoding}}</span></td>
|
|
||||||
<td><span class="text-muted" ng-show="t.synonyms.length == 0">0 synonym(s)</span> <span class="badge badge-primary mr-1" ng-repeat="s in t.synonyms">{{s.term}}</span></td>
|
|
||||||
<td align="right">
|
|
||||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#editVocabularyTermModal" ng-click="prepareEditTerm(t)">edit</button>
|
|
||||||
<button type="button" class="btn btn-sm btn-danger" ng-click="deleteTerm(t.code)">delete</button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Modals -->
|
|
||||||
|
|
||||||
<div class="modal fade" tabindex="-1" id="editVocabularyTermModal">
|
|
||||||
<form>
|
|
||||||
<div class="modal-dialog modal-lg">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h4 class="modal-title" ng-if="mode == 'new'">New term</h4>
|
|
||||||
<h4 class="modal-title" ng-if="mode == 'edit'">Edit term</h4>
|
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<form-textfield label="Code" value="tmpTerm.code"></form-textfield>
|
|
||||||
<form-textfield label="Name" value="tmpTerm.name"></form-textfield>
|
|
||||||
<form-textfield label="Encoding" value="tmpTerm.encoding" optional="true"></form-textfield>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<table class="table table-sm table-striped">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Synonym</th>
|
|
||||||
<th>Encoding</th>
|
|
||||||
<th></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr ng-show="tmpTerm.synonyms.length == 0">
|
|
||||||
<td colspan="3">0 synonym(s)</td>
|
|
||||||
</tr>
|
|
||||||
<tr ng-repeat="s in tmpTerm.synonyms">
|
|
||||||
<td>{{s.term}}</td>
|
|
||||||
<td>{{s.encoding}}</td>
|
|
||||||
<td align="right"><button class="btn btn-sm btn-danger" type="button" ng-click="tmpTerm.synonyms.splice($index, 1)">
|
|
||||||
<i class="fa fa-trash"></i>
|
|
||||||
</button></td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
<tfoot>
|
|
||||||
<tr ng-init="newSynomym=newEncoding=''">
|
|
||||||
<td><input type="text" class="form-control form-control-sm" placeholder="new synomym..." ng-model="newSynomym" /></td>
|
|
||||||
<td><input type="text" class="form-control form-control-sm" placeholder="encoding..." ng-model="newEncoding" /></td>
|
|
||||||
<td align="right">
|
|
||||||
<button type="button" class="btn btn-sm btn-outline-success" ng-click="tmpTerm.synonyms.push({'term': newSynomym, 'encoding': newEncoding}); newSynomym=newEncoding=''" ng-disabled="!newSynomym">
|
|
||||||
<i class="fa fa-plus"></i>
|
|
||||||
</button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tfoot>
|
|
||||||
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">Close</button>
|
|
||||||
<button type="submit" class="btn btn-sm btn-primary" data-dismiss="modal" ng-click="saveTerm(tmpTerm)" ng-disabled="newSynomym || !tmpTerm.code || !tmpTerm.name">Submit</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
|
@ -1,64 +0,0 @@
|
||||||
<page-title title="Vocabularies"></page-title>
|
|
||||||
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col">
|
|
||||||
<p>
|
|
||||||
<button class="btn btn-sm btn-primary" data-toggle="modal" data-target="#editVocabularyModal" ng-click="prepareNewVoc()">create a new vocabulary</button>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<page-filter filter="vocFilter" list="vocabularies"></page-filter>
|
|
||||||
|
|
||||||
<table class="table table-sm table-striped">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th style="width: 25%">ID</th>
|
|
||||||
<th style="width: 25%">Name</th>
|
|
||||||
<th>Description</th>
|
|
||||||
<th></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr ng-show="(vocabularies|filter:vocFilter).length == 0">
|
|
||||||
<td colspan="4" class="text-muted">no vocabularies</td>
|
|
||||||
</tr>
|
|
||||||
<tr ng-repeat="v in vocabularies|filter:vocFilter">
|
|
||||||
<th><a href="#!/vocabularyEditor?id={{v.id}}">{{v.id}}</a></th>
|
|
||||||
<td>{{v.name}}</td>
|
|
||||||
<td>{{v.description}}</td>
|
|
||||||
<td align="right">
|
|
||||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#editVocabularyModal" ng-click="prepareEditVoc(v)">edit</button>
|
|
||||||
<button type="button" class="btn btn-sm btn-danger" ng-click="deleteVocabulary(v.id)">delete</button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Modals -->
|
|
||||||
|
|
||||||
<div class="modal fade" tabindex="-1" id="editVocabularyModal">
|
|
||||||
<form>
|
|
||||||
<div class="modal-dialog modal-lg">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h4 class="modal-title" ng-if="mode == 'new'">New vocabulary</h4>
|
|
||||||
<h4 class="modal-title" ng-if="mode == 'edit'">Edit vocabulary</h4>
|
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<form-textfield label="ID" value="tmpVoc.id" ng-show="mode == 'new'"></form-textfield>
|
|
||||||
<form-textfield-static label="ID" value="tmpVoc.id" ng-show="mode == 'edit'"></form-textfield-static>
|
|
||||||
<form-textfield label="Name" value="tmpVoc.name"></form-textfield>
|
|
||||||
<form-textarea label="Description" value="tmpVoc.description" optional="true"></form-textarea>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">Close</button>
|
|
||||||
<button type="submit" class="btn btn-sm btn-primary" data-dismiss="modal" ng-click="saveVocabulary(tmpVoc)" ng-disabled="!tmpVoc.id || !tmpVoc.name">Submit</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
|
@ -1,131 +0,0 @@
|
||||||
<page-title title="Workflow History"></page-title>
|
|
||||||
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col">
|
|
||||||
|
|
||||||
<page-filter filter="wfFilter" list="workflows"></page-filter>
|
|
||||||
|
|
||||||
<p class="text-muted">
|
|
||||||
<span ng-show="fromDate < 0 && toDate < 0"><b>Recent workflows</b> (max {{maxNumberOfRecentWfs}})</span>
|
|
||||||
<span ng-show="fromDate >= 0 && toDate >= 0"><b>Workflows from </b>{{fromDate | date:"yyyy-MM-dd HH:mm:ss"}} <b>to</b> {{toDate | date:"yyyy-MM-dd HH:mm:ss"}}</span>
|
|
||||||
<span ng-show="fromDate >= 0 && toDate < 0"><b>Workflows from </b>{{fromDate | date:"yyyy-MM-dd HH:mm:ss"}} <b>to</b> <i>undefined</i></span>
|
|
||||||
<span ng-show="fromDate < 0 && toDate >= 0"><b>Workflows from </b><i>undefined</i> <b>to</b> {{toDate | date:"yyyy-MM-dd HH:mm:ss"}}</span>
|
|
||||||
<br />
|
|
||||||
<span><b>Count :</b> {{(workflows | filter:wfFilter).length}}</span>
|
|
||||||
</p>
|
|
||||||
<table class="table table-sm table-striped small">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th style="width: 10%">
|
|
||||||
<a href="javascript:void(0)" ng-click="sortField = 'processId'; sortReverse = !sortReverse">
|
|
||||||
Process Id
|
|
||||||
<i ng-show="sortField == 'processId' && !sortReverse" class="fa fa-angle-down"></i>
|
|
||||||
<i ng-show="sortField == 'processId' && sortReverse" class="fa fa-angle-up"></i>
|
|
||||||
</a>
|
|
||||||
</th>
|
|
||||||
<th style="width: 20%">
|
|
||||||
<a href="javascript:void(0)" ng-click="sortField = 'name'; sortReverse = !sortReverse">
|
|
||||||
Workflow Name
|
|
||||||
<i ng-show="sortField == 'name' && !sortReverse" class="fa fa-angle-down"></i>
|
|
||||||
<i ng-show="sortField == 'name' && sortReverse" class="fa fa-angle-up"></i>
|
|
||||||
</a>
|
|
||||||
</th>
|
|
||||||
<th style="width: 10%">
|
|
||||||
<a href="javascript:void(0)" ng-click="sortField = 'family'; sortReverse = !sortReverse">
|
|
||||||
Workflow Family
|
|
||||||
<i ng-show="sortField == 'family' && !sortReverse" class="fa fa-angle-down"></i>
|
|
||||||
<i ng-show="sortField == 'family' && sortReverse" class="fa fa-angle-up"></i>
|
|
||||||
</a>
|
|
||||||
</th>
|
|
||||||
<th style="width: 30%">
|
|
||||||
<a href="javascript:void(0)" ng-click="sortField = 'dsName'; sortReverse = !sortReverse">
|
|
||||||
Datasource
|
|
||||||
<i ng-show="sortField == 'dsName' && !sortReverse" class="fa fa-angle-down"></i>
|
|
||||||
<i ng-show="sortField == 'dsName' && sortReverse" class="fa fa-angle-up"></i>
|
|
||||||
</a>
|
|
||||||
</th>
|
|
||||||
<th style="width: 10%">
|
|
||||||
<a href="javascript:void(0)" ng-click="sortField = 'status'; sortReverse = !sortReverse">
|
|
||||||
Status
|
|
||||||
<i ng-show="sortField == 'status' && !sortReverse" class="fa fa-angle-down"></i>
|
|
||||||
<i ng-show="sortField == 'status' && sortReverse" class="fa fa-angle-up"></i>
|
|
||||||
</a>
|
|
||||||
</th>
|
|
||||||
<th style="width: 10%">
|
|
||||||
<a href="javascript:void(0)" ng-click="sortField = 'startDate'; sortReverse = !sortReverse">
|
|
||||||
Start Date
|
|
||||||
<i ng-show="sortField == 'startDate' && !sortReverse" class="fa fa-angle-down"></i>
|
|
||||||
<i ng-show="sortField == 'startDate' && sortReverse" class="fa fa-angle-up"></i>
|
|
||||||
</a>
|
|
||||||
</th>
|
|
||||||
<th style="width: 10%">
|
|
||||||
<a href="javascript:void(0)" ng-click="sortField = 'endDate'; sortReverse = !sortReverse">
|
|
||||||
End Date
|
|
||||||
<i ng-show="sortField == 'endDate' && !sortReverse" class="fa fa-angle-down"></i>
|
|
||||||
<i ng-show="sortField == 'endDate' && sortReverse" class="fa fa-angle-up"></i>
|
|
||||||
</a>
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr ng-show="(workflows|filter:wfFilter).length == 0">
|
|
||||||
<td colspan="7" class="text-muted">no workflows</td>
|
|
||||||
</tr>
|
|
||||||
<tr ng-repeat="wf in workflows | orderBy:sortField:sortReverse | filter:wfFilter">
|
|
||||||
<th><a href="javascript:void(0)" data-toggle="modal" data-target="#showWfDetailsModal" ng-click="setCurrentWf(wf)">{{wf.processId}}</a></th>
|
|
||||||
<td>{{wf.name}}</td>
|
|
||||||
<td>{{wf.family}}</td>
|
|
||||||
<td>{{wf.dsName}}</td>
|
|
||||||
<td><span class="badge" ng-class="{
|
|
||||||
'badge-success' : (wf.status == 'success'),
|
|
||||||
'badge-danger' : (wf.status == 'failure'),
|
|
||||||
'badge-primary' : (wf.status != 'success') && (wf.status != 'failure')
|
|
||||||
}">{{wf.status}}</span></td>
|
|
||||||
<td>{{wf.startDate}}</td>
|
|
||||||
<td>{{wf.endDate}}</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Modals -->
|
|
||||||
|
|
||||||
<div class="modal fade" tabindex="-1" id="showWfDetailsModal">
|
|
||||||
<div class="modal-dialog modal-xl">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h4 class="modal-title">Details</h4>
|
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<p>
|
|
||||||
<b>Started at: </b>{{currentWf.startDate}}<br />
|
|
||||||
<b>Finished at: </b>{{currentWf.endDate}}<br />
|
|
||||||
<b>Duration: </b>{{currentWf.duration}}<br />
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<page-filter filter="detailsFilter" list="currentWf.arrayDetails"></page-filter>
|
|
||||||
|
|
||||||
<table class="table table-sm table-striped small mt-2" style="table-layout: fixed;">
|
|
||||||
<tr ng-repeat="p in currentWf.arrayDetails | filter:detailsFilter">
|
|
||||||
<th style="width: 30%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"><a href="javascript:void(0)" ng-click="setCurrentDetailParam(p.k,p.v)">{{p.k}}</a></th>
|
|
||||||
<td style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">{{p.v}}</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<div class="card card-body bg-light" ng-show="currDetailsKey">
|
|
||||||
<b>{{currDetailsKey}}</b><br />
|
|
||||||
<pre>{{currDetailsValue}}</pre>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">Close</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
|
@ -1,122 +0,0 @@
|
||||||
<!DOCTYPE HTML>
|
|
||||||
|
|
||||||
<html ng-app="isApp">
|
|
||||||
<head>
|
|
||||||
<title>OpenAIRE Tools</title>
|
|
||||||
<link rel="stylesheet" href="common/css/bootstrap.cerulean.min.css" />
|
|
||||||
<link rel="stylesheet" href="common/css/fontawesome-all.min.css" />
|
|
||||||
|
|
||||||
<style type="text/css">
|
|
||||||
td,th {
|
|
||||||
vertical-align: middle !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
label {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.overlaydiv {
|
|
||||||
position: fixed;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
z-index: 10000;
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.grayRectangle {
|
|
||||||
position: absolute;
|
|
||||||
background-color: black;
|
|
||||||
opacity:0.6;
|
|
||||||
top: 30%;
|
|
||||||
left: 40%;
|
|
||||||
width: 20%;
|
|
||||||
height: 20%;
|
|
||||||
z-index: 100;
|
|
||||||
border-radius: 15px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<div id="spinnerdiv" class="overlaydiv">
|
|
||||||
<span class="grayRectangle"><!--The spinner is added on loading here--></span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<nav class="navbar navbar-expand-lg navbar-light bg-light" ng-controller="isMenuController">
|
|
||||||
<a class="navbar-brand" href="./">D-Net</a>
|
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown">
|
|
||||||
<span class="navbar-toggler-icon"></span>
|
|
||||||
</button>
|
|
||||||
<div class="collapse navbar-collapse" id="navbarNavDropdown">
|
|
||||||
<ul class="navbar-nav">
|
|
||||||
<li class="nav-item active">
|
|
||||||
<a class="nav-link" href="./">Home <span class="sr-only">(current)</span></a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item dropdown">
|
|
||||||
<a class="nav-link dropdown-toggle" href="javascript:void(0)" data-toggle="dropdown">Datasources</a>
|
|
||||||
<div class="dropdown-menu">
|
|
||||||
<a class="dropdown-item" href="#!/dsm/search">Search</a>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item dropdown">
|
|
||||||
<a class="nav-link dropdown-toggle" href="javascript:void(0)" data-toggle="dropdown">Configuration</a>
|
|
||||||
<div class="dropdown-menu">
|
|
||||||
<h6 class="dropdown-header">Simple resources</h6>
|
|
||||||
<a ng-repeat="t in resTypes" ng-if="t.simple"
|
|
||||||
class="dropdown-item"
|
|
||||||
href="#!/resources/{{t.id}}">
|
|
||||||
<span>{{t.name}}</span>
|
|
||||||
<span class="badge badge-primary">{{t.count}}</span>
|
|
||||||
</a>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<h6 class="dropdown-header">Advanced resources</h6>
|
|
||||||
<a ng-repeat="t in resTypes" ng-if="!t.simple"
|
|
||||||
class="dropdown-item"
|
|
||||||
href="#!/resources/{{t.id}}">
|
|
||||||
<span>{{t.name}}</span>
|
|
||||||
<span class="badge badge-primary">{{t.count}}</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item dropdown">
|
|
||||||
<a class="nav-link dropdown-toggle" href="javascript:void(0)" data-toggle="dropdown">Logs</a>
|
|
||||||
<div class="dropdown-menu">
|
|
||||||
<a class="dropdown-item" href="#!/wf_history/100">Workflow history</a>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item dropdown">
|
|
||||||
<a class="nav-link dropdown-toggle" href="javascript:void(0)" data-toggle="dropdown">Info</a>
|
|
||||||
<div class="dropdown-menu">
|
|
||||||
<a class="dropdown-item" href="#!/info">Container Info</a>
|
|
||||||
<a class="dropdown-item" href="./docs" target="_blank">API documentation</a>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<div ng-view></div>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
|
|
||||||
<script src="common/js/jquery.min.js"></script>
|
|
||||||
<script src="common/js/popper.min.js"></script>
|
|
||||||
<script src="common/js/bootstrap.min.js"></script>
|
|
||||||
<script src="common/js/angular.min.js"></script>
|
|
||||||
<script src="common/js/angular-route.min.js"></script>
|
|
||||||
<script src="common/js/spin.js"></script>
|
|
||||||
|
|
||||||
<script src="js/is_utils.js"></script>
|
|
||||||
<script src="js/is_main.js"></script>
|
|
||||||
<script src="js/is_simple_ctrls.js"></script>
|
|
||||||
<script src="js/dsm_ctrls.js"></script>
|
|
||||||
<script src="js/ctx_ctrls.js"></script>
|
|
||||||
<script src="js/res_ctrls.js"></script>
|
|
||||||
<script src="js/voc_ctrls.js"></script>
|
|
||||||
<script src="js/wf_ctrls.js"></script>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</html>
|
|
|
@ -1,99 +0,0 @@
|
||||||
app.controller('ctxListController', function($scope, $http) {
|
|
||||||
$scope.contexts = [];
|
|
||||||
$scope.tmpCtx = {};
|
|
||||||
$scope.mode = '';
|
|
||||||
|
|
||||||
call_http_get($http, './ajax/contexts/?' + $.now(), function(res) {
|
|
||||||
$scope.contexts = res.data;
|
|
||||||
});
|
|
||||||
|
|
||||||
$scope.prepareNewCtx = function() {
|
|
||||||
$scope.mode = 'new';
|
|
||||||
$scope.tmpCtx = {
|
|
||||||
'id' : '',
|
|
||||||
'label' : '',
|
|
||||||
'type' : '',
|
|
||||||
'parameters' : []
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.prepareEditCtx = function(ctx) {
|
|
||||||
$scope.mode = 'edit';
|
|
||||||
$scope.tmpCtx = angular.copy(ctx);
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.saveContext = function(ctx) {
|
|
||||||
if ($scope.mode == 'new') {
|
|
||||||
var found = false;
|
|
||||||
|
|
||||||
angular.forEach($scope.contexts, function(v) {
|
|
||||||
if (ctx.id == ctx.id) { found = true; };
|
|
||||||
});
|
|
||||||
|
|
||||||
if (found) {
|
|
||||||
alert("Insertion failed: context already exists !");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
json_http_post($http,'./ajax/contexts/?' + $.now(), ctx, function(res) {
|
|
||||||
$scope.contexts = res.data;
|
|
||||||
alert("Context saved");
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.deleteContext = function(id) {
|
|
||||||
if (confirm("Are you sure ?")) {
|
|
||||||
call_http_delete($http, './ajax/contexts/' + encodeURIComponent(id) + '?' + $.now(), function(res) {
|
|
||||||
$scope.contexts = res.data;
|
|
||||||
alert("Context deleted");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
// ----------------------------------------------------
|
|
||||||
|
|
||||||
app.controller('ctxViewerController', function($scope, $http, $routeParams) {
|
|
||||||
$scope.ctxId = $routeParams.id;
|
|
||||||
$scope.ctxInfo = {};
|
|
||||||
$scope.categories = [];
|
|
||||||
$scope.parameters = [];
|
|
||||||
|
|
||||||
var url = './ajax/contexts/' + encodeURIComponent($scope.ctxId);
|
|
||||||
|
|
||||||
call_http_get($http, url + '?' + $.now(), function(res) {
|
|
||||||
$scope.ctxInfo = res.data;
|
|
||||||
|
|
||||||
call_http_get($http, url + '/categories?' + $.now(), function(res) {
|
|
||||||
$scope.categories = res.data;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$scope.loadContextParameters = function() {
|
|
||||||
$scope.parameters = [];
|
|
||||||
call_http_get($http, './ajax/contexts/' + encodeURIComponent($scope.ctxId) + '?' + $.now(), function(res) {
|
|
||||||
$scope.parameters = res.data.parameters;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.populateNode = function(level, node) {
|
|
||||||
$scope.url = './ajax/contexts/'
|
|
||||||
+ encodeURIComponent(level)
|
|
||||||
+ '/'
|
|
||||||
+ encodeURIComponent(node.id)
|
|
||||||
+ '/concepts';
|
|
||||||
|
|
||||||
node.populated = true;
|
|
||||||
|
|
||||||
call_http_get($http, $scope.url + '?' + $.now(), function(res) {
|
|
||||||
node.concepts = res.data;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.initShowParameters = function(params) {
|
|
||||||
$scope.parameters = params;
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
|
@ -1,123 +0,0 @@
|
||||||
app.controller('dsmSearchController', function($scope, $http, $location, $timeout) {
|
|
||||||
$scope.browseFieldId = "";
|
|
||||||
$scope.browseFieldName = "";
|
|
||||||
$scope.browseData = [];
|
|
||||||
|
|
||||||
$scope.browsableFields = [];
|
|
||||||
|
|
||||||
call_http_get($http, './ajax/dsm/browsableFields' , function(res) {
|
|
||||||
$scope.browsableFields = res.data;
|
|
||||||
});
|
|
||||||
|
|
||||||
$scope.browseField = function(id, label) {
|
|
||||||
$scope.browseFieldId = id;
|
|
||||||
$scope.browseFieldName = name;
|
|
||||||
$scope.browseData = [];
|
|
||||||
|
|
||||||
call_http_get($http, './ajax/dsm/browse/' + encodeURIComponent(id) + '?' + $.now(), function(res) {
|
|
||||||
$scope.browseData = res.data;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.search = function(field, value) {
|
|
||||||
var path = "/dsm/results";
|
|
||||||
if (field) { path += '/' + encodeURIComponent(field); }
|
|
||||||
path += '/0/100';
|
|
||||||
|
|
||||||
$timeout(function() {
|
|
||||||
$location.path(path).search('value', value);
|
|
||||||
}, 1000);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// ----------------------------------------------------
|
|
||||||
|
|
||||||
app.controller('dsmResultsController', function($scope, $http, $location, $routeParams) {
|
|
||||||
$scope.field = $routeParams.field;
|
|
||||||
$scope.value = $routeParams.value;
|
|
||||||
$scope.pageSize = $routeParams.size;
|
|
||||||
$scope.currPage = $routeParams.page;
|
|
||||||
|
|
||||||
$scope.nResults = 0;
|
|
||||||
$scope.results = [];
|
|
||||||
$scope.nPages = 0;
|
|
||||||
|
|
||||||
var url = './ajax/dsm/';
|
|
||||||
if ($scope.field) { url += 'searchByField/' + encodeURIComponent($scope.field); }
|
|
||||||
else { url += 'search' }
|
|
||||||
url += '/' + $scope.currPage + '/' + $scope.pageSize;
|
|
||||||
url += '?value=' + encodeURIComponent($scope.value) + '&' + $.now();
|
|
||||||
|
|
||||||
call_http_get($http, url, function(res) {
|
|
||||||
$scope.results = res.data.content;
|
|
||||||
$scope.nResults = res.data.totalElements;
|
|
||||||
$scope.currPage = res.data.number;
|
|
||||||
$scope.nPages = res.data.totalPages;
|
|
||||||
});
|
|
||||||
|
|
||||||
$scope.gotoPage = function(page) {
|
|
||||||
$scope.results = [];
|
|
||||||
var path = "/dsm/results";
|
|
||||||
if ($scope.field) { path += '/' + encodeURIComponent($scope.field); }
|
|
||||||
path += '/' + page + '/' + $scope.pageSize;
|
|
||||||
$location.path(path).search('value', $scope.value);
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
// ----------------------------------------------------
|
|
||||||
|
|
||||||
app.controller('dsmApiController', function($scope, $http, $routeParams) {
|
|
||||||
$scope.apiId = $routeParams.id;
|
|
||||||
$scope.api = {};
|
|
||||||
|
|
||||||
call_http_get($http, './ajax/dsm/api?id=' + encodeURIComponent($scope.apiId) , function(res) {
|
|
||||||
$scope.api = res.data;
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
// ----------------------------------------------------
|
|
||||||
|
|
||||||
app.controller('dsmAddApiController', function($scope, $http, $routeParams) {
|
|
||||||
$scope.dsName = $routeParams.dsName;
|
|
||||||
$scope.prefix = 'api_________::' + $routeParams.dsId + '::';
|
|
||||||
$scope.api = {}
|
|
||||||
|
|
||||||
$scope.protocols = [];
|
|
||||||
$scope.protocolsMap = {};
|
|
||||||
$scope.compatibilityLevels = [];
|
|
||||||
$scope.contentDescTypes = [];
|
|
||||||
|
|
||||||
$scope.selProtParams = [];
|
|
||||||
|
|
||||||
$scope.$watch('api.protocol', function() {
|
|
||||||
if ($scope.api.protocol) {
|
|
||||||
$scope.selProtParams = $scope.protocolsMap[$scope.api.protocol];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
call_http_get($http, './ajax/dsm/conf' , function(res) {
|
|
||||||
$scope.protocols = [];
|
|
||||||
$scope.protocolsMap = {};
|
|
||||||
angular.forEach(res.data.protocols, function(prot) {
|
|
||||||
$scope.protocols.push(prot.id);
|
|
||||||
$scope.protocolsMap[prot.id] = prot.params;
|
|
||||||
});
|
|
||||||
|
|
||||||
$scope.compatibilityLevels = res.data.compatibilityLevels;
|
|
||||||
$scope.contentDescTypes = res.data.contentDescTypes;
|
|
||||||
});
|
|
||||||
|
|
||||||
$scope.save = function() {
|
|
||||||
var record = angular.copy($scope.api);
|
|
||||||
record.id = $scope.prefix + record.id;
|
|
||||||
record.datasource = $routeParams.dsId;
|
|
||||||
|
|
||||||
json_http_post($http, './ajax/dsm/api', record, function(res) {
|
|
||||||
$scope.api = res.data;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
|
@ -1,147 +0,0 @@
|
||||||
var app = angular.module('isApp', ['ngRoute']);
|
|
||||||
|
|
||||||
app.config(['$routeProvider', function($routeProvider) {
|
|
||||||
$routeProvider
|
|
||||||
.when('/info', { templateUrl: './html/info.html', controller: 'infoController' })
|
|
||||||
.when('/wf_history/:total', { templateUrl: './html/wf_history.html', controller: 'wfHistoryController' })
|
|
||||||
.when('/protocols', { templateUrl: './html/protocols.html', controller: 'protocolsController' })
|
|
||||||
.when('/resources/:type', { templateUrl: './html/resources.html', controller: 'resourcesController' })
|
|
||||||
.when('/contexts', { templateUrl: './html/contexts.html', controller: 'ctxListController' })
|
|
||||||
.when('/context/:id', { templateUrl: './html/context_viewer.html', controller: 'ctxViewerController' })
|
|
||||||
.when('/vocs', { templateUrl: './html/vocs.html', controller: 'vocListController' })
|
|
||||||
.when('/vocabularyEditor', { templateUrl: './html/voc_editor.html', controller: 'vocEditorController' })
|
|
||||||
.when('/dsm/search', { templateUrl: './html/dsm_search.html', controller: 'dsmSearchController' })
|
|
||||||
.when('/dsm/results/:page/:size', { templateUrl: './html/dsm_results.html', controller: 'dsmResultsController' })
|
|
||||||
.when('/dsm/results/:field/:page/:size', { templateUrl: './html/dsm_results.html', controller: 'dsmResultsController' })
|
|
||||||
.when('/dsm/addApi', { templateUrl: './html/dsm_add_api.html', controller: 'dsmAddApiController' })
|
|
||||||
.when('/dsm/api', { templateUrl: './html/dsm_api.html', controller: 'dsmApiController' })
|
|
||||||
.otherwise({ redirectTo: '/info' });
|
|
||||||
}
|
|
||||||
]);
|
|
||||||
|
|
||||||
app.directive('pageTitle', function() {
|
|
||||||
return {
|
|
||||||
restrict: 'E',
|
|
||||||
scope: { 'title': '@' },
|
|
||||||
templateUrl: './html/parts/page_title.html',
|
|
||||||
link: function(scope, element, attrs) {}
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
app.directive('pageFilter', function() {
|
|
||||||
return {
|
|
||||||
restrict: 'E',
|
|
||||||
scope: {
|
|
||||||
'filter' : '=',
|
|
||||||
'list' : '=',
|
|
||||||
'description' : '@',
|
|
||||||
'totalLabel' : '@'
|
|
||||||
},
|
|
||||||
templateUrl: './html/parts/page_filter.html',
|
|
||||||
link: function(scope, element, attrs) {
|
|
||||||
if (!scope.description) {
|
|
||||||
scope.description = 'Filter...';
|
|
||||||
}
|
|
||||||
if (!scope.totalLabel) {
|
|
||||||
scope.totalLabel = 'Total';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
app.directive('formTextfield', function() {
|
|
||||||
return {
|
|
||||||
restrict: 'E',
|
|
||||||
scope: {
|
|
||||||
'label' : '@',
|
|
||||||
'regex' : '@',
|
|
||||||
'optional' : '@',
|
|
||||||
'type' : '@',
|
|
||||||
'value' : '=',
|
|
||||||
},
|
|
||||||
templateUrl: './html/parts/form_textfield.html',
|
|
||||||
link: function(scope, element, attrs) {
|
|
||||||
scope.required = (scope.optional != 'true');
|
|
||||||
if (scope.regex) { scope.mypattern = new RegExp(scope.regex); }
|
|
||||||
else if (scope.type == 'NUMBER') { scope.mypattern = new RegExp("^[-+]?[0-9]+(\.[0-9]+)?$"); }
|
|
||||||
else if (scope.type == 'BOOLEAN') { scope.mypattern = new RegExp("^(true|false)$"); }
|
|
||||||
else { scope.mypattern = new RegExp(".+"); }
|
|
||||||
}
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
app.directive('formTextfieldStatic', function() {
|
|
||||||
return {
|
|
||||||
restrict: 'E',
|
|
||||||
scope: {
|
|
||||||
'label' : '@',
|
|
||||||
'value' : '=',
|
|
||||||
},
|
|
||||||
templateUrl: './html/parts/form_textfield_static.html',
|
|
||||||
link: function(scope, element, attrs) {}
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
app.directive('formTextfieldWithPrefix', function() {
|
|
||||||
return {
|
|
||||||
restrict: 'E',
|
|
||||||
scope: {
|
|
||||||
'label' : '@',
|
|
||||||
'prefix' : '@',
|
|
||||||
'optional' : '@',
|
|
||||||
'value' : '='
|
|
||||||
},
|
|
||||||
templateUrl: './html/parts/form_textfield_with_prefix.html',
|
|
||||||
link: function(scope, element, attrs) {
|
|
||||||
scope.suffix = '';
|
|
||||||
scope.required = (scope.optional != 'true');
|
|
||||||
|
|
||||||
scope.$watch('suffix', function() {
|
|
||||||
var tmpId = scope.prefix + scope.suffix;
|
|
||||||
|
|
||||||
if (scope.suffix && scope.suffix.trim() != '') {
|
|
||||||
scope.value = tmpId;
|
|
||||||
} else {
|
|
||||||
scope.value = null;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
app.directive('formSelect', function() {
|
|
||||||
return {
|
|
||||||
restrict: 'E',
|
|
||||||
scope: {
|
|
||||||
'label' : '@',
|
|
||||||
'optional' : '@',
|
|
||||||
'terms' : '=',
|
|
||||||
'value' : '=',
|
|
||||||
|
|
||||||
},
|
|
||||||
templateUrl: './html/parts/form_select.html',
|
|
||||||
link: function(scope, element, attrs) {
|
|
||||||
scope.required = (scope.optional != 'true');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
app.directive('formTextarea', function() {
|
|
||||||
return {
|
|
||||||
restrict: 'E',
|
|
||||||
scope: {
|
|
||||||
'label' : '@',
|
|
||||||
'optional' : '@',
|
|
||||||
'value' : '=',
|
|
||||||
},
|
|
||||||
templateUrl: './html/parts/form_textarea.html',
|
|
||||||
link: function(scope, element, attrs) {
|
|
||||||
scope.required = (scope.optional != 'true');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
app.controller('isMenuController', function($scope, $http) {
|
|
||||||
$scope.resTypes = [];
|
|
||||||
|
|
||||||
call_http_get($http, './ajax/resourceTypes' , function(res) {
|
|
||||||
$scope.resTypes = res.data;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// ----------------------------------------------------
|
|
||||||
|
|
||||||
app.controller('infoController', function($scope, $http) {
|
|
||||||
$scope.info = [];
|
|
||||||
|
|
||||||
call_http_get($http, './ajax/info/?' + $.now(), function(res) {
|
|
||||||
angular.forEach(res.data, function(section) {
|
|
||||||
if (section.name != 'Modules') {
|
|
||||||
angular.forEach(section.data, function(r) {
|
|
||||||
if (r.k.toLowerCase().endsWith('path') || r.k.toLowerCase().endsWith('.dirs')) {
|
|
||||||
r.v = r.v.replaceAll(':', ':\n');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$scope.info = res.data;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// ----------------------------------------------------
|
|
||||||
|
|
||||||
app.controller('protocolsController', function($scope, $http) {
|
|
||||||
$scope.protocols = [];
|
|
||||||
|
|
||||||
call_http_get($http, './ajax/protocols/?' + $.now(), function(res) {
|
|
||||||
$scope.protocols = res.data;
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,72 +0,0 @@
|
||||||
// Spinner show/hide methods ~ Andrea Mannocci
|
|
||||||
var spinnerOpts = {
|
|
||||||
lines: 15,
|
|
||||||
length: 16,
|
|
||||||
width: 5,
|
|
||||||
radius: 25,
|
|
||||||
color: '#eeeeee',
|
|
||||||
className: 'spinner',
|
|
||||||
top: '40%'
|
|
||||||
};
|
|
||||||
|
|
||||||
var spinnerTarget = document.getElementById('spinnerdiv');
|
|
||||||
|
|
||||||
var spinner;
|
|
||||||
|
|
||||||
function showSpinner() {
|
|
||||||
spinner = new Spinner(spinnerOpts).spin(spinnerTarget);
|
|
||||||
spinnerTarget.style.visibility = 'visible';
|
|
||||||
}
|
|
||||||
|
|
||||||
function hideSpinner() {
|
|
||||||
spinnerTarget.style.visibility = 'hidden';
|
|
||||||
spinner.stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
function call_http_get($http, url, onSuccess) {
|
|
||||||
showSpinner();
|
|
||||||
|
|
||||||
$http.get(url).then(function successCallback(res) {
|
|
||||||
hideSpinner();
|
|
||||||
onSuccess(res);
|
|
||||||
}, function errorCallback(res) {
|
|
||||||
hideSpinner();
|
|
||||||
alert('ERROR: ' + res.data.error + ' (' + res.data.message + ')');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function call_http_delete($http, url, onSuccess) {
|
|
||||||
showSpinner();
|
|
||||||
|
|
||||||
$http.delete(url).then(function successCallback(res) {
|
|
||||||
hideSpinner();
|
|
||||||
onSuccess(res);
|
|
||||||
}, function errorCallback(res) {
|
|
||||||
hideSpinner();
|
|
||||||
alert('ERROR: ' + res.data.error + ' (' + res.data.message + ')');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function json_http_post($http, url, obj, onSuccess) {
|
|
||||||
showSpinner();
|
|
||||||
$http.defaults.headers.post["Content-Type"] = "application/json;charset=UTF-8";
|
|
||||||
$http.post(url, obj).then(function successCallback(res) {
|
|
||||||
hideSpinner();
|
|
||||||
onSuccess(res);
|
|
||||||
}, function errorCallback(res) {
|
|
||||||
hideSpinner();
|
|
||||||
alert('ERROR: ' + res.data.error + ' (' + res.data.message + ')');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function params_http_post($http, url, params, onSuccess) {
|
|
||||||
showSpinner();
|
|
||||||
$http.defaults.headers.post["Content-Type"] = "application/x-www-form-urlencoded; charset=UTF-8";
|
|
||||||
$http.post(url, params).then(function successCallback(res) {
|
|
||||||
hideSpinner();
|
|
||||||
onSuccess(res);
|
|
||||||
}, function errorCallback(res) {
|
|
||||||
hideSpinner();
|
|
||||||
alert('ERROR: ' + res.data.error + ' (' + res.data.message + ')');
|
|
||||||
});
|
|
||||||
}
|
|
|
@ -1,84 +0,0 @@
|
||||||
app.controller('resourcesController', function($scope, $http, $routeParams, $location) {
|
|
||||||
$scope.resources = [];
|
|
||||||
$scope.tmpRes = {};
|
|
||||||
$scope.tmpContent = "loading...";
|
|
||||||
$scope.type = $routeParams.type;
|
|
||||||
$scope.typeDesc = {};
|
|
||||||
|
|
||||||
$scope.reload = function() {
|
|
||||||
call_http_get($http, './ajax/resourceTypes/' + encodeURIComponent($scope.type) + '?' + $.now(), function(res) {
|
|
||||||
$scope.typeDesc = res.data;
|
|
||||||
});
|
|
||||||
|
|
||||||
call_http_get($http, './ajax/resources/' + encodeURIComponent($scope.type) + '?' + $.now(), function(res) {
|
|
||||||
$scope.resources = res.data;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.prepareNewResource = function() {
|
|
||||||
$scope.tmpRes = {
|
|
||||||
'name' : '',
|
|
||||||
'description' : '',
|
|
||||||
'content' : ''
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.prepareEditMetadata = function(r) {
|
|
||||||
$scope.tmpRes = angular.copy(r);
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.prepareEditContent = function(r) {
|
|
||||||
$scope.tmpRes = angular.copy(r);
|
|
||||||
$scope.tmpContent = "loading...";
|
|
||||||
call_http_get($http, './ajax/resources/' + encodeURIComponent(r.id) + '/content?' + $.now(), function(res) {
|
|
||||||
if (res.data instanceof Object) {
|
|
||||||
$scope.tmpContent = JSON.stringify(res.data, null, "\t");
|
|
||||||
} else {
|
|
||||||
$scope.tmpContent = res.data;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.createNewResource = function(r) {
|
|
||||||
params_http_post($http, './ajax/resources/?' + $.now(), $.param({
|
|
||||||
'name' : r.name,
|
|
||||||
'type' : $scope.type,
|
|
||||||
'description' : r.description,
|
|
||||||
'content' : r.content
|
|
||||||
}), function(res) {
|
|
||||||
alert("Resource saved");
|
|
||||||
$('#newResourceModal').modal('hide');
|
|
||||||
$scope.reload();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.saveMetadata = function(id, md) {
|
|
||||||
json_http_post($http, './ajax/resources/' + encodeURIComponent(id) + '/metadata?' + $.now(), md, function(res) {
|
|
||||||
alert("Resource saved");
|
|
||||||
$scope.reload();
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.saveContent = function(id, content) {
|
|
||||||
params_http_post($http, './ajax/resources/' + encodeURIComponent(id) + '/content?' + $.now(), $.param({
|
|
||||||
'content' : content
|
|
||||||
}), function(res) {
|
|
||||||
alert("Resource saved");
|
|
||||||
$('#editContentModal').modal('hide');
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.deleteResource = function(r) {
|
|
||||||
if (confirm("Are you sure ?")) {
|
|
||||||
call_http_delete($http, './ajax/resources/' + encodeURIComponent(r.id) + '?' + $.now(), function(res) {
|
|
||||||
alert("Resource deleted");
|
|
||||||
$scope.reload();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
if ($scope.type == 'context') { $location.url("/contexts"); }
|
|
||||||
else if ($scope.type == 'vocabulary') { $location.url("/vocs"); }
|
|
||||||
else if ($scope.type == 'protocol') { $location.url("/protocols"); }
|
|
||||||
else { $scope.reload(); }
|
|
||||||
});
|
|
|
@ -1,125 +0,0 @@
|
||||||
app.controller('vocListController', function($scope, $http) {
|
|
||||||
$scope.vocabularies = [];
|
|
||||||
$scope.tmpVoc = {};
|
|
||||||
$scope.mode = '';
|
|
||||||
|
|
||||||
call_http_get($http, './ajax/vocs/?' + $.now(), function(res) {
|
|
||||||
$scope.vocabularies = res.data;
|
|
||||||
});
|
|
||||||
|
|
||||||
$scope.prepareNewVoc = function() {
|
|
||||||
$scope.mode = 'new';
|
|
||||||
$scope.tmpVoc = {
|
|
||||||
'id' : '',
|
|
||||||
'name' : '',
|
|
||||||
'description' : ''
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.prepareEditVoc = function(voc) {
|
|
||||||
$scope.mode = 'edit';
|
|
||||||
$scope.tmpVoc = angular.copy(voc);
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.saveVocabulary = function(voc) {
|
|
||||||
if ($scope.mode == 'new') {
|
|
||||||
var found = false;
|
|
||||||
|
|
||||||
angular.forEach($scope.vocabularies, function(v) {
|
|
||||||
if (voc.id == v.id) { found = true; };
|
|
||||||
});
|
|
||||||
|
|
||||||
if (found) {
|
|
||||||
alert("Insertion failed: vocabulary already exists !");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
json_http_post($http, './ajax/vocs/?' + $.now(), voc, function(res) {
|
|
||||||
$scope.vocabularies = res.data;
|
|
||||||
alert("Vocabulary saved");
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.deleteVocabulary = function(id) {
|
|
||||||
if (confirm("Are you sure ?")) {
|
|
||||||
call_http_delete($http, './ajax/vocs/' + encodeURIComponent(id) + '?' + $.now(), function(res) {
|
|
||||||
$scope.vocabularies = res.data;
|
|
||||||
alert("Vocabulary deleted");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
// ----------------------------------------------------
|
|
||||||
|
|
||||||
app.controller('vocEditorController', function($scope, $http, $routeParams) {
|
|
||||||
$scope.terms = [];
|
|
||||||
$scope.vocId = $routeParams.id;
|
|
||||||
$scope.vocInfo = {};
|
|
||||||
$scope.editTermCode = '';
|
|
||||||
$scope.tmpTerm = {};
|
|
||||||
$scope.mode = '';
|
|
||||||
$scope.currTerm = [];
|
|
||||||
|
|
||||||
$scope.baseUrl = './ajax/vocs/' + encodeURIComponent($scope.vocId);
|
|
||||||
|
|
||||||
call_http_get($http, $scope.baseUrl + '?' + $.now(), function(res) {
|
|
||||||
$scope.vocInfo = res.data;
|
|
||||||
|
|
||||||
call_http_get($http, $scope.baseUrl + '/terms?' + $.now(), function(res) {
|
|
||||||
$scope.terms = res.data;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$scope.setCurrTerm = function(term) {
|
|
||||||
$scope.currTerm = angular.copy(term);
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.prepareNewTerm = function() {
|
|
||||||
$scope.mode = 'new';
|
|
||||||
$scope.editTermCode = '';
|
|
||||||
$scope.tmpTerm = {
|
|
||||||
'code' : '',
|
|
||||||
'name' : '',
|
|
||||||
'encoding' : 'OPENAIRE',
|
|
||||||
'synonyms' : []
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.prepareEditTerm = function(term) {
|
|
||||||
$scope.mode = 'edit';
|
|
||||||
$scope.editTermCode = term.code;
|
|
||||||
$scope.tmpTerm = angular.copy(term);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$scope.saveTerm = function(term) {
|
|
||||||
var url = $scope.baseUrl + '/terms?' + $.now();
|
|
||||||
|
|
||||||
json_http_post($http, url, term, function(res) {
|
|
||||||
if ($scope.editTermCode != '' && $scope.editTermCode != $scope.tmpTerm.code) {
|
|
||||||
var deleteUrl = $scope.baseUrl + '/terms/' + encodeURIComponent($scope.editTermCode) + '?' + $.now();
|
|
||||||
call_http_delete($http, deleteUrl, function(res) {
|
|
||||||
$scope.terms = res.data;
|
|
||||||
alert("Term replaced");
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
$scope.terms = res.data;
|
|
||||||
alert("Term saved");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.deleteTerm = function(code) {
|
|
||||||
if (confirm("Are you sure ?")) {
|
|
||||||
var url = $scope.baseUrl + '/terms/' + encodeURIComponent(code) + '?' + $.now();
|
|
||||||
|
|
||||||
call_http_delete($http, url, function(res) {
|
|
||||||
$scope.terms = res.data;
|
|
||||||
alert("Term deleted");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
});
|
|
|
@ -1,93 +0,0 @@
|
||||||
app.controller('wfHistoryController', function($scope, $http, $routeParams) {
|
|
||||||
$scope.fromDate = $routeParams.from;
|
|
||||||
$scope.toDate = $routeParams.to;
|
|
||||||
$scope.maxNumberOfRecentWfs = $routeParams.total;
|
|
||||||
|
|
||||||
$scope.workflows = [];
|
|
||||||
$scope.currentWf = {};
|
|
||||||
$scope.currDetailsKey = '';
|
|
||||||
$scope.currDetailsValue = '';
|
|
||||||
$scope.sortField = 'processId';
|
|
||||||
$scope.sortReverse = false;
|
|
||||||
|
|
||||||
$scope.reload = function() {
|
|
||||||
var url = './ajax/wfs/?' + $.now();
|
|
||||||
|
|
||||||
url += "&total=" + $scope.maxNumberOfRecentWfs;
|
|
||||||
|
|
||||||
if ($scope.fromDate > 0) { url += "&from=" + $scope.fromDate; }
|
|
||||||
if ($scope.toDate > 0) { url += "&to=" + $scope.toDate; }
|
|
||||||
|
|
||||||
call_http_get($http, url, function(res) {
|
|
||||||
$scope.workflows = res.data;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.setCurrentWf = function(wf) {
|
|
||||||
$scope.currentWf = angular.copy(wf);
|
|
||||||
$scope.currDetailsKey = '';
|
|
||||||
$scope.currDetailsValue = '';
|
|
||||||
$scope.currentWf.arrayDetails = [];
|
|
||||||
$scope.currentWf.duration = $scope.calculateDateDiff(parseInt(wf.details['system:startDate']), parseInt(wf.details['system:endDate']));
|
|
||||||
|
|
||||||
angular.forEach(wf.details, function(v,k) {
|
|
||||||
$scope.currentWf.arrayDetails.push({'k':k, 'v':v});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.setCurrentDetailParam = function(k, v) {
|
|
||||||
$scope.currDetailsKey = k;
|
|
||||||
$scope.currDetailsValue = v;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$scope.calculateDateDiff = function(start, end) {
|
|
||||||
if (start <= 0 || end <= 0) {
|
|
||||||
return '-';
|
|
||||||
}
|
|
||||||
var seconds = 0;
|
|
||||||
var minutes = 0;
|
|
||||||
var hours = 0;
|
|
||||||
var days = 0;
|
|
||||||
|
|
||||||
if (end > start) {
|
|
||||||
seconds = Math.round((end - start) / 1000);
|
|
||||||
if (seconds > 60) {
|
|
||||||
minutes = Math.floor(seconds / 60);
|
|
||||||
seconds = seconds % 60;
|
|
||||||
if (minutes > 60) {
|
|
||||||
hours = Math.floor(minutes / 60);
|
|
||||||
minutes = minutes % 60;
|
|
||||||
if (hours > 24) {
|
|
||||||
days = Math.floor(hours / 24);
|
|
||||||
hours = hours % 24;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var res = '';
|
|
||||||
if (days > 0) {
|
|
||||||
if (res) { res += ', '; }
|
|
||||||
res += days + " day(s)"
|
|
||||||
}
|
|
||||||
if (hours > 0) {
|
|
||||||
if (res) { res += ', '; }
|
|
||||||
res += hours + " hour(s)"
|
|
||||||
}
|
|
||||||
if (minutes > 0) {
|
|
||||||
if (res) { res += ', '; }
|
|
||||||
res += minutes + " minute(s)"
|
|
||||||
}
|
|
||||||
if (seconds > 0) {
|
|
||||||
if (res) { res += ', '; }
|
|
||||||
res += seconds + " second(s)"
|
|
||||||
}
|
|
||||||
if (!res) {
|
|
||||||
res = '0 seconds';
|
|
||||||
}
|
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.reload();
|
|
||||||
});
|
|
Loading…
Reference in New Issue