added resources from dnet-modular-repositories-ui to dnet-modular-ui

This commit is contained in:
Claudio Atzori 2019-07-24 11:28:46 +02:00
parent 213d3b3012
commit c0fe9a7444
13 changed files with 845 additions and 0 deletions

View File

@ -0,0 +1,10 @@
repo.ui.compatibilityLevels.vocabulary = dnet:compatibilityLevel
repo.ui.datasourceTypes.vocabulary = dnet:datasource_typologies
repo.ui.contentDescriptions.vocabulary = dnet:content_description_typologies
repo.ui.protocols.vocabulary = dnet:protocols
repo.ui.datasourceCountries.vocabulary = dnet:countries
repo.ui.validation.show = false
repo.ui.addApi.show = true
repo.ui.addRepo.show = true
repo.ui.validator.address = http://dev.openaire.research-infrastructures.eu:8880/validator
repo.ui.validatorService.address = http://dev.openaire.research-infrastructures.eu:8880/validator-service

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean name="repoUIUtils" class="eu.dnetlib.functionality.modular.ui.repositories.RepoUIUtils" />
</beans>

View File

@ -0,0 +1,59 @@
for \$x in
collection('/db/DRIVER/RepositoryServiceResources/RepositoryServiceResourceType')[.//RESOURCE_IDENTIFIER/@value='$dsId$' or .//DATASOURCE_ORIGINAL_ID = '$dsId$']//INTERFACE[@id='$ifaceId$']
let \$repoId := \$x/../../../../HEADER/RESOURCE_IDENTIFIER/@value/string()
return
<api>
<id>{\$x/@id/string()}</id>
<label>{\$x/@label/string()}</label>
<removable>{\$x/@removable/string()}</removable>
<protocol>{\$x/ACCESS_PROTOCOL/text()}</protocol>
<repo
id="{\$repoId}"
country="{\$x/../../COUNTRY/text()}"
prefix="{\$x/../..//EXTRA_FIELDS/FIELD[./key='NamespacePrefix']/value}"
type="{\$x/../../TYPOLOGY/text()}"
email="{\$x/../../ADMIN_INFO/text()}">
{\$x/../../OFFICIAL_NAME/text()}
</repo>
<commonParams>
<param name="id">{\$x/@id/string()}</param>
<param name="label">{\$x/@label/string()}</param>
<param name="typology">{\$x/@typology/string()}</param>
<param name="active">{\$x/@active/string()}</param>
<param name="compliance">{\$x/@compliance/string()}</param>
</commonParams>
<accessParams>
<param name="baseUrl">{\$x/BASE_URL/text()}</param>
{
for \$y in
\$x/ACCESS_PROTOCOL/@*
return
<param name="{\$y/name()}">{\$y/string()}</param>
}
</accessParams>
<extraFields>
{
for \$y in
\$x/INTERFACE_EXTRA_FIELD
return
<field name="{\$y/@name/string()}">{\$y/text()}</field>
}
</extraFields>
<metaWFs>
{
for \$y in
collection('/db/DRIVER/MetaWorkflowDSResources/MetaWorkflowDSResourceType')
where
\$y//DATAPROVIDER/@interface = \$x/@id and \$y//DATAPROVIDER/@id= \$repoId
return
<metaWF>
<id>{\$y//RESOURCE_IDENTIFIER/@value/string()}</id>
<name>{\$y//METAWORKFLOW_NAME/text()}</name>
<status>{\$y//CONFIGURATION/@status/string()}</status>
<destroyWorkflow>{\$y//CONFIGURATION/@destroyWorkflow/string()}</destroyWorkflow>
</metaWF>
}
</metaWFs>
</api>

View File

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean name="/ui/repoApis.do"
class="eu.dnetlib.functionality.modular.ui.repositories.RepoApisEntryPointController"
p:menu="Overview" p:title="DataSource API Management"
p:description="DataSource API configuration page" p:group="DataSource Management"
p:order="5"
p:groupOrder="10"
p:compatibilityLevelsVocabulary="${repo.ui.compatibilityLevels.vocabulary}"
p:validatorAddress="${repo.ui.validator.address}"
p:validatorServiceAddress="${repo.ui.validatorService.address}">
<property name="permissionLevels">
<set>
<value>DS_ADMIN</value>
</set>
</property>
</bean>
<bean name="/ui/addRepo.do"
class="eu.dnetlib.functionality.modular.ui.repositories.AddRepoEntryPointController"
p:menu="Add new Datasource" p:title="Create a new Datasource"
p:description="Create a new dataSource" p:group="DataSource Management"
p:order="6"
p:groupOrder="10"
p:datasourceTypeVocabulary="${repo.ui.datasourceTypes.vocabulary}"
p:datasourceCountryVocabulary="${repo.ui.datasourceCountries.vocabulary}"
p:validMenuEntry="${repo.ui.addRepo.show}">
<property name="permissionLevels">
<set>
<value>DS_ADMIN</value>
</set>
</property>
</bean>
<bean name="/ui/addRepoApi.do"
class="eu.dnetlib.functionality.modular.ui.repositories.AddRepoApiEntryPointController"
p:menu="Add new API" p:title="Create a new API"
p:description="Create a new dataSource API" p:group="DataSource Management"
p:order="7"
p:groupOrder="10"
p:datasourceTypeVocabulary="${repo.ui.datasourceTypes.vocabulary}"
p:complianceVocabulary="${repo.ui.compatibilityLevels.vocabulary}"
p:contentDescriptionsVocabulary="${repo.ui.contentDescriptions.vocabulary}"
p:protocolsVocabulary="${repo.ui.protocols.vocabulary}"
p:validMenuEntry="${repo.ui.addApi.show}">
<property name="permissionLevels">
<set>
<value>DS_ADMIN</value>
</set>
</property>
</bean>
<bean name="/ui/repos.do"
class="eu.dnetlib.functionality.modular.ui.repositories.RepoEnablerEntryPointController"
p:menu="DataSource Enabler" p:title="DataSource Enabler"
p:description="DataSource Enabler" p:group="DataSource Management"
p:order="8"
p:groupOrder="10"
p:datasourceTypeVocabulary="${repo.ui.datasourceTypes.vocabulary}"
p:validMenuEntry="${repo.ui.validation.show}">
<property name="permissionLevels">
<set>
<value>DS_ADMIN</value>
</set>
</property>
</bean>
<!--<bean name="/ui/reposMap.do"-->
<!--class="eu.dnetlib.functionality.modular.ui.repositories.RepositoriesGoogleMapEntryPointController"-->
<!--p:menu="DataSource Map" p:title="Datasource Map"-->
<!--p:description="The map of the managed datasources" p:group="DataSource Management"-->
<!--p:order="10"-->
<!--p:groupOrder="10">-->
<!--<property name="permissionLevels">-->
<!--<set>-->
<!--<value>USER</value>-->
<!--<value>DS_ADMIN</value>-->
<!--</set>-->
<!--</property>-->
<!--</bean>-->
</beans>

View File

@ -0,0 +1,101 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes" method="html" />
<xsl:template match="/">
<div>
<div class="well">
<fieldset>
<legend><h4>General</h4></legend>
<table class="table table-bordered table-striped">
<tbody>
<tr>
<td width="25%">Name</td>
<td><xsl:value-of select=".//OFFICIAL_NAME" /></td>
</tr><tr>
<td width="25%">Typology</td>
<td><xsl:value-of select=".//DATASOURCE_TYPE" /></td>
</tr><tr>
<td width="25%">Level of compliance</td>
<td><xsl:value-of select=".//DATASOURCE_COMPLIANCE_DEGREE" /></td>
</tr><tr>
<td width="25%">Country</td>
<td><xsl:value-of select=".//COUNTRY" /></td>
</tr><tr>
<td width="25%">Institution</td>
<td><a href="{.//REPOSITORY_WEBPAGE}"><xsl:value-of select=".//REPOSITORY_INSTITUTION" /></a></td>
</tr><tr>
<td width="25%">Contact email</td>
<td><a href="mailto:{.//ADMIN_INFO}"><xsl:value-of select=".//ADMIN_INFO" /></a></td>
</tr>
</tbody>
</table>
</fieldset>
</div>
<div class="well">
<fieldset>
<legend><h4>Status</h4></legend>
<table class="table table-bordered table-striped">
<tbody>
<tr>
<td width="25%">Size</td>
<td><xsl:value-of select=".//NUMBER_OF_OBJECTS" /></td>
</tr><tr>
<td width="25%">Last update</td>
<td><xsl:value-of select=".//LAST_UPDATE" /></td>
</tr><tr>
<td width="25%">Registered By</td>
<td><xsl:value-of select=".//REGISTERED_BY" /></td>
</tr>
</tbody>
</table>
</fieldset>
</div>
<div class="well">
<fieldset>
<legend><h4>Configuration parameters</h4></legend>
<table class="table table-bordered table-striped">
<tbody>
<xsl:for-each select=".//EXTRA_FIELDS/FIELD">
<tr>
<td width="25%"><xsl:value-of select="./key" /></td>
<td><xsl:value-of select="./value" /></td>
</tr>
</xsl:for-each>
</tbody>
</table>
</fieldset>
</div>
<xsl:for-each select="//INTERFACE">
<div class="well">
<fieldset>
<legend><h4>Interface: <xsl:value-of select="./@typology" /></h4></legend>
<table class="table table-bordered table-striped">
<tbody>
<xsl:for-each select="@*|.//*[string-length(normalize-space(text())) &gt; 0]|.//*[name() != 'INTERFACE_EXTRA_FIELD']/@*">
<tr>
<td width="25%">
<xsl:choose>
<xsl:when test="name() = 'INTERFACE_EXTRA_FIELD'">
<xsl:value-of select="@name" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="local-name(.)" />
</xsl:otherwise>
</xsl:choose>
</td>
<td><xsl:value-of select="." /></td>
</tr>
</xsl:for-each>
</tbody>
</table>
</fieldset>
</div>
</xsl:for-each>
</div>
</xsl:template>
</xsl:stylesheet>

View File

@ -0,0 +1,75 @@
$common/master(
header={
$ui/repos/header()$
<script type="text/javascript" src="../resources/js/dnet_param_values_functions.js"></script>
<script type="text/javascript" src="../resources/js/addRepo.js"></script>
<script type="text/javascript">
function getTypes() { return $types$ }
function getCountries() { return $countries$ }
</script>
<style>
.popover { max-width: 450px; width: auto; }
</style>
},
onLoad={},
body={
<div ng-app="addRepoUI" ng-controller="addRepoCtrl">
<div ng-show="done" class="text-center">
<h2>A new datasource has been registered !</h2>
</div>
<div ng-hide="done">
<form class="form-horizontal" role="form" name="newRepoForm">
<fieldset>
<legend>General Info</legend>
<ng-simple-edit-field label="Datasource ID (template: 12Chars_____::theId)" selection="repo.id" regex="^\w{12}::\w+\$"></ng-simple-edit-field>
<ng-simple-edit-field label="Official Name" selection="repo.officialname"></ng-simple-edit-field>
<ng-simple-edit-field label="English Name" selection="repo.englishname" optional="true"></ng-simple-edit-field>
<ng-simple-edit-field label="Organization" selection="org.legalname"></ng-simple-edit-field>
<ng-select-vocabulary-field label="Typology Class" vocabulary="validTypes" selection="repo.typology"></ng-select-vocabulary-field>
</fieldset>
<fieldset>
<legend>Contacts</legend>
<ng-simple-edit-field label="WebSite Url" selection="repo.websiteurl" regex="^(http|https):\/\/"></ng-simple-edit-field>
<ng-simple-edit-field label="Contact Email" selection="repo.contactemail" regex="^.+@.+"></ng-simple-edit-field>
</fieldset>
<fieldset>
<legend>Geographical Info</legend>
<ng-select-vocabulary-field label="Country" vocabulary="validCountries" selection="org.country"></ng-select-vocabulary-field>
<ng-simple-edit-field label="Latitude" selection="repo.latitude" type="NUMBER"></ng-simple-edit-field>
<ng-simple-edit-field label="Longitude" selection="repo.longitude" type="NUMBER"></ng-simple-edit-field>
</fieldset>
<fieldset>
<legend>Technical Info</legend>
<ng-simple-edit-field label="Namespace Prefix (12 chars)" selection="repo.namespaceprefix" regex="^\w{12}\$"></ng-simple-edit-field>
<ng-simple-edit-field label="Software Typology" selection="repo.platform" optional="true"></ng-simple-edit-field>
<ng-simple-edit-field label="Logo Url" selection="repo.logourl" regex="^(http|https):\/\/" optional="true"></ng-simple-edit-field>
</fieldset>
<br /><br />
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<button class="btn btn-default" type="button" ng-click="resetForm()">reset</button>
<button class="btn btn-primary" ng-disabled="newRepoForm.\$invalid" ng-click="registerRepo()">add</button>
</div>
</div>
</form>
<hr />
</div>
<!-- ENABLE TO DEBUG -->
<!-- <p><b>Repo:</b> {{repo}}</p> -->
</div>
}
)$

View File

@ -0,0 +1,103 @@
$common/master(
header={
$ui/repos/header()$
<link rel="stylesheet" type="text/css" href="../resources/css/chosen.css">
<link rel="stylesheet" type="text/css" href="../resources/css/chosen-bootstrap.css">
<script type='text/javascript' src="../resources/js/chosen/chosen.jquery.js"></script>
<script type='text/javascript' src="../resources/js/chosen/angular-chosen.js"></script>
<script type="text/javascript" src="../resources/js/dnet_workflows_common.js"></script>
<script type="text/javascript" src="../resources/js/dnet_param_values_functions.js"></script>
<script type="text/javascript" src="../resources/js/addRepoApi.js"></script>
<script type="text/javascript">
function getCompliances() { return $compliances$ }
function getTypes() { return $types$ }
function getContentDescriptions() { return $contentDescriptions$ }
function getProtocols() { return $protocols$ }
</script>
<style>
.popover { max-width: 450px; width: auto; }
</style>
},
onLoad={},
body={
<div ng-app="addRepoApiUI" ng-controller="addRepoApiCtrl">
<div ng-show="done" class="text-center">
<h2>A new api has been registered !</h2>
</div>
<div ng-hide="done">
<form class="form-horizontal" role="form" ng-hide="repo.id">
<ng-select-vocabulary-field label="Typology" vocabulary="values.types" selection="selectedTypology"></ng-select-vocabulary-field>
<ng-select-repo-field label="Datasource" typology="selectedTypology" selection="repo"></ng-select-repo-field>
</form>
<form class="form-horizontal" role="form" ng-show="repo.id" name="newApiForm">
<ng-fixed-value-field label="Datasource" value="repo.name"></ng-fixed-value-field>
<ng-fixed-value-field label="Typology" value="api.typology"></ng-fixed-value-field>
<ng-api-id-field label="Api ID" prefix="api_________::{{repo.origId}}::" exclusion="repo.apis" selection="api.id"></ng-api-id-field>
<!-- <ng-select-vocabulary-field label="Typology" vocabulary="values.types" selection="api.typology"></ng-select-vocabulary-field> -->
<ng-select-vocabulary-field label="Compatibility level" vocabulary="values.compliances" selection="api.compatibility"></ng-select-vocabulary-field>
<ng-select-vocabulary-field label="Content description" vocabulary="values.contentDescriptions" selection="api.contentdescription"></ng-select-vocabulary-field>
<ng-select-vocabulary-field label="Protocol" vocabulary="values.protocols" selection="api.protocol" contextual-params="currentParams"></ng-select-vocabulary-field>
<ng-simple-edit-field label="BaseURL" selection="api.baseurl" regex="^(http|https|ftp|file|sftp|jar):\/\/"></ng-simple-edit-field>
<ng-simple-edit-field
ng-repeat="param in currentParams | filter: { functionPopulated : false }"
label="{{param.name}} [{{api.protocol}} protocol]"
selection="apiParams[param.name]"
optional="{{param.optional}}"
regex="{{param.regex}}"
type="{{param.type}}"></ng-simple-edit-field>
<ng-simple-select-field
ng-repeat="param in currentParams | filter: { functionPopulated : true, type : 'TEXT' }"
label="{{param.name}} [{{api.protocol}} protocol]"
selection="apiParams[param.name]"
valid-values="validValues[api.baseurl + '@@@' + param.name]"
refresh-function="listValidValuesForParam(param.name)"
optional="{{param.optional}}"></ng-simple-select-field>
<ng-multi-select-field
ng-repeat="param in currentParams | filter: { functionPopulated : true, type : 'LIST' }"
label="{{param.name}} [{{api.protocol}} protocol]"
selection="apiParams[param.name]"
valid-values="validValues[api.baseurl + '@@@' + param.name]"
refresh-function="listValidValuesForParam(param.name)"
optional="{{param.optional}}"></ng-multi-select-field>
<ng-simple-edit-field label="Xpath for Metadata Identifier" selection="api.metadataIdentifierPath"></ng-simple-edit-field>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<button class="btn btn-default" type="button" ng-click="resetForm()">reset</button>
<button class="btn btn-primary" ng-disabled="newApiForm.\$invalid" ng-click="registerApi()">add</button>
</div>
</div>
</form>
<hr />
</div>
<!-- ENABLE TO DEBUG -->
<!--
<p><b>Typology:</b> {{selectedTypology}}</p>
<p><b>Repo:</b> {{repo}}</p>
<p><b>Api:</b> {{api}}</p>
-->
</div>
}
)$

View File

@ -0,0 +1,28 @@
$common/master(
header={
$ui/repos/header()$
<script type="text/javascript" src="../resources/js/angular-route.min.js"></script>
<script type="text/javascript" src="../resources/js/dnet_workflows_common.js"></script>
<script type="text/javascript" src="../resources/js/dnet_param_values_functions.js"></script>
<script type="text/javascript" src="../resources/js/repoControllers.js"></script>
<script type="text/javascript" src="../resources/js/repos.js"></script>
<script type="text/javascript">
function getAvailableRepohiWfs() { return $availableRepohiWfs$ }
function getCompatibilityLevels() { return $compatibilityLevels$ }
function getBrowseFields() { return $browseFields$ }
function getValidatorAddress() { return '$validatorAddress$' }
function getValidatorServiceAddress() { return '$validatorServiceAddress$' }
</script>
<style>
.popover { max-width: 450px; width: auto; }
</style>
},
onLoad={},
body={
<div id="main" ng-app="reposUI">
<div ng-view></div>
</div>
}
)$

View File

@ -0,0 +1,68 @@
$common/master(
header={
$ui/repos/header()$
<script type="text/javascript" src="../resources/js/repoEnabler.js"></script>
<script type="text/javascript">
function getTypologies() { return $types$ }
</script>
<style>
.popover { max-width: 450px; width: auto; }
</style>
},
onLoad={},
body={
<div id="main" ng-app="repoEnablerUI" ng-controller="repoEnablerCtrl">
$ui/repos/repoDetails()$
<div class="row">
<div class="col-sm-4 col-lg-3">
<ul class="nav nav-pills nav-stacked">
<li ng-class="{active : t.id == currType}"
ng-repeat="t in types">
<a href="javascript:void(0)" ng-click="selectType(t.name)">{{t.desc}}</a>
</li>
</ul>
</div>
<div class="col-sm-8 col-lg-9">
<div class="well" ng-hide="repos.length > 0">
<h5><i>No datasource</i></h5>
</div>
<div class="panel panel-default" ng-show="repos.length > 0">
<div class="panel-heading">
<form class="form-inline text-right" role="form">
<div class="form-group">
<label class="sr-only" for="repoFilter">Filter...</label>
<input type="text" class="form-control input-sm" id="repoFilter" ng-model="repoFilter.name" placeholder="Filter..." />
</div>
<button ng-click="selectType(currType)" class="btn btn-sm btn-default" type="button"><span class="glyphicon glyphicon-refresh"></span></button>
</form>
</div>
<table class="table table-bordered table-striped">
<tr ng-repeat="r in repos | filter: repoFilter">
<td>
<a href="isManager.do#/profile/{{r.id}}" class="btn btn-xs btn-primary" title="xml profile"><span class="glyphicon glyphicon-link"></span></a>
<a href="javascript:void(0)" ng-click="showDetails(r.id, r.name)">
{{r.name}}
</a>
<div ng-show="r.valid" class="pull-right">
<a href="javascript:void(0)" ng-click="setValidation(r.id, false)">force invalidate</a>
/
<span class="label label-success">valid</span>
</div>
<div ng-show="!r.valid" class="pull-right">
<span class="label label-danger">pending</span>
/
<a href="javascript:void(0)" ng-click="setValidation(r.id, true)">force validate</a>
</div>
</td>
</tr>
</table>
<div class="panel-footer"></div>
</div>
</div>
</div>
</div>
})$

View File

@ -0,0 +1,21 @@
<script type="text/javascript" src="../resources/js/angular.min.js"></script>
<script type="text/javascript" src="../resources/js/ng-grid-2.0.7.min.js"></script>
<script type="text/javascript" src="../resources/js/reposCommon.js"></script>
<link rel="stylesheet" type="text/css" href="../resources/css/ng-grid.min.css" />
<style>
.gridStyle {
width: 100%;
height: 150px;
margin-bottom: 20px;
font-size: 11px;
}
.gridStyle-big {
width: 100%;
height: 300px;
margin-bottom: 20px;
font-size: 11px;
}
</style>

View File

@ -0,0 +1,252 @@
<div class="row">
<div class="col-xs-12 col-md-6">
<button class="btn btn-sm btn-primary btnRefreshApi" type="button" data-toggle="modal" data-target="#metaWfSelectionModal"><span class="glyphicon glyphicon-plus"></span> add metaworkflow</button>
<button class="btn btn-sm btn-danger" type="button" ng-click="removeApi()" ng-if="currentRepoApi.removable">Delete API</button>
</div>
<div class="col-xs-12 col-md-6 text-right">
<button class="btn btn-sm btn-default btnRefreshApi" type="button" ng-click="loadApi()"><span class="glyphicon glyphicon-refresh"></span></button>
<button class="btn btn-sm btn-default" type="button" onclick="history.go(-1);">back</button>
</div>
</div>
<div class="well" style="margin-top: 20px; margin-bottom: 20px">
<div class="row">
<div class="input-group input-group-sm col-xs-12" style="padding: 10px; float: left;">
<span class="input-group-addon" style="width: 150px;"><b>Datasource</b></span>
<span class="form-control">
{{currentRepoApi.repoName}}
<span class="pull-right" ng-show="currentRepoApi.repoCountry">
<img ng-src="../resources/img/flags/{{currentRepoApi.repoCountry}}.gif" />
{{currentRepoApi.repoCountry}}
</span>
</span>
<span class="input-group-btn">
<a class="btn btn-primary" href="isManager.do#/profile/{{currentRepoApi.repoId}}"><span class="glyphicon glyphicon-link"></span></a>
</span>
<span class="input-group-btn">
<button type="button" class="btn btn-primary" ng-click="showDetails(currentRepoApi.repoId, currentRepoApi.repoName)"><span class="glyphicon glyphicon-info-sign"></span></button>
</span>
</div>
<div class="input-group input-group-sm col-xs-12" style="padding: 10px; float: left;">
<span class="input-group-addon" style="width: 150px;"><b>Datasource details</b></span>
<span class="form-control"><b>contact email:</b> <a href="mailto:{{currentRepoApi.email}}" ng-show="currentRepoApi.email">{{currentRepoApi.email}}</a></span>
<span class="form-control"><b>software typology:</b> {{currentRepoApi.repoType}}</span>
</div>
<div class="input-group input-group-sm col-xs-12" style="padding: 10px; float: left;" ng-show="validatorDetailsAddress || validatorBlacklistAddress">
<span class="input-group-addon" style="width: 150px;"><b>Validation</b></span>
<span class="form-control" ng-show="validatorDetailsAddress"><a href="{{validatorDetailsAddress}}">show last validation details</a></span>
<span class="form-control" ng-show="validatorBlacklistAddress"><a href="{{validatorBlacklistAddress}}">show blacklist</a></span>
</div>
<div class="input-group input-group-sm col-xs-12 col-md-6" style="padding: 10px; float: left;">
<span class="input-group-addon" style="width: 150px;"><b>API details</b></span>
<span class="form-control" ng-repeat="p in currentRepoApi.commonParams" ng-hide="p.name == 'compliance'" style="white-space: nowrap;"><b>{{p.name}}:</b> {{p.value}}</span>
<span class="form-control"><b>ns prefix:</b> {{currentRepoApi.repoPrefix}}</span>
<span class="form-control" ng-show="currentRepoApi.otherParams.length > 0"><a href="javascript:void(0)" data-toggle="modal" data-target="#showOtherParamsModal">other details...</a></span>
</div>
<div class="input-group input-group-sm col-xs-12 col-md-6" style="padding: 10px; float: left;">
<span class="input-group-addon" style="width: 150px;"><b>Protocol</b></span>
<div class="form-control">
{{currentRepoApi.protocol}}
<span class="pull-right" ng-show="currentRepoApi.protocol == 'oai'">
<a href="javascript:void(0)" ng-click="testOAI(currentRepoApi.accessParams)">verify</a>
</span>
</div>
<span class="input-group-btn">
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#editAccessParamsModal" ng-click="prepareUpdateRepoApi()">access params</button>
</span>
</div>
<div class="input-group input-group-sm col-xs-12 col-md-6" style="padding: 10px; float: left;" ng-repeat="p in currentRepoApi.commonParams" ng-show="p.name == 'compliance'">
<span class="input-group-addon" style="width: 150px;"><b>Compliance</b></span>
<span class="form-control" ng-show="p.otherValue" style="color: #c06a00">{{p.value}} (override)</span>
<span class="form-control" ng-hide="p.otherValue">{{p.value}} (by validator)</span>
<div class="input-group-btn">
<button type="button" data-toggle="dropdown" class="btn btn-sm dropdown-toggle" ng-class="{ 'btn-primary' : !p.otherValue, 'btn-warning' : p.otherValue }">
<span class="caret pull-right"></span>
</button>
<ul class="dropdown-menu dropdown-menu-right" role="menu">
<li role="presentation" ng-repeat="l in compatibilityLevels">
<a role="menuitem" tabindex="-1" href="javascript:void(0)" ng-click="overrideApiCompliance(l.name)">override to <b>{{l.name}}</b> (<i>{{l.desc}}</i>)</a>
</li>
<li class="divider" role="presentation" ng-show="p.otherValue"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="javascript:void(0)" ng-show="p.otherValue" ng-click="resetApiCompliance()">reset to the original value</b></a></li>
</ul>
</div>
</div>
<div class="input-group input-group-sm col-xs-12 col-md-6" style="padding: 10px; float: left;">
<span class="input-group-addon" style="width: 150px;"><b>Last aggregation</b></span>
<ng-api-mdstore-info label="Collect" date="currentRepoApi.collDate" total="currentRepoApi.collTotal" id="currentRepoApi.collMdId"></ng-api-mdstore-info>
<ng-api-mdstore-info label="Transform" date="currentRepoApi.aggrDate" total="currentRepoApi.aggrTotal" id="currentRepoApi.aggrMdId"></ng-api-mdstore-info>
<ng-api-objectstore-info label="Download" date="currentRepoApi.downloadDate" total="currentRepoApi.downloadTotal" id="currentRepoApi.downloadObjId"></ng-api-objectstore-info>
</div>
</div>
</div>
<div ng-hide="metaworkflows.length != 0" class="text-center" style="margin-top: 40px">
<button class="btn btn-lg btn-primary btnRefreshApi" type="button" data-toggle="modal" data-target="#metaWfSelectionModal"><span class="glyphicon glyphicon-plus"></span> add first metaworkflow</button>
</div>
<div class="panel-group" id="accordion" ng-show="metaworkflows.length != 0">
<div class="panel panel-default" ng-repeat="m in metaworkflows" style="overflow: visible;">
<div class="panel-heading">
<a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#accordion" data-target="#collapse_{{m.id | limitTo: 36}}" ng-click="getMetaWorkflow(m.id)">
<b>{{m.name}}</b>
</a>
</div>
<div id="collapse_{{m.id | limitTo: 36}}" class="panel-collapse collapse out">
<div class="panel-body" ng-show="m.deleting">
<span class="muted" ng-show="m.deleting">deleting...</span>
</div>
<table class="table" id="metaWfTable" ng-hide="m.deleting">
<thead>
<tr>
<th>Aggregation step</th>
<th class="col-xs-2" style="white-space: nowrap;">Last execution date</th>
<th class="col-xs-1 text-center">Last status</th>
<th class="col-xs-1 text-center">Launch mode</th>
<th class="col-xs-4 col-md-3 text-right">Actions</th>
</tr>
</thead>
<tbody ng-bind-html="to_trusted(currentMetaWorkflow.html)" compile-template></tbody>
</table>
<div class="panel-footer" ng-hide="m.deleting">
<form class="form-inline">
<a href="isManager.do#/profile/{{currentMetaWorkflow.wfId}}" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-link"></span></a>
<div class="btn-group">
<button type="button" class="btn btn-default btn-sm" data-toggle="modal" data-target="#metaWfEditModal" ng-click="prepareMetaWfEdit()">configure</button>
<button type="button" class="btn btn-default btn-sm" data-toggle="modal" ng-click="updateMetaWorkflowHistory()">history</button>
</div>
<button type="button" class="btn btn-danger btn-sm btnRefreshApi" ng-show="m.destroyWorkflow && !m.deleting" ng-click="destroyDataProviderWorkflow(m)">
<span class="glyphicon glyphicon-remove"></span> delete
</button>
</form>
</div>
</div>
</div>
</div>
<div id="metaWfSelectionModal" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Available MetaWorkflows for current API</h4>
</div>
<div class="modal-body">
<div class="panel panel-default" ng-repeat="e in availableRepohiWfs" ng-show="verifyMetaWf(currentRepoApi, e)">
<div class="panel-heading">
<a href="javascript:void(0)" data-dismiss="modal" ng-click="newDataProviderWorkflow(e.id)">{{e.name}}</a>
</div>
<div class="panel-body">
<span ng-repeat="f in e.fields">
<strong >{{f.k}}: </strong>{{f.v}}<br />
</span>
<strong>Typology prefixes: </strong>{{e.ifaceTypes.join()}}
<br />
<strong>Compliance prefixes: </strong>{{e.compliances.join()}}
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div id="editAccessParamsModal" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Access params (protocol: {{currentRepoApi.protocol}})</h4>
</div>
<div class="modal-body">
<div class="well">
<form class="form-horizontal" role="form">
<div class="form-group" ng-repeat="p in tempAccessParams">
<label for="input_ap_{{p.name}}" class="col-sm-3 control-label">{{p.name}}</label>
<div class="col-sm-9" ng-hide="currentRepoApi.protocol == 'oai' && p.name == 'set'">
<input type="text" class="form-control" id="input_ap_{{p.name}}" ng-model="p.value"/>
</div>
<div class="col-sm-9" ng-show="currentRepoApi.protocol == 'oai' && p.name == 'set'">
<select class="form-control" style="font-size: 11px" size="10" multiple ng-model="selectedSets" ng-change="updateSets(selectedSets, tempAccessParams)">
<option ng-repeat="set in currentSets" value="{{set.id}}" ng-selected="set.selected">{{set.name}}</option>
</select>
<span><b>Current set(s): </b>{{selectedSets.join(', ')}}</span>
<button class="btn btn-xs btn-default pull-right" style="margin-top: 4px" ng-click="listSets(tempAccessParams)"><span class="glyphicon glyphicon-refresh"></span> refresh</button>
</div>
</div>
<div class="form-group">
<label for="input_mdid_path" class="col-sm-3 control-label">ID XPath</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="input_mdid_path" ng-model="tempMdIdPath"/>
</div>
</div>
</form>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="updateRepoApi()">Save</button>
</div>
</div>
</div>
</div>
<div id="showOtherParamsModal" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Other parameters</h4>
</div>
<div class="modal-body">
<div class="well">
<table class="table table-bordered table-condensed">
<thead>
<th>
<span>Name</span>
<span class="pull-right">Value</span>
</th>
</thead>
<tbody>
<tr ng-repeat="p in currentRepoApi.otherParams">
<td>
<b>{{p.name}}</b>
<span class="pull-right" ng-if="p.value">{{p.value}}</span>
<span class="pull-right text-muted" ng-if="!p.value"><i>missing value</i></span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
$ui/repos/repoDetails()$
$ui/workflows/common/atomwf()$
$ui/workflows/common/metawf_edit()$
$ui/workflows/common/atomwf_edit()$
$ui/workflows/common/wf_monitor()$
$ui/workflows/common/wf_monitor_proc( backFunction={updateMetaWorkflowHistory()} )$
$ui/workflows/common/wf_monitor_proc_node()$
$ui/workflows/common/wf_journal_entry()$

View File

@ -0,0 +1,16 @@
<div id="repoDetailsModal" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">{{currentRepoName}}</h4>
</div>
<div class="modal-body">
<div ng-bind-html="currentRepoHTML"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,18 @@
$common/master(
header={
$ui/repos/header()$
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false&language=en"></script>
<script type="text/javascript" src="../resources/js/reposMap.js"></script>
},
onLoad={},
body={
<div ng-app="reposMapUI" ng-controller="reposMapCtrl">
<div class="row">
<div id="map_canvas_container" class="col-xs-12 col-sm-12 col-md-12 col-lg-12" style="height: 400px;">
<div id="map_canvas" style="height: 100%; border: 1px solid #336699"></div>
</div>
$ui/repos/repoDetails()$
</div>
</div>
}
)$