Commit Graph

385 Commits

Author SHA1 Message Date
Will Norris 77ed42edf8 add canonical import paths
The import path was added to the go file that included the package
documentation if one existed.  Otherwise, I used what seemed to be the
primary file for the package.

Fixes #689

Change-Id: If51be0e86529fd6f179e80af6781e639f8550fd2
2016-03-13 19:57:14 -07:00
Steve Armstrong 93dba45f8d ui: fix symlink in filetree view
Fixes issue #687

Change-Id: I385b5c86d736f798aaaf1416221bee05598c6c4c
2016-03-08 20:30:14 -08:00
mpl e03d0af04f ui: use authentication token instead of Basic Auth
Since issue #660 showed that we could not rely on Basic Auth for some
very particular cases (of POST requests), we wanted to replace Basic
Auth with a pre-generated token based authentication mechanism for these
cases.

However, as there already is such a mechanism used to authenticate
websocket connections, we simply extended the use of that mechanism.
Therefore, the token that is initially generated for websocket
connections is also now a valid token to authenticate any other
connection. The relevant types and method names have been changed to
reflect that. The javascript code pertaining to the sensitive cases
mentioned above has been changed to use that token.

Some doc has been added to point out how security-sensitive the
OpDiscovery permission is, since it gives access to the auth token.

Fixes issue #660

Change-Id: Iafed3b6e4804364ca2559414c8d87dc4a30f6637
2016-02-10 16:58:34 +01:00
mpl 4cf54fb196 UI: add to set when dropped is a dup but not yet a member of the set
Follow-up to 82c6feb61a and builds upon the work of Mathieu Lonjaret's Change 5345.

When viewing a set, and the dropped file is a dup for an existing permanode('s content), we still need to add the permanode to the set if it is not already a member of it. The above commit overlooked that point.

Fixes #622

Change-Id: I694e583625886a7bf164ab9fd5bf8874a7cc2b23
2015-12-29 10:57:34 -07:00
mpl 82c6feb61a UI/upload: detect when permanode already exists
When uploading a file, we were already checking if the contents and file
blob already existed, and acted smartly accordingly. However, we were
still always creating a new permanode (and camliContent claim) for that
file.

This CL addresses that last point.

Fixes #622

Change-Id: Ifb5c8846e20b6684d25a7749c64b09904e07bb6f
2015-08-25 01:11:18 +02:00
mpl c78b881af2 Merge "search: remove all thumbnail business" 2015-07-20 14:43:24 +00:00
mpl 1576fdad6d search: remove all thumbnail business
Fixes Issue #321

Change-Id: I4818580b52c335e204f58b176450459ebc26189c
2015-07-16 16:19:16 +02:00
Mario Russo 5ad8e3a3cb ui: fixes broken links on DirectoryDetail / FiletreePage
Fixes: #629

Change-Id: I35d4fed1e038aba1996964ebca016dd02f7392c6
2015-07-03 09:28:27 +02:00
mpl 0cbed52a3b UI: add title arg to history.replaceState
According to
https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history
the second (=title) argument is ignored. However, in the chrome console
I'm getting
Uncaught TypeError: Failed to execute 'replaceState' on 'History': 2 arguments required, but only 1 present.
errors so I figure it's worth fixing.

Change-Id: I6b745503a68511c8010c41257b6790e7df9b8acb
2015-06-30 00:58:31 +02:00
mpl 5398396ef5 UI: remove unused blob pages
Also remove obsolete stanzas in Makefile

Change-Id: I864451e44bf760ab546d02d5bbf7b59afdc8a665
2015-06-22 17:24:35 +02:00
mpl 630052ff02 Merge "ui/navigator: allow tests, fix navigate return, add tests" 2015-06-04 22:17:09 +00:00
mpl c3869765ed Merge "ui/server_connection: fix opt_fail handling + long overdue cleanups" 2015-06-04 22:13:17 +00:00
mpl 7d355cf5d8 ui/server_connection: fix opt_fail handling + long overdue cleanups
opt_fail as an optional argument didn't work in the cases where the
func would also receive an event as argument. Because when opt_fail is
not provided, the arguments get shifted and the event value would end up
in the opt_fail variable, or vice-versa.
So in these cases, I switched to the more robust
func({success: success, fail: fail}, event) syntax

As a result, safeFail wasn't that useful anymore, and it was incorrectly
bound in some cases, so I removed it.

I also removed a few intermediate function calls which made reading
unnecessarily more complicated.

Change-Id: Ie70694a26e52f302837bbf6ffc16b0a0bb77ad7e
2015-06-03 19:35:57 +02:00
mpl 8c392e92a0 ui/navigator: allow tests, fix navigate return, add tests
1) cam.object dep was needed for any of the tests to run
2) fixed the return logic of navigate() to match its doc. Should be of
no consequence though, as afaik this return value is not used anywhere.
3) added tests for 2)

