Commit Graph

7457 Commits

Author SHA1 Message Date
mpl 1625019561
Merge pull request #1260 from omarchehab98/uiaudio
server/perkeepd/ui: Implement blob audio
2019-06-16 01:13:32 +02:00
Omar Chehab 5c043c6311 server/perkeepd/ui: Fix blob item video play button styling
Closes #776

Change-Id: I85c17f5478b476c06de611f759f618e608120976
2019-06-12 09:53:06 -07:00
Omar Chehab 99f2e2dcb4 server/perkeepd/ui: Implement blob detail audio
Summary:

Implement audio player using web ui.

Add new blob aspect for audio files.

Test Plan:

1. Upload browser compatible audio to perkeep
2. Navigate to web UI
3. Open the audio blob's detail page
4. Play audio

Before:

Audio cannot be played using web ui

After:

Compatible audio can be played and paused from the detail page

Audio title and artist are shown if available

Issue: #202
Change-Id: Icd450aaa16e9e622a677c23f4f1f699784453dbc
2019-06-11 19:21:12 -07:00
Omar Chehab a838f6e15a server/perkeepd/ui: Implement blob item audio
Summary:

Implement audio preview using web ui.

Add new blob handler for audio files.

Test Plan:

1. Upload browser compatible audio to perkeep
2. Navigate to web UI
3. Play audio without leaving perkeep ui
4. Pause audio

Before:

Audio cannot be played using web ui

After:

Compatible audio can be visually identified by the volume icon instead of the default file icon.

Hovering over the audio blob shows a play button.

Click the play button to start playing the audio.

Click the pause button to stop playing the audio.

Issue: #202

Change-Id: Iab8ee4a339f44178992e11e02232d480cd534b3e
2019-06-11 19:21:04 -07:00
mpl 249ea1f220 test/dockertest: allow the <repository:tag> syntax for images 2019-06-06 15:03:15 -07:00
Brad Fitzpatrick 41f5d4a190 Stop using Gerrit (googlesource.com), switch to just GitHub & PRs
Discussed at https://groups.google.com/d/msg/perkeep/terI3u9hfqg/-TWI0dOyCQAJ
2019-06-05 09:50:11 -07:00
Brad Fitzpatrick 8e42f0ff3b Merge "blobserver/google/cloudstorage: allow service accounts w/o GCE" 2019-06-04 17:36:50 +00:00
Ian Lewis b94dc9149c blobserver/google/cloudstorage: allow service accounts w/o GCE
This change allows the use of the default GCS client when not on GCE. It
simply removes the GCE metadata server check. GCS users should set the
GOOGLE_APPLICATION_CREDENTIALS environment variable to point to a
service account JSON key.

Change-Id: I49d68c17f535185b96196309bab926e810d4fd43
2019-06-04 17:36:40 +00:00
Brad Fitzpatrick 236c56cbc9 Merge "Skip app.TestQuit on windows as windows does not support interrupt." 2019-06-04 17:10:13 +00:00
Brad Fitzpatrick fbcc3ee30e Merge "Reduce dependency on OS in determining if file is video." 2019-06-04 17:10:08 +00:00
mpl 9417938aa3 vendor: update a bunch of dependencies, and clean some things up
This change:

1) makes perkeep.org/server/perkeepd/ui/goui a module on its own, so that it
gets ignored by go mod with respect to perkeep.org. Because there's no reason it
should appear in perkeep.org/go.mod, as it is only used by gopherjs to rebuild
the web UI code.
2) updates a few of our dependencies to keep up with upstream changes (go get
-u, go mod tidy, go mod vendor).
3) readds manually (since go mod vendor removes them)
vendor/github.com/gopherjs/gopherjs (and its deps) as well as vendor/myitcv.io
because they are needed when one wants to rebuild the web UI.

As a result I think we can now drop dep, so it is done in this change as
well.

Change-Id: I155819163e15e214a6ba44bab2c19ae171d83d1b
2019-05-30 02:03:30 +02:00
Nick Loadholtes e01b0c2067 doc/uses.md: Correcting link to pk-put
Fixes #1258

