From 5993262403014cfd053783cca1ac646089101cc0 Mon Sep 17 00:00:00 2001 From: SerenaFeng Date: Wed, 11 May 2016 11:48:06 +0800 Subject: integration of tornado and swagger-ui this code will be applied to testApi later, as regards how to use it, please refer utils/test/result_collection_api/tornado_swagger_ui/README.md JIRA: FUNCTEST-247 Change-Id: Ie40e125846add7ceda15f05a38232dc8813b8f29 Signed-off-by: SerenaFeng --- .../tornado_swagger_ui/LICENSE | 20 + .../tornado_swagger_ui/README | 1 + .../tornado_swagger_ui/README.md | 182 ++ .../tornado_swagger_ui/example/basic.py | 146 ++ .../tornado_swagger_ui/setup.py | 31 + .../tornado_swagger_ui/tornado_swagger/__init__.py | 7 + .../tornado_swagger_ui/tornado_swagger/handlers.py | 20 + .../tornado_swagger_ui/tornado_swagger/settings.py | 25 + .../tornado_swagger/static/.gitignore | 1 + .../static/css/highlight.default.css | 135 + .../static/css/hightlight.default.css | 135 + .../tornado_swagger/static/css/screen.css | 1224 +++++++++ .../tornado_swagger/static/endpoint.html | 77 + .../static/images/explorer_icons.png | Bin 0 -> 5763 bytes .../tornado_swagger/static/images/logo_small.png | Bin 0 -> 770 bytes .../static/images/pet_store_api.png | Bin 0 -> 824 bytes .../tornado_swagger/static/images/throbber.gif | Bin 0 -> 9257 bytes .../tornado_swagger/static/images/wordnik_api.png | Bin 0 -> 980 bytes .../tornado_swagger/static/index.html | 85 + .../tornado_swagger/static/lib/backbone-min.js | 38 + .../tornado_swagger/static/lib/handlebars-1.0.0.js | 2278 ++++++++++++++++ .../static/lib/highlight.7.3.pack.js | 1 + .../tornado_swagger/static/lib/jquery-1.8.0.min.js | 2 + .../static/lib/jquery.ba-bbq.min.js | 18 + .../static/lib/jquery.slideto.min.js | 1 + .../static/lib/jquery.wiggle.min.js | 8 + .../tornado_swagger/static/lib/shred.bundle.js | 2765 ++++++++++++++++++++ .../tornado_swagger/static/lib/shred/content.js | 193 ++ .../tornado_swagger/static/lib/swagger-oauth.js | 211 ++ .../tornado_swagger/static/lib/swagger.js | 1417 ++++++++++ .../tornado_swagger/static/lib/underscore-min.js | 32 + .../tornado_swagger/static/o2c.html | 15 + .../tornado_swagger/static/swagger-ui.js | 2247 ++++++++++++++++ .../tornado_swagger/static/swagger-ui.min.js | 1 + .../tornado_swagger_ui/tornado_swagger/swagger.py | 200 ++ .../tornado_swagger_ui/tornado_swagger/views.py | 116 + 36 files changed, 11632 insertions(+) create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/LICENSE create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/README create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/README.md create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/example/basic.py create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/setup.py create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/__init__.py create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/handlers.py create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/settings.py create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/.gitignore create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/css/highlight.default.css create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/css/hightlight.default.css create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/css/screen.css create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/endpoint.html create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/images/explorer_icons.png create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/images/logo_small.png create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/images/pet_store_api.png create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/images/throbber.gif create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/images/wordnik_api.png create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/index.html create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/lib/backbone-min.js create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/lib/handlebars-1.0.0.js create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/lib/highlight.7.3.pack.js create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/lib/jquery-1.8.0.min.js create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/lib/jquery.ba-bbq.min.js create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/lib/jquery.slideto.min.js create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/lib/jquery.wiggle.min.js create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/lib/shred.bundle.js create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/lib/shred/content.js create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/lib/swagger-oauth.js create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/lib/swagger.js create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/lib/underscore-min.js create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/o2c.html create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/swagger-ui.js create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/swagger-ui.min.js create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/swagger.py create mode 100644 utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/views.py (limited to 'utils') diff --git a/utils/test/result_collection_api/tornado_swagger_ui/LICENSE b/utils/test/result_collection_api/tornado_swagger_ui/LICENSE new file mode 100644 index 000000000..fbefeff74 --- /dev/null +++ b/utils/test/result_collection_api/tornado_swagger_ui/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 Ran Tavory + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/utils/test/result_collection_api/tornado_swagger_ui/README b/utils/test/result_collection_api/tornado_swagger_ui/README new file mode 100644 index 000000000..1bcc1145e --- /dev/null +++ b/utils/test/result_collection_api/tornado_swagger_ui/README @@ -0,0 +1 @@ +Please see documentation here: https://github.com/SerenaFeng/tornado-swagger diff --git a/utils/test/result_collection_api/tornado_swagger_ui/README.md b/utils/test/result_collection_api/tornado_swagger_ui/README.md new file mode 100644 index 000000000..1ae383461 --- /dev/null +++ b/utils/test/result_collection_api/tornado_swagger_ui/README.md @@ -0,0 +1,182 @@ +# tornado-swagger + +## What is tornado-swagger? +tornado is a wrapper for tornado which enables swagger-ui support. + +In essense, you just need to wrap the Api instance and add a few python decorators to get full swagger support. + +## How to: +Install: + +``` +python setup.py install +``` +(This installs tornado and epydoc as well) + + +And in your program, where you'd usually just use tornado, add just a little bit of sauce and get a swagger spec out. + + +```python +from tornado.web import RequestHandler, HTTPError +from tornado_swagger import swagger + +swagger.docs() + +# You may decorate your operation with @swagger.operation and use docs to inform information +class ItemNoParamHandler(GenericApiHandler): + @swagger.operation(nickname='create') + def post(self): + """ + @param body: create test results for a pod. + @type body: L{Item} + @return 200: pod is created. + @raise 400: invalid input + """ + +# Operations not decorated with @swagger.operation do not get added to the swagger docs + +class ItemNoParamHandler(GenericApiHandler): + def options(self): + """ + I'm not visible in the swagger docs + """ + pass + + +# Then you use swagger.Application instead of tornado.web.Application +# and do other operations as usual + +def make_app(): + return swagger.Application([ + (r"/pods", ItemNoParamHandler), + (r"/pods/([^/]+)", ItemHandler), + (r"/projects/([^/]+)/cases/([^/]+)", ItemOptionParamHandler), + ]) + +# You define models like this: +@swagger.model +class Item: + """ + @descriptin: + This is an example of a model class that has parameters in its constructor + and the fields in the swagger spec are derived from the parameters to __init__. + @notes: + In this case we would have property1, property2 as required parameters and property3 as optional parameter. + @property property3: Item decription + @ptype property3: L{PropertySubclass} + """ + def __init__(self, property1, property2=None): + self.property1 = property1 + self.property2 = property2 + +# Swagger json: + "models": { + "Item": { + "description": "A description...", + "id": "Item", + "required": [ + "property1", + ], + "properties": [ + "property1": { + "type": "string" + }, + "property2": { + "type": "string" + "default": null + } + ] + } + } + +# If you declare an __init__ method with meaningful arguments +# then those args could be used to deduce the swagger model fields. +# just as shown above + +# if you declare an @property in docs, this property property2 will also be used to deduce the swagger model fields +class Item: + """ + @property property3: Item description + """ + def __init__(self, property1, property2): + self.property1 = property1 + self.property2 = property2 + +# Swagger json: + "models": { + "Item": { + "description": "A description...", + "id": "Item", + "required": [ + "property1", + ], + "properties": [ + "property1": { + "type": "string" + }, + "property2": { + "type": "string" + } + "property3": { + "type": "string" + } + ] + } + } + +# if you declare an argument with @ptype, the type of this argument will be specified rather than the default 'string' +class Item: + """ + @ptype property3: L{PropertySubclass} + """ + def __init__(self, property1, property2, property3=None): + self.property1 = property1 + self.property2 = property2 + self.property3 = property3 + +# Swagger json: + "models": { + "Item": { + "description": "A description...", + "id": "Item", + "required": [ + "property1", + ], + "properties": [ + "property1": { + "type": "string" + }, + "property2": { + "type": "string" + }, + "property3": { + "type": "PropertySubclass" + "default": null + } + ] + } + } +``` + +# Running and testing + +Now run your tornado app + +``` +python basic.py +``` + +And visit: + +``` +curl http://localhost:711/swagger/spec +``` + +access to web +``` +http://localhost:711/swagger/spec.html +``` + +# Passing more metadata to swagger +customized arguments used in creating the 'swagger.docs' object will be supported later diff --git a/utils/test/result_collection_api/tornado_swagger_ui/example/basic.py b/utils/test/result_collection_api/tornado_swagger_ui/example/basic.py new file mode 100644 index 000000000..ded99d55d --- /dev/null +++ b/utils/test/result_collection_api/tornado_swagger_ui/example/basic.py @@ -0,0 +1,146 @@ +import json + +import tornado.ioloop +from tornado.web import RequestHandler, HTTPError +from tornado_swagger import swagger + +DEFAULT_REPRESENTATION = "application/json" +HTTP_BAD_REQUEST = 400 +HTTP_FORBIDDEN = 403 +HTTP_NOT_FOUND = 404 + +swagger.docs() + + +@swagger.model +class PropertySubclass: + def __init__(self, sub_property=None): + self.sub_property = sub_property + + +@swagger.model +class Item: + """ + @description: + This is an example of a model class that has parameters in its constructor + and the fields in the swagger spec are derived from the parameters to __init__. + @notes: + In this case we would have property1, name as required parameters and property3 as optional parameter. + @property property3: Item description + @ptype property3: L{PropertySubclass} + """ + def __init__(self, property1, property2=None, property3=None): + self.property1 = property1 + self.property2 = property2 + self.property3 = property3 + +items = {} + + +class GenericApiHandler(RequestHandler): + """ + The purpose of this class is to take benefit of inheritance and prepare + a set of common functions for + the handlers + """ + + def initialize(self): + """ Prepares the database for the entire class """ + pass + + def prepare(self): + if not (self.request.method == "GET" or self.request.method == "DELETE"): + if self.request.headers.get("Content-Type") is not None: + if self.request.headers["Content-Type"].startswith(DEFAULT_REPRESENTATION): + try: + self.json_args = json.loads(self.request.body) + except (ValueError, KeyError, TypeError) as error: + raise HTTPError(HTTP_BAD_REQUEST, + "Bad Json format [{}]". + format(error)) + else: + self.json_args = None + + def finish_request(self, json_object): + self.write(json.dumps(json_object)) + self.set_header("Content-Type", DEFAULT_REPRESENTATION) + self.finish() + + +class ItemNoParamHandler(GenericApiHandler): + @swagger.operation(nickname='create') + def post(self): + """ + @param body: create test results for a pod. + @type body: L{Item} + @return 200: pod is created. + @raise 400: invalid input + """ + property1 = self.json_args.get('property1') + items[property1] = self.json_args + self.finish_request(items[property1]) + + @swagger.operation(nickname='list') + def get(self): + """ + @rtype: L{Item} + """ + self.finish_request(items) + + def options(self): + """ + I'm not visible in the swagger docs + """ + self.finish_request("I'm invisible in the swagger docs") + + +class ItemHandler(GenericApiHandler): + @swagger.operation(nickname='get') + def get(self, arg): + """ + @rtype: L{Item} + @description: get pod's test results + @notes: + get a pod test results, + + This will be added to the Implementation Notes.It lets you put very long text in your api. + """ + self.finish_request(items[arg]) + + @swagger.operation(nickname='delete') + def delete(self, arg): + """ + @description: delete pod by pod_id + @notes: + delete test results of a pod + + This will be added to the Implementation Notes.It lets you put very long text in your api. + """ + del items[arg] + self.finish_request("success") + + +class ItemOptionParamHandler(GenericApiHandler): + @swagger.operation(nickname='create') + def post(self, arg1, arg2=''): + """ + @return 200: case is created + """ + print("ProjectHandler.post: %s -- %s -- %s" % (arg1, arg2, self.request.full_url())) + fs = open("/home/swagger/tornado-rest-swagger/%s/%s" % (arg1, arg2), "wb") + fs.write(self.request.body) + self.write("success") + + +def make_app(): + return swagger.Application([ + (r"/items", ItemNoParamHandler), + (r"/items/([^/]+)", ItemHandler), + (r"/items/([^/]+)/cases/([^/]+)", ItemOptionParamHandler), + ]) + + +if __name__ == "__main__": + app = make_app() + app.listen(711) + tornado.ioloop.IOLoop.current().start() diff --git a/utils/test/result_collection_api/tornado_swagger_ui/setup.py b/utils/test/result_collection_api/tornado_swagger_ui/setup.py new file mode 100644 index 000000000..97655917c --- /dev/null +++ b/utils/test/result_collection_api/tornado_swagger_ui/setup.py @@ -0,0 +1,31 @@ +try: + from setuptools import setup +except ImportError: + from distutils.core import setup + +with open('README') as file: + long_description = file.read() + +setup(name='tornado-swagger', + version='1.0', + url='https://github.com/SerenaFeng/tornado-swagger', + zip_safe=False, + packages=['tornado_swagger'], + package_data={ + 'tornado_swagger': [ + 'static/*.*', + 'static/css/*.*', + 'static/images/*.*', + 'static/lib/*.*', + 'static/lib/shred/*.*', + ] + }, + description='Extract swagger specs from your tornado project', + author='Serena Feng', + license='MIT', + long_description=long_description, + install_requires=[ + 'tornado>=3.1', + 'epydoc>=0.3.1' + ], +) diff --git a/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/__init__.py b/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/__init__.py new file mode 100644 index 000000000..2b4f76550 --- /dev/null +++ b/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/__init__.py @@ -0,0 +1,7 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +from tornado_swagger.swagger import * +from tornado_swagger.handlers import * + +__author__ = 'serena' + diff --git a/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/handlers.py b/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/handlers.py new file mode 100644 index 000000000..c9d49aea3 --- /dev/null +++ b/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/handlers.py @@ -0,0 +1,20 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +from tornado.web import URLSpec, StaticFileHandler + +from tornado_swagger.settings import * +from tornado_swagger.views import * + +__author__ = 'serena' + + +def swagger_handlers(): + prefix = default_settings.get('swagger_prefix', '/swagger') + if prefix[-1] != '/': + prefix += '/' + return [ + URLSpec(prefix + r'spec.html$', SwaggerUIHandler, default_settings, name=URL_SWAGGER_API_DOCS), + URLSpec(prefix + r'spec.json$', SwaggerResourcesHandler, default_settings, name=URL_SWAGGER_API_LIST), + URLSpec(prefix + r'spec$', SwaggerApiHandler, default_settings, name=URL_SWAGGER_API_SPEC), + (prefix + r'(.*\.(css|png|gif|js))', StaticFileHandler, {'path': default_settings.get('static_path')}), + ] diff --git a/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/settings.py b/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/settings.py new file mode 100644 index 000000000..bd70c179f --- /dev/null +++ b/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/settings.py @@ -0,0 +1,25 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +import os.path + +__author__ = 'serena' + +SWAGGER_VERSION = '1.2' + +URL_SWAGGER_API_DOCS = 'swagger-api-docs' +URL_SWAGGER_API_LIST = 'swagger-api-list' +URL_SWAGGER_API_SPEC = 'swagger-api-spec' + +STATIC_PATH = os.path.join(os.path.dirname(os.path.normpath(__file__)), 'static') + +default_settings = { + 'base_url': '/', + 'static_path': STATIC_PATH, + 'swagger_prefix': '/swagger', + 'api_version': 'v1.0', + 'api_key': '', + 'enabled_methods': ['get', 'post', 'put', 'patch', 'delete'], + 'exclude_namespaces': [], +} + +models = [] diff --git a/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/.gitignore b/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/.gitignore new file mode 100644 index 000000000..ebf4281dc --- /dev/null +++ b/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/.gitignore @@ -0,0 +1 @@ +!lib diff --git a/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/css/highlight.default.css b/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/css/highlight.default.css new file mode 100644 index 000000000..e417fc179 --- /dev/null +++ b/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/css/highlight.default.css @@ -0,0 +1,135 @@ +/* + +Original style from softwaremaniacs.org (c) Ivan Sagalaev + +*/ + +pre code { + display: block; padding: 0.5em; + background: #F0F0F0; +} + +pre code, +pre .subst, +pre .tag .title, +pre .lisp .title, +pre .clojure .built_in, +pre .nginx .title { + color: black; +} + +pre .string, +pre .title, +pre .constant, +pre .parent, +pre .tag .value, +pre .rules .value, +pre .rules .value .number, +pre .preprocessor, +pre .ruby .symbol, +pre .ruby .symbol .string, +pre .aggregate, +pre .template_tag, +pre .django .variable, +pre .smalltalk .class, +pre .addition, +pre .flow, +pre .stream, +pre .bash .variable, +pre .apache .tag, +pre .apache .cbracket, +pre .tex .command, +pre .tex .special, +pre .erlang_repl .function_or_atom, +pre .markdown .header { + color: #800; +} + +pre .comment, +pre .annotation, +pre .template_comment, +pre .diff .header, +pre .chunk, +pre .markdown .blockquote { + color: #888; +} + +pre .number, +pre .date, +pre .regexp, +pre .literal, +pre .smalltalk .symbol, +pre .smalltalk .char, +pre .go .constant, +pre .change, +pre .markdown .bullet, +pre .markdown .link_url { + color: #080; +} + +pre .label, +pre .javadoc, +pre .ruby .string, +pre .decorator, +pre .filter .argument, +pre .localvars, +pre .array, +pre .attr_selector, +pre .important, +pre .pseudo, +pre .pi, +pre .doctype, +pre .deletion, +pre .envvar, +pre .shebang, +pre .apache .sqbracket, +pre .nginx .built_in, +pre .tex .formula, +pre .erlang_repl .reserved, +pre .prompt, +pre .markdown .link_label, +pre .vhdl .attribute, +pre .clojure .attribute, +pre .coffeescript .property { + color: #88F +} + +pre .keyword, +pre .id, +pre .phpdoc, +pre .title, +pre .built_in, +pre .aggregate, +pre .css .tag, +pre .javadoctag, +pre .phpdoc, +pre .yardoctag, +pre .smalltalk .class, +pre .winutils, +pre .bash .variable, +pre .apache .tag, +pre .go .typename, +pre .tex .command, +pre .markdown .strong, +pre .request, +pre .status { + font-weight: bold; +} + +pre .markdown .emphasis { + font-style: italic; +} + +pre .nginx .built_in { + font-weight: normal; +} + +pre .coffeescript .javascript, +pre .javascript .xml, +pre .tex .formula, +pre .xml .javascript, +pre .xml .vbscript, +pre .xml .css, +pre .xml .cdata { + opacity: 0.5; +} diff --git a/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/css/hightlight.default.css b/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/css/hightlight.default.css new file mode 100644 index 000000000..e417fc179 --- /dev/null +++ b/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/css/hightlight.default.css @@ -0,0 +1,135 @@ +/* + +Original style from softwaremaniacs.org (c) Ivan Sagalaev + +*/ + +pre code { + display: block; padding: 0.5em; + background: #F0F0F0; +} + +pre code, +pre .subst, +pre .tag .title, +pre .lisp .title, +pre .clojure .built_in, +pre .nginx .title { + color: black; +} + +pre .string, +pre .title, +pre .constant, +pre .parent, +pre .tag .value, +pre .rules .value, +pre .rules .value .number, +pre .preprocessor, +pre .ruby .symbol, +pre .ruby .symbol .string, +pre .aggregate, +pre .template_tag, +pre .django .variable, +pre .smalltalk .class, +pre .addition, +pre .flow, +pre .stream, +pre .bash .variable, +pre .apache .tag, +pre .apache .cbracket, +pre .tex .command, +pre .tex .special, +pre .erlang_repl .function_or_atom, +pre .markdown .header { + color: #800; +} + +pre .comment, +pre .annotation, +pre .template_comment, +pre .diff .header, +pre .chunk, +pre .markdown .blockquote { + color: #888; +} + +pre .number, +pre .date, +pre .regexp, +pre .literal, +pre .smalltalk .symbol, +pre .smalltalk .char, +pre .go .constant, +pre .change, +pre .markdown .bullet, +pre .markdown .link_url { + color: #080; +} + +pre .label, +pre .javadoc, +pre .ruby .string, +pre .decorator, +pre .filter .argument, +pre .localvars, +pre .array, +pre .attr_selector, +pre .important, +pre .pseudo, +pre .pi, +pre .doctype, +pre .deletion, +pre .envvar, +pre .shebang, +pre .apache .sqbracket, +pre .nginx .built_in, +pre .tex .formula, +pre .erlang_repl .reserved, +pre .prompt, +pre .markdown .link_label, +pre .vhdl .attribute, +pre .clojure .attribute, +pre .coffeescript .property { + color: #88F +} + +pre .keyword, +pre .id, +pre .phpdoc, +pre .title, +pre .built_in, +pre .aggregate, +pre .css .tag, +pre .javadoctag, +pre .phpdoc, +pre .yardoctag, +pre .smalltalk .class, +pre .winutils, +pre .bash .variable, +pre .apache .tag, +pre .go .typename, +pre .tex .command, +pre .markdown .strong, +pre .request, +pre .status { + font-weight: bold; +} + +pre .markdown .emphasis { + font-style: italic; +} + +pre .nginx .built_in { + font-weight: normal; +} + +pre .coffeescript .javascript, +pre .javascript .xml, +pre .tex .formula, +pre .xml .javascript, +pre .xml .vbscript, +pre .xml .css, +pre .xml .cdata { + opacity: 0.5; +} diff --git a/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/css/screen.css b/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/css/screen.css new file mode 100644 index 000000000..2882b8d66 --- /dev/null +++ b/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/css/screen.css @@ -0,0 +1,1224 @@ +/* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 */ +html, +body, +div, +span, +applet, +object, +iframe, +h1, +h2, +h3, +h4, +h5, +h6, +p, +blockquote, +pre, +a, +abbr, +acronym, +address, +big, +cite, +code, +del, +dfn, +em, +img, +ins, +kbd, +q, +s, +samp, +small, +strike, +strong, +sub, +sup, +tt, +var, +b, +u, +i, +center, +dl, +dt, +dd, +ol, +ul, +li, +fieldset, +form, +label, +legend, +table, +caption, +tbody, +tfoot, +thead, +tr, +th, +td, +article, +aside, +canvas, +details, +embed, +figure, +figcaption, +footer, +header, +hgroup, +menu, +nav, +output, +ruby, +section, +summary, +time, +mark, +audio, +video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} +/* HTML5 display-role reset for older browsers */ +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +menu, +nav, +section { + display: block; +} +body { + line-height: 1; +} +ol, +ul { + list-style: none; +} +blockquote, +q { + quotes: none; +} +blockquote:before, +blockquote:after, +q:before, +q:after { + content: ''; + content: none; +} +table { + border-collapse: collapse; + border-spacing: 0; +} +.swagger-ui-wrap { + line-height: 1; + font-family: "Droid Sans", sans-serif; + max-width: 960px; + margin-left: auto; + margin-right: auto; +} +.swagger-ui-wrap b, +.swagger-ui-wrap strong { + font-family: "Droid Sans", sans-serif; + font-weight: bold; +} +.swagger-ui-wrap q, +.swagger-ui-wrap blockquote { + quotes: none; +} +.swagger-ui-wrap p { + line-height: 1.4em; + padding: 0 0 10px; + color: #333333; +} +.swagger-ui-wrap q:before, +.swagger-ui-wrap q:after, +.swagger-ui-wrap blockquote:before, +.swagger-ui-wrap blockquote:after { + content: none; +} +.swagger-ui-wrap .heading_with_menu h1, +.swagger-ui-wrap .heading_with_menu h2, +.swagger-ui-wrap .heading_with_menu h3, +.swagger-ui-wrap .heading_with_menu h4, +.swagger-ui-wrap .heading_with_menu h5, +.swagger-ui-wrap .heading_with_menu h6 { + display: block; + clear: none; + float: left; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; + width: 60%; +} +.swagger-ui-wrap table { + border-collapse: collapse; + border-spacing: 0; +} +.swagger-ui-wrap table thead tr th { + padding: 5px; + font-size: 0.9em; + color: #666666; + border-bottom: 1px solid #999999; +} +.swagger-ui-wrap table tbody tr:last-child td { + border-bottom: none; +} +.swagger-ui-wrap table tbody tr.offset { + background-color: #f0f0f0; +} +.swagger-ui-wrap table tbody tr td { + padding: 6px; + font-size: 0.9em; + border-bottom: 1px solid #cccccc; + vertical-align: top; + line-height: 1.3em; +} +.swagger-ui-wrap ol { + margin: 0px 0 10px; + padding: 0 0 0 18px; + list-style-type: decimal; +} +.swagger-ui-wrap ol li { + padding: 5px 0px; + font-size: 0.9em; + color: #333333; +} +.swagger-ui-wrap ol, +.swagger-ui-wrap ul { + list-style: none; +} +.swagger-ui-wrap h1 a, +.swagger-ui-wrap h2 a, +.swagger-ui-wrap h3 a, +.swagger-ui-wrap h4 a, +.swagger-ui-wrap h5 a, +.swagger-ui-wrap h6 a { + text-decoration: none; +} +.swagger-ui-wrap h1 a:hover, +.swagger-ui-wrap h2 a:hover, +.swagger-ui-wrap h3 a:hover, +.swagger-ui-wrap h4 a:hover, +.swagger-ui-wrap h5 a:hover, +.swagger-ui-wrap h6 a:hover { + text-decoration: underline; +} +.swagger-ui-wrap h1 span.divider, +.swagger-ui-wrap h2 span.divider, +.swagger-ui-wrap h3 span.divider, +.swagger-ui-wrap h4 span.divider, +.swagger-ui-wrap h5 span.divider, +.swagger-ui-wrap h6 span.divider { + color: #aaaaaa; +} +.swagger-ui-wrap a { + color: #547f00; +} +.swagger-ui-wrap a img { + border: none; +} +.swagger-ui-wrap article, +.swagger-ui-wrap aside, +.swagger-ui-wrap details, +.swagger-ui-wrap figcaption, +.swagger-ui-wrap figure, +.swagger-ui-wrap footer, +.swagger-ui-wrap header, +.swagger-ui-wrap hgroup, +.swagger-ui-wrap menu, +.swagger-ui-wrap nav, +.swagger-ui-wrap section, +.swagger-ui-wrap summary { + display: block; +} +.swagger-ui-wrap pre { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + background-color: #fcf6db; + border: 1px solid #e5e0c6; + padding: 10px; +} +.swagger-ui-wrap pre code { + line-height: 1.6em; + background: none; +} +.swagger-ui-wrap .content > .content-type > div > label { + clear: both; + display: block; + color: #0F6AB4; + font-size: 1.1em; + margin: 0; + padding: 15px 0 5px; +} +.swagger-ui-wrap .content pre { + font-size: 12px; + margin-top: 5px; + padding: 5px; +} +.swagger-ui-wrap .icon-btn { + cursor: pointer; +} +.swagger-ui-wrap .info_title { + padding-bottom: 10px; + font-weight: bold; + font-size: 25px; +} +.swagger-ui-wrap p.big, +.swagger-ui-wrap div.big p { + font-size: 1em; + margin-bottom: 10px; +} +.swagger-ui-wrap form.fullwidth ol li.string input, +.swagger-ui-wrap form.fullwidth ol li.url input, +.swagger-ui-wrap form.fullwidth ol li.text textarea, +.swagger-ui-wrap form.fullwidth ol li.numeric input { + width: 500px !important; +} +.swagger-ui-wrap .info_license { + padding-bottom: 5px; +} +.swagger-ui-wrap .info_tos { + padding-bottom: 5px; +} +.swagger-ui-wrap .message-fail { + color: #cc0000; +} +.swagger-ui-wrap .info_contact { + padding-bottom: 5px; +} +.swagger-ui-wrap .info_description { + padding-bottom: 10px; + font-size: 15px; +} +.swagger-ui-wrap .markdown ol li, +.swagger-ui-wrap .markdown ul li { + padding: 3px 0px; + line-height: 1.4em; + color: #333333; +} +.swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input, +.swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input, +.swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input { + display: block; + padding: 4px; + width: auto; + clear: both; +} +.swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input.title, +.swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input.title, +.swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input.title { + font-size: 1.3em; +} +.swagger-ui-wrap table.fullwidth { + width: 100%; +} +.swagger-ui-wrap .model-signature { + font-family: "Droid Sans", sans-serif; + font-size: 1em; + line-height: 1.5em; +} +.swagger-ui-wrap .model-signature .signature-nav a { + text-decoration: none; + color: #AAA; +} +.swagger-ui-wrap .model-signature .signature-nav a:hover { + text-decoration: underline; + color: black; +} +.swagger-ui-wrap .model-signature .signature-nav .selected { + color: black; + text-decoration: none; +} +.swagger-ui-wrap .model-signature .propType { + color: #5555aa; +} +.swagger-ui-wrap .model-signature pre:hover { + background-color: #ffffdd; +} +.swagger-ui-wrap .model-signature pre { + font-size: .85em; + line-height: 1.2em; + overflow: auto; + max-height: 200px; + cursor: pointer; +} +.swagger-ui-wrap .model-signature ul.signature-nav { + display: block; + margin: 0; + padding: 0; +} +.swagger-ui-wrap .model-signature ul.signature-nav li:last-child { + padding-right: 0; + border-right: none; +} +.swagger-ui-wrap .model-signature ul.signature-nav li { + float: left; + margin: 0 5px 5px 0; + padding: 2px 5px 2px 0; + border-right: 1px solid #ddd; +} +.swagger-ui-wrap .model-signature .propOpt { + color: #555; +} +.swagger-ui-wrap .model-signature .snippet small { + font-size: 0.75em; +} +.swagger-ui-wrap .model-signature .propOptKey { + font-style: italic; +} +.swagger-ui-wrap .model-signature .description .strong { + font-weight: bold; + color: #000; + font-size: .9em; +} +.swagger-ui-wrap .model-signature .description div { + font-size: 0.9em; + line-height: 1.5em; + margin-left: 1em; +} +.swagger-ui-wrap .model-signature .description .stronger { + font-weight: bold; + color: #000; +} +.swagger-ui-wrap .model-signature .propName { + font-weight: bold; +} +.swagger-ui-wrap .model-signature .signature-container { + clear: both; +} +.swagger-ui-wrap .body-textarea { + width: 300px; + height: 100px; + border: 1px solid #aaa; +} +.swagger-ui-wrap .markdown p code, +.swagger-ui-wrap .markdown li code { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + background-color: #f0f0f0; + color: black; + padding: 1px 3px; +} +.swagger-ui-wrap .required { + font-weight: bold; +} +.swagger-ui-wrap input.parameter { + width: 300px; + border: 1px solid #aaa; +} +.swagger-ui-wrap h1 { + color: black; + font-size: 1.5em; + line-height: 1.3em; + padding: 10px 0 10px 0; + font-family: "Droid Sans", sans-serif; + font-weight: bold; +} +.swagger-ui-wrap .heading_with_menu { + float: none; + clear: both; + overflow: hidden; + display: block; +} +.swagger-ui-wrap .heading_with_menu ul { + display: block; + clear: none; + float: right; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; + margin-top: 10px; +} +.swagger-ui-wrap h2 { + color: black; + font-size: 1.3em; + padding: 10px 0 10px 0; +} +.swagger-ui-wrap h2 a { + color: black; +} +.swagger-ui-wrap h2 span.sub { + font-size: 0.7em; + color: #999999; + font-style: italic; +} +.swagger-ui-wrap h2 span.sub a { + color: #777777; +} +.swagger-ui-wrap span.weak { + color: #666666; +} +.swagger-ui-wrap .message-success { + color: #89BF04; +} +.swagger-ui-wrap caption, +.swagger-ui-wrap th, +.swagger-ui-wrap td { + text-align: left; + font-weight: normal; + vertical-align: middle; +} +.swagger-ui-wrap .code { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; +} +.swagger-ui-wrap form.formtastic fieldset.inputs ol li.text textarea { + font-family: "Droid Sans", sans-serif; + height: 250px; + padding: 4px; + display: block; + clear: both; +} +.swagger-ui-wrap form.formtastic fieldset.inputs ol li.select select { + display: block; + clear: both; +} +.swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean { + float: none; + clear: both; + overflow: hidden; + display: block; +} +.swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean label { + display: block; + float: left; + clear: none; + margin: 0; + padding: 0; +} +.swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean input { + display: block; + float: left; + clear: none; + margin: 0 5px 0 0; +} +.swagger-ui-wrap form.formtastic fieldset.inputs ol li.required label { + color: black; +} +.swagger-ui-wrap form.formtastic fieldset.inputs ol li label { + display: block; + clear: both; + width: auto; + padding: 0 0 3px; + color: #666666; +} +.swagger-ui-wrap form.formtastic fieldset.inputs ol li label abbr { + padding-left: 3px; + color: #888888; +} +.swagger-ui-wrap form.formtastic fieldset.inputs ol li p.inline-hints { + margin-left: 0; + font-style: italic; + font-size: 0.9em; + margin: 0; +} +.swagger-ui-wrap form.formtastic fieldset.buttons { + margin: 0; + padding: 0; +} +.swagger-ui-wrap span.blank, +.swagger-ui-wrap span.empty { + color: #888888; + font-style: italic; +} +.swagger-ui-wrap .markdown h3 { + color: #547f00; +} +.swagger-ui-wrap .markdown h4 { + color: #666666; +} +.swagger-ui-wrap .markdown pre { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + background-color: #fcf6db; + border: 1px solid #e5e0c6; + padding: 10px; + margin: 0 0 10px 0; +} +.swagger-ui-wrap .markdown pre code { + line-height: 1.6em; +} +.swagger-ui-wrap div.gist { + margin: 20px 0 25px 0 !important; +} +.swagger-ui-wrap ul#resources { + font-family: "Droid Sans", sans-serif; + font-size: 0.9em; +} +.swagger-ui-wrap ul#resources li.resource { + border-bottom: 1px solid #dddddd; +} +.swagger-ui-wrap ul#resources li.resource:hover div.heading h2 a, +.swagger-ui-wrap ul#resources li.resource.active div.heading h2 a { + color: black; +} +.swagger-ui-wrap ul#resources li.resource:hover div.heading ul.options li a, +.swagger-ui-wrap ul#resources li.resource.active div.heading ul.options li a { + color: #555555; +} +.swagger-ui-wrap ul#resources li.resource:last-child { + border-bottom: none; +} +.swagger-ui-wrap ul#resources li.resource div.heading { + border: 1px solid transparent; + float: none; + clear: both; + overflow: hidden; + display: block; +} +.swagger-ui-wrap ul#resources li.resource div.heading ul.options { + overflow: hidden; + padding: 0; + display: block; + clear: none; + float: right; + margin: 14px 10px 0 0; +} +.swagger-ui-wrap ul#resources li.resource div.heading ul.options li { + float: left; + clear: none; + margin: 0; + padding: 2px 10px; + border-right: 1px solid #dddddd; + color: #666666; + font-size: 0.9em; +} +.swagger-ui-wrap ul#resources li.resource div.heading ul.options li a { + color: #aaaaaa; + text-decoration: none; +} +.swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover { + text-decoration: underline; + color: black; +} +.swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover, +.swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:active, +.swagger-ui-wrap ul#resources li.resource div.heading ul.options li a.active { + text-decoration: underline; +} +.swagger-ui-wrap ul#resources li.resource div.heading ul.options li:first-child, +.swagger-ui-wrap ul#resources li.resource div.heading ul.options li.first { + padding-left: 0; +} +.swagger-ui-wrap ul#resources li.resource div.heading ul.options li:last-child, +.swagger-ui-wrap ul#resources li.resource div.heading ul.options li.last { + padding-right: 0; + border-right: none; +} +.swagger-ui-wrap ul#resources li.resource div.heading ul.options:first-child, +.swagger-ui-wrap ul#resources li.resource div.heading ul.options.first { + padding-left: 0; +} +.swagger-ui-wrap ul#resources li.resource div.heading h2 { + color: #999999; + padding-left: 0; + display: block; + clear: none; + float: left; + font-family: "Droid Sans", sans-serif; + font-weight: bold; +} +.swagger-ui-wrap ul#resources li.resource div.heading h2 a { + color: #999999; +} +.swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover { + color: black; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation { + float: none; + clear: both; + overflow: hidden; + display: block; + margin: 0 0 10px; + padding: 0; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading { + float: none; + clear: both; + overflow: hidden; + display: block; + margin: 0; + padding: 0; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 { + display: block; + clear: none; + float: left; + width: auto; + margin: 0; + padding: 0; + line-height: 1.1em; + color: black; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path { + padding-left: 10px; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a { + color: black; + text-decoration: none; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a:hover { + text-decoration: underline; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.http_method a { + text-transform: uppercase; + text-decoration: none; + color: white; + display: inline-block; + width: 50px; + font-size: 0.7em; + text-align: center; + padding: 7px 0 4px; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + -ms-border-radius: 2px; + -khtml-border-radius: 2px; + border-radius: 2px; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span { + margin: 0; + padding: 0; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options { + overflow: hidden; + padding: 0; + display: block; + clear: none; + float: right; + margin: 6px 10px 0 0; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li { + float: left; + clear: none; + margin: 0; + padding: 2px 10px; + font-size: 0.9em; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a { + text-decoration: none; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li.access { + color: black; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content { + border-top: none; + padding: 10px; + -moz-border-radius-bottomleft: 6px; + -webkit-border-bottom-left-radius: 6px; + -o-border-bottom-left-radius: 6px; + -ms-border-bottom-left-radius: 6px; + -khtml-border-bottom-left-radius: 6px; + border-bottom-left-radius: 6px; + -moz-border-radius-bottomright: 6px; + -webkit-border-bottom-right-radius: 6px; + -o-border-bottom-right-radius: 6px; + -ms-border-bottom-right-radius: 6px; + -khtml-border-bottom-right-radius: 6px; + border-bottom-right-radius: 6px; + margin: 0 0 20px; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content h4 { + font-size: 1.1em; + margin: 0; + padding: 15px 0 5px; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header { + float: none; + clear: both; + overflow: hidden; + display: block; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header a { + padding: 4px 0 0 10px; + display: inline-block; + font-size: 0.9em; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header img { + display: block; + clear: none; + float: right; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header input.submit { + display: block; + clear: none; + float: left; + padding: 6px 8px; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form input[type='text'].error { + outline: 2px solid black; + outline-color: #cc0000; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.response div.block pre { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + padding: 10px; + font-size: 0.9em; + max-height: 400px; + overflow-y: auto; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading { + background-color: #f9f2e9; + border: 1px solid #f0e0ca; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.http_method a { + background-color: #c5862b; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #f0e0ca; + color: #c5862b; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a { + color: #c5862b; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content { + background-color: #faf5ee; + border: 1px solid #f0e0ca; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content h4 { + color: #c5862b; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header a { + color: #dcb67f; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading { + background-color: #fcffcd; + border: 1px solid black; + border-color: #ffd20f; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.http_method a { + text-transform: uppercase; + background-color: #ffd20f; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #ffd20f; + color: #ffd20f; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a { + color: #ffd20f; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content { + background-color: #fcffcd; + border: 1px solid black; + border-color: #ffd20f; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content h4 { + color: #ffd20f; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header a { + color: #6fc992; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading { + background-color: #f5e8e8; + border: 1px solid #e8c6c7; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.http_method a { + text-transform: uppercase; + background-color: #a41e22; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #e8c6c7; + color: #a41e22; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a { + color: #a41e22; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content { + background-color: #f7eded; + border: 1px solid #e8c6c7; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content h4 { + color: #a41e22; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header a { + color: #c8787a; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading { + background-color: #e7f6ec; + border: 1px solid #c3e8d1; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.http_method a { + background-color: #10a54a; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #c3e8d1; + color: #10a54a; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a { + color: #10a54a; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content { + background-color: #ebf7f0; + border: 1px solid #c3e8d1; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content h4 { + color: #10a54a; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header a { + color: #6fc992; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading { + background-color: #FCE9E3; + border: 1px solid #F5D5C3; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.http_method a { + background-color: #D38042; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #f0cecb; + color: #D38042; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a { + color: #D38042; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content { + background-color: #faf0ef; + border: 1px solid #f0cecb; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content h4 { + color: #D38042; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header a { + color: #dcb67f; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading { + background-color: #e7f0f7; + border: 1px solid #c3d9ec; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.http_method a { + background-color: #0f6ab4; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #c3d9ec; + color: #0f6ab4; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a { + color: #0f6ab4; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content { + background-color: #ebf3f9; + border: 1px solid #c3d9ec; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content h4 { + color: #0f6ab4; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header a { + color: #6fa5d2; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading { + background-color: #e7f0f7; + border: 1px solid #c3d9ec; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading h3 span.http_method a { + background-color: #0f6ab4; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #c3d9ec; + color: #0f6ab4; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li a { + color: #0f6ab4; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content { + background-color: #ebf3f9; + border: 1px solid #c3d9ec; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content h4 { + color: #0f6ab4; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content div.sandbox_header a { + color: #6fa5d2; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content { + border-top: none; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:last-child, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:last-child, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li:last-child, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:last-child, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li:last-child, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:last-child, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.last, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.last, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li.last, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.last, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li.last, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.last { + padding-right: 0; + border-right: none; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:hover, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:active, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a.active { + text-decoration: underline; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li:first-child, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li.first { + padding-left: 0; +} +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations:first-child, +.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations.first { + padding-left: 0; +} +.swagger-ui-wrap p#colophon { + margin: 0 15px 40px 15px; + padding: 10px 0; + font-size: 0.8em; + border-top: 1px solid #dddddd; + font-family: "Droid Sans", sans-serif; + color: #999999; + font-style: italic; +} +.swagger-ui-wrap p#colophon a { + text-decoration: none; + color: #547f00; +} +.swagger-ui-wrap h3 { + color: black; + font-size: 1.1em; + padding: 10px 0 10px 0; +} +.swagger-ui-wrap .markdown ol, +.swagger-ui-wrap .markdown ul { + font-family: "Droid Sans", sans-serif; + margin: 5px 0 10px; + padding: 0 0 0 18px; + list-style-type: disc; +} +.swagger-ui-wrap form.form_box { + background-color: #ebf3f9; + border: 1px solid #c3d9ec; + padding: 10px; +} +.swagger-ui-wrap form.form_box label { + color: #0f6ab4 !important; +} +.swagger-ui-wrap form.form_box input[type=submit] { + display: block; + padding: 10px; +} +.swagger-ui-wrap form.form_box p.weak { + font-size: 0.8em; +} +.swagger-ui-wrap form.form_box p { + font-size: 0.9em; + padding: 0 0 15px; + color: #7e7b6d; +} +.swagger-ui-wrap form.form_box p a { + color: #646257; +} +.swagger-ui-wrap form.form_box p strong { + color: black; +} +.title { + font-style: bold; +} +.secondary_form { + display: none; +} +.main_image { + display: block; + margin-left: auto; + margin-right: auto; +} +.oauth_body { + margin-left: 100px; + margin-right: 100px; +} +.oauth_submit { + text-align: center; +} +.api-popup-dialog { + z-index: 10000; + position: absolute; + width: 500px; + background: #FFF; + padding: 20px; + border: 1px solid #ccc; + border-radius: 5px; + display: none; + font-size: 13px; + color: #777; +} +.api-popup-dialog .api-popup-title { + font-size: 24px; + padding: 10px 0; +} +.api-popup-dialog .api-popup-title { + font-size: 24px; + padding: 10px 0; +} +.api-popup-dialog p.error-msg { + padding-left: 5px; + padding-bottom: 5px; +} +.api-popup-dialog button.api-popup-authbtn { + height: 30px; +} +.api-popup-dialog button.api-popup-cancel { + height: 30px; +} +.api-popup-scopes { + padding: 10px 20px; +} +.api-popup-scopes li { + padding: 5px 0; + line-height: 20px; +} +.api-popup-scopes .api-scope-desc { + padding-left: 20px; + font-style: italic; +} +.api-popup-scopes li input { + position: relative; + top: 2px; +} +.api-popup-actions { + padding-top: 10px; +} +.access { + float: right; +} +.auth { + float: right; +} +#api_information_panel { + position: absolute; + background: #FFF; + border: 1px solid #ccc; + border-radius: 5px; + display: none; + font-size: 13px; + max-width: 300px; + line-height: 30px; + color: black; + padding: 5px; +} +#api_information_panel p .api-msg-enabled { + color: green; +} +#api_information_panel p .api-msg-disabled { + color: red; +} +.api-ic { + height: 18px; + vertical-align: middle; + display: inline-block; + background: url(../images/explorer_icons.png) no-repeat; +} +.ic-info { + background-position: 0 0; + width: 18px; + margin-top: -7px; + margin-left: 4px; +} +.ic-warning { + background-position: -60px 0; + width: 18px; + margin-top: -7px; + margin-left: 4px; +} +.ic-error { + background-position: -30px 0; + width: 18px; + margin-top: -7px; + margin-left: 4px; +} +.ic-off { + background-position: -90px 0; + width: 58px; + margin-top: -4px; + cursor: pointer; +} +.ic-on { + background-position: -160px 0; + width: 58px; + margin-top: -4px; + cursor: pointer; +} +#header { + background-color: #89bf04; + padding: 14px; +} +#header a#logo { + font-size: 1.5em; + font-weight: bold; + text-decoration: none; + background: transparent url(../images/logo_small.png) no-repeat left center; + padding: 20px 0 20px 40px; + color: white; +} +#header form#api_selector { + display: block; + clear: none; + float: right; +} +#header form#api_selector .input { + display: block; + clear: none; + float: left; + margin: 0 10px 0 0; +} +#header form#api_selector .input input#input_apiKey { + width: 200px; +} +#header form#api_selector .input input#input_baseUrl { + width: 400px; +} +#header form#api_selector .input a#explore { + display: block; + text-decoration: none; + font-weight: bold; + padding: 6px 8px; + font-size: 0.9em; + color: white; + background-color: #547f00; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -o-border-radius: 4px; + -ms-border-radius: 4px; + -khtml-border-radius: 4px; + border-radius: 4px; +} +#header form#api_selector .input a#explore:hover { + background-color: #547f00; +} +#header form#api_selector .input input { + font-size: 0.9em; + padding: 3px; + margin: 0; +} +#content_message { + margin: 10px 15px; + font-style: italic; + color: #999999; +} +#message-bar { + min-height: 30px; + text-align: center; + padding-top: 10px; +} diff --git a/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/endpoint.html b/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/endpoint.html new file mode 100644 index 000000000..4ae3bde0c --- /dev/null +++ b/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/endpoint.html @@ -0,0 +1,77 @@ + + + + + + Api Docs for {{path}} + + + + + +
+
+
+

