From 0022912e61cd6d61161f97e11b4e14796c5ce6dd Mon Sep 17 00:00:00 2001 From: Komei Shimamura Date: Tue, 14 Apr 2015 13:20:27 -0700 Subject: [PATCH] [WIP] Switching Javascript to Typescript * This commit includes js.map files and generated js files. - these files will be removed after the piplene which can compile *.ts file to .js files before web rendering are established in Django. * And created doc directory Related-Isues: #18 Related-Issue: #3 --- .jshintrc | 3 + cognitive/MLApp/static/js/api/client_v1.js | 360 ++++++--- cognitive/MLApp/static/js/math_formula.js | 0 cognitive/MLApp/static/js/whiteboard.js | 11 +- cognitive/MLApp/static/ts/application.js | 0 cognitive/MLApp/static/ts/application.js.map | 1 + cognitive/MLApp/static/ts/application.ts | 0 cognitive/MLApp/static/ts/components/base.js | 288 ++++++++ .../MLApp/static/ts/components/base.js.map | 1 + cognitive/MLApp/static/ts/components/base.ts | 375 ++++++++++ .../static/ts/components/math_formula.js | 22 + .../static/ts/components/math_formula.js.map | 1 + .../static/ts/components/math_formula.ts | 15 + cognitive/MLApp/static/ts/whiteboard.js | 578 +++++++++++++++ cognitive/MLApp/static/ts/whiteboard.js.map | 1 + cognitive/MLApp/static/ts/whiteboard.ts | 684 ++++++++++++++++++ .../MLApp/static/ts/whiteboard_manager.js | 41 ++ .../MLApp/static/ts/whiteboard_manager.js.map | 1 + .../MLApp/static/ts/whiteboard_manager.ts | 53 ++ cognitive/MLApp/templates/whiteboard.haml | 21 +- cognitive/settings.py | 3 +- doc/.keep | 0 setup.cfg | 2 +- 23 files changed, 2338 insertions(+), 123 deletions(-) create mode 100644 cognitive/MLApp/static/js/math_formula.js create mode 100644 cognitive/MLApp/static/ts/application.js create mode 100644 cognitive/MLApp/static/ts/application.js.map create mode 100644 cognitive/MLApp/static/ts/application.ts create mode 100644 cognitive/MLApp/static/ts/components/base.js create mode 100644 cognitive/MLApp/static/ts/components/base.js.map create mode 100644 cognitive/MLApp/static/ts/components/base.ts create mode 100644 cognitive/MLApp/static/ts/components/math_formula.js create mode 100644 cognitive/MLApp/static/ts/components/math_formula.js.map create mode 100644 cognitive/MLApp/static/ts/components/math_formula.ts create mode 100644 cognitive/MLApp/static/ts/whiteboard.js create mode 100644 cognitive/MLApp/static/ts/whiteboard.js.map create mode 100644 cognitive/MLApp/static/ts/whiteboard.ts create mode 100644 cognitive/MLApp/static/ts/whiteboard_manager.js create mode 100644 cognitive/MLApp/static/ts/whiteboard_manager.js.map create mode 100644 cognitive/MLApp/static/ts/whiteboard_manager.ts create mode 100644 doc/.keep diff --git a/.jshintrc b/.jshintrc index b7ee459..66e112c 100644 --- a/.jshintrc +++ b/.jshintrc @@ -1,4 +1,7 @@ { + "indent": 4, + "white": false, + "globals": { "jquery": false, "d3": false, diff --git a/cognitive/MLApp/static/js/api/client_v1.js b/cognitive/MLApp/static/js/api/client_v1.js index 9f604d1..e97a01c 100644 --- a/cognitive/MLApp/static/js/api/client_v1.js +++ b/cognitive/MLApp/static/js/api/client_v1.js @@ -1,116 +1,252 @@ var CognitiveAPIClientV1 = (function() { - function CognitiveAPIClientV1(options) { - this.prefix = '/api/v1'; - } - - function _send_request(api_url, method, json_data, node) { - $.ajax({ - url: api_url, - type: method, - data: json_data, - success: function(result) { - console.log(result); - if (node != null){ - node.setComponentId(result.id); - } - } - }); - }; - - function createInputComponent(json_data, node) { - api_url = this.prefix + '/operations/input/'; - _send_request(api_url, "POST", json_data, node); - }; - - function createOutputComponent(json_data, node) { - api_url = this.prefix + '/operations/output/'; - _send_request(api_url, "POST", json_data, node); - }; - - function createAddRowComponent(json_data, node) { - api_url = this.prefix + '/operations/row/'; - _send_request(api_url, "POST", json_data, node); - }; - - function createMathFormulaComponent(json_data, node) { - api_url = this.prefix + '/operations/math_formula/'; - _send_request(api_url, "POST", json_data, node); - }; - - function createMetadataComponent(json_data, node) { - api_url = this.prefix + '/operations/metadata/'; - _send_request(api_url, "POST", json_data, node); - }; - - function createMachineLeaningComponent(json_data, node) { - api_url = this.prefix + '/operations/machine_learning/'; - _send_request(api_url, "POST", json_data, node); - }; - - function createNormalizationComponent(json_data, node) { - api_url = this.prefix + '/operations/normalization/'; - _send_request(api_url, "POST", json_data, node); - }; - - function createRemoveDuplicatesComponent(json_data, node) { - api_url = this.prefix + '/operations/remove_duplicates/'; - _send_request(api_url, "POST", json_data, node); - }; - - function createRemoveMissingValueComponent(json_data, node) { - api_url = this.prefix + '/operations/RemoveMissingValue'; - _send_request(api_url, "POST", json_data, node); - }; - - function createFilterComponent(json_data, node) { - api_url = this.prefix + '/operations/filter'; - _send_request(api_url, "POST", json_data, node); - }; - - function createRemoveMissingValuesComponent(json_data, node) { - api_url = this.prefix + '/operations/remove_missing/'; - _send_request(api_url, "POST", json_data, node); - }; - - function run(json_data, node) { - api_url = this.prefix + '/operations/filter'; - _send_request(api_url, "POST", json_data, node); - }; - - function createProjectionComponent(json_data, node) { - api_url = this.prefix + '/operations/projection/'; - _send_request(api_url, "POST", json_data, node); - }; - - function executeAll(json_data) { - api_url = this.prefix + '/workflows/'; - _send_request(api_url, "POST", json_data, null); - }; - - function getResult(component_id) { - api_url = this.prefix + '/results/?expetiment=1&component_id=' + component_id; - _send_request(api_url, "GET", null, null); - }; - - - CognitiveAPIClientV1.prototype = { - constructor: CognitiveAPIClientV1, - createInputComponent: createInputComponent, - createOutputComponent: createOutputComponent, - createAddRowComponent: createAddRowComponent, - createMathFormulaComponent: createMathFormulaComponent, - createMetadataComponent: createMetadataComponent, - createMachineLeaningComponent: createMachineLeaningComponent, - createNormalizationComponent: createNormalizationComponent, - createRemoveDuplicatesComponent: createRemoveDuplicatesComponent, - createRemoveMissingValueComponent: createRemoveMissingValueComponent, - createFilterComponent: createFilterComponent, - createRemoveMissingValuesComponent: createRemoveMissingValuesComponent, - createProjectionComponent: createProjectionComponent, - executeAll: executeAll - }; - - return CognitiveAPIClientV1; + /* + * TODO: will separate cognitive specific function and others + * for ex: run function is kept here + * input/delete * component will be separated + * like plugin. + */ + + function CognitiveAPIClientV1(options) { + this.prefix = '/api/v1'; + } + + function _send_request(api_url, method, json_data, node) { + $.ajax({ + url: api_url, + type: method, + data: json_data, + success: function(result) { + console.log(result); + a = node; + if (node !== null){ node.set_backend_id(result.id);} + } + }); + }; + + function createInputComponent(json_data, node) { + api_url = this.prefix + '/operations/input/'; + _send_request(api_url, "POST", json_data, node); + }; + + + function deleteInputComponent(id) { + api_url = this.prefix + '/operations/input/' + id; + $.ajax({ + url: api_url, + type: "DELETE", + success: function(result) { console.log(result); } + }); + } + + function createOutputComponent(json_data, node) { + api_url = this.prefix + '/operations/output/'; + _send_request(api_url, "POST", json_data, node); + }; + + function deleteOutputComponent(id) { + api_url = this.prefix + '/operations/output/' + id; + $.ajax({ + url: api_url, + type: "DELETE", + success: function(result) { console.log(result); } + }); + } + + function createAddRowComponent(json_data, node) { + api_url = this.prefix + '/operations/row/'; + _send_request(api_url, "POST", json_data, node); + }; + + function deleteAddRowComponent(id) { + api_url = this.prefix + '/operations/row/' + id; + $.ajax({ + url: api_url, + type: "DELETE", + success: function(result) { console.log(result); } + }); + } + + function createMathFormulaComponent(json_data, node) { + api_url = this.prefix + '/operations/math_formula/'; + _send_request(api_url, "POST", json_data, node); + }; + + function deleteMathFormulaComponent(id) { + api_url = this.prefix + '/operations/math_formula/' + id; + $.ajax({ + url: api_url, + type: "DELETE", + success: function(result) { console.log(result); } + }); + } + + function createMetadataComponent(json_data, node) { + api_url = this.prefix + '/operations/metadata/'; + _send_request(api_url, "POST", json_data, node); + }; + + function deleteMetadataComponent(id) { + api_url = this.prefix + '/operations/metadata/' + id; + $.ajax({ + url: api_url, + type: "DELETE", + success: function(result) { console.log(result); } + }); + } + + function createMachineLeaningComponent(json_data, node) { + api_url = this.prefix + '/operations/machine_learning/'; + _send_request(api_url, "POST", json_data, node); + }; + + function deleteMachineLeaningComponent(id) { + api_url = this.prefix + '/operations/machine_learning/' + id; + $.ajax({ + url: api_url, + type: "DELETE", + success: function(result) { console.log(result); } + }); + } + + function createNormalizationComponent(json_data, node) { + api_url = this.prefix + '/operations/normalization/'; + _send_request(api_url, "POST", json_data, node); + }; + + function deleteNormalizationComponent(id) { + api_url = this.prefix + '/operations/normalization/' + id; + $.ajax({ + url: api_url, + type: "DELETE", + success: function(result) { console.log(result); } + }); + } + + function createRemoveDuplicatesComponent(json_data, node) { + api_url = this.prefix + '/operations/remove_duplicates/'; + _send_request(api_url, "POST", json_data, node); + }; + + function deleteRemoveDuplicatesComponent(id) { + api_url = this.prefix + '/operations/remove_duplicates/' + id; + $.ajax({ + url: api_url, + type: "DELETE", + success: function(result) { console.log(result); } + }); + } + + function createRemoveMissingValueComponent(json_data, node) { + api_url = this.prefix + '/operations/RemoveMissingValue'; + _send_request(api_url, "POST", json_data, node); + }; + + function deleteRemoveMissingValueComponent(id) { + api_url = this.prefix + '/operations/RemoveMissingValue/' + id; + $.ajax({ + url: api_url, + type: "DELETE", + success: function(result) { console.log(result); } + }); + } + + function createFilterComponent(json_data, node) { + api_url = this.prefix + '/operations/filter'; + _send_request(api_url, "POST", json_data, node); + }; + + function deleteFilterComponent(id) { + api_url = this.prefix + '/operations/filter/' + id; + $.ajax({ + url: api_url, + type: "DELETE", + success: function(result) { console.log(result); } + }); + } + + function createRemoveMissingValuesComponent(json_data, node) { + api_url = this.prefix + '/operations/remove_missing/'; + _send_request(api_url, "POST", json_data, node); + }; + + function deleteRemoveMissingValuesComponent(id) { + api_url = this.prefix + '/operations/remove_missing/' + id; + $.ajax({ + url: api_url, + type: "DELETE", + success: function(result) { console.log(result); } + }); + } + + function run(json_data, node) { + api_url = this.prefix + '/operations/filter'; + _send_request(api_url, "POST", json_data, node); + }; + + function deleteOutputComponent(id) { + api_url = this.prefix + '/operations/filter/' + id; + $.ajax({ + url: api_url, + type: "DELETE", + success: function(result) { console.log(result); } + }); + } + + function createProjectionComponent(json_data, node) { + api_url = this.prefix + '/operations/projection/'; + _send_request(api_url, "POST", json_data, node); + }; + + function deleteProjectionComponent(id) { + api_url = this.prefix + '/operations/projection/'; + $.ajax({ + url: api_url, + type: "DELETE", + success: function(result) { console.log(result); } + }); + } + + function executeAll(json_data) { + api_url = this.prefix + '/workflows/'; + _send_request(api_url, "POST", json_data, null); + }; + + function getResult(component_id) { + api_url = this.prefix + '/results/?expetiment=1&component_id=' + component_id; + _send_request(api_url, "GET", null, null); + }; + + + CognitiveAPIClientV1.prototype = { + constructor: CognitiveAPIClientV1, + createInputComponent: createInputComponent, + deleteInputComponent: deleteInputComponent, + createOutputComponent: createOutputComponent, + deleteOutputComponent: deleteOutputComponent, + createAddRowComponent: createAddRowComponent, + deleteAddRowComponent: deleteAddRowComponent, + createMathFormulaComponent: createMathFormulaComponent, + deleteMathFormulaComponent: deleteMathFormulaComponent, + createMetadataComponent: createMetadataComponent, + deleteMetadataComponent: deleteMetadataComponent, + createMachineLeaningComponent: createMachineLeaningComponent, + deleteMachineLeaningComponent: deleteMachineLeaningComponent, + createNormalizationComponent: createNormalizationComponent, + deleteNormalizationComponent: deleteNormalizationComponent, + createRemoveDuplicatesComponent: createRemoveDuplicatesComponent, + deleteRemoveDuplicatesComponent: deleteRemoveDuplicatesComponent, + createRemoveMissingValueComponent: createRemoveMissingValueComponent, + deleteRemoveMissingValueComponent: deleteRemoveMissingValueComponent, + createFilterComponent: createFilterComponent, + deleteFilterComponent: deleteFilterComponent, + createRemoveMissingValuesComponent: createRemoveMissingValuesComponent, + deleteRemoveMissingValuesComponent: deleteRemoveMissingValuesComponent, + createProjectionComponent: createProjectionComponent, + deleteProjectionComponent: deleteProjectionComponent, + executeAll: executeAll + }; + + return CognitiveAPIClientV1; })(); \ No newline at end of file diff --git a/cognitive/MLApp/static/js/math_formula.js b/cognitive/MLApp/static/js/math_formula.js new file mode 100644 index 0000000..e69de29 diff --git a/cognitive/MLApp/static/js/whiteboard.js b/cognitive/MLApp/static/js/whiteboard.js index 2450c69..912f78e 100644 --- a/cognitive/MLApp/static/js/whiteboard.js +++ b/cognitive/MLApp/static/js/whiteboard.js @@ -159,11 +159,12 @@ $(function(){ } else if ($(this).hasClass('add_math_fomula')) { - node = new Node({ - name:'Apply Formula', - input:1, - output:1 - }); + //node = new Node({ + // name:'Apply Formula', + // input:1, + // output:1 + //}); + node = new MathFormula(Node); var method = $('select#formula_method').val(); var column_num = $('select#formula_column').val(); diff --git a/cognitive/MLApp/static/ts/application.js b/cognitive/MLApp/static/ts/application.js new file mode 100644 index 0000000..e69de29 diff --git a/cognitive/MLApp/static/ts/application.js.map b/cognitive/MLApp/static/ts/application.js.map new file mode 100644 index 0000000..200a819 --- /dev/null +++ b/cognitive/MLApp/static/ts/application.js.map @@ -0,0 +1 @@ +{"version":3,"file":"application.js","sourceRoot":"","sources":["application.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/cognitive/MLApp/static/ts/application.ts b/cognitive/MLApp/static/ts/application.ts new file mode 100644 index 0000000..e69de29 diff --git a/cognitive/MLApp/static/ts/components/base.js b/cognitive/MLApp/static/ts/components/base.js new file mode 100644 index 0000000..c74d9fb --- /dev/null +++ b/cognitive/MLApp/static/ts/components/base.js @@ -0,0 +1,288 @@ +var ComponentBase = (function () { + function ComponentBase(params) { + this._id = ComponentBase.generate_component_id(); + this.name = params.name; + this.width = 180; + this.height = 40; + this.backend_id = 0; + this.x = 0; + this.y = 0; + this.avilable_input_links = 1; + this.avilable_output_links = 1; + this.enter_path = null; // should be number? + this.leave_path = null; + ComponentBase.function_layer = $('#layer-4'); + ComponentBase.component_layer = $('#layer-3'); + ComponentBase.connection_layer = $('#layer-2'); + ComponentBase.scope_layer = $('#layer-1'); + this.render_component(); + this.render_scope(); + this.render_functions(); + ComponentBase.component_list.push(this); + console.log("Current Components:", ComponentBase.component_list); + } + ComponentBase.prototype.render_component = function () { + // Just adding an element of randomity so things don't appear on top of each other. + this.x = $('.detail').width() + (Math.random() * 400); + this.y = 50 + (Math.random() * 400); + // Lets compensate for smaller window widths, just in case. + if (this.x > window.innerWidth - 350) { + this.x = window.innerWidth - 500; + console.log("Too big, making " + this.x); + } + if (this.y > window.innerHeight) { + this.y = window.innerHeight - 300; + } + var svg = d3.selectAll(ComponentBase.component_layer); + var _click = this._click; + var g = svg.append('g') + .attr('class', 'node-group') + .attr('x', 0) + .attr('y', 0) + .attr('abs_x', this.x) + .attr('abs_y', this.y) + .attr('id', 'node-group-' + this._id) + .call(d3.behavior.drag().on("drag", this._drag)) + .on("click", function () { _click(this); }) + .on("mouseenter", function () { + var id = this.id.split("-")[2]; + $("#close-icon-id-" + id).css("display", "block"); + }); + g.append('rect') + .attr('x', this.x) + .attr('y', this.y) + .attr('width', this.width) + .attr('height', this.height) + .attr('class', "node base-node") + .attr('stroke', "steelblue") + .attr('stroke-width', "3"); + g.append('text') + .attr('x', this.x + 90) + .attr('y', this.y + 25) + .attr('fill', 'black') + .style('stroke-width', 1) + .style({ "font-size": "14px", "z-index": "9999999" }) + .style('text-anchor', "middle") + .text(this.name); + if (this.avilable_input_links > 0) { + g.append('circle') + .attr('cx', this.x + 90) + .attr('cy', this.y) + .attr('r', 4) + .attr('fill', '#fd8d3c') + .style('stroke-width', 1); + } + if (this.avilable_output_links > 0) { + g.append('circle') + .attr('cx', this.x + 90) + .attr('cy', this.y + 40) + .attr('r', 4) + .attr('fill', '#5264ae') + .style('stroke-width', 1); + } + }; + ComponentBase.prototype.render_scope = function () { + var scope = d3.selectAll(ComponentBase.scope_layer) + .append('g').attr('id', "scope-group-" + this._id) + .on("mouseleave", function () { + var id = this.id.split("-")[2]; + $("#close-icon-id-" + id).css("display", "none"); + }); + console.log(this.x); + console.log(this.width); + scope.append('rect') + .attr('x', this.x - 35) + .attr('y', this.y - 35) + .attr('width', this.width + 70) + .attr('height', this.height + 70) + .attr('class', "scope") + .attr('id', "scope-" + this._id) + .attr('fill', 'white'); + }; + ComponentBase.prototype.render_functions = function () { + var svg = d3.selectAll(ComponentBase.function_layer); + var g = svg.append('g').attr('id', 'functionality-group-' + this._id); + console.log("debug"); + console.log(this.x); + var _eliminate = this.eliminate; + g.append('text') + .attr('x', this.x - 20) + .attr('y', this.y - 5) + .attr('class', 'close-icon') + .attr('id', 'close-icon-id-' + this._id) + .text('\uf00d') // icon: fa-close + .on("click", this.eliminate.bind(this)) + .on("mouseenter", function () { $(this).css("display", "block"); }); + }; + ComponentBase.prototype._drag = function () { + var group = d3.select(this); + var sx = parseInt(group.attr('x')) + parseInt(d3.event.dx); + var sy = parseInt(group.attr('y')) + parseInt(d3.event.dy); + group.attr('x', sx).attr('y', sy) + .attr('transform', 'translate(' + sx + ',' + sy + ')'); + d3.selectAll('g[from_id="' + group.attr('id') + '"]').selectAll('line') + .attr('x1', sx + parseInt(group.attr('abs_x')) + 90) + .attr('y1', sy + parseInt(group.attr('abs_y')) + 40); + d3.selectAll('g[to_id="' + group.attr('id') + '"]').selectAll('line') + .attr('x2', sx + parseInt(group.attr('abs_x')) + 90) + .attr('y2', sy + parseInt(group.attr('abs_y'))); + var node_id = group.attr('id').split("-")[2]; + var scope = d3.selectAll($('#scope-' + node_id)); + scope + .attr('x', sx - 30 + parseInt(group.attr('abs_x'))) + .attr('y', sy - 30 + parseInt(group.attr('abs_y'))); + var functionality_group = d3.selectAll($('#close-icon-id-' + node_id)); + functionality_group + .attr('x', sx - 20 + parseInt(group.attr('abs_x'))) + .attr('y', sy - 5 + parseInt(group.attr('abs_y'))); + }; + ComponentBase.prototype._click = function (e) { + if (d3.event.defaultPrevented) + return; + var component = d3.select(e); + console.log("here"); + if (ComponentBase.current_focus == null) { + component.classed('clicked', true); + ComponentBase.current_focus = component; + return; + } + console.log("here"); + if (ComponentBase.current_focus.attr('id') == component.attr('id')) { + component.classed('clicked', false); + ComponentBase.current_focus = null; + return; + } + console.log("make line"); + var svg = d3.selectAll(ComponentBase.connection_layer); + var g = svg.append('g') + .attr('from_id', ComponentBase.current_focus.attr('id')) + .attr('to_id', component.attr('id')); + var line = g.append("line") + .attr('x1', parseInt(ComponentBase.current_focus.attr('x')) + parseInt(ComponentBase.current_focus.attr('abs_x')) + 90) + .attr('y1', parseInt(ComponentBase.current_focus.attr('y')) + parseInt(ComponentBase.current_focus.attr('abs_y')) + 40) + .attr('x2', parseInt(component.attr('x')) + parseInt(component.attr('abs_x')) + 90) + .attr('y2', parseInt(component.attr('y')) + parseInt(component.attr('abs_y'))) + .attr("stroke", "gray") + .attr('stroke-width', 2); + var current_focus_node_id = ComponentBase.current_focus.attr('id').split("-")[2]; + var next_node_id = component.attr('id').split("-")[2]; + console.log(current_focus_node_id); + console.log(ComponentBase.find_by_id(current_focus_node_id)); + ComponentBase.find_by_id(current_focus_node_id).setOutputPath(g); + console.log(current_focus_node_id); + ComponentBase.find_by_id(next_node_id).setInputPath(g); + console.log(current_focus_node_id); + ComponentBase.current_focus.classed('clicked', false); + console.log(current_focus_node_id); + component.classed('clicked', false); + ComponentBase.current_focus = null; + }; + ComponentBase.prototype.eliminate = function () { + var id = this._id; + ComponentBase.current_focus = null; + $('#scope-group-' + id).remove(); + $('#node-group-' + id).remove(); + $('g[from_id="' + "node-group-" + id + '"]').remove(); + $('g[to_id="' + "node-group-" + id + '"]').remove(); + $('#functionality-group-' + id).remove(); + ComponentBase.remove_by_id(id); + console.log("Current Components:", ComponentBase.component_list); + return false; + }; + ComponentBase.find_by_id = function (id) { + for (var i = 0; i < ComponentBase.component_list.length; i++) { + if (ComponentBase.component_list[i].get_id() == id) { + return ComponentBase.component_list[i]; + } + } + return null; + }; + ComponentBase.find_by_key_value = function (obj) { + var key = Object.keys(obj); + for (var i = 0; i < ComponentBase.component_list.length; i++) { + if (ComponentBase.component_list[i][key] == obj[key]) { + return ComponentBase.component_list[i]; + } + } + return null; + }; + ComponentBase.remove_by_id = function (id) { + var list_idx = ComponentBase._get_idx_from_id(id); + if (list_idx > -1) { + ComponentBase.component_list.splice(list_idx, 1); + } + }; + ComponentBase._get_idx_from_id = function (id) { + var comp = ComponentBase.find_by_id(id); + return ComponentBase.component_list.indexOf(comp); + }; + ComponentBase.prototype.get_id = function () { + return this._id; + }; + ComponentBase.get_current_focus_component = function () { + var id = ComponentBase.current_focus[0][0].id.split("-")[2]; + return ComponentBase.find_by_id(id); + }; + ComponentBase.get_workflow_from = function (id) { + var component_list = []; + var start_component = ComponentBase.find_by_id(id); + //for ( var i = start_component;; + // i = ComponentBase.find_by_id(parseInt(i.getOutputPath().attr('to_id').split("-")[2]))) { + // console.log(i); + // component_list.push(i); + // console.log(component_list) + // if (i.getOutputPath() == null) { + // break; + // } + // console.log(i.getOutputPath()) + //} + var i = start_component; + while (true) { + console.log(i); + component_list.push(i); + console.log("component_list: ", component_list); + if (i.getOutputPath() == null || i.getOutputPath() == undefined) + break; + console.log("--------------------"); + var _output_obj = i.getOutputPath(); + console.log(_output_obj); + xx = _output_obj; + var next_id = _output_obj.attr("to_id").split("-")[2]; + console.log(next_id); + i = ComponentBase.find_by_id(next_id); + } + return component_list; + }; + ComponentBase.prototype.set_backend_id = function (id) { + this.backend_id = id; + }; + ComponentBase.prototype.get_backend_id = function () { + return this.backend_id; + }; + ComponentBase.prototype.get_outpath = function () { + return this.leave_path; + }; + ComponentBase.prototype.get_enter_path = function () { + return this.enter_path; + }; + ComponentBase.prototype.getInputPath = function () { + return this.enter_path; + }; + ComponentBase.prototype.setInputPath = function (g) { + this.enter_path = g; + }; + ComponentBase.prototype.setOutputPath = function (g) { + this.leave_path = g; + }; + ComponentBase.prototype.getOutputPath = function () { + return this.leave_path; + }; + ComponentBase.component_list = []; + ComponentBase.current_focus = null; + ComponentBase.generate_component_id = (function () { + var gen = 1; + return function () { return gen++; }; + })(); + return ComponentBase; +})(); +//# sourceMappingURL=base.js.map \ No newline at end of file diff --git a/cognitive/MLApp/static/ts/components/base.js.map b/cognitive/MLApp/static/ts/components/base.js.map new file mode 100644 index 0000000..47f90c6 --- /dev/null +++ b/cognitive/MLApp/static/ts/components/base.js.map @@ -0,0 +1 @@ +{"version":3,"file":"base.js","sourceRoot":"","sources":["base.ts"],"names":["ComponentBase","ComponentBase.constructor","ComponentBase.render_component","ComponentBase.render_scope","ComponentBase.render_functions","ComponentBase._drag","ComponentBase._click","ComponentBase.eliminate","ComponentBase.find_by_id","ComponentBase.find_by_key_value","ComponentBase.remove_by_id","ComponentBase._get_idx_from_id","ComponentBase.get_id","ComponentBase.get_current_focus_component","ComponentBase.get_workflow_from","ComponentBase.set_backend_id","ComponentBase.get_backend_id","ComponentBase.get_outpath","ComponentBase.get_enter_path","ComponentBase.getInputPath","ComponentBase.setInputPath","ComponentBase.setOutputPath","ComponentBase.getOutputPath"],"mappings":"AAIA;IA6BIA,uBAAYA,MAAqBA;QAE7BC,IAAIA,CAACA,GAAGA,GAAGA,aAAaA,CAACA,qBAAqBA,EAAEA,CAACA;QACjDA,IAAIA,CAACA,IAAIA,GAAGA,MAAMA,CAACA,IAAIA,CAACA;QACxBA,IAAIA,CAACA,KAAKA,GAAGA,GAAGA,CAACA;QACjBA,IAAIA,CAACA,MAAMA,GAAGA,EAAEA,CAACA;QACjBA,IAAIA,CAACA,UAAUA,GAAGA,CAACA,CAACA;QACpBA,IAAIA,CAACA,CAACA,GAAGA,CAACA,CAACA;QACXA,IAAIA,CAACA,CAACA,GAAGA,CAACA,CAACA;QACXA,IAAIA,CAACA,oBAAoBA,GAAGA,CAACA,CAACA;QAC9BA,IAAIA,CAACA,qBAAqBA,GAAGA,CAACA,CAACA;QAC/BA,IAAIA,CAACA,UAAUA,GAAGA,IAAIA,EAAEA,oBAAoBA;QAC5CA,IAAIA,CAACA,UAAUA,GAAGA,IAAIA,CAACA;QAEvBA,aAAaA,CAACA,cAAcA,GAAEA,CAACA,CAACA,UAAUA,CAACA,CAACA;QAC5CA,aAAaA,CAACA,eAAeA,GAAGA,CAACA,CAACA,UAAUA,CAACA,CAACA;QAC9CA,aAAaA,CAACA,gBAAgBA,GAAGA,CAACA,CAACA,UAAUA,CAACA,CAACA;QAC/CA,aAAaA,CAACA,WAAWA,GAAGA,CAACA,CAACA,UAAUA,CAACA,CAACA;QAE1CA,IAAIA,CAACA,gBAAgBA,EAAEA,CAACA;QACxBA,IAAIA,CAACA,YAAYA,EAAEA,CAACA;QACpBA,IAAIA,CAACA,gB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AACA;YACtCA,SAASA,CAACA,OAAOA,CAACA,SAASA,EAAEA,IAAIA,CAACA,CAACA;YACnCA,aAAaA,CAACA,aAAaA,GAAGA,SAASA,CAACA;YACxCA,MAAMA,CAACA;QACXA,CAACA;QACDA,OAAOA,CAACA,GAAGA,CAACA,MAAMA,CAACA,CAACA;QAEpBA,EAAEA,CAACA,CAACA,aAAaA,CAACA,aAAaA,CAACA,IAAIA,CAACA,IAAIA,CAACA,IAAIA,SAASA,CAACA,IAAIA,CAACA,IAAIA,CAACA,CAACA,CAACA,CAACA;YACjEA,SAASA,CAACA,OAAOA,CAACA,SAASA,EAAEA,KAAKA,CAACA,CAACA;YACpCA,aAAaA,CAACA,aAAaA,GAAGA,IAAIA,CAACA;YACnCA,MAAMA,CAACA;QACXA,CAACA;QAEDA,OAAOA,CAACA,GAAGA,CAACA,WAAWA,CAACA,CAACA;QAEzBA,IAAIA,GAAGA,GAAGA,EAAEA,CAACA,SAASA,CAACA,aAAaA,CAACA,gBAAgBA,CAACA,CAACA;QACvDA,IAAIA,CAACA,GAAGA,GAAGA,CAACA,MAAMA,CAACA,GAAGA,CAACA;aAClBA,IAAIA,CAACA,SAASA,EAAEA,aAAaA,CAACA,aAAaA,CAACA,IAAIA,CAACA,IAAIA,CAACA,CAACA;aACvDA,IAAIA,CAACA,OAAOA,EAAEA,SAASA,CAACA,IAAIA,CAACA,IAAIA,CAACA,CAACA,CAACA;QAEzCA,IAAIA,IAAIA,GAAIA,CAACA,CAACA,MAAMA,CAACA,MAAMA,CAACA;aACvBA,IAAIA,CAACA,IAAIA,EAAGA,QAAQA,CAACA,aAAaA,CAACA,aAAaA,CAACA,IAAIA,CAACA,GAAGA,CAACA,CAACA,GAAIA,QAAQA,CAACA,aAAaA,CAACA,aAAaA,CAACA,IAAIA,CAACA,OAAOA,CAACA,CAACA,GAAGA,EAAEA,CAACA;aACxHA,IAAIA,CAACA,IAAIA,EAAGA,QAAQA,CAACA,aAAaA,CAACA,aAAaA,CAACA,IAAIA,CAACA,GAAGA,CAACA,CAACA,GAAIA,QAAQA,CAACA,aAAaA,CAACA,aAAaA,CAACA,IAAIA,CAACA,OAAOA,CAACA,CAACA,GAAGA,EAAEA,CAACA;aACxHA,IAAIA,CAACA,IAAIA,EAAGA,QAAQA,CAACA,SAASA,CAACA,IAAIA,CAACA,GAAGA,CAACA,CAACA,GAAIA,QAAQA,CAACA,SAASA,CAACA,IAAIA,CAACA,OAAOA,CAACA,CAACA,GAAEA,EAAEA,CAACA;aACnFA,IAAIA,CAACA,IAAIA,EAAGA,QAAQA,CAACA,SAASA,CAACA,IAAIA,CAACA,GAAGA,CAACA,CAACA,GAAIA,QAAQA,CAACA,SAASA,CAACA,IAAIA,CAACA,OAAOA,CAACA,CAACA,CAACA;aAC/EA,IAAIA,CAACA,QAAQA,EAAEA,MAAMA,CAACA;aACtBA,IAAIA,CAACA,cAAcA,EAAEA,CAACA,CAACA,CAACA;QAE7BA,IAAIA,qBAAqBA,GAAGA,aAAaA,CAACA,aAAaA,CAACA,IAAIA,CAACA,IAAIA,CAACA,CAACA,KAAKA,CAACA,GAAGA,CAACA,CAACA,CAACA,CAACA,CAACA;QACjFA,IAAIA,YAAYA,GAAGA,SAASA,CAACA,IAAIA,CAACA,IAAIA,CAACA,CAACA,KAAKA,CAACA,GAAGA,CAACA,CAACA,CAACA,CAACA,CAACA;QAEtDA,OAAOA,CAACA,GAAGA,CAACA,qBAAqBA,CAACA,CAACA;QACnCA,OAAOA,CAACA,GAAGA,CAACA,aAAaA,CAACA,UAAUA,CAACA,qBAAqBA,CAACA,CAACA,CAACA;QAC7DA,aAAaA,CAACA,UAAUA,CAACA,qBAAqBA,CAACA,CAACA,aAAaA,CAACA,CAACA,CAACA,CAACA;QACjEA,OAAOA,CAACA,GAAGA,CAACA,qBAAqBA,CAACA,CAACA;QACnCA,aAAaA,CAACA,UAAUA,CAACA,YAAYA,CAACA,CAACA,YAAYA,CAACA,CAACA,CAACA,CAACA;QACvDA,OAAOA,CAACA,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AI,GAAG,GAAG,CAAC,CAAC;QACZ,MAAM,CAAC,cAAY,MAAM,CAAC,GAAG,EAAE,CAAC,CAAA,CAAC,CAAA;IACrC,CAAC,CAACA,EAAEA,CAACA;IAuVTA,oBAACA;AAADA,CAACA,AAlXD,IAkXC"} \ No newline at end of file diff --git a/cognitive/MLApp/static/ts/components/base.ts b/cognitive/MLApp/static/ts/components/base.ts new file mode 100644 index 0000000..2fc385d --- /dev/null +++ b/cognitive/MLApp/static/ts/components/base.ts @@ -0,0 +1,375 @@ +interface ComponentInfo { + name:string; width:number; height:number; input: number; output:number; +} + +class ComponentBase { + + //authentication + + private _id: number; + private name: string; + private width: number; + private height: number; + private backend_id: number; + private x: number; + private y: number; + private avilable_input_links: number; + private avilable_output_links: number; + private enter_path; + private leave_path; + + static function_layer: any; + static component_layer: any; + static connection_layer: any; + static scope_layer: any; + + static component_list: any = []; + static current_focus: any = null; + + static generate_component_id = (function(){ + var gen = 1; + return function(){ return gen++;} + })(); + + constructor(params: ComponentInfo) { + + this._id = ComponentBase.generate_component_id(); + this.name = params.name; + this.width = 180; + this.height = 40; + this.backend_id = 0; + this.x = 0; + this.y = 0; + this.avilable_input_links = 1; + this.avilable_output_links = 1; + this.enter_path = null; // should be number? + this.leave_path = null; + + ComponentBase.function_layer= $('#layer-4'); + ComponentBase.component_layer = $('#layer-3'); + ComponentBase.connection_layer = $('#layer-2'); + ComponentBase.scope_layer = $('#layer-1'); + + this.render_component(); + this.render_scope(); + this.render_functions(); + + ComponentBase.component_list.push(this); + + console.log("Current Components:", ComponentBase.component_list); + } + + private render_component() { + + // Just adding an element of randomity so things don't appear on top of each other. + this.x = $('.detail').width() + (Math.random() * 400); + this.y = 50 + (Math.random() * 400); + + // Lets compensate for smaller window widths, just in case. + if (this.x > window.innerWidth - 350) { this.x = window.innerWidth - 500; console.log("Too big, making " + this.x);} + if (this.y > window.innerHeight) { this.y = window.innerHeight - 300;} + + var svg = d3.selectAll(ComponentBase.component_layer); + var _click = this._click; + var g = svg.append('g') + .attr('class', 'node-group') + .attr('x', 0) + .attr('y', 0) + .attr('abs_x', this.x) + .attr('abs_y', this.y) + .attr('id', 'node-group-' + this._id) + .call(d3.behavior.drag().on("drag", this._drag)) + .on("click", function () {_click(this)}) + .on("mouseenter", function() { + var id = this.id.split("-")[2]; + $("#close-icon-id-" + id).css("display", "block"); + }); + + g.append('rect') + .attr('x', this.x) + .attr('y', this.y) + .attr('width', this.width) + .attr('height', this.height) + .attr('class', "node base-node") + .attr('stroke', "steelblue" ) + .attr('stroke-width', "3" ); + + g.append('text') + .attr('x', this.x + 90) + .attr('y', this.y + 25) + .attr('fill', 'black') + .style('stroke-width', 1) + .style({"font-size":"14px","z-index":"9999999"} ) + .style('text-anchor', "middle") + .text(this.name); + + if (this.avilable_input_links > 0) { + g.append('circle') + .attr('cx', this.x + 90) + .attr('cy', this.y) + .attr('r', 4) + .attr('fill', '#fd8d3c') + .style('stroke-width', 1); + } + + if (this.avilable_output_links > 0) { + g.append('circle') + .attr('cx', this.x + 90 ) + .attr('cy', this.y + 40 ) + .attr('r', 4 ) + .attr('fill', '#5264ae') + .style('stroke-width', 1); + } + + } + + private render_scope() { + var scope = d3.selectAll(ComponentBase.scope_layer) + .append('g').attr('id', "scope-group-" + this._id) + .on("mouseleave", function(){ + var id = this.id.split("-")[2]; + $("#close-icon-id-" + id).css("display", "none"); + }); + console.log(this.x); + console.log(this.width); + scope.append('rect') + .attr('x', this.x - 35) + .attr('y', this.y - 35) + .attr('width', this.width + 70) + .attr('height', this.height + 70) + .attr('class', "scope") + .attr('id', "scope-" + this._id) + .attr('fill', 'white'); + } + + private render_functions() { + var svg = d3.selectAll(ComponentBase.function_layer); + var g = svg.append('g').attr('id', 'functionality-group-' + this._id); + + console.log("debug"); + console.log(this.x); + + var _eliminate = this.eliminate; + + g.append('text') + .attr('x',this.x - 20) + .attr('y', this.y - 5) + .attr('class', 'close-icon') + .attr('id', 'close-icon-id-' + this._id) + .text('\uf00d') // icon: fa-close + .on("click", this.eliminate.bind(this) ) + .on("mouseenter", function(){$(this).css("display", "block")}); + } + + + private _drag() { + + var group = d3.select(this); + var sx = parseInt(group.attr('x')) + parseInt(d3.event.dx); + var sy = parseInt(group.attr('y')) + parseInt(d3.event.dy); + + group.attr('x', sx).attr('y', sy) + .attr('transform', 'translate(' + sx + ',' + sy + ')'); + + d3.selectAll('g[from_id="' + group.attr('id') + '"]').selectAll('line') + .attr('x1', sx + parseInt(group.attr('abs_x')) + 90) + .attr('y1', sy + parseInt(group.attr('abs_y')) + 40); + + d3.selectAll('g[to_id="' + group.attr('id') + '"]').selectAll('line') + .attr('x2', sx + parseInt(group.attr('abs_x')) + 90) + .attr('y2', sy + parseInt(group.attr('abs_y'))); + + var node_id = group.attr('id').split("-")[2]; + + var scope = d3.selectAll($('#scope-' + node_id)); + + scope + .attr('x', sx - 30 + parseInt(group.attr('abs_x'))) + .attr('y', sy - 30 + parseInt(group.attr('abs_y'))); + + var functionality_group = d3.selectAll($('#close-icon-id-' + node_id)); + + functionality_group + .attr('x', sx - 20 + parseInt(group.attr('abs_x'))) + .attr('y', sy - 5 + parseInt(group.attr('abs_y'))); + } + + private _click(e) { + + if (d3.event.defaultPrevented) return; + + var component = d3.select(e); + + console.log("here"); + + if (ComponentBase.current_focus == null) { + component.classed('clicked', true); + ComponentBase.current_focus = component; + return; + } + console.log("here"); + + if (ComponentBase.current_focus.attr('id') == component.attr('id')) { + component.classed('clicked', false); + ComponentBase.current_focus = null; + return; + } + + console.log("make line"); + + var svg = d3.selectAll(ComponentBase.connection_layer); + var g = svg.append('g') + .attr('from_id', ComponentBase.current_focus.attr('id')) + .attr('to_id', component.attr('id')); + + var line = g.append("line") + .attr('x1', parseInt(ComponentBase.current_focus.attr('x')) + parseInt(ComponentBase.current_focus.attr('abs_x')) + 90) + .attr('y1', parseInt(ComponentBase.current_focus.attr('y')) + parseInt(ComponentBase.current_focus.attr('abs_y')) + 40) + .attr('x2', parseInt(component.attr('x')) + parseInt(component.attr('abs_x'))+ 90) + .attr('y2', parseInt(component.attr('y')) + parseInt(component.attr('abs_y'))) + .attr("stroke", "gray") + .attr('stroke-width', 2); + + var current_focus_node_id = ComponentBase.current_focus.attr('id').split("-")[2]; + var next_node_id = component.attr('id').split("-")[2]; + + console.log(current_focus_node_id); + console.log(ComponentBase.find_by_id(current_focus_node_id)); + ComponentBase.find_by_id(current_focus_node_id).setOutputPath(g); + console.log(current_focus_node_id); + ComponentBase.find_by_id(next_node_id).setInputPath(g); + console.log(current_focus_node_id); + ComponentBase.current_focus.classed('clicked', false); + console.log(current_focus_node_id); + + component.classed('clicked', false); + ComponentBase.current_focus = null; + } + + public eliminate() { + var id = this._id; + ComponentBase.current_focus = null; + + $('#scope-group-' + id).remove(); + $('#node-group-' + id).remove(); + $('g[from_id="' + "node-group-" + id +'"]').remove(); + $('g[to_id="' + "node-group-" + id +'"]').remove(); + $('#functionality-group-' + id).remove(); + + ComponentBase.remove_by_id(id); + + console.log("Current Components:", ComponentBase.component_list); + + return false; + } + + static find_by_id(id): any { + for (var i=0; i < ComponentBase.component_list.length; i++) { + if (ComponentBase.component_list[i].get_id() == id) { + return ComponentBase.component_list[i]; + } + } + return null; + } + + static find_by_key_value(obj): any { + var key = Object.keys(obj); + for (var i = 0; i < ComponentBase.component_list.length; i++) { + if (ComponentBase.component_list[i][key] == obj[key]) { + return ComponentBase.component_list[i]; + } + } + return null; + } + + static remove_by_id(id): void { + var list_idx = ComponentBase._get_idx_from_id(id); + if (list_idx > -1) { + ComponentBase.component_list.splice(list_idx, 1); + } + } + + static _get_idx_from_id(id):number { + var comp = ComponentBase.find_by_id(id); + return ComponentBase.component_list.indexOf(comp); + } + + public get_id(): number { + return this._id; + } + + static get_current_focus_component() { + var id = ComponentBase.current_focus[0][0].id.split("-")[2]; + return ComponentBase.find_by_id(id); + } + + static get_workflow_from(id) { + + var component_list = []; + var start_component = ComponentBase.find_by_id(id); + + //for ( var i = start_component;; + // i = ComponentBase.find_by_id(parseInt(i.getOutputPath().attr('to_id').split("-")[2]))) { + // console.log(i); + // component_list.push(i); + // console.log(component_list) + // if (i.getOutputPath() == null) { + // break; + // } + // console.log(i.getOutputPath()) + //} + + var i = start_component; + while (true) { + console.log(i); + component_list.push(i); + console.log("component_list: ", component_list); + if (i.getOutputPath() == null || i.getOutputPath() == undefined) break; + console.log("--------------------"); + var _output_obj = i.getOutputPath() + console.log(_output_obj); + xx = _output_obj; + var next_id = _output_obj.attr("to_id").split("-")[2] + console.log(next_id); + i = ComponentBase.find_by_id(next_id) + } + + return component_list; + + } + + public set_backend_id(id): void { + this.backend_id = id; + } + + public get_backend_id(): number { + return this.backend_id; + } + + public get_outpath() { + return this.leave_path; + } + + public get_enter_path() { + return this.enter_path; + } + + public getInputPath(){ + return this.enter_path; + } + + public setInputPath(g){ + this.enter_path = g; + } + + public setOutputPath(g){ + this.leave_path = g; + } + + public getOutputPath() { + return this.leave_path; + } + + + +} \ No newline at end of file diff --git a/cognitive/MLApp/static/ts/components/math_formula.js b/cognitive/MLApp/static/ts/components/math_formula.js new file mode 100644 index 0000000..291a0d6 --- /dev/null +++ b/cognitive/MLApp/static/ts/components/math_formula.js @@ -0,0 +1,22 @@ +var __extends = this.__extends || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + __.prototype = b.prototype; + d.prototype = new __(); +}; +var MathFormula = (function (_super) { + __extends(MathFormula, _super); + function MathFormula() { + console.log("----------------"); + _super.call(this, { + "name": "Math Formula", + "width": 0, + "height": 0, + "input": 1, + "output": 1 + }); + console.log("=================="); + } + return MathFormula; +})(ComponentBase); +//# sourceMappingURL=math_formula.js.map \ No newline at end of file diff --git a/cognitive/MLApp/static/ts/components/math_formula.js.map b/cognitive/MLApp/static/ts/components/math_formula.js.map new file mode 100644 index 0000000..9e7506c --- /dev/null +++ b/cognitive/MLApp/static/ts/components/math_formula.js.map @@ -0,0 +1 @@ +{"version":3,"file":"math_formula.js","sourceRoot":"","sources":["math_formula.ts"],"names":["MathFormula","MathFormula.constructor"],"mappings":";;;;;;AACA;IAA0BA,+BAAaA;IAEnCA;QACIC,OAAOA,CAACA,GAAGA,CAACA,kBAAkBA,CAACA,CAACA;QAChCA,kBAAMA;YACEA,MAAMA,EAAEA,cAAcA;YACtBA,OAAOA,EAAEA,CAACA;YACVA,QAAQA,EAACA,CAACA;YACVA,OAAOA,EAACA,CAACA;YACTA,QAAQA,EAACA,CAACA;SACbA,CAACA,CAACA;QACPA,OAAOA,CAACA,GAAGA,CAACA,oBAAoBA,CAACA,CAACA;IACtCA,CAACA;IACLD,kBAACA;AAADA,CAACA,AAbD,EAA0B,aAAa,EAatC"} \ No newline at end of file diff --git a/cognitive/MLApp/static/ts/components/math_formula.ts b/cognitive/MLApp/static/ts/components/math_formula.ts new file mode 100644 index 0000000..153f8cd --- /dev/null +++ b/cognitive/MLApp/static/ts/components/math_formula.ts @@ -0,0 +1,15 @@ + +class MathFormula extends ComponentBase { + + constructor(){ + console.log("----------------"); + super({ + "name": "Math Formula", + "width": 0, + "height":0, + "input":1, + "output":1 + }); + console.log("=================="); + } +} \ No newline at end of file diff --git a/cognitive/MLApp/static/ts/whiteboard.js b/cognitive/MLApp/static/ts/whiteboard.js new file mode 100644 index 0000000..df81256 --- /dev/null +++ b/cognitive/MLApp/static/ts/whiteboard.js @@ -0,0 +1,578 @@ +var _uploaded_file_as_text = ""; +var _uploaded_file_name = ""; +var _uploaded_file_as_arrays = []; +$(function () { + var m = new Manager(); + var cognitive_client = new CognitiveAPIClientV1(); + var svg = d3.selectAll("svg"); + $('.projection.plus-bottom').click(add_column_for_projection); + var projections = 0; + function add_column_for_projection() { + if (_uploaded_file_as_text == "") { + return; + } + var column_names = _uploaded_file_as_arrays[0]; + var option_string = ""; + for (var i = 0; i < column_names.length; i++) { + option_string += ''; + } + $('.form-group.projection_form').append(''); + projections++; + } + function initializa_projection_column() { + $('.form-group.projection_form').empty(); + projections = 0; + } + $('.remove_duplicates.plus-bottom').click(add_column_for_remove_duplicates); + var _num_remove_duplicates_column = 0; + function add_column_for_remove_duplicates() { + if (_uploaded_file_as_text == "") { + return; + } + var column_names = _uploaded_file_as_arrays[0]; + var option_string = ""; + for (var i = 0; i < column_names.length; i++) { + option_string += ''; + } + $('.form-group.remove_duplicates_form').append(''); + _num_remove_duplicates_column++; + } + function initializa_remove_duplicates_column() { + $('.form-group.remove_duplicates_form').empty(); + _num_remove_duplicates_column = 0; + } + $(".menu_bar.introduction").click(function () { + m.activate_menubar('introduction'); + }); + $(".menu_bar.data_input").click(function () { + m.activate_menubar('data_input'); + }); + $(".menu_bar.add_row").click(function () { + m.activate_menubar("add_row"); + description_addrow(); + }); + $(".menu_bar.add_math_fomula").click(function () { + m.activate_menubar("add_math_fomula"); + description_formula(); + }); + $(".menu_bar.projection").click(function () { + m.activate_menubar("projection"); + initializa_projection_column(); + add_column_for_projection(); + }); + $(".menu_bar.normalization").click(function () { + m.activate_menubar("normalization"); + description_normalization(); + }); + $(".menu_bar.remove_column").click(function () { + m.activate_menubar("remove_column"); + initializa_remove_duplicates_column(); + add_column_for_remove_duplicates(); + }); + $(".menu_bar.remove_missing_value").click(function () { + m.activate_menubar("remove_missing_value"); + }); + $(".menu_bar.transform").click(function () { + m.activate_menubar("transform"); + }); + $(".menu_bar.metadata").click(function () { + m.activate_menubar("metadata"); + description_metadata(); + }); + $(".menu_bar.formula").click(function () { + m.activate_menubar("formula"); + }); + $(".menu_bar.filter").click(function () { + m.activate_menubar("filter"); + }); + $(".menu_bar.machine_learning").click(function () { + m.activate_menubar("machine_learning"); + description_machine_learning(); + }); + $(".menu_bar.data_output").click(function () { + m.activate_menubar("data_output"); + }); + $(".add_btn").click(function () { + var node; + if ($(this).hasClass('add_input')) { + node = new ComponentBase({ + name: 'INPUT_DATA', output: 1, input: 0 + }); + cognitive_client.createInputComponent({ + user_id: 1, + input_file: _uploaded_file_name, + token: "token", + input_file_type: "csv", + experiment: 1, + data_values: _uploaded_file_as_text + }, node); + } + else if ($(this).hasClass('add_row')) { + console.log("add_row test"); + node = new ComponentBase({ + name: 'Add Row', + input: 1, + output: 1 + }); + var request_text = "["; + for (var i = 0; i < _uploaded_file_as_arrays[0].length; i++) { + request_text += "\"" + $(".add_row._column_" + i).val() + "\","; + } + request_text = request_text.slice(0, request_text.length - 1); + request_text += "]"; + console.log(request_text); + cognitive_client.createAddRowComponent({ + user_id: 1, + token: "aaa", + experiment: 1, + row_values: request_text + }, node); + } + else if ($(this).hasClass('add_math_fomula')) { + //node = new ComponentBase({ + // name:'Apply Formula', + // input:1, + // output:1 + //}); + node = new MathFormula(); + var method = $('select#formula_method').val(); + var column_num = $('select#formula_column').val(); + var constant = $('#formula_constant').val(); + var t = { + user_id: 1, + token: "aaa", + experiment: 1, + component_type: "Column", + component_id: column_num, + op_type: method, + op_constant: constant + }; + console.log(t); + cognitive_client.createMathFormulaComponent(t, node); + } + else if ($(this).hasClass('add_normalization')) { + node = new ComponentBase({ + name: 'Normalization', + input: 1, + output: 1 + }); + var method = $('select#normalization_method').val(); + var column_num = $('select#normalization_column').val(); + cognitive_client.createNormalizationComponent({ + user_id: 1, + token: "aaa", + experiment: 1, + component_type: "Column", + component_id: column_num, + op_type: method + }, node); + } + else if ($(this).hasClass('add_projection')) { + node = new ComponentBase({ + name: 'Column Selection', + input: 1, + output: 1 + }); + var len = $('.projection_selects').length; + var projection_columns = "["; + for (var i = 0; i < len; i++) { + console.log($('.projection_selects._selects_' + i).val()); + projection_columns += $('.projection_selects._selects_' + i).val() + ","; + } + projection_columns = projection_columns.slice(0, projection_columns.length - 1); + projection_columns += "]"; + cognitive_client.createProjectionComponent({ + user_id: 1, + token: "aaa", + experiment: 1, + component_id: projection_columns + }, node); + } + else if ($(this).hasClass('add_remove_duplicates')) { + node = new ComponentBase({ + name: 'Remove Duplicates', + input: 1, + output: 1 + }); + var len = $('.remove_duplicates_selects').length; + var remove_duplicates_columns = "["; + for (var i = 0; i < len; i++) { + console.log($('.remove_duplicates_selects._selects_' + i).val()); + remove_duplicates_columns += $('.remove_duplicates_selects._selects_' + i).val() + ","; + } + remove_duplicates_columns = remove_duplicates_columns.slice(0, remove_duplicates_columns.length - 1); + remove_duplicates_columns += "]"; + console.log(remove_duplicates_columns); + cognitive_client.createRemoveDuplicatesComponent({ + user_id: 1, + token: "aaa", + experiment: 1, + component_id: remove_duplicates_columns + }, node); + } + else if ($(this).hasClass('add_remove_missing_value')) { + node = new ComponentBase({ + name: 'Remove Missing Values', + input: 1, + output: 1 + }); + var method = $('#remove_missing_value_method').val(); + cognitive_client.createRemoveMissingValuesComponent({ + user_id: 1, + token: "aaa", + experiment: 1, + op_action: method //"Replace_mean" or Drop_row + }, node); + } + else if ($(this).hasClass('add_metadata')) { + node = new ComponentBase({ + name: 'MetaData', + input: 1, + output: 1 + }); + var metadata_types = "["; + for (var i = 0; i < _uploaded_file_as_arrays[0].length; i++) { + console.log($(".metadata.column" + i).val()); + metadata_types += "\"" + $(".metadata.column" + i).val() + "\","; + } + metadata_types = metadata_types.slice(0, metadata_types.length - 1); + metadata_types += "]"; + console.log(metadata_types); + cognitive_client.createMetadataComponent({ + user_id: 1, + token: "aaa", + experiment: 1, + column_type: metadata_types + }, node); + } + else if ($(this).hasClass('add_output')) { + node = new ComponentBase({ + name: 'OUTPUT', + input: 1, + output: 0 + }); + cognitive_client.createOutputComponent({ + user_id: 1, + name: "sample_input.csv", + token: "aaa", + type: "css", + experiment: 1, + data: uploaded_file_as_text + }, node); + } + else if ($(this).hasClass('add_machine_learning')) { + node = new ComponentBase({ + name: 'Machine Learning', + input: 1, + output: 1 + }); + var argo = $('.machine_learning_select').val(); + var target = $('.machine_learning_target').val(); + var parcentage = $('.machine_learning_target_parcentage').val(); + console.log(argo); + cognitive_client.createMachineLeaningComponent({ + user_id: 1, + token: "aaa", + experiment: 1, + model_type: argo, + train_data_percentage: parcentage, + target_column: target + }, node); + } + //ComponentBase.appendToList(node); + }); + $("#execute-btn").click(function () { + var start = ComponentBase.find_by_key_value({ name: "INPUT_DATA" }); + var node_list = ComponentBase.get_workflow_from(start.get_id()); + if (node_list.length < 1) { + alert("no workflow or input files"); + return; + } + var components_id_list = node_list.map(function (n) { + return n.get_backend_id(); + }); + var flow_path = function (x) { + var t = ""; + for (var i = 0; i < x.length - 1; i++) { + t += x[i] + ":" + x[i + 1] + ","; + } + return t.substr(0, t.length - 1); + }(components_id_list); + cognitive_client.executeAll({ + user_id: 1, + experiment: 1, + graph_data: flow_path + }); + $.colorbox({ html: "Smiley face", closeButton: false, transition: "none", opacity: 0, arrowKey: false, overlayClose: false, fastIframe: false, width: "300px", height: "300px" }); + $('#cboxClose').remove(); + $('#cboxTopLeft').remove(); + $('#cboxTopCenter').remove(); + $('#cboxTopRight').remove(); + $('#cboxMiddleLeft').remove(); + $('#cboxMiddleRight').remove(); + $('#cboxBottomCenter').remove(); + $('#cboxBottomLeft').remove(); + $('#cboxBottomRight').remove(); + setTimeout("$.colorbox.close()", 700); + }); + $('#inputFile').change(function (evt) { + var file = evt.target.files[0]; + var reader = new FileReader(); + reader.onload = function (e) { + _uploaded_file_as_text = e.target.result; + _uploaded_file_as_arrays = $.csv.toArrays(_uploaded_file_as_text); + }; + reader.readAsText(file); + _uploaded_file_name = file.name; + }); + $(".show_result_graph").click(getResult); + function getResult() { + console.log("--------------------"); + var component = ComponentBase.get_current_focus_component(); + console.log(component); + if (component == null) { + return; + } + console.log("--------------------"); + $.ajax({ + url: '/api/v1/results/?experiment=1&component_id=' + component.get_backend_id(), + type: "GET", + data: "", + success: function (result) { + a = result; + console.log(result); + var z = serialize_result_to_html(result); + $.colorbox({ html: "

