diff app/view/Viewport.js @ 259:d19ad9d28de5

Added code to show general information about the application in the probenauswahlliste.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Thu, 25 Jul 2013 14:26:06 +0200
parents 125e2d43cd0f
children 1626279daadb
line wrap: on
line diff
--- 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: '<center>Probenauswahlmaske</center>',
             bodyPadding: '10 10',
             items: [
+                // Informationen über Nutzer/Gruppe/Version
+                {
+                    xtype: 'panel',
+                    id:  'systeminfo',
+                    bodyPadding: '5',
+                    hidden: true,
+                },
                 // Auswahl einer Abfrage.
                 {
                     xtype: 'queryselector',

http://lada.wald.intevation.org