2021-01-25 14:16:37 +01:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<title>Metadata Store Manager</title>
|
|
|
|
<link rel="stylesheet" href="./css/bootstrap.min.css" />
|
|
|
|
<link rel="stylesheet" href="./css/bootstrap-theme.min.css" />
|
|
|
|
<script src="./js/jquery-1.12.3.min.js"></script>
|
|
|
|
<script src="./js/bootstrap.min.js"></script>
|
|
|
|
<script src="./js/angular.min.js"></script>
|
|
|
|
<script src="./js/mdstoremanager.js"></script>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
td {
|
|
|
|
vertical-align: middle !important;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
|
|
|
<body ng-app="mdstoreManagerApp" ng-controller="mdstoreManagerController">
|
2021-01-28 11:02:04 +01:00
|
|
|
<div class="container-fluid">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-12">
|
|
|
|
<h1>Metadata Store Manager</h1>
|
|
|
|
|
|
|
|
<hr />
|
2021-02-10 12:34:21 +01:00
|
|
|
<a href="./swagger-ui.html" target="_blank">API documentation</a>
|
2021-01-28 11:02:04 +01:00
|
|
|
<hr />
|
|
|
|
<a href="javascript:void(0)" data-toggle="modal" data-target="#newMdstoreModal">create a new mdstore</a>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<p ng-show="mdstores.length > 0">
|
|
|
|
<input type="text" class="form-control form-control-sm" ng-model="mdstoreFilter" placeholder="Filter..."/>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<div class="panel panel-primary" ng-repeat="md in mdstores | filter:mdstoreFilter">
|
|
|
|
<div class="panel-heading">{{md.id}}</div>
|
|
|
|
|
|
|
|
<table class="table table-striped small">
|
|
|
|
<tr>
|
|
|
|
<th class="col-xs-4">Format / Layout / Interpretation</th>
|
|
|
|
<td class="col-xs-8">{{md.format}} / {{md.layout}} / {{md.interpretation}}</td>
|
|
|
|
</tr><tr>
|
|
|
|
<th class="col-xs-4">Datasource</th>
|
|
|
|
<td class="col-xs-8">
|
|
|
|
<span ng-if="md.datasourceName">
|
|
|
|
{{md.datasourceName}}<br />
|
|
|
|
<small>
|
|
|
|
<b>id: </b>{{md.datasourceId}}
|
|
|
|
<b>api: </b>{{md.apiId}}
|
|
|
|
</small>
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
</tr><tr>
|
|
|
|
<th class="col-xs-4">Creation Date</th>
|
|
|
|
<td class="col-xs-8" title="{{md.creationDate}}">{{md.creationDate | date:"fullDate"}}</td>
|
|
|
|
</tr><tr>
|
|
|
|
<th class="col-xs-4">Last Update</th>
|
|
|
|
<td class="col-xs-8" title="{{md.lastUpdate}}">{{md.lastUpdate | date:"fullDate"}}</td>
|
|
|
|
</tr><tr>
|
|
|
|
<th class="col-xs-4">Size</th>
|
|
|
|
<td class="col-xs-8">{{md.size}}</td>
|
|
|
|
</tr><tr>
|
|
|
|
<th class="col-xs-4">HDFS Path</th>
|
|
|
|
<td class="col-xs-8">{{md.hdfsPath}}</td>
|
|
|
|
</tr><tr>
|
|
|
|
<th class="col-xs-4">Versions</th>
|
|
|
|
<td class="col-xs-8">
|
|
|
|
<a href="javascript:void(0)" ng-click="listVersions(md.id, md.currentVersion)" data-toggle="modal" data-target="#versionsModal" title="Current: {{md.currentVersion}}">{{md.numberOfVersions}} version(s)</a> /
|
|
|
|
<a href="javascript:void(0)" ng-click="prepareVersion(md.id, md.currentVersion)" data-toggle="modal" data-target="#versionsModal">prepare new</a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<div class="panel-footer">
|
|
|
|
<button class="btn btn-sm btn-danger" ng-click="deleteMdstore(md.id)">delete</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-01-25 14:16:37 +01:00
|
|
|
|
2021-01-28 11:02:04 +01:00
|
|
|
</div>
|
2021-01-25 14:16:37 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-01-28 11:02:04 +01:00
|
|
|
|
|
|
|
<!-- Modals -->
|
|
|
|
|
2021-01-25 14:16:37 +01:00
|
|
|
<div class="modal fade" tabindex="-1" id="newMdstoreModal">
|
|
|
|
<div class="modal-dialog modal-lg">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
|
|
<h4 class="modal-title">New Mdstore</h4>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
<form>
|
|
|
|
<div class="form-group">
|
|
|
|
<label>Format</label>
|
|
|
|
<input type="text" class="form-control" placeholder="oai_dc" ng-model="newMdFormat" />
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label>Layout</label>
|
|
|
|
<input type="text" class="form-control" placeholder="store" ng-model="newMdLayout" />
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label>Interpretation</label>
|
|
|
|
<input type="text" class="form-control" placeholder="native" ng-model="newMdInterpretation" />
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label>Datasource Name</label>
|
|
|
|
<input type="text" class="form-control" placeholder="" ng-model="newMdDsName" />
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label>Datasource ID</label>
|
|
|
|
<input type="text" class="form-control" placeholder="" ng-model="newMdDsId" />
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label>Datasource API</label>
|
|
|
|
<input type="text" class="form-control" placeholder="" ng-model="newMdApiId" />
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
|
|
<button type="submit" class="btn btn-primary" data-dismiss="modal" ng-click="newMdstore(newMdFormat, newMdLayout, newMdInterpretation, newMdDsName, newMdDsId, newMdApiId)">Submit</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="modal fade" tabindex="-1" id="versionsModal">
|
|
|
|
<div class="modal-dialog modal-lg">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
|
|
<h4 class="modal-title">Versions</h4>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
<div class="checkbox text-right">
|
|
|
|
<label>
|
|
|
|
<input type="checkbox" ng-model="forceVersionDelete" /> Force delete
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<table class="table table-condensed small">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>ID</th>
|
|
|
|
<th class="text-center">Read Count</th>
|
|
|
|
<th class="text-center">Last Update</th>
|
|
|
|
<th class="text-right">Size</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr ng-repeat="v in versions">
|
2021-01-28 11:02:04 +01:00
|
|
|
<td>
|
|
|
|
<span class="glyphicon glyphicon-pencil" ng-if="v.writing" title="writing..."></span> <span ng-class="{'text-success': v.current}">{{v.id}}</span><br />
|
2021-01-28 15:55:22 +01:00
|
|
|
<span class="small"><b>Path:</b> {{v.hdfsPath}}</span><br/>
|
|
|
|
<button class="btn btn-xs btn-primary" ng-show="v.writing" ng-click="commitVersion(v.id)">commit</button>
|
|
|
|
<button class="btn btn-xs btn-warning" ng-show="v.writing" ng-click="abortVersion(v.id)">abort</button>
|
|
|
|
<button class="btn btn-xs btn-danger" ng-disabled="v.current" ng-click="deleteVersion(v.id, forceVersionDelete)">delete</button>
|
2021-01-28 11:02:04 +01:00
|
|
|
</td>
|
2021-01-26 13:34:39 +01:00
|
|
|
<td class="text-center">
|
|
|
|
{{v.readCount}}
|
|
|
|
<button class="btn btn-xs btn-warning" ng-click="resetReading(v.id)" ng-disabled="v.readCount == 0">reset</button>
|
|
|
|
</td>
|
2021-01-25 14:16:37 +01:00
|
|
|
<td class="text-center" title="{{v.lastUpdate}}">{{v.lastUpdate | date:"MMM dd, yyyy 'at' HH:mm"}}</td>
|
|
|
|
<td class="text-right">{{v.size}}</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|