Results

" + z + "

", width: "90%" }); + render_result_graphs(result); + } + }); + console.log("--------------------"); + } + function render_result_graphs(result) { + var w = 100; + var h = 100; + for (var i = 0; i < result['feature_names'].length; i++) { + var target_area = d3.select("svg[class='graph column_" + i + "']"); + var dataset = result.graph_data[i][1]; + if (d3.max(dataset) == d3.min(dataset)) { + dataset = [100, 100, 100, 100]; + } + for (var j = 0; j < dataset.length; j++) { + if (dataset[j] >= 96) { + dataset[j] -= 4; + } + } + if (dataset.length == 3) { + dataset.push(0); + } + else if (dataset.length == 2) { + var _t = [0]; + _t.push(dataset[0]); + _t.push(0); + _t.push(dataset[1]); + dataset = _t; + } + else if (dataset.length == 1) { + var _t = [0]; + _t.push(dataset[0]); + _t.push(0); + _t.push(0); + dataset = _t; + } + var svg = d3.select("svg[class='graph column_" + i + "']"); + svg.selectAll("rect") + .data(dataset) + .enter() + .append("rect") + .attr("x", function (d, i) { return i * 22 + 7; }) + .attr("y", function (d) { return h - d; }) + .attr('class', 'bar') + .attr('height', function (d) { return d - 4; }) + .attr("width", (w / dataset.length - 6)); + svg.append('rect') + .attr("x", 3) + .attr("y", 3) + .attr('width', w - 6) + .attr('height', h - 6) + .attr('stroke', "black") + .attr('fill', 'none') + .attr('stroke-width', "1"); + } + } + function serialize_result_to_html(result) { + var _html = "
"; + if (Object.keys(result).indexOf('output') >= 0) { + _html += "

