Commit Graph

52 Commits

Author SHA1 Message Date
Fabian Ebner
f5e17f156a create ImageView and use it for VM and CT images
The enableFn's that were responsible for switching
between the image remove button and the standard remove button
are not needed anymore.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-11-15 18:41:11 +01:00
Fabian Ebner
1665b8402c create and use BackupView
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-11-15 18:41:11 +01:00
Fabian Ebner
13d7dfccee create and use TemplateView
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-11-15 18:41:11 +01:00
Fabian Ebner
8798c35bcd add upload button conditionally
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-11-15 18:41:11 +01:00
Fabian Ebner
dbeddeb322 turn {nodename, storage, sm} into object variables
so they can be used and specified in derived classes.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-11-15 18:41:11 +01:00
Fabian Ebner
9ce0c25857 content view: allow specifying title bar elements for init
in preparation to create derived classes.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-11-15 18:41:11 +01:00
Fabian Ebner
dc19fb838b remove the now unneccessary content type column
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-11-15 18:41:11 +01:00
Fabian Ebner
606b1d41ac remove the now unnecessary grouping by content type
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-11-15 18:41:11 +01:00
Fabian Ebner
e8b422bc77 use separate view for each content type
Organized as separate "if"s to allow changing properties easily later.

The StorageContentView now serves as a parent class, so the stateId
cannot be fixed there. Instead make each individual view stateful with a
unique stateId.

statusStore is not needed anymore, now there is a single fixed content type,
and the template and upload button are disabled depending on that type.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-11-15 18:41:11 +01:00
Fabian Ebner
c128543fd5 fix extension filter for upload window
so that it selects the correct filter for container templates

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-11-15 18:41:11 +01:00
Thomas Lamprecht
425e05d7ca ui: content/backup-view: move comment to second col, make flex
to make it more look like what we to in PBS

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-12 18:34:38 +01:00
Dominik Csapak
957a53bd61 ui: add comment/verification columns to backup/content grid
verification column only shows in the backup grid and for
pbs storages

(renderer is mostly copied from proxmox-backup)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-11-12 18:14:53 +01:00
Fabian Ebner
8e262f397d ContentView: block removal of in-use container image
Since commit 5dae1a319b32ea3ebbb0b48a9f0b5e3abd1833c9 in pve-storage,
list_volumes correctly returns content type 'rootdir' for container images.
Adapt the relevant check here to make removal behave like it does
for VM images again.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-08-28 10:25:12 +02:00
Thomas Lamprecht
3bbce3b8cd drop jslint lines
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-06 18:11:47 +02:00
Dietmar Maurer
a4a86fe9b9 ui: ContentView: consider new ctime value
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-06 19:05:28 +01:00
Dietmar Maurer
3b8f599bca storage content GUI: improve detection of backup volumes
Include new proxmox backup server volumes.
2020-02-19 14:02:05 +01:00
Thomas Lamprecht
12d50fcd21 ui: add date column for backups in storage content view
main use case is to sort by date, e.g., I just re-created a cluster,
did some VM/CT backups on a NFS dump of mine which already had quite
some backups. Now, on restore I knew that only the backups made
yesterday were interesting, so a sort by date would allow me to find
them all easily, thus this patch was born.

Simple frontend extraction of information from the volid, for now
only for backups as there's the only case were we have the info at
all. Called the model entry "vdate" for "virtual date".

Mayb adding the creation date to all entries could be a nice addition
for the API someday.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-05 10:45:23 +01:00
Stefan Reiter
518a397487 Show supported file types in upload file selector
By default, all file types are shown, but the user now has the option of
filtering only by supported types in the file selector dialog.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Acked-by: Dominik Csapak <d.csapak@proxmox.com>
2019-09-03 07:08:47 +02:00
Dominic Jäger
4d23cdef16 Fix #582: Add default delay for backups
A default of 5 seems like a reasonable delay for removing backups from
the GUI.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
2019-07-25 13:23:40 +02:00
Thomas Lamprecht
9cd612044a www: storage content view: fix typo in var name
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-15 11:08:08 +02:00
Thomas Lamprecht
e7c0216d2e follouwp: reduce duplicate code
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-07 13:30:50 +00:00
Tim Marx
abffa1a6dc ui: storage: handle empty response in case of file upload error
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-05-07 12:03:31 +00:00
Thomas Lamprecht
29acb9b58f fixup: s/Filter: /Search/ which is already translated
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-02-01 09:28:29 +01:00
Christian Ebner
f577bda029 Fix #1831: Add filter to CT template/appliances download window
This adds the posibility to filter CT template/appliances by package as well as
description in the CT template/appliances download window.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-02-01 09:03:00 +01:00
Thomas Lamprecht
9a25bf06b6 ui: storage/content: reference volid in confirm window and use new task description
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-22 13:27:34 +01:00
Thomas Lamprecht
f726b8da42 ui: storage/content: jslint and styling fixups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-22 13:26:56 +01:00
Wolfgang Link
4f19410bdd Add imageRemoveButton
If an image has a <vmid>  encoded in the image name
and the guest does not exist in the cluster
we can delete it on the GUI.