Change-Id: I03250242b6d87d50bfe948965e0051611e5bfddc
2019-05-06 22:30:51 -04:00
Mathieu Lonjaret fdf97e5f0f Merge "C+A: add Ian Denhardt (Individual CLA)" 2019-05-05 01:49:03 +00:00
Mathieu Lonjaret f21cd8eb49 Merge "Web UI: Render PDFs in detail view." 2019-05-04 13:01:05 +00:00
Ian Denhardt 9601cf75f8 Web UI: Render PDFs in detail view.
Per the comment, this is pretty straightforward: just embed it in an
iframe

Tested in Firefox and Chromium.

Fixes #795

Change-Id: Ic9620ae974a4c6c562c769db4f2c0f76f22a4041
2019-05-04 01:27:21 -04:00
Mathieu Lonjaret e28bbbd158 Merge "app/publisher/js: make it ignored by tests, with build tag" 2019-05-01 12:04:53 +00:00
Ian Denhardt 0d32c4c002 C+A: add Ian Denhardt (Individual CLA)
Change-Id: Ie2dec6d788ed8fe8edda17f6fb31a253b0862e42
2019-04-30 20:23:22 -04:00
Mathieu Lonjaret cb12c9ca72 Merge "Fix some bitrot & grammar in CONTRIBUTING.md" 2019-04-30 21:57:52 +00:00
mpl 40657f8271 app/publisher/js: make it ignored by tests, with build tag
Since we do not systematically regenerate app/publisher/js/zsearch.go
anymore (because it's part of building the web UI process),
go test ./app/publisher/js
would fail. But we want go test ./... to succeed, so we add build tags
in ./app/publisher/js so that it gets ignored by default.

Change-Id: Ia77689ed937411a628e903189433b70be659e941
2019-04-30 23:50:40 +02:00
Ian Denhardt 64efc6e21b Fix some bitrot & grammar in CONTRIBUTING.md
Specifically:

* Update references to `camtool`, which has been renamed to just `pk`.
* Fix a couple of nearby grammar mistakes.

Change-Id: I60af05879c09d59f7136466dfc1f88d95e4eb919
2019-04-30 13:09:35 -04:00
Mathieu Lonjaret b4c7be3210 Merge "pkg/test: fix usage of make.go" 2019-04-30 11:59:53 +00:00
mpl 0ce51e6618 pkg/test: fix usage of make.go
Because --skip_gopherjs does not exist anymore

Change-Id: I537f9bc2efacd00fc09a7d3e3d72be85154e8684
2019-04-30 13:58:26 +02:00
mpl d728a6abce Dockerfile: bump Go to 1.12.4
Change-Id: I2a9a9edad1b7a991f8cb02c77b9114e15e4a3ebe
2019-04-30 13:43:56 +02:00
mpl 9ed22c3f39 make.go: fix paths for windows
And fix initial stat argument

Change-Id: I35a0aeb0756e283462437beee18a31d860b96dec
2019-04-30 10:13:43 +02:00
mpl 84771358d3 Travis: bump Go to 1.12
Change-Id: Icfcd729420822bb5cb57a3462baf24f5e322be5c
2019-04-30 09:53:28 +02:00
mpl f127d47ec2 make.go: bump Go version to Go 1.12
And vendor in a compatible GopherJS version
(bd77b112433e999447bf4bc599e36214ba494a99).

In addition, since GopherJS:

1) Still does not support Go modules for now
2) Seems to be dying (https://github.com/gopherjs/gopherjs/issues/894)
3) Has been hard to maintain for Perkeep

we decided to gradually move away from it, and to remove it from go.mod. As a
result, in this PR, we repurposed the skipGopherJS option into buildWebUI,
which, in combination with the GO111MODULE env value gives the 4 following
possible behaviours (GO111MODULE=auto omitted on purpose).