Change-Id: I5c236ab95482b50437f0047d63e42603f754438d
2015-06-03 17:46:33 +02:00
Mario Russo 38f16f6e31 ui: fixing persisted selection state across navigation
Reintroduction of the left/right arrow and the Around query
broke saved selection state.

Fixes: #609

Change-Id: I0974fd8af48e0eb9fe9d16faecd41b17a6f3824b
2015-05-29 14:58:39 +02:00
Mathieu Lonjaret cbec324c6a Merge "pkg/server: added help handler" 2015-05-28 13:30:25 +00:00
Mario Russo 7b1903d5b1 pkg/server: added help handler
- Available at '/help/'
- Loads and parses server config upon init and generates the necessary client config for access
- Links to 'Downloadable Tools' are not functional (task is not yet completed)
- A link was added to the default server page as well as a 'Help' option to the Piggy menu

Issue: #536

Change-Id: I10629de034c908ebc76f6feacbbfca1df7bf1c2b
2015-05-28 10:02:17 +02:00
mpl 177cf52a37 Merge "UI: document components lifecycle" 2015-05-27 21:20:31 +00:00
mpl d83bf692b7 UI: document components lifecycle
Change-Id: I2145c668bf54d89ced27891449feff5582b6fa1e
2015-05-21 23:58:41 +02:00
mpl 93727cbff0 ui/index.js: add fallback blobRef search for targetSearchSession_
Also refactor updateTargetSearchSession_ and updateChildSearchSession_
for query string VS target blobRef precedence clarity.

Fixes #614
Fixes #615

Change-Id: Ib70f9fb582e96a6dac3b0920ce324c03501bcd32
2015-05-20 20:07:45 +02:00
Mario Russo ae85a3ff4e ui: added 'No references' placeholder text to the blob detail aspect when there are no references to display
Change-Id: I9bd7b10ab8954c41a3b4a7c375748e087fdc77b3
2015-04-23 11:08:17 +02:00
mpl b19e836c7b ui: Get left/right arrows workin again with Around query.
Author: Aaron Boodman

Change-Id: Ib3947e668ca26f65c3e3e2a0178c565e21a884bf
2015-04-02 14:19:44 +02:00
Aaron Boodman e987220ad6 Merge "Add a header to the sidebar that displays number of selected items." 2015-03-15 13:46:02 +00:00
Aaron Boodman cd072f78cd Add a header to the sidebar that displays number of selected items.
Change-Id: Idd877a96dc0f835c4f372d4de787114a39058628
2015-03-15 06:43:36 -07:00
Aaron Boodman 5f3d6a1474 Change button text casing from 'Update Tags' to 'Update tags' for consistency.
Change-Id: Ide78b0f194a6f9da119724b286854faba5d28fd4
2015-03-14 21:17:15 -07:00
Mathieu Lonjaret 68836026b8 Merge "Capture the file's lastModifiedDate provided by File API when uploading from the UI" 2015-02-27 16:27:03 +00:00
Mario Russo a6fe834326 Capture the file's lastModifiedDate provided by File API when uploading from the UI
this change introduces one API to filewriter, which takes an additional param for the file's lastmodtime to store with the file blob

Issue #317

Change-Id: I8da3134306c28e6945661296aaafb7752b4bf8b5
2015-02-26 09:59:43 +01:00
mpl 3e79e73272 search: implement post-search Created sort
Fix some UI queries, since UI always queries with "-created".

Also add Unsorted, to override the CreatedDesc default, for when we
really do not want to sort, e.g. when we don't have a corpus and
trying to sort would make us error out.

Issue #579

Change-Id: Ife0aa816c5e8cac8dc6612d0ffd104238abc6838
2015-02-25 16:43:35 +01:00
Mario Russo 62e1a1f7f7 ui: fixing broken 'View original' link on contextual nav bar
Issue: #576

Change-Id: I9ca432aafdb4ec0b783aded74f51360254da88b5
2015-02-04 19:47:32 +01:00
Salmān Aljammāz 24aa482d97 Fix file embedding I broke with previous commit
oops. http://i.imgur.com/lV8VNe0.jpg

Change-Id: I369b786ff307ef4e3127a1a01e373d9ea6089fa7
2015-01-31 11:44:11 +01:00
Salmān Aljammāz 76356b5a59 various trivial doc fixes
mostly package doc comments.

Change-Id: Iaec3215fc2c24862018ac3a47c276eccfed848c4
2015-01-30 07:45:21 +03:00
Aaron Boodman bc5fd6ea9d Remove no longer used permanode.js
Change-Id: I02a723ac81957e9f5438ab27399974554e7c39c7
2015-01-04 22:52:32 -08:00
Aaron Boodman ea2c8fa990 Add a list of references to a blob to the blob aspect.
Change-Id: I2fe96bc8f04f8137773aee393eb934e06517575d
2015-01-04 21:59:10 -08:00
Aaron Boodman e40504a9b2 Improve heuristic for determining when to show search aspect.
We now show it when either there are existing children, or when
the permanode doesn't have a more specific type.

