> Dominik Csapak <d.csa...@proxmox.com> hat am 22. Januar 2019 um 14:22 
> geschrieben:
> 
> 
> one comment inline, otherwise looks good
> 
> On 1/22/19 12:22 PM, Tim Marx wrote:
> > Signed-off-by: Tim Marx <t.m...@proxmox.com>
> > ---
> > changed since v2:
> > * whitespace fix
> > 
> >   www/manager6/Makefile              |  1 +
> >   www/manager6/ceph/Status.js        | 19 ++++++++++++++++-
> >   www/manager6/window/CephInstall.js | 42 
> > ++++++++++++++++++++++++++++++++++++++
> >   3 files changed, 61 insertions(+), 1 deletion(-)
> >   create mode 100644 www/manager6/window/CephInstall.js
> > 
> > diff --git a/www/manager6/Makefile b/www/manager6/Makefile
> > index e75f0de6..c4dcb786 100644
> > --- a/www/manager6/Makefile
> > +++ b/www/manager6/Makefile
> > @@ -83,6 +83,7 @@ JSSRC=                                                    
> > \
> >     window/BackupConfig.js                          \
> >     window/Settings.js                              \
> >     window/StartupEdit.js                           \
> > +   window/CephInstall.js                           \
> >     panel/NotesView.js                              \
> >     grid/ResourceGrid.js                            \
> >     grid/PoolMembers.js                             \
> > diff --git a/www/manager6/ceph/Status.js b/www/manager6/ceph/Status.js
> > index 78fa1cf8..45702c20 100644
> > --- a/www/manager6/ceph/Status.js
> > +++ b/www/manager6/ceph/Status.js
> > @@ -308,7 +308,24 @@ Ext.define('PVE.node.CephStatus', {
> >     me.version = me.sp.get('ceph-version');
> >     me.change_version(me.version);
> >   
> > -   Proxmox.Utils.monStoreErrors(me,me.store);
> > +   me.mon(me.store.proxy, 'exception', function (proxy, response) {
> > +
> > +       if (response.statusText.match(/not installed/i)) {
> > +           if (Proxmox.UserName === 'root@pam') {
> > +               me.store.stopUpdate();
> > +               me.el.mask(gettext("Ceph not installed"), 
> > ['pve-static-mask']);
> > +
> > +               var win = Ext.create('PVE.ceph.Install', {
> > +                   nodename: nodename
> > +               });
> > +               win.show();
> > +           } else {
> > +               me.store.stopUpdate();
> > +               me.el.mask(gettext("Ceph not installed. Log in as root to 
> > install."), ['pve-static-mask']);
> > +           }
> > +       }
> 
> withouth having tested that code, i think we
> should show all errors here like with monStoreErrors
> (e.g. 403/401/500 etc.)
> 
> as i read the code now, we simply ignore all other errors,
> or am i missing something?

Thanks for that, forgot to add the general check again after testing.

> > +   });
> > +
> >     me.mon(me.store, 'load', me.updateAll, me);
> >     me.on('destroy', me.store.stopUpdate);
> >     me.store.startUpdate();
> > diff --git a/www/manager6/window/CephInstall.js 
> > b/www/manager6/window/CephInstall.js
> > new file mode 100644
> > index 00000000..9152c44f
> > --- /dev/null
> > +++ b/www/manager6/window/CephInstall.js
> > @@ -0,0 +1,42 @@
> > +Ext.define('PVE.ceph.Install', {
> > +    extend: 'Ext.window.Window',
> > +
> > +    width: 300,
> > +    title: gettext('Install Ceph'),
> > +
> > +    nodename: undefined,
> > +    cephVersion: 'luminous',
> > +
> > +    initComponent: function () {
> > +   var me = this;
> > +   if (!me.nodename) {
> > +       throw "no node name specified";
> > +   }
> > +
> > +   me.items = [
> > +       {
> > +           html: '<p>' + gettext('Ceph is not installed on this node. ') +
> > +           gettext('Would you like to install it now?')+'</p>',
> > +           border: false,
> > +           padding: 5
> > +       }
> > +   ];
> > +
> > +   me.buttons = [
> > +       {
> > +           xtype: 'pveConsoleButton',
> > +           disabled: Proxmox.UserName !== 'root@pam',
> > +           text: gettext('Install Ceph-') + me.cephVersion,
> > +           consoleType: 'cmd',
> > +           cmd: "ceph_install",
> > +           nodename: me.nodename
> > +       }
> > +   ];
> > +
> > +   Ext.applyIf(me, {
> > +           modal: true,
> > +           border: false
> > +   });
> > +   me.callParent();
> > +    }
> > +});
> > 
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to