[Lada-commits] [PATCH 4 of 9] Added and updated models
Wald Commits
scm-commit at wald.intevation.org
Mon Nov 3 10:31:24 CET 2014
# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1414786235 -3600
# Node ID f7446ebfe5d0a0ff12ee55c95e6743990826693f
# Parent a05cbc6e63cb357220ccf80f71f80ec4b0332d5d
Added and updated models.
diff -r a05cbc6e63cb -r f7446ebfe5d0 app/model/Base.js
--- a/app/model/Base.js Fri Oct 31 21:07:39 2014 +0100
+++ b/app/model/Base.js Fri Oct 31 21:10:35 2014 +0100
@@ -13,26 +13,20 @@
extend: 'Ext.data.Model',
requires: ['Lada.lib.Helpers'],
/**
- * Helper function to build an ID which is used in the proxy calls. This
- * function is a workaround for
- * https://roundup-intern.intevation.de/bfs/issue30
- * as some items can not be identified with a singe id.
- */
- getEidi: function() {
- return "/" + this.idProperty;
- },
- /**
* Helper function to make a AJAX request against the authinfo interface
* of the server
* @param callback function(model, readonly, isowner)
* @private
*/
- getAuthInfo: function(cb) {
+ getAuthInfo: function(cb, probeId) {
+ if (!probeId) {
+ probeId = this.data.probeId;
+ }
Ext.Ajax.request({
scope: this,
- url: 'server/rest/authinfo/' + this.data.probeId,
+ url: 'server/rest/authinfo/' + probeId,
success: function(response, opts) {
- var obj = Ext.decode(Ext.decode(response.responseText).data);
+ var obj = Ext.decode(response.responseText).data;
cb(this, obj.readonly, obj.isOwner);
},
failure: function(response, opts) {
diff -r a05cbc6e63cb -r f7446ebfe5d0 app/model/Kommentar.js
--- a/app/model/Kommentar.js Fri Oct 31 21:07:39 2014 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
- * Software engineering by Intevation GmbH
- *
- * This file is Free Software under the GNU GPL (v>=3)
- * and comes with ABSOLUTELY NO WARRANTY! Check out
- * the documentation coming with IMIS-Labordaten-Application for details.
- */
-
-/**
- * Model class for Kommentare
- */
-Ext.define('Lada.model.Kommentar', {
- extend: 'Lada.model.Base',
- fields: [
- {name: "kId"},
- {name: "probeId"},
- {name: "erzeuger"},
- {name: "kdatum", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
- {name: "ktext"}
- ],
- idProperty: "kId",
- proxy: {
- type: 'rest',
- appendId: true, //default
- url: 'server/rest/kommentare',
- reader: {
- type: 'json',
- root: 'data'
- }
- },
- getEidi: function() {
- var kid = this.get('kId');
- var probeId = this.get('probeId');
- return "/" + kid + "/" + probeId;
- }
-});
diff -r a05cbc6e63cb -r f7446ebfe5d0 app/model/KommentarM.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/KommentarM.js Fri Oct 31 21:10:35 2014 +0100
@@ -0,0 +1,30 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model class for Kommentare on Messungen
+ */
+Ext.define('Lada.model.KommentarM', {
+ extend: 'Lada.model.Base',
+ fields: [
+ {name: "id"},
+ {name: "messungsId"},
+ {name: "erzeuger"},
+ {name: "datum", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
+ {name: "text"}
+ ],
+ idProperty: "id",
+ proxy: {
+ type: 'rest',
+ url: 'server/rest/kommentar_m',
+ reader: {
+ type: 'json',
+ root: 'data'
+ }
+ }
+});
diff -r a05cbc6e63cb -r f7446ebfe5d0 app/model/KommentarP.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/KommentarP.js Fri Oct 31 21:10:35 2014 +0100
@@ -0,0 +1,31 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model class for Kommentare
+ */
+Ext.define('Lada.model.KommentarP', {
+ extend: 'Lada.model.Base',
+ fields: [
+ {name: "id"},
+ {name: "probeId"},
+ {name: "erzeuger"},
+ {name: "datum", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
+ {name: "text"}
+ ],
+ idProperty: "id",
+ proxy: {
+ type: 'rest',
+ appendId: true, //default
+ url: 'server/rest/kommentar_p',
+ reader: {
+ type: 'json',
+ root: 'data'
+ }
+ }
+});
diff -r a05cbc6e63cb -r f7446ebfe5d0 app/model/MKommentar.js
--- a/app/model/MKommentar.js Fri Oct 31 21:07:39 2014 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
- * Software engineering by Intevation GmbH
- *
- * This file is Free Software under the GNU GPL (v>=3)
- * and comes with ABSOLUTELY NO WARRANTY! Check out
- * the documentation coming with IMIS-Labordaten-Application for details.
- */
-
-/**
- * Model class for Kommentare on Messungen
- */
-Ext.define('Lada.model.MKommentar', {
- extend: 'Lada.model.Base',
- fields: [
- {name: "id"},
- {name: "kid"},
- {name: "messungsId"},
- {name: "probeId"},
- {name: "erzeuger"},
- {name: "kdatum", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
- {name: "ktext"}
- ],
- idProperty: "id",
- proxy: {
- type: 'rest',
- appendId: true, //default
- url: 'server/rest/messkommentare',
- reader: {
- type: 'json',
- root: 'data'
- }
- },
- getEidi: function() {
- var kid = this.get('kid');
- var messId = this.get('messungsId');
- var probeId = this.get('probeId');
- return "/" + kid + "/" + messId + "/" + probeId;
- }
-});
diff -r a05cbc6e63cb -r f7446ebfe5d0 app/model/Messung.js
--- a/app/model/Messung.js Fri Oct 31 21:07:39 2014 +0100
+++ b/app/model/Messung.js Fri Oct 31 21:10:35 2014 +0100
@@ -13,8 +13,8 @@
extend: 'Lada.model.Base',
fields: [
{name: "id"},
- {name: "messungsId", mapping:"id.messungsId"},
- {name: "probeId", mapping:"id.probeId"},
+ {name: "messungsId"},
+ {name: "probeId"},
{name: "mmtId"},
{name: "nebenprobenNr"},
{name: "messdauer"},
@@ -26,21 +26,10 @@
idProperty: "id",
proxy: {
type: 'rest',
- appendId: true, //default
url: 'server/rest/messung',
reader: {
type: 'json',
root: 'data'
}
- },
- getEidi: function() {
- var messId = this.get('messungsId');
- var probeId = this.get('probeId');
- return "/" + messId + "/" + probeId;
}
});
-
-function ts2date(v, record){
- // Converts a timestamp into a date object.
- return new Date(v);
-}
diff -r a05cbc6e63cb -r f7446ebfe5d0 app/model/Messwert.js
--- a/app/model/Messwert.js Fri Oct 31 21:07:39 2014 +0100
+++ b/app/model/Messwert.js Fri Oct 31 21:10:35 2014 +0100
@@ -13,9 +13,8 @@
extend: 'Lada.model.Base',
fields: [
{name: "id"},
- {name: "messungsId", mapping:"id.messungsId"},
- {name: "probeId", mapping:"id.probeId"},
- {name: "messgroesseId", mapping:"id.messgroesseId"},
+ {name: "messungsId"},
+ {name: "messgroesseId"},
{name: "messwert", type:"float"},
{name: "messwertNwg"},
{name: "messfehler", type:"float"},
@@ -27,17 +26,10 @@
idProperty: "id",
proxy: {
type: 'rest',
- appendId: true, //default
url: 'server/rest/messwert',
reader: {
type: 'json',
root: 'data'
}
- },
- getEidi: function() {
- var mid = this.get('messgroesseId');
- var messId = this.get('messungsId');
- var probeId = this.get('probeId');
- return "/" + mid + "/" + messId + "/" + probeId;
}
});
diff -r a05cbc6e63cb -r f7446ebfe5d0 app/model/Ort.js
--- a/app/model/Ort.js Fri Oct 31 21:07:39 2014 +0100
+++ b/app/model/Ort.js Fri Oct 31 21:10:35 2014 +0100
@@ -12,29 +12,20 @@
Ext.define('Lada.model.Ort', {
extend: 'Lada.model.Base',
fields: [
- // Field from the l_ort table
- {name: "portId", type: 'int'},
+ {name: "id", type: 'int'},
{name: "ortId", type: 'int'},
{name: "probeId"},
{name: "ortsTyp"},
{name: "ortszusatztext"},
{name: "letzteAenderung", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()}
],
- idProperty: "portId",
+ idProperty: "id",
proxy: {
type: 'rest',
- appendId: true, //default
url: 'server/rest/ort',
- api: {
- },
reader: {
type: 'json',
root: 'data'
}
- },
- getEidi: function() {
- var ortId = this.get('portId');
- var probeId = this.get('probeId');
- return "/" + ortId + "/" + probeId;
}
});
diff -r a05cbc6e63cb -r f7446ebfe5d0 app/model/Ortdetail.js
--- a/app/model/Ortdetail.js Fri Oct 31 21:07:39 2014 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
- * Software engineering by Intevation GmbH
- *
- * This file is Free Software under the GNU GPL (v>=3)
- * and comes with ABSOLUTELY NO WARRANTY! Check out
- * the documentation coming with IMIS-Labordaten-Application for details.
- */
-
-/**
- * Model class for Ortdetail
- */
-Ext.define('Lada.model.Ortdetail', {
- extend: 'Lada.model.Base',
- fields: [
- {name: "ortId"},
- {name: "bezeichnung"},
- {name: "beschreibung"},
- {name: "unscharf"},
- {name: "nutsCode"},
- {name: "koordXExtern"},
- {name: "koordYExtern"},
- {name: "hoeheLand"},
- {name: "letzteAenderung", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
- {name: "longitude", type: 'float'},
- {name: "latitude", type: 'float'},
- {name: "staatId"},
- {name: "gemId"},
- {name: "otyp"}
- ],
- idProperty: "ortId",
- proxy: {
- type: 'rest',
- appendId: true, //default
- url: 'server/rest/ortinfo',
- api: {
- },
- reader: {
- type: 'json',
- root: 'data'
- }
- }
-});
diff -r a05cbc6e63cb -r f7446ebfe5d0 app/model/Probe.js
--- a/app/model/Probe.js Fri Oct 31 21:07:39 2014 +0100
+++ b/app/model/Probe.js Fri Oct 31 21:10:35 2014 +0100
@@ -9,42 +9,43 @@
/**
* A Probe.
* This class represents and defines the model of a "Probe"
- * */
+ **/
Ext.define('Lada.model.Probe', {
extend: 'Lada.model.Base',
fields: [
- {name: "probeId"},
+ {name: "id"},
+ {name: "probeIdAlt"},
+ {name: "hauptprobenNr"},
+ {name: "test"},
+ {name: "netzbetreiberId"},
+ {name: "mstId"},
+ {name: "datenbasisId"},
{name: "baId"},
- {name: "datenbasisId"},
+ {name: "probenartId"},
+ {name: "mediaDesk"},
+ {name: "media"},
+ {name: "umwId"},
+ {name: "probeentnahmeBeginn", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
+ {name: "probeentnahmeEnde", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
+ {name: "mittelungsdauer"},
+ {name: "letzteAenderung", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
{name: "erzeugerId"},
- {name: "hauptprobenNr"},
- {name: "letzteAenderung", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
- {name: "media"},
- {name: "mediaDesk"},
- {name: "mittelungsdauer"},
+ {name: "probeNehmerId"},
{name: "mpKat"},
{name: "mplId"},
{name: "mprId"},
- {name: "mstId"},
- {name: "netzbetreiberId"},
- {name: "probeNehmerId"},
- {name: "probeentnahmeBeginn", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
- {name: "probeentnahmeEnde", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
- {name: "probenartId"},
{name: "solldatumBeginn", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
{name: "solldatumEnde", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
- {name: "test"},
- {name: "umwId"},
// Readonly-Flag (sent additionaly by the server, not part of the
// model)
{name: "readonly"}
],
- idProperty: "probeId",
+ idProperty: "id",
proxy: {
type: 'rest',
appendId: true, //default
- url: 'server/rest/proben',
+ url: 'server/rest/probe',
reader: {
type: 'json',
root: 'data'
diff -r a05cbc6e63cb -r f7446ebfe5d0 app/model/ProbeList.js
--- a/app/model/ProbeList.js Fri Oct 31 21:07:39 2014 +0100
+++ b/app/model/ProbeList.js Fri Oct 31 21:10:35 2014 +0100
@@ -15,11 +15,10 @@
fields: [
{name: "readonly"}
],
- idProperty: "probeId",
+ idProperty: "id",
proxy: {
type: 'rest',
- appendId: true, //default
- url: 'server/rest/proben',
+ url: 'server/rest/probe',
reader: {
type: 'json',
root: 'data'
diff -r a05cbc6e63cb -r f7446ebfe5d0 app/model/Probenzusatzwert.js
--- a/app/model/Probenzusatzwert.js Fri Oct 31 21:07:39 2014 +0100
+++ b/app/model/Probenzusatzwert.js Fri Oct 31 21:10:35 2014 +0100
@@ -12,17 +12,16 @@
Ext.define('Lada.model.Probenzusatzwert', {
extend: 'Lada.model.Base',
fields: [
- {name: "pzsId"},
+ {name: "id"},
{name: "mehId"},
{name: "beschreibung"},
{name: "zusatzwert"},
{name: "eudfKeyword"}
],
- idProperty: "pzsId",
+ idProperty: "id",
proxy: {
type: 'rest',
- appendId: true, //default
- url: 'server/rest/probenzusatz',
+ url: 'server/rest/sta_probenzusatz',
autoload: true,
reader: {
type: 'json',
diff -r a05cbc6e63cb -r f7446ebfe5d0 app/model/StaDatenbasis.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/StaDatenbasis.js Fri Oct 31 21:10:35 2014 +0100
@@ -0,0 +1,40 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model for Datenbasis Stammdaten.
+ */
+Ext.define('Lada.model.StaDatenbasis', {
+ extend: 'Ext.data.Model',
+
+ /**
+ * Fields are:
+ * - id: The unique identifier (Primary key).
+ * - beschreibung: The long description.
+ * - datenbasis:
+ */
+ fields: [{
+ name: 'id'
+ }, {
+ name: 'beschreibung'
+ }, {
+ name: 'datenabsis'
+ }],
+
+ idProperty: 'id',
+
+ proxy: {
+ type: 'rest',
+ url: 'server/rest/sta_datenbasis',
+ reader: {
+ type: 'json',
+ root: 'data'
+ }
+ }
+});
+
diff -r a05cbc6e63cb -r f7446ebfe5d0 app/model/StaMesseinheit.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/StaMesseinheit.js Fri Oct 31 21:10:35 2014 +0100
@@ -0,0 +1,46 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model for Messeinheit Stammdaten.
+ */
+Ext.define('Lada.model.StaMesseinheit', {
+ extend: 'Ext.data.Model',
+
+ /**
+ * Fields are:
+ * - id: The unique identifier (Primary key).
+ * - beschreibung: The long description.
+ * - einheit: The unit.
+ * - eudfMesseinheitId:
+ * - umrechnungsFaktorEudf:
+ */
+ fields: [{
+ name: 'id'
+ }, {
+ name: 'beschreibung'
+ }, {
+ name: 'einheit'
+ }, {
+ name: 'eudfMesseinheitId'
+ }, {
+ name: 'umrechnungsFaktorEudf'
+ }],
+
+ idProperty: 'id',
+
+ proxy: {
+ type: 'rest',
+ url: 'server/rest/sta_messeinheit',
+ reader: {
+ type: 'json',
+ root: 'data'
+ }
+ }
+});
+
diff -r a05cbc6e63cb -r f7446ebfe5d0 app/model/StaMessgroesse.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/StaMessgroesse.js Fri Oct 31 21:10:35 2014 +0100
@@ -0,0 +1,54 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model for Messgroesse Stammdaten.
+ */
+Ext.define('Lada.model.StaMessgroesse', {
+ extend: 'Ext.data.Model',
+
+ /**
+ * Fields are:
+ * - id: The unique identifier (Primary key).
+ * - beschreibung: The long description.
+ * - defaultFarbe:
+ * - idfNuklidKey:
+ * - istLeitNuklid:
+ * - eudfNuklidId:
+ * - kennungBvl:
+ */
+ fields: [{
+ name: 'id'
+ }, {
+ name: 'beschreibung'
+ }, {
+ name: 'messgroesse'
+ }, {
+ name: 'defaultFarbe'
+ }, {
+ name: 'idfNuklidKey'
+ }, {
+ name: 'istLeitNuklid'
+ }, {
+ name: 'eudfNuklidId'
+ }, {
+ name: 'kennungBvl'
+ }],
+
+ idProperty: 'id',
+
+ proxy: {
+ type: 'rest',
+ url: 'server/rest/sta_messgroesse',
+ reader: {
+ type: 'json',
+ root: 'data'
+ }
+ }
+});
+
diff -r a05cbc6e63cb -r f7446ebfe5d0 app/model/StaMessmethode.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/StaMessmethode.js Fri Oct 31 21:10:35 2014 +0100
@@ -0,0 +1,40 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model for Messmethode Stammdaten.
+ */
+Ext.define('Lada.model.StaMessmethode', {
+ extend: 'Ext.data.Model',
+
+ /**
+ * Fields are:
+ * - id: The unique identifier (Primary key).
+ * - beschreibung: The long description.
+ * - messmethode:
+ */
+ fields: [{
+ name: 'id'
+ }, {
+ name: 'beschreibung'
+ }, {
+ name: 'messmethode'
+ }],
+
+ idProperty: 'id',
+
+ proxy: {
+ type: 'rest',
+ url: 'server/rest/sta_messmethode',
+ reader: {
+ type: 'json',
+ root: 'data'
+ }
+ }
+});
+
diff -r a05cbc6e63cb -r f7446ebfe5d0 app/model/StaMessstelle.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/StaMessstelle.js Fri Oct 31 21:10:35 2014 +0100
@@ -0,0 +1,49 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model for Messstelle Stammdaten.
+ */
+Ext.define('Lada.model.StaMessstelle', {
+ extend: 'Ext.data.Model',
+
+ /**
+ * Fields are:
+ * - id: The unique identifier (Primary key).
+ * - beschreibung: The long description.
+ * - netzbetreiberId:
+ * - messStelle:
+ * - mstTyp:
+ * - amtskennung:
+ */
+ fields: [{
+ name: 'id'
+ }, {
+ name: 'beschreibung'
+ }, {
+ name: 'netzbetreiberId'
+ }, {
+ name: 'messStelle'
+ }, {
+ name: 'mstTyp'
+ }, {
+ name: 'amtskennung'
+ }],
+
+ idProperty: 'id',
+
+ proxy: {
+ type: 'rest',
+ url: 'server/rest/sta_messstelle',
+ reader: {
+ type: 'json',
+ root: 'data'
+ }
+ }
+});
+
diff -r a05cbc6e63cb -r f7446ebfe5d0 app/model/StaNetzbetreiber.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/StaNetzbetreiber.js Fri Oct 31 21:10:35 2014 +0100
@@ -0,0 +1,52 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model for Netzbetreiber Stammdaten.
+ */
+Ext.define('Lada.model.StaNetzbetreiber', {
+ extend: 'Ext.data.Model',
+
+ /**
+ * Fields are:
+ * - id: The unique identifier (Primary key).
+ * - netzbetreiber:
+ * - idfNetzbetreiber:
+ * - isBmn:
+ * - mailverteiler:
+ * - aktiv:
+ * - zustMstId:
+ */
+ fields: [{
+ name: 'id'
+ }, {
+ name: 'netzbetreiber'
+ }, {
+ name: 'idfNetzbetreiber'
+ }, {
+ name: 'isBmn'
+ }, {
+ name: 'mailverteiler'
+ }, {
+ name: 'aktiv'
+ }, {
+ name: 'zustMstId'
+ }],
+
+ idProperty: 'id',
+
+ proxy: {
+ type: 'rest',
+ url: 'server/rest/sta_netzbetreiber',
+ reader: {
+ type: 'json',
+ root: 'data'
+ }
+ }
+});
+
diff -r a05cbc6e63cb -r f7446ebfe5d0 app/model/StaOrt.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/StaOrt.js Fri Oct 31 21:10:35 2014 +0100
@@ -0,0 +1,40 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model class for Ort Stammdaten
+ */
+Ext.define('Lada.model.StaOrt', {
+ extend: 'Lada.model.Base',
+ fields: [
+ {name: "id"},
+ {name: "bezeichnung"},
+ {name: "beschreibung"},
+ {name: "unscharf"},
+ {name: "nutsCode"},
+ {name: "koordXExtern"},
+ {name: "koordYExtern"},
+ {name: "hoeheLand"},
+ {name: "letzteAenderung", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
+ {name: "longitude", type: 'float'},
+ {name: "latitude", type: 'float'},
+ {name: "staatId"},
+ {name: "gemId"},
+ {name: "otyp"}
+ ],
+ idProperty: "id",
+ proxy: {
+ type: 'rest',
+ url: 'server/rest/sta_ort',
+ reader: {
+ type: 'json',
+ root: 'data'
+ }
+ }
+});
+
diff -r a05cbc6e63cb -r f7446ebfe5d0 app/model/StaPflichtmessgroesse.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/StaPflichtmessgroesse.js Fri Oct 31 21:10:35 2014 +0100
@@ -0,0 +1,45 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model class for Pflichtmessgroesse Stammdaten.
+ */
+Ext.define('Lada.model.StaPflichtmessgroesse', {
+ extend: 'Ext.data.Model',
+
+ /**
+ * Fields are:
+ * - id: The unique identifer (Primary key)
+ * - messgroesseId:
+ * - mmtId:
+ * - umwId:
+ * - datenbasisId:
+ */
+ fields: [{
+ name: 'id'
+ }, {
+ name: 'messgroesseId'
+ }, {
+ name: 'mmtId'
+ }, {
+ name: 'umwId'
+ }, {
+ name: 'datenbasisId'
+ }],
+
+ idProperty: 'id',
+
+ proxy: {
+ type: 'rest',
+ url: 'server/rest/sta_pflichtmessgroesse',
+ reader: {
+ type: 'json',
+ root: 'data'
+ }
+ }
+});
diff -r a05cbc6e63cb -r f7446ebfe5d0 app/model/StaProbenart.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/StaProbenart.js Fri Oct 31 21:10:35 2014 +0100
@@ -0,0 +1,42 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model class for Probenart Stammdaten.
+ */
+Ext.define('Lada.model.StaProbenart', {
+ extend: 'Ext.data.Model',
+
+ /**
+ * Fields are:
+ * - id: The unique identifer (Primary key)
+ * - beschreibung: The long description.
+ * - probenart:
+ * - probenartEudfId:
+ */
+ fields: [{
+ name: 'id'
+ }, {
+ name: 'beschreibung'
+ }, {
+ name: 'probenart'
+ }, {
+ name: 'probenartEudfId'
+ }],
+
+ idProperty: 'id',
+
+ proxy: {
+ type: 'rest',
+ url: 'server/rest/sta_probenart',
+ reader: {
+ type: 'json',
+ root: 'data'
+ }
+ }
+});
diff -r a05cbc6e63cb -r f7446ebfe5d0 app/model/StaProbenzusatz.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/StaProbenzusatz.js Fri Oct 31 21:10:35 2014 +0100
@@ -0,0 +1,46 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model class for Probenzusatz Stammdaten.
+ */
+Ext.define('Lada.model.StaProbenzusatz', {
+ extend: 'Ext.data.Model',
+
+ /**
+ * Fields are:
+ * - id: The unique identifer (Primary key)
+ * - beschreibung: The long description.
+ * - mehId:
+ * - zusatzwert:
+ * - eudfKeyword:
+ */
+ fields: [{
+ name: 'id'
+ }, {
+ name: 'beschreibung'
+ }, {
+ name: 'mehId',
+ type: 'int'
+ }, {
+ name: 'zusatzwert'
+ }, {
+ name: 'eudfKeyword'
+ }],
+
+ idProperty: 'id',
+
+ proxy: {
+ type: 'rest',
+ url: 'server/rest/sta_probenzusatz',
+ reader: {
+ type: 'json',
+ root: 'data'
+ }
+ }
+});
diff -r a05cbc6e63cb -r f7446ebfe5d0 app/model/StaStaat.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/StaStaat.js Fri Oct 31 21:10:35 2014 +0100
@@ -0,0 +1,29 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model class for Staat Stammdaten
+ */
+Ext.define('Lada.model.StaStaat', {
+ extend: 'Lada.model.Base',
+ fields: [
+ {name: "id", type: 'int'},
+ {name: "staat"},
+ {name: "staatIso"},
+ {name: "staatKurz"}
+ ],
+ idProperty: "id",
+ proxy: {
+ type: 'rest',
+ url: 'server/rest/sta_staat',
+ reader: {
+ type: 'json',
+ root: 'data'
+ }
+ }
+});
diff -r a05cbc6e63cb -r f7446ebfe5d0 app/model/StaUmwelt.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/StaUmwelt.js Fri Oct 31 21:10:35 2014 +0100
@@ -0,0 +1,42 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model class for Umweltbereich Stammdaten.
+ */
+Ext.define('Lada.model.StaUmwelt', {
+ extend: 'Ext.data.Model',
+
+ /**
+ * Fields are:
+ * - id: The unique identifer (Primary key)
+ * - beschreibung: The long description.
+ * - umweltBereich:
+ * - mehId:
+ */
+ fields: [{
+ name: 'id'
+ }, {
+ name: 'beschreibung'
+ }, {
+ name: 'mehId'
+ }, {
+ name: 'umweltBereich'
+ }],
+
+ idProperty: 'id',
+
+ proxy: {
+ type: 'rest',
+ url: 'server/rest/sta_umwelt',
+ reader: {
+ type: 'json',
+ root: 'data'
+ }
+ }
+});
diff -r a05cbc6e63cb -r f7446ebfe5d0 app/model/Staat.js
--- a/app/model/Staat.js Fri Oct 31 21:07:39 2014 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
- * Software engineering by Intevation GmbH
- *
- * This file is Free Software under the GNU GPL (v>=3)
- * and comes with ABSOLUTELY NO WARRANTY! Check out
- * the documentation coming with IMIS-Labordaten-Application for details.
- */
-
-/**
- * Model class for Staat
- */
-Ext.define('Lada.model.Staat', {
- extend: 'Lada.model.Base',
- fields: [
- {name: "staatId", type: 'int'},
- {name: "staat"},
- {name: "staatIso"},
- {name: "staatKurz"}
- ],
- idProperty: "staatId",
- proxy: {
- type: 'rest',
- appendId: true, //default
- url: 'server/rest/staat',
- api: {
- },
- reader: {
- type: 'json',
- root: 'data'
- }
- }
-});
diff -r a05cbc6e63cb -r f7446ebfe5d0 app/model/Status.js
--- a/app/model/Status.js Fri Oct 31 21:07:39 2014 +0100
+++ b/app/model/Status.js Fri Oct 31 21:10:35 2014 +0100
@@ -12,28 +12,21 @@
Ext.define('Lada.model.Status', {
extend: 'Lada.model.Base',
fields: [
- {name: "sid"},
+ {name: "id"},
{name: "messungsId"},
{name: "probeId"},
{name: "erzeuger"},
{name: "status", defaultValue: 1},
- {name: "sdatum", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
- {name: "skommentar"}
+ {name: "datum", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
+ {name: "kommentar"}
],
- idProperty: "sid",
+ idProperty: "id",
proxy: {
type: 'rest',
- appendId: true, //default
url: 'server/rest/status',
reader: {
type: 'json',
root: 'data'
}
- },
- getEidi: function() {
- var sid = this.get('sid');
- var messId = this.get('messungsId');
- var probeId = this.get('probeId');
- return "/" + sid + "/" + messId + "/" + probeId;
}
});
diff -r a05cbc6e63cb -r f7446ebfe5d0 app/model/Zusatzwert.js
--- a/app/model/Zusatzwert.js Fri Oct 31 21:07:39 2014 +0100
+++ b/app/model/Zusatzwert.js Fri Oct 31 21:10:35 2014 +0100
@@ -12,17 +12,17 @@
Ext.define('Lada.model.Zusatzwert', {
extend: 'Lada.model.Base',
fields: [
+ {name: "id"},
+ {name: "probeId"},
{name: "pzsId"},
- {name: "probeId"},
{name: "nwgZuMesswert", type: 'float'},
{name: "messwertPzs", type: 'float'},
{name: "messfehler", type: 'float'},
{name: "letzteAenderung", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()}
],
- idProperty: "pzsId",
+ idProperty: "id",
proxy: {
type: 'rest',
- appendId: true, //default
url: 'server/rest/zusatzwert',
reader: {
type: 'json',
@@ -35,16 +35,12 @@
writeEverything : true
}
},
- getEidi: function () {
- var pzsId = this.get('pzsId');
- var probeId = this.get('probeId');
- return "/" + pzsId + "/" + probeId;
- },
getMesseinheit: function(pzsId) {
- var zstore = Ext.getStore('Probenzusatzwerte');
- var mstore = Ext.getStore('Messeinheit');
+ var zstore = Ext.getStore('StaProbenzusaetze');
+ var mstore = Ext.getStore('StaMesseinheiten');
var mehId = zstore.getById(pzsId).get('mehId');
- var record = mstore.findRecord('mehId', mehId);
+ console.log('mehid: ' + mehId);
+ var record = mstore.getById(mehId);
return record.get('einheit');
}
});
More information about the Lada-commits
mailing list