api_explorer 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/MIT-LICENSE +20 -0
- data/README.rdoc +13 -0
- data/Rakefile +40 -0
- data/app/assets/images/api_explorer/clear.png +0 -0
- data/app/assets/images/api_explorer/delete.png +0 -0
- data/app/assets/images/api_explorer/maximize.png +0 -0
- data/app/assets/images/api_explorer/minimize.png +0 -0
- data/app/assets/javascripts/api_explorer/api.js +193 -0
- data/app/assets/javascripts/api_explorer/application.js +15 -0
- data/app/assets/stylesheets/api_explorer/api.css +355 -0
- data/app/assets/stylesheets/api_explorer/application.css +13 -0
- data/app/controllers/api_explorer/api_controller.rb +103 -0
- data/app/controllers/api_explorer/application_controller.rb +4 -0
- data/app/helpers/api_explorer/api_helper.rb +4 -0
- data/app/helpers/api_explorer/application_helper.rb +4 -0
- data/app/views/api_explorer/api/_authentication.html.erb +36 -0
- data/app/views/api_explorer/api/_headers.html.erb +16 -0
- data/app/views/api_explorer/api/_response.html.erb +44 -0
- data/app/views/api_explorer/api/history.html.erb +3 -0
- data/app/views/api_explorer/api/index.html.erb +42 -0
- data/app/views/api_explorer/api/parameters.html.erb +8 -0
- data/app/views/layouts/api_explorer/application.html.erb +16 -0
- data/config/routes.rb +6 -0
- data/lib/api_explorer/engine.rb +13 -0
- data/lib/api_explorer/version.rb +3 -0
- data/lib/api_explorer.rb +11 -0
- data/lib/tasks/api_explorer_tasks.rake +4 -0
- data/test/api_explorer_test.rb +7 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +15 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config/application.rb +59 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +39 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/api_explorer.rb +2 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +4 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/lib/file2.json +19 -0
- data/test/dummy/log/development.log +34015 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/tmp/cache/assets/BCA/FB0/sprockets%2Fe82897852042905e6a55f41605476313 +0 -0
- data/test/dummy/tmp/cache/assets/BF5/890/sprockets%2F684520e56b0024497f60b05747f55726 +0 -0
- data/test/dummy/tmp/cache/assets/C71/0A0/sprockets%2F440cecbe76112423851222560ad76a69 +0 -0
- data/test/dummy/tmp/cache/assets/C76/1D0/sprockets%2F14bb2119e8211782e884ac51420c844f +0 -0
- data/test/dummy/tmp/cache/assets/C86/740/sprockets%2Fd291ae7ec9685900b4e9e61805540154 +0 -0
- data/test/dummy/tmp/cache/assets/C8D/630/sprockets%2Fbbf5677980d2960c627d13474229c09f +0 -0
- data/test/dummy/tmp/cache/assets/CD5/440/sprockets%2F231be739243c2143636084ed780ccbbf +0 -0
- data/test/dummy/tmp/cache/assets/CEB/9F0/sprockets%2F85995403fefce2339fb188022b0639fc +0 -0
- data/test/dummy/tmp/cache/assets/CEC/210/sprockets%2F410259cd9c7949aaa82a889a9a305c77 +0 -0
- data/test/dummy/tmp/cache/assets/D0E/BB0/sprockets%2F63c187da761f36afe42a39ffe1574300 +0 -0
- data/test/dummy/tmp/cache/assets/D34/1D0/sprockets%2Fa04676c94303a7caa9014ff0f40eed65 +0 -0
- data/test/dummy/tmp/cache/assets/D3F/600/sprockets%2F258e09a6a3c12804b9a1bac297589dee +0 -0
- data/test/dummy/tmp/cache/assets/D43/AF0/sprockets%2F2ea31d99937e20b3979db19a0afb5e54 +0 -0
- data/test/dummy/tmp/cache/assets/D43/C10/sprockets%2F72328aa49e1e8a195434d4a2c3fbed99 +0 -0
- data/test/dummy/tmp/cache/assets/D50/950/sprockets%2F4714ce629d693fd95c1fd16ff7773a1b +0 -0
- data/test/dummy/tmp/cache/assets/D75/A90/sprockets%2F69a9c4dd529aa26bed3d8c85217d282c +0 -0
- data/test/dummy/tmp/cache/assets/D7B/0A0/sprockets%2F012437e537bed2cf9787aaf79db6e81c +0 -0
- data/test/dummy/tmp/cache/assets/D8B/310/sprockets%2F8c1640fafd6202b711c3da935daead71 +0 -0
- data/test/dummy/tmp/cache/assets/D8E/620/sprockets%2Faf16b0cae770d1267bc54cb11af0979b +0 -0
- data/test/dummy/tmp/cache/assets/D91/A50/sprockets%2F5b7712f13ba0c0a7acaad46b6897e2e5 +0 -0
- data/test/dummy/tmp/cache/assets/DAE/590/sprockets%2Fa3bfa2a9b53e4a0cd5db1f075a7301b2 +0 -0
- data/test/dummy/tmp/cache/assets/DC0/9D0/sprockets%2F82f4ea5964ff684c24ff37fcfec6a986 +0 -0
- data/test/dummy/tmp/cache/assets/DDD/8B0/sprockets%2F2641be1d4b59fd5fd668e5ab696ede5b +0 -0
- data/test/dummy/tmp/cache/assets/E0D/7A0/sprockets%2F96836bff2f6ddbbbe38383e65bd3cff1 +0 -0
- data/test/dummy/tmp/cache/assets/E18/210/sprockets%2Fc57cf0c8d4dea938d2ba30a6a3ebc01a +0 -0
- data/test/dummy/tmp/cache/assets/E2B/C80/sprockets%2F2e57f0fe8fbcd9317bdaa4b2ad250ef9 +0 -0
- data/test/dummy/tmp/cache/assets/E44/090/sprockets%2Fd0c29ad3e8eb0ab42df8ae45a0aab36b +0 -0
- data/test/dummy/tmp/cache/assets/ECB/620/sprockets%2Ff199edb8fca027ddc9cbdcf471cfd8fc +0 -0
- data/test/functional/api_explorer/api_controller_test.rb +9 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/test_helper.rb +15 -0
- data/test/unit/helpers/api_explorer/api_helper_test.rb +6 -0
- metadata +235 -0
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2013 YOURNAME
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
= ApiExplorer
|
2
|
+
|
3
|
+
This project is intended to be mounte on an existing Rails Application.
|
4
|
+
|
5
|
+
|
6
|
+
The only precondition is that it requires a multithreaded rails server.
|
7
|
+
|
8
|
+
Instructions:
|
9
|
+
|
10
|
+
- gem "thin", "~> 1.6.1"
|
11
|
+
- bundle install
|
12
|
+
- Add to development.rb (or production.rb): config.thread_safe!
|
13
|
+
- Start the server with "thin start --threaded"
|
data/Rakefile
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
begin
|
3
|
+
require 'bundler/setup'
|
4
|
+
rescue LoadError
|
5
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
6
|
+
end
|
7
|
+
begin
|
8
|
+
require 'rdoc/task'
|
9
|
+
rescue LoadError
|
10
|
+
require 'rdoc/rdoc'
|
11
|
+
require 'rake/rdoctask'
|
12
|
+
RDoc::Task = Rake::RDocTask
|
13
|
+
end
|
14
|
+
|
15
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
16
|
+
rdoc.rdoc_dir = 'rdoc'
|
17
|
+
rdoc.title = 'ApiExplorer'
|
18
|
+
rdoc.options << '--line-numbers'
|
19
|
+
rdoc.rdoc_files.include('README.rdoc')
|
20
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
21
|
+
end
|
22
|
+
|
23
|
+
APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
|
24
|
+
load 'rails/tasks/engine.rake'
|
25
|
+
|
26
|
+
|
27
|
+
|
28
|
+
Bundler::GemHelper.install_tasks
|
29
|
+
|
30
|
+
require 'rake/testtask'
|
31
|
+
|
32
|
+
Rake::TestTask.new(:test) do |t|
|
33
|
+
t.libs << 'lib'
|
34
|
+
t.libs << 'test'
|
35
|
+
t.pattern = 'test/**/*_test.rb'
|
36
|
+
t.verbose = false
|
37
|
+
end
|
38
|
+
|
39
|
+
|
40
|
+
task :default => :test
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,193 @@
|
|
1
|
+
// Place all the behaviors and hooks related to the matching controller here.
|
2
|
+
// All this logic will automatically be available in application.js.
|
3
|
+
$(document).ready(function(){
|
4
|
+
var container = $("body.api_explorer")
|
5
|
+
var parameters_container = $("#parameters_container", container);
|
6
|
+
var headers_container = $("#headers_container", container);
|
7
|
+
var authentication_container = $("#authentication_container", container);
|
8
|
+
|
9
|
+
var method_description = $("#method_description", container);
|
10
|
+
var select_method = $("#api_methods", container);
|
11
|
+
var response_placeholder = $("#response_placeholder", container);
|
12
|
+
var tab_history = $("#response_placeholder").find(".tab_history");
|
13
|
+
var history_menu = tab_history.find(".history_menu");
|
14
|
+
var authentication_method = $("#authentication_type", container);
|
15
|
+
|
16
|
+
// Change selected method
|
17
|
+
select_method.change(function(){
|
18
|
+
$("#graph_path", container).val($(this).val());
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
var position = $(this)[0].selectedIndex;
|
23
|
+
|
24
|
+
// if a method is selected
|
25
|
+
if (position > 0)
|
26
|
+
$.get("api_explorer/method", {position: position}).done(function(data){
|
27
|
+
parameters_container.html(data.parameters_html);
|
28
|
+
method_description.html(data.description);
|
29
|
+
|
30
|
+
parameters_container.show();
|
31
|
+
headers_container.show();
|
32
|
+
method_description.show();
|
33
|
+
authentication_container.show();
|
34
|
+
});
|
35
|
+
else
|
36
|
+
{
|
37
|
+
// Clean everything
|
38
|
+
parameters_container.html('');
|
39
|
+
method_description.html('');
|
40
|
+
parameters_container.hide();
|
41
|
+
headers_container.hide();
|
42
|
+
method_description.hide();
|
43
|
+
authentication_container.hide();
|
44
|
+
}
|
45
|
+
})
|
46
|
+
|
47
|
+
authentication_method.change(function(){
|
48
|
+
if ($(this).val() != ''){
|
49
|
+
$('.auth_wrapper', authentication_container).hide();
|
50
|
+
$('input[type="text"]',authentication_container).val('');
|
51
|
+
$('#' + $(this).val() ,authentication_container).show();
|
52
|
+
}
|
53
|
+
else{
|
54
|
+
$('.auth_wrapper', authentication_container).hide();
|
55
|
+
$('input[type="text"]',authentication_container).val('');
|
56
|
+
}
|
57
|
+
});
|
58
|
+
|
59
|
+
// Clear parameters button
|
60
|
+
$(container).on('click', '#clear_parameters', function(){
|
61
|
+
$("input", parameters_container).val('')
|
62
|
+
})
|
63
|
+
|
64
|
+
$('#clear_headers', container).click(function(){
|
65
|
+
$("input", headers_container).val('');
|
66
|
+
$(".deletable", headers_container).remove();
|
67
|
+
|
68
|
+
})
|
69
|
+
|
70
|
+
$('#clear_authentication', container).click(function(){
|
71
|
+
$("input", authentication_container).val('');
|
72
|
+
$("select", authentication_container).val('');
|
73
|
+
$(".auth_wrapper", authentication_container).hide();
|
74
|
+
})
|
75
|
+
|
76
|
+
// Add headers
|
77
|
+
headers_container.on('focus', ".parameter_input",function(){
|
78
|
+
header_line = $(this).parents(".headers_line");
|
79
|
+
if (header_line.is(':last-child'))
|
80
|
+
{
|
81
|
+
|
82
|
+
header_line.parent().append('<div class="headers_line"><div class="header_field"><input type="text" placeholder="Header name" name="header[name][]" class="parameter_input" /></div><div class="header_field"><input type="text" placeholder="Value" name="header[value][]" class="parameter_input" /></div></div>');
|
83
|
+
|
84
|
+
// Add delete button
|
85
|
+
header_line.append('<div class="delete_btn"></div>');
|
86
|
+
header_line.addClass('deletable');
|
87
|
+
}
|
88
|
+
});
|
89
|
+
|
90
|
+
headers_container.on('click', ".delete_btn",function(){
|
91
|
+
$(this).parents('.headers_line').remove();
|
92
|
+
});
|
93
|
+
|
94
|
+
var minimize_container = function(self, min_container)
|
95
|
+
{
|
96
|
+
min_container.addClass('minimized');
|
97
|
+
self.removeClass('minimize');
|
98
|
+
self.addClass('maximize');
|
99
|
+
self.attr('title','Maximize');
|
100
|
+
}
|
101
|
+
|
102
|
+
var maximize_container = function(self, max_container)
|
103
|
+
{
|
104
|
+
max_container.removeClass('minimized');
|
105
|
+
self.removeClass('maximize');
|
106
|
+
self.addClass('minimize');
|
107
|
+
self.attr('title','Minimize');
|
108
|
+
}
|
109
|
+
|
110
|
+
headers_container.on('click', ".minimize",function(){
|
111
|
+
minimize_container($(this), headers_container);
|
112
|
+
});
|
113
|
+
|
114
|
+
headers_container.on('click', ".maximize",function(){
|
115
|
+
maximize_container($(this),headers_container);
|
116
|
+
});
|
117
|
+
|
118
|
+
parameters_container.on('click', ".minimize",function(){
|
119
|
+
minimize_container($(this),parameters_container);
|
120
|
+
});
|
121
|
+
|
122
|
+
parameters_container.on('click', ".maximize",function(){
|
123
|
+
maximize_container($(this), parameters_container);
|
124
|
+
});
|
125
|
+
|
126
|
+
authentication_container.on('click', ".minimize",function(){
|
127
|
+
minimize_container($(this),authentication_container);
|
128
|
+
});
|
129
|
+
|
130
|
+
authentication_container.on('click', ".maximize",function(){
|
131
|
+
maximize_container($(this), authentication_container);
|
132
|
+
});
|
133
|
+
|
134
|
+
history_menu.on('click', '.history_item', function(){
|
135
|
+
$(".history_item", history_menu).removeClass('active');
|
136
|
+
$(this).addClass('active');
|
137
|
+
var history_content = tab_history.find(".history_content");
|
138
|
+
var timestamp = $(this).data('timestamp');
|
139
|
+
$(".content_wrapper", history_content).hide();
|
140
|
+
|
141
|
+
$("."+ timestamp, history_content).show();
|
142
|
+
});
|
143
|
+
|
144
|
+
//make request
|
145
|
+
$("#api_explorer_submit", container).click(function(e){
|
146
|
+
e.preventDefault();
|
147
|
+
|
148
|
+
var data = $("input", parameters_container).serializeArray().concat($("input", headers_container).serializeArray()).concat($("input, select", authentication_container).serializeArray());
|
149
|
+
|
150
|
+
data.push({name: 'url', value: $("#graph_path", container).val()});
|
151
|
+
data.push({name: 'method', value: select_method.find('option:selected').data('method')});
|
152
|
+
|
153
|
+
$.post("api_explorer/execute", data, function(response){
|
154
|
+
headers_container.addClass('minimized');
|
155
|
+
parameters_container.addClass('minimized');
|
156
|
+
authentication_container.addClass('minimized');
|
157
|
+
|
158
|
+
headers_container.find('.minimize').removeClass('minimize').addClass('maximize');
|
159
|
+
parameters_container.find('.minimize').removeClass('minimize').addClass('maximize');
|
160
|
+
authentication_container.find('.minimize').removeClass('minimize').addClass('maximize');
|
161
|
+
|
162
|
+
response_placeholder.find(".tab_response").find(".content").html(response.response_html);
|
163
|
+
response_placeholder.find(".tab_request").find(".content").html(response.request_html);
|
164
|
+
|
165
|
+
var history_content = tab_history.find(".history_content");
|
166
|
+
|
167
|
+
$(".history_item", history_menu).removeClass('active');
|
168
|
+
// If I have more than 9 elements, remove the last one
|
169
|
+
if ($(".history_item", history_menu).length > 9)
|
170
|
+
{
|
171
|
+
$(".history_item", history_menu).last().remove();
|
172
|
+
$(".content_wrapper", history_content).last().remove();
|
173
|
+
}
|
174
|
+
|
175
|
+
history_content.prepend(response.history_html);
|
176
|
+
history_menu.prepend("<div class='history_item active' data-timestamp='"+ response.timestamp + "'>" + response.http_method + " to "+response.request_url +" ( at " + response.date +" ) " + "</div>");
|
177
|
+
|
178
|
+
$(".content_wrapper", history_content).hide();
|
179
|
+
$("." + response.timestamp, history_content).show();
|
180
|
+
|
181
|
+
|
182
|
+
response_placeholder.slideDown();
|
183
|
+
$('html, body').animate({
|
184
|
+
scrollTop: response_placeholder.offset().top + 50
|
185
|
+
}, 500);
|
186
|
+
|
187
|
+
|
188
|
+
console.log(response);
|
189
|
+
|
190
|
+
})
|
191
|
+
|
192
|
+
});
|
193
|
+
})
|
@@ -0,0 +1,15 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// the compiled file.
|
9
|
+
//
|
10
|
+
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
+
// GO AFTER THE REQUIRES BELOW.
|
12
|
+
//
|
13
|
+
//= require jquery
|
14
|
+
//= require jquery_ujs
|
15
|
+
//= require_tree .
|
@@ -0,0 +1,355 @@
|
|
1
|
+
/*
|
2
|
+
Place all the styles related to the matching controller here.
|
3
|
+
They will automatically be included in application.css.
|
4
|
+
*/
|
5
|
+
|
6
|
+
.api_explorer {
|
7
|
+
background-color: #e9eaed;
|
8
|
+
|
9
|
+
}
|
10
|
+
|
11
|
+
.api_explorer table {
|
12
|
+
display: table;
|
13
|
+
border-collapse: separate;
|
14
|
+
border-color: gray;
|
15
|
+
border-spacing: 0 !important;
|
16
|
+
}
|
17
|
+
.api_explorer tbody {
|
18
|
+
display: table-row-group;
|
19
|
+
vertical-align: middle;
|
20
|
+
border-color: inherit;
|
21
|
+
}
|
22
|
+
|
23
|
+
.api_explorer tr {
|
24
|
+
display: table-row;
|
25
|
+
vertical-align: inherit;
|
26
|
+
border-color: inherit;
|
27
|
+
}
|
28
|
+
|
29
|
+
.api_explorer td{
|
30
|
+
white-space: nowrap;
|
31
|
+
}
|
32
|
+
|
33
|
+
.api_explorer select {
|
34
|
+
height: 28px;
|
35
|
+
border: 1px solid #5b74a8;
|
36
|
+
}
|
37
|
+
|
38
|
+
.api_explorer .container {
|
39
|
+
|
40
|
+
margin: 0 auto;
|
41
|
+
padding-top: 12px;
|
42
|
+
width: 924px;
|
43
|
+
}
|
44
|
+
|
45
|
+
.api_explorer .panel {
|
46
|
+
background: #fff;
|
47
|
+
border: 1px solid;
|
48
|
+
border-color: #d6d7da #d5d8dd #c7c8ca;
|
49
|
+
border-radius: 3px;
|
50
|
+
margin-bottom: 20px;
|
51
|
+
}
|
52
|
+
|
53
|
+
.api_explorer .panel_header{
|
54
|
+
border-top: none;
|
55
|
+
border-top-left-radius: 3px;
|
56
|
+
border-top-right-radius: 3px;
|
57
|
+
background-color: #f6f7f8;
|
58
|
+
padding: 12px;
|
59
|
+
}
|
60
|
+
|
61
|
+
|
62
|
+
.api_explorer .panel_body{
|
63
|
+
border-top: 1px solid #e5e5e5;
|
64
|
+
border-bottom-left-radius: 3px;
|
65
|
+
border-bottom-right-radius: 3px;
|
66
|
+
padding: 12px;
|
67
|
+
margin-bottom: 20px;
|
68
|
+
}
|
69
|
+
|
70
|
+
|
71
|
+
.api_explorer .full_width_cell {
|
72
|
+
width: 86%;
|
73
|
+
border: none;
|
74
|
+
padding: 0;
|
75
|
+
margin: 0;
|
76
|
+
white-space: nowrap;
|
77
|
+
}
|
78
|
+
|
79
|
+
.api_explorer .inputtext{
|
80
|
+
|
81
|
+
margin: 0 0 0 -2px;
|
82
|
+
outline: 0;
|
83
|
+
width: 100%;
|
84
|
+
border: 1px solid #bdc7d8;
|
85
|
+
border-left: none;
|
86
|
+
padding: 3px 3px 4px 0;
|
87
|
+
-webkit-appearance: none;
|
88
|
+
border-radius: 0;
|
89
|
+
background-color: white;
|
90
|
+
display: inline-block;
|
91
|
+
}
|
92
|
+
|
93
|
+
|
94
|
+
.api_explorer #api_explorer_submit{
|
95
|
+
background-color: #5b74a8;
|
96
|
+
border: 1px solid #e9eaed;
|
97
|
+
color: #fff;
|
98
|
+
padding: 4px 8px;
|
99
|
+
cursor: pointer;
|
100
|
+
}
|
101
|
+
|
102
|
+
.api_explorer #api_prefix{
|
103
|
+
border: 1px solid #bdc7d8;
|
104
|
+
border-right: none;
|
105
|
+
color: #777;
|
106
|
+
cursor: pointer;
|
107
|
+
display: inline-block;
|
108
|
+
font-size: 11px;
|
109
|
+
height: 20px;
|
110
|
+
line-height: 20px;
|
111
|
+
padding: 0 5px 0 3px;
|
112
|
+
}
|
113
|
+
|
114
|
+
|
115
|
+
.api_explorer .fields_section{
|
116
|
+
margin-top: 20px;
|
117
|
+
padding: 10px 30px 20px;
|
118
|
+
font-weight: bold;
|
119
|
+
border: 2px solid #f6f7f8;
|
120
|
+
display: none;
|
121
|
+
position: relative;
|
122
|
+
}
|
123
|
+
|
124
|
+
.api_explorer #method_description{
|
125
|
+
display: none;
|
126
|
+
margin: 10px 0 20px 0;
|
127
|
+
font-style: italic;
|
128
|
+
}
|
129
|
+
|
130
|
+
.api_explorer .fields_section h2{
|
131
|
+
font-weight: bold;
|
132
|
+
color: #5b74a8;
|
133
|
+
margin-top: 5px;
|
134
|
+
font-size: 19px;
|
135
|
+
}
|
136
|
+
|
137
|
+
.api_explorer .fields_section #clear_parameters, .api_explorer .fields_section #clear_headers,
|
138
|
+
.api_explorer .fields_section #clear_authentication{
|
139
|
+
width: 30px;
|
140
|
+
height: 30px;
|
141
|
+
background-size: cover;
|
142
|
+
background-image: url(clear.png);
|
143
|
+
position: absolute;
|
144
|
+
top: 10px;
|
145
|
+
right: 10px;
|
146
|
+
cursor: pointer;
|
147
|
+
}
|
148
|
+
|
149
|
+
.api_explorer .editor-label{
|
150
|
+
float: left;
|
151
|
+
width: 200px;
|
152
|
+
font-size: 15px;
|
153
|
+
padding-top: 8px;
|
154
|
+
}
|
155
|
+
|
156
|
+
|
157
|
+
.api_explorer .editor-field{
|
158
|
+
margin-left: 200px;
|
159
|
+
}
|
160
|
+
|
161
|
+
.api_explorer .parameter_input{
|
162
|
+
color: #333;
|
163
|
+
padding: 5px;
|
164
|
+
border: none;
|
165
|
+
box-shadow: none;
|
166
|
+
border-bottom: solid thin #CCC;
|
167
|
+
border-radius: 0;
|
168
|
+
outline: none;
|
169
|
+
margin-right: 10px;
|
170
|
+
width: 224px;
|
171
|
+
line-height: 16px;
|
172
|
+
}
|
173
|
+
|
174
|
+
.api_explorer .editor-field input {
|
175
|
+
position: relative;
|
176
|
+
top: -4px;
|
177
|
+
}
|
178
|
+
|
179
|
+
.api_explorer .delete_btn{
|
180
|
+
width: 18px;
|
181
|
+
height: 18px;
|
182
|
+
background-image: url(delete.png);
|
183
|
+
cursor: pointer;
|
184
|
+
}
|
185
|
+
|
186
|
+
.api_explorer #headers_container .delete_btn{
|
187
|
+
display: inline-block;
|
188
|
+
position: relative;
|
189
|
+
top: 10px;
|
190
|
+
}
|
191
|
+
|
192
|
+
.api_explorer #headers_container .header_field{
|
193
|
+
display:inline-block;
|
194
|
+
width: 230px;
|
195
|
+
margin-right: 20px;
|
196
|
+
}
|
197
|
+
|
198
|
+
/* Font size 0 will remove spaces between inline-block elements. Dirty hack but works. */
|
199
|
+
.api_explorer .headers_line{
|
200
|
+
font-size: 0;
|
201
|
+
}
|
202
|
+
|
203
|
+
.api_explorer .minimize {
|
204
|
+
width: 30px;
|
205
|
+
height: 30px;
|
206
|
+
background-image: url(minimize.png);
|
207
|
+
background-size: cover;
|
208
|
+
cursor: pointer;
|
209
|
+
}
|
210
|
+
|
211
|
+
.api_explorer .maximize {
|
212
|
+
width: 30px;
|
213
|
+
height: 30px;
|
214
|
+
background-image: url(maximize.png);
|
215
|
+
background-size: cover;
|
216
|
+
cursor: pointer;
|
217
|
+
}
|
218
|
+
|
219
|
+
|
220
|
+
.api_explorer .fields_section .minimize, .api_explorer .fields_section .maximize{
|
221
|
+
position: absolute;
|
222
|
+
top: 10px;
|
223
|
+
right: 45px;
|
224
|
+
}
|
225
|
+
|
226
|
+
.api_explorer .fields_section.minimized {
|
227
|
+
height: 25px;
|
228
|
+
overflow: hidden;
|
229
|
+
}
|
230
|
+
|
231
|
+
/* TABS */
|
232
|
+
|
233
|
+
.api_explorer .tabs {
|
234
|
+
position: relative;
|
235
|
+
min-height: 700px;
|
236
|
+
clear: both;
|
237
|
+
margin: 25px 0;
|
238
|
+
}
|
239
|
+
|
240
|
+
.api_explorer .tab {
|
241
|
+
float: left;
|
242
|
+
}
|
243
|
+
|
244
|
+
.api_explorer .tab [type=radio] {
|
245
|
+
display: none;
|
246
|
+
}
|
247
|
+
|
248
|
+
.api_explorer .tabs [type=radio]:checked ~ label ~ .content {
|
249
|
+
z-index: 1;
|
250
|
+
}
|
251
|
+
|
252
|
+
.api_explorer .tabs [type=radio]:checked ~ label ~ .content > * {
|
253
|
+
opacity: 1;
|
254
|
+
-webkit-transform: translateX(0);
|
255
|
+
-moz-transform: translateX(0);
|
256
|
+
-ms-transform: translateX(0);
|
257
|
+
-o-transform: translateX(0);
|
258
|
+
}
|
259
|
+
|
260
|
+
.api_explorer .tabs [type=radio]:checked ~ label {
|
261
|
+
background: white;
|
262
|
+
border-bottom: 1px solid white;
|
263
|
+
z-index: 2;
|
264
|
+
}
|
265
|
+
|
266
|
+
.api_explorer .tab label {
|
267
|
+
background: #eee;
|
268
|
+
padding: 10px;
|
269
|
+
border: 1px solid #ccc;
|
270
|
+
margin-left: -1px;
|
271
|
+
position: relative;
|
272
|
+
left: 1px;
|
273
|
+
}
|
274
|
+
|
275
|
+
.api_explorer .tabs .content {
|
276
|
+
position: absolute;
|
277
|
+
top: 28px;
|
278
|
+
left: 0;
|
279
|
+
background: white;
|
280
|
+
right: 0;
|
281
|
+
bottom: 0;
|
282
|
+
padding: 20px;
|
283
|
+
border: 1px solid #ccc;
|
284
|
+
overflow: hidden;
|
285
|
+
overflow-y: scroll;
|
286
|
+
}
|
287
|
+
|
288
|
+
.api_explorer .tabs .content.overflow {
|
289
|
+
overflow: auto;
|
290
|
+
}
|
291
|
+
|
292
|
+
.api_explorer .content > * {
|
293
|
+
opacity: 0;
|
294
|
+
-webkit-transform: translate3d(0, 0, 0);
|
295
|
+
-webkit-transform: translateX(-100%);
|
296
|
+
-moz-transform: translateX(-100%);
|
297
|
+
-ms-transform: translateX(-100%);
|
298
|
+
-o-transform: translateX(-100%);
|
299
|
+
-webkit-transition: all 0.6s ease;
|
300
|
+
-moz-transition: all 0.6s ease;
|
301
|
+
-ms-transition: all 0.6s ease;
|
302
|
+
-o-transition: all 0.6s ease;
|
303
|
+
}
|
304
|
+
|
305
|
+
.api_explorer .history_menu {
|
306
|
+
float: right;
|
307
|
+
max-width: 250px;
|
308
|
+
font-size: 0.8em;
|
309
|
+
background: #eee;
|
310
|
+
}
|
311
|
+
|
312
|
+
.api_explorer .history_item {
|
313
|
+
padding: 10px;
|
314
|
+
border: 1px solid #ccc;
|
315
|
+
cursor: pointer;
|
316
|
+
}
|
317
|
+
|
318
|
+
.api_explorer .history_item.active {
|
319
|
+
background-color: #5b74a8;
|
320
|
+
color: white;
|
321
|
+
}
|
322
|
+
|
323
|
+
|
324
|
+
.api_explorer .history_wrapper {
|
325
|
+
border: 1px solid #ccc;
|
326
|
+
}
|
327
|
+
|
328
|
+
.api_explorer .history_wrapper .content_wrapper{
|
329
|
+
display:none;
|
330
|
+
}
|
331
|
+
|
332
|
+
.api_explorer .history_content
|
333
|
+
{
|
334
|
+
float: left;
|
335
|
+
max-width: 500px;
|
336
|
+
padding-left: 15px;
|
337
|
+
}
|
338
|
+
|
339
|
+
/* Authentication */
|
340
|
+
.api_explorer #basic_auth, .api_explorer #hash_url_auth{
|
341
|
+
margin-left: 80px;
|
342
|
+
margin-top: 20px;
|
343
|
+
display: none;
|
344
|
+
}
|
345
|
+
|
346
|
+
|
347
|
+
.api_explorer #hash_url_auth .information_field {
|
348
|
+
margin-bottom: 10px;
|
349
|
+
}
|
350
|
+
|
351
|
+
.api_explorer #hash_url_auth .auth_method_description{
|
352
|
+
margin: 10px 0 20px 0;
|
353
|
+
font-style: italic;
|
354
|
+
font-weight: normal;
|
355
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
+
*
|
11
|
+
*= require_self
|
12
|
+
*= require_tree .
|
13
|
+
*/
|