1) GO111MODULE=off, -buildWebUI=true:
-old behaviour, i.e. use vendored in gopherjs to rebuild (gophejs itself and then)
the web UI
2) GO111MODULE=off, -buildWebUI=false:
-fetch the JS code for the web UI and the publisher from the Google Cloud bucket
of the Perkeep project. That code was previously built by the scenario 1) and
uploaded there.
3) GO111MODULE=on, -buildWebUI=false:
-same as 2)
4) GO111MODULE=on, -buildWebUI=true:
-forces GO111MODULE=off behind the scenes when rebuilding GopherJS and the
web UI code with it.

Finally, we also modified the checks regarding where we are (i.e.
whether in $GOPATH/src/perkeep.org). Because even though go modules will
in theory allow to build from anywhere, since we disable modules when
the Web UI is rebuilt, we can therefore only do it from within the
GOPATH.

Change-Id: Iee66d7ee882c6d408b5996fd26178bcd7426e3f8
2019-04-28 23:57:14 +02:00
U-GINA-PC\gina 81a528d2c0 Skip app.TestQuit on windows as windows does not support interrupt.
Change-Id: I4ff0858ff312375dd697643a90b1043504d3a92b
2019-04-03 09:08:23 -07:00
U-GINA-PC\gina 8e56f1b305 Reduce dependency on OS in determining if file is video.
Introduce magic.IsVideoFileName, add test for it.

Fixes this error:

--- FAIL: TestIsVideo (0.08s)
    search_test.go:41: IsVideo failed video=true filename=movie.mkv mimetype=application/octet-stream
FAIL
FAIL	perkeep.org/pkg/types/camtypes	0.399s

Discussion about this problem is here:
https://groups.google.com/forum/#!topic/perkeep/Wdb_0Os6ZkY

Change-Id: I14f54bd60c9495d6aa665036b83c813673608ad7
2019-04-02 09:56:09 -07:00
Brad Fitzpatrick 7c03aef51f internal/magic: add mkv as a known video extension
Change-Id: Ifb868a26e7f1f6a9a5603b9ffb791282a19a34b1
2019-03-28 15:13:02 -07:00
Mathieu Lonjaret d7cbec361c Merge "website: record version with buildinfo" 2019-03-28 12:51:29 +00:00
mpl 52e4df095d website: record version with buildinfo
So now when we get the e-mail on a website restart, we'll actually
know what version of it is running.

Also,
make.go: skip gopherjs checks when we only build the website or
camnetdns.

Change-Id: I3f6985afc8931fe478cc4f7caba2b1fc31bc815b
2019-03-27 23:09:54 +01:00
U-GINA-PC\gina 8f087578df Update documented required version of go to 1.11
To bring it inline with changes from 3f24764.

Change-Id: If33740ae9fe3c539196b399b80267c0dd998640d
2019-03-26 09:50:27 -07:00
Brad Fitzpatrick 9bafcb9592 pkg/client: remove old debug print
Change-Id: I984b537f71a31eeb184a28713e27a79fdfaa69b6
2019-03-25 15:36:39 -07:00
mpl acb8676d2d vendor/go4.org/rollsum: actually create the package dir
I mistakenly added the files directly in vendor/go4.org instead of
vendor/go4.org/rollsum in 2a85cb7142

Neither running 'go run make.go', nor running 'go test' (in e.g.
pkg/schema) caught that the package was missing in vendor, because i
happened to also have the package in my GOPATH.

Iirc, before modules existed it would have been enough to run 'go run
make.go' to catch that, whereas now 'go run make.go' ran happily for me,
even with GO111MODULE=off, which is somewhat annoying.

Change-Id: I97805c924700fa159a14fd33014dabc423a4fc60
2019-02-25 23:21:22 +01:00
Mathieu Lonjaret 78362dc1c0 Merge "pk-web: enable TLS-ALPN-01 for Lets Encrypt" 2019-02-24 16:47:59 +00:00
mpl b46cc46d5d pk-web: enable TLS-ALPN-01 for Lets Encrypt
I'm getting reminders from Let's Encrypt that perkeep.org is using a
cert obtained with TLS-SNI-01, which is now deprecated.

