mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed jasmine test cases.
This commit is contained in:
committed by
Akshay Joshi
parent
460c66ab3f
commit
89d40d38d9
@@ -4,30 +4,18 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
|
||||
import { emptyValidator, isEmptyString } from '../../../../../../../../static/js/validators';
|
||||
|
||||
export class PartitionKeysSchema extends BaseUISchema {
|
||||
constructor(columns=[], getOperatorClass, getCollations) {
|
||||
constructor(columns=[]) {
|
||||
super({
|
||||
key_type: 'column',
|
||||
});
|
||||
this.columns = columns;
|
||||
this.columnsReloadBasis = false;
|
||||
this.getOperatorClass = getOperatorClass;
|
||||
this.getCollations = getCollations;
|
||||
this.op_class_types = [];
|
||||
}
|
||||
|
||||
changeColumnOptions(columns) {
|
||||
this.columns = columns;
|
||||
}
|
||||
|
||||
setOpClassTypes(options) {
|
||||
|
||||
if(!options || (_.isArray(options) && options.length == 0))
|
||||
return this.op_class_types;
|
||||
|
||||
if(this.op_class_types.length == 0)
|
||||
this.op_class_types = options;
|
||||
}
|
||||
|
||||
get baseFields() {
|
||||
let obj = this;
|
||||
return [{
|
||||
@@ -81,7 +69,7 @@ export class PartitionKeysSchema extends BaseUISchema {
|
||||
},{
|
||||
id: 'collationame', label: gettext('Collation'), cell: 'select',
|
||||
type: 'select', group: gettext('partition'), deps:['key_type'],
|
||||
options: obj._top.getCollations(), mode: ['create', 'properties', 'edit'],
|
||||
options: obj.top.getCollations(), mode: ['create', 'properties', 'edit'],
|
||||
editable: function(state) {
|
||||
if(state.key_type == 'expression') {
|
||||
return false;
|
||||
@@ -100,8 +88,7 @@ export class PartitionKeysSchema extends BaseUISchema {
|
||||
return true;
|
||||
},
|
||||
disabled: ()=>{return !(obj.isNew()); },
|
||||
options: obj._top.getOperatorClass(), mode: ['create', 'properties', 'edit'],
|
||||
optionsLoaded: (options)=>{obj.setOpClassTypes(options);},
|
||||
options: obj.top.getOperatorClass(), mode: ['create', 'properties', 'edit'],
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user