Skip to content

Commit

Permalink
Merge branch 'release-12.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Feb 1, 2024
2 parents c48f25c + 2890156 commit 17d7a11
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 21 deletions.
5 changes: 2 additions & 3 deletions views/js/component/results/areaBroker.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@
* @author Jean-Sébastien Conan <jean-sebastien@taotesting.com>
*/
define([
'lodash',
'ui/areaBroker'
], function (_, areaBroker) {
], function (areaBroker) {
'use strict';

var requireAreas = [
Expand All @@ -38,5 +37,5 @@ define([
* @returns {broker} the broker
* @throws {TypeError} without a valid container
*/
return _.partial(areaBroker, requireAreas);
return areaBroker.bind(null, requireAreas);
});
8 changes: 4 additions & 4 deletions views/js/component/results/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ define([
var execStack = [];

_.forEach(plugins, function (plugin) {
if (_.isFunction(plugin[method])) {
if (typeof plugin[method] === 'function') {
execStack.push(plugin[method]());
}
});
Expand All @@ -69,10 +69,10 @@ define([
if (!_.isPlainObject(config)) {
throw new TypeError('The configuration is required');
}
if (!_.isString(config.classUri) || !config.classUri) {
if (typeof config.classUri !== 'string' || !config.classUri) {
throw new TypeError('The class URI is required');
}
if (!_.isString(config.dataUrl) || !config.dataUrl) {
if (typeof config.dataUrl !== 'string' || !config.dataUrl) {
throw new TypeError('The service URL is required');
}
if (!_.isPlainObject(config.model) && !_.isArray(config.model)) {
Expand Down Expand Up @@ -117,7 +117,7 @@ define([
};
}

if (_.isFunction(action)) {
if (typeof action === 'function') {
descriptor.action = action;
}
if (!descriptor.label) {
Expand Down
6 changes: 3 additions & 3 deletions views/js/controller/inspectResults.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ define([
}).render($('#results-csv-export'));

binder.register('export_csv', function remove(actionContext) {
const data = _.pick(actionContext, ['uri', 'classUri', 'id']);
const data = (({ uri, classUri, id }) => ({ uri, classUri, id }))(actionContext);
const uniqueValue = data.uri || data.classUri || '';
taskButton
.setTaskConfig({
Expand All @@ -148,7 +148,7 @@ define([
}).render($('#results-sql-export'));

binder.register('export_sql', function remove(actionContext) {
const data = _.pick(actionContext, ['uri', 'classUri', 'id']);
const data = (({ uri, classUri, id }) => ({ uri, classUri, id }))(actionContext);
const uniqueValue = data.uri || data.classUri || '';
taskButtonExportSQL
.setTaskConfig({
Expand All @@ -160,7 +160,7 @@ define([
}

binder.register('open_url', function (actionContext) {
const data = _.pick(actionContext, ['uri', 'classUri', 'id']);
const data = (({ uri, classUri, id }) => ({ uri, classUri, id }))(actionContext);

request(this.url, data, 'POST')
.then(response => {
Expand Down
14 changes: 5 additions & 9 deletions views/js/controller/resultTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,7 @@ define([
}).done(function (response) {
if (response && response.columns) {
if (action === 'remove') {
columns = _.reject(columns, function (col) {
return _.find(response.columns, function (resCol) {
return _.isEqual(col, resCol);
});
});
columns = columns.filter(col => !response.columns.some(resCol => _.isEqual(col, resCol)));
} else {
if (typeof response.first !== 'undefined' && response.first === true) {
columns = response.columns.concat(columns);
Expand All @@ -134,7 +130,7 @@ define([
}
}
}
if (_.isFunction(done)) {
if (typeof done === 'function') {
done();
}
}).always(function () {
Expand All @@ -152,8 +148,8 @@ define([
//set up model from columns
_.forEach(columns, function (col) {
var colId = col.prop ? (col.prop + '_' + col.contextType) : (col.contextId + '_' + col.variableIdentifier);
if(col.columnId){
colId= col.columnId
if (col.columnId) {
colId = col.columnId;
}
model.push({
id: colId,
Expand All @@ -168,7 +164,7 @@ define([
.data('ui.datatable', null)
.off('load.datatable')
.on('load.datatable', function () {
if (_.isFunction(done)) {
if (typeof done === 'function') {
done();
done = '';
}
Expand Down
2 changes: 1 addition & 1 deletion views/js/loader/taoOutcomeUi.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion views/js/loader/taoOutcomeUi.min.js.map

Large diffs are not rendered by default.

0 comments on commit 17d7a11

Please sign in to comment.