{{path}}

+

{{description if description != None}}

+
+
+ {% for operation in operations %} +
+
+

{{operation.method}}

+

{{operation.summary if operation.summary != None}}

+
+
+ {% if operation.parameters %} +

Parameters

+
+ {% for parameter in operation.parameters %} +
+ {{parameter.name}} + {% if parameter.description %} + - {{parameter.description}} + {% endif %} +
+
Type: {{parameter.dataType}}
+
Allow Multiple: {{parameter.allowMultiple}}
+
Required: {{parameter.required}}
+ {% endfor %} +
+ {% endif %} + {% if operation.notes %} +

Implementation notes: {{operation.notes}}

+ {% endif %} + {% if operation.responseClass %} +

Response Class: {{operation.responseClass}}

+ {% endif %} +
+
+ {% endfor %} +
+
+ + + + diff --git a/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/images/explorer_icons.png b/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/images/explorer_icons.png new file mode 100644 index 000000000..ed9d2fffb Binary files /dev/null and b/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/images/explorer_icons.png differ diff --git a/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/images/logo_small.png b/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/images/logo_small.png new file mode 100644 index 000000000..5496a6557 Binary files /dev/null and b/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/images/logo_small.png differ diff --git a/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/images/pet_store_api.png b/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/images/pet_store_api.png new file mode 100644 index 000000000..f9f9cd4ae Binary files /dev/null and b/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/images/pet_store_api.png differ diff --git a/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/images/throbber.gif b/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/images/throbber.gif new file mode 100644 index 000000000..063938892 Binary files /dev/null and b/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/images/throbber.gif differ diff --git a/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/images/wordnik_api.png b/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/images/wordnik_api.png new file mode 100644 index 000000000..dca4f1455 Binary files /dev/null and b/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/images/wordnik_api.png differ diff --git a/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/index.html b/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/index.html new file mode 100644 index 000000000..db209f4a8 --- /dev/null +++ b/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/index.html @@ -0,0 +1,85 @@ + + + + Swagger UI + + + + + + + + + + + + + + + + + + + + + + + + +
 
