# HG changeset patch # User Torsten Irländer # Date 1374755166 -7200 # Node ID d19ad9d28de5117451d5d4231a90741447c25377 # Parent 62e92e470a1ea8fb964826dd3c33b87f4c9c386d Added code to show general information about the application in the probenauswahlliste. diff -r 62e92e470a1e -r d19ad9d28de5 app/store/Info.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/store/Info.js Thu Jul 25 14:26:06 2013 +0200 @@ -0,0 +1,13 @@ +Ext.define('Lada.store.Info', { + extend: 'Ext.data.Store', + fields: ['user', 'groups', 'version'], + proxy: { + type: 'rest', + url: 'server/rest/info', + reader: { + type: 'json', + root: 'data' + } + } +}); + diff -r 62e92e470a1e -r d19ad9d28de5 app/view/Viewport.js --- a/app/view/Viewport.js Thu Jul 25 11:01:52 2013 +0200 +++ b/app/view/Viewport.js Thu Jul 25 14:26:06 2013 +0200 @@ -1,13 +1,14 @@ Ext.define('Lada.view.Viewport' ,{ extend: 'Ext.container.Viewport', requires: [ + 'Lada.store.Info', + 'Lada.view.search.List', 'Lada.view.search.List', 'Lada.view.proben.List', 'Lada.view.widgets.Mst', 'Lada.view.widgets.Uwb', 'Lada.view.widgets.Datetime' ], - initComponent: function() { console.log('Setting up Viewport'); this.initSearch(); @@ -21,8 +22,25 @@ //this.initMessung(); //this.initMesswert(); + this.setInfo(); this.callParent(arguments); }, + setInfo: function() { + var store = Ext.create('Lada.store.Info'); + store.load({ + callback: function(a,b,c) { + var info = store.data.items[0]; + var clientVersion = "-/- (-/-)"; + var user = info.get('user'); + var groups = info.get('groups'); + var serverVersion = info.get('version'); + var info = Ext.getCmp('systeminfo'); + info.update('Nutzer: '+user+' | Gruppe(n): '+groups+' | Server: '+serverVersion+' | Client: '+clientVersion); + info.show(); + console.log(info); + } + }); + }, initProbe: function() { var store = Ext.getStore('Proben'); store.load({ @@ -102,6 +120,13 @@ title: '
Probenauswahlmaske
', bodyPadding: '10 10', items: [ + // Informationen über Nutzer/Gruppe/Version + { + xtype: 'panel', + id: 'systeminfo', + bodyPadding: '5', + hidden: true, + }, // Auswahl einer Abfrage. { xtype: 'queryselector',