I think this change would be enough to switch to TLS-ALPN-01.

Change tested on the staging instance at https://staging.camlistore.net

Change-Id: I19dc51171228e6598846a778aadb8497d3406446
2019-02-23 20:00:10 +01:00
mpl 2a85cb7142 internal/rollsum: replace with go4.org/rollsum
Fixes #1253

Change-Id: I64aac5739a18d2e19494881dcceff9d43355fac2
2019-02-23 01:48:18 +01:00
Brad Fitzpatrick 0683145d61 website: remove opencollective links
Per https://groups.google.com/forum/#!topic/perkeep/Kqvh2dJVmoo

Change-Id: I5ffbf4b323613f9fc83c2082ee6512df64300f4f
2019-02-12 09:11:48 -08:00
mpl ffc9707902 pk-web: do not panic on empty slice of hashes
Fixes #1247

Change-Id: Ia8dcce72c889a72be736ef8d50871516845d52e2
2019-02-01 19:10:39 +01:00
mpl eb547718cb Dockerfile: update to Go 1.11.4
Change-Id: Icbafed8a5f333ccf9687692af05435530c46ab69
2018-12-31 19:21:50 +01:00
mpl af4d166090 go.mod: update garyburd/go-oauth
to rev bca2e7f09a17

Fixes #1240

Change-Id: I59322c2196c8491c70ee0bcb7751ee01ab257ec1
2018-12-28 18:56:40 +01:00
Mathieu Lonjaret 1008e11420 Merge "doc/synology: update latest tarballs" 2018-12-24 10:45:48 +00:00
Mathieu Lonjaret aa7ab23772 Merge "pkg/importer: add "instapaper" importer for Instapaper service" 2018-12-03 15:07:30 +00:00
Angel 3dbb01138f pkg/importer: add "instapaper" importer for Instapaper service
A working importer for the Instapaper service. The importer imports
bookmarks, full text articles, and highlights. A blob item handler for
Instapaper highlight permanodes is included to show summarized highlight
content from the server UI.

Also, this CL updates github.com/garyburd.com/go-auth to rev
bca2e7f09a178fd36b034107a00e2323bca6a82e in order to get support for
XAuth requests.

Fixes #1208

Change-Id: I72e0c40b245c7eec4a44bb475fcaa96a0ee9a1c5
2018-11-26 07:57:08 -05:00
mpl 5d12c9aa0d devcam: create hooks dir if it does not exist
Which can apparently happen with the way gitlab clones our repo.

Change-Id: I895c28647fd211ef7beea2e20ae51b866467f81c
2018-11-22 02:22:09 +01:00
Paul Lindner d364c30ba8 all: add notifications for travis so they appear in the irc channel
Change-Id: I09a1d258c4e8d6bcb6de1352299eac49bcedd2e1
2018-10-31 14:20:39 -07:00
mpl dc4c57880c server/perkeepd/ui: use TokenOrNone in selectall
Omission from 8130bd61ef

Change-Id: Iecf31de608283f12d48ef150d42c7cf55c055d16
2018-10-07 19:16:33 +02:00
mpl bcb0ec628e vendor: bump github.com/gopherjs/gopherjs
To rev 0fee806ad4970060e8f97d37a50fc58572426195, to support Go 1.11.1

Fixes #1227

Change-Id: I8cbb24ff60b3407bec3fad0d660957e36d998324
2018-10-07 04:36:24 +02:00
Mathieu Lonjaret ae7698101e Merge "server/perkeepd/ui/goui: suppress basic auth on OmitAuthToken" 2018-09-27 22:59:36 +00:00
mpl 8130bd61ef server/perkeepd/ui/goui: suppress basic auth on OmitAuthToken
The javascript code was taking into account the OmitAuthToken signal
that there should be no auth, but it hadn't been done in the gopherjs
code yet as well.

Fixes #1221

Change-Id: I3eda0cc12c99664739d6073cc1aeba1aeed8a88a
2018-09-26 20:00:36 +02:00