summaryrefslogtreecommitdiff
path: root/client/js/models
diff options
context:
space:
mode:
authorHunternif <hunternif@gmail.com>2019-04-17 00:32:01 +0700
committerHunternif <hunternif@gmail.com>2019-04-17 00:39:13 +0700
commit4497c0bc6cebb9110d7d7f9fa478718f4e2e8777 (patch)
tree842424dacd63e36d2c4c12515c61862a805f5f04 /client/js/models
parentdef305c11c9f3a8e0e347dab0b2ec03e7275c93c (diff)
client: update and create metric via updating tag
Diffstat (limited to 'client/js/models')
-rw-r--r--client/js/models/tag.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/client/js/models/tag.js b/client/js/models/tag.js
index dcf95de..723bab8 100644
--- a/client/js/models/tag.js
+++ b/client/js/models/tag.js
@@ -69,6 +69,12 @@ class Tag extends events.EventTarget {
detail.suggestions = this._suggestions.map(
relation => relation.names[0]);
}
+ if (this._metric !== this._orig._metric) {
+ detail.metric = {
+ min: this._metric.min,
+ max: this._metric.max
+ };
+ }
let promise = this._origName ?
api.put(uri.formatApiLink('tag', this._origName), detail) :