mirror of
https://github.com/OpenBankProject/API-Manager.git
synced 2026-02-06 13:06:45 +00:00
bugfix/ fixed static issues
This commit is contained in:
parent
dcff5b9d09
commit
bb8e6c4075
@ -13,7 +13,7 @@ $(document).ready(function($) {
|
||||
var json_editor_id= $(runner).find('.jsoneditor_div')[0].id;
|
||||
var json_editor_number = json_editor_id.replace("jsoneditor","");
|
||||
var container = $("#"+json_editor_id);
|
||||
parameters = JSON.parse($(runner).find('textarea[name="parameters"]').text());
|
||||
var parameters = JSON.parse($(runner).find('textarea[name="parameters"]').text());
|
||||
var jsoneditor_div = $(runner).find('.jsoneditor_div');
|
||||
//make sure only create one jsoneditor_div block
|
||||
if(!(jsoneditor_div.css("display") ==="block")){
|
||||
@ -31,7 +31,7 @@ $(document).ready(function($) {
|
||||
var runner = $(this).parent().parent().parent();
|
||||
var jsoneditor_id= $(runner).find('.jsoneditor_div')[0].id
|
||||
var json_editor_number = jsoneditor_id.replace("jsoneditor","")
|
||||
parameters_Json_editor = JSON.stringify(json_editors[json_editor_number].get());
|
||||
var parameters_Json_editor = JSON.stringify(json_editors[json_editor_number].get());
|
||||
console.log("parameters_Json_editor:"+parameters_Json_editor)
|
||||
$('.runner button.forSave').attr("disabled","disabled");
|
||||
$('.runner button.forDelete').attr("disabled","disabled");
|
||||
@ -47,7 +47,7 @@ $(document).ready(function($) {
|
||||
$('.runner button.forDelete').click(function() {
|
||||
var t = $(this);
|
||||
var runner = $(this).parent().parent().parent();
|
||||
dynamic_endpoint_id = $(runner).find('.dynamic_endpoint_id').text();
|
||||
var dynamic_endpoint_id = $(runner).find('.dynamic_endpoint_id').text();
|
||||
$('.runner button.forSave').attr("disabled","disabled");
|
||||
$('.runner button.forDelete').attr("disabled","disabled");
|
||||
$.post('dynamicendpoints/delete/dynamicendpoint', {
|
||||
|
||||
@ -4,6 +4,7 @@ Views of config app
|
||||
"""
|
||||
|
||||
import json
|
||||
from django.contrib import messages
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.views.generic import FormView
|
||||
from obp.api import API, APIError
|
||||
|
||||
@ -13,7 +13,7 @@ $(document).ready(function($) {
|
||||
var json_editor_id= $(runner).find('.jsoneditor_div')[0].id;
|
||||
var json_editor_number = json_editor_id.replace("jsoneditor","");
|
||||
var container = $("#"+json_editor_id);
|
||||
parameters = JSON.parse($(runner).find('textarea[name="parameters"]').text());
|
||||
var parameters = JSON.parse($(runner).find('textarea[name="parameters"]').text());
|
||||
var jsoneditor_div = $(runner).find('.jsoneditor_div');
|
||||
//make sure only create one jsoneditor_div block, click once to open and then close the block.
|
||||
if (typeof json_editors[json_editor_number] === 'undefined') {
|
||||
@ -32,12 +32,12 @@ $(document).ready(function($) {
|
||||
$('.runner button.forSave').click(function() {
|
||||
var t = $(this);
|
||||
var runner = $(this).parent().parent().parent();
|
||||
method_routing_id = $(runner).find('.method_routing_id').text();
|
||||
method_name = $(runner).find('.method_name').text();
|
||||
connector_name = $(runner).find('.connector_name').val();
|
||||
bank_id_pattern = $(runner).find('textarea[name="bank_id_pattern"]').val();
|
||||
is_bank_id_exact_match = $(runner).find('.is_bank_id_exact_match').val();
|
||||
parameters = $(runner).find('textarea[name="parameters"]').val();
|
||||
var method_routing_id = $(runner).find('.method_routing_id').text();
|
||||
var method_name = $(runner).find('.method_name').text();
|
||||
var connector_name = $(runner).find('.connector_name').val();
|
||||
var bank_id_pattern = $(runner).find('textarea[name="bank_id_pattern"]').val();
|
||||
var is_bank_id_exact_match = $(runner).find('.is_bank_id_exact_match').val();
|
||||
var parameters = $(runner).find('textarea[name="parameters"]').val();
|
||||
var jsoneditor_id= $(runner).find('.jsoneditor_div')[0].id;
|
||||
var json_editor_number = jsoneditor_id.replace("jsoneditor","");
|
||||
//if the user do not click the `parameters` box, then there is no json_editors here,so we use the parameters directly.
|
||||
|
||||
@ -68,7 +68,7 @@ class APIMetricsForm(MetricsForm):
|
||||
('true', 'Yes'),
|
||||
('false', 'No'),
|
||||
)
|
||||
VERB = (
|
||||
VERB_SELECTION = (
|
||||
('', _('Any')),
|
||||
('DELETE', 'DELETE'),
|
||||
('GET', 'GET'),
|
||||
@ -125,9 +125,9 @@ class APIMetricsForm(MetricsForm):
|
||||
),
|
||||
required=False,
|
||||
)
|
||||
verb = forms.ChoiceField(
|
||||
label=_('Verb'),
|
||||
choices=VERB,
|
||||
verb_selection = forms.ChoiceField(
|
||||
label=_('Verb Select'),
|
||||
choices=VERB_SELECTION,
|
||||
widget=forms.Select(
|
||||
attrs={
|
||||
'class': 'form-control',
|
||||
|
||||
@ -85,10 +85,10 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-2">
|
||||
{% if form.verb.errors %}<div class="alert alert-danger">{{ form.verb.errors }}</div>{% endif %}
|
||||
{% if form.verb_selection.errors %}<div class="alert alert-danger">{{ form.verb_selection.errors }}</div>{% endif %}
|
||||
<div class="form-group">
|
||||
{{ form.verb.label_tag }}
|
||||
{{ form.verb }}
|
||||
{{ form.verb_selection.label_tag }}
|
||||
{{ form.verb_selection }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -140,7 +140,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col">{% trans "Verb" %}</th>
|
||||
<th scope="col">{% trans "Verb Select" %}</th>
|
||||
<th scope="col">{% trans "URL" %}</th>
|
||||
<th scope="col">{% trans "Date" %}</th>
|
||||
<th scope="col">{% trans "Duration(ms)" %}</th>
|
||||
@ -151,7 +151,7 @@
|
||||
{% for metric in metrics %}
|
||||
<tr>
|
||||
<td>{{ forloop.counter }}</td>
|
||||
<td>{{ metric.verb }}</td>
|
||||
<td>{{ metric.verb_selection }}</td>
|
||||
<td>
|
||||
{{ metric.url }}
|
||||
</td>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user