+
+ + diff --git a/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/lib/backbone-min.js b/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/lib/backbone-min.js new file mode 100644 index 000000000..c1c0d4fff --- /dev/null +++ b/utils/test/result_collection_api/tornado_swagger_ui/tornado_swagger/static/lib/backbone-min.js @@ -0,0 +1,38 @@ +// Backbone.js 0.9.2 + +// (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc. +// Backbone may be freely distributed under the MIT license. +// For all details and documentation: +// http://backbonejs.org +(function(){var l=this,y=l.Backbone,z=Array.prototype.slice,A=Array.prototype.splice,g;g="undefined"!==typeof exports?exports:l.Backbone={};g.VERSION="0.9.2";var f=l._;!f&&"undefined"!==typeof require&&(f=require("underscore"));var i=l.jQuery||l.Zepto||l.ender;g.setDomLibrary=function(a){i=a};g.noConflict=function(){l.Backbone=y;return this};g.emulateHTTP=!1;g.emulateJSON=!1;var p=/\s+/,k=g.Events={on:function(a,b,c){var d,e,f,g,j;if(!b)return this;a=a.split(p);for(d=this._callbacks||(this._callbacks= +{});e=a.shift();)f=(j=d[e])?j.tail:{},f.next=g={},f.context=c,f.callback=b,d[e]={tail:g,next:j?j.next:f};return this},off:function(a,b,c){var d,e,h,g,j,q;if(e=this._callbacks){if(!a&&!b&&!c)return delete this._callbacks,this;for(a=a?a.split(p):f.keys(e);d=a.shift();)if(h=e[d],delete e[d],h&&(b||c))for(g=h.tail;(h=h.next)!==g;)if(j=h.callback,q=h.context,b&&j!==b||c&&q!==c)this.on(d,j,q);return this}},trigger:function(a){var b,c,d,e,f,g;if(!(d=this._callbacks))return this;f=d.all;a=a.split(p);for(g= +z.call(arguments,1);b=a.shift();){if(c=d[b])for(e=c.tail;(c=c.next)!==e;)c.callback.apply(c.context||this,g);if(c=f){e=c.tail;for(b=[b].concat(g);(c=c.next)!==e;)c.callback.apply(c.context||this,b)}}return this}};k.bind=k.on;k.unbind=k.off;var o=g.Model=function(a,b){var c;a||(a={});b&&b.parse&&(a=this.parse(a));if(c=n(this,"defaults"))a=f.extend({},c,a);b&&b.collection&&(this.collection=b.collection);this.attributes={};this._escapedAttributes={};this.cid=f.uniqueId("c");this.changed={};this._silent= +{};this._pending={};this.set(a,{silent:!0});this.changed={};this._silent={};this._pending={};this._previousAttributes=f.clone(this.attributes);this.initialize.apply(this,arguments)};f.extend(o.prototype,k,{changed:null,_silent:null,_pending:null,idAttribute:"id",initialize:function(){},toJSON:function(){return f.clone(this.attributes)},get:function(a){return this.attributes[a]},escape:function(a){var b;if(b=this._escapedAttributes[a])return b;b=this.get(a);return this._escapedAttributes[a]=f.escape(null== +b?"":""+b)},has:function(a){return null!=this.get(a)},set:function(a,b,c){var d,e;f.isObject(a)||null==a?(d=a,c=b):(d={},d[a]=b);c||(c={});if(!d)return this;d instanceof o&&(d=d.attributes);if(c.unset)for(e in d)d[e]=void 0;if(!this._validate(d,c))return!1;this.idAttribute in d&&(this.id=d[this.idAttribute]);var b=c.changes={},h=this.attributes,g=this._escapedAttributes,j=this._previousAttributes||{};for(e in d){a=d[e];if(!f.isEqual(h[e],a)||c.unset&&f.has(h,e))delete g[e],(c.silent?this._silent: +b)[e]=!0;c.unset?delete h[e]:h[e]=a;!f.isEqual(j[e],a)||f.has(h,e)!=f.has(j,e)?(this.changed[e]=a,c.silent||(this._pending[e]=!0)):(delete this.changed[e],delete this._pending[e])}c.silent||this.change(c);return this},unset:function(a,b){(b||(b={})).unset=!0;return this.set(a,null,b)},clear:function(a){(a||(a={})).unset=!0;return this.set(f.clone(this.attributes),a)},fetch:function(a){var a=a?f.clone(a):{},b=this,c=a.success;a.success=function(d,e,f){if(!b.set(b.parse(d,f),a))return!1;c&&c(b,d)}; +a.error=g.wrapError(a.error,b,a);return(this.sync||g.sync).call(this,"read",this,a)},save:function(a,b,c){var d,e;f.isObject(a)||null==a?(d=a,c=b):(d={},d[a]=b);c=c?f.clone(c):{};if(c.wait){if(!this._validate(d,c))return!1;e=f.clone(this.attributes)}a=f.extend({},c,{silent:!0});if(d&&!this.set(d,c.wait?a:c))return!1;var h=this,i=c.success;c.success=function(a,b,e){b=h.parse(a,e);if(c.wait){delete c.wait;b=f.extend(d||{},b)}if(!h.set(b,c))return false;i?i(h,a):h.trigger("sync",h,a,c)};c.error=g.wrapError(c.error, +h,c);b=this.isNew()?"create":"update";b=(this.sync||g.sync).call(this,b,this,c);c.wait&&this.set(e,a);return b},destroy:function(a){var a=a?f.clone(a):{},b=this,c=a.success,d=function(){b.trigger("destroy",b,b.collection,a)};if(this.isNew())return d(),!1;a.success=function(e){a.wait&&d();c?c(b,e):b.trigger("sync",b,e,a)};a.error=g.wrapError(a.error,b,a);var e=(this.sync||g.sync).call(this,"delete",this,a);a.wait||d();return e},url:function(){var a=n(this,"urlRoot")||n(this.collection,"url")||t(); +return this.isNew()?a:a+("/"==a.charAt(a.length-1)?"":"/")+encodeURIComponent(this.id)},parse:function(a){return a},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return null==this.id},change:function(a){a||(a={});var b=this._changing;this._changing=!0;for(var c in this._silent)this._pending[c]=!0;var d=f.extend({},a.changes,this._silent);this._silent={};for(c in d)this.trigger("change:"+c,this,this.get(c),a);if(b)return this;for(;!f.isEmpty(this._pending);){this._pending= +{};this.trigger("change",this,a);for(c in this.changed)!this._pending[c]&&!this._silent[c]&&delete this.changed[c];this._previousAttributes=f.clone(this.attributes)}this._changing=!1;return this},hasChanged:function(a){return!arguments.length?!f.isEmpty(this.changed):f.has(this.changed,a)},changedAttributes:function(a){if(!a)return this.hasChanged()?f.clone(this.changed):!1;var b,c=!1,d=this._previousAttributes,e;for(e in a)if(!f.isEqual(d[e],b=a[e]))(c||(c={}))[e]=b;return c},previous:function(a){return!arguments.length|| +!this._previousAttributes?null:this._previousAttributes[a]},previousAttributes:function(){return f.clone(this._previousAttributes)},isValid:function(){return!this.validate(this.attributes)},_validate:function(a,b){if(b.silent||!this.validate)return!0;var a=f.extend({},this.attributes,a),c=this.validate(a,b);if(!c)return!0;b&&b.error?b.error(this,c,b):this.trigger("error",this,c,b);return!1}});var r=g.Collection=function(a,b){b||(b={});b.model&&(this.model=b.model);b.comparator&&(this.comparator=b.comparator); +this._reset();this.initialize.apply(this,arguments);a&&this.reset(a,{silent:!0,parse:b.parse})};f.extend(r.prototype,k,{model:o,initialize:function(){},toJSON:function(a){return this.map(function(b){return b.toJSON(a)})},add:function(a,b){var c,d,e,g,i,j={},k={},l=[];b||(b={});a=f.isArray(a)?a.slice():[a];c=0;for(d=a.length;c=b))this.iframe=i('