Model Evaluation

"; + _html += ""; + var ml_output = result['output']; + var keys = Object.keys(ml_output); + _html += ""; + for (var i = 0; i < keys.length; i++) { + _html += ""; + } + _html += ""; + for (var i = 0; i < keys.length; i++) { + _html += ""; + } + _html += "
" + keys[i] + "
" + ml_output[keys[i]] + "
"; + } + _html += "

Statistics

"; + _html += ""; + _html += ""; + for (var i = 0; i < result['feature_names'].length; i++) { + _html += ""; + } + _html += ""; + _html += ''; + _html += ""; + for (var i = 0; i < result['feature_names'].length; i++) { + _html += ""; + } + _html += ""; + _html += ""; + _html += ""; + for (var i = 0; i < result['std'].length; i++) { + _html += ""; + } + _html += ""; + _html += ""; + for (var i = 0; i < result['75_quartile'].length; i++) { + _html += ""; + } + _html += ""; + _html += ""; + for (var i = 0; i < result['50_quartile'].length; i++) { + _html += ""; + } + _html += ""; + _html += ""; + for (var i = 0; i < result['25_quartile'].length; i++) { + _html += ""; + } + _html += ""; + _html += ""; + for (var i = 0; i < result['max'].length; i++) { + _html += ""; + } + _html += ""; + _html += ""; + for (var i = 0; i < result['mean'].length; i++) { + _html += ""; + } + _html += ""; + _html += ""; + for (var i = 0; i < result['median'].length; i++) { + _html += ""; + } + _html += ""; + _html += ""; + for (var i = 0; i < result['min'].length; i++) { + _html += ""; + } + _html += ""; + _html += ""; + for (var i = 0; i < result['missing_values'].length; i++) { + _html += ""; + } + _html += ""; + _html += ""; + for (var i = 0; i < result['unique_values'].length; i++) { + _html += ""; + } + _html += ""; + for (var i = 0; i < result['feature_names'].length; i++) { + _html += ""; + } + _html += ""; + for (var i = 0; i < result['data'].length; i++) { + _html += ""; + for (var j = 0; j < result['data'][i].length; j++) { + _html += ""; + } + _html += ""; + } + _html += "
                     
