Skip to content

Commit ae1c365

Browse files
authored
fix: remove download buttons from UI (#446)
* fix: remove download buttons from ui Also removing references to sregistry global client Signed-off-by: vsoch <[email protected]>
1 parent 675fb4d commit ae1c365

File tree

8 files changed

+6
-156
lines changed

8 files changed

+6
-156
lines changed

.github/dev-requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
pre-commit
2-
black
2+
black==23.3.0
33
isort
44
flake8

.github/workflows/main.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ jobs:
1111
formatting:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v1
15-
14+
- uses: actions/checkout@v4
1615
- name: Check for typos in docs
1716
uses: crate-ci/typos@7ad296c72fa8265059cc03d1eda562fbdfcd6df2 # v1.9.0
1817
with:

.github/workflows/update-contributors.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout Repository
14-
uses: actions/checkout@v2
14+
uses: actions/checkout@v4
1515
- name: Tributors Update
1616

1717
# Important! Update to release https://github.com/con/tributors
@@ -75,7 +75,7 @@ jobs:
7575
echo "PULL_REQUEST_BODY=Tributors update automated pull request." >> $GITHUB_ENV
7676
7777
- name: Open Pull Request
78-
uses: vsoch/pull-request-action@1.0.15
78+
uses: vsoch/pull-request-action@master
7979
if: ${{ env.OPEN_PULL_REQUEST == '1' }}
8080
env:
8181
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ represented by the pull requests that fixed them. Critical items to know are:
1212

1313

1414
## [master](https://github.com/singularityhub/sregistry/tree/master) (master)
15+
- remove button uploads, deprecated (2.1.2)
1516
- setup LIST_DEFAULTS for list settings. (2.1.1)
1617
- update to use Django 4.2 (2.1.0)
1718
- consolidate config into one file with environment (2.0.0)

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.1.1
1+
2.1.2

docs/_docs/client.md

-145
Original file line numberDiff line numberDiff line change
@@ -194,151 +194,6 @@ Of course, do this at your own risk! That is a *CHONKER*!
194194
<hr>
195195
<br>
196196
197-
# Singularity Registry Client
198-
199-
Singularity Registry Global Client, or [sregistry-cli](https://github.com/singularityhub/sregistry-cli),
200-
is a general client to interact with Singularity images at remote endpoints, and it provides
201-
such an endpoint for Singularity Registry Server. We will provide
202-
basic instructions here, and for the full documentation, please see the [getting started guide here](https://singularityhub.github.io/sregistry-cli/client-registry). Note that you will need to [export your credentials](https://singularityhub.github.io/sregistry/credentials) in order to have authenticated interaction with sregistry.
203-
204-
205-
## Install
206-
207-
### sregistry Installation
208-
209-
`sregistry` is the client for Singularity Registry server. To install, you can do the following:
210-
211-
```bash
212-
git clone https://github.com/singularityhub/sregistry-cli
213-
cd sregistry-cli
214-
python setup.py install
215-
```
216-
217-
To check your install, run this command to make sure the `sregistry` client is found.
218-
219-
which sregistry
220-
221-
222-
### Container Install
223-
224-
We have provided a Singularity build definition for you, for which you can use to build a container that serves as the sregistry client (and this will likely be provided on Singularity Hub so you don't even need to do that.) To build, do the following:
225-
226-
```bash
227-
cd sregistry/
228-
229-
# Singularity 2.4 and up
230-
sudo singularity build sregistry Singularity
231-
232-
# For Singularity earlier than 2.4 (deprecated)
233-
singularity create --size 2000 sregistry
234-
sudo singularity bootstrap sregistry Singularity
235-
```
236-
237-
If you install via this option, you will want to make sure the container itself is somewhere on your path, with appropriate permissions for who you want to be able to use it.
238-
239-
240-
## Commands
241-
This brief tutorial assumes that you have [Singularity installed](https://singularityware.github.io/install-linux).
242-
243-
### Pull
244-
Not shown in the demo above is the pull command, but it does the same thing as the singularity pull.
245-
246-
```bash
247-
sregistry pull banana/pudding:milkshake
248-
Progress |===================================| 100.0%
249-
Success! banana-pudding-milkshake.img
250-
```
251-
252-
This is useful so that you can (locally from your registry) pull an image without needing to specify the registry url. It's also important because registry support will only be added to Singularity when the entire suite of compoenents are ready to go!
253-
254-
255-
### Push
256-
257-
If you don't have an image handy, you can pull one:
258-
259-
```bash
260-
singularity pull docker://busybox
261-
```
262-
263-
And then a push to your registry looks like this:
264-
265-
```bash
266-
$ sregistry push -U busybox_latest.sif --name dinosaur/avocado --tag delicious
267-
$ sregistry push -U busybox_latest.sif --name meowmeow/avocado --tag nomnomnom
268-
$ sregistry push -U busybox_latest.sif --name dinosaur/avocado --tag whatinthe
269-
```
270-
271-
If you don't specify a tag, `latest` is used. If you have authentication issues,
272-
remember that you need to [export a token](https://singularityhub.github.io/sregistry/credentials) for your user, and ensure that the user is either an admin/manager, or
273-
that you have set the `USER_COLLECTIONS` variable to true. You can read [more about roles here](https://singularityhub.github.io/sregistry/setup-roles), and [more about teams](https://singularityhub.github.io/sregistry/setup-teams) to manage groups of people.
274-
275-
### List
276-
277-
List is a general command that will show a specific container, a specific collection, optionally with a tag. Examples are provided below:
278-
279-
```bash
280-
# All collections
281-
sregistry list
282-
283-
# A particular collection
284-
sregistry list dinosaur
285-
286-
# A particular container name across collections
287-
sregistry list /avocado
288-
289-
# A named container, no tag
290-
sregistry list dinosaur/avocado
291-
292-
# A named container, with tag
293-
sregistry list dinosaur/avocado:delicious
294-
```
295-
296-
In addition to listing containers, `sregistry` can show you metadata! It does this by issuing an inspect command at upload time, so that no processing is needed on the server side. Singularity Registry is a Dockerized application, so it would require --privileged mode, which is a bad idea. Anyway, we can look at environment (`--env/-e`), runscript (`--runscript/-r`), tests (`--test/-t`), or `Singularity` definition recipe (`--deffile/-d`):
297-
298-
```bash
299-
# Show me environment
300-
sregistry list dinosaur/tacos:delicious --env
301-
302-
# Add runscript
303-
sregistry list dinosaur/tacos:delicious --e --r
304-
305-
# Definition recipe (Singularity) and test
306-
sregistry list dinosaur/tacos:delicious --d --t
307-
308-
# All of them
309-
sregistry list dinosaur/tacos:delicious --e --r --d --t
310-
```
311-
312-
### Delete
313-
Delete requires the same authentication as push, and you will need to confirm with `yes/no`
314-
315-
```bash
316-
sregistry delete dinosaur/tacos:delicious
317-
sregistry list
318-
```
319-
320-
if you want to force it, add `--force`
321-
322-
```bash
323-
sregistry delete dinosaur/tacos:delicious --force
324-
```
325-
326-
### Labels
327-
Labels are important, and so they are represented as objects in the database for index, query, etc. Akin to containers, we can list and search:
328-
329-
```bash
330-
# All labels
331-
sregistry labels
332-
333-
# A specific key
334-
sregistry labels --key maintainer
335-
336-
# A specific value
337-
sregistry labels --value vanessasaur
338-
339-
# A specific key and value
340-
sregistry labels --key maintainer --value vanessasaur
341-
```
342197
343198
# Curl
344199

shub/apps/main/templates/collections/view_collection.html

-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ <h3 class="title">{{ collection.name }} <span class="small">collection</span></h
125125
{% if container.metadata.builder.name == "google_build" %}href="{% url 'delete_google_container' container.id %}">
126126
{% else %} href="{% url 'delete_container' container.id %}">{% endif %}</a>
127127
{% endif %}<!-- container was pushed directly -->
128-
{% if container.get_storage and request.user.is_authenticated %}<a href="{% url 'library_manual_download' container.get_uri %}" target="_blank"><button class="btn-sm btn btn-control btn-light"><i class="fa fa-download"></i></button></a>{% endif %}
129128
</td>
130129

131130
<td><a href="{% url 'container_details' container.id %}">

shub/apps/main/templates/containers/container_details.html

-4
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,6 @@ <h3>
122122
{% endif %}
123123

124124
{% if container.image %}
125-
<a href="{% url 'download_container' container.id container.collection.secret %}"
126-
target="_blank">
127-
<button class="btn btn-sm btn-default">Download</button>
128-
</a>
129125
{% if edit_permission %}
130126
<a id="share_container"
131127
class="btn btn-default btn-sm"

0 commit comments

Comments
 (0)