Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_.each(this.secrets, (secret: any) => {
var originalSecretParameters: any = JSON.parse(this.SecretsService.decodeSecretData(secret.data).parameters);
var originalSecretKeys: any = _.map(originalSecretParameters, (value: any, key: string) => {
// Make sure properties with a '.' in the name aren't treated as paths.
return [key];
});
var updateSecretParameters: any = _.pick(parameterData, originalSecretKeys);
newParameters = _.omit(newParameters, originalSecretKeys);
if (!angular.equals(updateSecretParameters, originalSecretParameters)) {
// Add the parameters to the new secret parameters
angular.extend(updatedSecretParameters, updateSecretParameters);
// Remove the reference to this secret
updateInstance.spec.parametersFrom = _.reject(updateInstance.spec.parametersFrom, {secretKeyRef: {name: secret.metadata.name}});
}
});
if (typeof(filterRowComparator) === 'function') {
// fix issue this.gantt is undefined
let gantt = this.gantt
filterRowComparator = (actual, expected) => {
// fix actual.model is undefined
return gantt.options.value('filterRowComparator')(actual, expected)
}
}
this.filteredRows = this.filterImpl(this.sortedRows, filterRow, filterRowComparator)
} else {
this.filteredRows = this.sortedRows.slice(0)
}
let raiseEvent = !angular.equals(oldFilteredRows, this.filteredRows)
this.customFilteredRows = this.applyCustomRowFilters(this.filteredRows)
// TODO: Implement rowLimit like columnLimit to enhance performance for gantt with many rows
this.visibleRows = this.customFilteredRows;
(this.gantt.api as any).rows.raise.displayed(this.sortedRows, this.filteredRows, this.visibleRows)
if (raiseEvent) {
(this.gantt.api as any).rows.raise.filter(this.sortedRows, this.filteredRows)
}
}
this.isDataReloadRequired = function () {
// note: using != as want to treat null and undefined the same
return !isCommittedDataset || !ng1.equals(createComparableParams(), prevParamsMemento)
|| hasGlobalSearchFieldChanges();
};
function createComparableParams() {
public isMoveToNewScope(): boolean {
if (this.scopes.length > 0 && this.originalScope) {
return !equals(
omit(this.scopes[0], ['instanceCounts', 'env']),
omit(this.originalScope, ['instanceCounts', 'env'])
);
}
return false;
}
const check = (term, comparator, value) => {
term = term.replace(/[- ]/g, '_');
if (comparator === '>' && term < value) {
return false;
} else if (comparator === '<' && term > value) {
return false;
} else if (comparator === '=' && !angular.equals(term, value)) {
return false;
} else if (comparator === '!' && angular.equals(term, value)) {
return false;
} else if ((comparator === null || comparator === '~') && value.indexOf(term) === -1) {
return false;
}
return true;
};
needsUpdate() {
const modifiedBuffer = this.selectedAccount;
const result = !(
!modifiedBuffer.password &&
angular.equals(this.originalValues.login, modifiedBuffer.login) &&
angular.equals(
this.originalValues.displayName,
modifiedBuffer.displayName,
) &&
angular.equals(
this.originalValues.completeDomain.name,
modifiedBuffer.completeDomain.name,
) &&
angular.equals(this.originalValues.firstName, modifiedBuffer.firstName) &&
angular.equals(this.originalValues.lastName, modifiedBuffer.lastName) &&
angular.equals(
this.originalValues.hiddenFromGAL,
modifiedBuffer.hiddenFromGAL,
) &&
angular.equals(
this.originalValues.accountLicense,
modifiedBuffer.accountLicense,
) &&
angular.equals(this.originalValues.quota, modifiedBuffer.quota)
);
return result && this.accountIsValid() && !this.takenEmailError;
.find(function(key){return _.find(scope[key], function(value){return angular.equals(object,value)})})
.value();
needsUpdate() {
const modifiedBuffer = this.selectedAccount;
const result = !(
!modifiedBuffer.password &&
angular.equals(this.originalValues.login, modifiedBuffer.login) &&
angular.equals(
this.originalValues.displayName,
modifiedBuffer.displayName,
) &&
angular.equals(
this.originalValues.completeDomain.name,
modifiedBuffer.completeDomain.name,
) &&
angular.equals(this.originalValues.firstName, modifiedBuffer.firstName) &&
angular.equals(this.originalValues.lastName, modifiedBuffer.lastName) &&
angular.equals(
this.originalValues.hiddenFromGAL,
modifiedBuffer.hiddenFromGAL,
) &&
angular.equals(
this.originalValues.accountLicense,
modifiedBuffer.accountLicense,
) &&
angular.equals(this.originalValues.quota, modifiedBuffer.quota)
);
return result && this.accountIsValid() && !this.takenEmailError;
}
angular.equals(this.originalValues.login, modifiedBuffer.login) &&
angular.equals(
this.originalValues.displayName,
modifiedBuffer.displayName,
) &&
angular.equals(
this.originalValues.completeDomain.name,
modifiedBuffer.completeDomain.name,
) &&
angular.equals(this.originalValues.firstName, modifiedBuffer.firstName) &&
angular.equals(this.originalValues.lastName, modifiedBuffer.lastName) &&
angular.equals(
this.originalValues.hiddenFromGAL,
modifiedBuffer.hiddenFromGAL,
) &&
angular.equals(
this.originalValues.accountLicense,
modifiedBuffer.accountLicense,
) &&
angular.equals(this.originalValues.quota, modifiedBuffer.quota)
);
return result && this.accountIsValid() && !this.takenEmailError;
}
return _.find(ctrl.options, function(o) {
return angular.equals(o.value, value);
});
}