mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-01 12:24:28 +01:00
[SSO] interface for transforming boolean and dates datatypes
This commit is contained in:
parent
a5bdbc16cd
commit
77626aa674
@ -83,6 +83,25 @@ class AuthenticationController
|
||||
$scope.field = field
|
||||
## expected data type
|
||||
$scope.datatype = datatype
|
||||
## data transformation rules
|
||||
$scope.transformation =
|
||||
rules: {} #TODO get from resolve
|
||||
## available transformation formats
|
||||
$scope.formats =
|
||||
date: [
|
||||
{
|
||||
label: 'ISO 8601',
|
||||
value: 'iso8601'
|
||||
},
|
||||
{
|
||||
label: 'Timestamp (s)'
|
||||
value: 'timestamp-s'
|
||||
},
|
||||
{
|
||||
label: 'Timestamp (ms)',
|
||||
value: 'timestamp-ms'
|
||||
}
|
||||
]
|
||||
|
||||
## close and save the modifications
|
||||
$scope.ok = ->
|
||||
|
@ -6,7 +6,38 @@
|
||||
<span translate>{{ 'expected_data_type' }}</span> : {{datatype}}
|
||||
</div>
|
||||
<form name="mappingForm">
|
||||
<ng-switch on="datatype">
|
||||
|
||||
<!-- BOOLEAN -->
|
||||
<div ng-switch-when="boolean">
|
||||
<h4 translate>{{ 'transformation_rules' }}</h4>
|
||||
<label for="true_value">true</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="true_value"
|
||||
id="true_value"
|
||||
ng-model="transformation.rules.true_value">
|
||||
|
||||
<label for="false_value">false</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="false_value"
|
||||
id="false_value"
|
||||
ng-model="transformation.rules.false_value">
|
||||
</div>
|
||||
|
||||
<!-- DATE -->
|
||||
<div ng-switch-when="date">
|
||||
<h4 translate>{{ 'transformation_rules' }}</h4>
|
||||
<label for="date_format" translate>{{ 'input_format' }}</label>
|
||||
<select name="date_format"
|
||||
id="date_format"
|
||||
class="form-control"
|
||||
ng-model="transformation.rules.format"
|
||||
ng-options="format.value as format.label for format in formats.date">
|
||||
</select>
|
||||
</div>
|
||||
</ng-switch>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
@ -250,6 +250,8 @@ en:
|
||||
authentication_type_is_required: "Authentication type is required."
|
||||
data_mapping: "Data mapping"
|
||||
expected_data_type: "Expected data type"
|
||||
transformation_rules: "Transformation rules"
|
||||
input_format: "Input format"
|
||||
|
||||
oauth2:
|
||||
# edition/creation form of an OAuth2 authentication provider
|
||||
|
@ -250,6 +250,8 @@ fr:
|
||||
authentication_type_is_required: "Le type d'authentification est requis."
|
||||
data_mapping: "Correspondance des données"
|
||||
expected_data_type: "Type de données attendues"
|
||||
transformation_rules: "Règles de transformation"
|
||||
input_format: "Format d'entrée"
|
||||
|
||||
oauth2:
|
||||
# formulaire d'édition/création d'un fournisseur d'authentification de type OAuth2
|
||||
|
Loading…
Reference in New Issue
Block a user