Statistics" + result['feature_names'][i] + "
Std Deviation" + result['std'][i] + "
75 Quartile" + result['75_quartile'][i] + "
50 Quartile" + result['50_quartile'][i] + "
25 Quartile" + result['25_quartile'][i] + "
Max" + result['max'][i] + "
Mean" + result['mean'][i] + "
Median" + result['median'][i] + "
Min" + result['min'][i] + "
Missing Values" + result['missing_values'][i] + "
Unique Values" + result['unique_values'][i] + "
" + result['feature_names'][i] + "
" + result['data'][i][j] + "
"; + return _html; + } +}); +function description_addrow() { + $(".add_row_form").empty(); + _uploaded_file_as_arrays[0]; + console.log(_uploaded_file_as_arrays[0]); + if (_uploaded_file_as_text == "") { + return; + } + for (var i = 0; i < _uploaded_file_as_arrays[0].length; i++) { + $(".add_row_form").append('
  • '); + $(".add_row_form li.column_" + i).append('

    ' + _uploaded_file_as_arrays[0][i] + '

    '); + $("", { + "class": "add_row form-control floating-label" + " _column_" + i, + id: "_column_" + i, + type: "text", + placeholder: "value" + }).appendTo(".add_row_form li.column_" + i); + } +} +function description_formula() { + $("#formula_column").empty(); + if (_uploaded_file_as_text == "") { + return; + } + for (var i = 0; i < _uploaded_file_as_arrays[0].length; i++) { + $("#formula_column").append(''); + } +} +function description_normalization() { + $("#normalization_column").empty(); + if (_uploaded_file_as_text == "") { + return; + } + for (var i = 0; i < _uploaded_file_as_arrays[0].length; i++) { + $("#normalization_column").append(''); + } +} +function description_machine_learning() { + $('.machine_learning_target').empty(); + if (_uploaded_file_as_text == "") { + return; + } + for (var i = 0; i < _uploaded_file_as_arrays[0].length; i++) { + $('.machine_learning_target').append(''); + } +} +function description_metadata() { + $("#metadata_discriptions").empty(); + if (_uploaded_file_as_text == "") { + return; + } + for (var i = 0; i < _uploaded_file_as_arrays[0].length; i++) { + $("#metadata_discriptions").append('

    '); + $("#metadata_discriptions div.meta_" + i).append('

    ' + _uploaded_file_as_arrays[0][i] + '

    '); + $("#metadata_discriptions div.meta_" + i) + .append(''); + } +} +function names_to_ids(names) { + var parsed = names.split(","); + var indexes = ""; + console.log(parsed); + for (var i = 0; i < parsed.length; i++) { + for (var j = 0; j < _uploaded_file_as_arrays[0].length; j++) { + if (parsed[i] == _uploaded_file_as_arrays[0][j]) + indexes += j + ","; + } + } + return indexes; +} +function adjust_result_table(t) { + $('#result_table').empty(); + $('#result_table').append('
    '); + for (var i = 0; i < t.length; i++) { + $('#result_graph').append(''); + for (var j = 0; j < t[i].length; j++) { + $('tr.result_' + i).append('' + t[i][j] + ''); + console.log(t[i][j]); + } + } +} +//# sourceMappingURL=whiteboard.js.map \ No newline at end of file diff --git a/cognitive/MLApp/static/ts/whiteboard.js.map b/cognitive/MLApp/static/ts/whiteboard.js.map new file mode 100644 index 0000000..47f4b35 --- /dev/null +++ b/cognitive/MLApp/static/ts/whiteboard.js.map @@ -0,0 +1 @@ +{"version":3,"file":"whiteboard.js","sourceRoot":"","sources":["whiteboard.ts"],"names":["add_column_for_projection","initializa_projection_column","add_column_for_remove_duplicates","initializa_remove_duplicates_column","getResult","render_result_graphs","serialize_result_to_html","description_addrow","description_formula","description_normalization","description_machine_learning","description_metadata","names_to_ids","adjust_result_table"],"mappings":"AAAA,IAAI,sBAAsB,GAAK,EAAE,CAAC;AAClC,IAAI,mBAAmB,GAAQ,EAAE,CAAC;AAClC,IAAI,wBAAwB,GAAG,EAAE,CAAC;AAElC,CAAC,CAA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,OAAOA,CAACA,MAAMA,IAAIA,CAACA,CAACA,CAAAA,CAACA;gBACrBA,OAAOA,CAACA,IAAIA,CAACA,CAACA,CAACA,CAACA;YACpBA,CAACA;YAACA,IAAIA,CAACA,EAAEA,CAACA,CAACA,OAAOA,CAACA,MAAMA,IAAIA,CAACA,CAACA,CAACA,CAACA;gBAC7BA,IAAIA,EAAEA,GAAGA,CAACA,CAACA,CAACA,CAACA;gBACbA,EAAEA,CAACA,IAAIA,CAACA,OAAOA,CAACA,CAACA,CAACA,CAACA,CAACA;gBACpBA,EAAEA,CAACA,IAAIA,CAACA,CAACA,CAACA,CAACA;gBACXA,EAAEA,CAACA,IAAIA,CAACA,OAAOA,CAACA,CAACA,CAACA,CAACA,CAACA;gBACpBA,OAAOA,GAAGA,EAAEA,CAACA;YACjBA,CAACA;YAACA,IAAIA,CAACA,EAAEA,CAACA,CAACA,OAAOA,CAACA,MAAMA,IAAIA,CAACA,CAACA,CAACA,CAACA;gBAC7BA,IAAIA,EAAEA,GAAGA,CAACA,CAACA,CAACA,CAACA;gBACbA,EAAEA,CAACA,IAAIA,CAACA,OAAOA,CAACA,CAACA,CAACA,CAACA,CAACA;gBACpBA,EAAEA,CAACA,IAAIA,CAACA,CAACA,CAACA,CAACA;gBACXA,EAAEA,CAACA,IAAIA,CAACA,CAACA,CAACA,CAACA;gBACXA,OAAOA,GAAGA,EAAEA,CAACA;YACjBA,CAACA;YAEDA,IAAIA,GAAGA,GAAGA,EAAEA,CAACA,MAAMA,CAACA,0BAA0BA,GAACA,CAACA,GAACA,IAAIA,CAACA,CAACA;YAEvDA,GAAGA,CAACA,SAASA,CAACA,MAAMA,CAACA;iBAChBA,IAAIA,CAACA,OAAOA,CAACA;iBACbA,KAAKA,EAAEA;iBACPA,MAAMA,CAACA,MAAMA,CAACA;iBACdA,IAAIA,CAACA,GAAGA,EAAEA,UAASA,CAACA,EAACA,CAACA,IAAG,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,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BA,CAACA,CAACA,CAACA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;QACzDA,CAACA,CAACA,eAAeA,CAACA,CAACA,MAAMA,CAACA,4BAA4BA,GAACA,CAACA,GAACA,mCAAmCA,CAACA,CAACA;QAC9FA,CAACA,CAACA,0BAA0BA,GAACA,CAACA,CAACA,CAACA,MAAMA,CAACA,KAAKA,GAACA,wBAAwBA,CAACA,CAACA,CAACA,CAACA,CAACA,CAACA,GAACA,MAAMA,CAACA,CAACA;QACpFA,CAACA,CAACA,UAAUA,EAAEA;YACVA,OAAOA,EAAEA,qCAAqCA,GAACA,WAAWA,GAAGA,CAACA;YAC9DA,EAAEA,EAAEA,UAAUA,GAAGA,CAACA;YAClBA,IAAIA,EAACA,MAAMA;YACXA,WAAWA,EAAEA,OAAOA;SACvBA,CAACA,CAACA,QAAQA,CAACA,0BAA0BA,GAACA,CAACA,CAACA,CAACA;IAC9CA,CAACA;AACLA,CAACA;AAED;IACIC,CAACA,CAACA,iBAAiBA,CAACA,CAACA,KAAKA,EAAEA,CAACA;IAC7BA,EAAEA,CAACA,CAACA,sBAAsBA,IAAIA,EAAEA,CAACA,CAACA,CAACA;QAAAA,MAAMA,CAACA;IAAAA,CAACA;IAC3CA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAEA,CAACA,EAAEA,CAACA,GAAGA,wBAAwBA,CAACA,CAACA,CAACA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;QACzDA,CAACA,CAACA,iBAAiBA,CAACA,CAACA,MAAMA,CAACA,iBAAiBA,GAACA,CAACA,GAACA,IAAIA,GAACA,wBAAwBA,CAACA,CAACA,CAACA,CAACA,CAACA,CAACA,GAACA,WAAWA,CAACA,CAACA;IACrGA,CAACA;AACLA,CAACA;AAED;IACIC,CAACA,CAACA,uBAAuBA,CAACA,CAACA,KAAKA,EAAEA,CAACA;IACnCA,EAAEA,CAACA,CAACA,sBAAsBA,IAAIA,EAAEA,CAACA,CAACA,CAACA;QAAAA,MAAMA,CAACA;IAAAA,CAACA;IAC3CA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAEA,CAACA,EAAEA,CAACA,GAAGA,wBAAwBA,CAACA,CAACA,CAACA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;QACzDA,CAACA,CAACA,uBAAuBA,CAACA,CAACA,MAAMA,CAACA,iBAAiBA,GAACA,CAACA,GAACA,IAAIA,GAACA,wBAAwBA,CAACA,CAACA,CAACA,CAACA,CAACA,CAACA,GAACA,WAAWA,CAACA,CAACA;IAC3GA,CAACA;AACLA,CAACA;AAED;IACIC,CAACA,CAACA,0BAA0BA,CAACA,CAACA,KAAKA,EAAEA,CAACA;IACtCA,EAAEA,CAACA,CAACA,sBAAsBA,IAAIA,EAAEA,CAACA,CAACA,CAACA;QAAAA,MAAMA,CAACA;IAAAA,CAACA;IAC3CA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAEA,CAACA,EAAEA,CAACA,GAAGA,wBAAwBA,CAACA,CAACA,CAACA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;QACzDA,CAACA,CAACA,0BAA0BA,CAACA,CAACA,MAAMA,CAACA,iBAAiBA,GAACA,CAACA,GAACA,IAAIA,GAACA,wBAAwBA,CAACA,CAACA,CAACA,CAACA,CAACA,CAACA,GAACA,WAAWA,CAACA,CAACA;IAC9GA,CAACA;AACLA,CAACA;AAED;IACIC,CAACA,CAACA,wBAAwBA,CAACA,CAACA,KAAKA,EAAEA,CAACA;IACpCA,EAAEA,CAACA,CAACA,sBAAsBA,IAAIA,EAAEA,CAACA,CAACA,CAACA;QAAAA,MAAMA,CAACA;IAAAA,CAACA;IAC3CA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAEA,CAACA,EAAEA,CAACA,GAAGA,wBAAwBA,CAACA,CAACA,CAACA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;QACzDA,CAACA,CAACA,wBAAwBA,CAACA,CAACA,MAAMA,CAACA,uBAAuBA,GAACA,CAACA,GAACA,oCAAoCA,CAACA,CAACA;QACnGA,CAACA,CAACA,kCAAkCA,GAACA,CAACA,CAACA,CAACA,MAAMA,CAACA,KAAKA,GAACA,wBAAwBA,CAACA,CAACA,CAACA,CAACA,CAACA,CAACA,GAACA,MAAMA,CAACA,CAACA;QAC5FA,CAACA,CAACA,kCAAkCA,GAACA,CAACA,CAACA;aAClCA,MAAMA,CAACA,6CAA6CA,GAACA,CAACA,GAACA,mHAAmHA,CAACA,CAACA;IACrLA,CAACA;AACLA,CAACA;AAED,sBAAsB,KAAK;IACvBC,IAAIA,MAAMA,GAAIA,KAAKA,CAACA,KAAKA,CAACA,GAAGA,CAACA,CAACA;IAC/BA,IAAIA,OAAOA,GAAGA,EAAEA,CAACA;IACjBA,OAAOA,CAACA,GAAGA,CAACA,MAAMA,CAACA,CAACA;IACpBA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAEA,CAACA,EAAEA,CAACA,GAAGA,MAAMA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;QACpCA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAEA,CAACA,EAAEA,CAACA,GAAGA,wBAAwBA,CAACA,CAACA,CAACA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;YACzDA,EAAEA,CAACA,CAACA,MAAMA,CAACA,CAACA,CAACA,IAAIA,wBAAwBA,CAACA,CAACA,CAACA,CAACA,CAACA,CAACA,CAACA;gBAC5CA,OAAOA,IAAIA,CAACA,GAAGA,GAAGA,CAACA;QAC3BA,CAACA;IACLA,CAACA;IACDA,MAAMA,CAACA,OAAOA,CAACA;AACnBA,CAACA;AAED,6BAA6B,CAAC;IAC1BC,CAACA,CAACA,eAAeA,CAACA,CAACA,KAAKA,EAAEA,CAACA;IAC3BA,CAACA,CAACA,eAAeA,CAACA,CAACA,MAAMA,CAACA,mCAAmCA,CAACA,CAACA;IAC/DA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,CAACA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;QAChCA,CAACA,CAACA,eAAeA,CAACA,CAACA,MAAMA,CAACA,oBAAoBA,GAACA,CAACA,GAACA,SAASA,CAACA,CAACA;QAC5DA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,CAACA,CAACA,CAACA,CAACA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;YACnCA,CAACA,CAACA,YAAYA,GAACA,CAACA,CAACA,CAACA,MAAMA,CAACA,MAAMA,GAACA,CAACA,CAACA,CAACA,CAACA,CAACA,CAACA,CAACA,GAACA,OAAOA,CAACA,CAACA;YACjDA,OAAOA,CAACA,GAAGA,CAACA,CAACA,CAACA,CAACA,CAACA,CAACA,CAACA,CAACA,CAACA,CAACA;QACzBA,CAACA;IACLA,CAACA;AACLA,CAACA"} \ No newline at end of file diff --git a/cognitive/MLApp/static/ts/whiteboard.ts b/cognitive/MLApp/static/ts/whiteboard.ts new file mode 100644 index 0000000..44bd58b --- /dev/null +++ b/cognitive/MLApp/static/ts/whiteboard.ts @@ -0,0 +1,684 @@ +var _uploaded_file_as_text = ""; +var _uploaded_file_name = ""; +var _uploaded_file_as_arrays = []; + +$(function(){ + + var m = new Manager(); + var cognitive_client = new CognitiveAPIClientV1(); + var svg = d3.selectAll("svg"); + + $('.projection.plus-bottom').click(add_column_for_projection); + + var projections = 0; + function add_column_for_projection(){ + if (_uploaded_file_as_text == ""){return;} + var column_names = _uploaded_file_as_arrays[0]; + var option_string = ""; + for (var i=0; i < column_names.length; i++ ){ + option_string += '' + } + $('.form-group.projection_form').append(''); + projections++; + } + + function initializa_projection_column() { + $('.form-group.projection_form').empty(); + projections = 0; + } + + $('.remove_duplicates.plus-bottom').click(add_column_for_remove_duplicates); + + var _num_remove_duplicates_column = 0; + + function add_column_for_remove_duplicates(){ + if (_uploaded_file_as_text == ""){return;} + var column_names = _uploaded_file_as_arrays[0]; + var option_string = ""; + for (var i=0; i < column_names.length; i++ ){ + option_string += '' + } + $('.form-group.remove_duplicates_form').append(''); + _num_remove_duplicates_column++; + } + + function initializa_remove_duplicates_column() { + $('.form-group.remove_duplicates_form').empty(); + _num_remove_duplicates_column = 0; + } + + $(".menu_bar.introduction").click(function(){ + m.activate_menubar('introduction'); + }); + + $(".menu_bar.data_input").click(function(){ + m.activate_menubar('data_input'); + }); + + $(".menu_bar.add_row").click(function(){ + m.activate_menubar("add_row"); + description_addrow(); + }); + + $(".menu_bar.add_math_fomula").click(function(){ + m.activate_menubar("add_math_fomula"); + description_formula(); + }); + + $(".menu_bar.projection").click(function(){ + m.activate_menubar("projection"); + initializa_projection_column(); + add_column_for_projection(); + }); + + $(".menu_bar.normalization").click(function(){ + m.activate_menubar("normalization"); + description_normalization(); + }); + + $(".menu_bar.remove_column").click(function(){ + m.activate_menubar("remove_column"); + initializa_remove_duplicates_column(); + add_column_for_remove_duplicates(); + }); + + $(".menu_bar.remove_missing_value").click(function(){ + m.activate_menubar("remove_missing_value"); + }); + + $(".menu_bar.transform").click(function(){ + m.activate_menubar("transform"); + }); + + $(".menu_bar.metadata").click(function(){ + m.activate_menubar("metadata"); + description_metadata(); + }); + + $(".menu_bar.formula").click(function(){ + m.activate_menubar("formula"); + }); + + $(".menu_bar.filter").click(function(){ + m.activate_menubar("filter"); + }); + + $(".menu_bar.machine_learning").click(function(){ + m.activate_menubar("machine_learning"); + description_machine_learning(); + }); + + $(".menu_bar.data_output").click(function(){ + m.activate_menubar("data_output"); + }); + + $(".add_btn").click(function(){ + var node; + + if ($(this).hasClass('add_input')){ + + node = new ComponentBase({ + name:'INPUT_DATA', output:1, input:0 + }); + + cognitive_client.createInputComponent({ + user_id: 1, + input_file: _uploaded_file_name, + token: "token", + input_file_type: "csv", + experiment: 1, + data_values: _uploaded_file_as_text + }, node); + + } else if ($(this).hasClass('add_row')) { + + console.log("add_row test"); + + node = new ComponentBase({ + name:'Add Row', + input: 1, + output:1 + }); + + var request_text = "["; + for (var i =0; i < _uploaded_file_as_arrays[0].length; i++) { + request_text += "\"" + $(".add_row._column_" + i).val() + "\","; + } + + request_text = request_text.slice(0, request_text.length-1); + request_text += "]"; + console.log(request_text); + + cognitive_client.createAddRowComponent({ + user_id: 1, + token: "aaa", + experiment: 1, + row_values: request_text + }, node); + + + } else if ($(this).hasClass('add_math_fomula')) { + + //node = new ComponentBase({ + // name:'Apply Formula', + // input:1, + // output:1 + //}); + node = new MathFormula(); + + var method = $('select#formula_method').val(); + var column_num = $('select#formula_column').val(); + var constant = $('#formula_constant').val(); + + var t = { + user_id: 1, + token: "aaa", + experiment: 1, + component_type: "Column", + component_id: column_num, // should be index number + op_type: method, // or Sub, Mul, Div + op_constant: constant + }; + console.log(t); + + cognitive_client.createMathFormulaComponent(t, node); + + } else if ($(this).hasClass('add_normalization')) { + + node = new ComponentBase({ + name:'Normalization', + input:1, + output:1 + }); + + var method = $('select#normalization_method').val(); + var column_num = $('select#normalization_column').val(); + + cognitive_client.createNormalizationComponent({ + user_id: 1, + token: "aaa", + experiment: 1, + component_type: "Column", + component_id: column_num, + op_type: method + }, node); + + } else if ($(this).hasClass('add_projection')) { + + node = new ComponentBase({ + name:'Column Selection', + input:1, + output:1 + }); + + var len = $('.projection_selects').length; + var projection_columns = "["; + + for (var i=0; i", closeButton:false, transition:"none", opacity:0, arrowKey:false, overlayClose:false, fastIframe:false, width:"300px", height:"300px"}); + $('#cboxClose').remove(); + $('#cboxTopLeft').remove(); + $('#cboxTopCenter').remove(); + $('#cboxTopRight').remove(); + $('#cboxMiddleLeft').remove(); + $('#cboxMiddleRight').remove(); + $('#cboxBottomCenter').remove(); + $('#cboxBottomLeft').remove(); + $('#cboxBottomRight').remove(); + setTimeout("$.colorbox.close()", 700); + + }); + + $('#inputFile').change(function(evt) { + var file = evt.target.files[0]; + var reader = new FileReader(); + reader.onload = function(e) { + _uploaded_file_as_text = e.target.result; + _uploaded_file_as_arrays = $.csv.toArrays(_uploaded_file_as_text); + }; + reader.readAsText(file); + + _uploaded_file_name = file.name + }); + + $(".show_result_graph").click(getResult); + + function getResult() { + + console.log("--------------------"); + + var component = ComponentBase.get_current_focus_component(); + console.log(component); + + if (component == null) {return;} + + console.log("--------------------"); + + $.ajax({ + url: '/api/v1/results/?experiment=1&component_id=' + component.get_backend_id(), + type: "GET", + data: "", + success: function(result) { + a = result; + console.log(result); + var z = serialize_result_to_html(result); + + $.colorbox({html:"

    Results

    "+z+"

    ", width: "90%"}); + + render_result_graphs(result); + } + }); + console.log("--------------------"); + } + + function render_result_graphs(result) { + + var w = 100; + var h = 100; + + for (var i=0; i < result['feature_names'].length; i++ ){ + var target_area = d3.select("svg[class='graph column_"+i+"']"); + var dataset = result.graph_data[i][1]; + + if (d3.max(dataset) == d3.min(dataset)) { + dataset = [100,100,100,100]; + } + + for (var j=0; j < dataset.length; j++) { + if (dataset[j] >= 96) { + dataset[j] -= 4; + } + } + + if (dataset.length == 3){ + dataset.push(0); + } else if (dataset.length == 2) { + var _t = [0]; + _t.push(dataset[0]); + _t.push(0); + _t.push(dataset[1]); + dataset = _t; + } else if (dataset.length == 1) { + var _t = [0]; + _t.push(dataset[0]); + _t.push(0); + _t.push(0); + dataset = _t; + } + + var svg = d3.select("svg[class='graph column_"+i+"']"); + + svg.selectAll("rect") + .data(dataset) + .enter() + .append("rect") + .attr("x", function(d,i){ return i * 22 + 7; }) + .attr("y", function(d){ return h - d; }) + .attr('class', 'bar') + .attr('height', function(d){ return d -4; }) + .attr("width", (w/dataset.length - 6)); + + svg.append('rect') + .attr("x", 3) + .attr("y", 3) + .attr('width', w - 6 ) + .attr('height', h - 6 ) + .attr('stroke', "black" ) + .attr('fill', 'none') + .attr('stroke-width', "1" ) + } + } + + function serialize_result_to_html(result) { + + var _html ="
    "; + + if (Object.keys(result).indexOf('output') >= 0) { + _html += "

    Model Evaluation

    "; + _html += ""; + + var ml_output = result['output']; + var keys = Object.keys(ml_output); + + _html += ""; + for (var i=0; i" + } + _html += ""; + for (var i=0; i" + } + _html += "
    " + } + + _html += "

    Statistics

    "; + _html += ""; + + _html +=""; + + for (var i=0; i < result['feature_names'].length; i++ ){ + _html += "" + } + _html +=""; + + _html += ''; + _html +=""; + for (var i=0; i < result['feature_names'].length; i++ ){ + _html += "" + } + _html += ""; + + _html += ""; + _html +=""; + for (var i=0; i < result['std'].length; i++ ){ + _html += "" + } + _html += ""; + + _html +=""; + for (var i=0; i < result['75_quartile'].length; i++ ){ + _html += "" + } + _html += ""; + + _html +=""; + for (var i=0; i < result['50_quartile'].length; i++ ){ + _html += "" + } + _html += ""; + + _html +=""; + for (var i=0; i < result['25_quartile'].length; i++ ){ + _html += "" + } + + _html += ""; + + _html +=""; + for (var i=0; i < result['max'].length; i++ ){ + _html += "" + } + _html += ""; + + _html +=""; + for (var i=0; i < result['mean'].length; i++ ){ + _html += "" + } + _html += ""; + + _html +=""; + for (var i=0; i < result['median'].length; i++ ){ + _html += "" + } + _html += ""; + + _html +=""; + for (var i=0; i < result['min'].length; i++ ){ + _html += "" + } + _html += ""; + + _html +=""; + for (var i=0; i < result['missing_values'].length; i++ ){ + _html += "" + } + _html += ""; + + _html +=""; + for (var i=0; i < result['unique_values'].length; i++ ){ + _html += "" + } + + _html += ""; + for (var i=0; i < result['feature_names'].length; i++ ){ + _html += "" + } + _html += ""; + + for (var i=0; i < result['data'].length; i++ ){ + _html +=""; + for (var j=0; j < result['data'][i].length; j++ ){ + _html += "" + } + _html +="" + } + _html += "
                         
    Statistics" + result['feature_names'][i] + "
    Std Deviation" + result['std'][i] + "
    75 Quartile" + result['75_quartile'][i] + "
    50 Quartile" + result['50_quartile'][i] + "
    25 Quartile" + result['25_quartile'][i] + "
    Max" + result['max'][i] + "
    Mean" + result['mean'][i] + "
    Median" + result['median'][i] + "
    Min" + result['min'][i] + "
    Missing Values" + result['missing_values'][i] + "
    Unique Values" + result['unique_values'][i] + "
    " + result['feature_names'][i] + "
    " + result['data'][i][j] + "
    "; + + return _html; + } + + +}); + +function description_addrow() { + $(".add_row_form").empty(); + _uploaded_file_as_arrays[0]; + console.log(_uploaded_file_as_arrays[0]); + if (_uploaded_file_as_text == "") {return;} + for (var i =0; i < _uploaded_file_as_arrays[0].length; i++) { + $(".add_row_form").append('
  • '); + $(".add_row_form li.column_"+i).append('

    '+_uploaded_file_as_arrays[0][i]+'

    '); + $("", { + "class": "add_row form-control floating-label"+" _column_" + i, + id: "_column_" + i, + type:"text", + placeholder: "value" + }).appendTo(".add_row_form li.column_"+i); + } +} + +function description_formula() { + $("#formula_column").empty(); + if (_uploaded_file_as_text == "") {return;} + for (var i =0; i < _uploaded_file_as_arrays[0].length; i++) { + $("#formula_column").append(''); + } +} + +function description_normalization() { + $("#normalization_column").empty(); + if (_uploaded_file_as_text == "") {return;} + for (var i =0; i < _uploaded_file_as_arrays[0].length; i++) { + $("#normalization_column").append(''); + } +} + +function description_machine_learning() { + $('.machine_learning_target').empty(); + if (_uploaded_file_as_text == "") {return;} + for (var i =0; i < _uploaded_file_as_arrays[0].length; i++) { + $('.machine_learning_target').append(''); + } +} + +function description_metadata() { + $("#metadata_discriptions").empty(); + if (_uploaded_file_as_text == "") {return;} + for (var i =0; i < _uploaded_file_as_arrays[0].length; i++) { + $("#metadata_discriptions").append('

    '); + $("#metadata_discriptions div.meta_"+i).append('

    '+_uploaded_file_as_arrays[0][i]+'

    '); + $("#metadata_discriptions div.meta_"+i) + .append(''); + } +} + +function names_to_ids(names) { + var parsed = names.split(","); + var indexes = ""; + console.log(parsed); + for (var i =0; i < parsed.length; i++) { + for (var j =0; j < _uploaded_file_as_arrays[0].length; j++) { + if (parsed[i] == _uploaded_file_as_arrays[0][j]) + indexes += j + ","; + } + } + return indexes; +} + +function adjust_result_table(t) { + $('#result_table').empty(); + $('#result_table').append('
    '); + for (var i = 0; i < t.length; i++) { + $('#result_graph').append(''); + for (var j = 0; j < t[i].length; j++) { + $('tr.result_'+i).append(''+t[i][j]+''); + console.log(t[i][j]); + } + } +} diff --git a/cognitive/MLApp/static/ts/whiteboard_manager.js b/cognitive/MLApp/static/ts/whiteboard_manager.js new file mode 100644 index 0000000..0225633 --- /dev/null +++ b/cognitive/MLApp/static/ts/whiteboard_manager.js @@ -0,0 +1,41 @@ +var Manager = (function () { + function Manager(param) { + this._active_menu = null; + } + function activate_menubar(elm) { + menubar = $('li.' + elm); + description = $('.detail.' + elm); + menubar + .css("background-color", "#1e8cff") + .css("color", "white"); + description.toggle("slide", { direction: "left" }, 700); + if (this._active_menu === null) { + this._active_menu = elm; + return (menubar.addClass("active")); + } + if (this._active_menu == elm) { + if (menubar.hasClass("active")) { + this._active_menu = null; + return menubar + .css("background-color", "") + .css("color", "") + .removeClass("active"); + } + } + previous_menubar = $('li.' + this._active_menu); + previous_description = $('.detail.' + this._active_menu); + previous_description.toggle("slide"); + previous_menubar + .css("background-color", "") + .css("color", "") + .removeClass("active"); + this._active_menu = elm; + return (menubar.addClass("active")); + } + Manager.prototype = { + constructor: Manager, + activate_menubar: activate_menubar + }; + return Manager; +})(); +//# sourceMappingURL=whiteboard_manager.js.map \ No newline at end of file diff --git a/cognitive/MLApp/static/ts/whiteboard_manager.js.map b/cognitive/MLApp/static/ts/whiteboard_manager.js.map new file mode 100644 index 0000000..ce11a62 --- /dev/null +++ b/cognitive/MLApp/static/ts/whiteboard_manager.js.map @@ -0,0 +1 @@ +{"version":3,"file":"whiteboard_manager.js","sourceRoot":"","sources":["whiteboard_manager.ts"],"names":["Manager","activate_menubar"],"mappings":"AAAA,IAAI,OAAO,GAAG,CAAC;IAEX,iBAAiB,KAAK;QAClBA,IAAIA,CAACA,YAAYA,GAAGA,IAAIA,CAACA;IAC7BA,CAACA;IAED,0BAA0B,GAAG;QACzBC,OAAOA,GAAGA,CAACA,CAACA,KAAKA,GAACA,GAAGA,CAACA,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AAGA,CAACA,OAAOA,EAAEA,EAAEA,CAACA;aAChBA,WAAWA,CAACA,QAAQA,CAACA,CAACA;QAE3BA,IAAIA,CAACA,YAAYA,GAAGA,GAAGA,CAACA;QAExBA,MAAMA,CAAAA,CAACA,OAAOA,CAACA,QAAQA,CAACA,QAAQA,CAACA,CAACA,CAACA;IACvCA,CAACA;IAED,OAAO,CAAC,SAAS,GAAG;QAChB,WAAW,EAAE,OAAO;QACpB,gBAAgB,EAAE,gBAAgB;KACrC,CAAC;IAEF,MAAM,CAAC,OAAO,CAAC;AAEnB,CAAC,CAAC,EAAE,CAAC"} \ No newline at end of file diff --git a/cognitive/MLApp/static/ts/whiteboard_manager.ts b/cognitive/MLApp/static/ts/whiteboard_manager.ts new file mode 100644 index 0000000..ac7c710 --- /dev/null +++ b/cognitive/MLApp/static/ts/whiteboard_manager.ts @@ -0,0 +1,53 @@ +var Manager = (function(){ + + function Manager(param){ + this._active_menu = null; + } + + function activate_menubar(elm){ + menubar = $('li.'+elm); + description = $('.detail.'+elm); + + menubar + .css("background-color", "#1e8cff") + .css("color", "white"); + + description.toggle("slide", {direction: "left"}, 700); + + if (this._active_menu === null) { + this._active_menu = elm; + return(menubar.addClass("active")); + } + + if (this._active_menu == elm) { + if (menubar.hasClass("active")) { + this._active_menu = null; + return menubar + .css("background-color", "") + .css("color", "") + .removeClass("active"); + } + } + + previous_menubar = $('li.'+ this._active_menu); + previous_description = $('.detail.'+ this._active_menu); + + previous_description.toggle("slide"); + previous_menubar + .css("background-color", "") + .css("color", "") + .removeClass("active"); + + this._active_menu = elm; + + return(menubar.addClass("active")); + } + + Manager.prototype = { + constructor: Manager, + activate_menubar: activate_menubar + }; + + return Manager; + +})(); diff --git a/cognitive/MLApp/templates/whiteboard.haml b/cognitive/MLApp/templates/whiteboard.haml index 6464da3..942c681 100644 --- a/cognitive/MLApp/templates/whiteboard.haml +++ b/cognitive/MLApp/templates/whiteboard.haml @@ -8,11 +8,12 @@ %link{href: "{{STATIC_URL}}css/whiteboard.css", rel: "stylesheet"} %script{src: "{{STATIC_URL}}lib/jquery-ui/jquery-ui.js", type: "text/javascript"} - %script{src: "{{STATIC_URL}}js/api/client_v1.js", type: "text/javascript"} - %script{src: "{{STATIC_URL}}js/whiteboard_manager.js", type:"text/javascript"} - %script{src: "{{STATIC_URL}}js/whiteboard.js", type: "text/jsx"} %script{src: "{{STATIC_URL}}lib/d3/d3.js", type: "text/javascript"} - %script{src: "{{STATIC_URL}}js/base_node.js", type: "text/javascript"} + %script{src: "{{STATIC_URL}}ts/components/base.js", type: "text/javascript"} + %script{src: "{{STATIC_URL}}ts/components/math_formula.js", type: "text/javascript"} + %script{src: "{{STATIC_URL}}js/api/client_v1.js", type: "text/javascript"} + %script{src: "{{STATIC_URL}}ts/whiteboard_manager.js", type:"text/javascript"} + %script{src: "{{STATIC_URL}}ts/whiteboard.js", type: "text/javascript"} %script{src: "{{STATIC_URL}}js/lib/jquery.csv-0.71.min.js", type: "text/javascript"} %script{src: "{{STATIC_URL}}js/lib/jquery.colorbox-min.js", type: "text/javascript"} @@ -54,6 +55,18 @@ %li.menu_bar.machine_learning %i.fa.fa-yelp Machine Learning + %li.menu_bar.kafka + %i.fa.fa-yelp + Apache Kafka + %li.menu_bar.influx_db + %i.fa.fa-yelp + InfluxDB + %li.menu_bar.kibana + %i.fa.fa-yelp + Kibana + %li.menu_bar.elastic_search + %i.fa.fa-yelp + Elastic Search #visualization %svg#root.root diff --git a/cognitive/settings.py b/cognitive/settings.py index 585dd58..69d87c7 100644 --- a/cognitive/settings.py +++ b/cognitive/settings.py @@ -21,6 +21,7 @@ import xstatic.pkg.bootstrap import xstatic.pkg.d3 import xstatic.pkg.font_awesome +import xstatic.pkg.jasmine import xstatic.pkg.jquery import xstatic.pkg.jquery_ui @@ -54,7 +55,7 @@ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', - 'djangobower', + # 'djangobower', 'rest_framework', 'cognitive.MLApp', ) diff --git a/doc/.keep b/doc/.keep new file mode 100644 index 0000000..e69de29 diff --git a/setup.cfg b/setup.cfg index 44f8715..9186f25 100644 --- a/setup.cfg +++ b/setup.cfg @@ -4,4 +4,4 @@ summary = Machine Learning as a Service description-file = README.md [files] -packages = MLaaS +packages = cognitive