Compare commits
4 Commits
master
...
vista-r40-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
32b6560af3 | ||
|
|
927232919d | ||
|
|
78a9779fb8 | ||
|
|
23723e589c |
@@ -72,6 +72,10 @@ define([
|
|||||||
{
|
{
|
||||||
value: 1,
|
value: 1,
|
||||||
string: "ON"
|
string: "ON"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 2,
|
||||||
|
string: "FAULT"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
hints: {
|
hints: {
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ define([
|
|||||||
this.injectObjectService = function () {
|
this.injectObjectService = function () {
|
||||||
this.objectService = $injector.get("objectService");
|
this.objectService = $injector.get("objectService");
|
||||||
};
|
};
|
||||||
|
this.$injector = $injector;
|
||||||
this.policyService = policyService;
|
this.policyService = policyService;
|
||||||
this.dialogService = dialogService;
|
this.dialogService = dialogService;
|
||||||
this.copyService = copyService;
|
this.copyService = copyService;
|
||||||
|
|||||||
@@ -365,7 +365,7 @@ define([
|
|||||||
"runs": [
|
"runs": [
|
||||||
{
|
{
|
||||||
"implementation": TransactingMutationListener,
|
"implementation": TransactingMutationListener,
|
||||||
"depends": ["topic", "transactionService", "cacheService"]
|
"depends": ["topic", "transactionService", "cacheService", "transactionManager"]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"constants": [
|
"constants": [
|
||||||
|
|||||||
@@ -32,7 +32,8 @@ define([], function () {
|
|||||||
function TransactingMutationListener(
|
function TransactingMutationListener(
|
||||||
topic,
|
topic,
|
||||||
transactionService,
|
transactionService,
|
||||||
cacheService
|
cacheService,
|
||||||
|
transactionManager
|
||||||
) {
|
) {
|
||||||
|
|
||||||
function hasChanged(domainObject) {
|
function hasChanged(domainObject) {
|
||||||
@@ -52,7 +53,8 @@ define([], function () {
|
|||||||
transactionService.startTransaction();
|
transactionService.startTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
transactionService.addToTransaction(
|
transactionManager.addToTransaction(
|
||||||
|
domainObject.getId(),
|
||||||
persistence.persist.bind(persistence),
|
persistence.persist.bind(persistence),
|
||||||
persistence.refresh.bind(persistence)
|
persistence.refresh.bind(persistence)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -60,10 +60,10 @@ define([
|
|||||||
valueMetadata.values = _.pluck(valueMetadata.enumerations, 'value');
|
valueMetadata.values = _.pluck(valueMetadata.enumerations, 'value');
|
||||||
}
|
}
|
||||||
if (!valueMetadata.hasOwnProperty('max')) {
|
if (!valueMetadata.hasOwnProperty('max')) {
|
||||||
valueMetadata.max = _.max(valueMetadata.values) + 1;
|
valueMetadata.max = _.max(valueMetadata.values);
|
||||||
}
|
}
|
||||||
if (!valueMetadata.hasOwnProperty('min')) {
|
if (!valueMetadata.hasOwnProperty('min')) {
|
||||||
valueMetadata.min = _.min(valueMetadata.values) - 1;
|
valueMetadata.min = _.min(valueMetadata.values);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -204,6 +204,13 @@ define([
|
|||||||
*/
|
*/
|
||||||
resetStats: function () {
|
resetStats: function () {
|
||||||
this.unset('stats');
|
this.unset('stats');
|
||||||
|
let yMetadata = this.metadata.value(this.get('yKey'));
|
||||||
|
if (yMetadata.hasOwnProperty('min') && yMetadata.hasOwnProperty('max')) {
|
||||||
|
this.set('stats', {
|
||||||
|
minValue: yMetadata.min,
|
||||||
|
maxValue: yMetadata.max
|
||||||
|
});
|
||||||
|
}
|
||||||
this.data.forEach(this.updateStats, this);
|
this.data.forEach(this.updateStats, this);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user