From 7774c2424105a7c8bcd34bafddc87968a1492d79 Mon Sep 17 00:00:00 2001 From: Stanislav Rassokhin Date: Mon, 15 Feb 2021 17:08:00 +0300 Subject: [PATCH 1/5] CS-474 Drop unique constraint on projects name column --- CHANGELOG.md | 4 ++++ DEPLOYMENT_NOTES.md | 4 ++++ scripts/db/000-base-tables.sql | 1 - 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e00a0b19..ea6395bd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Arbimon Release Notes +## v3.0.10 - Feb XX, 2021 +Resolved issues: +- CS-474 Drop unique constraint on `projects` `name` column + ## v3.0.9 - Feb 12, 2021 New features: diff --git a/DEPLOYMENT_NOTES.md b/DEPLOYMENT_NOTES.md index 5a328489d..02befdbf0 100644 --- a/DEPLOYMENT_NOTES.md +++ b/DEPLOYMENT_NOTES.md @@ -1,5 +1,9 @@ # Arbimon Deployment Notes +## v3.0.10 + +_None_ + ## v3.0.9 - Run migration 006-project-table-add-aed-clustering-enabled-colums.sql diff --git a/scripts/db/000-base-tables.sql b/scripts/db/000-base-tables.sql index 008321343..126f450f9 100644 --- a/scripts/db/000-base-tables.sql +++ b/scripts/db/000-base-tables.sql @@ -1217,7 +1217,6 @@ CREATE TABLE `projects` ( `citizen_scientist_enabled` tinyint(1) NOT NULL DEFAULT '0', `cnn_enabled` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`project_id`), - UNIQUE KEY `name` (`name`), UNIQUE KEY `url` (`url`), KEY `project_type_id` (`project_type_id`), KEY `current_plan` (`current_plan`), From c877bdea56438b3496b3e11a153977e48be99bce Mon Sep 17 00:00:00 2001 From: Evgeniia Rassokhina Date: Mon, 15 Feb 2021 22:56:30 +0300 Subject: [PATCH 2/5] PI-545 Improve the quality of the spectrogram image --- CHANGELOG.md | 7 ++++++- app/model/recordings.js | 4 +++- app/utils/audiotool.js | 5 ++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e00a0b19..7d95e6801 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # Arbimon Release Notes -## v3.0.9 - Feb 12, 2021 +## v3.0.10 + +Resolved issues: +- PI-545 Improve the quality of the spectrogram image + +## v3.0.9 - Feb 15, 2021 New features: - PI-263 Admin can enable Audio-event-detection and Clustering pages diff --git a/app/model/recordings.js b/app/model/recordings.js index b53c29054..be40795d1 100644 --- a/app/model/recordings.js +++ b/app/model/recordings.js @@ -569,7 +569,8 @@ var Recordings = { audioTools.spectrogram(recording_path.path, cache_miss.file, { pixPerSec : config("spectrograms").spectrograms.pixPerSec, height : config("spectrograms").spectrograms.height, - ...recording.uri.endsWith('.opus') && recording.sample_rate && { maxfreq: recording.sample_rate * 2 } + ...recording.uri.endsWith('.opus') && recording.sample_rate && { maxfreq: recording.sample_rate * 2 }, + ...recording.contrast && { contrast: recording.contrast } },function(status_code){ if(status_code) { callback({code:status_code}); return; } cache_miss.retry_get(); @@ -589,6 +590,7 @@ var Recordings = { }, function(rec_info, next){ recording = rec_info; + recording.contrast = 105; Recordings.fetchSpectrogramFile(recording, next); }, function(specFile, next){ diff --git a/app/utils/audiotool.js b/app/utils/audiotool.js index e93831362..a56d6fbd4 100644 --- a/app/utils/audiotool.js +++ b/app/utils/audiotool.js @@ -163,6 +163,7 @@ var audiotools = { * of the audio file's duration. (default: 172) * @param {Integer} options.quantization number of colors gradations used in the spectrogram image. * (default: 249, the maximum) + * @param {Integer} options.contrast the ‘contrast’ of the spectrogram display. * @param {String} options.window windowing function used to compute the spectrogram. * (One of 'Hann', 'Hamming', 'Bartlett', 'Rectangular', 'Kaiser', default: 'Hann') * @param {Function} callback callback function. @@ -192,7 +193,9 @@ var audiotools = { args.push( '-q', ((options.quantization | 0) || 249) // color quantization ); - + if(options.contrast) { + args.push('-z', options.contrast); + } if(options.window && ['Hann', 'Hamming', 'Bartlett', 'Rectangular', 'Kaiser'].indexOf(options.window) >= 0) { args.push('-w', options.window); // just the raw spectrogram image } From 8991584238aa5475d40565b9f2ed13f62999c111 Mon Sep 17 00:00:00 2001 From: Evgeniia Rassokhina Date: Tue, 16 Feb 2021 00:15:11 +0300 Subject: [PATCH 3/5] PI=504 Can not filter more than one tag --- CHANGELOG.md | 5 ++ .../audiodata/recordings/filter-parameters.js | 49 +++++++++---------- 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e00a0b19..e9164d873 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Arbimon Release Notes +## v3.0.10 + +Resolved issues: +- PI-504 Can not filter more than one tag + ## v3.0.9 - Feb 12, 2021 New features: diff --git a/assets/app/app/audiodata/recordings/filter-parameters.js b/assets/app/app/audiodata/recordings/filter-parameters.js index f954b4b44..3e699caf1 100644 --- a/assets/app/app/audiodata/recordings/filter-parameters.js +++ b/assets/app/app/audiodata/recordings/filter-parameters.js @@ -20,7 +20,7 @@ angular.module('a2.audiodata.recordings.filter-parameters', [ requires:'^RecsCtrl', link: function(scope, element, attrs) { var controller = scope.controller; - + scope.applyFilters = function() { scope.onApplyFilters({filters: controller.getFilters()}); }; @@ -55,12 +55,12 @@ angular.module('a2.audiodata.recordings.filter-parameters', [ return _1.length !== undefined && _1.map(mapFn); }; } - + var _1_get_value_mapper = _1_mapper(_1_get("value")); var _1_get_id_mapper = _1_mapper(_1_get("id")); var _1_get_tag_id_mapper = _1_mapper(_1_get("tag_id")); var _1_get_flags_mapper = _1_mapper(_1_get("flags")); - + var findObjectWith = function(arr, key, value) { var result = arr.filter(function(obj) { return obj[key] === value; @@ -96,7 +96,7 @@ angular.module('a2.audiodata.recordings.filter-parameters', [ soundscape_composition_annotation : ['present', 'absent'], }; this.params={}; - + var filterDefs = [ {name:"range" , map: function set_range_bounds(range){ if(range && range.from && range.to) { @@ -123,7 +123,7 @@ angular.module('a2.audiodata.recordings.filter-parameters', [ this.getFilters = function() { var filters = {}; var params = this.params; - + filterDefs.forEach(function(filterDef){ var param = params[filterDef.name]; var value = (param && filterDef.map) ? filterDef.map(param) : param; @@ -131,7 +131,7 @@ angular.module('a2.audiodata.recordings.filter-parameters', [ filters[filterDef.name] = value; } }); - + return filters; }; @@ -139,7 +139,7 @@ angular.module('a2.audiodata.recordings.filter-parameters', [ if(filters === undefined){ filters = {}; } - + var options = this.options; Project.getSites().then(function(sites){ return $q.all(sites.map(function(site){ @@ -157,13 +157,13 @@ angular.module('a2.audiodata.recordings.filter-parameters', [ days: [], // daysList hours: [], // hoursList }; - + var levelIds = Object.keys(lists); - + var getFilterOptions = function(filters, obj, level) { var count = 0; var currentLevel = levelIds[level]; - + for(var child in obj) { if( Object.keys(filters).length && @@ -172,35 +172,35 @@ angular.module('a2.audiodata.recordings.filter-parameters', [ ) { // skip if filter is define and the value is not in it continue; } - + var item = findObjectWith(lists[currentLevel], 'value', child); - + if(!item) { item = { value: child, count: 0 }; lists[currentLevel].push(item); } - + var itemCount; if(typeof obj[child] == 'number') { itemCount = obj[child]; } else { if(level === 0) count = 0; - + itemCount = getFilterOptions(filters, obj[child], level+1); } - + item.count += itemCount; count += itemCount; } - + return count; }; getFilterOptions(filters, data, 0); - + options.sites = lists.sites; options.years = lists.years; - + options.months = lists.months.map(function(month) { month.value = parseInt(month.value); month.value--; @@ -210,12 +210,12 @@ angular.module('a2.audiodata.recordings.filter-parameters', [ count: month.count }; }); - + options.days = lists.days.map(function(day) { day.value = parseInt(day.value); return day; }); - + options.hours = lists.hours.map(function(hour) { hour.value = parseInt(hour.value); return { @@ -224,11 +224,11 @@ angular.module('a2.audiodata.recordings.filter-parameters', [ count: hour.count }; }); - + var sort = function(a, b) { return a.value > b.value; }; - + options.sites.sort(sort); options.years.sort(sort); options.months.sort(sort); @@ -254,12 +254,11 @@ angular.module('a2.audiodata.recordings.filter-parameters', [ if (!tagsObj[key]) { tagsObj[key] = { tag: key, - tag_id: [t.tag_id], + tag_id: t.tag_id, count: t.count } } else { - tagsObj[key].tag_id.push(t.tag_id); tagsObj[key].count++ } }) @@ -277,7 +276,7 @@ angular.module('a2.audiodata.recordings.filter-parameters', [ options.soundscape_composition = classes; }).bind(this)); }; - + this.computeClassificationResultsOptions = function(classifications){ console.log("this.computeClassificationResults = function(classifications){", classifications); var haveThreshold = classifications && classifications.reduce(function(a, b){ From f1fcd691b8114b8c049d3fe8e7ca574ec95a0599 Mon Sep 17 00:00:00 2001 From: 60346719 Utain Witedsonthi Date: Tue, 16 Feb 2021 22:29:17 +0700 Subject: [PATCH 4/5] PI-496 change word "rois" to "Region of Interest" --- assets/app/app/analysis/patternmatching/index.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/assets/app/app/analysis/patternmatching/index.js b/assets/app/app/analysis/patternmatching/index.js index 5ac1f7139..691331108 100644 --- a/assets/app/app/analysis/patternmatching/index.js +++ b/assets/app/app/analysis/patternmatching/index.js @@ -171,14 +171,14 @@ angular.module('a2.analysis.patternmatching', [ { class:'fa fa-th', value:'is-small'}, ], search: [ - {value:'all', text:'All', description: 'Show all matched rois.'}, - {value:'present', text:'Present', description: 'Show all rois marked as present.'}, - {value:'not_present', text:'Not Present', description: 'Show all rois marked as not present.'}, - {value:'unvalidated', text:'Unvalidated', description: 'Show all rois without validation.'}, + {value:'all', text:'All', description: 'Show all matched Region of Interest.'}, + {value:'present', text:'Present', description: 'Show all Region of Interest marked as present.'}, + {value:'not_present', text:'Not Present', description: 'Show all Region of Interest marked as not present.'}, + {value:'unvalidated', text:'Unvalidated', description: 'Show all Region of Interest without validation.'}, {value:'best_per_site', text:'Best per Site', description: 'Show the best scored roi per site.'}, {value:'best_per_site_day', text:'Best per Site, Day', description: 'Show the best scored roi per site and day.'}, - {value:'by_score', text:'Score', description: 'Show all rois ranked by score.'}, - {value:'by_score_per_site', text:'Score per Site', description: 'Show all rois ranked by score per site.'}, + {value:'by_score', text:'Score', description: 'Show all Region of Interest ranked by score.'}, + {value:'by_score_per_site', text:'Score per Site', description: 'Show all Region of Interest ranked by score per site.'}, ], selection: [ {value:'all', text:'All'}, From 67b151fa3f9bb372e999bd07b9c9cf6611730f38 Mon Sep 17 00:00:00 2001 From: 60346719 Utain Witedsonthi Date: Tue, 16 Feb 2021 22:40:25 +0700 Subject: [PATCH 5/5] PI-425 change color "red" to "white" --- assets/app/orders/change-plan.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/app/orders/change-plan.html b/assets/app/orders/change-plan.html index cb1eded80..1743d8b94 100644 --- a/assets/app/orders/change-plan.html +++ b/assets/app/orders/change-plan.html @@ -44,7 +44,7 @@

Your current plan has ended, please select a new plan. The minumum plan is limited by the project storage usage.

-

+

Please contact us at support@rfcx.org if you have any questions or concerns.