Change-Id: Ic90829a60bf5f6213afd53476473eed4ffee6ca8
2015-01-02 23:10:45 -08:00
Aaron Boodman 437b8f99e1 Factor out cam.permanodeUtils.getCamliNodeType
Change-Id: I205c1551fd316d9a844cd3fe4041d6e2cf0845b9
2015-01-02 23:10:43 -08:00
Aaron Boodman 7d688b9d85 Revert "Add camliNodeType:'set'"
This reverts commit 2d67328243.

I decided to do this only with heuristics, since we have to maintain
backward compat with data before this camliNodeType existed.

Change-Id: Ieba5dd1f8a4c8f5aedc1477c4fab1ffebcc2878c
2015-01-02 23:08:16 -08:00
Mario Russo a645be4554 Merge "ui: redirect to set after creation" 2014-12-29 17:10:44 +00:00
Aaron Boodman 2d67328243 Add camliNodeType:'set'
Change-Id: Ia174d747dbe386f0150c4470c4db170d9cc1d362
2014-12-28 11:38:32 -08:00
Mario Russo 936bd8a336 ui: redirect to set after creation
Updates #553

Change-Id: I1b2f8e2f07cab08f30d2b30356ba02834dcdb95b
2014-12-28 09:52:25 -07:00
Aaron Boodman fbc116392b Increase size and padding of blob item checkmarks
Change-Id: I36bd82cd7cb0e1d57428734eff05133158b10a04
2014-12-24 10:49:47 -08:00
Aaron Boodman 3683a15e05 Save selection state across navigations.
Bug: https://github.com/camlistore/camlistore/issues/552
Change-Id: I53b0035dd84d1263723ddbb18e6ca488cef7d406
2014-12-24 10:37:10 -08:00
Brad Fitzpatrick ad145260c0 Update more links to use the camlistore.org redirector.
Change-Id: I1ef94301d7ac0df69abc4f3f27bcb363fa8e8082
2014-12-13 17:25:16 +11:00
Mario Russo ef286f891a ui: code cleanup to eliminate ReactJS warnings in console
-"unique key" warnings for items dynamically added via arrays
-"bind" errors when binding without providing 'null' as first param

Related Issue: https://code.google.com/p/camlistore/issues/detail?id=426

Change-Id: I9ab3d8e1097fc37bed54f1e0a6c078dd264ef579
2014-12-06 23:25:01 +01:00
Mario Russo 999a148b32 ui: added 'View original' link to sidebar
Notes:
-this patch also introduces the sidebar to the contents listing aspect (when viewing members of a set)
-the link will only appear for a _single_ selected item

https://code.google.com/p/camlistore/issues/detail?id=541
https://code.google.com/p/camlistore/issues/detail?id=546

Change-Id: Icc93eaa2478f40f3fe272520b1f6ede41f0731dc
2014-12-01 11:47:28 +01:00
Mario Russo 4c53a1cd27 ui: updates to file upload dialog
-display total/transferred bytes rather than num files
-upload is now context sensitive if currently viewing a set
-updated closure dependencies

https://code.google.com/p/camlistore/issues/detail?id=336
https://code.google.com/p/camlistore/issues/detail?id=504

Change-Id: I8dee1ee2711c06dfdc9d59e8d0fa0e4ebc641092
2014-11-16 15:31:08 +01:00
Aaron Boodman 755cf0eb0f Merge "Fix bug where 'no results' message sometimes showed momentarily." 2014-11-08 07:46:38 +00:00
Aaron Boodman d9316ff8dd Fix bug where 'no results' message sometimes showed momentarily.
SearchSession::isComplete() could sometimes return the wrong answer.
Nulling out the continuation is needed to make loadMoreResults()
idempotent. So had to add more state to SearchSession specifically
for tracking completeness.

Change-Id: Ic2a90c73f3a764f358476cffa6d498ea53103421
2014-11-07 23:44:39 -08:00
Aaron Boodman 96bae4b0e2 Fix scrolling on firefox
Change-Id: Ic023dba06680f3d4772fe709b7f5f0dd0d54e7ae
2014-11-06 11:04:21 +00:00
Mario Russo 4cf29f33d3 ui: added 'No results found' message to blob item container
this patch incorporates visual feedback from aaron

Change-Id: Ib7b8bbc7daa958693dafc9b2108cac3ee91bb870
2014-11-06 10:52:47 +01:00
Aaron Boodman 0ba58ae829 Fix badly aligned piggy animation in upload dialog.
Change-Id: I69e9432a90382a2ece9c5f77c089de7f7c9ea492
2014-11-04 16:45:24 -08:00