Compare commits
	
		
			No commits in common. "master" and "build-production" have entirely different histories.
		
	
	
		
			master
			...
			build-prod
		
	
		
							
								
								
									
										16
									
								
								.drone.yml
									
									
									
									
									
								
							
							
						
						| @ -1,16 +0,0 @@ | ||||
| kind: pipeline | ||||
| name: test | ||||
| 
 | ||||
| steps: | ||||
|   - name: test | ||||
|     image: colthreepv/node-chrome:8 | ||||
|     commands: | ||||
|       - npm install | ||||
|       - npm test | ||||
|     resources: | ||||
|       requests: | ||||
|         cpu: 250m | ||||
|         memory: 256Mi | ||||
|       limits: | ||||
|         cpu: 250m | ||||
|         memory: 256Mi | ||||
| @ -1,20 +0,0 @@ | ||||
| # EditorConfig helps developers define and maintain consistent | ||||
| # coding styles between different editors and IDEs | ||||
| # editorconfig.org | ||||
| 
 | ||||
| root = true | ||||
| 
 | ||||
| 
 | ||||
| [*] | ||||
| end_of_line = lf | ||||
| charset = utf-8 | ||||
| trim_trailing_whitespace = true | ||||
| insert_final_newline = true | ||||
| indent_style = space | ||||
| indent_size = 2 | ||||
| 
 | ||||
| [*.hbs] | ||||
| insert_final_newline = false | ||||
| 
 | ||||
| [*.{diff,md}] | ||||
| trim_trailing_whitespace = false | ||||
| @ -1,9 +0,0 @@ | ||||
| { | ||||
|   /** | ||||
|     Ember CLI sends analytics information by default. The data is completely | ||||
|     anonymous, but there are times when you might want to disable this behavior. | ||||
| 
 | ||||
|     Setting `disableAnalytics` to true will prevent any data from being sent. | ||||
|   */ | ||||
|   "disableAnalytics": false | ||||
| } | ||||
							
								
								
									
										14
									
								
								.eslintrc.js
									
									
									
									
									
								
							
							
						
						| @ -1,14 +0,0 @@ | ||||
| module.exports = { | ||||
|   root: true, | ||||
|   parserOptions: { | ||||
|     ecmaVersion: 2017, | ||||
|     sourceType: 'module' | ||||
|   }, | ||||
|   extends: 'eslint:recommended', | ||||
|   env: { | ||||
|     browser: true | ||||
|   }, | ||||
|   rules: { | ||||
|     'no-console': 0 | ||||
|   } | ||||
| }; | ||||
							
								
								
									
										32
									
								
								.jshintrc
									
									
									
									
									
								
							
							
						
						| @ -1,32 +0,0 @@ | ||||
| { | ||||
|   "predef": [ | ||||
|     "document", | ||||
|     "window", | ||||
|     "Promise" | ||||
|   ], | ||||
|   "browser": true, | ||||
|   "boss": true, | ||||
|   "curly": true, | ||||
|   "debug": false, | ||||
|   "devel": true, | ||||
|   "eqeqeq": true, | ||||
|   "evil": true, | ||||
|   "forin": false, | ||||
|   "immed": false, | ||||
|   "laxbreak": false, | ||||
|   "newcap": true, | ||||
|   "noarg": true, | ||||
|   "noempty": false, | ||||
|   "nonew": false, | ||||
|   "nomen": false, | ||||
|   "onevar": false, | ||||
|   "plusplus": false, | ||||
|   "regexp": false, | ||||
|   "undef": true, | ||||
|   "sub": true, | ||||
|   "strict": false, | ||||
|   "white": false, | ||||
|   "eqnull": true, | ||||
|   "esversion": 6, | ||||
|   "unused": true | ||||
| } | ||||
							
								
								
									
										252
									
								
								.scss-lint.yml
									
									
									
									
									
								
							
							
						
						| @ -1,252 +0,0 @@ | ||||
| severity: warning | ||||
| 
 | ||||
| linters: | ||||
|   BangFormat: | ||||
|     enabled: true | ||||
|     space_before_bang: true | ||||
|     space_after_bang: false | ||||
| 
 | ||||
|   BemDepth: | ||||
|     enabled: false | ||||
|     max_elements: 1 | ||||
| 
 | ||||
|   BorderZero: | ||||
|     enabled: true | ||||
|     convention: zero # or `none` | ||||
| 
 | ||||
|   ChainedClasses: | ||||
|     enabled: false | ||||
| 
 | ||||
|   ColorKeyword: | ||||
|     enabled: true | ||||
| 
 | ||||
|   ColorVariable: | ||||
|     enabled: false | ||||
| 
 | ||||
|   Comment: | ||||
|     enabled: true | ||||
|     style: silent | ||||
| 
 | ||||
|   DebugStatement: | ||||
|     enabled: true | ||||
| 
 | ||||
|   DeclarationOrder: | ||||
|     enabled: true | ||||
| 
 | ||||
|   DisableLinterReason: | ||||
|     enabled: false | ||||
| 
 | ||||
|   DuplicateProperty: | ||||
|     enabled: true | ||||
| 
 | ||||
|   ElsePlacement: | ||||
|     enabled: true | ||||
|     style: same_line # or 'new_line' | ||||
| 
 | ||||
|   EmptyLineBetweenBlocks: | ||||
|     enabled: false | ||||
|     ignore_single_line_blocks: true | ||||
| 
 | ||||
|   EmptyRule: | ||||
|     enabled: true | ||||
| 
 | ||||
|   ExtendDirective: | ||||
|     enabled: false | ||||
| 
 | ||||
|   FinalNewline: | ||||
|     enabled: true | ||||
|     present: true | ||||
| 
 | ||||
|   HexLength: | ||||
|     enabled: false | ||||
|     style: short # or 'long' | ||||
| 
 | ||||
|   HexNotation: | ||||
|     enabled: true | ||||
|     style: lowercase # or 'uppercase' | ||||
| 
 | ||||
|   HexValidation: | ||||
|     enabled: true | ||||
| 
 | ||||
|   IdSelector: | ||||
|     enabled: false | ||||
| 
 | ||||
|   ImportantRule: | ||||
|     enabled: true | ||||
| 
 | ||||
|   ImportPath: | ||||
|     enabled: true | ||||
|     leading_underscore: false | ||||
|     filename_extension: false | ||||
| 
 | ||||
|   Indentation: | ||||
|     enabled: true | ||||
|     allow_non_nested_indentation: false | ||||
|     character: space # or 'tab' | ||||
|     width: 2 | ||||
| 
 | ||||
|   LeadingZero: | ||||
|     enabled: false | ||||
|     style: exclude_zero # or 'include_zero' | ||||
| 
 | ||||
|   MergeableSelector: | ||||
|     enabled: false | ||||
|     force_nesting: true | ||||
| 
 | ||||
|   NameFormat: | ||||
|     enabled: true | ||||
|     allow_leading_underscore: true | ||||
|     convention: hyphenated_lowercase # or 'camel_case', or 'snake_case', or a regex pattern | ||||
| 
 | ||||
|   NestingDepth: | ||||
|     enabled: true | ||||
|     max_depth: 7 | ||||
|     ignore_parent_selectors: false | ||||
| 
 | ||||
|   PlaceholderInExtend: | ||||
|     enabled: true | ||||
| 
 | ||||
|   PrivateNamingConvention: | ||||
|     enabled: false | ||||
|     prefix: _ | ||||
| 
 | ||||
|   PropertyCount: | ||||
|     enabled: false | ||||
|     include_nested: false | ||||
|     max_properties: 10 | ||||
| 
 | ||||
|   PropertySortOrder: | ||||
|     enabled: false | ||||
|     ignore_unspecified: false | ||||
|     min_properties: 2 | ||||
|     separate_groups: false | ||||
| 
 | ||||
|   PropertySpelling: | ||||
|     enabled: true | ||||
|     extra_properties: [ | ||||
|       'grid-template-columns', | ||||
|       'grid-column-start' | ||||
|     ] | ||||
|     disabled_properties: [] | ||||
| 
 | ||||
|   PropertyUnits: | ||||
|     enabled: true | ||||
|     global: [ | ||||
|       'ch', 'em', 'ex', 'rem',                 # Font-relative lengths | ||||
|       'cm', 'in', 'mm', 'pc', 'pt', 'px', 'q', # Absolute lengths | ||||
|       'vh', 'vw', 'vmin', 'vmax',              # Viewport-percentage lengths | ||||
|       'fr',                                    # Grid fractional lengths | ||||
|       'deg', 'grad', 'rad', 'turn',            # Angle | ||||
|       'ms', 's',                               # Duration | ||||
|       'Hz', 'kHz',                             # Frequency | ||||
|       'dpi', 'dpcm', 'dppx',                   # Resolution | ||||
|       '%']                                     # Other | ||||
|     properties: {} | ||||
| 
 | ||||
|   PseudoElement: | ||||
|     enabled: true | ||||
| 
 | ||||
|   QualifyingElement: | ||||
|     enabled: false | ||||
|     allow_element_with_attribute: false | ||||
|     allow_element_with_class: false | ||||
|     allow_element_with_id: false | ||||
| 
 | ||||
|   SelectorDepth: | ||||
|     enabled: true | ||||
|     max_depth: 5 | ||||
| 
 | ||||
|   SelectorFormat: | ||||
|     enabled: true | ||||
|     convention: hyphenated_lowercase # or 'classic_BEM', or 'hyphenated_BEM', or 'snake_case', or 'camel_case', or a regex pattern | ||||
| 
 | ||||
|   Shorthand: | ||||
|     enabled: true | ||||
|     allowed_shorthands: [1, 2, 3, 4] | ||||
| 
 | ||||
|   SingleLinePerProperty: | ||||
|     enabled: true | ||||
|     allow_single_line_rule_sets: true | ||||
| 
 | ||||
|   SingleLinePerSelector: | ||||
|     enabled: false | ||||
| 
 | ||||
|   SpaceAfterComma: | ||||
|     enabled: true | ||||
|     style: one_space # or 'no_space', or 'at_least_one_space' | ||||
| 
 | ||||
|   SpaceAfterComment: | ||||
|     enabled: false | ||||
|     style: one_space # or 'no_space', or 'at_least_one_space' | ||||
|     allow_empty_comments: true | ||||
| 
 | ||||
|   SpaceAfterPropertyColon: | ||||
|     enabled: true | ||||
|     style: one_space # or 'no_space', or 'at_least_one_space', or 'aligned' | ||||
| 
 | ||||
|   SpaceAfterPropertyName: | ||||
|     enabled: true | ||||
| 
 | ||||
|   SpaceAfterVariableColon: | ||||
|     enabled: false | ||||
|     style: one_space # or 'no_space', 'at_least_one_space' or 'one_space_or_newline' | ||||
| 
 | ||||
|   SpaceAfterVariableName: | ||||
|     enabled: true | ||||
| 
 | ||||
|   SpaceAroundOperator: | ||||
|     enabled: true | ||||
|     style: one_space # or 'at_least_one_space', or 'no_space' | ||||
| 
 | ||||
|   SpaceBeforeBrace: | ||||
|     enabled: false | ||||
|     style: space # or 'new_line' | ||||
|     allow_single_line_padding: false | ||||
| 
 | ||||
|   SpaceBetweenParens: | ||||
|     enabled: true | ||||
|     spaces: 0 | ||||
| 
 | ||||
|   StringQuotes: | ||||
|     enabled: true | ||||
|     style: single_quotes # or double_quotes | ||||
| 
 | ||||
|   TrailingSemicolon: | ||||
|     enabled: true | ||||
| 
 | ||||
|   TrailingWhitespace: | ||||
|     enabled: true | ||||
| 
 | ||||
|   TrailingZero: | ||||
|     enabled: false | ||||
| 
 | ||||
|   TransitionAll: | ||||
|     enabled: false | ||||
| 
 | ||||
|   UnnecessaryMantissa: | ||||
|     enabled: true | ||||
| 
 | ||||
|   UnnecessaryParentReference: | ||||
|     enabled: true | ||||
| 
 | ||||
|   UrlFormat: | ||||
|     enabled: true | ||||
| 
 | ||||
|   UrlQuotes: | ||||
|     enabled: true | ||||
| 
 | ||||
|   VariableForProperty: | ||||
|     enabled: false | ||||
|     properties: [] | ||||
| 
 | ||||
|   VendorPrefix: | ||||
|     enabled: true | ||||
|     identifier_list: base | ||||
|     additional_identifiers: [] | ||||
|     excluded_identifiers: [] | ||||
| 
 | ||||
|   ZeroUnit: | ||||
|     enabled: true | ||||
| 
 | ||||
|   Compass::*: | ||||
|     enabled: false | ||||
							
								
								
									
										22
									
								
								.travis.yml
									
									
									
									
									
								
							
							
						
						| @ -1,22 +0,0 @@ | ||||
| --- | ||||
| language: node_js | ||||
| node_js: | ||||
|   - "6" | ||||
| 
 | ||||
| sudo: false | ||||
| dist: trusty | ||||
| 
 | ||||
| addons: | ||||
|   chrome: stable | ||||
| 
 | ||||
| cache: | ||||
|   directories: | ||||
|     - $HOME/.npm | ||||
| 
 | ||||
| env: | ||||
|   global: | ||||
|     # See https://git.io/vdao3 for details. | ||||
|     - JOBS=1 | ||||
| 
 | ||||
| before_install: | ||||
|   - npm config set spin false | ||||
| @ -1,3 +0,0 @@ | ||||
| { | ||||
|   "ignore_dirs": ["tmp", "dist"] | ||||
| } | ||||
							
								
								
									
										661
									
								
								LICENSE
									
									
									
									
									
								
							
							
						
						| @ -1,661 +0,0 @@ | ||||
|                     GNU AFFERO GENERAL PUBLIC LICENSE | ||||
|                        Version 3, 19 November 2007 | ||||
| 
 | ||||
|  Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> | ||||
|  Everyone is permitted to copy and distribute verbatim copies | ||||
|  of this license document, but changing it is not allowed. | ||||
| 
 | ||||
|                             Preamble | ||||
| 
 | ||||
|   The GNU Affero General Public License is a free, copyleft license for | ||||
| software and other kinds of works, specifically designed to ensure | ||||
| cooperation with the community in the case of network server software. | ||||
| 
 | ||||
|   The licenses for most software and other practical works are designed | ||||
| to take away your freedom to share and change the works.  By contrast, | ||||
| our General Public Licenses are intended to guarantee your freedom to | ||||
| share and change all versions of a program--to make sure it remains free | ||||
| software for all its users. | ||||
| 
 | ||||
|   When we speak of free software, we are referring to freedom, not | ||||
| price.  Our General Public Licenses are designed to make sure that you | ||||
| have the freedom to distribute copies of free software (and charge for | ||||
| them if you wish), that you receive source code or can get it if you | ||||
| want it, that you can change the software or use pieces of it in new | ||||
| free programs, and that you know you can do these things. | ||||
| 
 | ||||
|   Developers that use our General Public Licenses protect your rights | ||||
| with two steps: (1) assert copyright on the software, and (2) offer | ||||
| you this License which gives you legal permission to copy, distribute | ||||
| and/or modify the software. | ||||
| 
 | ||||
|   A secondary benefit of defending all users' freedom is that | ||||
| improvements made in alternate versions of the program, if they | ||||
| receive widespread use, become available for other developers to | ||||
| incorporate.  Many developers of free software are heartened and | ||||
| encouraged by the resulting cooperation.  However, in the case of | ||||
| software used on network servers, this result may fail to come about. | ||||
| The GNU General Public License permits making a modified version and | ||||
| letting the public access it on a server without ever releasing its | ||||
| source code to the public. | ||||
| 
 | ||||
|   The GNU Affero General Public License is designed specifically to | ||||
| ensure that, in such cases, the modified source code becomes available | ||||
| to the community.  It requires the operator of a network server to | ||||
| provide the source code of the modified version running there to the | ||||
| users of that server.  Therefore, public use of a modified version, on | ||||
| a publicly accessible server, gives the public access to the source | ||||
| code of the modified version. | ||||
| 
 | ||||
|   An older license, called the Affero General Public License and | ||||
| published by Affero, was designed to accomplish similar goals.  This is | ||||
| a different license, not a version of the Affero GPL, but Affero has | ||||
| released a new version of the Affero GPL which permits relicensing under | ||||
| this license. | ||||
| 
 | ||||
|   The precise terms and conditions for copying, distribution and | ||||
| modification follow. | ||||
| 
 | ||||
|                        TERMS AND CONDITIONS | ||||
| 
 | ||||
|   0. Definitions. | ||||
| 
 | ||||
|   "This License" refers to version 3 of the GNU Affero General Public License. | ||||
| 
 | ||||
|   "Copyright" also means copyright-like laws that apply to other kinds of | ||||
| works, such as semiconductor masks. | ||||
| 
 | ||||
|   "The Program" refers to any copyrightable work licensed under this | ||||
| License.  Each licensee is addressed as "you".  "Licensees" and | ||||
| "recipients" may be individuals or organizations. | ||||
| 
 | ||||
|   To "modify" a work means to copy from or adapt all or part of the work | ||||
| in a fashion requiring copyright permission, other than the making of an | ||||
| exact copy.  The resulting work is called a "modified version" of the | ||||
| earlier work or a work "based on" the earlier work. | ||||
| 
 | ||||
|   A "covered work" means either the unmodified Program or a work based | ||||
| on the Program. | ||||
| 
 | ||||
|   To "propagate" a work means to do anything with it that, without | ||||
| permission, would make you directly or secondarily liable for | ||||
| infringement under applicable copyright law, except executing it on a | ||||
| computer or modifying a private copy.  Propagation includes copying, | ||||
| distribution (with or without modification), making available to the | ||||
| public, and in some countries other activities as well. | ||||
| 
 | ||||
|   To "convey" a work means any kind of propagation that enables other | ||||
| parties to make or receive copies.  Mere interaction with a user through | ||||
| a computer network, with no transfer of a copy, is not conveying. | ||||
| 
 | ||||
|   An interactive user interface displays "Appropriate Legal Notices" | ||||
| to the extent that it includes a convenient and prominently visible | ||||
| feature that (1) displays an appropriate copyright notice, and (2) | ||||
| tells the user that there is no warranty for the work (except to the | ||||
| extent that warranties are provided), that licensees may convey the | ||||
| work under this License, and how to view a copy of this License.  If | ||||
| the interface presents a list of user commands or options, such as a | ||||
| menu, a prominent item in the list meets this criterion. | ||||
| 
 | ||||
|   1. Source Code. | ||||
| 
 | ||||
|   The "source code" for a work means the preferred form of the work | ||||
| for making modifications to it.  "Object code" means any non-source | ||||
| form of a work. | ||||
| 
 | ||||
|   A "Standard Interface" means an interface that either is an official | ||||
| standard defined by a recognized standards body, or, in the case of | ||||
| interfaces specified for a particular programming language, one that | ||||
| is widely used among developers working in that language. | ||||
| 
 | ||||
|   The "System Libraries" of an executable work include anything, other | ||||
| than the work as a whole, that (a) is included in the normal form of | ||||
| packaging a Major Component, but which is not part of that Major | ||||
| Component, and (b) serves only to enable use of the work with that | ||||
| Major Component, or to implement a Standard Interface for which an | ||||
| implementation is available to the public in source code form.  A | ||||
| "Major Component", in this context, means a major essential component | ||||
| (kernel, window system, and so on) of the specific operating system | ||||
| (if any) on which the executable work runs, or a compiler used to | ||||
| produce the work, or an object code interpreter used to run it. | ||||
| 
 | ||||
|   The "Corresponding Source" for a work in object code form means all | ||||
| the source code needed to generate, install, and (for an executable | ||||
| work) run the object code and to modify the work, including scripts to | ||||
| control those activities.  However, it does not include the work's | ||||
| System Libraries, or general-purpose tools or generally available free | ||||
| programs which are used unmodified in performing those activities but | ||||
| which are not part of the work.  For example, Corresponding Source | ||||
| includes interface definition files associated with source files for | ||||
| the work, and the source code for shared libraries and dynamically | ||||
| linked subprograms that the work is specifically designed to require, | ||||
| such as by intimate data communication or control flow between those | ||||
| subprograms and other parts of the work. | ||||
| 
 | ||||
|   The Corresponding Source need not include anything that users | ||||
| can regenerate automatically from other parts of the Corresponding | ||||
| Source. | ||||
| 
 | ||||
|   The Corresponding Source for a work in source code form is that | ||||
| same work. | ||||
| 
 | ||||
|   2. Basic Permissions. | ||||
| 
 | ||||
|   All rights granted under this License are granted for the term of | ||||
| copyright on the Program, and are irrevocable provided the stated | ||||
| conditions are met.  This License explicitly affirms your unlimited | ||||
| permission to run the unmodified Program.  The output from running a | ||||
| covered work is covered by this License only if the output, given its | ||||
| content, constitutes a covered work.  This License acknowledges your | ||||
| rights of fair use or other equivalent, as provided by copyright law. | ||||
| 
 | ||||
|   You may make, run and propagate covered works that you do not | ||||
| convey, without conditions so long as your license otherwise remains | ||||
| in force.  You may convey covered works to others for the sole purpose | ||||
| of having them make modifications exclusively for you, or provide you | ||||
| with facilities for running those works, provided that you comply with | ||||
| the terms of this License in conveying all material for which you do | ||||
| not control copyright.  Those thus making or running the covered works | ||||
| for you must do so exclusively on your behalf, under your direction | ||||
| and control, on terms that prohibit them from making any copies of | ||||
| your copyrighted material outside their relationship with you. | ||||
| 
 | ||||
|   Conveying under any other circumstances is permitted solely under | ||||
| the conditions stated below.  Sublicensing is not allowed; section 10 | ||||
| makes it unnecessary. | ||||
| 
 | ||||
|   3. Protecting Users' Legal Rights From Anti-Circumvention Law. | ||||
| 
 | ||||
|   No covered work shall be deemed part of an effective technological | ||||
| measure under any applicable law fulfilling obligations under article | ||||
| 11 of the WIPO copyright treaty adopted on 20 December 1996, or | ||||
| similar laws prohibiting or restricting circumvention of such | ||||
| measures. | ||||
| 
 | ||||
|   When you convey a covered work, you waive any legal power to forbid | ||||
| circumvention of technological measures to the extent such circumvention | ||||
| is effected by exercising rights under this License with respect to | ||||
| the covered work, and you disclaim any intention to limit operation or | ||||
| modification of the work as a means of enforcing, against the work's | ||||
| users, your or third parties' legal rights to forbid circumvention of | ||||
| technological measures. | ||||
| 
 | ||||
|   4. Conveying Verbatim Copies. | ||||
| 
 | ||||
|   You may convey verbatim copies of the Program's source code as you | ||||
| receive it, in any medium, provided that you conspicuously and | ||||
| appropriately publish on each copy an appropriate copyright notice; | ||||
| keep intact all notices stating that this License and any | ||||
| non-permissive terms added in accord with section 7 apply to the code; | ||||
| keep intact all notices of the absence of any warranty; and give all | ||||
| recipients a copy of this License along with the Program. | ||||
| 
 | ||||
|   You may charge any price or no price for each copy that you convey, | ||||
| and you may offer support or warranty protection for a fee. | ||||
| 
 | ||||
|   5. Conveying Modified Source Versions. | ||||
| 
 | ||||
|   You may convey a work based on the Program, or the modifications to | ||||
| produce it from the Program, in the form of source code under the | ||||
| terms of section 4, provided that you also meet all of these conditions: | ||||
| 
 | ||||
|     a) The work must carry prominent notices stating that you modified | ||||
|     it, and giving a relevant date. | ||||
| 
 | ||||
|     b) The work must carry prominent notices stating that it is | ||||
|     released under this License and any conditions added under section | ||||
|     7.  This requirement modifies the requirement in section 4 to | ||||
|     "keep intact all notices". | ||||
| 
 | ||||
|     c) You must license the entire work, as a whole, under this | ||||
|     License to anyone who comes into possession of a copy.  This | ||||
|     License will therefore apply, along with any applicable section 7 | ||||
|     additional terms, to the whole of the work, and all its parts, | ||||
|     regardless of how they are packaged.  This License gives no | ||||
|     permission to license the work in any other way, but it does not | ||||
|     invalidate such permission if you have separately received it. | ||||
| 
 | ||||
|     d) If the work has interactive user interfaces, each must display | ||||
|     Appropriate Legal Notices; however, if the Program has interactive | ||||
|     interfaces that do not display Appropriate Legal Notices, your | ||||
|     work need not make them do so. | ||||
| 
 | ||||
|   A compilation of a covered work with other separate and independent | ||||
| works, which are not by their nature extensions of the covered work, | ||||
| and which are not combined with it such as to form a larger program, | ||||
| in or on a volume of a storage or distribution medium, is called an | ||||
| "aggregate" if the compilation and its resulting copyright are not | ||||
| used to limit the access or legal rights of the compilation's users | ||||
| beyond what the individual works permit.  Inclusion of a covered work | ||||
| in an aggregate does not cause this License to apply to the other | ||||
| parts of the aggregate. | ||||
| 
 | ||||
|   6. Conveying Non-Source Forms. | ||||
| 
 | ||||
|   You may convey a covered work in object code form under the terms | ||||
| of sections 4 and 5, provided that you also convey the | ||||
| machine-readable Corresponding Source under the terms of this License, | ||||
| in one of these ways: | ||||
| 
 | ||||
|     a) Convey the object code in, or embodied in, a physical product | ||||
|     (including a physical distribution medium), accompanied by the | ||||
|     Corresponding Source fixed on a durable physical medium | ||||
|     customarily used for software interchange. | ||||
| 
 | ||||
|     b) Convey the object code in, or embodied in, a physical product | ||||
|     (including a physical distribution medium), accompanied by a | ||||
|     written offer, valid for at least three years and valid for as | ||||
|     long as you offer spare parts or customer support for that product | ||||
|     model, to give anyone who possesses the object code either (1) a | ||||
|     copy of the Corresponding Source for all the software in the | ||||
|     product that is covered by this License, on a durable physical | ||||
|     medium customarily used for software interchange, for a price no | ||||
|     more than your reasonable cost of physically performing this | ||||
|     conveying of source, or (2) access to copy the | ||||
|     Corresponding Source from a network server at no charge. | ||||
| 
 | ||||
|     c) Convey individual copies of the object code with a copy of the | ||||
|     written offer to provide the Corresponding Source.  This | ||||
|     alternative is allowed only occasionally and noncommercially, and | ||||
|     only if you received the object code with such an offer, in accord | ||||
|     with subsection 6b. | ||||
| 
 | ||||
|     d) Convey the object code by offering access from a designated | ||||
|     place (gratis or for a charge), and offer equivalent access to the | ||||
|     Corresponding Source in the same way through the same place at no | ||||
|     further charge.  You need not require recipients to copy the | ||||
|     Corresponding Source along with the object code.  If the place to | ||||
|     copy the object code is a network server, the Corresponding Source | ||||
|     may be on a different server (operated by you or a third party) | ||||
|     that supports equivalent copying facilities, provided you maintain | ||||
|     clear directions next to the object code saying where to find the | ||||
|     Corresponding Source.  Regardless of what server hosts the | ||||
|     Corresponding Source, you remain obligated to ensure that it is | ||||
|     available for as long as needed to satisfy these requirements. | ||||
| 
 | ||||
|     e) Convey the object code using peer-to-peer transmission, provided | ||||
|     you inform other peers where the object code and Corresponding | ||||
|     Source of the work are being offered to the general public at no | ||||
|     charge under subsection 6d. | ||||
| 
 | ||||
|   A separable portion of the object code, whose source code is excluded | ||||
| from the Corresponding Source as a System Library, need not be | ||||
| included in conveying the object code work. | ||||
| 
 | ||||
|   A "User Product" is either (1) a "consumer product", which means any | ||||
| tangible personal property which is normally used for personal, family, | ||||
| or household purposes, or (2) anything designed or sold for incorporation | ||||
| into a dwelling.  In determining whether a product is a consumer product, | ||||
| doubtful cases shall be resolved in favor of coverage.  For a particular | ||||
| product received by a particular user, "normally used" refers to a | ||||
| typical or common use of that class of product, regardless of the status | ||||
| of the particular user or of the way in which the particular user | ||||
| actually uses, or expects or is expected to use, the product.  A product | ||||
| is a consumer product regardless of whether the product has substantial | ||||
| commercial, industrial or non-consumer uses, unless such uses represent | ||||
| the only significant mode of use of the product. | ||||
| 
 | ||||
|   "Installation Information" for a User Product means any methods, | ||||
| procedures, authorization keys, or other information required to install | ||||
| and execute modified versions of a covered work in that User Product from | ||||
| a modified version of its Corresponding Source.  The information must | ||||
| suffice to ensure that the continued functioning of the modified object | ||||
| code is in no case prevented or interfered with solely because | ||||
| modification has been made. | ||||
| 
 | ||||
|   If you convey an object code work under this section in, or with, or | ||||
| specifically for use in, a User Product, and the conveying occurs as | ||||
| part of a transaction in which the right of possession and use of the | ||||
| User Product is transferred to the recipient in perpetuity or for a | ||||
| fixed term (regardless of how the transaction is characterized), the | ||||
| Corresponding Source conveyed under this section must be accompanied | ||||
| by the Installation Information.  But this requirement does not apply | ||||
| if neither you nor any third party retains the ability to install | ||||
| modified object code on the User Product (for example, the work has | ||||
| been installed in ROM). | ||||
| 
 | ||||
|   The requirement to provide Installation Information does not include a | ||||
| requirement to continue to provide support service, warranty, or updates | ||||
| for a work that has been modified or installed by the recipient, or for | ||||
| the User Product in which it has been modified or installed.  Access to a | ||||
| network may be denied when the modification itself materially and | ||||
| adversely affects the operation of the network or violates the rules and | ||||
| protocols for communication across the network. | ||||
| 
 | ||||
|   Corresponding Source conveyed, and Installation Information provided, | ||||
| in accord with this section must be in a format that is publicly | ||||
| documented (and with an implementation available to the public in | ||||
| source code form), and must require no special password or key for | ||||
| unpacking, reading or copying. | ||||
| 
 | ||||
|   7. Additional Terms. | ||||
| 
 | ||||
|   "Additional permissions" are terms that supplement the terms of this | ||||
| License by making exceptions from one or more of its conditions. | ||||
| Additional permissions that are applicable to the entire Program shall | ||||
| be treated as though they were included in this License, to the extent | ||||
| that they are valid under applicable law.  If additional permissions | ||||
| apply only to part of the Program, that part may be used separately | ||||
| under those permissions, but the entire Program remains governed by | ||||
| this License without regard to the additional permissions. | ||||
| 
 | ||||
|   When you convey a copy of a covered work, you may at your option | ||||
| remove any additional permissions from that copy, or from any part of | ||||
| it.  (Additional permissions may be written to require their own | ||||
| removal in certain cases when you modify the work.)  You may place | ||||
| additional permissions on material, added by you to a covered work, | ||||
| for which you have or can give appropriate copyright permission. | ||||
| 
 | ||||
|   Notwithstanding any other provision of this License, for material you | ||||
| add to a covered work, you may (if authorized by the copyright holders of | ||||
| that material) supplement the terms of this License with terms: | ||||
| 
 | ||||
|     a) Disclaiming warranty or limiting liability differently from the | ||||
|     terms of sections 15 and 16 of this License; or | ||||
| 
 | ||||
|     b) Requiring preservation of specified reasonable legal notices or | ||||
|     author attributions in that material or in the Appropriate Legal | ||||
|     Notices displayed by works containing it; or | ||||
| 
 | ||||
|     c) Prohibiting misrepresentation of the origin of that material, or | ||||
|     requiring that modified versions of such material be marked in | ||||
|     reasonable ways as different from the original version; or | ||||
| 
 | ||||
|     d) Limiting the use for publicity purposes of names of licensors or | ||||
|     authors of the material; or | ||||
| 
 | ||||
|     e) Declining to grant rights under trademark law for use of some | ||||
|     trade names, trademarks, or service marks; or | ||||
| 
 | ||||
|     f) Requiring indemnification of licensors and authors of that | ||||
|     material by anyone who conveys the material (or modified versions of | ||||
|     it) with contractual assumptions of liability to the recipient, for | ||||
|     any liability that these contractual assumptions directly impose on | ||||
|     those licensors and authors. | ||||
| 
 | ||||
|   All other non-permissive additional terms are considered "further | ||||
| restrictions" within the meaning of section 10.  If the Program as you | ||||
| received it, or any part of it, contains a notice stating that it is | ||||
| governed by this License along with a term that is a further | ||||
| restriction, you may remove that term.  If a license document contains | ||||
| a further restriction but permits relicensing or conveying under this | ||||
| License, you may add to a covered work material governed by the terms | ||||
| of that license document, provided that the further restriction does | ||||
| not survive such relicensing or conveying. | ||||
| 
 | ||||
|   If you add terms to a covered work in accord with this section, you | ||||
| must place, in the relevant source files, a statement of the | ||||
| additional terms that apply to those files, or a notice indicating | ||||
| where to find the applicable terms. | ||||
| 
 | ||||
|   Additional terms, permissive or non-permissive, may be stated in the | ||||
| form of a separately written license, or stated as exceptions; | ||||
| the above requirements apply either way. | ||||
| 
 | ||||
|   8. Termination. | ||||
| 
 | ||||
|   You may not propagate or modify a covered work except as expressly | ||||
| provided under this License.  Any attempt otherwise to propagate or | ||||
| modify it is void, and will automatically terminate your rights under | ||||
| this License (including any patent licenses granted under the third | ||||
| paragraph of section 11). | ||||
| 
 | ||||
|   However, if you cease all violation of this License, then your | ||||
| license from a particular copyright holder is reinstated (a) | ||||
| provisionally, unless and until the copyright holder explicitly and | ||||
| finally terminates your license, and (b) permanently, if the copyright | ||||
| holder fails to notify you of the violation by some reasonable means | ||||
| prior to 60 days after the cessation. | ||||
| 
 | ||||
|   Moreover, your license from a particular copyright holder is | ||||
| reinstated permanently if the copyright holder notifies you of the | ||||
| violation by some reasonable means, this is the first time you have | ||||
| received notice of violation of this License (for any work) from that | ||||
| copyright holder, and you cure the violation prior to 30 days after | ||||
| your receipt of the notice. | ||||
| 
 | ||||
|   Termination of your rights under this section does not terminate the | ||||
| licenses of parties who have received copies or rights from you under | ||||
| this License.  If your rights have been terminated and not permanently | ||||
| reinstated, you do not qualify to receive new licenses for the same | ||||
| material under section 10. | ||||
| 
 | ||||
|   9. Acceptance Not Required for Having Copies. | ||||
| 
 | ||||
|   You are not required to accept this License in order to receive or | ||||
| run a copy of the Program.  Ancillary propagation of a covered work | ||||
| occurring solely as a consequence of using peer-to-peer transmission | ||||
| to receive a copy likewise does not require acceptance.  However, | ||||
| nothing other than this License grants you permission to propagate or | ||||
| modify any covered work.  These actions infringe copyright if you do | ||||
| not accept this License.  Therefore, by modifying or propagating a | ||||
| covered work, you indicate your acceptance of this License to do so. | ||||
| 
 | ||||
|   10. Automatic Licensing of Downstream Recipients. | ||||
| 
 | ||||
|   Each time you convey a covered work, the recipient automatically | ||||
| receives a license from the original licensors, to run, modify and | ||||
| propagate that work, subject to this License.  You are not responsible | ||||
| for enforcing compliance by third parties with this License. | ||||
| 
 | ||||
|   An "entity transaction" is a transaction transferring control of an | ||||
| organization, or substantially all assets of one, or subdividing an | ||||
| organization, or merging organizations.  If propagation of a covered | ||||
| work results from an entity transaction, each party to that | ||||
| transaction who receives a copy of the work also receives whatever | ||||
| licenses to the work the party's predecessor in interest had or could | ||||
| give under the previous paragraph, plus a right to possession of the | ||||
| Corresponding Source of the work from the predecessor in interest, if | ||||
| the predecessor has it or can get it with reasonable efforts. | ||||
| 
 | ||||
|   You may not impose any further restrictions on the exercise of the | ||||
| rights granted or affirmed under this License.  For example, you may | ||||
| not impose a license fee, royalty, or other charge for exercise of | ||||
| rights granted under this License, and you may not initiate litigation | ||||
| (including a cross-claim or counterclaim in a lawsuit) alleging that | ||||
| any patent claim is infringed by making, using, selling, offering for | ||||
| sale, or importing the Program or any portion of it. | ||||
| 
 | ||||
|   11. Patents. | ||||
| 
 | ||||
|   A "contributor" is a copyright holder who authorizes use under this | ||||
| License of the Program or a work on which the Program is based.  The | ||||
| work thus licensed is called the contributor's "contributor version". | ||||
| 
 | ||||
|   A contributor's "essential patent claims" are all patent claims | ||||
| owned or controlled by the contributor, whether already acquired or | ||||
| hereafter acquired, that would be infringed by some manner, permitted | ||||
| by this License, of making, using, or selling its contributor version, | ||||
| but do not include claims that would be infringed only as a | ||||
| consequence of further modification of the contributor version.  For | ||||
| purposes of this definition, "control" includes the right to grant | ||||
| patent sublicenses in a manner consistent with the requirements of | ||||
| this License. | ||||
| 
 | ||||
|   Each contributor grants you a non-exclusive, worldwide, royalty-free | ||||
| patent license under the contributor's essential patent claims, to | ||||
| make, use, sell, offer for sale, import and otherwise run, modify and | ||||
| propagate the contents of its contributor version. | ||||
| 
 | ||||
|   In the following three paragraphs, a "patent license" is any express | ||||
| agreement or commitment, however denominated, not to enforce a patent | ||||
| (such as an express permission to practice a patent or covenant not to | ||||
| sue for patent infringement).  To "grant" such a patent license to a | ||||
| party means to make such an agreement or commitment not to enforce a | ||||
| patent against the party. | ||||
| 
 | ||||
|   If you convey a covered work, knowingly relying on a patent license, | ||||
| and the Corresponding Source of the work is not available for anyone | ||||
| to copy, free of charge and under the terms of this License, through a | ||||
| publicly available network server or other readily accessible means, | ||||
| then you must either (1) cause the Corresponding Source to be so | ||||
| available, or (2) arrange to deprive yourself of the benefit of the | ||||
| patent license for this particular work, or (3) arrange, in a manner | ||||
| consistent with the requirements of this License, to extend the patent | ||||
| license to downstream recipients.  "Knowingly relying" means you have | ||||
| actual knowledge that, but for the patent license, your conveying the | ||||
| covered work in a country, or your recipient's use of the covered work | ||||
| in a country, would infringe one or more identifiable patents in that | ||||
| country that you have reason to believe are valid. | ||||
| 
 | ||||
|   If, pursuant to or in connection with a single transaction or | ||||
| arrangement, you convey, or propagate by procuring conveyance of, a | ||||
| covered work, and grant a patent license to some of the parties | ||||
| receiving the covered work authorizing them to use, propagate, modify | ||||
| or convey a specific copy of the covered work, then the patent license | ||||
| you grant is automatically extended to all recipients of the covered | ||||
| work and works based on it. | ||||
| 
 | ||||
|   A patent license is "discriminatory" if it does not include within | ||||
| the scope of its coverage, prohibits the exercise of, or is | ||||
| conditioned on the non-exercise of one or more of the rights that are | ||||
| specifically granted under this License.  You may not convey a covered | ||||
| work if you are a party to an arrangement with a third party that is | ||||
| in the business of distributing software, under which you make payment | ||||
| to the third party based on the extent of your activity of conveying | ||||
| the work, and under which the third party grants, to any of the | ||||
| parties who would receive the covered work from you, a discriminatory | ||||
| patent license (a) in connection with copies of the covered work | ||||
| conveyed by you (or copies made from those copies), or (b) primarily | ||||
| for and in connection with specific products or compilations that | ||||
| contain the covered work, unless you entered into that arrangement, | ||||
| or that patent license was granted, prior to 28 March 2007. | ||||
| 
 | ||||
|   Nothing in this License shall be construed as excluding or limiting | ||||
| any implied license or other defenses to infringement that may | ||||
| otherwise be available to you under applicable patent law. | ||||
| 
 | ||||
|   12. No Surrender of Others' Freedom. | ||||
| 
 | ||||
|   If conditions are imposed on you (whether by court order, agreement or | ||||
| otherwise) that contradict the conditions of this License, they do not | ||||
| excuse you from the conditions of this License.  If you cannot convey a | ||||
| covered work so as to satisfy simultaneously your obligations under this | ||||
| License and any other pertinent obligations, then as a consequence you may | ||||
| not convey it at all.  For example, if you agree to terms that obligate you | ||||
| to collect a royalty for further conveying from those to whom you convey | ||||
| the Program, the only way you could satisfy both those terms and this | ||||
| License would be to refrain entirely from conveying the Program. | ||||
| 
 | ||||
|   13. Remote Network Interaction; Use with the GNU General Public License. | ||||
| 
 | ||||
|   Notwithstanding any other provision of this License, if you modify the | ||||
| Program, your modified version must prominently offer all users | ||||
| interacting with it remotely through a computer network (if your version | ||||
| supports such interaction) an opportunity to receive the Corresponding | ||||
| Source of your version by providing access to the Corresponding Source | ||||
| from a network server at no charge, through some standard or customary | ||||
| means of facilitating copying of software.  This Corresponding Source | ||||
| shall include the Corresponding Source for any work covered by version 3 | ||||
| of the GNU General Public License that is incorporated pursuant to the | ||||
| following paragraph. | ||||
| 
 | ||||
|   Notwithstanding any other provision of this License, you have | ||||
| permission to link or combine any covered work with a work licensed | ||||
| under version 3 of the GNU General Public License into a single | ||||
| combined work, and to convey the resulting work.  The terms of this | ||||
| License will continue to apply to the part which is the covered work, | ||||
| but the work with which it is combined will remain governed by version | ||||
| 3 of the GNU General Public License. | ||||
| 
 | ||||
|   14. Revised Versions of this License. | ||||
| 
 | ||||
|   The Free Software Foundation may publish revised and/or new versions of | ||||
| the GNU Affero General Public License from time to time.  Such new versions | ||||
| will be similar in spirit to the present version, but may differ in detail to | ||||
| address new problems or concerns. | ||||
| 
 | ||||
|   Each version is given a distinguishing version number.  If the | ||||
| Program specifies that a certain numbered version of the GNU Affero General | ||||
| Public License "or any later version" applies to it, you have the | ||||
| option of following the terms and conditions either of that numbered | ||||
| version or of any later version published by the Free Software | ||||
| Foundation.  If the Program does not specify a version number of the | ||||
| GNU Affero General Public License, you may choose any version ever published | ||||
| by the Free Software Foundation. | ||||
| 
 | ||||
|   If the Program specifies that a proxy can decide which future | ||||
| versions of the GNU Affero General Public License can be used, that proxy's | ||||
| public statement of acceptance of a version permanently authorizes you | ||||
| to choose that version for the Program. | ||||
| 
 | ||||
|   Later license versions may give you additional or different | ||||
| permissions.  However, no additional obligations are imposed on any | ||||
| author or copyright holder as a result of your choosing to follow a | ||||
| later version. | ||||
| 
 | ||||
|   15. Disclaimer of Warranty. | ||||
| 
 | ||||
|   THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY | ||||
| APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT | ||||
| HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY | ||||
| OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, | ||||
| THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||||
| PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM | ||||
| IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF | ||||
| ALL NECESSARY SERVICING, REPAIR OR CORRECTION. | ||||
| 
 | ||||
|   16. Limitation of Liability. | ||||
| 
 | ||||
|   IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING | ||||
| WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS | ||||
| THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY | ||||
| GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE | ||||
| USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF | ||||
| DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD | ||||
| PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), | ||||
| EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF | ||||
| SUCH DAMAGES. | ||||
| 
 | ||||
|   17. Interpretation of Sections 15 and 16. | ||||
| 
 | ||||
|   If the disclaimer of warranty and limitation of liability provided | ||||
| above cannot be given local legal effect according to their terms, | ||||
| reviewing courts shall apply local law that most closely approximates | ||||
| an absolute waiver of all civil liability in connection with the | ||||
| Program, unless a warranty or assumption of liability accompanies a | ||||
| copy of the Program in return for a fee. | ||||
| 
 | ||||
|                      END OF TERMS AND CONDITIONS | ||||
| 
 | ||||
|             How to Apply These Terms to Your New Programs | ||||
| 
 | ||||
|   If you develop a new program, and you want it to be of the greatest | ||||
| possible use to the public, the best way to achieve this is to make it | ||||
| free software which everyone can redistribute and change under these terms. | ||||
| 
 | ||||
|   To do so, attach the following notices to the program.  It is safest | ||||
| to attach them to the start of each source file to most effectively | ||||
| state the exclusion of warranty; and each file should have at least | ||||
| the "copyright" line and a pointer to where the full notice is found. | ||||
| 
 | ||||
|     inspektor | ||||
|     Copyright (C) 2017  Sebastian Kippe | ||||
| 
 | ||||
|     This program is free software: you can redistribute it and/or modify | ||||
|     it under the terms of the GNU Affero General Public License as published | ||||
|     by the Free Software Foundation, either version 3 of the License, or | ||||
|     (at your option) any later version. | ||||
| 
 | ||||
|     This program is distributed in the hope that it will be useful, | ||||
|     but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|     GNU Affero General Public License for more details. | ||||
| 
 | ||||
|     You should have received a copy of the GNU Affero General Public License | ||||
|     along with this program.  If not, see <http://www.gnu.org/licenses/>. | ||||
| 
 | ||||
| Also add information on how to contact you by electronic and paper mail. | ||||
| 
 | ||||
|   If your software can interact with users remotely through a computer | ||||
| network, you should also make sure that it provides a way for users to | ||||
| get its source.  For example, if your program is a web application, its | ||||
| interface could display a "Source" link that leads users to an archive | ||||
| of the code.  There are many ways you could offer source, and different | ||||
| solutions will be better for different programs; see section 13 for the | ||||
| specific requirements. | ||||
| 
 | ||||
|   You should also get your employer (if you work as a programmer) or school, | ||||
| if any, to sign a "copyright disclaimer" for the program, if necessary. | ||||
| For more information on this, and how to apply and follow the GNU AGPL, see | ||||
| <http://www.gnu.org/licenses/>. | ||||
							
								
								
									
										84
									
								
								README.md
									
									
									
									
									
								
							
							
						
						| @ -1,84 +0,0 @@ | ||||
| # RS Inspektor | ||||
| 
 | ||||
| Inspektor is a simple file browser for inspecting the contents of a | ||||
| [remoteStorage](https://remotestorage.io) account. It is intended for RS app | ||||
| developers and power users. | ||||
| 
 | ||||
| You're invited to contribute to this app and/or submit feedback to improve it. Please use the | ||||
| [RS Discourse forums](https://community.remotestorage.io/t/rs-inspektor-a-simple-remotestorage-file-browser/428) | ||||
| to post issues or ideas, and/or to request an account for gitea.kosmos.org | ||||
| if you want to submit pull requests directly to the upstream repository. You | ||||
| may also submit Git patches via [e-mail](mailto:raucao@kip.pe). | ||||
| 
 | ||||
| ## Features | ||||
| 
 | ||||
| * [x] Connect RS accounts | ||||
| * [x] Traverse/inspect directories | ||||
| * [x] View document details | ||||
| * [x] Render images in details | ||||
| * [x] Render text content in details | ||||
| * [x] Render JSON content tree view (optional source view) | ||||
| * [x] Delete documents | ||||
| * [x] Edit JSON content in tree view | ||||
| * [x] Delete directories | ||||
| * [ ] Edit content source | ||||
| * [ ] Render other types of content (e.g. audio and video) | ||||
| * [ ] Copy/move documents | ||||
| * [ ] Copy/move directories (and enclosed files) | ||||
| * [ ] Loading indicator for any view change that loads remote data | ||||
| * [ ] Logo/icon | ||||
| * [ ] Layout/support for small screens | ||||
| 
 | ||||
| ## Prerequisites | ||||
| 
 | ||||
| You will need the following things properly installed on your computer. | ||||
| 
 | ||||
| * [Git](https://git-scm.com/) | ||||
| * [Node.js](https://nodejs.org/) (with NPM) | ||||
| * [Ember CLI](https://ember-cli.com/) | ||||
| * [Google Chrome](https://google.com/chrome/) | ||||
| 
 | ||||
| ## Installation | ||||
| 
 | ||||
| * `git clone <repository-url>` this repository | ||||
| * `cd inspektor` | ||||
| * `npm install` | ||||
| 
 | ||||
| ## Running / Development | ||||
| 
 | ||||
| * `ember serve` | ||||
| * Visit your app at [http://localhost:4200](http://localhost:4200). | ||||
| * Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests). | ||||
| 
 | ||||
| ### Code Generators | ||||
| 
 | ||||
| Make use of the many generators for code, try `ember help generate` for more details | ||||
| 
 | ||||
| ### Running Tests | ||||
| 
 | ||||
| * `ember test` | ||||
| * `ember test --server` | ||||
| 
 | ||||
| ### Building | ||||
| 
 | ||||
| * `ember build` (development) | ||||
| * `ember build --environment production` (production) | ||||
| 
 | ||||
| ### Deploying | ||||
| 
 | ||||
| With the 5apps remote added correctly (and push access to the GitLab repo), | ||||
| just run: | ||||
| 
 | ||||
|     npm run deploy | ||||
| 
 | ||||
| If you want to deploy this from and to different repos, have a look at the | ||||
| `scripts` section in `package.json`, as well as `scripts/deploy.sh` for how it | ||||
| works. | ||||
| 
 | ||||
| ## Further Reading / Useful Links | ||||
| 
 | ||||
| * [ember.js](https://emberjs.com/) | ||||
| * [ember-cli](https://ember-cli.com/) | ||||
| * Development Browser Extensions | ||||
|   * [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi) | ||||
|   * [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/) | ||||
							
								
								
									
										14
									
								
								app/app.js
									
									
									
									
									
								
							
							
						
						| @ -1,14 +0,0 @@ | ||||
| import Application from '@ember/application'; | ||||
| import Resolver from './resolver'; | ||||
| import loadInitializers from 'ember-load-initializers'; | ||||
| import config from './config/environment'; | ||||
| 
 | ||||
| const App = Application.extend({ | ||||
|   modulePrefix: config.modulePrefix, | ||||
|   podModulePrefix: config.podModulePrefix, | ||||
|   Resolver | ||||
| }); | ||||
| 
 | ||||
| loadInitializers(App, config.modulePrefix); | ||||
| 
 | ||||
| export default App; | ||||
| @ -1,18 +0,0 @@ | ||||
| import Component from '@ember/component'; | ||||
| import { computed } from '@ember/object'; | ||||
| 
 | ||||
| export default Component.extend({ | ||||
| 
 | ||||
|   classNames: ['account-info'], | ||||
| 
 | ||||
|   userAddress: null, | ||||
| 
 | ||||
|   username: computed('userAddress', function() { | ||||
|     return this.get('userAddress').split('@')[0]; | ||||
|   }), | ||||
| 
 | ||||
|   host: computed('userAddress', function() { | ||||
|     return '@' + this.get('userAddress').split('@')[1]; | ||||
|   }) | ||||
| 
 | ||||
| }); | ||||
| @ -1,4 +0,0 @@ | ||||
| <span class="username">{{username}}</span> | ||||
| <br><span class="host">{{host}}</span> | ||||
| 
 | ||||
| {{#link-to "disconnect" class="disconnect"}}disconnect{{/link-to}} | ||||
| @ -1,32 +0,0 @@ | ||||
| import Component from '@ember/component'; | ||||
| import EmberObject from '@ember/object'; | ||||
| import { isEmpty } from '@ember/utils'; | ||||
| 
 | ||||
| export default Component.extend({ | ||||
| 
 | ||||
|   tagName: 'nav', | ||||
|   classNames: ['breadcrumb-nav'], | ||||
| 
 | ||||
|   currentDirPath: null, | ||||
| 
 | ||||
|   linkItems: function() { | ||||
|     let currentDirPath = this.get('currentDirPath'); | ||||
|     if (isEmpty(currentDirPath)) { return []; } | ||||
|     let linkItems = []; | ||||
| 
 | ||||
|     let dirs = currentDirPath.split('/') | ||||
|                              .reject(i => isEmpty(i)); | ||||
| 
 | ||||
|     dirs.forEach(dirname => { | ||||
|       let path = currentDirPath.match(`(.*${dirname})/`)[0]; | ||||
| 
 | ||||
|       linkItems.pushObject(EmberObject.create({ | ||||
|         name: dirname, | ||||
|         path: path | ||||
|       })); | ||||
|     }); | ||||
| 
 | ||||
|     return linkItems; | ||||
|   }.property('currentDirPath') | ||||
| 
 | ||||
| }); | ||||
| @ -1,4 +0,0 @@ | ||||
| <span class="node">{{#link-to "index" (query-params path='/')}}Home{{/link-to}}</span> | ||||
| {{#each linkItems as |item|}} | ||||
| <span class="node">{{#link-to "index" (query-params path=item.path)}}{{item.name}}{{/link-to}}</span> | ||||
| {{/each}} | ||||
| @ -1,7 +0,0 @@ | ||||
| import Component from '@ember/component'; | ||||
| 
 | ||||
| export default Component.extend({ | ||||
| 
 | ||||
|   categories: null | ||||
| 
 | ||||
| }); | ||||
| @ -1,9 +0,0 @@ | ||||
| {{#if categories}} | ||||
|   <nav> | ||||
|     <ul> | ||||
|       {{#each categories as |category|}} | ||||
|       <li>{{#link-to "index" (query-params path=category.path)}}{{category.name}}{{/link-to}}</li> | ||||
|       {{/each}} | ||||
|     </ul> | ||||
|   </nav> | ||||
| {{/if}} | ||||
| @ -1,17 +0,0 @@ | ||||
| import Component from '@ember/component'; | ||||
| 
 | ||||
| export default Component.extend({ | ||||
| 
 | ||||
|   classNames: ['directory-listing'], | ||||
| 
 | ||||
|   items: null, | ||||
| 
 | ||||
|   itemsSorted: function() { | ||||
|     let items = this.get('items'); | ||||
| 
 | ||||
|     // folders first
 | ||||
|     return items.reject(i => i.type !== 'folder') | ||||
|                 .concat(items.reject(i => i.type === 'folder')); | ||||
|   }.property('items') | ||||
| 
 | ||||
| }); | ||||
| @ -1,22 +0,0 @@ | ||||
| <ul class="listing"> | ||||
|   {{#each itemsSorted as |item|}} | ||||
|   <li> | ||||
|     {{#if item.isFolder}} | ||||
|       {{#link-to "index" (query-params path=item.path)}} | ||||
|         <span class="icon">{{item-icon type=item.type}}</span> | ||||
|         <span class="name">{{item.name}}</span> | ||||
|         <span class="size"></span> | ||||
|         <span class="type">{{item.type}}</span> | ||||
|       {{/link-to}} | ||||
|     {{else}} | ||||
|       <!-- TODO link to item --> | ||||
|       {{#link-to "inspect" (query-params path=item.path)}} | ||||
|         <span class="icon">{{item-icon type=item.type}}</span> | ||||
|         <span class="name">{{item.name}}</span> | ||||
|         <span class="size">{{human-file-size item.size}}</span> | ||||
|         <span class="type">{{item.type}}</span> | ||||
|       {{/link-to}} | ||||
|     {{/if}} | ||||
|   </li> | ||||
|   {{/each}} | ||||
| </ul> | ||||
| @ -1,177 +0,0 @@ | ||||
| import Component from '@ember/component'; | ||||
| import { inject as service } from '@ember/service'; | ||||
| import { observer } from '@ember/object'; | ||||
| import { alias, none, not } from '@ember/object/computed'; | ||||
| import { scheduleOnce } from '@ember/runloop'; | ||||
| import JSONTreeView from 'npm:json-tree-view'; | ||||
| 
 | ||||
| export default Component.extend({ | ||||
| 
 | ||||
|   storage: service(), | ||||
| 
 | ||||
|   classNames: ['file-preview'], | ||||
| 
 | ||||
|   fileLoaded: false, | ||||
|   uploadingChanges: false, | ||||
| 
 | ||||
|   showEditor: null, | ||||
|   hideEditor: not('showEditor'), | ||||
| 
 | ||||
|   fileContent: null, | ||||
|   objectURL: null, | ||||
|   metaData: null, | ||||
|   isJSON: null, | ||||
|   type: alias('metaData.type'), | ||||
|   isBinary: alias('metaData.isBinary'), | ||||
| 
 | ||||
|   isUnknownBinary: none('isImage', 'isAudio', 'isVideo'), | ||||
| 
 | ||||
|   isImage: function() { | ||||
|     return this.get('type').match(/^image\/.+$/); | ||||
|   }.property('type'), | ||||
| 
 | ||||
|   isAudio: function() { | ||||
|     return this.get('type').match(/^audio\/.+$/); | ||||
|   }.property('type'), | ||||
| 
 | ||||
|   isVideo: function() { | ||||
|     return this.get('type').match(/^video\/.+$/); | ||||
|   }.property('type'), | ||||
| 
 | ||||
|   isText: function() { | ||||
|     return !this.get('isBinary'); | ||||
|   }.property('isBinary'), | ||||
| 
 | ||||
|   loadFile: function() { | ||||
|     let path = this.get('metaData.path'); | ||||
| 
 | ||||
|     if (this.get('isAudio') || this.get('isVideo')) { | ||||
|       this.set('fileLoaded', true); | ||||
|       this.set('objectURL', this.get('storage.client') | ||||
|                                 .getItemURL(path)); | ||||
|       return; | ||||
|     } | ||||
| 
 | ||||
|     // TODO don't fetch is size above certain limit
 | ||||
| 
 | ||||
|     console.debug(`[file-preview] Loading file ${this.get('metaData.name')}`) | ||||
|     this.get('storage.client').getFile(path).then(file => { | ||||
|       if (this.get('isImage')) { | ||||
|         let view = new window.Uint8Array(file.data); | ||||
|         let blob = new window.Blob([view], { type: file.contentType }); | ||||
|         this.set('objectURL', window.URL.createObjectURL(blob)); | ||||
|       } else { | ||||
|         this.set('fileContent', file.data); | ||||
|       } | ||||
| 
 | ||||
|       this.set('fileLoaded', true); | ||||
|     }); | ||||
|   }.on('didInsertElement'), | ||||
| 
 | ||||
|   onFileLoaded: observer('fileLoaded', function(){ | ||||
|     if (this.get('fileLoaded') && this.get('isJSON') && this.get('jsonShowTree')) { | ||||
|       scheduleOnce('afterRender', this, 'renderJsonTree'); | ||||
|     } | ||||
|   }), | ||||
| 
 | ||||
|   onJsonViewChanged: observer('jsonShowTree', function(){ | ||||
|     if (this.get('fileLoaded') && this.get('isJSON') && this.get('jsonShowTree')) { | ||||
|       scheduleOnce('afterRender', this, 'renderJsonTree'); | ||||
|     } | ||||
|   }), | ||||
| 
 | ||||
|   renderJsonTree () { | ||||
|     let value = JSON.parse(this.get('fileContent')); | ||||
| 
 | ||||
|     let view = new JSONTreeView('content', value); | ||||
|     // this.attachJsonTreeEventHandlers(view);
 | ||||
| 
 | ||||
|     const containerElement = document.getElementById('json-tree-view'); | ||||
|     containerElement.innerHTML = ''; // Throw away any existing treeviews
 | ||||
|     containerElement.appendChild(view.dom); | ||||
| 
 | ||||
|     window.jsonview = view; | ||||
| 
 | ||||
|     view.expand(true); | ||||
| 
 | ||||
|     view.withRootName = false; | ||||
|     view.readonly = this.get('hideEditor'); | ||||
| 
 | ||||
|     this.set('jsonTreeView', view); | ||||
|   }, | ||||
| 
 | ||||
|   attachJsonTreeEventHandlers (view) { | ||||
|     view.on('change', function(self, key, oldValue, newValue){ | ||||
|       console.log('change', key, oldValue, '=>', newValue); | ||||
|     }); | ||||
|     view.on('rename', function(self, key, oldName, newName) { | ||||
|       console.log('rename', key, oldName, '=>', newName); | ||||
|     }); | ||||
|     view.on('delete', function(self, key) { | ||||
|       console.log('delete', key); | ||||
|     }); | ||||
|     view.on('append', function(self, key, nameOrValue, newValue) { | ||||
|       console.log('append', key, nameOrValue, '=>', newValue); | ||||
|     }); | ||||
|     view.on('click', function(self, key, value) { | ||||
|       console.log('click', key, '=', value); | ||||
|     }); | ||||
|     view.on('expand', function(self, key, value) { | ||||
|       console.log('expand', key, '=', value); | ||||
|     }); | ||||
|     view.on('collapse', function(self, key, value) { | ||||
|       console.log('collapse', key, '=', value); | ||||
|     }); | ||||
|     view.on('refresh', function(self, key, value) { | ||||
|       console.log('refresh', key, '=', value); | ||||
|     }); | ||||
|   }, | ||||
| 
 | ||||
|   onShowEditor: observer('showEditor', function(){ | ||||
|     if (this.get('fileLoaded') && this.get('isJSON') && this.get('jsonShowTree')) { | ||||
|       const showEditor = this.get('showEditor'); | ||||
| 
 | ||||
|       if (showEditor) { | ||||
|         this.set('jsonTreeView.readonly', false); | ||||
|       } else { | ||||
|         this.set('jsonTreeView.readonly', true); | ||||
|         this.renderJsonTree(); | ||||
|       } | ||||
|     } | ||||
|   }), | ||||
| 
 | ||||
|   actions: { | ||||
| 
 | ||||
|     saveChanges () { | ||||
|       const path = this.get('metaData.path'); | ||||
| 
 | ||||
|       if (this.get('isJSON') && this.get('jsonShowTree')) { | ||||
|         const content = JSON.stringify(this.get('jsonTreeView.value')); | ||||
|         this.set('uploadingChanges', true); | ||||
| 
 | ||||
|         this.get('storage.client') | ||||
|             .storeFile('application/json', path, content) | ||||
|             .then(etag => { | ||||
|               this.setProperties({ | ||||
|                 'metaData.etag': etag, | ||||
|                 fileContent: content, | ||||
|                 showEditor: false | ||||
|               }); | ||||
|             }).catch(err => { | ||||
|               alert('Failed to update the file. Check the console for more info.'); | ||||
|               console.error(err); | ||||
|             }).finally(() => { | ||||
|               this.set('uploadingChanges', false); | ||||
|             }); | ||||
|       } else { | ||||
|         console.warn('not implemented'); | ||||
|       } | ||||
|     }, | ||||
| 
 | ||||
|     cancelEditor () { | ||||
|       this.set('showEditor', false); | ||||
|     } | ||||
| 
 | ||||
|   } | ||||
| 
 | ||||
| }); | ||||
| @ -1,43 +0,0 @@ | ||||
| {{#if fileLoaded}} | ||||
|   {{#if isBinary}} | ||||
|     {{#if isUnkownBinary}} | ||||
|       <p>No preview available for this content type.</p> | ||||
|     {{/if}} | ||||
|     {{#if isImage}} | ||||
|       <img src={{objectURL}} alt={{metaData.name}}> | ||||
|     {{/if}} | ||||
|     {{#if isAudio}} | ||||
|       <audio src={{objectURL}} controls /> | ||||
|     {{/if}} | ||||
|     {{#if isVideo}} | ||||
|       <video src={{objectURL}} controls /> | ||||
|     {{/if}} | ||||
|   {{/if}} | ||||
| 
 | ||||
|   {{#if isText}} | ||||
|     {{#if isJSON}} | ||||
|       {{#if jsonShowTree}} | ||||
|         <div id="json-tree-view"></div> | ||||
|       {{else}} | ||||
|         <code>{{fileContent}}</code> | ||||
|       {{/if}} | ||||
|     {{else}} | ||||
|       <code>{{fileContent}}</code> | ||||
|     {{/if}} | ||||
|   {{/if}} | ||||
| 
 | ||||
|   {{#if showEditor}} | ||||
|     <div class="actions"> | ||||
|       <button {{action "saveChanges"}} | ||||
|               disabled={{uploadingChanges}} | ||||
|               class="primary"> | ||||
|         Save changes | ||||
|       </button> | ||||
|       <button {{action "cancelEditor"}} | ||||
|               disabled={{uploadingChanges}} | ||||
|               class="secondary"> | ||||
|         Cancel editing | ||||
|       </button> | ||||
|     </div> | ||||
|   {{/if}} | ||||
| {{/if}} | ||||
| @ -1,33 +0,0 @@ | ||||
| import Component from '@ember/component'; | ||||
| 
 | ||||
| export default Component.extend({ | ||||
| 
 | ||||
|   tagName: 'img', | ||||
|   classNames: ['item-icon'], | ||||
|   attributeBindings: ['src:src'], | ||||
| 
 | ||||
|   type: null, | ||||
| 
 | ||||
|   isFolder: function() { | ||||
|     return this.get('type') === 'folder'; | ||||
|   }.property('type'), | ||||
| 
 | ||||
|   src: function() { | ||||
|     let prefix = '/img/file-icons/'; | ||||
|     let type = this.get('type'); | ||||
|     let filename; | ||||
| 
 | ||||
|     if (this.get('isFolder')) { | ||||
|       filename = 'folder.svg'; | ||||
|     } else { | ||||
|       if (type.match(/json/i)) { | ||||
|         filename = 'code-curly.svg'; | ||||
|       } else { | ||||
|         filename = 'file.svg'; | ||||
|       } | ||||
|     } | ||||
| 
 | ||||
|     return prefix + filename; | ||||
|   }.property() | ||||
| 
 | ||||
| }); | ||||
| @ -1,48 +0,0 @@ | ||||
| import Controller from '@ember/controller'; | ||||
| import EmberObject from '@ember/object'; | ||||
| import { computed, observer } from '@ember/object'; | ||||
| import { inject as service } from '@ember/service'; | ||||
| import { alias } from '@ember/object/computed'; | ||||
| import { isEmpty } from '@ember/utils'; | ||||
| 
 | ||||
| export default Controller.extend({ | ||||
| 
 | ||||
|   storage: service(), | ||||
| 
 | ||||
|   connecting: alias('storage.connecting'), | ||||
|   connected: alias('storage.connected'), | ||||
|   userAddress: alias('storage.userAddress'), | ||||
|   rootListing: alias('storage.rootListing'), | ||||
|   currentDirPath: null, | ||||
| 
 | ||||
|   connectedClass: computed('connected', function() { | ||||
|     return this.get('connected') ? 'connected' : 'disconnected'; | ||||
|   }), | ||||
| 
 | ||||
|   categories: function() { | ||||
|     let categories = []; | ||||
|     let rootListing = this.get('rootListing'); | ||||
|     if (isEmpty(rootListing)) { return categories; } | ||||
| 
 | ||||
|     rootListing.forEach(item => { | ||||
|       if (!item.isFolder) { return; } | ||||
| 
 | ||||
|       categories.push(EmberObject.create({ | ||||
|         name: item.name.replace('/', ''), | ||||
|         type: item.type, | ||||
|         path: item.name | ||||
|       })); | ||||
|     }); | ||||
| 
 | ||||
|     return categories; | ||||
|   }.property('rootListing'), | ||||
| 
 | ||||
|   connectedChange: observer('connected', function() { | ||||
|     if (this.get('connected')) { | ||||
|       // console.debug('connectedChange connected');
 | ||||
|     } else { | ||||
|       this.set('currentDirPath', null); | ||||
|     } | ||||
|   }), | ||||
| 
 | ||||
| }); | ||||
| @ -1,87 +0,0 @@ | ||||
| import Controller from '@ember/controller'; | ||||
| import { inject as controller } from '@ember/controller'; | ||||
| import { inject as service } from '@ember/service'; | ||||
| import { computed, observer } from '@ember/object'; | ||||
| import { alias } from '@ember/object/computed'; | ||||
| import { isPresent, isEmpty } from '@ember/utils'; | ||||
| import { all } from 'rsvp'; | ||||
| 
 | ||||
| export default Controller.extend({ | ||||
| 
 | ||||
|   application: controller(), | ||||
|   storage: service(), | ||||
| 
 | ||||
|   connected: alias('storage.connected'), | ||||
|   rootListing: alias('storage.rootListing'), | ||||
|   currentDirPath: alias('application.currentDirPath'), | ||||
| 
 | ||||
|   queryParams: ['path'], | ||||
| 
 | ||||
|   currentListing: function () { | ||||
|     if (isPresent(this.get('model.currentListing'))) { | ||||
|       return this.get('model.currentListing').sortBy('name'); | ||||
|     } else { | ||||
|       return this.get('rootListing'); | ||||
|     } | ||||
|   }.property('rootListing.[]', 'model.[]'), | ||||
| 
 | ||||
|   documents: computed('currentListing.[]', function () { | ||||
|     if (isEmpty(this.get('currentListing'))) { return []; } | ||||
| 
 | ||||
|     return this.get('currentListing') | ||||
|                .reject(item => item.path.substr(-1) === '/'); | ||||
|   }), | ||||
| 
 | ||||
|   currentListingContainsDocuments: computed('documents.[]', function () { | ||||
|     return isPresent(this.get('documents')); | ||||
|   }), | ||||
| 
 | ||||
|   documentCount: computed('documents.[]', function () { | ||||
|     if (isPresent(this.get('documents'))) { | ||||
|       return this.get('documents').length; | ||||
|     } else { | ||||
|       return 0; | ||||
|     } | ||||
|   }), | ||||
| 
 | ||||
|   parentDir: computed('currentDirPath', function () { | ||||
|     const dirs = this.get('currentDirPath') | ||||
|                      .split('/') | ||||
|                      .reject(p => isEmpty(p)); | ||||
| 
 | ||||
|     return dirs.splice(0, dirs.length - 1).join('/') + '/'; | ||||
|   }), | ||||
| 
 | ||||
|   connectedChange: observer('connected', function () { | ||||
|     if (this.get('connected')) { | ||||
|       // console.debug('connectedChange connected');
 | ||||
|     } else { | ||||
|       this.set('model', null); | ||||
|       this.set('path', null); | ||||
|     } | ||||
|   }), | ||||
| 
 | ||||
|   actions: { | ||||
| 
 | ||||
|     deleteDocuments () { | ||||
|       const documentCount = this.get('documentCount'); | ||||
|       const msg = `Delete all ${documentCount} documents/files in the current directory?`; | ||||
|       if (! window.confirm(msg)) { return false; } | ||||
| 
 | ||||
|       const client = this.get('storage.client'); | ||||
| 
 | ||||
|       let promises = this.get('documents').map(item => { | ||||
|         console.debug('removing ' + item.path); | ||||
|         return client.remove(item.path); | ||||
|       }); | ||||
| 
 | ||||
|       all(promises).then(() => { | ||||
|         this.transitionToRoute('index', { | ||||
|           queryParams: { path: this.get('parentDir') } | ||||
|         }); | ||||
|       }); | ||||
|     } | ||||
| 
 | ||||
|   } | ||||
| 
 | ||||
| }); | ||||
| @ -1,83 +0,0 @@ | ||||
| import Controller from '@ember/controller'; | ||||
| import { inject as controller } from '@ember/controller'; | ||||
| import { inject as service } from '@ember/service'; | ||||
| import { computed } from '@ember/object'; | ||||
| import { alias } from '@ember/object/computed'; | ||||
| import { isEmpty } from '@ember/utils'; | ||||
| 
 | ||||
| export default Controller.extend({ | ||||
| 
 | ||||
|   application: controller(), | ||||
|   storage: service(), | ||||
| 
 | ||||
|   currentDirPath: alias('application.currentDirPath'), | ||||
| 
 | ||||
|   queryParams: ['path'], | ||||
| 
 | ||||
|   // documentIsEditable: computed.not('model.documentMetaData.isBinary'),
 | ||||
|   documentIsEditable: alias('documentIsJSON'), | ||||
| 
 | ||||
|   documentShowEditor: false, | ||||
|   documentHideEditor: computed.not('documentShowEditor'), | ||||
| 
 | ||||
|   documentIsJSON: computed('model.documentMetaData.type', function(){ | ||||
|     if (isEmpty(this.get('model.documentMetaData'))) { return false; } | ||||
| 
 | ||||
|     return !!this.get('model.documentMetaData.type').match(/application\/json/i); | ||||
|   }), | ||||
| 
 | ||||
|   jsonView: 'tree', | ||||
|   jsonShowTree: computed.equal('jsonView', 'tree'), | ||||
|   jsonShowSource: computed.equal('jsonView', 'source'), | ||||
| 
 | ||||
|   publicItemURL: computed('model.documentMetaData.path', function(){ | ||||
|     let path = this.get('model.documentMetaData.path'); | ||||
| 
 | ||||
|     if (path.match(/public\//)) { | ||||
|       return this.get('storage.client').getItemURL(path); | ||||
|     } else { | ||||
|       return null; | ||||
|     } | ||||
|   }), | ||||
| 
 | ||||
|   metadataHidden: false, | ||||
| 
 | ||||
|   actions: { | ||||
| 
 | ||||
|     showJsonTree () { | ||||
|       this.set('jsonView', 'tree'); | ||||
|     }, | ||||
| 
 | ||||
|     showJsonSource () { | ||||
|       this.set('jsonView', 'source'); | ||||
|     }, | ||||
| 
 | ||||
|     showEditor () { | ||||
|       this.set('documentShowEditor', true); | ||||
|     }, | ||||
| 
 | ||||
|     cancelEditor () { | ||||
|       this.set('documentShowEditor', false); | ||||
|       // TODO remove changes from tree/source
 | ||||
|     }, | ||||
| 
 | ||||
|     toggleMetadata () { | ||||
|       this.toggleProperty('metadataHidden'); | ||||
|     }, | ||||
| 
 | ||||
|     deleteItem () { | ||||
|       if (window.confirm('Delete?')) { | ||||
|         this.get('storage.client') | ||||
|             .remove(this.get('path')).then(() => { | ||||
|               this.transitionToRoute('index', { | ||||
|                 queryParams: { | ||||
|                   path: this.get('currentDirPath') | ||||
|                 } | ||||
|               }); | ||||
|             }); | ||||
|       } | ||||
|     } | ||||
| 
 | ||||
|   } | ||||
| 
 | ||||
| }); | ||||
| @ -1,16 +0,0 @@ | ||||
| import { helper } from '@ember/component/helper'; | ||||
| 
 | ||||
| export default helper(function(fileSizeInBytes/*, options*/) { | ||||
|   if (fileSizeInBytes < 1024) { | ||||
|     return `${fileSizeInBytes} bytes`; | ||||
|   } | ||||
| 
 | ||||
|   var i = -1; | ||||
|   var byteUnits = ['KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; | ||||
|   do { | ||||
|       fileSizeInBytes = fileSizeInBytes / 1024; | ||||
|       i++; | ||||
|   } while (fileSizeInBytes > 1024); | ||||
| 
 | ||||
|   return String(Math.max(fileSizeInBytes, 0.1).toFixed(1) + ' ' +byteUnits[i]); | ||||
| }); | ||||
| @ -1,25 +0,0 @@ | ||||
| <!DOCTYPE html> | ||||
| <html> | ||||
|   <head> | ||||
|     <meta charset="utf-8"> | ||||
|     <meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||||
|     <title>Inspektor</title> | ||||
|     <meta name="description" content=""> | ||||
|     <meta name="viewport" content="width=device-width, initial-scale=1"> | ||||
| 
 | ||||
|     {{content-for "head"}} | ||||
| 
 | ||||
|     <link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css"> | ||||
|     <link integrity="" rel="stylesheet" href="{{rootURL}}assets/inspektor.css"> | ||||
| 
 | ||||
|     {{content-for "head-footer"}} | ||||
|   </head> | ||||
|   <body> | ||||
|     {{content-for "body"}} | ||||
| 
 | ||||
|     <script src="{{rootURL}}assets/vendor.js"></script> | ||||
|     <script src="{{rootURL}}assets/inspektor.js"></script> | ||||
| 
 | ||||
|     {{content-for "body-footer"}} | ||||
|   </body> | ||||
| </html> | ||||
| @ -1,3 +0,0 @@ | ||||
| import Resolver from 'ember-resolver'; | ||||
| 
 | ||||
| export default Resolver; | ||||
| @ -1,15 +0,0 @@ | ||||
| import EmberRouter from '@ember/routing/router'; | ||||
| import config from './config/environment'; | ||||
| 
 | ||||
| const Router = EmberRouter.extend({ | ||||
|   location: config.locationType, | ||||
|   rootURL: config.rootURL | ||||
| }); | ||||
| 
 | ||||
| Router.map(function() { | ||||
|   this.route('inspect'); | ||||
|   this.route('connect'); | ||||
|   this.route('disconnect'); | ||||
| }); | ||||
| 
 | ||||
| export default Router; | ||||
| @ -1,38 +0,0 @@ | ||||
| import Route from '@ember/routing/route'; | ||||
| import { inject as service } from '@ember/service'; | ||||
| import BodyClassMixin from 'ember-body-class/mixins/body-class'; | ||||
| 
 | ||||
| export default Route.extend(BodyClassMixin, { | ||||
| 
 | ||||
|   storage: service(), | ||||
| 
 | ||||
|   beforeModel () { | ||||
|     this.get('storage.rs').on('error', (error) => { | ||||
|       console.debug('rs.on error', error); | ||||
|       if (error.name === 'Unauthorized') { | ||||
|         this.handleUnauthorized(); | ||||
|       } else if (error.name === 'DiscoveryError') { | ||||
|         // Do nothing, because the widget will handle it
 | ||||
|       } else { | ||||
|         alert('An unknown error occured. Please check the browser console for details.'); | ||||
|       } | ||||
|     }); | ||||
|   }, | ||||
| 
 | ||||
|   // We need to handle this here, so we can transitionTo
 | ||||
|   // the connect route
 | ||||
|   handleUnauthorized () { | ||||
|     // Ignore additional unauthorized events after the
 | ||||
|     // first one
 | ||||
|     if (this.get('storage.unauthorized')) { return; } | ||||
| 
 | ||||
|     this.get('storage').setProperties({ | ||||
|       unauthorized: true, | ||||
|       connecting: false, | ||||
|       connected: false | ||||
|     }); | ||||
| 
 | ||||
|     this.transitionTo('connect'); | ||||
|   } | ||||
| 
 | ||||
| }); | ||||
| @ -1,33 +0,0 @@ | ||||
| import Route from '@ember/routing/route'; | ||||
| import { inject as service } from '@ember/service'; | ||||
| import { later } from '@ember/runloop'; | ||||
| import { Promise } from 'rsvp'; | ||||
| 
 | ||||
| export default Route.extend({ | ||||
| 
 | ||||
|   storage: service(), | ||||
| 
 | ||||
|   beforeModel() { | ||||
|     return this.waitForConnectionState().then(() => { | ||||
|       if (this.get('storage.connected')) { | ||||
|         this.transitionTo('index'); | ||||
|       } | ||||
|     }); | ||||
|   }, | ||||
| 
 | ||||
|   waitForConnectionState() { | ||||
|     let self = this; | ||||
| 
 | ||||
|     return new Promise(resolve => { | ||||
|       function checkConnectingDone() { | ||||
|         if (self.get('storage.connecting')) { | ||||
|           later(checkConnectingDone, 20); | ||||
|         } else { | ||||
|           resolve(); | ||||
|         } | ||||
|       } | ||||
|       checkConnectingDone(); | ||||
|     }); | ||||
|   } | ||||
| 
 | ||||
| }); | ||||
| @ -1,13 +0,0 @@ | ||||
| import Route from '@ember/routing/route'; | ||||
| import { inject as service } from '@ember/service'; | ||||
| 
 | ||||
| export default Route.extend({ | ||||
| 
 | ||||
|   storage: service(), | ||||
| 
 | ||||
|   beforeModel() { | ||||
|     this.get('storage.rs').disconnect(); | ||||
|     this.transitionTo('connect'); | ||||
|   } | ||||
| 
 | ||||
| }); | ||||
| @ -1,71 +0,0 @@ | ||||
| import Route from '@ember/routing/route'; | ||||
| import { inject as service } from '@ember/service'; | ||||
| import { isEmpty, isPresent } from '@ember/utils'; | ||||
| import { later } from '@ember/runloop'; | ||||
| import { hash, Promise } from 'rsvp'; | ||||
| 
 | ||||
| export default Route.extend({ | ||||
| 
 | ||||
|   storage: service(), | ||||
| 
 | ||||
|   queryParams: { | ||||
|     path: { | ||||
|       refreshModel: true | ||||
|     } | ||||
|   }, | ||||
| 
 | ||||
|   beforeModel() { | ||||
|     return this.waitForConnectionState().then(() => { | ||||
|       if (this.get('storage.disconnected')) { | ||||
|         this.transitionTo('connect'); | ||||
|       } | ||||
|     }); | ||||
|   }, | ||||
| 
 | ||||
|   model(params) { | ||||
|     let path = params.path; | ||||
| 
 | ||||
|     if (isEmpty(params.path)) { return null; } | ||||
| 
 | ||||
|     if (path.substr(-1) !== '/') { path += '/'; } | ||||
| 
 | ||||
|     return hash({ | ||||
|       currentListing: this.get('storage').fetchListing(path), | ||||
|       currentDirPath: path | ||||
|     }); | ||||
|   }, | ||||
| 
 | ||||
|   setupController(controller, model) { | ||||
|     this._super(controller, model); | ||||
| 
 | ||||
|     if (isEmpty(this.get('storage.categories')) && this.get('storage.connected')) { | ||||
|       this.get('storage').fetchRootListing(); | ||||
|     } | ||||
| 
 | ||||
|     if (isPresent(model)) { | ||||
|       controller.set('currentDirPath', model.currentDirPath); | ||||
| 
 | ||||
|       if (isEmpty(model.currentListing)) { | ||||
|         this.transitionTo('index', { | ||||
|           queryParams: { path: controller.get('parentDir') } | ||||
|         }); | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
| 
 | ||||
|   waitForConnectionState() { | ||||
|     let self = this; | ||||
| 
 | ||||
|     return new Promise(resolve => { | ||||
|       function checkConnectingDone() { | ||||
|         if (self.get('storage.connecting')) { | ||||
|           later(checkConnectingDone, 20); | ||||
|         } else { | ||||
|           resolve(); | ||||
|         } | ||||
|       } | ||||
|       checkConnectingDone(); | ||||
|     }); | ||||
|   } | ||||
| 
 | ||||
| }); | ||||
| @ -1,55 +0,0 @@ | ||||
| import Route from '@ember/routing/route'; | ||||
| import { inject as service } from '@ember/service'; | ||||
| import { isEmpty, isPresent } from '@ember/utils'; | ||||
| 
 | ||||
| export default Route.extend({ | ||||
| 
 | ||||
|   storage: service(), | ||||
| 
 | ||||
|   queryParams: { | ||||
|     path: { | ||||
|       refreshModel: true | ||||
|     } | ||||
|   }, | ||||
| 
 | ||||
|   model(params) { | ||||
|     let path = params.path; | ||||
| 
 | ||||
|     if (isEmpty(params.path)) { | ||||
|       // TODO redirect to root
 | ||||
|     } | ||||
|     if (path.substr(-1) === '/') { | ||||
|       // TODO redirect to parent dir
 | ||||
|     } | ||||
| 
 | ||||
|     let parentDirPath = path.match(/^(.*\/).+$/)[1]; | ||||
|     let documentName  = path.match(/^.*\/(.+)$/)[1]; | ||||
| 
 | ||||
|     // FIXME do a HEAD request instead of fetching parent listing
 | ||||
|     return this.get('storage').fetchListing(parentDirPath).then(listing => { | ||||
|       let metaData = listing.findBy('name', documentName); | ||||
|       return metaData; | ||||
|     }).then(metaData => { | ||||
|       return { | ||||
|         documentMetaData: metaData, | ||||
|         // documentPublicURL: this.get()
 | ||||
|         currentDirPath: parentDirPath, | ||||
|       }; | ||||
|     }); | ||||
|   }, | ||||
| 
 | ||||
|   setupController(controller, model) { | ||||
|     this._super(controller, model); | ||||
| 
 | ||||
|     if (isEmpty(this.get('storage.categories')) && this.get('storage.connected')) { | ||||
|       this.get('storage').fetchRootListing(); | ||||
|     } | ||||
| 
 | ||||
|     if (isPresent(model)) { | ||||
|       controller.set('currentDirPath', model.currentDirPath); | ||||
|     } | ||||
| 
 | ||||
|     controller.set('documentShowEditor', false); | ||||
|   } | ||||
| 
 | ||||
| }); | ||||
| @ -1,132 +0,0 @@ | ||||
| import EmberObject from '@ember/object'; | ||||
| import Service from '@ember/service'; | ||||
| import { computed, observer } from '@ember/object'; | ||||
| import { isEmpty } from '@ember/utils'; | ||||
| import RemoteStorage from 'npm:remotestoragejs'; | ||||
| import Widget from 'npm:remotestorage-widget'; | ||||
| import simpleContentType from 'inspektor/utils/simple-content-type'; | ||||
| 
 | ||||
| export default Service.extend({ | ||||
| 
 | ||||
|   rs: null, | ||||
|   widget: null, | ||||
|   connecting: true, | ||||
|   connected: false, | ||||
|   unauthorized: false, | ||||
|   userAddress: null, | ||||
|   disconnected: computed.not('connected'), | ||||
|   client: null, | ||||
|   rootListing: null, | ||||
| 
 | ||||
|   setup: function() { | ||||
|     const rs = new RemoteStorage({ | ||||
|       cache: false | ||||
|     }); | ||||
| 
 | ||||
|     rs.access.claim('*', 'rw'); | ||||
| 
 | ||||
|     // rs.setApiKeys({
 | ||||
|     //   dropbox: config.dropboxAppKey,
 | ||||
|     //   googledrive: config.gdriveClientId
 | ||||
|     // });
 | ||||
| 
 | ||||
|     const widget = new Widget(rs, { | ||||
|       skipInitial: true | ||||
|     }); | ||||
| 
 | ||||
|     // Attach widget to DOM
 | ||||
|     widget.attach(); | ||||
| 
 | ||||
|     rs.on('ready', () => { | ||||
|       console.debug('rs.on ready'); | ||||
|       // this.set('connecting', false);
 | ||||
|     }); | ||||
| 
 | ||||
|     rs.on('connected', () => { | ||||
|       console.debug('rs.on connected'); | ||||
|       this.set('connecting', false); | ||||
|       this.set('connected', true); | ||||
|       this.set('userAddress', this.get('rs').remote.userAddress); | ||||
|     }); | ||||
| 
 | ||||
|     rs.on('not-connected', () => { | ||||
|       console.debug('rs.on not-connected'); | ||||
|       this.set('connecting', false); | ||||
|       this.set('connected', false); | ||||
|     }); | ||||
| 
 | ||||
|     rs.on('disconnected', () => { | ||||
|       console.debug('rs.on disconnected'); | ||||
|       this.set('connecting', false); | ||||
|       this.set('connected', false); | ||||
|     }); | ||||
| 
 | ||||
|     rs.on('connecting', () => { | ||||
|       console.debug('rs.on connecting'); | ||||
|       this.set('connecting', true); | ||||
|       this.set('connected', false); | ||||
|     }); | ||||
| 
 | ||||
|     rs.on('authing', () => { | ||||
|       console.debug('rs.on authing'); | ||||
|       this.set('connecting', true); | ||||
|       this.set('connected', false); | ||||
|     }); | ||||
| 
 | ||||
|     this.set('rs', rs); | ||||
|     this.set('widget', widget); | ||||
|     this.set('client', rs.scope('/')); | ||||
|   }.on('init'), | ||||
| 
 | ||||
|   connectedChange: observer('connected', function() { | ||||
|     if (this.get('connected')) { | ||||
|       this.fetchRootListing(); | ||||
|     } else { | ||||
|       this.clearLocalData(); | ||||
|     } | ||||
|   }), | ||||
| 
 | ||||
|   clearLocalData() { | ||||
|     this.setProperties({ | ||||
|       userAddress: null, | ||||
|       rootListing: null | ||||
|     }); | ||||
|   }, | ||||
| 
 | ||||
|   fetchRootListing() { | ||||
|     this.fetchListing('').then(items => { | ||||
|       this.set('rootListing', items.sortBy('name')); | ||||
|     }); | ||||
|   }, | ||||
| 
 | ||||
|   fetchListing(path) { | ||||
|     let items = []; | ||||
| 
 | ||||
|     return this.get('client').getListing(path).then(listing => { | ||||
|       if (isEmpty(listing)) { return []; } | ||||
| 
 | ||||
|       Object.keys(listing).forEach(name => { | ||||
|         let item = listing[name]; | ||||
|         let type = item['Content-Type'] || 'folder'; | ||||
|         let isBinary = false; | ||||
|         if (type !== 'folder') { | ||||
|           isBinary = !!type.match(/charset=binary/); | ||||
|           type = simpleContentType(type); | ||||
|         } | ||||
| 
 | ||||
|         items.push(EmberObject.create({ | ||||
|           name: name, | ||||
|           type: type, | ||||
|           isBinary: isBinary, | ||||
|           isFolder: type === 'folder', | ||||
|           size: item['Content-Length'] || null, | ||||
|           path: path + name, | ||||
|           etag: item['ETag'] | ||||
|         })); | ||||
|       }); | ||||
| 
 | ||||
|       return items; | ||||
|     }); | ||||
|   } | ||||
| 
 | ||||
| }); | ||||
| @ -1,138 +0,0 @@ | ||||
| button { | ||||
|   font-family: Open Sans, sans-serif; | ||||
|   font-size: 1rem; | ||||
|   color: #fff; | ||||
|   background-color: $dark-blue; | ||||
|   border: 1px solid $dark-blue; | ||||
| 
 | ||||
|   &:hover, &:active { | ||||
|     background-color: lighten($dark-blue, 5%); | ||||
|   } | ||||
| 
 | ||||
|   &.delete { | ||||
|     background-color: transparent; | ||||
|     border-color: $dark-red; | ||||
|     color: $dark-red; | ||||
|     svg { path { fill: $dark-red; } | ||||
|     } | ||||
| 
 | ||||
|     &:hover { | ||||
|       background-color: $dark-red; | ||||
|       color: #fff; | ||||
|       svg { path { fill: #fff; } } | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   &.primary { | ||||
|     // main button | ||||
|   } | ||||
| 
 | ||||
|   &.secondary { | ||||
|     background-color: transparent; | ||||
|     color: $dark-blue; | ||||
| 
 | ||||
|     &:hover { | ||||
|       background-color: $dark-blue; | ||||
|       color: #fff; | ||||
|       svg { path { fill: #fff; } } | ||||
|     } | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| header { | ||||
| 
 | ||||
|   button, a.button { | ||||
|     display: inline-block; | ||||
|     padding: 0.4rem 0 0.3rem; | ||||
|     width: 3rem; | ||||
|     border: 1px solid $dark-grey-2; | ||||
|     border-radius: 0.2em; | ||||
|     background-color: #fff; | ||||
|     color: $dark-grey-2; | ||||
|     text-align: center; | ||||
|     text-transform: uppercase; | ||||
| 
 | ||||
|     svg { | ||||
|       height: 1rem; | ||||
|       path { fill: $dark-grey-2; } | ||||
|     } | ||||
| 
 | ||||
|     &:hover { | ||||
|       background-color: $dark-grey-2; | ||||
|       color: #fff; | ||||
| 
 | ||||
|       svg { | ||||
|         path { | ||||
|           fill: #fff; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
| 
 | ||||
|     &:disabled:not(.active), | ||||
|     &:disabled:not(.active):hover { | ||||
|       border-color: $dark-grey-3; | ||||
|       background-color: #fff; | ||||
|       color: $dark-grey-3; | ||||
| 
 | ||||
|       svg { | ||||
|         path { | ||||
|           fill: $dark-grey-3; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
| 
 | ||||
|     &.active { | ||||
|       border-color: lighten($dark-grey-2, 10%); | ||||
|       background-color: lighten($dark-grey-2, 10%); | ||||
|       color: lighten($dark-grey-2, 10%); | ||||
| 
 | ||||
|       svg { path { fill: #fff; } } | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   button + button, | ||||
|   button + .button, | ||||
|   .button + .button, | ||||
|   button + .button-group, | ||||
|   .button + .button-group, | ||||
|   .button-group + button, | ||||
|   .button-group + .button-group { | ||||
|     margin-left: 0.5rem; | ||||
|   } | ||||
| 
 | ||||
|   .button-group { | ||||
|     position: relative; | ||||
|     display: inline-flex; | ||||
|     flex-direction: row; | ||||
| 
 | ||||
|     button { | ||||
|       position: relative; | ||||
|       margin-right: 0; | ||||
|       flex: 0 1 auto; | ||||
| 
 | ||||
|       &:not(:last-child) { | ||||
|         border-top-right-radius: 0; | ||||
|         border-bottom-right-radius: 0; | ||||
|       } | ||||
|     } | ||||
| 
 | ||||
|     button + button { | ||||
|       margin-left: -1px; | ||||
|       border-top-left-radius: 0; | ||||
|       border-bottom-left-radius: 0; | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| main section.content { | ||||
|   button { | ||||
|     font-size: 0.86rem; | ||||
|     padding: 0.4rem 1rem; | ||||
|     border-radius: 3px; | ||||
|   } | ||||
| 
 | ||||
|   button + button { | ||||
|     margin-left: 0.5rem; | ||||
|   } | ||||
| } | ||||
| @ -1,47 +0,0 @@ | ||||
| $dark-grey-1: #2a3743; | ||||
| $dark-grey-2: #344453; | ||||
| $dark-grey-3: #aaa; | ||||
| $light-grey-1: #b5c3d1; | ||||
| $light-grey-2: #ececec; | ||||
| $dark-red: #8b0000; | ||||
| $dark-blue: #0067c7; | ||||
| 
 | ||||
| body { | ||||
|   background-color: #fff; | ||||
|   transition: background-color 0.2s linear; | ||||
| } | ||||
| 
 | ||||
| #app-container { | ||||
|   background-color: #fff; | ||||
| 
 | ||||
|   > aside { | ||||
|     background-color: $dark-grey-1; | ||||
|     color: $light-grey-1; | ||||
| 
 | ||||
|     a { | ||||
|       color: $light-grey-1; | ||||
|       text-decoration: none; | ||||
|       &:hover { | ||||
|         color: #fff; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   > main { | ||||
|     background-color: #fff; | ||||
| 
 | ||||
|     > header { | ||||
|       a:link, | ||||
|       a:visited { | ||||
|         color: $dark-grey-3; | ||||
|       } | ||||
|       a:hover { | ||||
|         color: $dark-grey-1; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   &.disconnected main { | ||||
|     background-color: $light-grey-2; | ||||
|   } | ||||
| } | ||||
| @ -1,128 +0,0 @@ | ||||
| * { | ||||
|   box-sizing: border-box; | ||||
| } | ||||
| 
 | ||||
| #remotestorage-widget { | ||||
|   display: none; | ||||
|   position: absolute; | ||||
|   top: 20%; | ||||
|   left: 50%; | ||||
|   margin-left: -200px; | ||||
|   z-index: 23; | ||||
| } | ||||
| 
 | ||||
| .connect #remotestorage-widget { | ||||
|   display: block; | ||||
| } | ||||
| 
 | ||||
| // .index #remotestorage-widget { | ||||
| //   position: fixed; | ||||
| //   top: 1rem; | ||||
| //   right: 3rem; | ||||
| // } | ||||
| 
 | ||||
| #app-container { | ||||
|   position: absolute; | ||||
|   top: 0; | ||||
|   left: 0; | ||||
|   bottom: 0; | ||||
|   right: 0; | ||||
|   overflow: hidden; | ||||
|   display: flex; | ||||
|   flex-direction: row; | ||||
|   justify-content: flex-start; | ||||
|   align-items: stretch; | ||||
| 
 | ||||
|   &.disconnected { | ||||
|     > aside { | ||||
|       flex: 0; | ||||
|       overflow: hidden; | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   &.connected { | ||||
|     > aside { | ||||
|       flex: 0 0 16rem; | ||||
|       overflow: auto; | ||||
|       padding: 2rem; | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   > aside { | ||||
|     transition: flex 0.2s ease-in; | ||||
| 
 | ||||
|     .account-info { | ||||
|       height: 5rem; | ||||
|     } | ||||
| 
 | ||||
|     nav { | ||||
|       margin-bottom: 3rem; | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   > main { | ||||
|     flex: 1; | ||||
|     overflow: auto; | ||||
|     padding: 3rem 4rem; | ||||
| 
 | ||||
|     > header { | ||||
|       height: 4rem; | ||||
|       width: 100%; | ||||
|       display: grid; | ||||
|       grid-template-columns: 1.618fr 3rem 1fr; | ||||
| 
 | ||||
|       // nav.breadcrumb-nav { | ||||
|       // } | ||||
| 
 | ||||
|       nav.actions { | ||||
|         grid-column-start: 3; | ||||
|         text-align: right; | ||||
|         margin-top: -0.4rem; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| .inspect-details { | ||||
|   width: 100%; | ||||
|   display: grid; | ||||
|   grid-template-columns: 1.618fr 3rem 1fr; | ||||
|   margin-bottom: 3rem; | ||||
|   transition: all 0.3s ease-out; | ||||
| 
 | ||||
|   &.hide-metadata { | ||||
|     grid-template-columns: 1.618fr 0 0; | ||||
|   } | ||||
| 
 | ||||
|   section { | ||||
|     border-top: 1px solid $light-grey-2; | ||||
|     padding: 1.5rem 1px; | ||||
| 
 | ||||
|     &.content { | ||||
|       overflow: hidden; | ||||
|     } | ||||
| 
 | ||||
|     &.meta { | ||||
|       grid-column-start: 3; | ||||
|       overflow: hidden; | ||||
| 
 | ||||
|       dl { | ||||
|         margin: 0; | ||||
| 
 | ||||
|         dt, dd { | ||||
|           display: block; | ||||
|         } | ||||
|         dt { | ||||
|           font-size: 0.76rem; | ||||
|           text-transform: uppercase; | ||||
|           letter-spacing: 0.05em; | ||||
|           color: $dark-grey-3; | ||||
|           margin-bottom: 0.4rem; | ||||
|         } | ||||
|         dd { | ||||
|           margin: 0 0 1.5rem; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
| @ -1,6 +0,0 @@ | ||||
| * { | ||||
|   -moz-outline: none; | ||||
|   outline: none; | ||||
| } | ||||
| :focus { outline:none; } | ||||
| ::-moz-focus-inner { border: 0; } | ||||
| @ -1,29 +0,0 @@ | ||||
| @import "bourbon"; | ||||
| @import "resets"; | ||||
| @import "colors"; | ||||
| @import "layout"; | ||||
| 
 | ||||
| html { | ||||
|   font-family: Open Sans, sans-serif; | ||||
|   font-size: 15px; | ||||
| } | ||||
| 
 | ||||
| body { | ||||
|   background-color: white; | ||||
|   font-size: 15px; | ||||
|   font-family: Open Sans, sans-serif; | ||||
|   color: $dark-grey-1; | ||||
|   margin: 0; | ||||
|   padding: 0; | ||||
| } | ||||
| 
 | ||||
| @import "buttons"; | ||||
| 
 | ||||
| @import "components/account-info"; | ||||
| @import "components/breadcrumb-nav"; | ||||
| @import "components/categories-nav"; | ||||
| @import "components/directory-listing"; | ||||
| @import "components/file-preview"; | ||||
| @import "components/item-icon"; | ||||
| 
 | ||||
| @import "vendor/json-tree-view"; | ||||
| @ -1,28 +0,0 @@ | ||||
| .account-info { | ||||
|   position: relative; | ||||
| 
 | ||||
|   .username { | ||||
|     font-size: 1.4rem; | ||||
|   } | ||||
| 
 | ||||
|   .host { | ||||
|     font-size: 0.8rem; | ||||
|     opacity: 0.7; | ||||
|   } | ||||
| 
 | ||||
|   .disconnect { | ||||
|     display: inline-block; | ||||
|     margin-left: 0.5rem; | ||||
|     font-size: 0.8rem; | ||||
|     opacity: 0; | ||||
|     transition: opacity 0.2s linear; | ||||
|   } | ||||
| 
 | ||||
|   &:hover { | ||||
|     .disconnect { | ||||
|       font-size: 0.8rem; | ||||
|       opacity: 1; | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
| } | ||||
| @ -1,22 +0,0 @@ | ||||
| .breadcrumb-nav { | ||||
| 
 | ||||
|   a { | ||||
|     &.active { | ||||
|       text-decoration: none; | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   .node { | ||||
|     display: inline-block; | ||||
|   } | ||||
| 
 | ||||
|   .node + .node { | ||||
|     margin-left: 0.5rem; | ||||
| 
 | ||||
|     &::before { | ||||
|       content: '›'; | ||||
|       padding-right: 0.6rem; | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
| } | ||||
| @ -1,15 +0,0 @@ | ||||
| #app-container { | ||||
|   > aside { | ||||
|     nav { | ||||
|       ul { | ||||
|         list-style: none; | ||||
|         margin: 0; | ||||
|         padding: 0; | ||||
|       } | ||||
|       a { | ||||
|         display: block; | ||||
|         padding: 0.2rem 0; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
| @ -1,60 +0,0 @@ | ||||
| .directory-listing { | ||||
| 
 | ||||
|   ul.listing { | ||||
|     display: block; | ||||
|     width: 100%; | ||||
|     margin: 0; | ||||
|     padding: 0; | ||||
|     margin-bottom: 6rem; | ||||
| 
 | ||||
|     li { | ||||
|       display: table; | ||||
|       width: 100%; | ||||
|       border-bottom: 1px solid $light-grey-2; | ||||
| 
 | ||||
|       &:first-of-type { | ||||
|         border-top: 1px solid $light-grey-2; | ||||
|       } | ||||
| 
 | ||||
|       &:hover { | ||||
|         span { | ||||
|           opacity: 0.7; | ||||
|           cursor: pointer; | ||||
|         } | ||||
|       } | ||||
| 
 | ||||
|       a { | ||||
|         display: table-row; | ||||
|         text-decoration: none; | ||||
|         color: $dark-grey-1; | ||||
| 
 | ||||
|         span { | ||||
|           display: table-cell; | ||||
|           padding: 1rem 1.5rem; | ||||
| 
 | ||||
|           &.icon { | ||||
|             width: 3%; | ||||
|             padding-left: 0; | ||||
|             padding-right: 0; | ||||
|             text-align: center; | ||||
|           } | ||||
|           &.name { | ||||
|             width: 60%; | ||||
|           } | ||||
|           &.size { | ||||
|             width: 10%; | ||||
|             white-space: nowrap; | ||||
|             color: $dark-grey-3; | ||||
|           } | ||||
|           &.type { | ||||
|             width: 27%; | ||||
|             white-space: nowrap; | ||||
|             color: $dark-grey-3; | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     } | ||||
| 
 | ||||
|   } | ||||
| 
 | ||||
| } | ||||
| @ -1,22 +0,0 @@ | ||||
| .file-preview { | ||||
| 
 | ||||
|   code { | ||||
|     overflow-wrap: break-word; | ||||
|     word-wrap: break-word; | ||||
|     word-break: break-all; | ||||
|     hyphens: none; | ||||
|   } | ||||
| 
 | ||||
|   img, audio, video { | ||||
|     max-width: 100%; | ||||
|   } | ||||
| 
 | ||||
|   #json-tree-view { | ||||
|     overflow: auto; | ||||
|   } | ||||
| 
 | ||||
|   .actions { | ||||
|     margin-top: 2rem; | ||||
|   } | ||||
| 
 | ||||
| } | ||||
| @ -1,6 +0,0 @@ | ||||
| ul.listing span.icon { | ||||
|   img { | ||||
|     height: 1.2rem; | ||||
|     vertical-align: middle; | ||||
|   } | ||||
| } | ||||
							
								
								
									
										149
									
								
								app/styles/vendor/_json-tree-view.scss
									
									
									
									
										vendored
									
									
								
							
							
						
						| @ -1,149 +0,0 @@ | ||||
| .jsonView{ | ||||
|     margin-left: 20px; | ||||
|     font-family: Consolas, "Lucida Console", Menlo, "dejavu sans mono", monospace; | ||||
|     font-size: 15px; | ||||
|     line-height: 15px; | ||||
|     padding: 2px; | ||||
|     cursor: default; | ||||
|     color: rgb(66, 66, 66); | ||||
|     white-space: nowrap; | ||||
|     -webkit-user-select: none; | ||||
| } | ||||
| 
 | ||||
| .jsonView>div{ | ||||
|     display: inline-block; | ||||
| } | ||||
| 
 | ||||
| .jsonView.hidden{ | ||||
|     display: none; | ||||
| } | ||||
| 
 | ||||
| .jsonView>.children, .jsonView.insert{ | ||||
|     display: block; | ||||
| } | ||||
| 
 | ||||
| .jsonView>.name{ | ||||
|     color: rgb(136, 19, 145); | ||||
| } | ||||
| 
 | ||||
| .jsonView>.separator:before{ | ||||
|     content: ":"; | ||||
| } | ||||
| 
 | ||||
| .jsonView>.separator{ | ||||
|     padding-right: 5px; | ||||
| } | ||||
| 
 | ||||
| .jsonView>.spacing{ | ||||
|     display:inline-block; | ||||
|     width:15px; | ||||
| } | ||||
| .jsonView>.spacing::before{ | ||||
|     content: '1'; | ||||
|     visibility:hidden; | ||||
| } | ||||
| 
 | ||||
| .jsonView>.value.null, .jsonView>.value.undefined{ | ||||
|     color: rgb(128, 128, 128); | ||||
| } | ||||
| 
 | ||||
| .jsonView>.value.boolean, .jsonView>.value.number{ | ||||
|     color: rgb(28, 0, 207); | ||||
| } | ||||
| 
 | ||||
| .jsonView>.value.string:not(.edit):before, .jsonView>.value.string:not(.edit):after{ | ||||
|     content: "\""; | ||||
| } | ||||
| 
 | ||||
| .jsonView>.value.string { | ||||
|     color: rgb(196, 26, 22); | ||||
| } | ||||
| 
 | ||||
| .jsonView>.name:hover, .jsonView>.value:hover{ | ||||
|     background-color: rgba(56, 121, 217, 0.1); | ||||
| } | ||||
| 
 | ||||
| .jsonView>.expand, .jsonView>.collapse{ | ||||
|     min-width: 20px; | ||||
|     margin-left: -20px; | ||||
|     cursor: pointer; | ||||
| } | ||||
| 
 | ||||
| .jsonView>.expand:before{ | ||||
|     content: '\25B6'; | ||||
| } | ||||
| 
 | ||||
| .jsonView>.collapse:before{ | ||||
|     content: '\25BC'; | ||||
| } | ||||
| 
 | ||||
| .jsonView>.edit{ | ||||
|     padding: 0px 5px 0px 5px; | ||||
|     white-space: nowrap; | ||||
|     overflow: hidden; | ||||
|     background-color: transparent; | ||||
| } | ||||
| 
 | ||||
| .jsonView>.edit br{ | ||||
|     display: none; | ||||
| } | ||||
| 
 | ||||
| .jsonView>.edit *{ | ||||
|     display: inline; | ||||
|     white-space: nowrap; | ||||
| } | ||||
| 
 | ||||
| .jsonView>.value.edit{ | ||||
|     color: rgb(0, 0, 0); | ||||
| } | ||||
| 
 | ||||
| .jsonView>.delete:before{ | ||||
|     content: '+'; | ||||
|     transform: rotate(45deg); | ||||
|     -webkit-transform: rotate(45deg); | ||||
|     -o-transform: rotate(45deg); | ||||
|     -ms-transform: rotate(45deg); | ||||
|     display: inline-block; | ||||
| } | ||||
| 
 | ||||
| .jsonView>.delete{ | ||||
|     opacity: 0; | ||||
|     display: inline; | ||||
|     padding: 3px; | ||||
|     cursor: pointer; | ||||
|     color: rgb(150, 150, 150); | ||||
| } | ||||
| 
 | ||||
| .jsonView>.item:hover~.delete{ | ||||
|     opacity: 1; | ||||
|     color: rgb(150, 150, 150); | ||||
| } | ||||
| .jsonView>.delete:hover{ | ||||
|     opacity: 1; | ||||
|     color: rgb(0, 0, 0); | ||||
|     background: rgb(220, 220, 220); | ||||
| } | ||||
| 
 | ||||
| .jsonView.readonly>.insert,.jsonView.readonly>.delete{ | ||||
|     display: none !important; | ||||
| } | ||||
| .jsonView>.insert:before{ | ||||
|     content: '+'; | ||||
| } | ||||
| 
 | ||||
| .jsonView>.insert{ | ||||
|     display: none; | ||||
|     color: rgb(150, 150, 150); | ||||
|     cursor: pointer; | ||||
| } | ||||
| 
 | ||||
| .jsonView.expanded>.insert, .jsonView.expanded>.insert{ | ||||
|     display: inline-block; | ||||
|     margin-left: 20px; | ||||
|     padding: 3px; | ||||
| } | ||||
| 
 | ||||
| .jsonView>.insert:hover{ | ||||
|     color: rgb(0, 0, 0); | ||||
|     background: rgb(220, 220, 220); | ||||
| } | ||||
| @ -1,11 +0,0 @@ | ||||
| <div id="app-container" class={{connectedClass}}> | ||||
|   <aside> | ||||
|     {{#if connected}} | ||||
|       {{account-info userAddress=userAddress}} | ||||
|       {{categories-nav categories=categories}} | ||||
|     {{/if}} | ||||
|   </aside> | ||||
|   <main> | ||||
|     {{outlet}} | ||||
|   </main> | ||||
| </div> | ||||
| @ -1 +0,0 @@ | ||||
| {{outlet}} | ||||
| @ -1 +0,0 @@ | ||||
| <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M296 99.5l148.5 148c4.7 4.7 4.7 12.3 0 17L296 412.5c-4.7 4.7-12.3 4.7-17 0l-7.1-7.1c-4.7-4.7-4.7-12.3 0-17l116-115.4H76c-6.6 0-12-5.4-12-12v-10c0-6.6 5.4-12 12-12h311.9L272 123.6c-4.7-4.7-4.7-12.3 0-17l7.1-7.1c4.6-4.7 12.2-4.7 16.9 0zM12 448h8c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12h-8C5.4 64 0 69.4 0 76v360c0 6.6 5.4 12 12 12z"/></svg> | ||||
| Before Width: | Height: | Size: 410 B | 
| @ -1 +0,0 @@ | ||||
| <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M152 412.5L3.5 264.5c-4.7-4.7-4.7-12.3 0-17L152 99.5c4.7-4.7 12.3-4.7 17 0l7.1 7.1c4.7 4.7 4.7 12.3 0 17L60.1 239H372c6.6 0 12 5.4 12 12v10c0 6.6-5.4 12-12 12H60.1L176 388.4c4.7 4.7 4.7 12.3 0 17l-7.1 7.1c-4.6 4.7-12.2 4.7-16.9 0zM436 64h-8c-6.6 0-12 5.4-12 12v360c0 6.6 5.4 12 12 12h8c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12z"/></svg> | ||||
| Before Width: | Height: | Size: 407 B | 
| @ -1 +0,0 @@ | ||||
| <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M216 412.5l-148.5-148c-4.7-4.7-4.7-12.3 0-17L216 99.5c4.7-4.7 12.3-4.7 17 0l7.1 7.1c4.7 4.7 4.7 12.3 0 17L124.1 239H436c6.6 0 12 5.4 12 12v10c0 6.6-5.4 12-12 12H124.1L240 388.4c4.7 4.7 4.7 12.3 0 17l-7.1 7.1c-4.6 4.7-12.2 4.7-16.9 0zM12 448h8c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12h-8C5.4 64 0 69.4 0 76v360c0 6.6 5.4 12 12 12z"/></svg> | ||||
| Before Width: | Height: | Size: 409 B | 
| @ -1 +0,0 @@ | ||||
| <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M215 99.5l-7.1 7.1c-4.7 4.7-4.7 12.3 0 17l116 115.4H12c-6.6 0-12 5.4-12 12v10c0 6.6 5.4 12 12 12h311.9L208 388.4c-4.7 4.7-4.7 12.3 0 17l7.1 7.1c4.7 4.7 12.3 4.7 17 0l148.5-148c4.7-4.7 4.7-12.3 0-17L232 99.5c-4.7-4.7-12.3-4.7-17 0zM448 76v360c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12V76c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12z"/></svg> | ||||
| Before Width: | Height: | Size: 407 B | 
| @ -1 +0,0 @@ | ||||
| <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M464 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM32 80c0-8.8 7.2-16 16-16h48v64H32V80zm448 352c0 8.8-7.2 16-16 16H48c-8.8 0-16-7.2-16-16V160h448v272zm0-304H128V64h336c8.8 0 16 7.2 16 16v48z"/></svg> | ||||
| Before Width: | Height: | Size: 326 B | 
| @ -1 +0,0 @@ | ||||
| <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M228.5 511.8l-25-7.1c-3.2-.9-5-4.2-4.1-7.4L340.1 4.4c.9-3.2 4.2-5 7.4-4.1l25 7.1c3.2.9 5 4.2 4.1 7.4L235.9 507.6c-.9 3.2-4.3 5.1-7.4 4.2zm-75.6-125.3l18.5-20.9c1.9-2.1 1.6-5.3-.5-7.1L49.9 256l121-102.5c2.1-1.8 2.4-5 .5-7.1l-18.5-20.9c-1.8-2.1-5-2.3-7.1-.4L1.7 252.3c-2.3 2-2.3 5.5 0 7.5L145.8 387c2.1 1.8 5.3 1.6 7.1-.5zm277.3.4l144.1-127.2c2.3-2 2.3-5.5 0-7.5L430.2 125.1c-2.1-1.8-5.2-1.6-7.1.4l-18.5 20.9c-1.9 2.1-1.6 5.3.5 7.1l121 102.5-121 102.5c-2.1 1.8-2.4 5-.5 7.1l18.5 20.9c1.8 2.1 5 2.3 7.1.4z"/></svg> | ||||
| Before Width: | Height: | Size: 582 B | 
| @ -1 +0,0 @@ | ||||
| <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M417.8 315.5l20-20c3.8-3.8 10.2-1.1 10.2 4.2V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h292.3c5.3 0 8 6.5 4.2 10.2l-20 20c-1.1 1.1-2.7 1.8-4.2 1.8H48c-8.8 0-16 7.2-16 16v352c0 8.8 7.2 16 16 16h352c8.8 0 16-7.2 16-16V319.7c0-1.6.6-3.1 1.8-4.2zm145.9-191.2L251.2 436.8l-99.9 11.1c-13.4 1.5-24.7-9.8-23.2-23.2l11.1-99.9L451.7 12.3c16.4-16.4 43-16.4 59.4 0l52.6 52.6c16.4 16.4 16.4 43 0 59.4zm-93.6 48.4L403.4 106 169.8 339.5l-8.3 75.1 75.1-8.3 233.5-233.6zm71-85.2l-52.6-52.6c-3.8-3.8-10.2-4-14.1 0L426 83.3l66.7 66.7 48.4-48.4c3.9-3.8 3.9-10.2 0-14.1z"/></svg> | ||||
| Before Width: | Height: | Size: 661 B | 
| @ -1 +0,0 @@ | ||||
| <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M569.354 231.631C512.969 135.948 407.808 72 288 72 168.14 72 63.004 135.994 6.646 231.63a47.999 47.999 0 0 0 0 48.739C63.032 376.053 168.192 440 288 440c119.86 0 224.996-63.994 281.354-159.631a48.002 48.002 0 0 0 0-48.738zM416 228c0 68.483-57.308 124-128 124s-128-55.517-128-124 57.308-124 128-124 128 55.517 128 124zm125.784 36.123C489.837 352.277 393.865 408 288 408c-106.291 0-202.061-56.105-253.784-143.876a16.006 16.006 0 0 1 0-16.247c29.072-49.333 73.341-90.435 127.66-115.887C140.845 158.191 128 191.568 128 228c0 85.818 71.221 156 160 156 88.77 0 160-70.178 160-156 0-36.411-12.833-69.794-33.875-96.01 53.76 25.189 98.274 66.021 127.66 115.887a16.006 16.006 0 0 1-.001 16.246zM224 224c0-10.897 2.727-21.156 7.53-30.137v.02c0 14.554 11.799 26.353 26.353 26.353 14.554 0 26.353-11.799 26.353-26.353s-11.799-26.353-26.353-26.353h-.02c8.981-4.803 19.24-7.53 30.137-7.53 35.346 0 64 28.654 64 64s-28.654 64-64 64-64-28.654-64-64z"/></svg> | ||||
| Before Width: | Height: | Size: 1012 B | 
| @ -1 +0,0 @@ | ||||
| <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M506 114H134a6 6 0 0 1-6-6V84a6 6 0 0 1 6-6h372a6 6 0 0 1 6 6v24a6 6 0 0 1-6 6zm6 154v-24a6 6 0 0 0-6-6H134a6 6 0 0 0-6 6v24a6 6 0 0 0 6 6h372a6 6 0 0 0 6-6zm0 160v-24a6 6 0 0 0-6-6H134a6 6 0 0 0-6 6v24a6 6 0 0 0 6 6h372a6 6 0 0 0 6-6zM84 120V72c0-6.627-5.373-12-12-12H24c-6.627 0-12 5.373-12 12v48c0 6.627 5.373 12 12 12h48c6.627 0 12-5.373 12-12zm0 160v-48c0-6.627-5.373-12-12-12H24c-6.627 0-12 5.373-12 12v48c0 6.627 5.373 12 12 12h48c6.627 0 12-5.373 12-12zm0 160v-48c0-6.627-5.373-12-12-12H24c-6.627 0-12 5.373-12 12v48c0 6.627 5.373 12 12 12h48c6.627 0 12-5.373 12-12z"/></svg> | ||||
| Before Width: | Height: | Size: 654 B | 
| @ -1 +0,0 @@ | ||||
| <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M564.907 196.35L388.91 12.366C364.216-13.45 320 3.746 320 40.016v88.154C154.548 130.155 0 160.103 0 331.19c0 94.98 55.84 150.231 89.13 174.571 24.233 17.722 58.021-4.992 49.68-34.51C100.937 336.887 165.575 321.972 320 320.16V408c0 36.239 44.19 53.494 68.91 27.65l175.998-184c14.79-15.47 14.79-39.83-.001-55.3zm-23.127 33.18l-176 184c-4.933 5.16-13.78 1.73-13.78-5.53V288c-171.396 0-295.313 9.707-243.98 191.7C72 453.36 32 405.59 32 331.19 32 171.18 194.886 160 352 160V40c0-7.262 8.851-10.69 13.78-5.53l176 184a7.978 7.978 0 0 1 0 11.06z"/></svg> | ||||
| Before Width: | Height: | Size: 617 B | 
| @ -1 +0,0 @@ | ||||
| <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M616 320h-72v-48c0-26.468-21.532-48-48-48H336v-32h56c13.255 0 24-10.745 24-24V24c0-13.255-10.745-24-24-24H248c-13.255 0-24 10.745-24 24v144c0 13.255 10.745 24 24 24h56v32H144c-26.467 0-48 21.532-48 48v48H24c-13.255 0-24 10.745-24 24v144c0 13.255 10.745 24 24 24h144c13.255 0 24-10.745 24-24V344c0-13.255-10.745-24-24-24h-40v-48c0-8.822 7.178-16 16-16h160v64h-56c-13.255 0-24 10.745-24 24v144c0 13.255 10.745 24 24 24h144c13.255 0 24-10.745 24-24V344c0-13.255-10.745-24-24-24h-56v-64h160c8.822 0 16 7.178 16 16v48h-40c-13.255 0-24 10.745-24 24v144c0 13.255 10.745 24 24 24h144c13.255 0 24-10.745 24-24V344c0-13.255-10.745-24-24-24zm-456 32v128H32V352h128zm224 0v128H256V352h128zM256 160V32h128v128H256zm352 320H480V352h128v128z"/></svg> | ||||
| Before Width: | Height: | Size: 806 B | 
| @ -1 +0,0 @@ | ||||
| <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M336 64l-33.6-44.8C293.3 7.1 279.1 0 264 0h-80c-15.1 0-29.3 7.1-38.4 19.2L112 64H24C10.7 64 0 74.7 0 88v2c0 3.3 2.7 6 6 6h26v368c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V96h26c3.3 0 6-2.7 6-6v-2c0-13.3-10.7-24-24-24h-88zM184 32h80c5 0 9.8 2.4 12.8 6.4L296 64H152l19.2-25.6c3-4 7.8-6.4 12.8-6.4zm200 432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V96h320v368zm-176-44V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12zm-80 0V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12zm160 0V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12z"/></svg> | ||||
| Before Width: | Height: | Size: 734 B | 
| @ -1,13 +0,0 @@ | ||||
| <header> | ||||
|   {{breadcrumb-nav currentDirPath=currentDirPath}} | ||||
|   <nav class="actions"> | ||||
|     {{#if currentListingContainsDocuments}} | ||||
|     <button class="delete-all" title="Delete documents/files" | ||||
|             {{action "deleteDocuments"}}>{{partial 'icons/trash'}}</button> | ||||
|     {{/if}} | ||||
|   </nav> | ||||
| </header> | ||||
| 
 | ||||
| {{#if currentListing}} | ||||
|   {{directory-listing items=currentListing}} | ||||
| {{/if}} | ||||
| @ -1,81 +0,0 @@ | ||||
| <header> | ||||
|   {{breadcrumb-nav currentDirPath=currentDirPath}} | ||||
|   <nav class="actions"> | ||||
|     {{#if metadataHidden}} | ||||
|       <button {{action "toggleMetadata"}} | ||||
|               title="Show metadata"> | ||||
|         {{partial "icons/arrow-from-right"}} | ||||
|       </button> | ||||
|     {{else}} | ||||
|       <button {{action "toggleMetadata"}} | ||||
|               title="Hide metadata"> | ||||
|         {{partial "icons/arrow-to-right"}} | ||||
|       </button> | ||||
|     {{/if}} | ||||
|     {{#if publicItemURL}} | ||||
|       <a class="button" href={{publicItemURL}} target="_blank" | ||||
|          title="Open document in new tab"> | ||||
|           {{partial "icons/share"}} | ||||
|       </a> | ||||
|     {{/if}} | ||||
|     {{#if documentIsJSON}} | ||||
|       <div class="button-group json-view"> | ||||
|         <button disabled={{jsonShowTree}} | ||||
|                 class="{{if jsonShowTree "active"}}" | ||||
|                 title="Tree view" | ||||
|                 {{action "showJsonTree"}}> | ||||
|           {{partial "icons/list"}} | ||||
|         </button> | ||||
|         <button disabled={{jsonShowSource}} | ||||
|                 class="{{if jsonShowSource "active"}}" | ||||
|                 title="Show source" | ||||
|                 {{action "showJsonSource"}}> | ||||
|           {{partial "icons/code"}} | ||||
|         </button> | ||||
|       </div> | ||||
|     {{/if}} | ||||
|     {{#if documentIsEditable}} | ||||
|       <div class="button-group editable"> | ||||
|         <button disabled={{documentHideEditor}} | ||||
|                 class="{{if documentHideEditor "active"}}" | ||||
|                 title="{{if documentHideEditor "Cancel editing"}}" | ||||
|                 {{action "cancelEditor"}}> | ||||
|           {{partial "icons/eye"}} | ||||
|         </button> | ||||
|         <button disabled={{documentShowEditor}} | ||||
|                 class="{{if documentShowEditor "active"}}" | ||||
|                 {{action "showEditor"}}> | ||||
|           {{partial "icons/edit"}} | ||||
|         </button> | ||||
|       </div> | ||||
|     {{/if}} | ||||
|     <button class="delete" title="Delete" | ||||
|             {{action "deleteItem"}}>{{partial "icons/trash"}}</button> | ||||
|   </nav> | ||||
| </header> | ||||
| 
 | ||||
| <div class="inspect-details {{if metadataHidden "hide-metadata"}}"> | ||||
|   <section class="content"> | ||||
|     {{file-preview metaData=model.documentMetaData | ||||
|                    isJSON=documentIsJSON | ||||
|                    isEditable=documentIsEditableHide | ||||
|                    showEditor=documentShowEditor | ||||
|                    jsonShowTree=jsonShowTree | ||||
|                    jsonShowSource=jsonShowSource}} | ||||
|   </section> | ||||
| 
 | ||||
|   {{#unless metadataHidden}} | ||||
|     <section class="meta"> | ||||
|       <dl> | ||||
|         <dt>Name</dt> | ||||
|         <dd>{{model.documentMetaData.name}}</dd> | ||||
|         <dt>Content type</dt> | ||||
|         <dd>{{model.documentMetaData.type}}</dd> | ||||
|         <dt>Size</dt> | ||||
|         <dd>{{human-file-size model.documentMetaData.size}}</dd> | ||||
|         <dt>Revision (ETag)</dt> | ||||
|         <dd>{{model.documentMetaData.etag}}</dd> | ||||
|       </dl> | ||||
|     </section> | ||||
|   {{/unless}} | ||||
| </div> | ||||
| @ -1,3 +0,0 @@ | ||||
| export default function simpleContentType(str) { | ||||
|   return str.replace(/;.*$/, ''); | ||||
| } | ||||
							
								
								
									
										84
									
								
								assets/inspektor-061c6be54372dec4115f25790a863a0e.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,84 @@ | ||||
| "use strict" | ||||
| define("inspektor/app",["exports","inspektor/resolver","ember-load-initializers","inspektor/config/environment"],function(e,t,n,r){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var i=Ember.Application.extend({modulePrefix:r.default.modulePrefix,podModulePrefix:r.default.podModulePrefix,Resolver:t.default});(0,n.default)(i,r.default.modulePrefix),e.default=i}),define("inspektor/components/account-info/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component,n=Ember.computed | ||||
| e.default=t.extend({classNames:["account-info"],userAddress:null,username:n("userAddress",function(){return this.get("userAddress").split("@")[0]}),host:n("userAddress",function(){return"@"+this.get("userAddress").split("@")[1]})})}),define("inspektor/components/account-info/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"rn4KIRZr",block:'{"symbols":[],"statements":[[6,"span"],[9,"class","username"],[7],[1,[18,"username"],false],[8],[0,"\\n"],[6,"br"],[7],[8],[6,"span"],[9,"class","host"],[7],[1,[18,"host"],false],[8],[0,"\\n\\n"],[4,"link-to",["disconnect"],[["class"],["disconnect"]],{"statements":[[0,"disconnect"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/account-info/template.hbs"}})}),define("inspektor/components/breadcrumb-nav/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component,n=Ember.Object,r=Ember.isEmpty | ||||
| e.default=t.extend({tagName:"nav",classNames:["breadcrumb-nav"],currentDirPath:null,linkItems:function(){var e=this.get("currentDirPath") | ||||
| if(r(e))return[] | ||||
| var t=[] | ||||
| return e.split("/").reject(function(e){return r(e)}).forEach(function(r){var i=e.match("(.*"+r+")/")[0] | ||||
| t.pushObject(n.create({name:r,path:i}))}),t}.property("currentDirPath")})}),define("inspektor/components/breadcrumb-nav/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"j3noKP+7",block:'{"symbols":["item"],"statements":[[6,"span"],[9,"class","node"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],["/"]]]],null,{"statements":[[0,"Home"]],"parameters":[]},null],[8],[0,"\\n"],[4,"each",[[20,["linkItems"]]],null,{"statements":[[6,"span"],[9,"class","node"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[1,[19,1,["name"]],false]],"parameters":[]},null],[8],[0,"\\n"]],"parameters":[1]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/breadcrumb-nav/template.hbs"}})}),define("inspektor/components/categories-nav/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component | ||||
| e.default=t.extend({categories:null})}),define("inspektor/components/categories-nav/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"4FB0addV",block:'{"symbols":["category"],"statements":[[4,"if",[[20,["categories"]]],null,{"statements":[[0,"  "],[6,"nav"],[7],[0,"\\n    "],[6,"ul"],[7],[0,"\\n"],[4,"each",[[20,["categories"]]],null,{"statements":[[0,"      "],[6,"li"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[1,[19,1,["name"]],false]],"parameters":[]},null],[8],[0,"\\n"]],"parameters":[1]},null],[0,"    "],[8],[0,"\\n  "],[8],[0,"\\n"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/categories-nav/template.hbs"}})}),define("inspektor/components/directory-listing/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component | ||||
| e.default=t.extend({classNames:["directory-listing"],items:null,itemsSorted:function(){var e=this.get("items") | ||||
| return e.reject(function(e){return"folder"!==e.type}).concat(e.reject(function(e){return"folder"===e.type}))}.property("items")})}),define("inspektor/components/directory-listing/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"K4sJaSiM",block:'{"symbols":["item"],"statements":[[6,"ul"],[9,"class","listing"],[7],[0,"\\n"],[4,"each",[[20,["itemsSorted"]]],null,{"statements":[[0,"  "],[6,"li"],[7],[0,"\\n"],[4,"if",[[19,1,["isFolder"]]],null,{"statements":[[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[0,"        "],[6,"span"],[9,"class","icon"],[7],[1,[25,"item-icon",null,[["type"],[[19,1,["type"]]]]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","name"],[7],[1,[19,1,["name"]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","size"],[7],[8],[0,"\\n        "],[6,"span"],[9,"class","type"],[7],[1,[19,1,["type"]],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]},{"statements":[[0,"      "],[2," TODO link to item "],[0,"\\n"],[4,"link-to",["inspect",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[0,"        "],[6,"span"],[9,"class","icon"],[7],[1,[25,"item-icon",null,[["type"],[[19,1,["type"]]]]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","name"],[7],[1,[19,1,["name"]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","size"],[7],[1,[25,"human-file-size",[[19,1,["size"]]],null],false],[8],[0,"\\n        "],[6,"span"],[9,"class","type"],[7],[1,[19,1,["type"]],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]}],[0,"  "],[8],[0,"\\n"]],"parameters":[1]},null],[8]],"hasEval":false}',meta:{moduleName:"inspektor/components/directory-listing/template.hbs"}})}),define("inspektor/components/file-preview/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component,n=Ember.computed.alias | ||||
| e.default=t.extend({storage:null,classNames:["file-preview"],fileLoaded:!1,fileContent:null,objectURL:null,metaData:null,type:n("metaData.type"),isBinary:n("metaData.isBinary"),isImage:function(){return this.get("type").match(/^image\/.+$/)}.property("type"),isText:function(){return!this.get("isBinary")}.property("isBinary"),loadFile:function(){var e=this,t=this.get("metaData.path") | ||||
| this.get("storage.client").getFile(t).then(function(t){if(e.get("isImage")){var n=new window.Uint8Array(t.data),r=new window.Blob([n],{type:t.contentType}) | ||||
| e.set("objectURL",window.URL.createObjectURL(r))}else e.set("fileContent",t.data) | ||||
| e.set("fileLoaded",!0)})}.on("init")})}),define("inspektor/components/file-preview/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"S7eRlRkE",block:'{"symbols":[],"statements":[[4,"if",[[20,["fileLoaded"]]],null,{"statements":[[4,"if",[[20,["isBinary"]]],null,{"statements":[[4,"if",[[20,["isImage"]]],null,{"statements":[[0,"      "],[6,"img"],[10,"src",[18,"objectURL"],null],[10,"alt",[20,["metaData","name"]],null],[7],[8],[0,"\\n"]],"parameters":[]},{"statements":[[0,"      "],[6,"p"],[7],[0,"No preview available for this content type."],[8],[0,"\\n"]],"parameters":[]}]],"parameters":[]},null],[0,"\\n"],[4,"if",[[20,["isText"]]],null,{"statements":[[0,"    "],[6,"code"],[7],[1,[18,"fileContent"],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/file-preview/template.hbs"}})}),define("inspektor/components/item-icon/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component | ||||
| e.default=t.extend({tagName:"img",classNames:["item-icon"],attributeBindings:["src:src"],type:null,isFolder:function(){return"folder"===this.get("type")}.property("type"),src:function(){var e=this.get("type") | ||||
| return"/img/file-icons/"+(this.get("isFolder")?"folder.svg":e.match(/json/i)?"code-curly.svg":"file.svg")}.property()})}),define("inspektor/components/item-icon/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"0RA2e2SD",block:'{"symbols":[],"statements":[],"hasEval":false}',meta:{moduleName:"inspektor/components/item-icon/template.hbs"}})}),define("inspektor/controllers/application",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Controller,n=Ember.Object,r=Ember.computed,i=Ember.observer,o=Ember.inject.service,s=Ember.computed.alias,a=Ember.isEmpty | ||||
| e.default=t.extend({storage:o(),connecting:s("storage.connecting"),connected:s("storage.connected"),userAddress:s("storage.userAddress"),rootListing:s("storage.rootListing"),currentDirPath:null,connectedClass:r("connected",function(){return this.get("connected")?"connected":"disconnected"}),categories:function(){var e=[],t=this.get("rootListing") | ||||
| return a(t)?e:(t.forEach(function(t){t.isFolder&&e.push(n.create({name:t.name.replace("/",""),type:t.type,path:t.name}))}),e)}.property("rootListing"),connectedChange:i("connected",function(){this.get("connected")||this.set("currentDirPath",null)})})}),define("inspektor/controllers/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Controller,n=Ember.inject.controller,r=Ember.inject.service,i=Ember.computed,o=Ember.observer,s=Ember.computed.alias,a=Ember.isPresent,l=Ember.isEmpty,c=Ember.RSVP.all | ||||
| e.default=t.extend({application:n(),storage:r(),connected:s("storage.connected"),rootListing:s("storage.rootListing"),currentDirPath:s("application.currentDirPath"),queryParams:["path"],currentListing:function(){return a(this.get("model.currentListing"))?this.get("model.currentListing").sortBy("name"):this.get("rootListing")}.property("rootListing.[]","model.[]"),documents:i("currentListing.[]",function(){return l(this.get("currentListing"))?[]:this.get("currentListing").reject(function(e){return"/"===e.path.substr(-1)})}),currentListingContainsDocuments:i("documents.[]",function(){return a(this.get("documents"))}),documentCount:i("documents.[]",function(){return a(this.get("documents"))?this.get("documents").length:0}),parentDir:i("currentDirPath",function(){var e=this.get("currentDirPath").split("/").reject(function(e){return l(e)}) | ||||
| return e.splice(0,e.length-1).join("/")+"/"}),connectedChange:o("connected",function(){this.get("connected")||(this.set("model",null),this.set("path",null))}),actions:{deleteDocuments:function(){var e=this,t="This will delete all "+this.get("documentCount")+" documents/files in the current directory. Are you sure?" | ||||
| if(!window.confirm(t))return!1 | ||||
| var n=this.get("storage.client"),r=this.get("documents").map(function(e){return console.debug("removing "+e.path),n.remove(e.path)}) | ||||
| c(r).then(function(){e.transitionToRoute("index",{queryParams:{path:e.get("parentDir")}})})}}})}),define("inspektor/controllers/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Controller,n=Ember.inject.controller,r=Ember.inject.service,i=Ember.computed.alias | ||||
| e.default=t.extend({application:n(),storage:r(),currentDirPath:i("application.currentDirPath"),queryParams:["path"],actions:{deleteItem:function(){var e=this | ||||
| window.confirm("Sure?")&&this.get("storage.client").remove(this.get("path")).then(function(){e.transitionToRoute("index",{queryParams:{path:e.get("currentDirPath")}})})}}})}),define("inspektor/helpers/app-version",["exports","inspektor/config/environment","ember-cli-app-version/utils/regexp"],function(e,t,n){function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{} | ||||
| return t.hideSha?i.match(n.versionRegExp)[0]:t.hideVersion?i.match(n.shaRegExp)[0]:i}Object.defineProperty(e,"__esModule",{value:!0}),e.appVersion=r | ||||
| var i=t.default.APP.version | ||||
| e.default=Ember.Helper.helper(r)}),define("inspektor/helpers/human-file-size",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Helper.helper | ||||
| e.default=t(function(e){if(e<1024)return e+" bytes" | ||||
| var t=-1 | ||||
| do{e/=1024,t++}while(e>1024) | ||||
| return String(Math.max(e,.1).toFixed(1)+" "+["KB","MB","GB","TB","PB","EB","ZB","YB"][t])})}),define("inspektor/helpers/pluralize",["exports","ember-inflector/lib/helpers/pluralize"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/helpers/singularize",["exports","ember-inflector/lib/helpers/singularize"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/initializers/app-version",["exports","ember-cli-app-version/initializer-factory","inspektor/config/environment"],function(e,t,n){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var r=n.default.APP,i=r.name,o=r.version | ||||
| e.default={name:"App Version",initialize:(0,t.default)(i,o)}}),define("inspektor/initializers/container-debug-adapter",["exports","ember-resolver/resolvers/classic/container-debug-adapter"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"container-debug-adapter",initialize:function(){var e=arguments[1]||arguments[0] | ||||
| e.register("container-debug-adapter:main",t.default),e.inject("container-debug-adapter:main","namespace","application:main")}}}),define("inspektor/initializers/data-adapter",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"data-adapter",before:"store",initialize:function(){}}}),define("inspektor/initializers/ember-data",["exports","ember-data/setup-container","ember-data"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"ember-data",initialize:t.default}}),define("inspektor/initializers/export-application-global",["exports","inspektor/config/environment"],function(e,t){function n(){var e=arguments[1]||arguments[0] | ||||
| if(!1!==t.default.exportApplicationGlobal){var n | ||||
| if("undefined"!=typeof window)n=window | ||||
| else if("undefined"!=typeof global)n=global | ||||
| else{if("undefined"==typeof self)return | ||||
| n=self}var r,i=t.default.exportApplicationGlobal | ||||
| r="string"==typeof i?i:Ember.String.classify(t.default.modulePrefix),n[r]||(n[r]=e,e.reopen({willDestroy:function(){this._super.apply(this,arguments),delete n[r]}}))}}Object.defineProperty(e,"__esModule",{value:!0}),e.initialize=n,e.default={name:"export-application-global",initialize:n}}),define("inspektor/initializers/injectStore",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"injectStore",before:"store",initialize:function(){}}}),define("inspektor/initializers/store",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"store",after:"ember-data",initialize:function(){}}}),define("inspektor/initializers/transforms",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"transforms",before:"store",initialize:function(){}}}),define("inspektor/instance-initializers/body-class",["exports","ember-body-class/instance-initializers/body-class"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"initialize",{enumerable:!0,get:function(){return t.initialize}})}),define("inspektor/instance-initializers/ember-data",["exports","ember-data/instance-initializers/initialize-store-service"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"ember-data",initialize:t.default}}) | ||||
| define("inspektor/resolver",["exports","ember-resolver"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/router",["exports","inspektor/config/environment"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var n=Ember.Router.extend({location:t.default.locationType,rootURL:t.default.rootURL}) | ||||
| n.map(function(){this.route("inspect"),this.route("connect"),this.route("disconnect")}),e.default=n}),define("inspektor/routes/application",["exports","ember-body-class/mixins/body-class"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var n=Ember.Route,r=Ember.inject.service | ||||
| e.default=n.extend(t.default,{storage:r(),beforeModel:function(){var e=this | ||||
| this.get("storage.rs").on("error",function(t){console.debug("rs.on error",t),"Unauthorized"===t.name?e.handleUnauthorized():"DiscoveryError"===t.name||alert("An unknown error occured. Please check the browser console for details.")})},handleUnauthorized:function(){this.get("storage.unauthorized")||(this.get("storage").setProperties({unauthorized:!0,connecting:!1,connected:!1}),this.transitionTo("connect"))}})}),define("inspektor/routes/connect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service,r=Ember.run.later,i=Ember.RSVP.Promise | ||||
| e.default=t.extend({storage:n(),beforeModel:function(){var e=this | ||||
| return this.waitForConnectionState().then(function(){e.get("storage.connected")&&e.transitionTo("index")})},waitForConnectionState:function(){var e=this | ||||
| return new i(function(t){function n(){e.get("storage.connecting")?r(n,20):t()}n()})}})}),define("inspektor/routes/disconnect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service | ||||
| e.default=t.extend({storage:n(),beforeModel:function(){this.get("storage.rs").disconnect(),this.transitionTo("connect")}})}),define("inspektor/routes/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service,r=Ember.isEmpty,i=Ember.isPresent,o=Ember.run.later,s=Ember.RSVP.hash,a=Ember.RSVP.Promise | ||||
| e.default=t.extend({storage:n(),queryParams:{path:{refreshModel:!0}},beforeModel:function(){var e=this | ||||
| return this.waitForConnectionState().then(function(){e.get("storage.disconnected")&&e.transitionTo("connect")})},model:function(e){var t=e.path | ||||
| return r(e.path)?null:("/"!==t.substr(-1)&&(t+="/"),s({currentListing:this.get("storage").fetchListing(t),currentDirPath:t}))},setupController:function(e,t){this._super(e,t),r(this.get("storage.categories"))&&this.get("storage.connected")&&this.get("storage").fetchRootListing(),i(t)&&(e.set("currentDirPath",t.currentDirPath),r(t.currentListing)&&this.transitionTo("index",{queryParams:{path:e.get("parentDir")}}))},waitForConnectionState:function(){var e=this | ||||
| return new a(function(t){function n(){e.get("storage.connecting")?o(n,20):t()}n()})}})}),define("inspektor/routes/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service,r=Ember.isEmpty,i=Ember.isPresent | ||||
| e.default=t.extend({storage:n(),queryParams:{path:{refreshModel:!0}},model:function(e){var t=e.path | ||||
| r(e.path),t.substr(-1) | ||||
| var n=t.match(/^(.*\/).+$/)[1],i=t.match(/^.*\/(.+)$/)[1] | ||||
| return this.get("storage").fetchListing(n).then(function(e){return e.findBy("name",i)}).then(function(e){return{documentMetaData:e,currentDirPath:n}})},setupController:function(e,t){this._super(e,t),r(this.get("storage.categories"))&&this.get("storage.connected")&&this.get("storage").fetchRootListing(),i(t)&&e.set("currentDirPath",t.currentDirPath)}})}),define("inspektor/services/ajax",["exports","ember-ajax/services/ajax"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("inspektor/services/storage",["exports","npm:remotestoragejs","npm:remotestorage-widget","inspektor/utils/simple-content-type"],function(e,t,n,r){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var i=Ember.Object,o=Ember.Service,s=Ember.computed,a=Ember.observer,l=Ember.isEmpty | ||||
| e.default=o.extend({rs:null,widget:null,connecting:!0,connected:!1,unauthorized:!1,userAddress:null,disconnected:s.not("connected"),client:null,rootListing:null,setup:function(){var e=this,r=new t.default({cache:!1}) | ||||
| r.access.claim("*","rw") | ||||
| var i=new n.default(r,{skipInitial:!0}) | ||||
| i.attach(),r.on("ready",function(){console.debug("rs.on ready")}),r.on("connected",function(){console.debug("rs.on connected"),e.set("connecting",!1),e.set("connected",!0),e.set("userAddress",e.get("rs").remote.userAddress)}),r.on("not-connected",function(){console.debug("rs.on not-connected"),e.set("connecting",!1),e.set("connected",!1)}),r.on("disconnected",function(){console.debug("rs.on disconnected"),e.set("connecting",!1),e.set("connected",!1)}),r.on("connecting",function(){console.debug("rs.on connecting"),e.set("connecting",!0),e.set("connected",!1)}),r.on("authing",function(){console.debug("rs.on authing"),e.set("connecting",!0),e.set("connected",!1)}),this.set("rs",r),this.set("widget",i),this.set("client",r.scope("/"))}.on("init"),connectedChange:a("connected",function(){this.get("connected")?this.fetchRootListing():this.clearLocalData()}),clearLocalData:function(){this.setProperties({userAddress:null,rootListing:null})},fetchRootListing:function(){var e=this | ||||
| this.fetchListing("").then(function(t){e.set("rootListing",t.sortBy("name"))})},fetchListing:function(e){var t=[] | ||||
| return this.get("client").getListing(e).then(function(n){return l(n)?[]:(Object.keys(n).forEach(function(o){var s=n[o],a=s["Content-Type"]||"folder",l=!1 | ||||
| "folder"!==a&&(l=!!a.match(/charset=binary/),a=(0,r.default)(a)),t.push(i.create({name:o,type:a,isBinary:l,isFolder:"folder"===a,size:s["Content-Length"]||null,path:e+o,etag:s.ETag}))}),t)})}})}),define("inspektor/templates/application",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"HpeupCPN",block:'{"symbols":[],"statements":[[6,"div"],[9,"id","app-container"],[10,"class",[18,"connectedClass"],null],[7],[0,"\\n  "],[6,"aside"],[7],[0,"\\n"],[4,"if",[[20,["connected"]]],null,{"statements":[[0,"      "],[1,[25,"account-info",null,[["userAddress"],[[20,["userAddress"]]]]],false],[0,"\\n      "],[1,[25,"categories-nav",null,[["categories"],[[20,["categories"]]]]],false],[0,"\\n"]],"parameters":[]},null],[0,"  "],[8],[0,"\\n  "],[6,"main"],[7],[0,"\\n    "],[1,[18,"outlet"],false],[0,"\\n  "],[8],[0,"\\n"],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/application.hbs"}})}),define("inspektor/templates/connect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"VjXcIYnG",block:'{"symbols":[],"statements":[],"hasEval":false}',meta:{moduleName:"inspektor/templates/connect.hbs"}})}),define("inspektor/templates/disconnect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"2ZbVbnJi",block:'{"symbols":[],"statements":[[1,[18,"outlet"],false]],"hasEval":false}',meta:{moduleName:"inspektor/templates/disconnect.hbs"}})}),define("inspektor/templates/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"niZ23686",block:'{"symbols":[],"statements":[[6,"header"],[7],[0,"\\n  "],[1,[25,"breadcrumb-nav",null,[["currentDirPath"],[[20,["currentDirPath"]]]]],false],[0,"\\n  "],[6,"nav"],[9,"class","actions"],[7],[0,"\\n"],[4,"if",[[20,["currentListingContainsDocuments"]]],null,{"statements":[[0,"    "],[6,"button"],[9,"class","delete-all"],[3,"action",[[19,0,[]],"deleteDocuments"]],[7],[0,"delete all"],[8],[0,"\\n"]],"parameters":[]},null],[0,"  "],[8],[0,"\\n"],[8],[0,"\\n\\n"],[4,"if",[[20,["currentListing"]]],null,{"statements":[[0,"  "],[1,[25,"directory-listing",null,[["items"],[[20,["currentListing"]]]]],false],[0,"\\n"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/templates/index.hbs"}})}),define("inspektor/templates/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"iEMqy3N5",block:'{"symbols":[],"statements":[[6,"header"],[7],[0,"\\n  "],[1,[25,"breadcrumb-nav",null,[["currentDirPath"],[[20,["currentDirPath"]]]]],false],[0,"\\n  "],[6,"nav"],[9,"class","actions"],[7],[0,"\\n    "],[6,"button"],[9,"class","delete"],[3,"action",[[19,0,[]],"deleteItem"]],[7],[0,"delete"],[8],[0,"\\n  "],[8],[0,"\\n"],[8],[0,"\\n\\n"],[6,"div"],[9,"class","inspect-details"],[7],[0,"\\n  "],[6,"section"],[9,"class","content"],[7],[0,"\\n    "],[1,[25,"file-preview",null,[["metaData","storage"],[[20,["model","documentMetaData"]],[20,["storage"]]]]],false],[0,"\\n  "],[8],[0,"\\n  "],[6,"section"],[9,"class","meta"],[7],[0,"\\n    "],[6,"dl"],[7],[0,"\\n      "],[6,"dt"],[7],[0,"Name"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","name"]],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Content type"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","type"]],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Size"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[25,"human-file-size",[[20,["model","documentMetaData","size"]]],null],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Revision (ETag)"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","etag"]],false],[8],[0,"\\n    "],[8],[0,"\\n  "],[8],[0,"\\n"],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/inspect.hbs"}})}),define("inspektor/utils/simple-content-type",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){return e.replace(/;.*$/,"")}}),define("inspektor/config/environment",[],function(){try{var e="inspektor/config/environment",t=document.querySelector('meta[name="'+e+'"]').getAttribute("content"),n={default:JSON.parse(unescape(t))} | ||||
| return Object.defineProperty(n,"__esModule",{value:!0}),n}catch(t){throw new Error('Could not read config from meta tag with name "'+e+'".')}}),runningTests||require("inspektor/app").default.create({name:"inspektor",version:"0.7.0+afa1552e"}) | ||||
							
								
								
									
										85
									
								
								assets/inspektor-0a5dda16dd3409c9f3a9f4c7f97af7ac.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										1
									
								
								assets/inspektor-0dedec1c6f910f2c87cd8281e8a9ae67.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										80
									
								
								assets/inspektor-120e68aa2d6f696394787a06cd3ed9aa.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,80 @@ | ||||
| "use strict" | ||||
| define("inspektor/app",["exports","inspektor/resolver","ember-load-initializers","inspektor/config/environment"],function(e,t,n,r){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var i=Ember.Application.extend({modulePrefix:r.default.modulePrefix,podModulePrefix:r.default.podModulePrefix,Resolver:t.default});(0,n.default)(i,r.default.modulePrefix),e.default=i}),define("inspektor/components/account-info/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component,n=Ember.computed | ||||
| e.default=t.extend({classNames:["account-info"],userAddress:null,username:n("userAddress",function(){return this.get("userAddress").split("@")[0]}),host:n("userAddress",function(){return"@"+this.get("userAddress").split("@")[1]})})}),define("inspektor/components/account-info/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"rn4KIRZr",block:'{"symbols":[],"statements":[[6,"span"],[9,"class","username"],[7],[1,[18,"username"],false],[8],[0,"\\n"],[6,"br"],[7],[8],[6,"span"],[9,"class","host"],[7],[1,[18,"host"],false],[8],[0,"\\n\\n"],[4,"link-to",["disconnect"],[["class"],["disconnect"]],{"statements":[[0,"disconnect"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/account-info/template.hbs"}})}),define("inspektor/components/breadcrumb-nav/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component,n=Ember.Object,r=Ember.isEmpty | ||||
| e.default=t.extend({tagName:"nav",classNames:["breadcrumb-nav"],currentDirPath:null,linkItems:function(){var e=this.get("currentDirPath") | ||||
| if(r(e))return[] | ||||
| var t=[] | ||||
| return e.split("/").reject(function(e){return r(e)}).forEach(function(r){var i=e.match("(.*"+r+")/")[0] | ||||
| t.pushObject(n.create({name:r,path:i}))}),t}.property("currentDirPath")})}),define("inspektor/components/breadcrumb-nav/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"j3noKP+7",block:'{"symbols":["item"],"statements":[[6,"span"],[9,"class","node"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],["/"]]]],null,{"statements":[[0,"Home"]],"parameters":[]},null],[8],[0,"\\n"],[4,"each",[[20,["linkItems"]]],null,{"statements":[[6,"span"],[9,"class","node"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[1,[19,1,["name"]],false]],"parameters":[]},null],[8],[0,"\\n"]],"parameters":[1]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/breadcrumb-nav/template.hbs"}})}),define("inspektor/components/categories-nav/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component | ||||
| e.default=t.extend({categories:null})}),define("inspektor/components/categories-nav/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"4FB0addV",block:'{"symbols":["category"],"statements":[[4,"if",[[20,["categories"]]],null,{"statements":[[0,"  "],[6,"nav"],[7],[0,"\\n    "],[6,"ul"],[7],[0,"\\n"],[4,"each",[[20,["categories"]]],null,{"statements":[[0,"      "],[6,"li"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[1,[19,1,["name"]],false]],"parameters":[]},null],[8],[0,"\\n"]],"parameters":[1]},null],[0,"    "],[8],[0,"\\n  "],[8],[0,"\\n"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/categories-nav/template.hbs"}})}),define("inspektor/components/directory-listing/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component | ||||
| e.default=t.extend({classNames:["directory-listing"],items:null,itemsSorted:function(){var e=this.get("items") | ||||
| return e.reject(function(e){return"folder"!==e.type}).concat(e.reject(function(e){return"folder"===e.type}))}.property("items")})}),define("inspektor/components/directory-listing/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"K4sJaSiM",block:'{"symbols":["item"],"statements":[[6,"ul"],[9,"class","listing"],[7],[0,"\\n"],[4,"each",[[20,["itemsSorted"]]],null,{"statements":[[0,"  "],[6,"li"],[7],[0,"\\n"],[4,"if",[[19,1,["isFolder"]]],null,{"statements":[[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[0,"        "],[6,"span"],[9,"class","icon"],[7],[1,[25,"item-icon",null,[["type"],[[19,1,["type"]]]]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","name"],[7],[1,[19,1,["name"]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","size"],[7],[8],[0,"\\n        "],[6,"span"],[9,"class","type"],[7],[1,[19,1,["type"]],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]},{"statements":[[0,"      "],[2," TODO link to item "],[0,"\\n"],[4,"link-to",["inspect",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[0,"        "],[6,"span"],[9,"class","icon"],[7],[1,[25,"item-icon",null,[["type"],[[19,1,["type"]]]]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","name"],[7],[1,[19,1,["name"]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","size"],[7],[1,[25,"human-file-size",[[19,1,["size"]]],null],false],[8],[0,"\\n        "],[6,"span"],[9,"class","type"],[7],[1,[19,1,["type"]],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]}],[0,"  "],[8],[0,"\\n"]],"parameters":[1]},null],[8]],"hasEval":false}',meta:{moduleName:"inspektor/components/directory-listing/template.hbs"}})}),define("inspektor/components/file-preview/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component,n=Ember.computed.alias | ||||
| e.default=t.extend({storage:null,classNames:["file-preview"],fileLoaded:!1,fileContent:null,objectURL:null,metaData:null,type:n("metaData.type"),isBinary:n("metaData.isBinary"),isImage:function(){return this.get("type").match(/^image\/.+$/)}.property("type"),isText:function(){return!this.get("isBinary")}.property("isBinary"),loadFile:function(){var e=this,t=this.get("metaData.path") | ||||
| this.get("storage.client").getFile(t).then(function(t){if(e.get("isImage")){var n=new window.Uint8Array(t.data),r=new window.Blob([n],{type:t.contentType}) | ||||
| e.set("objectURL",window.URL.createObjectURL(r))}else e.set("fileContent",t.data) | ||||
| e.set("fileLoaded",!0)})}.on("init")})}),define("inspektor/components/file-preview/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"S7eRlRkE",block:'{"symbols":[],"statements":[[4,"if",[[20,["fileLoaded"]]],null,{"statements":[[4,"if",[[20,["isBinary"]]],null,{"statements":[[4,"if",[[20,["isImage"]]],null,{"statements":[[0,"      "],[6,"img"],[10,"src",[18,"objectURL"],null],[10,"alt",[20,["metaData","name"]],null],[7],[8],[0,"\\n"]],"parameters":[]},{"statements":[[0,"      "],[6,"p"],[7],[0,"No preview available for this content type."],[8],[0,"\\n"]],"parameters":[]}]],"parameters":[]},null],[0,"\\n"],[4,"if",[[20,["isText"]]],null,{"statements":[[0,"    "],[6,"code"],[7],[1,[18,"fileContent"],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/file-preview/template.hbs"}})}),define("inspektor/components/item-icon/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component | ||||
| e.default=t.extend({tagName:"img",classNames:["item-icon"],attributeBindings:["src:src"],type:null,isFolder:function(){return"folder"===this.get("type")}.property("type"),src:function(){var e=this.get("type") | ||||
| return"/img/file-icons/"+(this.get("isFolder")?"folder.svg":e.match(/json/i)?"code-curly.svg":"file.svg")}.property()})}),define("inspektor/components/item-icon/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"0RA2e2SD",block:'{"symbols":[],"statements":[],"hasEval":false}',meta:{moduleName:"inspektor/components/item-icon/template.hbs"}})}),define("inspektor/controllers/application",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Controller,n=Ember.Object,r=Ember.computed,i=Ember.observer,o=Ember.inject.service,s=Ember.computed.alias,a=Ember.isEmpty | ||||
| e.default=t.extend({storage:o(),connecting:s("storage.connecting"),connected:s("storage.connected"),userAddress:s("storage.userAddress"),rootListing:s("storage.rootListing"),currentDirPath:null,connectedClass:r("connected",function(){return this.get("connected")?"connected":"disconnected"}),categories:function(){var e=[],t=this.get("rootListing") | ||||
| return a(t)?e:(t.forEach(function(t){t.isFolder&&e.push(n.create({name:t.name.replace("/",""),type:t.type,path:t.name}))}),e)}.property("rootListing"),connectedChange:i("connected",function(){this.get("connected")||this.set("currentDirPath",null)})})}),define("inspektor/controllers/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Controller,n=Ember.inject.controller,r=Ember.observer,i=Ember.inject.service,o=Ember.computed.alias,s=Ember.isPresent | ||||
| e.default=t.extend({application:n(),storage:i(),connected:o("storage.connected"),rootListing:o("storage.rootListing"),currentDirPath:o("application.currentDirPath"),queryParams:["path"],currentListing:function(){return s(this.get("model.currentListing"))?this.get("model.currentListing").sortBy("name"):this.get("rootListing")}.property("rootListing.[]","model.[]"),connectedChange:r("connected",function(){this.get("connected")||(this.set("model",null),this.set("path",null))})})}),define("inspektor/controllers/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Controller,n=Ember.inject.controller,r=Ember.inject.service,i=Ember.computed.alias | ||||
| e.default=t.extend({application:n(),storage:r(),currentDirPath:i("application.currentDirPath"),queryParams:["path"],actions:{deleteItem:function(){var e=this | ||||
| window.confirm("Sure?")&&this.get("storage.client").remove(this.get("path")).then(function(){e.transitionToRoute("index",{queryParams:{path:e.get("currentDirPath")}})})}}})}),define("inspektor/helpers/app-version",["exports","inspektor/config/environment","ember-cli-app-version/utils/regexp"],function(e,t,n){function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{} | ||||
| return t.hideSha?i.match(n.versionRegExp)[0]:t.hideVersion?i.match(n.shaRegExp)[0]:i}Object.defineProperty(e,"__esModule",{value:!0}),e.appVersion=r | ||||
| var i=t.default.APP.version | ||||
| e.default=Ember.Helper.helper(r)}),define("inspektor/helpers/human-file-size",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Helper.helper | ||||
| e.default=t(function(e){if(e<1024)return e+" bytes" | ||||
| var t=-1 | ||||
| do{e/=1024,t++}while(e>1024) | ||||
| return String(Math.max(e,.1).toFixed(1)+" "+["KB","MB","GB","TB","PB","EB","ZB","YB"][t])})}),define("inspektor/helpers/pluralize",["exports","ember-inflector/lib/helpers/pluralize"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/helpers/singularize",["exports","ember-inflector/lib/helpers/singularize"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/initializers/app-version",["exports","ember-cli-app-version/initializer-factory","inspektor/config/environment"],function(e,t,n){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var r=n.default.APP,i=r.name,o=r.version | ||||
| e.default={name:"App Version",initialize:(0,t.default)(i,o)}}),define("inspektor/initializers/container-debug-adapter",["exports","ember-resolver/resolvers/classic/container-debug-adapter"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"container-debug-adapter",initialize:function(){var e=arguments[1]||arguments[0] | ||||
| e.register("container-debug-adapter:main",t.default),e.inject("container-debug-adapter:main","namespace","application:main")}}}),define("inspektor/initializers/data-adapter",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"data-adapter",before:"store",initialize:function(){}}}),define("inspektor/initializers/ember-data",["exports","ember-data/setup-container","ember-data"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"ember-data",initialize:t.default}}),define("inspektor/initializers/export-application-global",["exports","inspektor/config/environment"],function(e,t){function n(){var e=arguments[1]||arguments[0] | ||||
| if(!1!==t.default.exportApplicationGlobal){var n | ||||
| if("undefined"!=typeof window)n=window | ||||
| else if("undefined"!=typeof global)n=global | ||||
| else{if("undefined"==typeof self)return | ||||
| n=self}var r,i=t.default.exportApplicationGlobal | ||||
| r="string"==typeof i?i:Ember.String.classify(t.default.modulePrefix),n[r]||(n[r]=e,e.reopen({willDestroy:function(){this._super.apply(this,arguments),delete n[r]}}))}}Object.defineProperty(e,"__esModule",{value:!0}),e.initialize=n,e.default={name:"export-application-global",initialize:n}}),define("inspektor/initializers/injectStore",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"injectStore",before:"store",initialize:function(){}}}),define("inspektor/initializers/store",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"store",after:"ember-data",initialize:function(){}}}),define("inspektor/initializers/transforms",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"transforms",before:"store",initialize:function(){}}}),define("inspektor/instance-initializers/body-class",["exports","ember-body-class/instance-initializers/body-class"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"initialize",{enumerable:!0,get:function(){return t.initialize}})}),define("inspektor/instance-initializers/ember-data",["exports","ember-data/instance-initializers/initialize-store-service"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"ember-data",initialize:t.default}}) | ||||
| define("inspektor/resolver",["exports","ember-resolver"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/router",["exports","inspektor/config/environment"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var n=Ember.Router.extend({location:t.default.locationType,rootURL:t.default.rootURL}) | ||||
| n.map(function(){this.route("inspect"),this.route("connect"),this.route("disconnect")}),e.default=n}),define("inspektor/routes/application",["exports","ember-body-class/mixins/body-class"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var n=Ember.Route,r=Ember.inject.service | ||||
| e.default=n.extend(t.default,{storage:r(),beforeModel:function(){var e=this | ||||
| this.get("storage.rs").on("error",function(t){console.debug("rs.on error",t),"Unauthorized"===t.name?e.handleUnauthorized():alert("An unknown error occured. Please check the browser console for details.")})},handleUnauthorized:function(){this.get("storage.unauthorized")||(this.get("storage").setProperties({unauthorized:!0,connecting:!1,connected:!1}),this.transitionTo("connect"))}})}),define("inspektor/routes/connect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service,r=Ember.run.later,i=Ember.RSVP.Promise | ||||
| e.default=t.extend({storage:n(),beforeModel:function(){var e=this | ||||
| return this.waitForConnectionState().then(function(){e.get("storage.connected")&&e.transitionTo("index")})},waitForConnectionState:function(){var e=this | ||||
| return new i(function(t){function n(){e.get("storage.connecting")?r(n,20):t()}n()})}})}),define("inspektor/routes/disconnect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service | ||||
| e.default=t.extend({storage:n(),beforeModel:function(){this.get("storage.rs").disconnect(),this.transitionTo("connect")}})}),define("inspektor/routes/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service,r=Ember.isEmpty,i=Ember.isPresent,o=Ember.run.later,s=Ember.RSVP.hash,a=Ember.RSVP.Promise | ||||
| e.default=t.extend({storage:n(),queryParams:{path:{refreshModel:!0}},beforeModel:function(){var e=this | ||||
| return this.waitForConnectionState().then(function(){e.get("storage.disconnected")&&e.transitionTo("connect")})},model:function(e){var t=e.path | ||||
| return r(e.path)?null:("/"!==t.substr(-1)&&(t+="/"),s({currentListing:this.get("storage").fetchListing(t),currentDirPath:t}))},setupController:function(e,t){this._super(e,t),r(this.get("storage.categories"))&&this.get("storage.connected")&&this.get("storage").fetchRootListing(),i(t)&&e.set("currentDirPath",t.currentDirPath)},waitForConnectionState:function(){var e=this | ||||
| return new a(function(t){function n(){e.get("storage.connecting")?o(n,20):t()}n()})}})}),define("inspektor/routes/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service,r=Ember.isEmpty,i=Ember.isPresent | ||||
| e.default=t.extend({storage:n(),queryParams:{path:{refreshModel:!0}},model:function(e){var t=e.path | ||||
| r(e.path),t.substr(-1) | ||||
| var n=t.match(/^(.*\/).+$/)[1],i=t.match(/^.*\/(.+)$/)[1] | ||||
| return this.get("storage").fetchListing(n).then(function(e){return e.findBy("name",i)}).then(function(e){return{documentMetaData:e,currentDirPath:n}})},setupController:function(e,t){this._super(e,t),r(this.get("storage.categories"))&&this.get("storage.connected")&&this.get("storage").fetchRootListing(),i(t)&&e.set("currentDirPath",t.currentDirPath)}})}),define("inspektor/services/ajax",["exports","ember-ajax/services/ajax"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("inspektor/services/storage",["exports","npm:remotestoragejs","npm:remotestorage-widget","inspektor/utils/simple-content-type"],function(e,t,n,r){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var i=Ember.Object,o=Ember.Service,s=Ember.computed,a=Ember.observer,l=Ember.isEmpty | ||||
| e.default=o.extend({rs:null,widget:null,connecting:!0,connected:!1,unauthorized:!1,userAddress:null,disconnected:s.not("connected"),client:null,rootListing:null,setup:function(){var e=this,r=new t.default({cache:!1}) | ||||
| r.access.claim("*","rw") | ||||
| var i=new n.default(r,{skipInitial:!0}) | ||||
| i.attach(),r.on("ready",function(){console.debug("rs.on ready")}),r.on("connected",function(){console.debug("rs.on connected"),e.set("connecting",!1),e.set("connected",!0),e.set("userAddress",e.get("rs").remote.userAddress)}),r.on("not-connected",function(){console.debug("rs.on not-connected"),e.set("connecting",!1),e.set("connected",!1)}),r.on("disconnected",function(){console.debug("rs.on disconnected"),e.set("connecting",!1),e.set("connected",!1)}),r.on("connecting",function(){console.debug("rs.on connecting"),e.set("connecting",!0),e.set("connected",!1)}),r.on("authing",function(){console.debug("rs.on authing"),e.set("connecting",!0),e.set("connected",!1)}),this.set("rs",r),this.set("widget",i),this.set("client",r.scope("/"))}.on("init"),connectedChange:a("connected",function(){this.get("connected")?this.fetchRootListing():this.clearLocalData()}),clearLocalData:function(){this.setProperties({userAddress:null,rootListing:null})},fetchRootListing:function(){var e=this | ||||
| this.fetchListing("").then(function(t){e.set("rootListing",t.sortBy("name"))})},fetchListing:function(e){var t=[] | ||||
| return this.get("client").getListing(e).then(function(n){return l(n)?[]:(Object.keys(n).forEach(function(o){var s=n[o],a=s["Content-Type"]||"folder",l=!1 | ||||
| "folder"!==a&&(l=!!a.match(/charset=binary/),a=(0,r.default)(a)),t.push(i.create({name:o,type:a,isBinary:l,isFolder:"folder"===a,size:s["Content-Length"]||null,path:e+o,etag:s.ETag}))}),t)})}})}),define("inspektor/templates/application",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"HpeupCPN",block:'{"symbols":[],"statements":[[6,"div"],[9,"id","app-container"],[10,"class",[18,"connectedClass"],null],[7],[0,"\\n  "],[6,"aside"],[7],[0,"\\n"],[4,"if",[[20,["connected"]]],null,{"statements":[[0,"      "],[1,[25,"account-info",null,[["userAddress"],[[20,["userAddress"]]]]],false],[0,"\\n      "],[1,[25,"categories-nav",null,[["categories"],[[20,["categories"]]]]],false],[0,"\\n"]],"parameters":[]},null],[0,"  "],[8],[0,"\\n  "],[6,"main"],[7],[0,"\\n    "],[1,[18,"outlet"],false],[0,"\\n  "],[8],[0,"\\n"],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/application.hbs"}})}),define("inspektor/templates/connect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"VjXcIYnG",block:'{"symbols":[],"statements":[],"hasEval":false}',meta:{moduleName:"inspektor/templates/connect.hbs"}})}),define("inspektor/templates/disconnect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"2ZbVbnJi",block:'{"symbols":[],"statements":[[1,[18,"outlet"],false]],"hasEval":false}',meta:{moduleName:"inspektor/templates/disconnect.hbs"}})}),define("inspektor/templates/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"2xq+NPC0",block:'{"symbols":[],"statements":[[6,"header"],[7],[0,"\\n  "],[1,[25,"breadcrumb-nav",null,[["currentDirPath"],[[20,["currentDirPath"]]]]],false],[0,"\\n"],[8],[0,"\\n\\n"],[4,"if",[[20,["currentListing"]]],null,{"statements":[[0,"  "],[1,[25,"directory-listing",null,[["items"],[[20,["currentListing"]]]]],false],[0,"\\n"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/templates/index.hbs"}})}),define("inspektor/templates/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"iEMqy3N5",block:'{"symbols":[],"statements":[[6,"header"],[7],[0,"\\n  "],[1,[25,"breadcrumb-nav",null,[["currentDirPath"],[[20,["currentDirPath"]]]]],false],[0,"\\n  "],[6,"nav"],[9,"class","actions"],[7],[0,"\\n    "],[6,"button"],[9,"class","delete"],[3,"action",[[19,0,[]],"deleteItem"]],[7],[0,"delete"],[8],[0,"\\n  "],[8],[0,"\\n"],[8],[0,"\\n\\n"],[6,"div"],[9,"class","inspect-details"],[7],[0,"\\n  "],[6,"section"],[9,"class","content"],[7],[0,"\\n    "],[1,[25,"file-preview",null,[["metaData","storage"],[[20,["model","documentMetaData"]],[20,["storage"]]]]],false],[0,"\\n  "],[8],[0,"\\n  "],[6,"section"],[9,"class","meta"],[7],[0,"\\n    "],[6,"dl"],[7],[0,"\\n      "],[6,"dt"],[7],[0,"Name"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","name"]],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Content type"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","type"]],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Size"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[25,"human-file-size",[[20,["model","documentMetaData","size"]]],null],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Revision (ETag)"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","etag"]],false],[8],[0,"\\n    "],[8],[0,"\\n  "],[8],[0,"\\n"],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/inspect.hbs"}})}),define("inspektor/utils/simple-content-type",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){return e.replace(/;.*$/,"")}}),define("inspektor/config/environment",[],function(){try{var e="inspektor/config/environment",t=document.querySelector('meta[name="'+e+'"]').getAttribute("content"),n={default:JSON.parse(unescape(t))} | ||||
| return Object.defineProperty(n,"__esModule",{value:!0}),n}catch(t){throw new Error('Could not read config from meta tag with name "'+e+'".')}}),runningTests||require("inspektor/app").default.create({name:"inspektor",version:"0.5.1+ab9ad2f3"}) | ||||
							
								
								
									
										1
									
								
								assets/inspektor-16efc4360e04e783907c992ae34a1332.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										1
									
								
								assets/inspektor-1701d25653bb2178aa7210006af21b64.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										80
									
								
								assets/inspektor-23fca486233cda67acb0e71e9f5e244c.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,80 @@ | ||||
| "use strict" | ||||
| define("inspektor/app",["exports","inspektor/resolver","ember-load-initializers","inspektor/config/environment"],function(e,t,n,r){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var i=Ember.Application.extend({modulePrefix:r.default.modulePrefix,podModulePrefix:r.default.podModulePrefix,Resolver:t.default});(0,n.default)(i,r.default.modulePrefix),e.default=i}),define("inspektor/components/account-info/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component,n=Ember.computed | ||||
| e.default=t.extend({classNames:["account-info"],userAddress:null,username:n("userAddress",function(){return this.get("userAddress").split("@")[0]}),host:n("userAddress",function(){return"@"+this.get("userAddress").split("@")[1]})})}),define("inspektor/components/account-info/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"rn4KIRZr",block:'{"symbols":[],"statements":[[6,"span"],[9,"class","username"],[7],[1,[18,"username"],false],[8],[0,"\\n"],[6,"br"],[7],[8],[6,"span"],[9,"class","host"],[7],[1,[18,"host"],false],[8],[0,"\\n\\n"],[4,"link-to",["disconnect"],[["class"],["disconnect"]],{"statements":[[0,"disconnect"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/account-info/template.hbs"}})}),define("inspektor/components/breadcrumb-nav/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component,n=Ember.Object,r=Ember.isEmpty | ||||
| e.default=t.extend({tagName:"nav",classNames:["breadcrumb-nav"],currentDirPath:null,linkItems:function(){var e=this.get("currentDirPath") | ||||
| if(r(e))return[] | ||||
| var t=[] | ||||
| return e.split("/").reject(function(e){return r(e)}).forEach(function(r){var i=e.match("(.*"+r+")/")[0] | ||||
| t.pushObject(n.create({name:r,path:i}))}),t}.property("currentDirPath")})}),define("inspektor/components/breadcrumb-nav/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"j3noKP+7",block:'{"symbols":["item"],"statements":[[6,"span"],[9,"class","node"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],["/"]]]],null,{"statements":[[0,"Home"]],"parameters":[]},null],[8],[0,"\\n"],[4,"each",[[20,["linkItems"]]],null,{"statements":[[6,"span"],[9,"class","node"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[1,[19,1,["name"]],false]],"parameters":[]},null],[8],[0,"\\n"]],"parameters":[1]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/breadcrumb-nav/template.hbs"}})}),define("inspektor/components/categories-nav/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component | ||||
| e.default=t.extend({categories:null})}),define("inspektor/components/categories-nav/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"4FB0addV",block:'{"symbols":["category"],"statements":[[4,"if",[[20,["categories"]]],null,{"statements":[[0,"  "],[6,"nav"],[7],[0,"\\n    "],[6,"ul"],[7],[0,"\\n"],[4,"each",[[20,["categories"]]],null,{"statements":[[0,"      "],[6,"li"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[1,[19,1,["name"]],false]],"parameters":[]},null],[8],[0,"\\n"]],"parameters":[1]},null],[0,"    "],[8],[0,"\\n  "],[8],[0,"\\n"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/categories-nav/template.hbs"}})}),define("inspektor/components/directory-listing/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component | ||||
| e.default=t.extend({classNames:["directory-listing"],items:null,itemsSorted:function(){var e=this.get("items") | ||||
| return e.reject(function(e){return"folder"!==e.type}).concat(e.reject(function(e){return"folder"===e.type}))}.property("items")})}),define("inspektor/components/directory-listing/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"K4sJaSiM",block:'{"symbols":["item"],"statements":[[6,"ul"],[9,"class","listing"],[7],[0,"\\n"],[4,"each",[[20,["itemsSorted"]]],null,{"statements":[[0,"  "],[6,"li"],[7],[0,"\\n"],[4,"if",[[19,1,["isFolder"]]],null,{"statements":[[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[0,"        "],[6,"span"],[9,"class","icon"],[7],[1,[25,"item-icon",null,[["type"],[[19,1,["type"]]]]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","name"],[7],[1,[19,1,["name"]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","size"],[7],[8],[0,"\\n        "],[6,"span"],[9,"class","type"],[7],[1,[19,1,["type"]],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]},{"statements":[[0,"      "],[2," TODO link to item "],[0,"\\n"],[4,"link-to",["inspect",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[0,"        "],[6,"span"],[9,"class","icon"],[7],[1,[25,"item-icon",null,[["type"],[[19,1,["type"]]]]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","name"],[7],[1,[19,1,["name"]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","size"],[7],[1,[25,"human-file-size",[[19,1,["size"]]],null],false],[8],[0,"\\n        "],[6,"span"],[9,"class","type"],[7],[1,[19,1,["type"]],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]}],[0,"  "],[8],[0,"\\n"]],"parameters":[1]},null],[8]],"hasEval":false}',meta:{moduleName:"inspektor/components/directory-listing/template.hbs"}})}),define("inspektor/components/file-preview/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component,n=Ember.computed.alias | ||||
| e.default=t.extend({storage:null,classNames:["file-preview"],fileLoaded:!1,fileContent:null,objectURL:null,metaData:null,type:n("metaData.type"),isBinary:n("metaData.isBinary"),isImage:function(){return this.get("type").match(/^image\/.+$/)}.property("type"),isText:function(){return!this.get("isBinary")}.property("isBinary"),loadFile:function(){var e=this,t=this.get("metaData.path") | ||||
| this.get("storage.client").getFile(t).then(function(t){if(e.get("isImage")){var n=new window.Uint8Array(t.data),r=new window.Blob([n],{type:t.contentType}) | ||||
| e.set("objectURL",window.URL.createObjectURL(r))}else e.set("fileContent",t.data) | ||||
| e.set("fileLoaded",!0)})}.on("init")})}),define("inspektor/components/file-preview/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"S7eRlRkE",block:'{"symbols":[],"statements":[[4,"if",[[20,["fileLoaded"]]],null,{"statements":[[4,"if",[[20,["isBinary"]]],null,{"statements":[[4,"if",[[20,["isImage"]]],null,{"statements":[[0,"      "],[6,"img"],[10,"src",[18,"objectURL"],null],[10,"alt",[20,["metaData","name"]],null],[7],[8],[0,"\\n"]],"parameters":[]},{"statements":[[0,"      "],[6,"p"],[7],[0,"No preview available for this content type."],[8],[0,"\\n"]],"parameters":[]}]],"parameters":[]},null],[0,"\\n"],[4,"if",[[20,["isText"]]],null,{"statements":[[0,"    "],[6,"code"],[7],[1,[18,"fileContent"],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/file-preview/template.hbs"}})}),define("inspektor/components/item-icon/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component | ||||
| e.default=t.extend({tagName:"img",classNames:["item-icon"],attributeBindings:["src:src"],type:null,isFolder:function(){return"folder"===this.get("type")}.property("type"),src:function(){var e=this.get("type") | ||||
| return"/img/file-icons/"+(this.get("isFolder")?"folder.svg":e.match(/json/i)?"code-curly.svg":"file.svg")}.property()})}),define("inspektor/components/item-icon/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"0RA2e2SD",block:'{"symbols":[],"statements":[],"hasEval":false}',meta:{moduleName:"inspektor/components/item-icon/template.hbs"}})}),define("inspektor/controllers/application",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Controller,n=Ember.Object,r=Ember.computed,i=Ember.observer,o=Ember.inject.service,s=Ember.computed.alias,a=Ember.isEmpty | ||||
| e.default=t.extend({storage:o(),connecting:s("storage.connecting"),connected:s("storage.connected"),userAddress:s("storage.userAddress"),rootListing:s("storage.rootListing"),currentDirPath:null,connectedClass:r("connected",function(){return this.get("connected")?"connected":"disconnected"}),categories:function(){var e=[],t=this.get("rootListing") | ||||
| return a(t)?e:(t.forEach(function(t){t.isFolder&&e.push(n.create({name:t.name.replace("/",""),type:t.type,path:t.name}))}),e)}.property("rootListing"),connectedChange:i("connected",function(){this.get("connected")||this.set("currentDirPath",null)})})}),define("inspektor/controllers/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Controller,n=Ember.inject.controller,r=Ember.observer,i=Ember.inject.service,o=Ember.computed.alias,s=Ember.isPresent | ||||
| e.default=t.extend({application:n(),storage:i(),connected:o("storage.connected"),rootListing:o("storage.rootListing"),currentDirPath:o("application.currentDirPath"),queryParams:["path"],currentListing:function(){return s(this.get("model.currentListing"))?this.get("model.currentListing").sortBy("name"):this.get("rootListing")}.property("rootListing.[]","model.[]"),connectedChange:r("connected",function(){this.get("connected")||(this.set("model",null),this.set("path",null))})})}),define("inspektor/controllers/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Controller,n=Ember.inject.controller,r=Ember.inject.service,i=Ember.computed.alias | ||||
| e.default=t.extend({application:n(),storage:r(),currentDirPath:i("application.currentDirPath"),queryParams:["path"],actions:{deleteItem:function(){var e=this | ||||
| window.confirm("Sure?")&&this.get("storage.client").remove(this.get("path")).then(function(){e.transitionToRoute("index",{queryParams:{path:e.get("currentDirPath")}})})}}})}),define("inspektor/helpers/app-version",["exports","inspektor/config/environment","ember-cli-app-version/utils/regexp"],function(e,t,n){function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{} | ||||
| return t.hideSha?i.match(n.versionRegExp)[0]:t.hideVersion?i.match(n.shaRegExp)[0]:i}Object.defineProperty(e,"__esModule",{value:!0}),e.appVersion=r | ||||
| var i=t.default.APP.version | ||||
| e.default=Ember.Helper.helper(r)}),define("inspektor/helpers/human-file-size",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Helper.helper | ||||
| e.default=t(function(e){if(e<1024)return e+" bytes" | ||||
| var t=-1 | ||||
| do{e/=1024,t++}while(e>1024) | ||||
| return String(Math.max(e,.1).toFixed(1)+" "+["KB","MB","GB","TB","PB","EB","ZB","YB"][t])})}),define("inspektor/helpers/pluralize",["exports","ember-inflector/lib/helpers/pluralize"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/helpers/singularize",["exports","ember-inflector/lib/helpers/singularize"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/initializers/app-version",["exports","ember-cli-app-version/initializer-factory","inspektor/config/environment"],function(e,t,n){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var r=n.default.APP,i=r.name,o=r.version | ||||
| e.default={name:"App Version",initialize:(0,t.default)(i,o)}}),define("inspektor/initializers/container-debug-adapter",["exports","ember-resolver/resolvers/classic/container-debug-adapter"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"container-debug-adapter",initialize:function(){var e=arguments[1]||arguments[0] | ||||
| e.register("container-debug-adapter:main",t.default),e.inject("container-debug-adapter:main","namespace","application:main")}}}),define("inspektor/initializers/data-adapter",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"data-adapter",before:"store",initialize:function(){}}}),define("inspektor/initializers/ember-data",["exports","ember-data/setup-container","ember-data"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"ember-data",initialize:t.default}}),define("inspektor/initializers/export-application-global",["exports","inspektor/config/environment"],function(e,t){function n(){var e=arguments[1]||arguments[0] | ||||
| if(!1!==t.default.exportApplicationGlobal){var n | ||||
| if("undefined"!=typeof window)n=window | ||||
| else if("undefined"!=typeof global)n=global | ||||
| else{if("undefined"==typeof self)return | ||||
| n=self}var r,i=t.default.exportApplicationGlobal | ||||
| r="string"==typeof i?i:Ember.String.classify(t.default.modulePrefix),n[r]||(n[r]=e,e.reopen({willDestroy:function(){this._super.apply(this,arguments),delete n[r]}}))}}Object.defineProperty(e,"__esModule",{value:!0}),e.initialize=n,e.default={name:"export-application-global",initialize:n}}),define("inspektor/initializers/injectStore",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"injectStore",before:"store",initialize:function(){}}}),define("inspektor/initializers/store",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"store",after:"ember-data",initialize:function(){}}}),define("inspektor/initializers/transforms",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"transforms",before:"store",initialize:function(){}}}),define("inspektor/instance-initializers/body-class",["exports","ember-body-class/instance-initializers/body-class"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"initialize",{enumerable:!0,get:function(){return t.initialize}})}),define("inspektor/instance-initializers/ember-data",["exports","ember-data/instance-initializers/initialize-store-service"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"ember-data",initialize:t.default}}) | ||||
| define("inspektor/resolver",["exports","ember-resolver"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/router",["exports","inspektor/config/environment"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var n=Ember.Router.extend({location:t.default.locationType,rootURL:t.default.rootURL}) | ||||
| n.map(function(){this.route("inspect"),this.route("connect"),this.route("disconnect")}),e.default=n}),define("inspektor/routes/application",["exports","ember-body-class/mixins/body-class"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var n=Ember.Route,r=Ember.inject.service | ||||
| e.default=n.extend(t.default,{storage:r(),beforeModel:function(){var e=this | ||||
| this.get("storage.rs").on("error",function(t){console.debug("rs.on error",t),"Unauthorized"===t.name?e.handleUnauthorized():"DiscoveryError"===t.name||alert("An unknown error occured. Please check the browser console for details.")})},handleUnauthorized:function(){this.get("storage.unauthorized")||(this.get("storage").setProperties({unauthorized:!0,connecting:!1,connected:!1}),this.transitionTo("connect"))}})}),define("inspektor/routes/connect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service,r=Ember.run.later,i=Ember.RSVP.Promise | ||||
| e.default=t.extend({storage:n(),beforeModel:function(){var e=this | ||||
| return this.waitForConnectionState().then(function(){e.get("storage.connected")&&e.transitionTo("index")})},waitForConnectionState:function(){var e=this | ||||
| return new i(function(t){function n(){e.get("storage.connecting")?r(n,20):t()}n()})}})}),define("inspektor/routes/disconnect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service | ||||
| e.default=t.extend({storage:n(),beforeModel:function(){this.get("storage.rs").disconnect(),this.transitionTo("connect")}})}),define("inspektor/routes/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service,r=Ember.isEmpty,i=Ember.isPresent,o=Ember.run.later,s=Ember.RSVP.hash,a=Ember.RSVP.Promise | ||||
| e.default=t.extend({storage:n(),queryParams:{path:{refreshModel:!0}},beforeModel:function(){var e=this | ||||
| return this.waitForConnectionState().then(function(){e.get("storage.disconnected")&&e.transitionTo("connect")})},model:function(e){var t=e.path | ||||
| return r(e.path)?null:("/"!==t.substr(-1)&&(t+="/"),s({currentListing:this.get("storage").fetchListing(t),currentDirPath:t}))},setupController:function(e,t){this._super(e,t),r(this.get("storage.categories"))&&this.get("storage.connected")&&this.get("storage").fetchRootListing(),i(t)&&e.set("currentDirPath",t.currentDirPath)},waitForConnectionState:function(){var e=this | ||||
| return new a(function(t){function n(){e.get("storage.connecting")?o(n,20):t()}n()})}})}),define("inspektor/routes/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service,r=Ember.isEmpty,i=Ember.isPresent | ||||
| e.default=t.extend({storage:n(),queryParams:{path:{refreshModel:!0}},model:function(e){var t=e.path | ||||
| r(e.path),t.substr(-1) | ||||
| var n=t.match(/^(.*\/).+$/)[1],i=t.match(/^.*\/(.+)$/)[1] | ||||
| return this.get("storage").fetchListing(n).then(function(e){return e.findBy("name",i)}).then(function(e){return{documentMetaData:e,currentDirPath:n}})},setupController:function(e,t){this._super(e,t),r(this.get("storage.categories"))&&this.get("storage.connected")&&this.get("storage").fetchRootListing(),i(t)&&e.set("currentDirPath",t.currentDirPath)}})}),define("inspektor/services/ajax",["exports","ember-ajax/services/ajax"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("inspektor/services/storage",["exports","npm:remotestoragejs","npm:remotestorage-widget","inspektor/utils/simple-content-type"],function(e,t,n,r){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var i=Ember.Object,o=Ember.Service,s=Ember.computed,a=Ember.observer,l=Ember.isEmpty | ||||
| e.default=o.extend({rs:null,widget:null,connecting:!0,connected:!1,unauthorized:!1,userAddress:null,disconnected:s.not("connected"),client:null,rootListing:null,setup:function(){var e=this,r=new t.default({cache:!1}) | ||||
| r.access.claim("*","rw") | ||||
| var i=new n.default(r,{skipInitial:!0}) | ||||
| i.attach(),r.on("ready",function(){console.debug("rs.on ready")}),r.on("connected",function(){console.debug("rs.on connected"),e.set("connecting",!1),e.set("connected",!0),e.set("userAddress",e.get("rs").remote.userAddress)}),r.on("not-connected",function(){console.debug("rs.on not-connected"),e.set("connecting",!1),e.set("connected",!1)}),r.on("disconnected",function(){console.debug("rs.on disconnected"),e.set("connecting",!1),e.set("connected",!1)}),r.on("connecting",function(){console.debug("rs.on connecting"),e.set("connecting",!0),e.set("connected",!1)}),r.on("authing",function(){console.debug("rs.on authing"),e.set("connecting",!0),e.set("connected",!1)}),this.set("rs",r),this.set("widget",i),this.set("client",r.scope("/"))}.on("init"),connectedChange:a("connected",function(){this.get("connected")?this.fetchRootListing():this.clearLocalData()}),clearLocalData:function(){this.setProperties({userAddress:null,rootListing:null})},fetchRootListing:function(){var e=this | ||||
| this.fetchListing("").then(function(t){e.set("rootListing",t.sortBy("name"))})},fetchListing:function(e){var t=[] | ||||
| return this.get("client").getListing(e).then(function(n){return l(n)?[]:(Object.keys(n).forEach(function(o){var s=n[o],a=s["Content-Type"]||"folder",l=!1 | ||||
| "folder"!==a&&(l=!!a.match(/charset=binary/),a=(0,r.default)(a)),t.push(i.create({name:o,type:a,isBinary:l,isFolder:"folder"===a,size:s["Content-Length"]||null,path:e+o,etag:s.ETag}))}),t)})}})}),define("inspektor/templates/application",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"HpeupCPN",block:'{"symbols":[],"statements":[[6,"div"],[9,"id","app-container"],[10,"class",[18,"connectedClass"],null],[7],[0,"\\n  "],[6,"aside"],[7],[0,"\\n"],[4,"if",[[20,["connected"]]],null,{"statements":[[0,"      "],[1,[25,"account-info",null,[["userAddress"],[[20,["userAddress"]]]]],false],[0,"\\n      "],[1,[25,"categories-nav",null,[["categories"],[[20,["categories"]]]]],false],[0,"\\n"]],"parameters":[]},null],[0,"  "],[8],[0,"\\n  "],[6,"main"],[7],[0,"\\n    "],[1,[18,"outlet"],false],[0,"\\n  "],[8],[0,"\\n"],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/application.hbs"}})}),define("inspektor/templates/connect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"VjXcIYnG",block:'{"symbols":[],"statements":[],"hasEval":false}',meta:{moduleName:"inspektor/templates/connect.hbs"}})}),define("inspektor/templates/disconnect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"2ZbVbnJi",block:'{"symbols":[],"statements":[[1,[18,"outlet"],false]],"hasEval":false}',meta:{moduleName:"inspektor/templates/disconnect.hbs"}})}),define("inspektor/templates/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"2xq+NPC0",block:'{"symbols":[],"statements":[[6,"header"],[7],[0,"\\n  "],[1,[25,"breadcrumb-nav",null,[["currentDirPath"],[[20,["currentDirPath"]]]]],false],[0,"\\n"],[8],[0,"\\n\\n"],[4,"if",[[20,["currentListing"]]],null,{"statements":[[0,"  "],[1,[25,"directory-listing",null,[["items"],[[20,["currentListing"]]]]],false],[0,"\\n"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/templates/index.hbs"}})}),define("inspektor/templates/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"iEMqy3N5",block:'{"symbols":[],"statements":[[6,"header"],[7],[0,"\\n  "],[1,[25,"breadcrumb-nav",null,[["currentDirPath"],[[20,["currentDirPath"]]]]],false],[0,"\\n  "],[6,"nav"],[9,"class","actions"],[7],[0,"\\n    "],[6,"button"],[9,"class","delete"],[3,"action",[[19,0,[]],"deleteItem"]],[7],[0,"delete"],[8],[0,"\\n  "],[8],[0,"\\n"],[8],[0,"\\n\\n"],[6,"div"],[9,"class","inspect-details"],[7],[0,"\\n  "],[6,"section"],[9,"class","content"],[7],[0,"\\n    "],[1,[25,"file-preview",null,[["metaData","storage"],[[20,["model","documentMetaData"]],[20,["storage"]]]]],false],[0,"\\n  "],[8],[0,"\\n  "],[6,"section"],[9,"class","meta"],[7],[0,"\\n    "],[6,"dl"],[7],[0,"\\n      "],[6,"dt"],[7],[0,"Name"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","name"]],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Content type"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","type"]],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Size"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[25,"human-file-size",[[20,["model","documentMetaData","size"]]],null],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Revision (ETag)"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","etag"]],false],[8],[0,"\\n    "],[8],[0,"\\n  "],[8],[0,"\\n"],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/inspect.hbs"}})}),define("inspektor/utils/simple-content-type",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){return e.replace(/;.*$/,"")}}),define("inspektor/config/environment",[],function(){try{var e="inspektor/config/environment",t=document.querySelector('meta[name="'+e+'"]').getAttribute("content"),n={default:JSON.parse(unescape(t))} | ||||
| return Object.defineProperty(n,"__esModule",{value:!0}),n}catch(t){throw new Error('Could not read config from meta tag with name "'+e+'".')}}),runningTests||require("inspektor/app").default.create({name:"inspektor",version:"0.6.1"}) | ||||
							
								
								
									
										1
									
								
								assets/inspektor-25cd4ddc5400b3e5d36f4b0ead0b6367.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										1
									
								
								assets/inspektor-29821cf9430957368bbfd2d5ea5220fa.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1 @@ | ||||
| @charset "UTF-8";.directory-listing ul.listing li:first-of-type,.inspect-details section{border-top:1px solid #ececec}#app-container>aside{background-color:#2a3743;color:#b5c3d1}#app-container>aside a{color:#b5c3d1;text-decoration:none}#app-container>aside a:hover{color:#fff}#app-container>main>header a:link,#app-container>main>header a:visited{color:#aaa}#app-container>main>header a:hover{color:#2a3743}*{box-sizing:border-box;-moz-outline:none;outline:0}#remotestorage-widget{position:fixed;top:1rem;right:3rem;z-index:1}#app-container{position:absolute;top:0;left:0;bottom:0;right:0;overflow:hidden;display:flex;flex-direction:row;justify-content:flex-start;align-items:stretch}#app-container>aside{flex:0 0 16rem;overflow:auto;padding:2rem}#app-container>aside nav{margin-top:5rem;margin-bottom:4rem}#app-container>main{background-color:#fff;flex:1;overflow:auto;padding:3rem 4rem}#app-container>main>header{height:4em}.inspect-details{width:100%;display:grid;grid-template-columns:1.618fr 3rem 1fr}.inspect-details section{padding:1.5rem 1px}.inspect-details section.meta{grid-column-start:3}.inspect-details section.meta dl{margin:0}.inspect-details section.meta dl dd,.inspect-details section.meta dl dt{display:block}.inspect-details section.meta dl dt{font-size:.76rem;text-transform:uppercase;letter-spacing:.05em;color:#aaa;margin-bottom:.4rem}.inspect-details section.meta dl dd{margin:0 0 1.5rem}body{background-color:#fff;font-size:16px;font-family:Open Sans,sans-serif;color:#2a3743;margin:0;padding:0}.breadcrumb-nav a.active{text-decoration:none}.breadcrumb-nav .node{display:inline-block}.breadcrumb-nav .node+.node{margin-left:.5rem}.breadcrumb-nav .node+.node::before{content:'›';padding-right:.6rem}#app-container>aside nav ul{list-style:none;margin:0;padding:0}#app-container>aside nav a{display:block;padding:.2rem 0}.directory-listing ul.listing{display:block;width:100%;margin:0 0 6rem;padding:0}.directory-listing ul.listing li{display:table;width:100%;border-bottom:1px solid #ececec}.directory-listing ul.listing li:hover span{opacity:.7;cursor:pointer}.directory-listing ul.listing li a{display:table-row;text-decoration:none;color:#2a3743}.directory-listing ul.listing li a span{display:table-cell;padding:1rem 1.5rem}.directory-listing ul.listing li a span.icon{width:3%;padding-left:0;padding-right:0;text-align:center}.directory-listing ul.listing li a span.name{width:60%}.directory-listing ul.listing li a span.size{width:10%;white-space:nowrap;color:#aaa}.directory-listing ul.listing li a span.type{width:27%;white-space:nowrap;color:#aaa}ul.listing span.icon img{height:1.2rem;vertical-align:middle}.file-preview code{word-break:break-all;line-height:1.5rem}.file-preview img{max-width:100%} | ||||
							
								
								
									
										89
									
								
								assets/inspektor-33b412e25f692f77fb2ed056ef971171.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										1
									
								
								assets/inspektor-358b2ec535ff6f9ff9d558bc5e116c62.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1 @@ | ||||
| @charset "UTF-8";.directory-listing ul.listing li:first-of-type,.inspect-details section{border-top:1px solid #ececec}body{transition:background-color .2s linear}#app-container,#app-container>main{background-color:#fff}#app-container>aside{background-color:#2a3743;color:#b5c3d1;transition:flex .2s ease-in}#app-container>aside a{color:#b5c3d1;text-decoration:none}#app-container>aside a:hover{color:#fff}#app-container>main>header a:link,#app-container>main>header a:visited{color:#aaa}#app-container>main>header a:hover{color:#2a3743}#app-container.disconnected main{background-color:#ececec}*{box-sizing:border-box;-moz-outline:none;outline:0}#remotestorage-widget{display:none;position:absolute;top:20%;left:50%;margin-left:-200px;z-index:23}.connect #remotestorage-widget{display:block}#app-container{position:absolute;top:0;left:0;bottom:0;right:0;overflow:hidden;display:flex;flex-direction:row;justify-content:flex-start;align-items:stretch}#app-container.disconnected>aside{flex:0;overflow:hidden}#app-container.connected>aside{flex:0 0 16rem;overflow:auto;padding:2rem}#app-container>aside .account-info{height:5rem}#app-container>main{flex:1;overflow:auto;padding:3rem 4rem}#app-container>main>header{height:4rem}.inspect-details{width:100%;display:grid;grid-template-columns:1.618fr 3rem 1fr}.inspect-details section{padding:1.5rem 1px}.inspect-details section.meta{grid-column-start:3}.inspect-details section.meta dl{margin:0}.inspect-details section.meta dl dd,.inspect-details section.meta dl dt{display:block}.inspect-details section.meta dl dt{font-size:.76rem;text-transform:uppercase;letter-spacing:.05em;color:#aaa;margin-bottom:.4rem}.inspect-details section.meta dl dd{margin:0 0 1.5rem}body{background-color:#fff;font-size:16px;font-family:Open Sans,sans-serif;color:#2a3743;margin:0;padding:0}.account-info{position:relative}.account-info .username{font-size:1.4rem}.account-info .host{font-size:.8rem;opacity:.7}.account-info .disconnect{display:inline-block;margin-left:.5rem;font-size:.8rem;opacity:0;transition:opacity .2s linear}.account-info:hover .disconnect{font-size:.8rem;opacity:1}.breadcrumb-nav a.active{text-decoration:none}.breadcrumb-nav .node{display:inline-block}.breadcrumb-nav .node+.node{margin-left:.5rem}.breadcrumb-nav .node+.node::before{content:'›';padding-right:.6rem}#app-container>aside nav ul{list-style:none;margin:0;padding:0}#app-container>aside nav a{display:block;padding:.2rem 0}.directory-listing ul.listing{display:block;width:100%;margin:0 0 6rem;padding:0}.directory-listing ul.listing li{display:table;width:100%;border-bottom:1px solid #ececec}.directory-listing ul.listing li:hover span{opacity:.7;cursor:pointer}.directory-listing ul.listing li a{display:table-row;text-decoration:none;color:#2a3743}.directory-listing ul.listing li a span{display:table-cell;padding:1rem 1.5rem}.directory-listing ul.listing li a span.icon{width:3%;padding-left:0;padding-right:0;text-align:center}.directory-listing ul.listing li a span.name{width:60%}.directory-listing ul.listing li a span.size{width:10%;white-space:nowrap;color:#aaa}.directory-listing ul.listing li a span.type{width:27%;white-space:nowrap;color:#aaa}ul.listing span.icon img{height:1.2rem;vertical-align:middle}.file-preview code{word-break:break-all;line-height:1.5rem}.file-preview img{max-width:100%} | ||||
							
								
								
									
										71
									
								
								assets/inspektor-457906475a5b1f464ef3db575b47a34f.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,71 @@ | ||||
| "use strict" | ||||
| define("inspektor/app",["exports","inspektor/resolver","ember-load-initializers","inspektor/config/environment"],function(e,t,n,r){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var i=Ember.Application.extend({modulePrefix:r.default.modulePrefix,podModulePrefix:r.default.podModulePrefix,Resolver:t.default});(0,n.default)(i,r.default.modulePrefix),e.default=i}),define("inspektor/components/breadcrumb-nav/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component,n=Ember.Object,r=Ember.isEmpty | ||||
| e.default=t.extend({tagName:"nav",classNames:["breadcrumb-nav"],currentDirPath:null,linkItems:function(){var e=this.get("currentDirPath") | ||||
| if(r(e))return[] | ||||
| var t=[] | ||||
| return e.split("/").reject(function(e){return r(e)}).forEach(function(r){var i=e.match("(.*"+r+")/")[0] | ||||
| t.pushObject(n.create({name:r,path:i}))}),t}.property("currentDirPath")})}),define("inspektor/components/breadcrumb-nav/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"j3noKP+7",block:'{"symbols":["item"],"statements":[[6,"span"],[9,"class","node"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],["/"]]]],null,{"statements":[[0,"Home"]],"parameters":[]},null],[8],[0,"\\n"],[4,"each",[[20,["linkItems"]]],null,{"statements":[[6,"span"],[9,"class","node"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[1,[19,1,["name"]],false]],"parameters":[]},null],[8],[0,"\\n"]],"parameters":[1]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/breadcrumb-nav/template.hbs"}})}),define("inspektor/components/categories-nav/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component | ||||
| e.default=t.extend({categories:null})}),define("inspektor/components/categories-nav/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"4FB0addV",block:'{"symbols":["category"],"statements":[[4,"if",[[20,["categories"]]],null,{"statements":[[0,"  "],[6,"nav"],[7],[0,"\\n    "],[6,"ul"],[7],[0,"\\n"],[4,"each",[[20,["categories"]]],null,{"statements":[[0,"      "],[6,"li"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[1,[19,1,["name"]],false]],"parameters":[]},null],[8],[0,"\\n"]],"parameters":[1]},null],[0,"    "],[8],[0,"\\n  "],[8],[0,"\\n"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/categories-nav/template.hbs"}})}),define("inspektor/components/directory-listing/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component | ||||
| e.default=t.extend({classNames:["directory-listing"],items:null,itemsSorted:function(){var e=this.get("items") | ||||
| return e.reject(function(e){return"folder"!==e.type}).concat(e.reject(function(e){return"folder"===e.type}))}.property("items")})}),define("inspektor/components/directory-listing/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"K4sJaSiM",block:'{"symbols":["item"],"statements":[[6,"ul"],[9,"class","listing"],[7],[0,"\\n"],[4,"each",[[20,["itemsSorted"]]],null,{"statements":[[0,"  "],[6,"li"],[7],[0,"\\n"],[4,"if",[[19,1,["isFolder"]]],null,{"statements":[[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[0,"        "],[6,"span"],[9,"class","icon"],[7],[1,[25,"item-icon",null,[["type"],[[19,1,["type"]]]]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","name"],[7],[1,[19,1,["name"]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","size"],[7],[8],[0,"\\n        "],[6,"span"],[9,"class","type"],[7],[1,[19,1,["type"]],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]},{"statements":[[0,"      "],[2," TODO link to item "],[0,"\\n"],[4,"link-to",["inspect",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[0,"        "],[6,"span"],[9,"class","icon"],[7],[1,[25,"item-icon",null,[["type"],[[19,1,["type"]]]]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","name"],[7],[1,[19,1,["name"]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","size"],[7],[1,[25,"human-file-size",[[19,1,["size"]]],null],false],[8],[0,"\\n        "],[6,"span"],[9,"class","type"],[7],[1,[19,1,["type"]],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]}],[0,"  "],[8],[0,"\\n"]],"parameters":[1]},null],[8]],"hasEval":false}',meta:{moduleName:"inspektor/components/directory-listing/template.hbs"}})}),define("inspektor/components/file-preview/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component,n=Ember.computed.alias | ||||
| e.default=t.extend({storage:null,classNames:["file-preview"],fileLoaded:!1,fileContent:null,objectURL:null,metaData:null,type:n("metaData.type"),isBinary:n("metaData.isBinary"),isImage:function(){return this.get("type").match(/^image\/.+$/)}.property("type"),isText:function(){return!this.get("isBinary")}.property("isBinary"),loadFile:function(){var e=this,t=this.get("metaData.path") | ||||
| this.get("storage.client").getFile(t).then(function(t){if(e.get("isImage")){var n=new window.Uint8Array(t.data),r=new window.Blob([n],{type:t.contentType}) | ||||
| e.set("objectURL",window.URL.createObjectURL(r))}else e.set("fileContent",t.data) | ||||
| e.set("fileLoaded",!0)})}.on("init")})}),define("inspektor/components/file-preview/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"S7eRlRkE",block:'{"symbols":[],"statements":[[4,"if",[[20,["fileLoaded"]]],null,{"statements":[[4,"if",[[20,["isBinary"]]],null,{"statements":[[4,"if",[[20,["isImage"]]],null,{"statements":[[0,"      "],[6,"img"],[10,"src",[18,"objectURL"],null],[10,"alt",[20,["metaData","name"]],null],[7],[8],[0,"\\n"]],"parameters":[]},{"statements":[[0,"      "],[6,"p"],[7],[0,"No preview available for this content type."],[8],[0,"\\n"]],"parameters":[]}]],"parameters":[]},null],[0,"\\n"],[4,"if",[[20,["isText"]]],null,{"statements":[[0,"    "],[6,"code"],[7],[1,[18,"fileContent"],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/file-preview/template.hbs"}})}),define("inspektor/components/item-icon/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component | ||||
| e.default=t.extend({tagName:"img",classNames:["item-icon"],attributeBindings:["src:src"],type:null,isFolder:function(){return"folder"===this.get("type")}.property("type"),src:function(){var e=this.get("type") | ||||
| return"/img/file-icons/"+(this.get("isFolder")?"folder.svg":e.match(/json/i)?"code-curly.svg":"file.svg")}.property()})}),define("inspektor/components/item-icon/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"0RA2e2SD",block:'{"symbols":[],"statements":[],"hasEval":false}',meta:{moduleName:"inspektor/components/item-icon/template.hbs"}})}),define("inspektor/controllers/application",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Controller,n=Ember.Object,r=Ember.observer,i=Ember.inject.service,a=Ember.computed.alias,o=Ember.isEmpty | ||||
| e.default=t.extend({storage:i(),connecting:a("storage.connecting"),connected:a("storage.connected"),rootListing:a("storage.rootListing"),currentDirPath:null,categories:function(){var e=[],t=this.get("rootListing") | ||||
| return o(t)?e:(t.forEach(function(t){t.isFolder&&e.push(n.create({name:t.name.replace("/",""),type:t.type,path:t.name}))}),e)}.property("rootListing"),connectedChange:r("connected",function(){this.get("connected")||this.set("currentDirPath",null)})})}),define("inspektor/controllers/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Controller,n=Ember.inject.controller,r=Ember.observer,i=Ember.inject.service,a=Ember.computed.alias,o=Ember.isPresent | ||||
| e.default=t.extend({application:n(),storage:i(),connected:a("storage.connected"),rootListing:a("storage.rootListing"),currentDirPath:a("application.currentDirPath"),queryParams:["path"],currentListing:function(){return o(this.get("model.currentListing"))?this.get("model.currentListing").sortBy("name"):this.get("rootListing")}.property("rootListing.[]","model.[]"),connectedChange:r("connected",function(){this.get("connected")||(this.set("model",null),this.set("path",null))})})}),define("inspektor/controllers/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Controller,n=Ember.inject.controller,r=Ember.inject.service,i=Ember.computed.alias | ||||
| e.default=t.extend({application:n(),storage:r(),currentDirPath:i("application.currentDirPath"),queryParams:["path"]})}),define("inspektor/helpers/app-version",["exports","inspektor/config/environment","ember-cli-app-version/utils/regexp"],function(e,t,n){function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{} | ||||
| return t.hideSha?i.match(n.versionRegExp)[0]:t.hideVersion?i.match(n.shaRegExp)[0]:i}Object.defineProperty(e,"__esModule",{value:!0}),e.appVersion=r | ||||
| var i=t.default.APP.version | ||||
| e.default=Ember.Helper.helper(r)}),define("inspektor/helpers/human-file-size",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Helper.helper | ||||
| e.default=t(function(e){if(e<1024)return e+" bytes" | ||||
| var t=-1 | ||||
| do{e/=1024,t++}while(e>1024) | ||||
| return String(Math.max(e,.1).toFixed(1)+" "+["KB","MB","GB","TB","PB","EB","ZB","YB"][t])})}),define("inspektor/helpers/pluralize",["exports","ember-inflector/lib/helpers/pluralize"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/helpers/singularize",["exports","ember-inflector/lib/helpers/singularize"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/initializers/app-version",["exports","ember-cli-app-version/initializer-factory","inspektor/config/environment"],function(e,t,n){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var r=n.default.APP,i=r.name,a=r.version | ||||
| e.default={name:"App Version",initialize:(0,t.default)(i,a)}}),define("inspektor/initializers/container-debug-adapter",["exports","ember-resolver/resolvers/classic/container-debug-adapter"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"container-debug-adapter",initialize:function(){var e=arguments[1]||arguments[0] | ||||
| e.register("container-debug-adapter:main",t.default),e.inject("container-debug-adapter:main","namespace","application:main")}}}),define("inspektor/initializers/data-adapter",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"data-adapter",before:"store",initialize:function(){}}}),define("inspektor/initializers/ember-data",["exports","ember-data/setup-container","ember-data"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"ember-data",initialize:t.default}}),define("inspektor/initializers/export-application-global",["exports","inspektor/config/environment"],function(e,t){function n(){var e=arguments[1]||arguments[0] | ||||
| if(!1!==t.default.exportApplicationGlobal){var n | ||||
| if("undefined"!=typeof window)n=window | ||||
| else if("undefined"!=typeof global)n=global | ||||
| else{if("undefined"==typeof self)return | ||||
| n=self}var r,i=t.default.exportApplicationGlobal | ||||
| r="string"==typeof i?i:Ember.String.classify(t.default.modulePrefix),n[r]||(n[r]=e,e.reopen({willDestroy:function(){this._super.apply(this,arguments),delete n[r]}}))}}Object.defineProperty(e,"__esModule",{value:!0}),e.initialize=n,e.default={name:"export-application-global",initialize:n}}),define("inspektor/initializers/injectStore",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"injectStore",before:"store",initialize:function(){}}}),define("inspektor/initializers/store",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"store",after:"ember-data",initialize:function(){}}}),define("inspektor/initializers/transforms",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"transforms",before:"store",initialize:function(){}}}),define("inspektor/instance-initializers/ember-data",["exports","ember-data/instance-initializers/initialize-store-service"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"ember-data",initialize:t.default}}),define("inspektor/resolver",["exports","ember-resolver"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/router",["exports","inspektor/config/environment"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var n=Ember.Router.extend({location:t.default.locationType,rootURL:t.default.rootURL}) | ||||
| n.map(function(){this.route("inspect")}),e.default=n}),define("inspektor/routes/application",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route | ||||
| e.default=t.extend({})}) | ||||
| define("inspektor/routes/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service,r=Ember.isEmpty,i=Ember.isPresent,a=Ember.run.later,o=Ember.RSVP.hash,s=Ember.RSVP.Promise | ||||
| e.default=t.extend({storage:n(),queryParams:{path:{refreshModel:!0}},beforeModel:function(){return this.waitForConnectionState()},model:function(e){if(this.get("storage.disconnected"))return null | ||||
| var t=e.path | ||||
| return r(e.path)?null:("/"!==t.substr(-1)&&(t+="/"),o({currentListing:this.get("storage").fetchListing(t),currentDirPath:t}))},setupController:function(e,t){if(this._super(e,t),this.get("storage.disconnected"))return!0 | ||||
| r(this.get("storage.categories"))&&this.get("storage.connected")&&this.get("storage").fetchRootListing(),i(t)&&e.set("currentDirPath",t.currentDirPath)},waitForConnectionState:function(){var e=this | ||||
| return new s(function(t){function n(){e.get("storage.connecting")?a(n,20):t()}n()})}})}),define("inspektor/routes/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service,r=Ember.isEmpty,i=Ember.isPresent | ||||
| e.default=t.extend({storage:n(),queryParams:{path:{refreshModel:!0}},model:function(e){var t=e.path | ||||
| r(e.path),t.substr(-1) | ||||
| var n=t.match(/^(.*\/).+$/)[1],i=t.match(/^.*\/(.+)$/)[1] | ||||
| return this.get("storage").fetchListing(n).then(function(e){return e.findBy("name",i)}).then(function(e){return{documentMetaData:e,currentDirPath:n}})},setupController:function(e,t){this._super(e,t),r(this.get("storage.categories"))&&this.get("storage.connected")&&this.get("storage").fetchRootListing(),i(t)&&e.set("currentDirPath",t.currentDirPath)}})}),define("inspektor/services/ajax",["exports","ember-ajax/services/ajax"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("inspektor/services/storage",["exports","npm:remotestoragejs","npm:remotestorage-widget","inspektor/utils/simple-content-type"],function(e,t,n,r){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var i=Ember.Object,a=Ember.computed,o=Ember.observer,s=Ember.Service | ||||
| e.default=s.extend({rs:null,widget:null,connecting:!0,connected:!1,disconnected:a.not("connected"),client:null,rootListing:null,setup:function(){var e=this,r=new t.default({cache:!1}) | ||||
| r.access.claim("*","rw") | ||||
| var i=new n.default(r,{}) | ||||
| i.attach(),r.on("ready",function(){console.debug("rs.on ready")}),r.on("connected",function(){console.debug("rs.on connected"),e.set("connecting",!1),e.set("connected",!0)}),r.on("not-connected",function(){console.debug("rs.on not-connected"),e.set("connecting",!1),e.set("connected",!1)}),r.on("disconnected",function(){console.debug("rs.on disconnected"),e.set("connecting",!1),e.set("connected",!1)}),r.on("connecting",function(){console.debug("rs.on connecting"),e.set("connecting",!0),e.set("connected",!1)}),r.on("authing",function(){console.debug("rs.on authing"),e.set("connecting",!0),e.set("connected",!1)}),this.set("rs",r),this.set("widget",i),this.set("client",r.scope("/"))}.on("init"),connectedChange:o("connected",function(){this.get("connected")?this.fetchRootListing():this.set("rootListing",null)}),fetchRootListing:function(){var e=this | ||||
| this.fetchListing("").then(function(t){e.set("rootListing",t.sortBy("name"))})},fetchListing:function(e){var t=[] | ||||
| return this.get("client").getListing(e).then(function(n){return Object.keys(n).forEach(function(a){var o=n[a],s=o["Content-Type"]||"folder",l=!1 | ||||
| "folder"!==s&&(l=!!s.match(/charset=binary/),s=(0,r.default)(s)),t.push(i.create({name:a,type:s,isBinary:l,isFolder:"folder"===s,size:o["Content-Length"]||null,path:e+a,etag:o.ETag}))}),t})}})}),define("inspektor/templates/application",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"2yFDPWSX",block:'{"symbols":[],"statements":[[6,"div"],[9,"id","app-container"],[7],[0,"\\n  "],[6,"aside"],[7],[0,"\\n"],[4,"if",[[20,["connected"]]],null,{"statements":[[0,"      "],[1,[25,"categories-nav",null,[["categories"],[[20,["categories"]]]]],false],[0,"\\n"]],"parameters":[]},null],[0,"  "],[8],[0,"\\n  "],[6,"main"],[7],[0,"\\n    "],[6,"header"],[7],[0,"\\n"],[4,"if",[[20,["connecting"]]],null,{"statements":[[0,"      "],[2," Connecting... "],[0,"\\n"]],"parameters":[]},{"statements":[[4,"if",[[20,["connected"]]],null,{"statements":[[0,"          "],[1,[25,"breadcrumb-nav",null,[["currentDirPath"],[[20,["currentDirPath"]]]]],false],[0,"\\n"]],"parameters":[]},{"statements":[[0,"          Not connected.\\n"]],"parameters":[]}]],"parameters":[]}],[0,"    "],[8],[0,"\\n\\n    "],[1,[18,"outlet"],false],[0,"\\n  "],[8],[0,"\\n"],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/application.hbs"}})}),define("inspektor/templates/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"I+40EE07",block:'{"symbols":[],"statements":[[4,"if",[[20,["currentListing"]]],null,{"statements":[[0,"  "],[1,[25,"directory-listing",null,[["items"],[[20,["currentListing"]]]]],false],[0,"\\n"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/templates/index.hbs"}})}),define("inspektor/templates/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"Fqf/+82x",block:'{"symbols":[],"statements":[[6,"div"],[9,"class","inspect-details"],[7],[0,"\\n  "],[6,"section"],[9,"class","content"],[7],[0,"\\n    "],[1,[25,"file-preview",null,[["metaData","storage"],[[20,["model","documentMetaData"]],[20,["storage"]]]]],false],[0,"\\n  "],[8],[0,"\\n  "],[6,"section"],[9,"class","meta"],[7],[0,"\\n    "],[6,"dl"],[7],[0,"\\n      "],[6,"dt"],[7],[0,"Name"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","name"]],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Content type"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","type"]],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Size"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[25,"human-file-size",[[20,["model","documentMetaData","size"]]],null],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Revision (ETag)"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","etag"]],false],[8],[0,"\\n    "],[8],[0,"\\n  "],[8],[0,"\\n"],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/inspect.hbs"}})}),define("inspektor/utils/simple-content-type",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){return e.replace(/;.*$/,"")}}),define("inspektor/config/environment",[],function(){try{var e="inspektor/config/environment",t=document.querySelector('meta[name="'+e+'"]').getAttribute("content"),n={default:JSON.parse(unescape(t))} | ||||
| return Object.defineProperty(n,"__esModule",{value:!0}),n}catch(t){throw new Error('Could not read config from meta tag with name "'+e+'".')}}),runningTests||require("inspektor/app").default.create({name:"inspektor",version:"0.4.0"}) | ||||
							
								
								
									
										85
									
								
								assets/inspektor-4bf9976955b8f0d26a26e3eaaaf17229.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,85 @@ | ||||
| "use strict" | ||||
| define("inspektor/app",["exports","inspektor/resolver","ember-load-initializers","inspektor/config/environment"],function(e,t,n,r){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var o=Ember.Application.extend({modulePrefix:r.default.modulePrefix,podModulePrefix:r.default.podModulePrefix,Resolver:t.default});(0,n.default)(o,r.default.modulePrefix),e.default=o}),define("inspektor/components/account-info/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component,n=Ember.computed | ||||
| e.default=t.extend({classNames:["account-info"],userAddress:null,username:n("userAddress",function(){return this.get("userAddress").split("@")[0]}),host:n("userAddress",function(){return"@"+this.get("userAddress").split("@")[1]})})}),define("inspektor/components/account-info/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"rn4KIRZr",block:'{"symbols":[],"statements":[[6,"span"],[9,"class","username"],[7],[1,[18,"username"],false],[8],[0,"\\n"],[6,"br"],[7],[8],[6,"span"],[9,"class","host"],[7],[1,[18,"host"],false],[8],[0,"\\n\\n"],[4,"link-to",["disconnect"],[["class"],["disconnect"]],{"statements":[[0,"disconnect"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/account-info/template.hbs"}})}),define("inspektor/components/breadcrumb-nav/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component,n=Ember.Object,r=Ember.isEmpty | ||||
| e.default=t.extend({tagName:"nav",classNames:["breadcrumb-nav"],currentDirPath:null,linkItems:function(){var e=this.get("currentDirPath") | ||||
| if(r(e))return[] | ||||
| var t=[] | ||||
| return e.split("/").reject(function(e){return r(e)}).forEach(function(r){var o=e.match("(.*"+r+")/")[0] | ||||
| t.pushObject(n.create({name:r,path:o}))}),t}.property("currentDirPath")})}),define("inspektor/components/breadcrumb-nav/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"j3noKP+7",block:'{"symbols":["item"],"statements":[[6,"span"],[9,"class","node"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],["/"]]]],null,{"statements":[[0,"Home"]],"parameters":[]},null],[8],[0,"\\n"],[4,"each",[[20,["linkItems"]]],null,{"statements":[[6,"span"],[9,"class","node"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[1,[19,1,["name"]],false]],"parameters":[]},null],[8],[0,"\\n"]],"parameters":[1]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/breadcrumb-nav/template.hbs"}})}),define("inspektor/components/categories-nav/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component | ||||
| e.default=t.extend({categories:null})}),define("inspektor/components/categories-nav/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"4FB0addV",block:'{"symbols":["category"],"statements":[[4,"if",[[20,["categories"]]],null,{"statements":[[0,"  "],[6,"nav"],[7],[0,"\\n    "],[6,"ul"],[7],[0,"\\n"],[4,"each",[[20,["categories"]]],null,{"statements":[[0,"      "],[6,"li"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[1,[19,1,["name"]],false]],"parameters":[]},null],[8],[0,"\\n"]],"parameters":[1]},null],[0,"    "],[8],[0,"\\n  "],[8],[0,"\\n"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/categories-nav/template.hbs"}})}),define("inspektor/components/directory-listing/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component | ||||
| e.default=t.extend({classNames:["directory-listing"],items:null,itemsSorted:function(){var e=this.get("items") | ||||
| return e.reject(function(e){return"folder"!==e.type}).concat(e.reject(function(e){return"folder"===e.type}))}.property("items")})}),define("inspektor/components/directory-listing/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"K4sJaSiM",block:'{"symbols":["item"],"statements":[[6,"ul"],[9,"class","listing"],[7],[0,"\\n"],[4,"each",[[20,["itemsSorted"]]],null,{"statements":[[0,"  "],[6,"li"],[7],[0,"\\n"],[4,"if",[[19,1,["isFolder"]]],null,{"statements":[[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[0,"        "],[6,"span"],[9,"class","icon"],[7],[1,[25,"item-icon",null,[["type"],[[19,1,["type"]]]]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","name"],[7],[1,[19,1,["name"]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","size"],[7],[8],[0,"\\n        "],[6,"span"],[9,"class","type"],[7],[1,[19,1,["type"]],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]},{"statements":[[0,"      "],[2," TODO link to item "],[0,"\\n"],[4,"link-to",["inspect",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[0,"        "],[6,"span"],[9,"class","icon"],[7],[1,[25,"item-icon",null,[["type"],[[19,1,["type"]]]]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","name"],[7],[1,[19,1,["name"]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","size"],[7],[1,[25,"human-file-size",[[19,1,["size"]]],null],false],[8],[0,"\\n        "],[6,"span"],[9,"class","type"],[7],[1,[19,1,["type"]],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]}],[0,"  "],[8],[0,"\\n"]],"parameters":[1]},null],[8]],"hasEval":false}',meta:{moduleName:"inspektor/components/directory-listing/template.hbs"}})}),define("inspektor/components/file-preview/component",["exports","npm:json-tree-view"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var n=Ember.Component,r=Ember.inject.service,o=Ember.observer,i=Ember.computed.alias,s=Ember.run.scheduleOnce | ||||
| e.default=n.extend({storage:r(),classNames:["file-preview"],fileLoaded:!1,fileContent:null,objectURL:null,metaData:null,isJSON:null,type:i("metaData.type"),isBinary:i("metaData.isBinary"),isImage:function(){return this.get("type").match(/^image\/.+$/)}.property("type"),isText:function(){return!this.get("isBinary")}.property("isBinary"),loadFile:function(){var e=this,t=this.get("metaData.path") | ||||
| this.get("storage.client").getFile(t).then(function(t){if(e.get("isImage")){var n=new window.Uint8Array(t.data),r=new window.Blob([n],{type:t.contentType}) | ||||
| e.set("objectURL",window.URL.createObjectURL(r))}else e.set("fileContent",t.data) | ||||
| e.set("fileLoaded",!0)})}.on("didInsertElement"),onFileLoaded:o("fileLoaded",function(){this.get("fileLoaded")&&this.get("isJSON")&&this.get("jsonShowTree")&&s("afterRender",this,"renderJsonTree")}),onJsonViewChanged:o("jsonShowTree",function(){this.get("fileLoaded")&&this.get("isJSON")&&this.get("jsonShowTree")&&s("afterRender",this,"renderJsonTree")}),renderJsonTree:function(){var e=JSON.parse(this.get("fileContent")),n=new t.default("content",e) | ||||
| n.on("change",function(e,t,n,r){console.log("change",t,n,"=>",r)}),n.on("rename",function(e,t,n,r){console.log("rename",t,n,"=>",r)}),n.on("delete",function(e,t){console.log("delete",t)}),n.on("append",function(e,t,n,r){console.log("append",t,n,"=>",r)}),n.on("click",function(e,t,n){console.log("click",t,"=",n)}),n.on("expand",function(e,t,n){console.log("expand",t,"=",n)}),n.on("collapse",function(e,t,n){console.log("collapse",t,"=",n)}),n.on("refresh",function(e,t,n){console.log("refresh",t,"=",n)}),document.getElementById("json-tree-view").appendChild(n.dom),window.jsonview=n,n.expand(!0),n.withRootName=!1,n.readonly=!0,this.set("jsonTreeView",n)}})}),define("inspektor/components/file-preview/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"7Q1kHSb6",block:'{"symbols":[],"statements":[[4,"if",[[20,["fileLoaded"]]],null,{"statements":[[4,"if",[[20,["isBinary"]]],null,{"statements":[[4,"if",[[20,["isImage"]]],null,{"statements":[[0,"      "],[6,"img"],[10,"src",[18,"objectURL"],null],[10,"alt",[20,["metaData","name"]],null],[7],[8],[0,"\\n"]],"parameters":[]},{"statements":[[0,"      "],[6,"p"],[7],[0,"No preview available for this content type."],[8],[0,"\\n"]],"parameters":[]}]],"parameters":[]},null],[0,"\\n"],[4,"if",[[20,["isText"]]],null,{"statements":[[4,"if",[[20,["isJSON"]]],null,{"statements":[[4,"if",[[20,["jsonShowTree"]]],null,{"statements":[[0,"        "],[6,"div"],[9,"id","json-tree-view"],[7],[8],[0,"\\n"]],"parameters":[]},{"statements":[[0,"        "],[6,"code"],[7],[1,[18,"fileContent"],false],[8],[0,"\\n"]],"parameters":[]}]],"parameters":[]},{"statements":[[0,"      "],[6,"code"],[7],[1,[18,"fileContent"],false],[8],[0,"\\n"]],"parameters":[]}]],"parameters":[]},null]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/file-preview/template.hbs"}})}),define("inspektor/components/item-icon/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component | ||||
| e.default=t.extend({tagName:"img",classNames:["item-icon"],attributeBindings:["src:src"],type:null,isFolder:function(){return"folder"===this.get("type")}.property("type"),src:function(){var e=this.get("type") | ||||
| return"/img/file-icons/"+(this.get("isFolder")?"folder.svg":e.match(/json/i)?"code-curly.svg":"file.svg")}.property()})}),define("inspektor/components/item-icon/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"0RA2e2SD",block:'{"symbols":[],"statements":[],"hasEval":false}',meta:{moduleName:"inspektor/components/item-icon/template.hbs"}})}),define("inspektor/controllers/application",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Controller,n=Ember.Object,r=Ember.computed,o=Ember.observer,i=Ember.inject.service,s=Ember.computed.alias,a=Ember.isEmpty | ||||
| e.default=t.extend({storage:i(),connecting:s("storage.connecting"),connected:s("storage.connected"),userAddress:s("storage.userAddress"),rootListing:s("storage.rootListing"),currentDirPath:null,connectedClass:r("connected",function(){return this.get("connected")?"connected":"disconnected"}),categories:function(){var e=[],t=this.get("rootListing") | ||||
| return a(t)?e:(t.forEach(function(t){t.isFolder&&e.push(n.create({name:t.name.replace("/",""),type:t.type,path:t.name}))}),e)}.property("rootListing"),connectedChange:o("connected",function(){this.get("connected")||this.set("currentDirPath",null)})})}),define("inspektor/controllers/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Controller,n=Ember.inject.controller,r=Ember.inject.service,o=Ember.computed,i=Ember.observer,s=Ember.computed.alias,a=Ember.isPresent,l=Ember.isEmpty,c=Ember.RSVP.all | ||||
| e.default=t.extend({application:n(),storage:r(),connected:s("storage.connected"),rootListing:s("storage.rootListing"),currentDirPath:s("application.currentDirPath"),queryParams:["path"],currentListing:function(){return a(this.get("model.currentListing"))?this.get("model.currentListing").sortBy("name"):this.get("rootListing")}.property("rootListing.[]","model.[]"),documents:o("currentListing.[]",function(){return l(this.get("currentListing"))?[]:this.get("currentListing").reject(function(e){return"/"===e.path.substr(-1)})}),currentListingContainsDocuments:o("documents.[]",function(){return a(this.get("documents"))}),documentCount:o("documents.[]",function(){return a(this.get("documents"))?this.get("documents").length:0}),parentDir:o("currentDirPath",function(){var e=this.get("currentDirPath").split("/").reject(function(e){return l(e)}) | ||||
| return e.splice(0,e.length-1).join("/")+"/"}),connectedChange:i("connected",function(){this.get("connected")||(this.set("model",null),this.set("path",null))}),actions:{deleteDocuments:function(){var e=this,t="This will delete all "+this.get("documentCount")+" documents/files in the current directory. Are you sure?" | ||||
| if(!window.confirm(t))return!1 | ||||
| var n=this.get("storage.client"),r=this.get("documents").map(function(e){return console.debug("removing "+e.path),n.remove(e.path)}) | ||||
| c(r).then(function(){e.transitionToRoute("index",{queryParams:{path:e.get("parentDir")}})})}}})}),define("inspektor/controllers/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Controller,n=Ember.inject.controller,r=Ember.inject.service,o=Ember.computed,i=Ember.computed.alias,s=Ember.isEmpty | ||||
| e.default=t.extend({application:n(),storage:r(),currentDirPath:i("application.currentDirPath"),queryParams:["path"],documentIsJSON:o("model.documentMetaData.type",function(){return!s(this.get("model.documentMetaData"))&&!!this.get("model.documentMetaData.type").match(/application\/json/i)}),jsonView:"tree",jsonShowTree:o.equal("jsonView","tree"),jsonShowSource:o.equal("jsonView","source"),actions:{showJsonTree:function(){this.set("jsonView","tree")},showJsonSource:function(){this.set("jsonView","source")},deleteItem:function(){var e=this | ||||
| window.confirm("Sure?")&&this.get("storage.client").remove(this.get("path")).then(function(){e.transitionToRoute("index",{queryParams:{path:e.get("currentDirPath")}})})}}})}),define("inspektor/helpers/app-version",["exports","inspektor/config/environment","ember-cli-app-version/utils/regexp"],function(e,t,n){function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{} | ||||
| return t.hideSha?o.match(n.versionRegExp)[0]:t.hideVersion?o.match(n.shaRegExp)[0]:o}Object.defineProperty(e,"__esModule",{value:!0}),e.appVersion=r | ||||
| var o=t.default.APP.version | ||||
| e.default=Ember.Helper.helper(r)}),define("inspektor/helpers/human-file-size",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Helper.helper | ||||
| e.default=t(function(e){if(e<1024)return e+" bytes" | ||||
| var t=-1 | ||||
| do{e/=1024,t++}while(e>1024) | ||||
| return String(Math.max(e,.1).toFixed(1)+" "+["KB","MB","GB","TB","PB","EB","ZB","YB"][t])})}),define("inspektor/helpers/pluralize",["exports","ember-inflector/lib/helpers/pluralize"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/helpers/singularize",["exports","ember-inflector/lib/helpers/singularize"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/initializers/app-version",["exports","ember-cli-app-version/initializer-factory","inspektor/config/environment"],function(e,t,n){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var r=n.default.APP,o=r.name,i=r.version | ||||
| e.default={name:"App Version",initialize:(0,t.default)(o,i)}}),define("inspektor/initializers/container-debug-adapter",["exports","ember-resolver/resolvers/classic/container-debug-adapter"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"container-debug-adapter",initialize:function(){var e=arguments[1]||arguments[0] | ||||
| e.register("container-debug-adapter:main",t.default),e.inject("container-debug-adapter:main","namespace","application:main")}}}),define("inspektor/initializers/data-adapter",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"data-adapter",before:"store",initialize:function(){}}}),define("inspektor/initializers/ember-data",["exports","ember-data/setup-container","ember-data"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"ember-data",initialize:t.default}}),define("inspektor/initializers/export-application-global",["exports","inspektor/config/environment"],function(e,t){function n(){var e=arguments[1]||arguments[0] | ||||
| if(!1!==t.default.exportApplicationGlobal){var n | ||||
| if("undefined"!=typeof window)n=window | ||||
| else if("undefined"!=typeof global)n=global | ||||
| else{if("undefined"==typeof self)return | ||||
| n=self}var r,o=t.default.exportApplicationGlobal | ||||
| r="string"==typeof o?o:Ember.String.classify(t.default.modulePrefix),n[r]||(n[r]=e,e.reopen({willDestroy:function(){this._super.apply(this,arguments),delete n[r]}}))}}Object.defineProperty(e,"__esModule",{value:!0}),e.initialize=n,e.default={name:"export-application-global",initialize:n}}),define("inspektor/initializers/injectStore",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"injectStore",before:"store",initialize:function(){}}}),define("inspektor/initializers/store",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"store",after:"ember-data",initialize:function(){}}}),define("inspektor/initializers/transforms",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"transforms",before:"store",initialize:function(){}}}),define("inspektor/instance-initializers/body-class",["exports","ember-body-class/instance-initializers/body-class"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"initialize",{enumerable:!0,get:function(){return t.initialize}})}),define("inspektor/instance-initializers/ember-data",["exports","ember-data/instance-initializers/initialize-store-service"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"ember-data",initialize:t.default}}) | ||||
| define("inspektor/resolver",["exports","ember-resolver"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/router",["exports","inspektor/config/environment"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var n=Ember.Router.extend({location:t.default.locationType,rootURL:t.default.rootURL}) | ||||
| n.map(function(){this.route("inspect"),this.route("connect"),this.route("disconnect")}),e.default=n}),define("inspektor/routes/application",["exports","ember-body-class/mixins/body-class"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var n=Ember.Route,r=Ember.inject.service | ||||
| e.default=n.extend(t.default,{storage:r(),beforeModel:function(){var e=this | ||||
| this.get("storage.rs").on("error",function(t){console.debug("rs.on error",t),"Unauthorized"===t.name?e.handleUnauthorized():"DiscoveryError"===t.name||alert("An unknown error occured. Please check the browser console for details.")})},handleUnauthorized:function(){this.get("storage.unauthorized")||(this.get("storage").setProperties({unauthorized:!0,connecting:!1,connected:!1}),this.transitionTo("connect"))}})}),define("inspektor/routes/connect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service,r=Ember.run.later,o=Ember.RSVP.Promise | ||||
| e.default=t.extend({storage:n(),beforeModel:function(){var e=this | ||||
| return this.waitForConnectionState().then(function(){e.get("storage.connected")&&e.transitionTo("index")})},waitForConnectionState:function(){var e=this | ||||
| return new o(function(t){function n(){e.get("storage.connecting")?r(n,20):t()}n()})}})}),define("inspektor/routes/disconnect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service | ||||
| e.default=t.extend({storage:n(),beforeModel:function(){this.get("storage.rs").disconnect(),this.transitionTo("connect")}})}),define("inspektor/routes/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service,r=Ember.isEmpty,o=Ember.isPresent,i=Ember.run.later,s=Ember.RSVP.hash,a=Ember.RSVP.Promise | ||||
| e.default=t.extend({storage:n(),queryParams:{path:{refreshModel:!0}},beforeModel:function(){var e=this | ||||
| return this.waitForConnectionState().then(function(){e.get("storage.disconnected")&&e.transitionTo("connect")})},model:function(e){var t=e.path | ||||
| return r(e.path)?null:("/"!==t.substr(-1)&&(t+="/"),s({currentListing:this.get("storage").fetchListing(t),currentDirPath:t}))},setupController:function(e,t){this._super(e,t),r(this.get("storage.categories"))&&this.get("storage.connected")&&this.get("storage").fetchRootListing(),o(t)&&(e.set("currentDirPath",t.currentDirPath),r(t.currentListing)&&this.transitionTo("index",{queryParams:{path:e.get("parentDir")}}))},waitForConnectionState:function(){var e=this | ||||
| return new a(function(t){function n(){e.get("storage.connecting")?i(n,20):t()}n()})}})}),define("inspektor/routes/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service,r=Ember.isEmpty,o=Ember.isPresent | ||||
| e.default=t.extend({storage:n(),queryParams:{path:{refreshModel:!0}},model:function(e){var t=e.path | ||||
| r(e.path),t.substr(-1) | ||||
| var n=t.match(/^(.*\/).+$/)[1],o=t.match(/^.*\/(.+)$/)[1] | ||||
| return this.get("storage").fetchListing(n).then(function(e){return e.findBy("name",o)}).then(function(e){return{documentMetaData:e,currentDirPath:n}})},setupController:function(e,t){this._super(e,t),r(this.get("storage.categories"))&&this.get("storage.connected")&&this.get("storage").fetchRootListing(),o(t)&&e.set("currentDirPath",t.currentDirPath)}})}),define("inspektor/services/ajax",["exports","ember-ajax/services/ajax"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("inspektor/services/storage",["exports","npm:remotestoragejs","npm:remotestorage-widget","inspektor/utils/simple-content-type"],function(e,t,n,r){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var o=Ember.Object,i=Ember.Service,s=Ember.computed,a=Ember.observer,l=Ember.isEmpty | ||||
| e.default=i.extend({rs:null,widget:null,connecting:!0,connected:!1,unauthorized:!1,userAddress:null,disconnected:s.not("connected"),client:null,rootListing:null,setup:function(){var e=this,r=new t.default({cache:!1}) | ||||
| r.access.claim("*","rw") | ||||
| var o=new n.default(r,{skipInitial:!0}) | ||||
| o.attach(),r.on("ready",function(){console.debug("rs.on ready")}),r.on("connected",function(){console.debug("rs.on connected"),e.set("connecting",!1),e.set("connected",!0),e.set("userAddress",e.get("rs").remote.userAddress)}),r.on("not-connected",function(){console.debug("rs.on not-connected"),e.set("connecting",!1),e.set("connected",!1)}),r.on("disconnected",function(){console.debug("rs.on disconnected"),e.set("connecting",!1),e.set("connected",!1)}),r.on("connecting",function(){console.debug("rs.on connecting"),e.set("connecting",!0),e.set("connected",!1)}),r.on("authing",function(){console.debug("rs.on authing"),e.set("connecting",!0),e.set("connected",!1)}),this.set("rs",r),this.set("widget",o),this.set("client",r.scope("/"))}.on("init"),connectedChange:a("connected",function(){this.get("connected")?this.fetchRootListing():this.clearLocalData()}),clearLocalData:function(){this.setProperties({userAddress:null,rootListing:null})},fetchRootListing:function(){var e=this | ||||
| this.fetchListing("").then(function(t){e.set("rootListing",t.sortBy("name"))})},fetchListing:function(e){var t=[] | ||||
| return this.get("client").getListing(e).then(function(n){return l(n)?[]:(Object.keys(n).forEach(function(i){var s=n[i],a=s["Content-Type"]||"folder",l=!1 | ||||
| "folder"!==a&&(l=!!a.match(/charset=binary/),a=(0,r.default)(a)),t.push(o.create({name:i,type:a,isBinary:l,isFolder:"folder"===a,size:s["Content-Length"]||null,path:e+i,etag:s.ETag}))}),t)})}})}),define("inspektor/templates/application",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"HpeupCPN",block:'{"symbols":[],"statements":[[6,"div"],[9,"id","app-container"],[10,"class",[18,"connectedClass"],null],[7],[0,"\\n  "],[6,"aside"],[7],[0,"\\n"],[4,"if",[[20,["connected"]]],null,{"statements":[[0,"      "],[1,[25,"account-info",null,[["userAddress"],[[20,["userAddress"]]]]],false],[0,"\\n      "],[1,[25,"categories-nav",null,[["categories"],[[20,["categories"]]]]],false],[0,"\\n"]],"parameters":[]},null],[0,"  "],[8],[0,"\\n  "],[6,"main"],[7],[0,"\\n    "],[1,[18,"outlet"],false],[0,"\\n  "],[8],[0,"\\n"],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/application.hbs"}})}),define("inspektor/templates/connect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"VjXcIYnG",block:'{"symbols":[],"statements":[],"hasEval":false}',meta:{moduleName:"inspektor/templates/connect.hbs"}})}),define("inspektor/templates/disconnect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"2ZbVbnJi",block:'{"symbols":[],"statements":[[1,[18,"outlet"],false]],"hasEval":false}',meta:{moduleName:"inspektor/templates/disconnect.hbs"}})}),define("inspektor/templates/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"niZ23686",block:'{"symbols":[],"statements":[[6,"header"],[7],[0,"\\n  "],[1,[25,"breadcrumb-nav",null,[["currentDirPath"],[[20,["currentDirPath"]]]]],false],[0,"\\n  "],[6,"nav"],[9,"class","actions"],[7],[0,"\\n"],[4,"if",[[20,["currentListingContainsDocuments"]]],null,{"statements":[[0,"    "],[6,"button"],[9,"class","delete-all"],[3,"action",[[19,0,[]],"deleteDocuments"]],[7],[0,"delete all"],[8],[0,"\\n"]],"parameters":[]},null],[0,"  "],[8],[0,"\\n"],[8],[0,"\\n\\n"],[4,"if",[[20,["currentListing"]]],null,{"statements":[[0,"  "],[1,[25,"directory-listing",null,[["items"],[[20,["currentListing"]]]]],false],[0,"\\n"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/templates/index.hbs"}})}),define("inspektor/templates/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"UoZns/4Y",block:'{"symbols":[],"statements":[[6,"header"],[7],[0,"\\n  "],[1,[25,"breadcrumb-nav",null,[["currentDirPath"],[[20,["currentDirPath"]]]]],false],[0,"\\n  "],[6,"nav"],[9,"class","actions"],[7],[0,"\\n"],[4,"if",[[20,["documentIsJSON"]]],null,{"statements":[[0,"      "],[6,"div"],[9,"class","button-group json-view"],[7],[0,"\\n        "],[6,"button"],[10,"disabled",[18,"jsonShowTree"],null],[10,"class",[26,[[25,"if",[[20,["jsonShowTree"]],"active"],null]]]],[3,"action",[[19,0,[]],"showJsonTree"]],[7],[0,"tree view"],[8],[0,"\\n        "],[6,"button"],[10,"disabled",[18,"jsonShowSource"],null],[10,"class",[26,[[25,"if",[[20,["jsonShowSource"]],"active"],null]]]],[3,"action",[[19,0,[]],"showJsonSource"]],[7],[0,"source"],[8],[0,"\\n      "],[8],[0,"\\n"]],"parameters":[]},null],[0,"    "],[6,"button"],[9,"class","delete"],[3,"action",[[19,0,[]],"deleteItem"]],[7],[0,"delete"],[8],[0,"\\n  "],[8],[0,"\\n"],[8],[0,"\\n\\n"],[6,"div"],[9,"class","inspect-details"],[7],[0,"\\n  "],[6,"section"],[9,"class","content"],[7],[0,"\\n    "],[1,[25,"file-preview",null,[["metaData","isJSON","jsonShowTree","jsonShowSource"],[[20,["model","documentMetaData"]],[20,["documentIsJSON"]],[20,["jsonShowTree"]],[20,["jsonShowSource"]]]]],false],[0,"\\n  "],[8],[0,"\\n  "],[6,"section"],[9,"class","meta"],[7],[0,"\\n    "],[6,"dl"],[7],[0,"\\n      "],[6,"dt"],[7],[0,"Name"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","name"]],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Content type"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","type"]],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Size"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[25,"human-file-size",[[20,["model","documentMetaData","size"]]],null],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Revision (ETag)"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","etag"]],false],[8],[0,"\\n    "],[8],[0,"\\n  "],[8],[0,"\\n"],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/inspect.hbs"}})}),define("inspektor/utils/simple-content-type",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){return e.replace(/;.*$/,"")}}),define("inspektor/config/environment",[],function(){try{var e="inspektor/config/environment",t=document.querySelector('meta[name="'+e+'"]').getAttribute("content"),n={default:JSON.parse(unescape(t))} | ||||
| return Object.defineProperty(n,"__esModule",{value:!0}),n}catch(t){throw new Error('Could not read config from meta tag with name "'+e+'".')}}),runningTests||require("inspektor/app").default.create({name:"inspektor",version:"0.7.1+41161308"}) | ||||
							
								
								
									
										85
									
								
								assets/inspektor-53e9698d8279863142b8d544a6281209.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,85 @@ | ||||
| "use strict" | ||||
| define("inspektor/app",["exports","inspektor/resolver","ember-load-initializers","inspektor/config/environment"],function(e,t,n,r){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var o=Ember.Application.extend({modulePrefix:r.default.modulePrefix,podModulePrefix:r.default.podModulePrefix,Resolver:t.default});(0,n.default)(o,r.default.modulePrefix),e.default=o}),define("inspektor/components/account-info/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component,n=Ember.computed | ||||
| e.default=t.extend({classNames:["account-info"],userAddress:null,username:n("userAddress",function(){return this.get("userAddress").split("@")[0]}),host:n("userAddress",function(){return"@"+this.get("userAddress").split("@")[1]})})}),define("inspektor/components/account-info/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"rn4KIRZr",block:'{"symbols":[],"statements":[[6,"span"],[9,"class","username"],[7],[1,[18,"username"],false],[8],[0,"\\n"],[6,"br"],[7],[8],[6,"span"],[9,"class","host"],[7],[1,[18,"host"],false],[8],[0,"\\n\\n"],[4,"link-to",["disconnect"],[["class"],["disconnect"]],{"statements":[[0,"disconnect"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/account-info/template.hbs"}})}),define("inspektor/components/breadcrumb-nav/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component,n=Ember.Object,r=Ember.isEmpty | ||||
| e.default=t.extend({tagName:"nav",classNames:["breadcrumb-nav"],currentDirPath:null,linkItems:function(){var e=this.get("currentDirPath") | ||||
| if(r(e))return[] | ||||
| var t=[] | ||||
| return e.split("/").reject(function(e){return r(e)}).forEach(function(r){var o=e.match("(.*"+r+")/")[0] | ||||
| t.pushObject(n.create({name:r,path:o}))}),t}.property("currentDirPath")})}),define("inspektor/components/breadcrumb-nav/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"j3noKP+7",block:'{"symbols":["item"],"statements":[[6,"span"],[9,"class","node"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],["/"]]]],null,{"statements":[[0,"Home"]],"parameters":[]},null],[8],[0,"\\n"],[4,"each",[[20,["linkItems"]]],null,{"statements":[[6,"span"],[9,"class","node"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[1,[19,1,["name"]],false]],"parameters":[]},null],[8],[0,"\\n"]],"parameters":[1]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/breadcrumb-nav/template.hbs"}})}),define("inspektor/components/categories-nav/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component | ||||
| e.default=t.extend({categories:null})}),define("inspektor/components/categories-nav/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"4FB0addV",block:'{"symbols":["category"],"statements":[[4,"if",[[20,["categories"]]],null,{"statements":[[0,"  "],[6,"nav"],[7],[0,"\\n    "],[6,"ul"],[7],[0,"\\n"],[4,"each",[[20,["categories"]]],null,{"statements":[[0,"      "],[6,"li"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[1,[19,1,["name"]],false]],"parameters":[]},null],[8],[0,"\\n"]],"parameters":[1]},null],[0,"    "],[8],[0,"\\n  "],[8],[0,"\\n"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/categories-nav/template.hbs"}})}),define("inspektor/components/directory-listing/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component | ||||
| e.default=t.extend({classNames:["directory-listing"],items:null,itemsSorted:function(){var e=this.get("items") | ||||
| return e.reject(function(e){return"folder"!==e.type}).concat(e.reject(function(e){return"folder"===e.type}))}.property("items")})}),define("inspektor/components/directory-listing/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"K4sJaSiM",block:'{"symbols":["item"],"statements":[[6,"ul"],[9,"class","listing"],[7],[0,"\\n"],[4,"each",[[20,["itemsSorted"]]],null,{"statements":[[0,"  "],[6,"li"],[7],[0,"\\n"],[4,"if",[[19,1,["isFolder"]]],null,{"statements":[[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[0,"        "],[6,"span"],[9,"class","icon"],[7],[1,[25,"item-icon",null,[["type"],[[19,1,["type"]]]]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","name"],[7],[1,[19,1,["name"]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","size"],[7],[8],[0,"\\n        "],[6,"span"],[9,"class","type"],[7],[1,[19,1,["type"]],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]},{"statements":[[0,"      "],[2," TODO link to item "],[0,"\\n"],[4,"link-to",["inspect",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[0,"        "],[6,"span"],[9,"class","icon"],[7],[1,[25,"item-icon",null,[["type"],[[19,1,["type"]]]]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","name"],[7],[1,[19,1,["name"]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","size"],[7],[1,[25,"human-file-size",[[19,1,["size"]]],null],false],[8],[0,"\\n        "],[6,"span"],[9,"class","type"],[7],[1,[19,1,["type"]],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]}],[0,"  "],[8],[0,"\\n"]],"parameters":[1]},null],[8]],"hasEval":false}',meta:{moduleName:"inspektor/components/directory-listing/template.hbs"}})}),define("inspektor/components/file-preview/component",["exports","npm:json-tree-view"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var n=Ember.Component,r=Ember.inject.service,o=Ember.observer,i=Ember.computed.alias,s=Ember.run.scheduleOnce | ||||
| e.default=n.extend({storage:r(),classNames:["file-preview"],fileLoaded:!1,fileContent:null,objectURL:null,metaData:null,isJSON:null,type:i("metaData.type"),isBinary:i("metaData.isBinary"),isImage:function(){return this.get("type").match(/^image\/.+$/)}.property("type"),isText:function(){return!this.get("isBinary")}.property("isBinary"),loadFile:function(){var e=this,t=this.get("metaData.path") | ||||
| this.get("storage.client").getFile(t).then(function(t){if(e.get("isImage")){var n=new window.Uint8Array(t.data),r=new window.Blob([n],{type:t.contentType}) | ||||
| e.set("objectURL",window.URL.createObjectURL(r))}else e.set("fileContent",t.data) | ||||
| e.set("fileLoaded",!0)})}.on("didInsertElement"),onFileLoaded:o("fileLoaded",function(){this.get("fileLoaded")&&this.get("isJSON")&&this.get("jsonShowTree")&&s("afterRender",this,"renderJsonTree")}),onJsonViewChanged:o("jsonShowTree",function(){this.get("fileLoaded")&&this.get("isJSON")&&this.get("jsonShowTree")&&s("afterRender",this,"renderJsonTree")}),renderJsonTree:function(){var e=JSON.parse(this.get("fileContent")),n=new t.default("content",e) | ||||
| n.on("change",function(e,t,n,r){console.log("change",t,n,"=>",r)}),n.on("rename",function(e,t,n,r){console.log("rename",t,n,"=>",r)}),n.on("delete",function(e,t){console.log("delete",t)}),n.on("append",function(e,t,n,r){console.log("append",t,n,"=>",r)}),n.on("click",function(e,t,n){console.log("click",t,"=",n)}),n.on("expand",function(e,t,n){console.log("expand",t,"=",n)}),n.on("collapse",function(e,t,n){console.log("collapse",t,"=",n)}),n.on("refresh",function(e,t,n){console.log("refresh",t,"=",n)}),document.getElementById("json-tree-view").appendChild(n.dom),window.jsonview=n,n.expand(!0),n.withRootName=!1,n.readonly=!0,this.set("jsonTreeView",n)}})}),define("inspektor/components/file-preview/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"7Q1kHSb6",block:'{"symbols":[],"statements":[[4,"if",[[20,["fileLoaded"]]],null,{"statements":[[4,"if",[[20,["isBinary"]]],null,{"statements":[[4,"if",[[20,["isImage"]]],null,{"statements":[[0,"      "],[6,"img"],[10,"src",[18,"objectURL"],null],[10,"alt",[20,["metaData","name"]],null],[7],[8],[0,"\\n"]],"parameters":[]},{"statements":[[0,"      "],[6,"p"],[7],[0,"No preview available for this content type."],[8],[0,"\\n"]],"parameters":[]}]],"parameters":[]},null],[0,"\\n"],[4,"if",[[20,["isText"]]],null,{"statements":[[4,"if",[[20,["isJSON"]]],null,{"statements":[[4,"if",[[20,["jsonShowTree"]]],null,{"statements":[[0,"        "],[6,"div"],[9,"id","json-tree-view"],[7],[8],[0,"\\n"]],"parameters":[]},{"statements":[[0,"        "],[6,"code"],[7],[1,[18,"fileContent"],false],[8],[0,"\\n"]],"parameters":[]}]],"parameters":[]},{"statements":[[0,"      "],[6,"code"],[7],[1,[18,"fileContent"],false],[8],[0,"\\n"]],"parameters":[]}]],"parameters":[]},null]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/file-preview/template.hbs"}})}),define("inspektor/components/item-icon/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component | ||||
| e.default=t.extend({tagName:"img",classNames:["item-icon"],attributeBindings:["src:src"],type:null,isFolder:function(){return"folder"===this.get("type")}.property("type"),src:function(){var e=this.get("type") | ||||
| return"/img/file-icons/"+(this.get("isFolder")?"folder.svg":e.match(/json/i)?"code-curly.svg":"file.svg")}.property()})}),define("inspektor/components/item-icon/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"0RA2e2SD",block:'{"symbols":[],"statements":[],"hasEval":false}',meta:{moduleName:"inspektor/components/item-icon/template.hbs"}})}),define("inspektor/controllers/application",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Controller,n=Ember.Object,r=Ember.computed,o=Ember.observer,i=Ember.inject.service,s=Ember.computed.alias,a=Ember.isEmpty | ||||
| e.default=t.extend({storage:i(),connecting:s("storage.connecting"),connected:s("storage.connected"),userAddress:s("storage.userAddress"),rootListing:s("storage.rootListing"),currentDirPath:null,connectedClass:r("connected",function(){return this.get("connected")?"connected":"disconnected"}),categories:function(){var e=[],t=this.get("rootListing") | ||||
| return a(t)?e:(t.forEach(function(t){t.isFolder&&e.push(n.create({name:t.name.replace("/",""),type:t.type,path:t.name}))}),e)}.property("rootListing"),connectedChange:o("connected",function(){this.get("connected")||this.set("currentDirPath",null)})})}),define("inspektor/controllers/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Controller,n=Ember.inject.controller,r=Ember.inject.service,o=Ember.computed,i=Ember.observer,s=Ember.computed.alias,a=Ember.isPresent,l=Ember.isEmpty,c=Ember.RSVP.all | ||||
| e.default=t.extend({application:n(),storage:r(),connected:s("storage.connected"),rootListing:s("storage.rootListing"),currentDirPath:s("application.currentDirPath"),queryParams:["path"],currentListing:function(){return a(this.get("model.currentListing"))?this.get("model.currentListing").sortBy("name"):this.get("rootListing")}.property("rootListing.[]","model.[]"),documents:o("currentListing.[]",function(){return l(this.get("currentListing"))?[]:this.get("currentListing").reject(function(e){return"/"===e.path.substr(-1)})}),currentListingContainsDocuments:o("documents.[]",function(){return a(this.get("documents"))}),documentCount:o("documents.[]",function(){return a(this.get("documents"))?this.get("documents").length:0}),parentDir:o("currentDirPath",function(){var e=this.get("currentDirPath").split("/").reject(function(e){return l(e)}) | ||||
| return e.splice(0,e.length-1).join("/")+"/"}),connectedChange:i("connected",function(){this.get("connected")||(this.set("model",null),this.set("path",null))}),actions:{deleteDocuments:function(){var e=this,t="This will delete all "+this.get("documentCount")+" documents/files in the current directory. Are you sure?" | ||||
| if(!window.confirm(t))return!1 | ||||
| var n=this.get("storage.client"),r=this.get("documents").map(function(e){return console.debug("removing "+e.path),n.remove(e.path)}) | ||||
| c(r).then(function(){e.transitionToRoute("index",{queryParams:{path:e.get("parentDir")}})})}}})}),define("inspektor/controllers/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Controller,n=Ember.inject.controller,r=Ember.inject.service,o=Ember.computed,i=Ember.computed.alias,s=Ember.isEmpty | ||||
| e.default=t.extend({application:n(),storage:r(),currentDirPath:i("application.currentDirPath"),queryParams:["path"],documentIsJSON:o("model.documentMetaData.type",function(){return!s(this.get("model.documentMetaData"))&&!!this.get("model.documentMetaData.type").match(/application\/json/i)}),jsonView:"tree",jsonShowTree:o.equal("jsonView","tree"),jsonShowSource:o.equal("jsonView","source"),actions:{showJsonTree:function(){this.set("jsonView","tree")},showJsonSource:function(){this.set("jsonView","source")},deleteItem:function(){var e=this | ||||
| window.confirm("Sure?")&&this.get("storage.client").remove(this.get("path")).then(function(){e.transitionToRoute("index",{queryParams:{path:e.get("currentDirPath")}})})}}})}),define("inspektor/helpers/app-version",["exports","inspektor/config/environment","ember-cli-app-version/utils/regexp"],function(e,t,n){function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{} | ||||
| return t.hideSha?o.match(n.versionRegExp)[0]:t.hideVersion?o.match(n.shaRegExp)[0]:o}Object.defineProperty(e,"__esModule",{value:!0}),e.appVersion=r | ||||
| var o=t.default.APP.version | ||||
| e.default=Ember.Helper.helper(r)}),define("inspektor/helpers/human-file-size",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Helper.helper | ||||
| e.default=t(function(e){if(e<1024)return e+" bytes" | ||||
| var t=-1 | ||||
| do{e/=1024,t++}while(e>1024) | ||||
| return String(Math.max(e,.1).toFixed(1)+" "+["KB","MB","GB","TB","PB","EB","ZB","YB"][t])})}),define("inspektor/helpers/pluralize",["exports","ember-inflector/lib/helpers/pluralize"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/helpers/singularize",["exports","ember-inflector/lib/helpers/singularize"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/initializers/app-version",["exports","ember-cli-app-version/initializer-factory","inspektor/config/environment"],function(e,t,n){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var r=n.default.APP,o=r.name,i=r.version | ||||
| e.default={name:"App Version",initialize:(0,t.default)(o,i)}}),define("inspektor/initializers/container-debug-adapter",["exports","ember-resolver/resolvers/classic/container-debug-adapter"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"container-debug-adapter",initialize:function(){var e=arguments[1]||arguments[0] | ||||
| e.register("container-debug-adapter:main",t.default),e.inject("container-debug-adapter:main","namespace","application:main")}}}),define("inspektor/initializers/data-adapter",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"data-adapter",before:"store",initialize:function(){}}}),define("inspektor/initializers/ember-data",["exports","ember-data/setup-container","ember-data"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"ember-data",initialize:t.default}}),define("inspektor/initializers/export-application-global",["exports","inspektor/config/environment"],function(e,t){function n(){var e=arguments[1]||arguments[0] | ||||
| if(!1!==t.default.exportApplicationGlobal){var n | ||||
| if("undefined"!=typeof window)n=window | ||||
| else if("undefined"!=typeof global)n=global | ||||
| else{if("undefined"==typeof self)return | ||||
| n=self}var r,o=t.default.exportApplicationGlobal | ||||
| r="string"==typeof o?o:Ember.String.classify(t.default.modulePrefix),n[r]||(n[r]=e,e.reopen({willDestroy:function(){this._super.apply(this,arguments),delete n[r]}}))}}Object.defineProperty(e,"__esModule",{value:!0}),e.initialize=n,e.default={name:"export-application-global",initialize:n}}),define("inspektor/initializers/injectStore",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"injectStore",before:"store",initialize:function(){}}}),define("inspektor/initializers/store",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"store",after:"ember-data",initialize:function(){}}}),define("inspektor/initializers/transforms",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"transforms",before:"store",initialize:function(){}}}),define("inspektor/instance-initializers/body-class",["exports","ember-body-class/instance-initializers/body-class"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"initialize",{enumerable:!0,get:function(){return t.initialize}})}),define("inspektor/instance-initializers/ember-data",["exports","ember-data/instance-initializers/initialize-store-service"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"ember-data",initialize:t.default}}) | ||||
| define("inspektor/resolver",["exports","ember-resolver"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/router",["exports","inspektor/config/environment"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var n=Ember.Router.extend({location:t.default.locationType,rootURL:t.default.rootURL}) | ||||
| n.map(function(){this.route("inspect"),this.route("connect"),this.route("disconnect")}),e.default=n}),define("inspektor/routes/application",["exports","ember-body-class/mixins/body-class"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var n=Ember.Route,r=Ember.inject.service | ||||
| e.default=n.extend(t.default,{storage:r(),beforeModel:function(){var e=this | ||||
| this.get("storage.rs").on("error",function(t){console.debug("rs.on error",t),"Unauthorized"===t.name?e.handleUnauthorized():"DiscoveryError"===t.name||alert("An unknown error occured. Please check the browser console for details.")})},handleUnauthorized:function(){this.get("storage.unauthorized")||(this.get("storage").setProperties({unauthorized:!0,connecting:!1,connected:!1}),this.transitionTo("connect"))}})}),define("inspektor/routes/connect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service,r=Ember.run.later,o=Ember.RSVP.Promise | ||||
| e.default=t.extend({storage:n(),beforeModel:function(){var e=this | ||||
| return this.waitForConnectionState().then(function(){e.get("storage.connected")&&e.transitionTo("index")})},waitForConnectionState:function(){var e=this | ||||
| return new o(function(t){function n(){e.get("storage.connecting")?r(n,20):t()}n()})}})}),define("inspektor/routes/disconnect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service | ||||
| e.default=t.extend({storage:n(),beforeModel:function(){this.get("storage.rs").disconnect(),this.transitionTo("connect")}})}),define("inspektor/routes/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service,r=Ember.isEmpty,o=Ember.isPresent,i=Ember.run.later,s=Ember.RSVP.hash,a=Ember.RSVP.Promise | ||||
| e.default=t.extend({storage:n(),queryParams:{path:{refreshModel:!0}},beforeModel:function(){var e=this | ||||
| return this.waitForConnectionState().then(function(){e.get("storage.disconnected")&&e.transitionTo("connect")})},model:function(e){var t=e.path | ||||
| return r(e.path)?null:("/"!==t.substr(-1)&&(t+="/"),s({currentListing:this.get("storage").fetchListing(t),currentDirPath:t}))},setupController:function(e,t){this._super(e,t),r(this.get("storage.categories"))&&this.get("storage.connected")&&this.get("storage").fetchRootListing(),o(t)&&(e.set("currentDirPath",t.currentDirPath),r(t.currentListing)&&this.transitionTo("index",{queryParams:{path:e.get("parentDir")}}))},waitForConnectionState:function(){var e=this | ||||
| return new a(function(t){function n(){e.get("storage.connecting")?i(n,20):t()}n()})}})}),define("inspektor/routes/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service,r=Ember.isEmpty,o=Ember.isPresent | ||||
| e.default=t.extend({storage:n(),queryParams:{path:{refreshModel:!0}},model:function(e){var t=e.path | ||||
| r(e.path),t.substr(-1) | ||||
| var n=t.match(/^(.*\/).+$/)[1],o=t.match(/^.*\/(.+)$/)[1] | ||||
| return this.get("storage").fetchListing(n).then(function(e){return e.findBy("name",o)}).then(function(e){return{documentMetaData:e,currentDirPath:n}})},setupController:function(e,t){this._super(e,t),r(this.get("storage.categories"))&&this.get("storage.connected")&&this.get("storage").fetchRootListing(),o(t)&&e.set("currentDirPath",t.currentDirPath)}})}),define("inspektor/services/ajax",["exports","ember-ajax/services/ajax"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("inspektor/services/storage",["exports","npm:remotestoragejs","npm:remotestorage-widget","inspektor/utils/simple-content-type"],function(e,t,n,r){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var o=Ember.Object,i=Ember.Service,s=Ember.computed,a=Ember.observer,l=Ember.isEmpty | ||||
| e.default=i.extend({rs:null,widget:null,connecting:!0,connected:!1,unauthorized:!1,userAddress:null,disconnected:s.not("connected"),client:null,rootListing:null,setup:function(){var e=this,r=new t.default({cache:!1}) | ||||
| r.access.claim("*","rw") | ||||
| var o=new n.default(r,{skipInitial:!0}) | ||||
| o.attach(),r.on("ready",function(){console.debug("rs.on ready")}),r.on("connected",function(){console.debug("rs.on connected"),e.set("connecting",!1),e.set("connected",!0),e.set("userAddress",e.get("rs").remote.userAddress)}),r.on("not-connected",function(){console.debug("rs.on not-connected"),e.set("connecting",!1),e.set("connected",!1)}),r.on("disconnected",function(){console.debug("rs.on disconnected"),e.set("connecting",!1),e.set("connected",!1)}),r.on("connecting",function(){console.debug("rs.on connecting"),e.set("connecting",!0),e.set("connected",!1)}),r.on("authing",function(){console.debug("rs.on authing"),e.set("connecting",!0),e.set("connected",!1)}),this.set("rs",r),this.set("widget",o),this.set("client",r.scope("/"))}.on("init"),connectedChange:a("connected",function(){this.get("connected")?this.fetchRootListing():this.clearLocalData()}),clearLocalData:function(){this.setProperties({userAddress:null,rootListing:null})},fetchRootListing:function(){var e=this | ||||
| this.fetchListing("").then(function(t){e.set("rootListing",t.sortBy("name"))})},fetchListing:function(e){var t=[] | ||||
| return this.get("client").getListing(e).then(function(n){return l(n)?[]:(Object.keys(n).forEach(function(i){var s=n[i],a=s["Content-Type"]||"folder",l=!1 | ||||
| "folder"!==a&&(l=!!a.match(/charset=binary/),a=(0,r.default)(a)),t.push(o.create({name:i,type:a,isBinary:l,isFolder:"folder"===a,size:s["Content-Length"]||null,path:e+i,etag:s.ETag}))}),t)})}})}),define("inspektor/templates/application",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"HpeupCPN",block:'{"symbols":[],"statements":[[6,"div"],[9,"id","app-container"],[10,"class",[18,"connectedClass"],null],[7],[0,"\\n  "],[6,"aside"],[7],[0,"\\n"],[4,"if",[[20,["connected"]]],null,{"statements":[[0,"      "],[1,[25,"account-info",null,[["userAddress"],[[20,["userAddress"]]]]],false],[0,"\\n      "],[1,[25,"categories-nav",null,[["categories"],[[20,["categories"]]]]],false],[0,"\\n"]],"parameters":[]},null],[0,"  "],[8],[0,"\\n  "],[6,"main"],[7],[0,"\\n    "],[1,[18,"outlet"],false],[0,"\\n  "],[8],[0,"\\n"],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/application.hbs"}})}),define("inspektor/templates/connect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"VjXcIYnG",block:'{"symbols":[],"statements":[],"hasEval":false}',meta:{moduleName:"inspektor/templates/connect.hbs"}})}),define("inspektor/templates/disconnect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"2ZbVbnJi",block:'{"symbols":[],"statements":[[1,[18,"outlet"],false]],"hasEval":false}',meta:{moduleName:"inspektor/templates/disconnect.hbs"}})}),define("inspektor/templates/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"niZ23686",block:'{"symbols":[],"statements":[[6,"header"],[7],[0,"\\n  "],[1,[25,"breadcrumb-nav",null,[["currentDirPath"],[[20,["currentDirPath"]]]]],false],[0,"\\n  "],[6,"nav"],[9,"class","actions"],[7],[0,"\\n"],[4,"if",[[20,["currentListingContainsDocuments"]]],null,{"statements":[[0,"    "],[6,"button"],[9,"class","delete-all"],[3,"action",[[19,0,[]],"deleteDocuments"]],[7],[0,"delete all"],[8],[0,"\\n"]],"parameters":[]},null],[0,"  "],[8],[0,"\\n"],[8],[0,"\\n\\n"],[4,"if",[[20,["currentListing"]]],null,{"statements":[[0,"  "],[1,[25,"directory-listing",null,[["items"],[[20,["currentListing"]]]]],false],[0,"\\n"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/templates/index.hbs"}})}),define("inspektor/templates/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"UoZns/4Y",block:'{"symbols":[],"statements":[[6,"header"],[7],[0,"\\n  "],[1,[25,"breadcrumb-nav",null,[["currentDirPath"],[[20,["currentDirPath"]]]]],false],[0,"\\n  "],[6,"nav"],[9,"class","actions"],[7],[0,"\\n"],[4,"if",[[20,["documentIsJSON"]]],null,{"statements":[[0,"      "],[6,"div"],[9,"class","button-group json-view"],[7],[0,"\\n        "],[6,"button"],[10,"disabled",[18,"jsonShowTree"],null],[10,"class",[26,[[25,"if",[[20,["jsonShowTree"]],"active"],null]]]],[3,"action",[[19,0,[]],"showJsonTree"]],[7],[0,"tree view"],[8],[0,"\\n        "],[6,"button"],[10,"disabled",[18,"jsonShowSource"],null],[10,"class",[26,[[25,"if",[[20,["jsonShowSource"]],"active"],null]]]],[3,"action",[[19,0,[]],"showJsonSource"]],[7],[0,"source"],[8],[0,"\\n      "],[8],[0,"\\n"]],"parameters":[]},null],[0,"    "],[6,"button"],[9,"class","delete"],[3,"action",[[19,0,[]],"deleteItem"]],[7],[0,"delete"],[8],[0,"\\n  "],[8],[0,"\\n"],[8],[0,"\\n\\n"],[6,"div"],[9,"class","inspect-details"],[7],[0,"\\n  "],[6,"section"],[9,"class","content"],[7],[0,"\\n    "],[1,[25,"file-preview",null,[["metaData","isJSON","jsonShowTree","jsonShowSource"],[[20,["model","documentMetaData"]],[20,["documentIsJSON"]],[20,["jsonShowTree"]],[20,["jsonShowSource"]]]]],false],[0,"\\n  "],[8],[0,"\\n  "],[6,"section"],[9,"class","meta"],[7],[0,"\\n    "],[6,"dl"],[7],[0,"\\n      "],[6,"dt"],[7],[0,"Name"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","name"]],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Content type"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","type"]],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Size"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[25,"human-file-size",[[20,["model","documentMetaData","size"]]],null],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Revision (ETag)"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","etag"]],false],[8],[0,"\\n    "],[8],[0,"\\n  "],[8],[0,"\\n"],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/inspect.hbs"}})}),define("inspektor/utils/simple-content-type",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){return e.replace(/;.*$/,"")}}),define("inspektor/config/environment",[],function(){try{var e="inspektor/config/environment",t=document.querySelector('meta[name="'+e+'"]').getAttribute("content"),n={default:JSON.parse(unescape(t))} | ||||
| return Object.defineProperty(n,"__esModule",{value:!0}),n}catch(t){throw new Error('Could not read config from meta tag with name "'+e+'".')}}),runningTests||require("inspektor/app").default.create({name:"inspektor",version:"0.7.1+c46f3633"}) | ||||
							
								
								
									
										1
									
								
								assets/inspektor-5e0ac396a8b2f8f2404ef39082232448.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										88
									
								
								assets/inspektor-6948eb1e712f63c72e28bcc0e6c6b27d.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										1
									
								
								assets/inspektor-6badec7395e2641601730597c61ebd6b.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1 @@ | ||||
| @charset "UTF-8";.directory-listing ul.listing li:first-of-type,.inspect-details section{border-top:1px solid #ececec}body{transition:background-color .2s linear}#app-container,#app-container>main{background-color:#fff}#app-container>aside{background-color:#2a3743;color:#b5c3d1;transition:flex .2s ease-in}#app-container>aside a{color:#b5c3d1;text-decoration:none}#app-container>aside a:hover{color:#fff}#app-container>main>header a:link,#app-container>main>header a:visited{color:#aaa}#app-container>main>header a:hover{color:#2a3743}#app-container.disconnected main{background-color:#ececec}*{box-sizing:border-box;-moz-outline:none;outline:0}#remotestorage-widget{display:none;position:absolute;top:20%;left:50%;margin-left:-200px;z-index:23}.connect #remotestorage-widget{display:block}#app-container{position:absolute;top:0;left:0;bottom:0;right:0;overflow:hidden;display:flex;flex-direction:row;justify-content:flex-start;align-items:stretch}#app-container.disconnected>aside{flex:0;overflow:hidden}#app-container.connected>aside{flex:0 0 16rem;overflow:auto;padding:2rem}#app-container>aside .account-info{height:5rem}#app-container>main{flex:1;overflow:auto;padding:3rem 4rem}#app-container>main>header{height:4rem;display:flex;flex-direction:row}#app-container>main>header nav.breadcrumb-nav{flex:1}#app-container>main>header nav.actions{flex:1;text-align:right}.inspect-details{width:100%;display:grid;grid-template-columns:1.618fr 3rem 1fr}.inspect-details section{padding:1.5rem 1px}.inspect-details section.content{overflow:hidden}.inspect-details section.meta{grid-column-start:3;overflow:hidden}.inspect-details section.meta dl{margin:0}.inspect-details section.meta dl dd,.inspect-details section.meta dl dt{display:block}.inspect-details section.meta dl dt{font-size:.76rem;text-transform:uppercase;letter-spacing:.05em;color:#aaa;margin-bottom:.4rem}.inspect-details section.meta dl dd{margin:0 0 1.5rem}body{background-color:#fff;font-size:16px;font-family:Open Sans,sans-serif;color:#2a3743;margin:0;padding:0}.account-info{position:relative}.account-info .username{font-size:1.4rem}.account-info .host{font-size:.8rem;opacity:.7}.account-info .disconnect{display:inline-block;margin-left:.5rem;font-size:.8rem;opacity:0;transition:opacity .2s linear}.account-info:hover .disconnect{font-size:.8rem;opacity:1}.breadcrumb-nav a.active{text-decoration:none}.breadcrumb-nav .node{display:inline-block}.breadcrumb-nav .node+.node{margin-left:.5rem}.breadcrumb-nav .node+.node::before{content:'›';padding-right:.6rem}#app-container>aside nav ul{list-style:none;margin:0;padding:0}#app-container>aside nav a{display:block;padding:.2rem 0}.directory-listing ul.listing{display:block;width:100%;margin:0 0 6rem;padding:0}.directory-listing ul.listing li{display:table;width:100%;border-bottom:1px solid #ececec}.directory-listing ul.listing li:hover span{opacity:.7;cursor:pointer}.directory-listing ul.listing li a{display:table-row;text-decoration:none;color:#2a3743}.directory-listing ul.listing li a span{display:table-cell;padding:1rem 1.5rem}.directory-listing ul.listing li a span.icon{width:3%;padding-left:0;padding-right:0;text-align:center}.directory-listing ul.listing li a span.name{width:60%}.directory-listing ul.listing li a span.size{width:10%;white-space:nowrap;color:#aaa}.directory-listing ul.listing li a span.type{width:27%;white-space:nowrap;color:#aaa}ul.listing span.icon img{height:1.2rem;vertical-align:middle}.file-preview code{overflow-wrap:break-word;word-wrap:break-word;word-break:break-all;hyphens:none}.file-preview img{max-width:100%} | ||||
							
								
								
									
										1
									
								
								assets/inspektor-74377c60084fbd220b898a1efa0ad8e0.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										84
									
								
								assets/inspektor-7f95eb3a2453eaf53329370c826abb61.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,84 @@ | ||||
| "use strict" | ||||
| define("inspektor/app",["exports","inspektor/resolver","ember-load-initializers","inspektor/config/environment"],function(e,t,n,r){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var i=Ember.Application.extend({modulePrefix:r.default.modulePrefix,podModulePrefix:r.default.podModulePrefix,Resolver:t.default});(0,n.default)(i,r.default.modulePrefix),e.default=i}),define("inspektor/components/account-info/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component,n=Ember.computed | ||||
| e.default=t.extend({classNames:["account-info"],userAddress:null,username:n("userAddress",function(){return this.get("userAddress").split("@")[0]}),host:n("userAddress",function(){return"@"+this.get("userAddress").split("@")[1]})})}),define("inspektor/components/account-info/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"rn4KIRZr",block:'{"symbols":[],"statements":[[6,"span"],[9,"class","username"],[7],[1,[18,"username"],false],[8],[0,"\\n"],[6,"br"],[7],[8],[6,"span"],[9,"class","host"],[7],[1,[18,"host"],false],[8],[0,"\\n\\n"],[4,"link-to",["disconnect"],[["class"],["disconnect"]],{"statements":[[0,"disconnect"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/account-info/template.hbs"}})}),define("inspektor/components/breadcrumb-nav/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component,n=Ember.Object,r=Ember.isEmpty | ||||
| e.default=t.extend({tagName:"nav",classNames:["breadcrumb-nav"],currentDirPath:null,linkItems:function(){var e=this.get("currentDirPath") | ||||
| if(r(e))return[] | ||||
| var t=[] | ||||
| return e.split("/").reject(function(e){return r(e)}).forEach(function(r){var i=e.match("(.*"+r+")/")[0] | ||||
| t.pushObject(n.create({name:r,path:i}))}),t}.property("currentDirPath")})}),define("inspektor/components/breadcrumb-nav/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"j3noKP+7",block:'{"symbols":["item"],"statements":[[6,"span"],[9,"class","node"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],["/"]]]],null,{"statements":[[0,"Home"]],"parameters":[]},null],[8],[0,"\\n"],[4,"each",[[20,["linkItems"]]],null,{"statements":[[6,"span"],[9,"class","node"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[1,[19,1,["name"]],false]],"parameters":[]},null],[8],[0,"\\n"]],"parameters":[1]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/breadcrumb-nav/template.hbs"}})}),define("inspektor/components/categories-nav/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component | ||||
| e.default=t.extend({categories:null})}),define("inspektor/components/categories-nav/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"4FB0addV",block:'{"symbols":["category"],"statements":[[4,"if",[[20,["categories"]]],null,{"statements":[[0,"  "],[6,"nav"],[7],[0,"\\n    "],[6,"ul"],[7],[0,"\\n"],[4,"each",[[20,["categories"]]],null,{"statements":[[0,"      "],[6,"li"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[1,[19,1,["name"]],false]],"parameters":[]},null],[8],[0,"\\n"]],"parameters":[1]},null],[0,"    "],[8],[0,"\\n  "],[8],[0,"\\n"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/categories-nav/template.hbs"}})}),define("inspektor/components/directory-listing/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component | ||||
| e.default=t.extend({classNames:["directory-listing"],items:null,itemsSorted:function(){var e=this.get("items") | ||||
| return e.reject(function(e){return"folder"!==e.type}).concat(e.reject(function(e){return"folder"===e.type}))}.property("items")})}),define("inspektor/components/directory-listing/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"K4sJaSiM",block:'{"symbols":["item"],"statements":[[6,"ul"],[9,"class","listing"],[7],[0,"\\n"],[4,"each",[[20,["itemsSorted"]]],null,{"statements":[[0,"  "],[6,"li"],[7],[0,"\\n"],[4,"if",[[19,1,["isFolder"]]],null,{"statements":[[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[0,"        "],[6,"span"],[9,"class","icon"],[7],[1,[25,"item-icon",null,[["type"],[[19,1,["type"]]]]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","name"],[7],[1,[19,1,["name"]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","size"],[7],[8],[0,"\\n        "],[6,"span"],[9,"class","type"],[7],[1,[19,1,["type"]],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]},{"statements":[[0,"      "],[2," TODO link to item "],[0,"\\n"],[4,"link-to",["inspect",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[0,"        "],[6,"span"],[9,"class","icon"],[7],[1,[25,"item-icon",null,[["type"],[[19,1,["type"]]]]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","name"],[7],[1,[19,1,["name"]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","size"],[7],[1,[25,"human-file-size",[[19,1,["size"]]],null],false],[8],[0,"\\n        "],[6,"span"],[9,"class","type"],[7],[1,[19,1,["type"]],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]}],[0,"  "],[8],[0,"\\n"]],"parameters":[1]},null],[8]],"hasEval":false}',meta:{moduleName:"inspektor/components/directory-listing/template.hbs"}})}),define("inspektor/components/file-preview/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component,n=Ember.computed.alias | ||||
| e.default=t.extend({storage:null,classNames:["file-preview"],fileLoaded:!1,fileContent:null,objectURL:null,metaData:null,type:n("metaData.type"),isBinary:n("metaData.isBinary"),isImage:function(){return this.get("type").match(/^image\/.+$/)}.property("type"),isText:function(){return!this.get("isBinary")}.property("isBinary"),loadFile:function(){var e=this,t=this.get("metaData.path") | ||||
| this.get("storage.client").getFile(t).then(function(t){if(e.get("isImage")){var n=new window.Uint8Array(t.data),r=new window.Blob([n],{type:t.contentType}) | ||||
| e.set("objectURL",window.URL.createObjectURL(r))}else e.set("fileContent",t.data) | ||||
| e.set("fileLoaded",!0)})}.on("init")})}),define("inspektor/components/file-preview/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"S7eRlRkE",block:'{"symbols":[],"statements":[[4,"if",[[20,["fileLoaded"]]],null,{"statements":[[4,"if",[[20,["isBinary"]]],null,{"statements":[[4,"if",[[20,["isImage"]]],null,{"statements":[[0,"      "],[6,"img"],[10,"src",[18,"objectURL"],null],[10,"alt",[20,["metaData","name"]],null],[7],[8],[0,"\\n"]],"parameters":[]},{"statements":[[0,"      "],[6,"p"],[7],[0,"No preview available for this content type."],[8],[0,"\\n"]],"parameters":[]}]],"parameters":[]},null],[0,"\\n"],[4,"if",[[20,["isText"]]],null,{"statements":[[0,"    "],[6,"code"],[7],[1,[18,"fileContent"],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/file-preview/template.hbs"}})}),define("inspektor/components/item-icon/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component | ||||
| e.default=t.extend({tagName:"img",classNames:["item-icon"],attributeBindings:["src:src"],type:null,isFolder:function(){return"folder"===this.get("type")}.property("type"),src:function(){var e=this.get("type") | ||||
| return"/img/file-icons/"+(this.get("isFolder")?"folder.svg":e.match(/json/i)?"code-curly.svg":"file.svg")}.property()})}),define("inspektor/components/item-icon/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"0RA2e2SD",block:'{"symbols":[],"statements":[],"hasEval":false}',meta:{moduleName:"inspektor/components/item-icon/template.hbs"}})}),define("inspektor/controllers/application",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Controller,n=Ember.Object,r=Ember.computed,i=Ember.observer,o=Ember.inject.service,s=Ember.computed.alias,a=Ember.isEmpty | ||||
| e.default=t.extend({storage:o(),connecting:s("storage.connecting"),connected:s("storage.connected"),userAddress:s("storage.userAddress"),rootListing:s("storage.rootListing"),currentDirPath:null,connectedClass:r("connected",function(){return this.get("connected")?"connected":"disconnected"}),categories:function(){var e=[],t=this.get("rootListing") | ||||
| return a(t)?e:(t.forEach(function(t){t.isFolder&&e.push(n.create({name:t.name.replace("/",""),type:t.type,path:t.name}))}),e)}.property("rootListing"),connectedChange:i("connected",function(){this.get("connected")||this.set("currentDirPath",null)})})}),define("inspektor/controllers/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Controller,n=Ember.inject.controller,r=Ember.inject.service,i=Ember.computed,o=Ember.observer,s=Ember.computed.alias,a=Ember.isPresent,l=Ember.isEmpty,c=Ember.RSVP.all | ||||
| e.default=t.extend({application:n(),storage:r(),connected:s("storage.connected"),rootListing:s("storage.rootListing"),currentDirPath:s("application.currentDirPath"),queryParams:["path"],currentListing:function(){return a(this.get("model.currentListing"))?this.get("model.currentListing").sortBy("name"):this.get("rootListing")}.property("rootListing.[]","model.[]"),documents:i("currentListing.[]",function(){return this.get("currentListing").reject(function(e){return"/"===e.path.substr(-1)})}),currentListingContainsDocuments:i("documents.[]",function(){return a(this.get("documents"))}),documentCount:i("documents.[]",function(){return a(this.get("documents"))?this.get("documents").length:0}),parentDir:i("currentDirPath",function(){var e=this.get("currentDirPath").split("/").reject(function(e){return l(e)}) | ||||
| return e.splice(0,e.length-1).join("/")+"/"}),connectedChange:o("connected",function(){this.get("connected")||(this.set("model",null),this.set("path",null))}),actions:{deleteDocuments:function(){var e=this,t="This will delete all "+this.get("documentCount")+" documents/files in the current directory. Are you sure?" | ||||
| if(!window.confirm(t))return!1 | ||||
| var n=this.get("storage.client"),r=this.get("documents").map(function(e){return console.debug("removing "+e.path),n.remove(e.path)}) | ||||
| c(r).then(function(){e.transitionToRoute("index",{queryParams:{path:e.get("parentDir")}})})}}})}),define("inspektor/controllers/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Controller,n=Ember.inject.controller,r=Ember.inject.service,i=Ember.computed.alias | ||||
| e.default=t.extend({application:n(),storage:r(),currentDirPath:i("application.currentDirPath"),queryParams:["path"],actions:{deleteItem:function(){var e=this | ||||
| window.confirm("Sure?")&&this.get("storage.client").remove(this.get("path")).then(function(){e.transitionToRoute("index",{queryParams:{path:e.get("currentDirPath")}})})}}})}),define("inspektor/helpers/app-version",["exports","inspektor/config/environment","ember-cli-app-version/utils/regexp"],function(e,t,n){function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{} | ||||
| return t.hideSha?i.match(n.versionRegExp)[0]:t.hideVersion?i.match(n.shaRegExp)[0]:i}Object.defineProperty(e,"__esModule",{value:!0}),e.appVersion=r | ||||
| var i=t.default.APP.version | ||||
| e.default=Ember.Helper.helper(r)}),define("inspektor/helpers/human-file-size",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Helper.helper | ||||
| e.default=t(function(e){if(e<1024)return e+" bytes" | ||||
| var t=-1 | ||||
| do{e/=1024,t++}while(e>1024) | ||||
| return String(Math.max(e,.1).toFixed(1)+" "+["KB","MB","GB","TB","PB","EB","ZB","YB"][t])})}),define("inspektor/helpers/pluralize",["exports","ember-inflector/lib/helpers/pluralize"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/helpers/singularize",["exports","ember-inflector/lib/helpers/singularize"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/initializers/app-version",["exports","ember-cli-app-version/initializer-factory","inspektor/config/environment"],function(e,t,n){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var r=n.default.APP,i=r.name,o=r.version | ||||
| e.default={name:"App Version",initialize:(0,t.default)(i,o)}}),define("inspektor/initializers/container-debug-adapter",["exports","ember-resolver/resolvers/classic/container-debug-adapter"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"container-debug-adapter",initialize:function(){var e=arguments[1]||arguments[0] | ||||
| e.register("container-debug-adapter:main",t.default),e.inject("container-debug-adapter:main","namespace","application:main")}}}),define("inspektor/initializers/data-adapter",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"data-adapter",before:"store",initialize:function(){}}}),define("inspektor/initializers/ember-data",["exports","ember-data/setup-container","ember-data"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"ember-data",initialize:t.default}}),define("inspektor/initializers/export-application-global",["exports","inspektor/config/environment"],function(e,t){function n(){var e=arguments[1]||arguments[0] | ||||
| if(!1!==t.default.exportApplicationGlobal){var n | ||||
| if("undefined"!=typeof window)n=window | ||||
| else if("undefined"!=typeof global)n=global | ||||
| else{if("undefined"==typeof self)return | ||||
| n=self}var r,i=t.default.exportApplicationGlobal | ||||
| r="string"==typeof i?i:Ember.String.classify(t.default.modulePrefix),n[r]||(n[r]=e,e.reopen({willDestroy:function(){this._super.apply(this,arguments),delete n[r]}}))}}Object.defineProperty(e,"__esModule",{value:!0}),e.initialize=n,e.default={name:"export-application-global",initialize:n}}),define("inspektor/initializers/injectStore",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"injectStore",before:"store",initialize:function(){}}}),define("inspektor/initializers/store",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"store",after:"ember-data",initialize:function(){}}}),define("inspektor/initializers/transforms",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"transforms",before:"store",initialize:function(){}}}),define("inspektor/instance-initializers/body-class",["exports","ember-body-class/instance-initializers/body-class"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"initialize",{enumerable:!0,get:function(){return t.initialize}})}),define("inspektor/instance-initializers/ember-data",["exports","ember-data/instance-initializers/initialize-store-service"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"ember-data",initialize:t.default}}) | ||||
| define("inspektor/resolver",["exports","ember-resolver"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/router",["exports","inspektor/config/environment"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var n=Ember.Router.extend({location:t.default.locationType,rootURL:t.default.rootURL}) | ||||
| n.map(function(){this.route("inspect"),this.route("connect"),this.route("disconnect")}),e.default=n}),define("inspektor/routes/application",["exports","ember-body-class/mixins/body-class"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var n=Ember.Route,r=Ember.inject.service | ||||
| e.default=n.extend(t.default,{storage:r(),beforeModel:function(){var e=this | ||||
| this.get("storage.rs").on("error",function(t){console.debug("rs.on error",t),"Unauthorized"===t.name?e.handleUnauthorized():"DiscoveryError"===t.name||alert("An unknown error occured. Please check the browser console for details.")})},handleUnauthorized:function(){this.get("storage.unauthorized")||(this.get("storage").setProperties({unauthorized:!0,connecting:!1,connected:!1}),this.transitionTo("connect"))}})}),define("inspektor/routes/connect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service,r=Ember.run.later,i=Ember.RSVP.Promise | ||||
| e.default=t.extend({storage:n(),beforeModel:function(){var e=this | ||||
| return this.waitForConnectionState().then(function(){e.get("storage.connected")&&e.transitionTo("index")})},waitForConnectionState:function(){var e=this | ||||
| return new i(function(t){function n(){e.get("storage.connecting")?r(n,20):t()}n()})}})}),define("inspektor/routes/disconnect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service | ||||
| e.default=t.extend({storage:n(),beforeModel:function(){this.get("storage.rs").disconnect(),this.transitionTo("connect")}})}),define("inspektor/routes/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service,r=Ember.isEmpty,i=Ember.isPresent,o=Ember.run.later,s=Ember.RSVP.hash,a=Ember.RSVP.Promise | ||||
| e.default=t.extend({storage:n(),queryParams:{path:{refreshModel:!0}},beforeModel:function(){var e=this | ||||
| return this.waitForConnectionState().then(function(){e.get("storage.disconnected")&&e.transitionTo("connect")})},model:function(e){var t=e.path | ||||
| return r(e.path)?null:("/"!==t.substr(-1)&&(t+="/"),s({currentListing:this.get("storage").fetchListing(t),currentDirPath:t}))},setupController:function(e,t){this._super(e,t),r(this.get("storage.categories"))&&this.get("storage.connected")&&this.get("storage").fetchRootListing(),i(t)&&(e.set("currentDirPath",t.currentDirPath),r(t.currentListing)&&this.transitionTo("index",{queryParams:{path:e.get("parentDir")}}))},waitForConnectionState:function(){var e=this | ||||
| return new a(function(t){function n(){e.get("storage.connecting")?o(n,20):t()}n()})}})}),define("inspektor/routes/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service,r=Ember.isEmpty,i=Ember.isPresent | ||||
| e.default=t.extend({storage:n(),queryParams:{path:{refreshModel:!0}},model:function(e){var t=e.path | ||||
| r(e.path),t.substr(-1) | ||||
| var n=t.match(/^(.*\/).+$/)[1],i=t.match(/^.*\/(.+)$/)[1] | ||||
| return this.get("storage").fetchListing(n).then(function(e){return e.findBy("name",i)}).then(function(e){return{documentMetaData:e,currentDirPath:n}})},setupController:function(e,t){this._super(e,t),r(this.get("storage.categories"))&&this.get("storage.connected")&&this.get("storage").fetchRootListing(),i(t)&&e.set("currentDirPath",t.currentDirPath)}})}),define("inspektor/services/ajax",["exports","ember-ajax/services/ajax"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("inspektor/services/storage",["exports","npm:remotestoragejs","npm:remotestorage-widget","inspektor/utils/simple-content-type"],function(e,t,n,r){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var i=Ember.Object,o=Ember.Service,s=Ember.computed,a=Ember.observer,l=Ember.isEmpty | ||||
| e.default=o.extend({rs:null,widget:null,connecting:!0,connected:!1,unauthorized:!1,userAddress:null,disconnected:s.not("connected"),client:null,rootListing:null,setup:function(){var e=this,r=new t.default({cache:!1}) | ||||
| r.access.claim("*","rw") | ||||
| var i=new n.default(r,{skipInitial:!0}) | ||||
| i.attach(),r.on("ready",function(){console.debug("rs.on ready")}),r.on("connected",function(){console.debug("rs.on connected"),e.set("connecting",!1),e.set("connected",!0),e.set("userAddress",e.get("rs").remote.userAddress)}),r.on("not-connected",function(){console.debug("rs.on not-connected"),e.set("connecting",!1),e.set("connected",!1)}),r.on("disconnected",function(){console.debug("rs.on disconnected"),e.set("connecting",!1),e.set("connected",!1)}),r.on("connecting",function(){console.debug("rs.on connecting"),e.set("connecting",!0),e.set("connected",!1)}),r.on("authing",function(){console.debug("rs.on authing"),e.set("connecting",!0),e.set("connected",!1)}),this.set("rs",r),this.set("widget",i),this.set("client",r.scope("/"))}.on("init"),connectedChange:a("connected",function(){this.get("connected")?this.fetchRootListing():this.clearLocalData()}),clearLocalData:function(){this.setProperties({userAddress:null,rootListing:null})},fetchRootListing:function(){var e=this | ||||
| this.fetchListing("").then(function(t){e.set("rootListing",t.sortBy("name"))})},fetchListing:function(e){var t=[] | ||||
| return this.get("client").getListing(e).then(function(n){return l(n)?[]:(Object.keys(n).forEach(function(o){var s=n[o],a=s["Content-Type"]||"folder",l=!1 | ||||
| "folder"!==a&&(l=!!a.match(/charset=binary/),a=(0,r.default)(a)),t.push(i.create({name:o,type:a,isBinary:l,isFolder:"folder"===a,size:s["Content-Length"]||null,path:e+o,etag:s.ETag}))}),t)})}})}),define("inspektor/templates/application",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"HpeupCPN",block:'{"symbols":[],"statements":[[6,"div"],[9,"id","app-container"],[10,"class",[18,"connectedClass"],null],[7],[0,"\\n  "],[6,"aside"],[7],[0,"\\n"],[4,"if",[[20,["connected"]]],null,{"statements":[[0,"      "],[1,[25,"account-info",null,[["userAddress"],[[20,["userAddress"]]]]],false],[0,"\\n      "],[1,[25,"categories-nav",null,[["categories"],[[20,["categories"]]]]],false],[0,"\\n"]],"parameters":[]},null],[0,"  "],[8],[0,"\\n  "],[6,"main"],[7],[0,"\\n    "],[1,[18,"outlet"],false],[0,"\\n  "],[8],[0,"\\n"],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/application.hbs"}})}),define("inspektor/templates/connect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"VjXcIYnG",block:'{"symbols":[],"statements":[],"hasEval":false}',meta:{moduleName:"inspektor/templates/connect.hbs"}})}),define("inspektor/templates/disconnect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"2ZbVbnJi",block:'{"symbols":[],"statements":[[1,[18,"outlet"],false]],"hasEval":false}',meta:{moduleName:"inspektor/templates/disconnect.hbs"}})}),define("inspektor/templates/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"niZ23686",block:'{"symbols":[],"statements":[[6,"header"],[7],[0,"\\n  "],[1,[25,"breadcrumb-nav",null,[["currentDirPath"],[[20,["currentDirPath"]]]]],false],[0,"\\n  "],[6,"nav"],[9,"class","actions"],[7],[0,"\\n"],[4,"if",[[20,["currentListingContainsDocuments"]]],null,{"statements":[[0,"    "],[6,"button"],[9,"class","delete-all"],[3,"action",[[19,0,[]],"deleteDocuments"]],[7],[0,"delete all"],[8],[0,"\\n"]],"parameters":[]},null],[0,"  "],[8],[0,"\\n"],[8],[0,"\\n\\n"],[4,"if",[[20,["currentListing"]]],null,{"statements":[[0,"  "],[1,[25,"directory-listing",null,[["items"],[[20,["currentListing"]]]]],false],[0,"\\n"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/templates/index.hbs"}})}),define("inspektor/templates/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"iEMqy3N5",block:'{"symbols":[],"statements":[[6,"header"],[7],[0,"\\n  "],[1,[25,"breadcrumb-nav",null,[["currentDirPath"],[[20,["currentDirPath"]]]]],false],[0,"\\n  "],[6,"nav"],[9,"class","actions"],[7],[0,"\\n    "],[6,"button"],[9,"class","delete"],[3,"action",[[19,0,[]],"deleteItem"]],[7],[0,"delete"],[8],[0,"\\n  "],[8],[0,"\\n"],[8],[0,"\\n\\n"],[6,"div"],[9,"class","inspect-details"],[7],[0,"\\n  "],[6,"section"],[9,"class","content"],[7],[0,"\\n    "],[1,[25,"file-preview",null,[["metaData","storage"],[[20,["model","documentMetaData"]],[20,["storage"]]]]],false],[0,"\\n  "],[8],[0,"\\n  "],[6,"section"],[9,"class","meta"],[7],[0,"\\n    "],[6,"dl"],[7],[0,"\\n      "],[6,"dt"],[7],[0,"Name"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","name"]],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Content type"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","type"]],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Size"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[25,"human-file-size",[[20,["model","documentMetaData","size"]]],null],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Revision (ETag)"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","etag"]],false],[8],[0,"\\n    "],[8],[0,"\\n  "],[8],[0,"\\n"],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/inspect.hbs"}})}),define("inspektor/utils/simple-content-type",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){return e.replace(/;.*$/,"")}}),define("inspektor/config/environment",[],function(){try{var e="inspektor/config/environment",t=document.querySelector('meta[name="'+e+'"]').getAttribute("content"),n={default:JSON.parse(unescape(t))} | ||||
| return Object.defineProperty(n,"__esModule",{value:!0}),n}catch(t){throw new Error('Could not read config from meta tag with name "'+e+'".')}}),runningTests||require("inspektor/app").default.create({name:"inspektor",version:"0.7.0"}) | ||||
							
								
								
									
										68
									
								
								assets/inspektor-82b4c715df8b6667e0d8131915569b60.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,68 @@ | ||||
| "use strict" | ||||
| define("inspektor/app",["exports","inspektor/resolver","ember-load-initializers","inspektor/config/environment"],function(e,t,n,r){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var i=Ember.Application.extend({modulePrefix:r.default.modulePrefix,podModulePrefix:r.default.podModulePrefix,Resolver:t.default});(0,n.default)(i,r.default.modulePrefix),e.default=i}),define("inspektor/components/breadcrumb-nav/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component,n=Ember.Object,r=Ember.isEmpty | ||||
| e.default=t.extend({tagName:"nav",classNames:["breadcrumb-nav"],currentDirPath:null,linkItems:function(){var e=this.get("currentDirPath") | ||||
| if(r(e))return[] | ||||
| var t=[] | ||||
| return e.split("/").reject(function(e){return r(e)}).forEach(function(r){var i=e.match("(.*"+r+")/")[0] | ||||
| t.pushObject(n.create({name:r,path:i}))}),t}.property("currentDirPath")})}),define("inspektor/components/breadcrumb-nav/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"j3noKP+7",block:'{"symbols":["item"],"statements":[[6,"span"],[9,"class","node"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],["/"]]]],null,{"statements":[[0,"Home"]],"parameters":[]},null],[8],[0,"\\n"],[4,"each",[[20,["linkItems"]]],null,{"statements":[[6,"span"],[9,"class","node"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[1,[19,1,["name"]],false]],"parameters":[]},null],[8],[0,"\\n"]],"parameters":[1]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/breadcrumb-nav/template.hbs"}})}),define("inspektor/components/categories-nav/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component | ||||
| e.default=t.extend({categories:null})}),define("inspektor/components/categories-nav/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"4FB0addV",block:'{"symbols":["category"],"statements":[[4,"if",[[20,["categories"]]],null,{"statements":[[0,"  "],[6,"nav"],[7],[0,"\\n    "],[6,"ul"],[7],[0,"\\n"],[4,"each",[[20,["categories"]]],null,{"statements":[[0,"      "],[6,"li"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[1,[19,1,["name"]],false]],"parameters":[]},null],[8],[0,"\\n"]],"parameters":[1]},null],[0,"    "],[8],[0,"\\n  "],[8],[0,"\\n"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/categories-nav/template.hbs"}})}),define("inspektor/components/directory-listing/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component | ||||
| e.default=t.extend({classNames:["directory-listing"],items:null,itemsSorted:function(){var e=this.get("items") | ||||
| return e.reject(function(e){return"folder"!==e.type}).concat(e.reject(function(e){return"folder"===e.type}))}.property("items")})}),define("inspektor/components/directory-listing/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"K4sJaSiM",block:'{"symbols":["item"],"statements":[[6,"ul"],[9,"class","listing"],[7],[0,"\\n"],[4,"each",[[20,["itemsSorted"]]],null,{"statements":[[0,"  "],[6,"li"],[7],[0,"\\n"],[4,"if",[[19,1,["isFolder"]]],null,{"statements":[[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[0,"        "],[6,"span"],[9,"class","icon"],[7],[1,[25,"item-icon",null,[["type"],[[19,1,["type"]]]]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","name"],[7],[1,[19,1,["name"]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","size"],[7],[8],[0,"\\n        "],[6,"span"],[9,"class","type"],[7],[1,[19,1,["type"]],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]},{"statements":[[0,"      "],[2," TODO link to item "],[0,"\\n"],[4,"link-to",["inspect",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[0,"        "],[6,"span"],[9,"class","icon"],[7],[1,[25,"item-icon",null,[["type"],[[19,1,["type"]]]]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","name"],[7],[1,[19,1,["name"]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","size"],[7],[1,[25,"human-file-size",[[19,1,["size"]]],null],false],[8],[0,"\\n        "],[6,"span"],[9,"class","type"],[7],[1,[19,1,["type"]],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]}],[0,"  "],[8],[0,"\\n"]],"parameters":[1]},null],[8]],"hasEval":false}',meta:{moduleName:"inspektor/components/directory-listing/template.hbs"}})}),define("inspektor/components/file-preview/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component,n=Ember.computed.alias | ||||
| e.default=t.extend({storage:null,classNames:["file-preview"],fileLoaded:!1,fileContent:null,objectURL:null,metaData:null,type:n("metaData.type"),isBinary:n("metaData.isBinary"),isImage:function(){return this.get("type").match(/^image\/.+$/)}.property("type"),isText:function(){return!this.get("isBinary")}.property("isBinary"),loadFile:function(){var e=this,t=this.get("metaData.path") | ||||
| this.get("storage.client").getFile(t).then(function(t){if(e.get("isImage")){var n=new window.Uint8Array(t.data),r=new window.Blob([n],{type:t.contentType}) | ||||
| e.set("objectURL",window.URL.createObjectURL(r))}else e.set("fileContent",t.data) | ||||
| e.set("fileLoaded",!0)})}.on("init")})}),define("inspektor/components/file-preview/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"S7eRlRkE",block:'{"symbols":[],"statements":[[4,"if",[[20,["fileLoaded"]]],null,{"statements":[[4,"if",[[20,["isBinary"]]],null,{"statements":[[4,"if",[[20,["isImage"]]],null,{"statements":[[0,"      "],[6,"img"],[10,"src",[18,"objectURL"],null],[10,"alt",[20,["metaData","name"]],null],[7],[8],[0,"\\n"]],"parameters":[]},{"statements":[[0,"      "],[6,"p"],[7],[0,"No preview available for this content type."],[8],[0,"\\n"]],"parameters":[]}]],"parameters":[]},null],[0,"\\n"],[4,"if",[[20,["isText"]]],null,{"statements":[[0,"    "],[6,"code"],[7],[1,[18,"fileContent"],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/file-preview/template.hbs"}})}),define("inspektor/components/item-icon/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component | ||||
| e.default=t.extend({tagName:"img",classNames:["item-icon"],attributeBindings:["src:src"],type:null,isFolder:function(){return"folder"===this.get("type")}.property("type"),src:function(){var e=this.get("type") | ||||
| return"/img/file-icons/"+(this.get("isFolder")?"folder.svg":e.match(/json/i)?"code-curly.svg":"file.svg")}.property()})}),define("inspektor/components/item-icon/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"0RA2e2SD",block:'{"symbols":[],"statements":[],"hasEval":false}',meta:{moduleName:"inspektor/components/item-icon/template.hbs"}})}),define("inspektor/controllers/application",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Controller,n=Ember.Object,r=Ember.inject.service,i=Ember.computed.alias,a=Ember.observer,o=Ember.isEmpty | ||||
| e.default=t.extend({storage:r(),connecting:i("storage.connecting"),connected:i("storage.connected"),rootListing:i("storage.rootListing"),handleConnected:a("connected",function(){this.get("storage").fetchRootListing()}),categories:function(){var e=[],t=this.get("rootListing") | ||||
| return o(t)?e:(t.forEach(function(t){t.isFolder&&e.push(n.create({name:t.name.replace("/",""),type:t.type,path:t.name}))}),e)}.property("rootListing")})}),define("inspektor/controllers/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Controller,n=Ember.inject.controller,r=Ember.inject.service,i=Ember.computed.alias,a=Ember.isPresent | ||||
| e.default=t.extend({application:n(),storage:r(),rootListing:i("storage.rootListing"),currentDirPath:i("application.currentDirPath"),queryParams:["path"],currentListing:function(){return a(this.get("model.currentListing"))?this.get("model.currentListing").sortBy("name"):this.get("rootListing")}.property("rootListing.[]","model.[]")})}),define("inspektor/controllers/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Controller,n=Ember.inject.controller,r=Ember.inject.service,i=Ember.computed.alias | ||||
| e.default=t.extend({application:n(),storage:r(),currentDirPath:i("application.currentDirPath"),queryParams:["path"]})}),define("inspektor/helpers/app-version",["exports","inspektor/config/environment","ember-cli-app-version/utils/regexp"],function(e,t,n){function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{} | ||||
| return t.hideSha?i.match(n.versionRegExp)[0]:t.hideVersion?i.match(n.shaRegExp)[0]:i}Object.defineProperty(e,"__esModule",{value:!0}),e.appVersion=r | ||||
| var i=t.default.APP.version | ||||
| e.default=Ember.Helper.helper(r)}),define("inspektor/helpers/human-file-size",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Helper.helper | ||||
| e.default=t(function(e){if(e<1024)return e+" bytes" | ||||
| var t=-1 | ||||
| do{e/=1024,t++}while(e>1024) | ||||
| return String(Math.max(e,.1).toFixed(1)+" "+["KB","MB","GB","TB","PB","EB","ZB","YB"][t])})}),define("inspektor/helpers/pluralize",["exports","ember-inflector/lib/helpers/pluralize"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/helpers/singularize",["exports","ember-inflector/lib/helpers/singularize"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/initializers/app-version",["exports","ember-cli-app-version/initializer-factory","inspektor/config/environment"],function(e,t,n){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var r=n.default.APP,i=r.name,a=r.version | ||||
| e.default={name:"App Version",initialize:(0,t.default)(i,a)}}),define("inspektor/initializers/container-debug-adapter",["exports","ember-resolver/resolvers/classic/container-debug-adapter"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"container-debug-adapter",initialize:function(){var e=arguments[1]||arguments[0] | ||||
| e.register("container-debug-adapter:main",t.default),e.inject("container-debug-adapter:main","namespace","application:main")}}}),define("inspektor/initializers/data-adapter",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"data-adapter",before:"store",initialize:function(){}}}),define("inspektor/initializers/ember-data",["exports","ember-data/setup-container","ember-data"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"ember-data",initialize:t.default}}),define("inspektor/initializers/export-application-global",["exports","inspektor/config/environment"],function(e,t){function n(){var e=arguments[1]||arguments[0] | ||||
| if(!1!==t.default.exportApplicationGlobal){var n | ||||
| if("undefined"!=typeof window)n=window | ||||
| else if("undefined"!=typeof global)n=global | ||||
| else{if("undefined"==typeof self)return | ||||
| n=self}var r,i=t.default.exportApplicationGlobal | ||||
| r="string"==typeof i?i:Ember.String.classify(t.default.modulePrefix),n[r]||(n[r]=e,e.reopen({willDestroy:function(){this._super.apply(this,arguments),delete n[r]}}))}}Object.defineProperty(e,"__esModule",{value:!0}),e.initialize=n,e.default={name:"export-application-global",initialize:n}}),define("inspektor/initializers/injectStore",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"injectStore",before:"store",initialize:function(){}}}),define("inspektor/initializers/store",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"store",after:"ember-data",initialize:function(){}}}),define("inspektor/initializers/transforms",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"transforms",before:"store",initialize:function(){}}}),define("inspektor/instance-initializers/ember-data",["exports","ember-data/instance-initializers/initialize-store-service"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"ember-data",initialize:t.default}}),define("inspektor/resolver",["exports","ember-resolver"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/router",["exports","inspektor/config/environment"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var n=Ember.Router.extend({location:t.default.locationType,rootURL:t.default.rootURL}) | ||||
| n.map(function(){this.route("inspect")}),e.default=n}),define("inspektor/routes/application",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route | ||||
| e.default=t.extend({})}) | ||||
| define("inspektor/routes/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service,r=Ember.isEmpty,i=Ember.isPresent,a=Ember.RSVP.hash | ||||
| e.default=t.extend({storage:n(),queryParams:{path:{refreshModel:!0}},model:function(e){var t=e.path | ||||
| return r(e.path)?null:("/"!==t.substr(-1)&&(t+="/"),a({currentListing:this.get("storage").fetchListing(t),currentDirPath:t}))},setupController:function(e,t){this._super(e,t),r(this.get("storage.categories"))&&this.get("storage.connected")&&this.get("storage").fetchRootListing(),i(t)&&e.set("currentDirPath",t.currentDirPath)}})}),define("inspektor/routes/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service,r=Ember.isEmpty,i=Ember.isPresent | ||||
| e.default=t.extend({storage:n(),queryParams:{path:{refreshModel:!0}},model:function(e){var t=e.path | ||||
| r(e.path),t.substr(-1) | ||||
| var n=t.match(/^(.*\/).+$/)[1],i=t.match(/^.*\/(.+)$/)[1] | ||||
| return this.get("storage").fetchListing(n).then(function(e){return e.findBy("name",i)}).then(function(e){return{documentMetaData:e,currentDirPath:n}})},setupController:function(e,t){this._super(e,t),r(this.get("storage.categories"))&&this.get("storage.connected")&&this.get("storage").fetchRootListing(),i(t)&&e.set("currentDirPath",t.currentDirPath)}})}),define("inspektor/services/ajax",["exports","ember-ajax/services/ajax"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("inspektor/services/storage",["exports","npm:remotestoragejs","npm:remotestorage-widget","inspektor/utils/simple-content-type"],function(e,t,n,r){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var i=Ember.Object,a=Ember.Service | ||||
| e.default=a.extend({rs:null,widget:null,connecting:!0,connected:!1,client:null,rootListing:null,setup:function(){var e=this,r=new t.default({cache:!1}) | ||||
| r.access.claim("*","rw") | ||||
| var i=new n.default(r,{}) | ||||
| i.attach(),r.on("ready",function(){console.debug("rs.on ready")}),r.on("connected",function(){console.debug("rs.on connected"),e.set("connecting",!1),e.set("connected",!0)}),r.on("not-connected",function(){console.debug("rs.on not-connected"),e.set("connecting",!1),e.set("connected",!1)}),r.on("disconnected",function(){console.debug("rs.on disconnected"),e.set("connecting",!1),e.set("connected",!1)}),r.on("connecting",function(){console.debug("rs.on connecting"),e.set("connecting",!0),e.set("connected",!1)}),r.on("authing",function(){console.debug("rs.on authing"),e.set("connecting",!0),e.set("connected",!1)}),this.set("rs",r),this.set("widget",i),this.set("client",r.scope("/"))}.on("init"),fetchRootListing:function(){var e=this | ||||
| this.fetchListing("").then(function(t){e.set("rootListing",t.sortBy("name"))})},fetchListing:function(e){var t=[] | ||||
| return this.get("client").getListing(e).then(function(n){return Object.keys(n).forEach(function(a){var o=n[a],s=o["Content-Type"]||"folder",l=!1 | ||||
| "folder"!==s&&(l=!!s.match(/charset=binary/),s=(0,r.default)(s)),t.push(i.create({name:a,type:s,isBinary:l,isFolder:"folder"===s,size:o["Content-Length"]||null,path:e+a,etag:o.ETag}))}),t})}})}),define("inspektor/templates/application",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"2yFDPWSX",block:'{"symbols":[],"statements":[[6,"div"],[9,"id","app-container"],[7],[0,"\\n  "],[6,"aside"],[7],[0,"\\n"],[4,"if",[[20,["connected"]]],null,{"statements":[[0,"      "],[1,[25,"categories-nav",null,[["categories"],[[20,["categories"]]]]],false],[0,"\\n"]],"parameters":[]},null],[0,"  "],[8],[0,"\\n  "],[6,"main"],[7],[0,"\\n    "],[6,"header"],[7],[0,"\\n"],[4,"if",[[20,["connecting"]]],null,{"statements":[[0,"      "],[2," Connecting... "],[0,"\\n"]],"parameters":[]},{"statements":[[4,"if",[[20,["connected"]]],null,{"statements":[[0,"          "],[1,[25,"breadcrumb-nav",null,[["currentDirPath"],[[20,["currentDirPath"]]]]],false],[0,"\\n"]],"parameters":[]},{"statements":[[0,"          Not connected.\\n"]],"parameters":[]}]],"parameters":[]}],[0,"    "],[8],[0,"\\n\\n    "],[1,[18,"outlet"],false],[0,"\\n  "],[8],[0,"\\n"],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/application.hbs"}})}),define("inspektor/templates/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"I+40EE07",block:'{"symbols":[],"statements":[[4,"if",[[20,["currentListing"]]],null,{"statements":[[0,"  "],[1,[25,"directory-listing",null,[["items"],[[20,["currentListing"]]]]],false],[0,"\\n"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/templates/index.hbs"}})}),define("inspektor/templates/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"Fqf/+82x",block:'{"symbols":[],"statements":[[6,"div"],[9,"class","inspect-details"],[7],[0,"\\n  "],[6,"section"],[9,"class","content"],[7],[0,"\\n    "],[1,[25,"file-preview",null,[["metaData","storage"],[[20,["model","documentMetaData"]],[20,["storage"]]]]],false],[0,"\\n  "],[8],[0,"\\n  "],[6,"section"],[9,"class","meta"],[7],[0,"\\n    "],[6,"dl"],[7],[0,"\\n      "],[6,"dt"],[7],[0,"Name"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","name"]],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Content type"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","type"]],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Size"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[25,"human-file-size",[[20,["model","documentMetaData","size"]]],null],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Revision (ETag)"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","etag"]],false],[8],[0,"\\n    "],[8],[0,"\\n  "],[8],[0,"\\n"],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/inspect.hbs"}})}),define("inspektor/utils/simple-content-type",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){return e.replace(/;.*$/,"")}}),define("inspektor/config/environment",[],function(){try{var e="inspektor/config/environment",t=document.querySelector('meta[name="'+e+'"]').getAttribute("content"),n={default:JSON.parse(unescape(t))} | ||||
| return Object.defineProperty(n,"__esModule",{value:!0}),n}catch(t){throw new Error('Could not read config from meta tag with name "'+e+'".')}}),runningTests||require("inspektor/app").default.create({name:"inspektor",version:"0.0.0+a121128d"}) | ||||
							
								
								
									
										78
									
								
								assets/inspektor-8f55c90e0874d1042c8cbaa61d93af34.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,78 @@ | ||||
| "use strict" | ||||
| define("inspektor/app",["exports","inspektor/resolver","ember-load-initializers","inspektor/config/environment"],function(e,t,n,r){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var i=Ember.Application.extend({modulePrefix:r.default.modulePrefix,podModulePrefix:r.default.podModulePrefix,Resolver:t.default});(0,n.default)(i,r.default.modulePrefix),e.default=i}),define("inspektor/components/account-info/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component,n=Ember.computed | ||||
| e.default=t.extend({classNames:["account-info"],userAddress:null,username:n("userAddress",function(){return this.get("userAddress").split("@")[0]}),host:n("userAddress",function(){return"@"+this.get("userAddress").split("@")[1]})})}),define("inspektor/components/account-info/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"rn4KIRZr",block:'{"symbols":[],"statements":[[6,"span"],[9,"class","username"],[7],[1,[18,"username"],false],[8],[0,"\\n"],[6,"br"],[7],[8],[6,"span"],[9,"class","host"],[7],[1,[18,"host"],false],[8],[0,"\\n\\n"],[4,"link-to",["disconnect"],[["class"],["disconnect"]],{"statements":[[0,"disconnect"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/account-info/template.hbs"}})}),define("inspektor/components/breadcrumb-nav/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component,n=Ember.Object,r=Ember.isEmpty | ||||
| e.default=t.extend({tagName:"nav",classNames:["breadcrumb-nav"],currentDirPath:null,linkItems:function(){var e=this.get("currentDirPath") | ||||
| if(r(e))return[] | ||||
| var t=[] | ||||
| return e.split("/").reject(function(e){return r(e)}).forEach(function(r){var i=e.match("(.*"+r+")/")[0] | ||||
| t.pushObject(n.create({name:r,path:i}))}),t}.property("currentDirPath")})}),define("inspektor/components/breadcrumb-nav/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"j3noKP+7",block:'{"symbols":["item"],"statements":[[6,"span"],[9,"class","node"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],["/"]]]],null,{"statements":[[0,"Home"]],"parameters":[]},null],[8],[0,"\\n"],[4,"each",[[20,["linkItems"]]],null,{"statements":[[6,"span"],[9,"class","node"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[1,[19,1,["name"]],false]],"parameters":[]},null],[8],[0,"\\n"]],"parameters":[1]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/breadcrumb-nav/template.hbs"}})}),define("inspektor/components/categories-nav/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component | ||||
| e.default=t.extend({categories:null})}),define("inspektor/components/categories-nav/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"4FB0addV",block:'{"symbols":["category"],"statements":[[4,"if",[[20,["categories"]]],null,{"statements":[[0,"  "],[6,"nav"],[7],[0,"\\n    "],[6,"ul"],[7],[0,"\\n"],[4,"each",[[20,["categories"]]],null,{"statements":[[0,"      "],[6,"li"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[1,[19,1,["name"]],false]],"parameters":[]},null],[8],[0,"\\n"]],"parameters":[1]},null],[0,"    "],[8],[0,"\\n  "],[8],[0,"\\n"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/categories-nav/template.hbs"}})}),define("inspektor/components/directory-listing/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component | ||||
| e.default=t.extend({classNames:["directory-listing"],items:null,itemsSorted:function(){var e=this.get("items") | ||||
| return e.reject(function(e){return"folder"!==e.type}).concat(e.reject(function(e){return"folder"===e.type}))}.property("items")})}),define("inspektor/components/directory-listing/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"K4sJaSiM",block:'{"symbols":["item"],"statements":[[6,"ul"],[9,"class","listing"],[7],[0,"\\n"],[4,"each",[[20,["itemsSorted"]]],null,{"statements":[[0,"  "],[6,"li"],[7],[0,"\\n"],[4,"if",[[19,1,["isFolder"]]],null,{"statements":[[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[0,"        "],[6,"span"],[9,"class","icon"],[7],[1,[25,"item-icon",null,[["type"],[[19,1,["type"]]]]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","name"],[7],[1,[19,1,["name"]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","size"],[7],[8],[0,"\\n        "],[6,"span"],[9,"class","type"],[7],[1,[19,1,["type"]],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]},{"statements":[[0,"      "],[2," TODO link to item "],[0,"\\n"],[4,"link-to",["inspect",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[0,"        "],[6,"span"],[9,"class","icon"],[7],[1,[25,"item-icon",null,[["type"],[[19,1,["type"]]]]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","name"],[7],[1,[19,1,["name"]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","size"],[7],[1,[25,"human-file-size",[[19,1,["size"]]],null],false],[8],[0,"\\n        "],[6,"span"],[9,"class","type"],[7],[1,[19,1,["type"]],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]}],[0,"  "],[8],[0,"\\n"]],"parameters":[1]},null],[8]],"hasEval":false}',meta:{moduleName:"inspektor/components/directory-listing/template.hbs"}})}),define("inspektor/components/file-preview/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component,n=Ember.computed.alias | ||||
| e.default=t.extend({storage:null,classNames:["file-preview"],fileLoaded:!1,fileContent:null,objectURL:null,metaData:null,type:n("metaData.type"),isBinary:n("metaData.isBinary"),isImage:function(){return this.get("type").match(/^image\/.+$/)}.property("type"),isText:function(){return!this.get("isBinary")}.property("isBinary"),loadFile:function(){var e=this,t=this.get("metaData.path") | ||||
| this.get("storage.client").getFile(t).then(function(t){if(e.get("isImage")){var n=new window.Uint8Array(t.data),r=new window.Blob([n],{type:t.contentType}) | ||||
| e.set("objectURL",window.URL.createObjectURL(r))}else e.set("fileContent",t.data) | ||||
| e.set("fileLoaded",!0)})}.on("init")})}),define("inspektor/components/file-preview/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"S7eRlRkE",block:'{"symbols":[],"statements":[[4,"if",[[20,["fileLoaded"]]],null,{"statements":[[4,"if",[[20,["isBinary"]]],null,{"statements":[[4,"if",[[20,["isImage"]]],null,{"statements":[[0,"      "],[6,"img"],[10,"src",[18,"objectURL"],null],[10,"alt",[20,["metaData","name"]],null],[7],[8],[0,"\\n"]],"parameters":[]},{"statements":[[0,"      "],[6,"p"],[7],[0,"No preview available for this content type."],[8],[0,"\\n"]],"parameters":[]}]],"parameters":[]},null],[0,"\\n"],[4,"if",[[20,["isText"]]],null,{"statements":[[0,"    "],[6,"code"],[7],[1,[18,"fileContent"],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/file-preview/template.hbs"}})}),define("inspektor/components/item-icon/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component | ||||
| e.default=t.extend({tagName:"img",classNames:["item-icon"],attributeBindings:["src:src"],type:null,isFolder:function(){return"folder"===this.get("type")}.property("type"),src:function(){var e=this.get("type") | ||||
| return"/img/file-icons/"+(this.get("isFolder")?"folder.svg":e.match(/json/i)?"code-curly.svg":"file.svg")}.property()})}),define("inspektor/components/item-icon/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"0RA2e2SD",block:'{"symbols":[],"statements":[],"hasEval":false}',meta:{moduleName:"inspektor/components/item-icon/template.hbs"}})}),define("inspektor/controllers/application",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Controller,n=Ember.Object,r=Ember.computed,i=Ember.observer,o=Ember.inject.service,s=Ember.computed.alias,a=Ember.isEmpty | ||||
| e.default=t.extend({storage:o(),connecting:s("storage.connecting"),connected:s("storage.connected"),userAddress:s("storage.userAddress"),rootListing:s("storage.rootListing"),currentDirPath:null,connectedClass:r("connected",function(){return this.get("connected")?"connected":"disconnected"}),categories:function(){var e=[],t=this.get("rootListing") | ||||
| return a(t)?e:(t.forEach(function(t){t.isFolder&&e.push(n.create({name:t.name.replace("/",""),type:t.type,path:t.name}))}),e)}.property("rootListing"),connectedChange:i("connected",function(){this.get("connected")||this.set("currentDirPath",null)})})}),define("inspektor/controllers/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Controller,n=Ember.inject.controller,r=Ember.observer,i=Ember.inject.service,o=Ember.computed.alias,s=Ember.isPresent | ||||
| e.default=t.extend({application:n(),storage:i(),connected:o("storage.connected"),rootListing:o("storage.rootListing"),currentDirPath:o("application.currentDirPath"),queryParams:["path"],currentListing:function(){return s(this.get("model.currentListing"))?this.get("model.currentListing").sortBy("name"):this.get("rootListing")}.property("rootListing.[]","model.[]"),connectedChange:r("connected",function(){this.get("connected")||(this.set("model",null),this.set("path",null))})})}),define("inspektor/controllers/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Controller,n=Ember.inject.controller,r=Ember.inject.service,i=Ember.computed.alias | ||||
| e.default=t.extend({application:n(),storage:r(),currentDirPath:i("application.currentDirPath"),queryParams:["path"]})}),define("inspektor/helpers/app-version",["exports","inspektor/config/environment","ember-cli-app-version/utils/regexp"],function(e,t,n){function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{} | ||||
| return t.hideSha?i.match(n.versionRegExp)[0]:t.hideVersion?i.match(n.shaRegExp)[0]:i}Object.defineProperty(e,"__esModule",{value:!0}),e.appVersion=r | ||||
| var i=t.default.APP.version | ||||
| e.default=Ember.Helper.helper(r)}),define("inspektor/helpers/human-file-size",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Helper.helper | ||||
| e.default=t(function(e){if(e<1024)return e+" bytes" | ||||
| var t=-1 | ||||
| do{e/=1024,t++}while(e>1024) | ||||
| return String(Math.max(e,.1).toFixed(1)+" "+["KB","MB","GB","TB","PB","EB","ZB","YB"][t])})}),define("inspektor/helpers/pluralize",["exports","ember-inflector/lib/helpers/pluralize"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/helpers/singularize",["exports","ember-inflector/lib/helpers/singularize"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/initializers/app-version",["exports","ember-cli-app-version/initializer-factory","inspektor/config/environment"],function(e,t,n){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var r=n.default.APP,i=r.name,o=r.version | ||||
| e.default={name:"App Version",initialize:(0,t.default)(i,o)}}),define("inspektor/initializers/container-debug-adapter",["exports","ember-resolver/resolvers/classic/container-debug-adapter"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"container-debug-adapter",initialize:function(){var e=arguments[1]||arguments[0] | ||||
| e.register("container-debug-adapter:main",t.default),e.inject("container-debug-adapter:main","namespace","application:main")}}}),define("inspektor/initializers/data-adapter",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"data-adapter",before:"store",initialize:function(){}}}),define("inspektor/initializers/ember-data",["exports","ember-data/setup-container","ember-data"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"ember-data",initialize:t.default}}),define("inspektor/initializers/export-application-global",["exports","inspektor/config/environment"],function(e,t){function n(){var e=arguments[1]||arguments[0] | ||||
| if(!1!==t.default.exportApplicationGlobal){var n | ||||
| if("undefined"!=typeof window)n=window | ||||
| else if("undefined"!=typeof global)n=global | ||||
| else{if("undefined"==typeof self)return | ||||
| n=self}var r,i=t.default.exportApplicationGlobal | ||||
| r="string"==typeof i?i:Ember.String.classify(t.default.modulePrefix),n[r]||(n[r]=e,e.reopen({willDestroy:function(){this._super.apply(this,arguments),delete n[r]}}))}}Object.defineProperty(e,"__esModule",{value:!0}),e.initialize=n,e.default={name:"export-application-global",initialize:n}}),define("inspektor/initializers/injectStore",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"injectStore",before:"store",initialize:function(){}}}),define("inspektor/initializers/store",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"store",after:"ember-data",initialize:function(){}}}),define("inspektor/initializers/transforms",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"transforms",before:"store",initialize:function(){}}}),define("inspektor/instance-initializers/body-class",["exports","ember-body-class/instance-initializers/body-class"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"initialize",{enumerable:!0,get:function(){return t.initialize}})}),define("inspektor/instance-initializers/ember-data",["exports","ember-data/instance-initializers/initialize-store-service"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"ember-data",initialize:t.default}}) | ||||
| define("inspektor/resolver",["exports","ember-resolver"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/router",["exports","inspektor/config/environment"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var n=Ember.Router.extend({location:t.default.locationType,rootURL:t.default.rootURL}) | ||||
| n.map(function(){this.route("inspect"),this.route("connect"),this.route("disconnect")}),e.default=n}),define("inspektor/routes/application",["exports","ember-body-class/mixins/body-class"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var n=Ember.Route | ||||
| e.default=n.extend(t.default,{})}),define("inspektor/routes/connect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service,r=Ember.run.later,i=Ember.RSVP.Promise | ||||
| e.default=t.extend({storage:n(),beforeModel:function(){var e=this | ||||
| return this.waitForConnectionState().then(function(){e.get("storage.connected")&&e.transitionTo("index")})},waitForConnectionState:function(){var e=this | ||||
| return new i(function(t){function n(){e.get("storage.connecting")?r(n,20):t()}n()})}})}),define("inspektor/routes/disconnect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service | ||||
| e.default=t.extend({storage:n(),beforeModel:function(){this.get("storage.rs").disconnect(),this.transitionTo("connect")}})}),define("inspektor/routes/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service,r=Ember.isEmpty,i=Ember.isPresent,o=Ember.run.later,s=Ember.RSVP.hash,a=Ember.RSVP.Promise | ||||
| e.default=t.extend({storage:n(),queryParams:{path:{refreshModel:!0}},beforeModel:function(){var e=this | ||||
| return this.waitForConnectionState().then(function(){e.get("storage.disconnected")&&e.transitionTo("connect")})},model:function(e){var t=e.path | ||||
| return r(e.path)?null:("/"!==t.substr(-1)&&(t+="/"),s({currentListing:this.get("storage").fetchListing(t),currentDirPath:t}))},setupController:function(e,t){this._super(e,t),r(this.get("storage.categories"))&&this.get("storage.connected")&&this.get("storage").fetchRootListing(),i(t)&&e.set("currentDirPath",t.currentDirPath)},waitForConnectionState:function(){var e=this | ||||
| return new a(function(t){function n(){e.get("storage.connecting")?o(n,20):t()}n()})}})}),define("inspektor/routes/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service,r=Ember.isEmpty,i=Ember.isPresent | ||||
| e.default=t.extend({storage:n(),queryParams:{path:{refreshModel:!0}},model:function(e){var t=e.path | ||||
| r(e.path),t.substr(-1) | ||||
| var n=t.match(/^(.*\/).+$/)[1],i=t.match(/^.*\/(.+)$/)[1] | ||||
| return this.get("storage").fetchListing(n).then(function(e){return e.findBy("name",i)}).then(function(e){return{documentMetaData:e,currentDirPath:n}})},setupController:function(e,t){this._super(e,t),r(this.get("storage.categories"))&&this.get("storage.connected")&&this.get("storage").fetchRootListing(),i(t)&&e.set("currentDirPath",t.currentDirPath)}})}),define("inspektor/services/ajax",["exports","ember-ajax/services/ajax"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("inspektor/services/storage",["exports","npm:remotestoragejs","npm:remotestorage-widget","inspektor/utils/simple-content-type"],function(e,t,n,r){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var i=Ember.Object,o=Ember.computed,s=Ember.observer,a=Ember.Service | ||||
| e.default=a.extend({rs:null,widget:null,connecting:!0,connected:!1,userAddress:null,disconnected:o.not("connected"),client:null,rootListing:null,setup:function(){var e=this,r=new t.default({cache:!1}) | ||||
| r.access.claim("*","rw") | ||||
| var i=new n.default(r,{skipInitial:!0}) | ||||
| i.attach(),r.on("ready",function(){console.debug("rs.on ready")}),r.on("connected",function(){console.debug("rs.on connected"),e.set("connecting",!1),e.set("connected",!0),e.set("userAddress",e.get("rs").remote.userAddress)}),r.on("not-connected",function(){console.debug("rs.on not-connected"),e.set("connecting",!1),e.set("connected",!1)}),r.on("disconnected",function(){console.debug("rs.on disconnected"),e.set("connecting",!1),e.set("connected",!1)}),r.on("connecting",function(){console.debug("rs.on connecting"),e.set("connecting",!0),e.set("connected",!1)}),r.on("authing",function(){console.debug("rs.on authing"),e.set("connecting",!0),e.set("connected",!1)}),this.set("rs",r),this.set("widget",i),this.set("client",r.scope("/"))}.on("init"),connectedChange:s("connected",function(){this.get("connected")?this.fetchRootListing():this.clearLocalData()}),clearLocalData:function(){this.setProperties({userAddress:null,rootListing:null})},fetchRootListing:function(){var e=this | ||||
| this.fetchListing("").then(function(t){e.set("rootListing",t.sortBy("name"))})},fetchListing:function(e){var t=[] | ||||
| return this.get("client").getListing(e).then(function(n){return Object.keys(n).forEach(function(o){var s=n[o],a=s["Content-Type"]||"folder",l=!1 | ||||
| "folder"!==a&&(l=!!a.match(/charset=binary/),a=(0,r.default)(a)),t.push(i.create({name:o,type:a,isBinary:l,isFolder:"folder"===a,size:s["Content-Length"]||null,path:e+o,etag:s.ETag}))}),t})}})}),define("inspektor/templates/application",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"BDrVVS16",block:'{"symbols":[],"statements":[[6,"div"],[9,"id","app-container"],[10,"class",[18,"connectedClass"],null],[7],[0,"\\n  "],[6,"aside"],[7],[0,"\\n"],[4,"if",[[20,["connected"]]],null,{"statements":[[0,"      "],[1,[25,"account-info",null,[["userAddress"],[[20,["userAddress"]]]]],false],[0,"\\n      "],[1,[25,"categories-nav",null,[["categories"],[[20,["categories"]]]]],false],[0,"\\n"]],"parameters":[]},null],[0,"  "],[8],[0,"\\n  "],[6,"main"],[7],[0,"\\n    "],[6,"header"],[7],[0,"\\n"],[4,"if",[[20,["connecting"]]],null,{"statements":[[0,"        "],[2," Connecting... "],[0,"\\n"]],"parameters":[]},{"statements":[[4,"if",[[20,["connected"]]],null,{"statements":[[0,"          "],[1,[25,"breadcrumb-nav",null,[["currentDirPath"],[[20,["currentDirPath"]]]]],false],[0,"\\n"]],"parameters":[]},{"statements":[[0,"          "],[2," Please connect. "],[0,"\\n"]],"parameters":[]}]],"parameters":[]}],[0,"    "],[8],[0,"\\n\\n    "],[1,[18,"outlet"],false],[0,"\\n  "],[8],[0,"\\n"],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/application.hbs"}})}),define("inspektor/templates/connect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"Xj84QVvq",block:'{"symbols":[],"statements":[[1,[18,"outlet"],false]],"hasEval":false}',meta:{moduleName:"inspektor/templates/connect.hbs"}})}),define("inspektor/templates/disconnect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"2ZbVbnJi",block:'{"symbols":[],"statements":[[1,[18,"outlet"],false]],"hasEval":false}',meta:{moduleName:"inspektor/templates/disconnect.hbs"}})}),define("inspektor/templates/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"I+40EE07",block:'{"symbols":[],"statements":[[4,"if",[[20,["currentListing"]]],null,{"statements":[[0,"  "],[1,[25,"directory-listing",null,[["items"],[[20,["currentListing"]]]]],false],[0,"\\n"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/templates/index.hbs"}})}),define("inspektor/templates/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"Fqf/+82x",block:'{"symbols":[],"statements":[[6,"div"],[9,"class","inspect-details"],[7],[0,"\\n  "],[6,"section"],[9,"class","content"],[7],[0,"\\n    "],[1,[25,"file-preview",null,[["metaData","storage"],[[20,["model","documentMetaData"]],[20,["storage"]]]]],false],[0,"\\n  "],[8],[0,"\\n  "],[6,"section"],[9,"class","meta"],[7],[0,"\\n    "],[6,"dl"],[7],[0,"\\n      "],[6,"dt"],[7],[0,"Name"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","name"]],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Content type"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","type"]],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Size"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[25,"human-file-size",[[20,["model","documentMetaData","size"]]],null],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Revision (ETag)"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","etag"]],false],[8],[0,"\\n    "],[8],[0,"\\n  "],[8],[0,"\\n"],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/inspect.hbs"}})}),define("inspektor/utils/simple-content-type",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){return e.replace(/;.*$/,"")}}),define("inspektor/config/environment",[],function(){try{var e="inspektor/config/environment",t=document.querySelector('meta[name="'+e+'"]').getAttribute("content"),n={default:JSON.parse(unescape(t))} | ||||
| return Object.defineProperty(n,"__esModule",{value:!0}),n}catch(t){throw new Error('Could not read config from meta tag with name "'+e+'".')}}),runningTests||require("inspektor/app").default.create({name:"inspektor",version:"0.5.0"}) | ||||
							
								
								
									
										85
									
								
								assets/inspektor-91783c20728e693fda16c3b3e1d76227.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,85 @@ | ||||
| "use strict" | ||||
| define("inspektor/app",["exports","inspektor/resolver","ember-load-initializers","inspektor/config/environment"],function(e,t,n,r){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var o=Ember.Application.extend({modulePrefix:r.default.modulePrefix,podModulePrefix:r.default.podModulePrefix,Resolver:t.default});(0,n.default)(o,r.default.modulePrefix),e.default=o}),define("inspektor/components/account-info/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component,n=Ember.computed | ||||
| e.default=t.extend({classNames:["account-info"],userAddress:null,username:n("userAddress",function(){return this.get("userAddress").split("@")[0]}),host:n("userAddress",function(){return"@"+this.get("userAddress").split("@")[1]})})}),define("inspektor/components/account-info/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"rn4KIRZr",block:'{"symbols":[],"statements":[[6,"span"],[9,"class","username"],[7],[1,[18,"username"],false],[8],[0,"\\n"],[6,"br"],[7],[8],[6,"span"],[9,"class","host"],[7],[1,[18,"host"],false],[8],[0,"\\n\\n"],[4,"link-to",["disconnect"],[["class"],["disconnect"]],{"statements":[[0,"disconnect"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/account-info/template.hbs"}})}),define("inspektor/components/breadcrumb-nav/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component,n=Ember.Object,r=Ember.isEmpty | ||||
| e.default=t.extend({tagName:"nav",classNames:["breadcrumb-nav"],currentDirPath:null,linkItems:function(){var e=this.get("currentDirPath") | ||||
| if(r(e))return[] | ||||
| var t=[] | ||||
| return e.split("/").reject(function(e){return r(e)}).forEach(function(r){var o=e.match("(.*"+r+")/")[0] | ||||
| t.pushObject(n.create({name:r,path:o}))}),t}.property("currentDirPath")})}),define("inspektor/components/breadcrumb-nav/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"j3noKP+7",block:'{"symbols":["item"],"statements":[[6,"span"],[9,"class","node"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],["/"]]]],null,{"statements":[[0,"Home"]],"parameters":[]},null],[8],[0,"\\n"],[4,"each",[[20,["linkItems"]]],null,{"statements":[[6,"span"],[9,"class","node"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[1,[19,1,["name"]],false]],"parameters":[]},null],[8],[0,"\\n"]],"parameters":[1]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/breadcrumb-nav/template.hbs"}})}),define("inspektor/components/categories-nav/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component | ||||
| e.default=t.extend({categories:null})}),define("inspektor/components/categories-nav/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"4FB0addV",block:'{"symbols":["category"],"statements":[[4,"if",[[20,["categories"]]],null,{"statements":[[0,"  "],[6,"nav"],[7],[0,"\\n    "],[6,"ul"],[7],[0,"\\n"],[4,"each",[[20,["categories"]]],null,{"statements":[[0,"      "],[6,"li"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[1,[19,1,["name"]],false]],"parameters":[]},null],[8],[0,"\\n"]],"parameters":[1]},null],[0,"    "],[8],[0,"\\n  "],[8],[0,"\\n"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/categories-nav/template.hbs"}})}),define("inspektor/components/directory-listing/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component | ||||
| e.default=t.extend({classNames:["directory-listing"],items:null,itemsSorted:function(){var e=this.get("items") | ||||
| return e.reject(function(e){return"folder"!==e.type}).concat(e.reject(function(e){return"folder"===e.type}))}.property("items")})}),define("inspektor/components/directory-listing/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"K4sJaSiM",block:'{"symbols":["item"],"statements":[[6,"ul"],[9,"class","listing"],[7],[0,"\\n"],[4,"each",[[20,["itemsSorted"]]],null,{"statements":[[0,"  "],[6,"li"],[7],[0,"\\n"],[4,"if",[[19,1,["isFolder"]]],null,{"statements":[[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[0,"        "],[6,"span"],[9,"class","icon"],[7],[1,[25,"item-icon",null,[["type"],[[19,1,["type"]]]]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","name"],[7],[1,[19,1,["name"]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","size"],[7],[8],[0,"\\n        "],[6,"span"],[9,"class","type"],[7],[1,[19,1,["type"]],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]},{"statements":[[0,"      "],[2," TODO link to item "],[0,"\\n"],[4,"link-to",["inspect",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[0,"        "],[6,"span"],[9,"class","icon"],[7],[1,[25,"item-icon",null,[["type"],[[19,1,["type"]]]]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","name"],[7],[1,[19,1,["name"]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","size"],[7],[1,[25,"human-file-size",[[19,1,["size"]]],null],false],[8],[0,"\\n        "],[6,"span"],[9,"class","type"],[7],[1,[19,1,["type"]],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]}],[0,"  "],[8],[0,"\\n"]],"parameters":[1]},null],[8]],"hasEval":false}',meta:{moduleName:"inspektor/components/directory-listing/template.hbs"}})}),define("inspektor/components/file-preview/component",["exports","npm:json-tree-view"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var n=Ember.Component,r=Ember.inject.service,o=Ember.observer,i=Ember.computed.alias,s=Ember.run.scheduleOnce | ||||
| e.default=n.extend({storage:r(),classNames:["file-preview"],fileLoaded:!1,fileContent:null,objectURL:null,metaData:null,isJSON:null,type:i("metaData.type"),isBinary:i("metaData.isBinary"),isImage:function(){return this.get("type").match(/^image\/.+$/)}.property("type"),isText:function(){return!this.get("isBinary")}.property("isBinary"),loadFile:function(){var e=this,t=this.get("metaData.path") | ||||
| this.get("storage.client").getFile(t).then(function(t){if(e.get("isImage")){var n=new window.Uint8Array(t.data),r=new window.Blob([n],{type:t.contentType}) | ||||
| e.set("objectURL",window.URL.createObjectURL(r))}else e.set("fileContent",t.data) | ||||
| e.set("fileLoaded",!0)})}.on("didInsertElement"),onFileLoaded:o("fileLoaded",function(){this.get("fileLoaded")&&this.get("isJSON")&&this.get("jsonShowTree")&&s("afterRender",this,"renderJsonTree")}),onJsonViewChanged:o("jsonShowTree",function(){this.get("fileLoaded")&&this.get("isJSON")&&this.get("jsonShowTree")&&s("afterRender",this,"renderJsonTree")}),renderJsonTree:function(){var e=JSON.parse(this.get("fileContent")),n=new t.default("content",e) | ||||
| n.on("change",function(e,t,n,r){console.log("change",t,n,"=>",r)}),n.on("rename",function(e,t,n,r){console.log("rename",t,n,"=>",r)}),n.on("delete",function(e,t){console.log("delete",t)}),n.on("append",function(e,t,n,r){console.log("append",t,n,"=>",r)}),n.on("click",function(e,t,n){console.log("click",t,"=",n)}),n.on("expand",function(e,t,n){console.log("expand",t,"=",n)}),n.on("collapse",function(e,t,n){console.log("collapse",t,"=",n)}),n.on("refresh",function(e,t,n){console.log("refresh",t,"=",n)}),document.getElementById("json-tree-view").appendChild(n.dom),window.jsonview=n,n.expand(!0),n.withRootName=!1,n.readonly=!0,this.set("jsonTreeView",n)}})}),define("inspektor/components/file-preview/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"7Q1kHSb6",block:'{"symbols":[],"statements":[[4,"if",[[20,["fileLoaded"]]],null,{"statements":[[4,"if",[[20,["isBinary"]]],null,{"statements":[[4,"if",[[20,["isImage"]]],null,{"statements":[[0,"      "],[6,"img"],[10,"src",[18,"objectURL"],null],[10,"alt",[20,["metaData","name"]],null],[7],[8],[0,"\\n"]],"parameters":[]},{"statements":[[0,"      "],[6,"p"],[7],[0,"No preview available for this content type."],[8],[0,"\\n"]],"parameters":[]}]],"parameters":[]},null],[0,"\\n"],[4,"if",[[20,["isText"]]],null,{"statements":[[4,"if",[[20,["isJSON"]]],null,{"statements":[[4,"if",[[20,["jsonShowTree"]]],null,{"statements":[[0,"        "],[6,"div"],[9,"id","json-tree-view"],[7],[8],[0,"\\n"]],"parameters":[]},{"statements":[[0,"        "],[6,"code"],[7],[1,[18,"fileContent"],false],[8],[0,"\\n"]],"parameters":[]}]],"parameters":[]},{"statements":[[0,"      "],[6,"code"],[7],[1,[18,"fileContent"],false],[8],[0,"\\n"]],"parameters":[]}]],"parameters":[]},null]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/file-preview/template.hbs"}})}),define("inspektor/components/item-icon/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Component | ||||
| e.default=t.extend({tagName:"img",classNames:["item-icon"],attributeBindings:["src:src"],type:null,isFolder:function(){return"folder"===this.get("type")}.property("type"),src:function(){var e=this.get("type") | ||||
| return"/img/file-icons/"+(this.get("isFolder")?"folder.svg":e.match(/json/i)?"code-curly.svg":"file.svg")}.property()})}),define("inspektor/components/item-icon/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"0RA2e2SD",block:'{"symbols":[],"statements":[],"hasEval":false}',meta:{moduleName:"inspektor/components/item-icon/template.hbs"}})}),define("inspektor/controllers/application",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Controller,n=Ember.Object,r=Ember.computed,o=Ember.observer,i=Ember.inject.service,s=Ember.computed.alias,a=Ember.isEmpty | ||||
| e.default=t.extend({storage:i(),connecting:s("storage.connecting"),connected:s("storage.connected"),userAddress:s("storage.userAddress"),rootListing:s("storage.rootListing"),currentDirPath:null,connectedClass:r("connected",function(){return this.get("connected")?"connected":"disconnected"}),categories:function(){var e=[],t=this.get("rootListing") | ||||
| return a(t)?e:(t.forEach(function(t){t.isFolder&&e.push(n.create({name:t.name.replace("/",""),type:t.type,path:t.name}))}),e)}.property("rootListing"),connectedChange:o("connected",function(){this.get("connected")||this.set("currentDirPath",null)})})}),define("inspektor/controllers/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Controller,n=Ember.inject.controller,r=Ember.inject.service,o=Ember.computed,i=Ember.observer,s=Ember.computed.alias,a=Ember.isPresent,l=Ember.isEmpty,c=Ember.RSVP.all | ||||
| e.default=t.extend({application:n(),storage:r(),connected:s("storage.connected"),rootListing:s("storage.rootListing"),currentDirPath:s("application.currentDirPath"),queryParams:["path"],currentListing:function(){return a(this.get("model.currentListing"))?this.get("model.currentListing").sortBy("name"):this.get("rootListing")}.property("rootListing.[]","model.[]"),documents:o("currentListing.[]",function(){return l(this.get("currentListing"))?[]:this.get("currentListing").reject(function(e){return"/"===e.path.substr(-1)})}),currentListingContainsDocuments:o("documents.[]",function(){return a(this.get("documents"))}),documentCount:o("documents.[]",function(){return a(this.get("documents"))?this.get("documents").length:0}),parentDir:o("currentDirPath",function(){var e=this.get("currentDirPath").split("/").reject(function(e){return l(e)}) | ||||
| return e.splice(0,e.length-1).join("/")+"/"}),connectedChange:i("connected",function(){this.get("connected")||(this.set("model",null),this.set("path",null))}),actions:{deleteDocuments:function(){var e=this,t="This will delete all "+this.get("documentCount")+" documents/files in the current directory. Are you sure?" | ||||
| if(!window.confirm(t))return!1 | ||||
| var n=this.get("storage.client"),r=this.get("documents").map(function(e){return console.debug("removing "+e.path),n.remove(e.path)}) | ||||
| c(r).then(function(){e.transitionToRoute("index",{queryParams:{path:e.get("parentDir")}})})}}})}),define("inspektor/controllers/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Controller,n=Ember.inject.controller,r=Ember.inject.service,o=Ember.computed,i=Ember.computed.alias,s=Ember.isEmpty | ||||
| e.default=t.extend({application:n(),storage:r(),currentDirPath:i("application.currentDirPath"),queryParams:["path"],documentIsJSON:o("model.documentMetaData.type",function(){return!s(this.get("model.documentMetaData"))&&!!this.get("model.documentMetaData.type").match(/application\/json/i)}),jsonView:"tree",jsonShowTree:o.equal("jsonView","tree"),jsonShowSource:o.equal("jsonView","source"),actions:{showJsonTree:function(){this.set("jsonView","tree")},showJsonSource:function(){this.set("jsonView","source")},deleteItem:function(){var e=this | ||||
| window.confirm("Sure?")&&this.get("storage.client").remove(this.get("path")).then(function(){e.transitionToRoute("index",{queryParams:{path:e.get("currentDirPath")}})})}}})}),define("inspektor/helpers/app-version",["exports","inspektor/config/environment","ember-cli-app-version/utils/regexp"],function(e,t,n){function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{} | ||||
| return t.hideSha?o.match(n.versionRegExp)[0]:t.hideVersion?o.match(n.shaRegExp)[0]:o}Object.defineProperty(e,"__esModule",{value:!0}),e.appVersion=r | ||||
| var o=t.default.APP.version | ||||
| e.default=Ember.Helper.helper(r)}),define("inspektor/helpers/human-file-size",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Helper.helper | ||||
| e.default=t(function(e){if(e<1024)return e+" bytes" | ||||
| var t=-1 | ||||
| do{e/=1024,t++}while(e>1024) | ||||
| return String(Math.max(e,.1).toFixed(1)+" "+["KB","MB","GB","TB","PB","EB","ZB","YB"][t])})}),define("inspektor/helpers/pluralize",["exports","ember-inflector/lib/helpers/pluralize"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/helpers/singularize",["exports","ember-inflector/lib/helpers/singularize"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/initializers/app-version",["exports","ember-cli-app-version/initializer-factory","inspektor/config/environment"],function(e,t,n){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var r=n.default.APP,o=r.name,i=r.version | ||||
| e.default={name:"App Version",initialize:(0,t.default)(o,i)}}),define("inspektor/initializers/container-debug-adapter",["exports","ember-resolver/resolvers/classic/container-debug-adapter"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"container-debug-adapter",initialize:function(){var e=arguments[1]||arguments[0] | ||||
| e.register("container-debug-adapter:main",t.default),e.inject("container-debug-adapter:main","namespace","application:main")}}}),define("inspektor/initializers/data-adapter",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"data-adapter",before:"store",initialize:function(){}}}),define("inspektor/initializers/ember-data",["exports","ember-data/setup-container","ember-data"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"ember-data",initialize:t.default}}),define("inspektor/initializers/export-application-global",["exports","inspektor/config/environment"],function(e,t){function n(){var e=arguments[1]||arguments[0] | ||||
| if(!1!==t.default.exportApplicationGlobal){var n | ||||
| if("undefined"!=typeof window)n=window | ||||
| else if("undefined"!=typeof global)n=global | ||||
| else{if("undefined"==typeof self)return | ||||
| n=self}var r,o=t.default.exportApplicationGlobal | ||||
| r="string"==typeof o?o:Ember.String.classify(t.default.modulePrefix),n[r]||(n[r]=e,e.reopen({willDestroy:function(){this._super.apply(this,arguments),delete n[r]}}))}}Object.defineProperty(e,"__esModule",{value:!0}),e.initialize=n,e.default={name:"export-application-global",initialize:n}}),define("inspektor/initializers/injectStore",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"injectStore",before:"store",initialize:function(){}}}),define("inspektor/initializers/store",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"store",after:"ember-data",initialize:function(){}}}),define("inspektor/initializers/transforms",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"transforms",before:"store",initialize:function(){}}}),define("inspektor/instance-initializers/body-class",["exports","ember-body-class/instance-initializers/body-class"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"initialize",{enumerable:!0,get:function(){return t.initialize}})}),define("inspektor/instance-initializers/ember-data",["exports","ember-data/instance-initializers/initialize-store-service"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"ember-data",initialize:t.default}}) | ||||
| define("inspektor/resolver",["exports","ember-resolver"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/router",["exports","inspektor/config/environment"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var n=Ember.Router.extend({location:t.default.locationType,rootURL:t.default.rootURL}) | ||||
| n.map(function(){this.route("inspect"),this.route("connect"),this.route("disconnect")}),e.default=n}),define("inspektor/routes/application",["exports","ember-body-class/mixins/body-class"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var n=Ember.Route,r=Ember.inject.service | ||||
| e.default=n.extend(t.default,{storage:r(),beforeModel:function(){var e=this | ||||
| this.get("storage.rs").on("error",function(t){console.debug("rs.on error",t),"Unauthorized"===t.name?e.handleUnauthorized():"DiscoveryError"===t.name||alert("An unknown error occured. Please check the browser console for details.")})},handleUnauthorized:function(){this.get("storage.unauthorized")||(this.get("storage").setProperties({unauthorized:!0,connecting:!1,connected:!1}),this.transitionTo("connect"))}})}),define("inspektor/routes/connect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service,r=Ember.run.later,o=Ember.RSVP.Promise | ||||
| e.default=t.extend({storage:n(),beforeModel:function(){var e=this | ||||
| return this.waitForConnectionState().then(function(){e.get("storage.connected")&&e.transitionTo("index")})},waitForConnectionState:function(){var e=this | ||||
| return new o(function(t){function n(){e.get("storage.connecting")?r(n,20):t()}n()})}})}),define("inspektor/routes/disconnect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service | ||||
| e.default=t.extend({storage:n(),beforeModel:function(){this.get("storage.rs").disconnect(),this.transitionTo("connect")}})}),define("inspektor/routes/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service,r=Ember.isEmpty,o=Ember.isPresent,i=Ember.run.later,s=Ember.RSVP.hash,a=Ember.RSVP.Promise | ||||
| e.default=t.extend({storage:n(),queryParams:{path:{refreshModel:!0}},beforeModel:function(){var e=this | ||||
| return this.waitForConnectionState().then(function(){e.get("storage.disconnected")&&e.transitionTo("connect")})},model:function(e){var t=e.path | ||||
| return r(e.path)?null:("/"!==t.substr(-1)&&(t+="/"),s({currentListing:this.get("storage").fetchListing(t),currentDirPath:t}))},setupController:function(e,t){this._super(e,t),r(this.get("storage.categories"))&&this.get("storage.connected")&&this.get("storage").fetchRootListing(),o(t)&&(e.set("currentDirPath",t.currentDirPath),r(t.currentListing)&&this.transitionTo("index",{queryParams:{path:e.get("parentDir")}}))},waitForConnectionState:function(){var e=this | ||||
| return new a(function(t){function n(){e.get("storage.connecting")?i(n,20):t()}n()})}})}),define("inspektor/routes/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var t=Ember.Route,n=Ember.inject.service,r=Ember.isEmpty,o=Ember.isPresent | ||||
| e.default=t.extend({storage:n(),queryParams:{path:{refreshModel:!0}},model:function(e){var t=e.path | ||||
| r(e.path),t.substr(-1) | ||||
| var n=t.match(/^(.*\/).+$/)[1],o=t.match(/^.*\/(.+)$/)[1] | ||||
| return this.get("storage").fetchListing(n).then(function(e){return e.findBy("name",o)}).then(function(e){return{documentMetaData:e,currentDirPath:n}})},setupController:function(e,t){this._super(e,t),r(this.get("storage.categories"))&&this.get("storage.connected")&&this.get("storage").fetchRootListing(),o(t)&&e.set("currentDirPath",t.currentDirPath)}})}),define("inspektor/services/ajax",["exports","ember-ajax/services/ajax"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("inspektor/services/storage",["exports","npm:remotestoragejs","npm:remotestorage-widget","inspektor/utils/simple-content-type"],function(e,t,n,r){Object.defineProperty(e,"__esModule",{value:!0}) | ||||
| var o=Ember.Object,i=Ember.Service,s=Ember.computed,a=Ember.observer,l=Ember.isEmpty | ||||
| e.default=i.extend({rs:null,widget:null,connecting:!0,connected:!1,unauthorized:!1,userAddress:null,disconnected:s.not("connected"),client:null,rootListing:null,setup:function(){var e=this,r=new t.default({cache:!1}) | ||||
| r.access.claim("*","rw") | ||||
| var o=new n.default(r,{skipInitial:!0}) | ||||
| o.attach(),r.on("ready",function(){console.debug("rs.on ready")}),r.on("connected",function(){console.debug("rs.on connected"),e.set("connecting",!1),e.set("connected",!0),e.set("userAddress",e.get("rs").remote.userAddress)}),r.on("not-connected",function(){console.debug("rs.on not-connected"),e.set("connecting",!1),e.set("connected",!1)}),r.on("disconnected",function(){console.debug("rs.on disconnected"),e.set("connecting",!1),e.set("connected",!1)}),r.on("connecting",function(){console.debug("rs.on connecting"),e.set("connecting",!0),e.set("connected",!1)}),r.on("authing",function(){console.debug("rs.on authing"),e.set("connecting",!0),e.set("connected",!1)}),this.set("rs",r),this.set("widget",o),this.set("client",r.scope("/"))}.on("init"),connectedChange:a("connected",function(){this.get("connected")?this.fetchRootListing():this.clearLocalData()}),clearLocalData:function(){this.setProperties({userAddress:null,rootListing:null})},fetchRootListing:function(){var e=this | ||||
| this.fetchListing("").then(function(t){e.set("rootListing",t.sortBy("name"))})},fetchListing:function(e){var t=[] | ||||
| return this.get("client").getListing(e).then(function(n){return l(n)?[]:(Object.keys(n).forEach(function(i){var s=n[i],a=s["Content-Type"]||"folder",l=!1 | ||||
| "folder"!==a&&(l=!!a.match(/charset=binary/),a=(0,r.default)(a)),t.push(o.create({name:i,type:a,isBinary:l,isFolder:"folder"===a,size:s["Content-Length"]||null,path:e+i,etag:s.ETag}))}),t)})}})}),define("inspektor/templates/application",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"HpeupCPN",block:'{"symbols":[],"statements":[[6,"div"],[9,"id","app-container"],[10,"class",[18,"connectedClass"],null],[7],[0,"\\n  "],[6,"aside"],[7],[0,"\\n"],[4,"if",[[20,["connected"]]],null,{"statements":[[0,"      "],[1,[25,"account-info",null,[["userAddress"],[[20,["userAddress"]]]]],false],[0,"\\n      "],[1,[25,"categories-nav",null,[["categories"],[[20,["categories"]]]]],false],[0,"\\n"]],"parameters":[]},null],[0,"  "],[8],[0,"\\n  "],[6,"main"],[7],[0,"\\n    "],[1,[18,"outlet"],false],[0,"\\n  "],[8],[0,"\\n"],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/application.hbs"}})}),define("inspektor/templates/connect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"VjXcIYnG",block:'{"symbols":[],"statements":[],"hasEval":false}',meta:{moduleName:"inspektor/templates/connect.hbs"}})}),define("inspektor/templates/disconnect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"2ZbVbnJi",block:'{"symbols":[],"statements":[[1,[18,"outlet"],false]],"hasEval":false}',meta:{moduleName:"inspektor/templates/disconnect.hbs"}})}),define("inspektor/templates/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"niZ23686",block:'{"symbols":[],"statements":[[6,"header"],[7],[0,"\\n  "],[1,[25,"breadcrumb-nav",null,[["currentDirPath"],[[20,["currentDirPath"]]]]],false],[0,"\\n  "],[6,"nav"],[9,"class","actions"],[7],[0,"\\n"],[4,"if",[[20,["currentListingContainsDocuments"]]],null,{"statements":[[0,"    "],[6,"button"],[9,"class","delete-all"],[3,"action",[[19,0,[]],"deleteDocuments"]],[7],[0,"delete all"],[8],[0,"\\n"]],"parameters":[]},null],[0,"  "],[8],[0,"\\n"],[8],[0,"\\n\\n"],[4,"if",[[20,["currentListing"]]],null,{"statements":[[0,"  "],[1,[25,"directory-listing",null,[["items"],[[20,["currentListing"]]]]],false],[0,"\\n"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/templates/index.hbs"}})}),define("inspektor/templates/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"UoZns/4Y",block:'{"symbols":[],"statements":[[6,"header"],[7],[0,"\\n  "],[1,[25,"breadcrumb-nav",null,[["currentDirPath"],[[20,["currentDirPath"]]]]],false],[0,"\\n  "],[6,"nav"],[9,"class","actions"],[7],[0,"\\n"],[4,"if",[[20,["documentIsJSON"]]],null,{"statements":[[0,"      "],[6,"div"],[9,"class","button-group json-view"],[7],[0,"\\n        "],[6,"button"],[10,"disabled",[18,"jsonShowTree"],null],[10,"class",[26,[[25,"if",[[20,["jsonShowTree"]],"active"],null]]]],[3,"action",[[19,0,[]],"showJsonTree"]],[7],[0,"tree view"],[8],[0,"\\n        "],[6,"button"],[10,"disabled",[18,"jsonShowSource"],null],[10,"class",[26,[[25,"if",[[20,["jsonShowSource"]],"active"],null]]]],[3,"action",[[19,0,[]],"showJsonSource"]],[7],[0,"source"],[8],[0,"\\n      "],[8],[0,"\\n"]],"parameters":[]},null],[0,"    "],[6,"button"],[9,"class","delete"],[3,"action",[[19,0,[]],"deleteItem"]],[7],[0,"delete"],[8],[0,"\\n  "],[8],[0,"\\n"],[8],[0,"\\n\\n"],[6,"div"],[9,"class","inspect-details"],[7],[0,"\\n  "],[6,"section"],[9,"class","content"],[7],[0,"\\n    "],[1,[25,"file-preview",null,[["metaData","isJSON","jsonShowTree","jsonShowSource"],[[20,["model","documentMetaData"]],[20,["documentIsJSON"]],[20,["jsonShowTree"]],[20,["jsonShowSource"]]]]],false],[0,"\\n  "],[8],[0,"\\n  "],[6,"section"],[9,"class","meta"],[7],[0,"\\n    "],[6,"dl"],[7],[0,"\\n      "],[6,"dt"],[7],[0,"Name"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","name"]],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Content type"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","type"]],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Size"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[25,"human-file-size",[[20,["model","documentMetaData","size"]]],null],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Revision (ETag)"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","etag"]],false],[8],[0,"\\n    "],[8],[0,"\\n  "],[8],[0,"\\n"],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/inspect.hbs"}})}),define("inspektor/utils/simple-content-type",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){return e.replace(/;.*$/,"")}}),define("inspektor/config/environment",[],function(){try{var e="inspektor/config/environment",t=document.querySelector('meta[name="'+e+'"]').getAttribute("content"),n={default:JSON.parse(unescape(t))} | ||||
| return Object.defineProperty(n,"__esModule",{value:!0}),n}catch(t){throw new Error('Could not read config from meta tag with name "'+e+'".')}}),runningTests||require("inspektor/app").default.create({name:"inspektor",version:"0.7.1+3deca81c"}) | ||||