|
@@ -134,193 +134,176 @@ from desktop.views import _ko
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/javascript" charset="utf-8">
|
|
<script type="text/javascript" charset="utf-8">
|
|
|
- (function (factory) {
|
|
|
|
|
- if (typeof require === "function") {
|
|
|
|
|
- require(['knockout'], factory);
|
|
|
|
|
- } else {
|
|
|
|
|
- factory(ko);
|
|
|
|
|
|
|
+ (function () {
|
|
|
|
|
+ function MultiGroupAlternative(alt, params, initiallyChecked) {
|
|
|
|
|
+ var self = this;
|
|
|
|
|
+ self.altChecked = ko.observable(initiallyChecked || false);
|
|
|
|
|
+ self.label = params.optionsText ? alt[params.optionsText] : alt;
|
|
|
|
|
+ var value = params.optionsValue ? alt[params.optionsValue] : alt;
|
|
|
|
|
+ self.altChecked.subscribe(function (newValue) {
|
|
|
|
|
+ if (newValue) {
|
|
|
|
|
+ params.selectedOptions.push(value);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ params.selectedOptions.remove(value);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
- }(function (ko) {
|
|
|
|
|
- (function () {
|
|
|
|
|
-
|
|
|
|
|
- function MultiGroupAlternative(alt, params, initiallyChecked) {
|
|
|
|
|
- var self = this;
|
|
|
|
|
- self.altChecked = ko.observable(initiallyChecked || false);
|
|
|
|
|
- self.label = params.optionsText ? alt[params.optionsText] : alt;
|
|
|
|
|
- var value = params.optionsValue ? alt[params.optionsValue] : alt;
|
|
|
|
|
- self.altChecked.subscribe(function (newValue) {
|
|
|
|
|
- if (newValue) {
|
|
|
|
|
- params.selectedOptions.push(value);
|
|
|
|
|
- } else {
|
|
|
|
|
- params.selectedOptions.remove(value);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- function MultiGroupSelectorViewModel(params) {
|
|
|
|
|
- var self = this;
|
|
|
|
|
- self.width = params.width || 600;
|
|
|
|
|
- self.height = params.height || 300;
|
|
|
|
|
|
|
|
|
|
- var textAccessor = function (alt) {
|
|
|
|
|
- if (params.optionsText) {
|
|
|
|
|
- return alt[params.optionsText];
|
|
|
|
|
- }
|
|
|
|
|
- return alt;
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ function MultiGroupSelectorViewModel(params) {
|
|
|
|
|
+ var self = this;
|
|
|
|
|
+ self.width = params.width || 600;
|
|
|
|
|
+ self.height = params.height || 300;
|
|
|
|
|
|
|
|
- self.searchQuery = ko.observable();
|
|
|
|
|
|
|
+ var textAccessor = function (alt) {
|
|
|
|
|
+ if (params.optionsText) {
|
|
|
|
|
+ return alt[params.optionsText];
|
|
|
|
|
+ }
|
|
|
|
|
+ return alt;
|
|
|
|
|
+ };
|
|
|
|
|
|
|
|
- var addToIndexedLists = function (index, key, value) {
|
|
|
|
|
- if (! index[key]) {
|
|
|
|
|
- index[key] = [];
|
|
|
|
|
- }
|
|
|
|
|
- index[key].push(value);
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- self.searchResult = ko.pureComputed(function () {
|
|
|
|
|
- if (self.searchQuery()) {
|
|
|
|
|
- var lowerQuery = self.searchQuery().toLowerCase();
|
|
|
|
|
- var result = {};
|
|
|
|
|
- Object.keys(self.addressBook()).forEach(function (key) {
|
|
|
|
|
- self.addressBook()[key].forEach(function (alt) {
|
|
|
|
|
- if (alt.label.toLowerCase().indexOf(lowerQuery) !== -1) {
|
|
|
|
|
- addToIndexedLists(result, key, alt);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
- return result;
|
|
|
|
|
- }
|
|
|
|
|
- return self.addressBook();
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ self.searchQuery = ko.observable();
|
|
|
|
|
|
|
|
- var initiallyCheckedIndex = {};
|
|
|
|
|
- params.selectedOptions().forEach(function (alt) {
|
|
|
|
|
- initiallyCheckedIndex[alt] = true;
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ var addToIndexedLists = function (index, key, value) {
|
|
|
|
|
+ if (! index[key]) {
|
|
|
|
|
+ index[key] = [];
|
|
|
|
|
+ }
|
|
|
|
|
+ index[key].push(value);
|
|
|
|
|
+ };
|
|
|
|
|
|
|
|
- self.addressBook = ko.pureComputed(function () {
|
|
|
|
|
|
|
+ self.searchResult = ko.pureComputed(function () {
|
|
|
|
|
+ if (self.searchQuery()) {
|
|
|
|
|
+ var lowerQuery = self.searchQuery().toLowerCase();
|
|
|
var result = {};
|
|
var result = {};
|
|
|
- ko.unwrap(params.options).forEach(function (alt) {
|
|
|
|
|
- addToIndexedLists(result, textAccessor(alt).charAt(0).toUpperCase(), new MultiGroupAlternative(alt, params, initiallyCheckedIndex[params.optionsValue ? alt[params.optionsValue] : alt]));
|
|
|
|
|
- });
|
|
|
|
|
- Object.keys(result).forEach(function (key) {
|
|
|
|
|
- result[key].sort();
|
|
|
|
|
|
|
+ Object.keys(self.addressBook()).forEach(function (key) {
|
|
|
|
|
+ self.addressBook()[key].forEach(function (alt) {
|
|
|
|
|
+ if (alt.label.toLowerCase().indexOf(lowerQuery) !== -1) {
|
|
|
|
|
+ addToIndexedLists(result, key, alt);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
});
|
|
});
|
|
|
return result;
|
|
return result;
|
|
|
- });
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ return self.addressBook();
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
- self.searchResultKeys = ko.pureComputed(function () {
|
|
|
|
|
- return Object.keys(self.searchResult()).sort();
|
|
|
|
|
|
|
+ var initiallyCheckedIndex = {};
|
|
|
|
|
+ params.selectedOptions().forEach(function (alt) {
|
|
|
|
|
+ initiallyCheckedIndex[alt] = true;
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ self.addressBook = ko.pureComputed(function () {
|
|
|
|
|
+ var result = {};
|
|
|
|
|
+ ko.unwrap(params.options).forEach(function (alt) {
|
|
|
|
|
+ addToIndexedLists(result, textAccessor(alt).charAt(0).toUpperCase(), new MultiGroupAlternative(alt, params, initiallyCheckedIndex[params.optionsValue ? alt[params.optionsValue] : alt]));
|
|
|
|
|
+ });
|
|
|
|
|
+ Object.keys(result).forEach(function (key) {
|
|
|
|
|
+ result[key].sort();
|
|
|
});
|
|
});
|
|
|
|
|
+ return result;
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
- self.allSelected = ko.observable(false);
|
|
|
|
|
|
|
+ self.searchResultKeys = ko.pureComputed(function () {
|
|
|
|
|
+ return Object.keys(self.searchResult()).sort();
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
- self.allSelected.subscribe(function (newValue) {
|
|
|
|
|
- self.searchResultKeys().forEach(function (key) {
|
|
|
|
|
- self.searchResult()[key].forEach(function (alt) {
|
|
|
|
|
- alt.altChecked(newValue);
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ self.allSelected = ko.observable(false);
|
|
|
|
|
+
|
|
|
|
|
+ self.allSelected.subscribe(function (newValue) {
|
|
|
|
|
+ self.searchResultKeys().forEach(function (key) {
|
|
|
|
|
+ self.searchResult()[key].forEach(function (alt) {
|
|
|
|
|
+ alt.altChecked(newValue);
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
- }
|
|
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- ko.components.register('multi-group-selector', {
|
|
|
|
|
- viewModel: MultiGroupSelectorViewModel,
|
|
|
|
|
- template: {element: 'multi-group-selector-template'}
|
|
|
|
|
- });
|
|
|
|
|
- }());
|
|
|
|
|
- }));
|
|
|
|
|
|
|
+ ko.components.register('multi-group-selector', {
|
|
|
|
|
+ viewModel: MultiGroupSelectorViewModel,
|
|
|
|
|
+ template: {element: 'multi-group-selector-template'}
|
|
|
|
|
+ });
|
|
|
|
|
+ })();
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/javascript" charset="utf-8">
|
|
<script type="text/javascript" charset="utf-8">
|
|
|
- (function (factory) {
|
|
|
|
|
- if (typeof require === "function") {
|
|
|
|
|
- require(['knockout', 'ko.selectize'], factory);
|
|
|
|
|
- } else {
|
|
|
|
|
- factory(ko);
|
|
|
|
|
- }
|
|
|
|
|
- }(function (ko) {
|
|
|
|
|
- (function () {
|
|
|
|
|
-
|
|
|
|
|
- function PropertySelectorViewModel(params) {
|
|
|
|
|
- var self = this;
|
|
|
|
|
- var allProperties = params.properties;
|
|
|
|
|
-
|
|
|
|
|
- self.selectedProperties = ko.observableArray();
|
|
|
|
|
- self.availableProperties = ko.observableArray();
|
|
|
|
|
- self.propertyToAdd = ko.observable(null);
|
|
|
|
|
-
|
|
|
|
|
- var setInitialProperties = function () {
|
|
|
|
|
- self.selectedProperties([]);
|
|
|
|
|
- self.availableProperties([]);
|
|
|
|
|
- allProperties().forEach(function (property) {
|
|
|
|
|
- if (property.defaultValue && ko.mapping.toJSON(property.value) !== ko.mapping.toJSON(property.defaultValue)) {
|
|
|
|
|
- self.selectedProperties.push(property);
|
|
|
|
|
- } else {
|
|
|
|
|
- self.availableProperties.push(property);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- self.sort();
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- setInitialProperties();
|
|
|
|
|
- self.visibleObservable = params.visibleObservable || ko.observable();
|
|
|
|
|
-
|
|
|
|
|
- self.visibleObservable.subscribe(function (newValue) {
|
|
|
|
|
- if (!newValue) {
|
|
|
|
|
- setInitialProperties();
|
|
|
|
|
|
|
+ (function () {
|
|
|
|
|
+
|
|
|
|
|
+ function PropertySelectorViewModel(params) {
|
|
|
|
|
+ var self = this;
|
|
|
|
|
+ var allProperties = params.properties;
|
|
|
|
|
+
|
|
|
|
|
+ self.selectedProperties = ko.observableArray();
|
|
|
|
|
+ self.availableProperties = ko.observableArray();
|
|
|
|
|
+ self.propertyToAdd = ko.observable(null);
|
|
|
|
|
+
|
|
|
|
|
+ var setInitialProperties = function () {
|
|
|
|
|
+ self.selectedProperties([]);
|
|
|
|
|
+ self.availableProperties([]);
|
|
|
|
|
+ allProperties().forEach(function (property) {
|
|
|
|
|
+ if (property.defaultValue && ko.mapping.toJSON(property.value) !== ko.mapping.toJSON(property.defaultValue)) {
|
|
|
|
|
+ self.selectedProperties.push(property);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ self.availableProperties.push(property);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- var niceNameSort = function (a, b) {
|
|
|
|
|
- return a.nice_name().localeCompare(b.nice_name());
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ self.sort();
|
|
|
|
|
+ };
|
|
|
|
|
|
|
|
- PropertySelectorViewModel.prototype.sort = function () {
|
|
|
|
|
- var self = this;
|
|
|
|
|
- self.availableProperties.sort(niceNameSort);
|
|
|
|
|
- self.selectedProperties.sort(niceNameSort);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ setInitialProperties();
|
|
|
|
|
+ self.visibleObservable = params.visibleObservable || ko.observable();
|
|
|
|
|
|
|
|
- PropertySelectorViewModel.prototype.addProperty = function () {
|
|
|
|
|
- var self = this;
|
|
|
|
|
- if (self.propertyToAdd()) {
|
|
|
|
|
- switch (self.propertyToAdd().type()) {
|
|
|
|
|
- case 'csv-hdfs-files':
|
|
|
|
|
- self.propertyToAdd().value('');
|
|
|
|
|
- break;
|
|
|
|
|
- case 'hdfs-files':
|
|
|
|
|
- self.propertyToAdd().value([{ path: ko.observable(''), type: ko.observable('') }]);
|
|
|
|
|
- break;
|
|
|
|
|
- case 'functions':
|
|
|
|
|
- self.propertyToAdd().value([{ name: ko.observable(''), class_name: ko.observable('') }]);
|
|
|
|
|
- break;
|
|
|
|
|
- case 'settings':
|
|
|
|
|
- self.propertyToAdd().value([{ key: ko.observable(''), value: ko.observable('') }]);
|
|
|
|
|
- }
|
|
|
|
|
- self.selectedProperties.push(self.propertyToAdd());
|
|
|
|
|
- self.availableProperties.remove(self.propertyToAdd());
|
|
|
|
|
- self.propertyToAdd(null);
|
|
|
|
|
- self.sort();
|
|
|
|
|
|
|
+ self.visibleObservable.subscribe(function (newValue) {
|
|
|
|
|
+ if (!newValue) {
|
|
|
|
|
+ setInitialProperties();
|
|
|
}
|
|
}
|
|
|
- };
|
|
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- PropertySelectorViewModel.prototype.removeProperty = function (property) {
|
|
|
|
|
- var self = this;
|
|
|
|
|
- property.value(property.defaultValue());
|
|
|
|
|
- self.selectedProperties.remove(property);
|
|
|
|
|
- self.availableProperties.push(property);
|
|
|
|
|
|
|
+ var niceNameSort = function (a, b) {
|
|
|
|
|
+ return a.nice_name().localeCompare(b.nice_name());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ PropertySelectorViewModel.prototype.sort = function () {
|
|
|
|
|
+ var self = this;
|
|
|
|
|
+ self.availableProperties.sort(niceNameSort);
|
|
|
|
|
+ self.selectedProperties.sort(niceNameSort);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ PropertySelectorViewModel.prototype.addProperty = function () {
|
|
|
|
|
+ var self = this;
|
|
|
|
|
+ if (self.propertyToAdd()) {
|
|
|
|
|
+ switch (self.propertyToAdd().type()) {
|
|
|
|
|
+ case 'csv-hdfs-files':
|
|
|
|
|
+ self.propertyToAdd().value('');
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 'hdfs-files':
|
|
|
|
|
+ self.propertyToAdd().value([{ path: ko.observable(''), type: ko.observable('') }]);
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 'functions':
|
|
|
|
|
+ self.propertyToAdd().value([{ name: ko.observable(''), class_name: ko.observable('') }]);
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 'settings':
|
|
|
|
|
+ self.propertyToAdd().value([{ key: ko.observable(''), value: ko.observable('') }]);
|
|
|
|
|
+ }
|
|
|
|
|
+ self.selectedProperties.push(self.propertyToAdd());
|
|
|
|
|
+ self.availableProperties.remove(self.propertyToAdd());
|
|
|
|
|
+ self.propertyToAdd(null);
|
|
|
self.sort();
|
|
self.sort();
|
|
|
}
|
|
}
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ PropertySelectorViewModel.prototype.removeProperty = function (property) {
|
|
|
|
|
+ var self = this;
|
|
|
|
|
+ property.value(property.defaultValue());
|
|
|
|
|
+ self.selectedProperties.remove(property);
|
|
|
|
|
+ self.availableProperties.push(property);
|
|
|
|
|
+ self.sort();
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- ko.components.register('property-selector', {
|
|
|
|
|
- viewModel: PropertySelectorViewModel,
|
|
|
|
|
- template: {element: 'property-selector-template'}
|
|
|
|
|
- });
|
|
|
|
|
- }());
|
|
|
|
|
- }));
|
|
|
|
|
|
|
+ ko.components.register('property-selector', {
|
|
|
|
|
+ viewModel: PropertySelectorViewModel,
|
|
|
|
|
+ template: {element: 'property-selector-template'}
|
|
|
|
|
+ });
|
|
|
|
|
+ })();
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/html" id="property">
|
|
<script type="text/html" id="property">
|
|
@@ -405,47 +388,39 @@ from desktop.views import _ko
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/javascript" charset="utf-8">
|
|
<script type="text/javascript" charset="utf-8">
|
|
|
- (function (factory) {
|
|
|
|
|
- if (typeof require === "function") {
|
|
|
|
|
- require(['knockout'], factory);
|
|
|
|
|
- } else {
|
|
|
|
|
- factory(ko);
|
|
|
|
|
|
|
+ (function () {
|
|
|
|
|
+ var JVM_MEM_PATTERN = /([0-9]+)([MG])$/;
|
|
|
|
|
+ var UNITS = {'MB': 'M', 'GB': 'G'};
|
|
|
|
|
+
|
|
|
|
|
+ function JvmMemoryInputViewModel(params) {
|
|
|
|
|
+ this.valueObservable = params.value;
|
|
|
|
|
+ this.units = Object.keys(UNITS);
|
|
|
|
|
+ this.selectedUnit = ko.observable();
|
|
|
|
|
+ this.value = ko.observable('');
|
|
|
|
|
+
|
|
|
|
|
+ var match = JVM_MEM_PATTERN.exec(this.valueObservable());
|
|
|
|
|
+ if (match && match.length === 3) {
|
|
|
|
|
+ this.value(match[1]);
|
|
|
|
|
+ this.selectedUnit(match[2] === 'M' ? 'MB' : 'GB');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ this.value.subscribe(this.updateValueObservable, this);
|
|
|
|
|
+ this.selectedUnit.subscribe(this.updateValueObservable, this);
|
|
|
}
|
|
}
|
|
|
- }(function (ko) {
|
|
|
|
|
- (function () {
|
|
|
|
|
- var JVM_MEM_PATTERN = /([0-9]+)([MG])$/;
|
|
|
|
|
- var UNITS = {'MB': 'M', 'GB': 'G'};
|
|
|
|
|
-
|
|
|
|
|
- function JvmMemoryInputViewModel(params) {
|
|
|
|
|
- this.valueObservable = params.value;
|
|
|
|
|
- this.units = Object.keys(UNITS);
|
|
|
|
|
- this.selectedUnit = ko.observable();
|
|
|
|
|
- this.value = ko.observable('');
|
|
|
|
|
-
|
|
|
|
|
- var match = JVM_MEM_PATTERN.exec(this.valueObservable());
|
|
|
|
|
- if (match && match.length === 3) {
|
|
|
|
|
- this.value(match[1]);
|
|
|
|
|
- this.selectedUnit(match[2] === 'M' ? 'MB' : 'GB');
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- this.value.subscribe(this.updateValueObservable, this);
|
|
|
|
|
- this.selectedUnit.subscribe(this.updateValueObservable, this);
|
|
|
|
|
|
|
+ JvmMemoryInputViewModel.prototype.updateValueObservable = function () {
|
|
|
|
|
+ if (isNaN(this.value()) || this.value() === '') {
|
|
|
|
|
+ this.valueObservable(undefined);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.valueObservable(this.value() + UNITS[this.selectedUnit()]);
|
|
|
}
|
|
}
|
|
|
|
|
+ };
|
|
|
|
|
|
|
|
- JvmMemoryInputViewModel.prototype.updateValueObservable = function () {
|
|
|
|
|
- if (isNaN(this.value()) || this.value() === '') {
|
|
|
|
|
- this.valueObservable(undefined);
|
|
|
|
|
- } else {
|
|
|
|
|
- this.valueObservable(this.value() + UNITS[this.selectedUnit()]);
|
|
|
|
|
- }
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- ko.components.register('jvm-memory-input', {
|
|
|
|
|
- viewModel: JvmMemoryInputViewModel,
|
|
|
|
|
- template: { element: 'jvm-memory-input-template' }
|
|
|
|
|
- });
|
|
|
|
|
- }());
|
|
|
|
|
- }));
|
|
|
|
|
|
|
+ ko.components.register('jvm-memory-input', {
|
|
|
|
|
+ viewModel: JvmMemoryInputViewModel,
|
|
|
|
|
+ template: { element: 'jvm-memory-input-template' }
|
|
|
|
|
+ });
|
|
|
|
|
+ })();
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/html" id="key-value-list-input-template">
|
|
<script type="text/html" id="key-value-list-input-template">
|
|
@@ -474,58 +449,50 @@ from desktop.views import _ko
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/javascript" charset="utf-8">
|
|
<script type="text/javascript" charset="utf-8">
|
|
|
- (function (factory) {
|
|
|
|
|
- if (typeof require === "function") {
|
|
|
|
|
- require(['knockout'], factory);
|
|
|
|
|
- } else {
|
|
|
|
|
- factory(ko);
|
|
|
|
|
- }
|
|
|
|
|
- }(function (ko) {
|
|
|
|
|
- (function () {
|
|
|
|
|
-
|
|
|
|
|
- function KeyValueListInputViewModel(params) {
|
|
|
|
|
- var self = this;
|
|
|
|
|
- self.values = params.values;
|
|
|
|
|
- self.options = typeof params.property.options !== 'undefined' ? $.map(params.property.options(), function (option) {
|
|
|
|
|
- return { value: option }
|
|
|
|
|
- }) : [];
|
|
|
|
|
-
|
|
|
|
|
- if (self.options.length > 0) {
|
|
|
|
|
- self.values().forEach(function (value) {
|
|
|
|
|
- if (self.options.indexOf(value.key()) === -1) {
|
|
|
|
|
- self.options.push({ value: value.key() });
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- params.visibleObservable.subscribe(function (newValue) {
|
|
|
|
|
- if (!newValue) {
|
|
|
|
|
- self.values($.grep(self.values(), function (value) {
|
|
|
|
|
- return value.key() && value.value();
|
|
|
|
|
- }))
|
|
|
|
|
|
|
+ (function () {
|
|
|
|
|
+
|
|
|
|
|
+ function KeyValueListInputViewModel(params) {
|
|
|
|
|
+ var self = this;
|
|
|
|
|
+ self.values = params.values;
|
|
|
|
|
+ self.options = typeof params.property.options !== 'undefined' ? $.map(params.property.options(), function (option) {
|
|
|
|
|
+ return { value: option }
|
|
|
|
|
+ }) : [];
|
|
|
|
|
+
|
|
|
|
|
+ if (self.options.length > 0) {
|
|
|
|
|
+ self.values().forEach(function (value) {
|
|
|
|
|
+ if (self.options.indexOf(value.key()) === -1) {
|
|
|
|
|
+ self.options.push({ value: value.key() });
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
|
|
+ params.visibleObservable.subscribe(function (newValue) {
|
|
|
|
|
+ if (!newValue) {
|
|
|
|
|
+ self.values($.grep(self.values(), function (value) {
|
|
|
|
|
+ return value.key() && value.value();
|
|
|
|
|
+ }))
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- KeyValueListInputViewModel.prototype.addValue = function () {
|
|
|
|
|
- var self = this;
|
|
|
|
|
- var newValue = {
|
|
|
|
|
- key: ko.observable(''),
|
|
|
|
|
- value: ko.observable('')
|
|
|
|
|
- };
|
|
|
|
|
- self.values.push(newValue);
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- KeyValueListInputViewModel.prototype.removeValue = function (valueToRemove) {
|
|
|
|
|
- var self = this;
|
|
|
|
|
- self.values.remove(valueToRemove);
|
|
|
|
|
|
|
+ KeyValueListInputViewModel.prototype.addValue = function () {
|
|
|
|
|
+ var self = this;
|
|
|
|
|
+ var newValue = {
|
|
|
|
|
+ key: ko.observable(''),
|
|
|
|
|
+ value: ko.observable('')
|
|
|
};
|
|
};
|
|
|
-
|
|
|
|
|
- ko.components.register('key-value-list-input', {
|
|
|
|
|
- viewModel: KeyValueListInputViewModel,
|
|
|
|
|
- template: { element: 'key-value-list-input-template' }
|
|
|
|
|
- });
|
|
|
|
|
- }());
|
|
|
|
|
- }));
|
|
|
|
|
|
|
+ self.values.push(newValue);
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ KeyValueListInputViewModel.prototype.removeValue = function (valueToRemove) {
|
|
|
|
|
+ var self = this;
|
|
|
|
|
+ self.values.remove(valueToRemove);
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ ko.components.register('key-value-list-input', {
|
|
|
|
|
+ viewModel: KeyValueListInputViewModel,
|
|
|
|
|
+ template: { element: 'key-value-list-input-template' }
|
|
|
|
|
+ });
|
|
|
|
|
+ })();
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/html" id="name-value-list-input-template">
|
|
<script type="text/html" id="name-value-list-input-template">
|
|
@@ -554,58 +521,50 @@ from desktop.views import _ko
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/javascript" charset="utf-8">
|
|
<script type="text/javascript" charset="utf-8">
|
|
|
- (function (factory) {
|
|
|
|
|
- if (typeof require === "function") {
|
|
|
|
|
- require(['knockout'], factory);
|
|
|
|
|
- } else {
|
|
|
|
|
- factory(ko);
|
|
|
|
|
- }
|
|
|
|
|
- }(function (ko) {
|
|
|
|
|
- (function () {
|
|
|
|
|
-
|
|
|
|
|
- function NameValueListInputViewModel(params) {
|
|
|
|
|
- var self = this;
|
|
|
|
|
- self.values = params.values;
|
|
|
|
|
- self.options = typeof params.property.options !== 'undefined' ? $.map(params.property.options(), function (option) {
|
|
|
|
|
- return { value: option }
|
|
|
|
|
- }) : [];
|
|
|
|
|
-
|
|
|
|
|
- if (self.options.length > 0) {
|
|
|
|
|
- self.values().forEach(function (value) {
|
|
|
|
|
- if (self.options.indexOf(value.name()) === -1) {
|
|
|
|
|
- self.options.push({ value: value.name() });
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- params.visibleObservable.subscribe(function (newValue) {
|
|
|
|
|
- if (!newValue) {
|
|
|
|
|
- self.values($.grep(self.values(), function (value) {
|
|
|
|
|
- return value.name() && value.value();
|
|
|
|
|
- }))
|
|
|
|
|
|
|
+ (function () {
|
|
|
|
|
+
|
|
|
|
|
+ function NameValueListInputViewModel(params) {
|
|
|
|
|
+ var self = this;
|
|
|
|
|
+ self.values = params.values;
|
|
|
|
|
+ self.options = typeof params.property.options !== 'undefined' ? $.map(params.property.options(), function (option) {
|
|
|
|
|
+ return { value: option }
|
|
|
|
|
+ }) : [];
|
|
|
|
|
+
|
|
|
|
|
+ if (self.options.length > 0) {
|
|
|
|
|
+ self.values().forEach(function (value) {
|
|
|
|
|
+ if (self.options.indexOf(value.name()) === -1) {
|
|
|
|
|
+ self.options.push({ value: value.name() });
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
|
|
+ params.visibleObservable.subscribe(function (newValue) {
|
|
|
|
|
+ if (!newValue) {
|
|
|
|
|
+ self.values($.grep(self.values(), function (value) {
|
|
|
|
|
+ return value.name() && value.value();
|
|
|
|
|
+ }))
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- NameValueListInputViewModel.prototype.addValue = function () {
|
|
|
|
|
- var self = this;
|
|
|
|
|
- var newValue = {
|
|
|
|
|
- name: ko.observable(''),
|
|
|
|
|
- value: ko.observable('')
|
|
|
|
|
- };
|
|
|
|
|
- self.values.push(newValue);
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- NameValueListInputViewModel.prototype.removeValue = function (valueToRemove) {
|
|
|
|
|
- var self = this;
|
|
|
|
|
- self.values.remove(valueToRemove);
|
|
|
|
|
|
|
+ NameValueListInputViewModel.prototype.addValue = function () {
|
|
|
|
|
+ var self = this;
|
|
|
|
|
+ var newValue = {
|
|
|
|
|
+ name: ko.observable(''),
|
|
|
|
|
+ value: ko.observable('')
|
|
|
};
|
|
};
|
|
|
-
|
|
|
|
|
- ko.components.register('name-value-list-input', {
|
|
|
|
|
- viewModel: NameValueListInputViewModel,
|
|
|
|
|
- template: { element: 'name-value-list-input-template' }
|
|
|
|
|
- });
|
|
|
|
|
- }());
|
|
|
|
|
- }));
|
|
|
|
|
|
|
+ self.values.push(newValue);
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ NameValueListInputViewModel.prototype.removeValue = function (valueToRemove) {
|
|
|
|
|
+ var self = this;
|
|
|
|
|
+ self.values.remove(valueToRemove);
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ ko.components.register('name-value-list-input', {
|
|
|
|
|
+ viewModel: NameValueListInputViewModel,
|
|
|
|
|
+ template: { element: 'name-value-list-input-template' }
|
|
|
|
|
+ });
|
|
|
|
|
+ })();
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/html" id="function-list-input-template">
|
|
<script type="text/html" id="function-list-input-template">
|
|
@@ -627,47 +586,39 @@ from desktop.views import _ko
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/javascript" charset="utf-8">
|
|
<script type="text/javascript" charset="utf-8">
|
|
|
- (function (factory) {
|
|
|
|
|
- if (typeof require === "function") {
|
|
|
|
|
- require(['knockout'], factory);
|
|
|
|
|
- } else {
|
|
|
|
|
- factory(ko);
|
|
|
|
|
|
|
+ (function () {
|
|
|
|
|
+
|
|
|
|
|
+ function FunctionListInputViewModel(params) {
|
|
|
|
|
+ var self = this;
|
|
|
|
|
+ self.values = params.values;
|
|
|
|
|
+ params.visibleObservable.subscribe(function (newValue) {
|
|
|
|
|
+ if (!newValue) {
|
|
|
|
|
+ self.values($.grep(self.values(), function (value) {
|
|
|
|
|
+ return value.name() && value.class_name();
|
|
|
|
|
+ }))
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
- }(function (ko) {
|
|
|
|
|
- (function () {
|
|
|
|
|
-
|
|
|
|
|
- function FunctionListInputViewModel(params) {
|
|
|
|
|
- var self = this;
|
|
|
|
|
- self.values = params.values;
|
|
|
|
|
- params.visibleObservable.subscribe(function (newValue) {
|
|
|
|
|
- if (!newValue) {
|
|
|
|
|
- self.values($.grep(self.values(), function (value) {
|
|
|
|
|
- return value.name() && value.class_name();
|
|
|
|
|
- }))
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- FunctionListInputViewModel.prototype.addValue = function () {
|
|
|
|
|
- var self = this;
|
|
|
|
|
- var newValue = {
|
|
|
|
|
- name: ko.observable(''),
|
|
|
|
|
- class_name: ko.observable('')
|
|
|
|
|
- };
|
|
|
|
|
- self.values.push(newValue);
|
|
|
|
|
- };
|
|
|
|
|
|
|
|
|
|
- FunctionListInputViewModel.prototype.removeValue = function (valueToRemove) {
|
|
|
|
|
- var self = this;
|
|
|
|
|
- self.values.remove(valueToRemove);
|
|
|
|
|
|
|
+ FunctionListInputViewModel.prototype.addValue = function () {
|
|
|
|
|
+ var self = this;
|
|
|
|
|
+ var newValue = {
|
|
|
|
|
+ name: ko.observable(''),
|
|
|
|
|
+ class_name: ko.observable('')
|
|
|
};
|
|
};
|
|
|
-
|
|
|
|
|
- ko.components.register('function-list-input', {
|
|
|
|
|
- viewModel: FunctionListInputViewModel,
|
|
|
|
|
- template: { element: 'function-list-input-template' }
|
|
|
|
|
- });
|
|
|
|
|
- }());
|
|
|
|
|
- }));
|
|
|
|
|
|
|
+ self.values.push(newValue);
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ FunctionListInputViewModel.prototype.removeValue = function (valueToRemove) {
|
|
|
|
|
+ var self = this;
|
|
|
|
|
+ self.values.remove(valueToRemove);
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ ko.components.register('function-list-input', {
|
|
|
|
|
+ viewModel: FunctionListInputViewModel,
|
|
|
|
|
+ template: { element: 'function-list-input-template' }
|
|
|
|
|
+ });
|
|
|
|
|
+ })();
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/html" id="hdfs-file-list-input-template">
|
|
<script type="text/html" id="hdfs-file-list-input-template">
|
|
@@ -688,70 +639,62 @@ from desktop.views import _ko
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/javascript" charset="utf-8">
|
|
<script type="text/javascript" charset="utf-8">
|
|
|
- (function (factory) {
|
|
|
|
|
- if (typeof require === "function") {
|
|
|
|
|
- require(['knockout'], factory);
|
|
|
|
|
- } else {
|
|
|
|
|
- factory(ko);
|
|
|
|
|
- }
|
|
|
|
|
- }(function (ko) {
|
|
|
|
|
- (function () {
|
|
|
|
|
-
|
|
|
|
|
- var identifyType = function (path) {
|
|
|
|
|
- switch (path.substr(path.lastIndexOf('.') + 1).toLowerCase()) {
|
|
|
|
|
- case 'jar':
|
|
|
|
|
- return 'jar';
|
|
|
|
|
- case 'zip':
|
|
|
|
|
- case 'tar':
|
|
|
|
|
- case 'rar':
|
|
|
|
|
- case 'bz2':
|
|
|
|
|
- case 'gz':
|
|
|
|
|
- case 'tgz':
|
|
|
|
|
- return 'archive';
|
|
|
|
|
- }
|
|
|
|
|
- return 'file';
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- function HdfsFileListInputViewModel(params) {
|
|
|
|
|
- var self = this;
|
|
|
|
|
- self.values = params.values;
|
|
|
|
|
- $.each(self.values(), function (idx, value) {
|
|
|
|
|
- value.path.subscribe(function (newPath) {
|
|
|
|
|
- value.type(identifyType(newPath));
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
- params.visibleObservable.subscribe(function (newValue) {
|
|
|
|
|
- if (!newValue) {
|
|
|
|
|
- self.values($.grep(self.values(), function (value) {
|
|
|
|
|
- return value.path();
|
|
|
|
|
- }))
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ (function () {
|
|
|
|
|
+
|
|
|
|
|
+ var identifyType = function (path) {
|
|
|
|
|
+ switch (path.substr(path.lastIndexOf('.') + 1).toLowerCase()) {
|
|
|
|
|
+ case 'jar':
|
|
|
|
|
+ return 'jar';
|
|
|
|
|
+ case 'zip':
|
|
|
|
|
+ case 'tar':
|
|
|
|
|
+ case 'rar':
|
|
|
|
|
+ case 'bz2':
|
|
|
|
|
+ case 'gz':
|
|
|
|
|
+ case 'tgz':
|
|
|
|
|
+ return 'archive';
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- HdfsFileListInputViewModel.prototype.addValue = function () {
|
|
|
|
|
- var self = this;
|
|
|
|
|
- var newValue = {
|
|
|
|
|
- path: ko.observable(''),
|
|
|
|
|
- type: ko.observable('')
|
|
|
|
|
- };
|
|
|
|
|
- newValue.path.subscribe(function (newPath) {
|
|
|
|
|
- newValue.type(identifyType(newPath));
|
|
|
|
|
|
|
+ return 'file';
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ function HdfsFileListInputViewModel(params) {
|
|
|
|
|
+ var self = this;
|
|
|
|
|
+ self.values = params.values;
|
|
|
|
|
+ $.each(self.values(), function (idx, value) {
|
|
|
|
|
+ value.path.subscribe(function (newPath) {
|
|
|
|
|
+ value.type(identifyType(newPath));
|
|
|
});
|
|
});
|
|
|
- self.values.push(newValue);
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ });
|
|
|
|
|
+ params.visibleObservable.subscribe(function (newValue) {
|
|
|
|
|
+ if (!newValue) {
|
|
|
|
|
+ self.values($.grep(self.values(), function (value) {
|
|
|
|
|
+ return value.path();
|
|
|
|
|
+ }))
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- HdfsFileListInputViewModel.prototype.removeValue = function (valueToRemove) {
|
|
|
|
|
- var self = this;
|
|
|
|
|
- self.values.remove(valueToRemove);
|
|
|
|
|
|
|
+ HdfsFileListInputViewModel.prototype.addValue = function () {
|
|
|
|
|
+ var self = this;
|
|
|
|
|
+ var newValue = {
|
|
|
|
|
+ path: ko.observable(''),
|
|
|
|
|
+ type: ko.observable('')
|
|
|
};
|
|
};
|
|
|
-
|
|
|
|
|
- ko.components.register('hdfs-file-list-input', {
|
|
|
|
|
- viewModel: HdfsFileListInputViewModel,
|
|
|
|
|
- template: { element: 'hdfs-file-list-input-template' }
|
|
|
|
|
|
|
+ newValue.path.subscribe(function (newPath) {
|
|
|
|
|
+ newValue.type(identifyType(newPath));
|
|
|
});
|
|
});
|
|
|
- }());
|
|
|
|
|
- }));
|
|
|
|
|
|
|
+ self.values.push(newValue);
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ HdfsFileListInputViewModel.prototype.removeValue = function (valueToRemove) {
|
|
|
|
|
+ var self = this;
|
|
|
|
|
+ self.values.remove(valueToRemove);
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ ko.components.register('hdfs-file-list-input', {
|
|
|
|
|
+ viewModel: HdfsFileListInputViewModel,
|
|
|
|
|
+ template: { element: 'hdfs-file-list-input-template' }
|
|
|
|
|
+ });
|
|
|
|
|
+ })();
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/html" id="csv-list-input-template">
|
|
<script type="text/html" id="csv-list-input-template">
|
|
@@ -775,59 +718,51 @@ from desktop.views import _ko
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/javascript" charset="utf-8">
|
|
<script type="text/javascript" charset="utf-8">
|
|
|
- (function (factory) {
|
|
|
|
|
- if (typeof require === "function") {
|
|
|
|
|
- require(['knockout'], factory);
|
|
|
|
|
- } else {
|
|
|
|
|
- factory(ko);
|
|
|
|
|
- }
|
|
|
|
|
- }(function (ko) {
|
|
|
|
|
- (function () {
|
|
|
|
|
- function CsvListInputViewModel(params) {
|
|
|
|
|
- this.valueObservable = params.value;
|
|
|
|
|
- this.isArray = $.isArray(this.valueObservable());
|
|
|
|
|
- this.placeholder = params.placeholder || '';
|
|
|
|
|
- this.inputTemplate = params.inputTemplate || null;
|
|
|
|
|
-
|
|
|
|
|
- var initialValues;
|
|
|
|
|
- if (this.isArray) {
|
|
|
|
|
- initialValues = ko.mapping.toJS(this.valueObservable());
|
|
|
|
|
- } else {
|
|
|
|
|
- initialValues = this.valueObservable() != null ? this.valueObservable().split(",") : [];
|
|
|
|
|
- }
|
|
|
|
|
- for (var i = 0; i < initialValues.length; i++) {
|
|
|
|
|
- initialValues[i] = {value: ko.observable(initialValues[i].trim())};
|
|
|
|
|
- initialValues[i].value.subscribe(this.updateValueObservable, this);
|
|
|
|
|
- }
|
|
|
|
|
- this.values = ko.observableArray(initialValues);
|
|
|
|
|
- this.values.subscribe(this.updateValueObservable, this);
|
|
|
|
|
|
|
+ (function () {
|
|
|
|
|
+ function CsvListInputViewModel(params) {
|
|
|
|
|
+ this.valueObservable = params.value;
|
|
|
|
|
+ this.isArray = $.isArray(this.valueObservable());
|
|
|
|
|
+ this.placeholder = params.placeholder || '';
|
|
|
|
|
+ this.inputTemplate = params.inputTemplate || null;
|
|
|
|
|
+
|
|
|
|
|
+ var initialValues;
|
|
|
|
|
+ if (this.isArray) {
|
|
|
|
|
+ initialValues = ko.mapping.toJS(this.valueObservable());
|
|
|
|
|
+ } else {
|
|
|
|
|
+ initialValues = this.valueObservable() != null ? this.valueObservable().split(",") : [];
|
|
|
}
|
|
}
|
|
|
|
|
+ for (var i = 0; i < initialValues.length; i++) {
|
|
|
|
|
+ initialValues[i] = {value: ko.observable(initialValues[i].trim())};
|
|
|
|
|
+ initialValues[i].value.subscribe(this.updateValueObservable, this);
|
|
|
|
|
+ }
|
|
|
|
|
+ this.values = ko.observableArray(initialValues);
|
|
|
|
|
+ this.values.subscribe(this.updateValueObservable, this);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- CsvListInputViewModel.prototype.addValue = function () {
|
|
|
|
|
- var newValue = {value: ko.observable('')};
|
|
|
|
|
- newValue.value.subscribe(this.updateValueObservable, this);
|
|
|
|
|
- this.values.push(newValue);
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- CsvListInputViewModel.prototype.removeValue = function (valueToRemove) {
|
|
|
|
|
- this.values.remove(valueToRemove);
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ CsvListInputViewModel.prototype.addValue = function () {
|
|
|
|
|
+ var newValue = {value: ko.observable('')};
|
|
|
|
|
+ newValue.value.subscribe(this.updateValueObservable, this);
|
|
|
|
|
+ this.values.push(newValue);
|
|
|
|
|
+ };
|
|
|
|
|
|
|
|
- CsvListInputViewModel.prototype.updateValueObservable = function () {
|
|
|
|
|
- var cleanValues = $.map(this.values(), function (item) {
|
|
|
|
|
- return item.value();
|
|
|
|
|
- });
|
|
|
|
|
- cleanValues = $.grep(cleanValues, function (value) {
|
|
|
|
|
- return value;
|
|
|
|
|
- });
|
|
|
|
|
- this.valueObservable(this.isArray ? cleanValues : cleanValues.join(','));
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ CsvListInputViewModel.prototype.removeValue = function (valueToRemove) {
|
|
|
|
|
+ this.values.remove(valueToRemove);
|
|
|
|
|
+ };
|
|
|
|
|
|
|
|
- ko.components.register('csv-list-input', {
|
|
|
|
|
- viewModel: CsvListInputViewModel,
|
|
|
|
|
- template: { element: 'csv-list-input-template' }
|
|
|
|
|
|
|
+ CsvListInputViewModel.prototype.updateValueObservable = function () {
|
|
|
|
|
+ var cleanValues = $.map(this.values(), function (item) {
|
|
|
|
|
+ return item.value();
|
|
|
|
|
+ });
|
|
|
|
|
+ cleanValues = $.grep(cleanValues, function (value) {
|
|
|
|
|
+ return value;
|
|
|
});
|
|
});
|
|
|
- }());
|
|
|
|
|
- }));
|
|
|
|
|
|
|
+ this.valueObservable(this.isArray ? cleanValues : cleanValues.join(','));
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ ko.components.register('csv-list-input', {
|
|
|
|
|
+ viewModel: CsvListInputViewModel,
|
|
|
|
|
+ template: { element: 'csv-list-input-template' }
|
|
|
|
|
+ });
|
|
|
|
|
+ })();
|
|
|
</script>
|
|
</script>
|
|
|
</%def>
|
|
</%def>
|