Also, if a config exists on another node and the storage is local
we can delete.

In all other cases, it is not allowed to delete it.

For safety reason the safe remove windows are used.
2018-11-22 11:57:19 +01:00
Wolfgang Link
c5e224fc73 Move removeButton in a variable
The move is necessary to hide the removeButton.
2018-11-22 08:50:32 +01:00
Thomas Lamprecht
56a353b9e7 use RestProxy from widget toolkit
Split PVE specific models, which where not moved to the general
widget toolkit, in a separate folder: data/models/

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2018-01-25 13:36:38 +01:00
Thomas Lamprecht
9cb193cf8c use ObjectStore from widget toolkit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2018-01-25 13:36:38 +01:00
Thomas Lamprecht
8cbc11a70c use TaskViewer & TaskProgress window from widget toolkit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2018-01-25 13:36:38 +01:00
Dominik Csapak
e7ade592e3 use Proxmox.Utils instead of PVE.Utils
some function are now in Proxmox.Utils instead, so we have to use that

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-25 13:36:38 +01:00
Dominik Csapak
5720fafabc use Button from widget toolkit
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-25 13:36:37 +01:00
Dominik Csapak
3b1ca3ff5d use Proxmox.button.StdRemoveButton where possible
most 'Remove' buttons we have used the same code pattern over and over,
with the StdRemoveButton we have a component which does all of this for
us

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-25 13:36:37 +01:00
Dominik Csapak
93cdb62689 add type column to storage content view
and move the grouping feature in the class definition while changing
the text to a generic one

this allows us to group by all columns and still have meaningful
grouping headers

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-01-10 15:42:12 +01:00
Dominik Csapak
1b14c8750d make storage/template grid stateful
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-11-17 09:17:10 +01:00
Emmanuel Kasper
7e06d55dd6 Minor refactor for #1115 (reload grid after template download)
Move the listener to the new window declaration to make it clear
this listener is not bound to the current component
2016-09-28 17:33:29 +02:00
Emmanuel Kasper
8b97744c78 fix #1115 reload storage grid after template download
Refresh the grid after the template has been downloaded, instead
of refreshing after the template has been selected.

this fix a the problem that a newly Turnkey / PVE downloaded template
would not be shown in the storage content grid after closing the task
window
2016-09-27 10:27:42 +02:00
Dominik Csapak
772042eaf0 fix #1091: add backup config button to storage contentview
this adds a show config button to the storage contentview
so that you can show the backup configuration from there

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-09-05 11:20:56 +02:00
Dominik Csapak
91535f2ba7 htmlEncode some comment fields
this adds Ext.String.htmlEncode as renderer
for some comment/description fields

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-06-09 17:40:03 +02:00
Dominik Csapak
22f2f9d6c0 jslint: remove trailing commas
before ECMA5 trailing commas in arrays and objects
are forbidden

in jslint this is an error and cannot be deactivated

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-29 17:06:34 +02:00
Dominik Csapak
78abe162e4 ext6migrate: remove button height from upload window
since we changed to the crisp theme, the button should
not have a height of 32px

this reverts part of the commit:
5d57889439c5f05afb86b08df076e422520e8381

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-21 14:02:47 +01:00
Dominik Csapak
540fdc8b1e formatting and trailing whitespaces fix
fix format of commit
f2a6ce6cf1
(space before 'load')

also fix trailing whitespaces in those files

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-15 16:31:02 +01:00
Dominik Csapak
3d9bc0a27f ext6migrate: fix trailing whitespaces
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-14 17:18:46 +01:00
Dominik Csapak
c90539dead ext6migrate: fix double loadMask
fix the double loadMask, (it exists, because extjs has a default
loadmask for gridpanels)

also move static configuration to class definition

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-14 17:17:51 +01:00
Dominik Csapak
f2a6ce6cf1 ext6migrate: fix store load race condition
when we click on a node/container/vm and quickly
click on something else, there might be a race condition,
where the store finished loading and we try to change
dom elements, which are not there anymore

so we change the store.on to me.mon, which
deletes the handler when the component is gone

in the logview panel we use API2Request, where
we cannot do this, so we check if the component
is destroyed manually

also we change this whenever we change a dom element
in a callback

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-14 17:16:37 +01:00
Dominik Csapak
6c1a2b8690 disable template/upload button in manager6, fixes #483
also for manager6

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-11 16:29:30 +01:00
Dominik Csapak
177de3de1c ext6migrate: fix trailing whitespaces
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-10 17:24:53 +01:00
Dominik Csapak
86cc7049d2 ext6migrate: fix ContentView grouping
the framework triggers the convert function
when you click on a grouping header

since there is no volid there, we have to check this,
otherwise we get an error

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-10 17:24:31 +01:00
Dominik Csapak
3b422683cf ext6migrate: fix ContentView
we move the static configuration to the class definition
we change the deprecated autoScroll to scrollable
we change applyIf to apply (when appropriate)
we change "new Ext..." to Ext.create
we change the event from show to activate

also we change the button height of the upload to 32
so that it matches the textfield (looks weird otherwise)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-10 17:23:36 +01:00