From 7c6b258cfcbbcd3a406a9c420972aa194512fbb7 Mon Sep 17 00:00:00 2001 From: Marco Lazzara Date: Fri, 29 Nov 2013 11:51:13 +0100 Subject: [PATCH] commit for issue #32 and #31 --- app/img/spinner.gif | Bin 12337 -> 8534 bytes app/index.html | 11 ++-- app/scripts/api.js | 4 +- .../controllers/database-controller.js | 22 +++++--- .../controllers/function-controller.js | 9 +++- app/scripts/controllers/schema-controller.js | 25 ++++++--- app/scripts/services/database-services.js | 16 ++++-- app/scripts/services/spinner-service.js | 48 ++++++++++++++++-- app/scripts/widgets/widget.js | 18 ++++++- app/styles/main.css | 19 +++++++ app/views/database/browse.html | 33 ++++++++---- app/views/database/editclass.html | 7 +++ app/views/database/newIndex.html | 4 ++ app/views/database/newProperty.html | 4 ++ app/views/spinner.html | 4 +- 15 files changed, 177 insertions(+), 47 deletions(-) diff --git a/app/img/spinner.gif b/app/img/spinner.gif index 55a0da6c24abec3b70ead46e62406ca65dd4ee5c..8be8ba338d5b5aec80593295f88bcaf6608bdf18 100644 GIT binary patch literal 8534 zcmcJUXIK+?+qY*XnG^_^gb<39p(!dNAkr4ykWP;X2#69C1Qit!Ap&9o0YdK(q=jA- zK|w`q0RcgUMNx_cK@qU6=(?8Ob$Ph={_sA}bG+~U?VS(vasI~~$2s%+o!7;2WZT#V z+5`5$BLG-lUjF*^>xT~?=I7_9r>Doq$45p+`uqE@U%!6w;>Fh1*82MT^78V+!otkV zOtDxT7Z-Qz*s(*04(;2w&(F`#!^6YL$%#&<+u7Nfo13p&w@yz_PeVh4NF?HLIN+b> zuiXFtU3$xkZY<9o3`^l*hhd}qxf%{P$1tM`3R=|NV z85oFjDnP`7$wkQ$c6#PscJ46_v8ZU3^l)azQC4L>17D<4q)^WU8#8=bBhLa5sfJ9- z?qHxUon)S2DYg||y>&XX3mEFVNhaQ6Lzl|w59!MH$j_!2=u5q0-3-jQvgF8v&P$jp zLPm9aQFE!Xvf>HZM%&0=J=Y&RXSj%J8t#D!YKCT(9^oo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zPS_KzIM`xGNC}#@!xvy1JK5gzV*8tuUHxe&@5sZC2U9GgZ+(Yuj`rS2g7Q-l{XV_Ov0RzBS9+uv#3a$gRrU!z z=UM#{rOeS;kH=?c3UxN>NO|;&4`w~0qv#||NAcb-3`dYBK}&AQ*R`*aQcC>KA@*Hnx~XJ(i;}dQcVAMt9r5vj zoOU43(p*!$zkl4nve1lhmA??b^HeMd!bZIbx7 zjmez<;qJ&Ho<&2N!aPvmckGGFOkrh6To9fcvS1oCVfcRo_M3CtgShFQpA>k#*a!M2 z_M23{VUPKV{gc09kJLf%$c-*tVHXAR0c+eao)%E77Nz3deMzF`wXwZY?a|MXMsHrj z_Hrd-QM%PUAEOcKnJtkgZ;9sR>pt(ZJvkuvQFORSK2iS3mq!n7WEeiRmO1nIte&w> z8eWIWG;VWF`#0<}fva5+{@Xn2Ke6YsyJYmD_Td8Rqy#oq07hv^DZamy&{kJ*pNAm9 z!>v&-O)-$FI|RCnb=jKAjk7a&CAUX}m6&Db3?x>;r|Oh@e#j)%IDlI5EV=s0`|nrl z;v*gue{pvl9p%@){)FfAC(0RKyCa@27Y|-__djJ>$mZR2d(pHi+bf2F>=XBWQp>I1M@zJB|vra^!}OHF-!P&h6fP;Ad1COx^<3PX?Q zJ};W(wuvGD(V*m_75OeXMo5KC(w%LUE$+-se=j;+s9NG_n|WIm-CXrZIkPtyqp|g& zh|7L_VUc>-J|V|t&YcC)k%dEP znS|$pr4iG4lanFoxiI#uq?|k=sURY?IIXlStfI2ICZwn`voW-}xV0^~Bd?)5psu*D z-;bQzHS7jO(CxdxxLi9)8(B_`bY*hDKsh z!HMcCFHih1e~SM9z{o0{uuIyxJ>d)j(i b&Dxs>Oo!@5?u^w=q!NkFx$|fg=;HqX20%pj diff --git a/app/index.html b/app/index.html index 287ad65d55a..53a3f8d75a8 100644 --- a/app/index.html +++ b/app/index.html @@ -42,11 +42,11 @@
-
-
+
+
+
-
@@ -93,7 +91,8 @@ - + diff --git a/app/scripts/api.js b/app/scripts/api.js index e56c189c975..37655a904fc 100644 --- a/app/scripts/api.js +++ b/app/scripts/api.js @@ -1,4 +1,4 @@ // -//var API = '/api/'; -var API = '../'; +var API = '/api/'; +//var API = '../'; diff --git a/app/scripts/controllers/database-controller.js b/app/scripts/controllers/database-controller.js index 2d219c8f97c..291ff6a5bb4 100644 --- a/app/scripts/controllers/database-controller.js +++ b/app/scripts/controllers/database-controller.js @@ -1,5 +1,5 @@ var dbModule = angular.module('database.controller', ['database.services']); -dbModule.controller("BrowseController", ['$scope', '$routeParams', '$location', 'Database', 'CommandApi', 'Spinner', 'localStorageService', function ($scope, $routeParams, $location, Database, CommandApi, Spinner, localStorageService) { +dbModule.controller("BrowseController", ['$scope', '$routeParams', '$location', 'Database', 'CommandApi', 'localStorageService', 'Spinner', function ($scope, $routeParams, $location, Database, CommandApi, localStorageService, Spinner) { $scope.database = Database; $scope.limit = 20; @@ -11,8 +11,10 @@ dbModule.controller("BrowseController", ['$scope', '$routeParams', '$location', $scope.queries = localStorageService.get("Queries"); $scope.language = 'sql'; $scope.countPage = 10; - $scope.countPageOptions = [10, 20, 50, 100]; + $scope.countPageOptions = [10, 20, 50, 100, 500, 1000, 2000, 5000]; $scope.table = true; + $scope.contentType = ['JSON', 'CSV']; + $scope.selectedContentType = $scope.contentType[0]; $scope.editorOptions = { lineWrapping: true, lineNumbers: true, @@ -41,7 +43,8 @@ dbModule.controller("BrowseController", ['$scope', '$routeParams', '$location', $scope.query = function () { - Spinner.loading = true; + Spinner.start(); + $scope.queryText = $scope.queryText.trim(); $scope.queryText = $scope.queryText.replace(/\n/g, " "); if ($scope.queryText.startsWith('g.')) { @@ -51,9 +54,13 @@ dbModule.controller("BrowseController", ['$scope', '$routeParams', '$location', $location.path('/database/' + $routeParams.database + '/browse/edit/' + $scope.queryText.replace('#', '')); } - CommandApi.queryText({database: $routeParams.database, language: $scope.language, text: $scope.queryText, limit: $scope.limit}, function (data) { - Spinner.loading = false; + var conttype; + if ($scope.selectedContentType == 'CSV') + conttype = 'text/csv'; + CommandApi.queryText({database: $routeParams.database, contentType: conttype, language: $scope.language, text: $scope.queryText, limit: $scope.limit}, function (data) { + if (data.result) { + $scope.headers = Database.getPropertyTableFromResults(data.result); if ($scope.headers.length == 00) { $scope.alerts = new Array; @@ -72,14 +79,17 @@ dbModule.controller("BrowseController", ['$scope', '$routeParams', '$location', } $scope.queries.unshift($scope.queryText); localStorageService.add("Queries", $scope.queries); + Spinner.stopSpinner(); } }, function (data) { + Spinner.stopSpinner(); $scope.headers = undefined; $scope.resultTotal = undefined; $scope.results = undefined; - Spinner.loading = false; }); + } + $scope.clear = function () { $scope.queries = new Array; localStorageService.add("Queries", $scope.queries); diff --git a/app/scripts/controllers/function-controller.js b/app/scripts/controllers/function-controller.js index d24089c3312..92f02a5111f 100644 --- a/app/scripts/controllers/function-controller.js +++ b/app/scripts/controllers/function-controller.js @@ -1,5 +1,5 @@ var schemaModule = angular.module('function.controller', ['database.services']); -schemaModule.controller("FunctionController", ['$scope', '$routeParams', '$location', 'Database', 'CommandApi', 'FunctionApi', 'DocumentApi', '$modal', '$q', '$route', function ($scope, $routeParams, $location, Database, CommandApi, FunctionApi, DocumentApi, $modal, $q, $route) { +schemaModule.controller("FunctionController", ['$scope', '$routeParams', '$location', 'Database', 'CommandApi', 'FunctionApi', 'DocumentApi', '$modal', '$q', '$route', 'Spinner', function ($scope, $routeParams, $location, Database, CommandApi, FunctionApi, DocumentApi, $modal, $q, $route, Spinner) { $scope.database = Database; $scope.listClasses = $scope.database.listClasses(); @@ -110,11 +110,16 @@ schemaModule.controller("FunctionController", ['$scope', '$routeParams', '$locat for (i in $scope.parametersToExecute) { buildedParams = buildedParams.concat($scope.parametersToExecute[i] + '/'); } - + Spinner.start(); FunctionApi.executeFunction({database: $routeParams.database, functionName: $scope.nameFunction, parameters: buildedParams, limit: $scope.limit}, function (data) { if (data.result) { $scope.resultExecute = JSON.stringify(data.result); + Spinner.stopSpinner(); } + Spinner.stopSpinner(); + }, function (error) { + $scope.resultExecute = error; + Spinner.stopSpinner(); }); } } diff --git a/app/scripts/controllers/schema-controller.js b/app/scripts/controllers/schema-controller.js index 586fa83c249..542dabf6e29 100644 --- a/app/scripts/controllers/schema-controller.js +++ b/app/scripts/controllers/schema-controller.js @@ -99,7 +99,7 @@ schemaModule.controller("ClassEditController", ['$scope', '$routeParams', '$loca $scope.modificati = undefined; $scope.limit = 20; $scope.queries = new Array; - $scope.classClickedHeaders = ['name', 'type', 'linkedType', 'linkedClass', 'mandatory', 'readonly', 'notNull', 'min', 'max', 'Actions']; + $scope.classClickedHeaders = ['Name', 'Type', 'Linked_Type', 'Linked_Class', 'Mandatory', 'Read_Only', 'Not_Null', 'Min', 'Max','Collate', 'Actions']; $scope.property = null; $scope.property = Database.listPropertiesForClass(clazz); $scope.propertyNames = new Array; @@ -146,7 +146,7 @@ schemaModule.controller("ClassEditController", ['$scope', '$routeParams', '$loca $scope.queryText = "" $scope.modificati = new Array; $scope.listTypes = ['BINARY', 'BOOLEAN', 'EMBEDDED', 'EMBEDDEDLIST', 'EMBEDDEDMAP', 'EMBEDDEDSET', 'DECIMAL', 'FLOAT', 'DATE', 'DATETIME', 'DOUBLE', 'INTEGER', 'LINK', 'LINKLIST', 'LINKMAP', 'LINKSET', 'LONG', 'SHORT', 'STRING']; - + $scope.collateTypes = ['Case Insensitive', 'default']; $scope.modificato = function (result, prop) { var key = result['name']; if ($scope.modificati[result['name']] == undefined) { @@ -216,8 +216,10 @@ schemaModule.controller("ClassEditController", ['$scope', '$routeParams', '$loca var prop = arrayToUpdate[0]; var newValue = properties[result][prop] != '' ? properties[result][prop] : null; + if(newValue == 'Case Insensitive') + newValue = 'ci'; var sql = 'ALTER PROPERTY ' + clazz + '.' + keyName + ' ' + prop + ' ' + newValue; - + console.log(sql); CommandApi.queryText({database: $routeParams.database, language: 'sql', text: sql, limit: $scope.limit}, function (data) { if (data) { var index = arrayToUpdate.indexOf(prop); @@ -313,7 +315,7 @@ schemaModule.controller("ClassEditController", ['$scope', '$routeParams', '$loca }); } }]); -schemaModule.controller("IndexController", ['$scope', '$routeParams', '$location', 'Database', 'CommandApi', '$modal', '$q', function ($scope, $routeParams, $location, Database, CommandApi, $modal, $q) { +schemaModule.controller("IndexController", ['$scope', '$routeParams', '$location', 'Database', 'CommandApi', '$modal', '$q', 'Spinner', function ($scope, $routeParams, $location, Database, CommandApi, $modal, $q, Spinner) { $scope.listTypeIndex = [ 'DICTIONARY', 'FULLTEXT', 'UNIQUE', 'NOTUNIQUE', 'DICTIONARY_HASH_INDEX', 'FULLTEXT_HASH_INDEX', 'UNIQUE_HASH_INDEX', 'NOTUNIQUE_HASH_INDEX' ]; $scope.newIndex = {"name": "", "type": "", "fields": "" } @@ -322,6 +324,7 @@ schemaModule.controller("IndexController", ['$scope', '$routeParams', '$location $scope.nameIndexToShow = $scope.classInject + '.'; $scope.db.refreshMetadata($routeParams.database); $scope.property = Database.listPropertiesForClass($scope.classInject); + $scope.propertyNames = new Array; for (inn in $scope.property) { @@ -375,18 +378,20 @@ schemaModule.controller("IndexController", ['$scope', '$routeParams', '$location var sql = 'CREATE INDEX ' + $scope.nameIndexToShow + ' ON ' + $scope.classInject + ' ( ' + proppps + ' ) ' + $scope.newIndex['type']; $scope.newIndex['name'] = $scope.nameIndexToShow; $scope.newIndex['fields'] = proppps; - + Spinner.startSpinnerPopup(); CommandApi.queryText({database: $routeParams.database, language: 'sql', text: sql, limit: $scope.limit}, function (data) { $scope.hide(); $scope.parentScope.addIndexFromExt($scope.newIndex); + Spinner.stopSpinnerPopup(); }, function (error) { $scope.testMsgClass = 'alert alert-error'; $scope.testMsg = error; + Spinner.stopSpinnerPopup(); }); } }]); -schemaModule.controller("PropertyController", ['$scope', '$routeParams', '$location', 'Database', 'CommandApi', '$modal', '$q', function ($scope, $routeParams, $location, Database, CommandApi, $modal, $q) { +schemaModule.controller("PropertyController", ['$scope', '$routeParams', '$location', 'Database', 'CommandApi', '$modal', '$q', 'Spinner', function ($scope, $routeParams, $location, Database, CommandApi, $modal, $q, Spinner) { $scope.property = {"name": "", "type": "", "linkedType": "", "linkedClass": "", "mandatory": "false", "readonly": "false", "notNull": "false", "min": null, "max": null} @@ -404,12 +409,15 @@ schemaModule.controller("PropertyController", ['$scope', '$routeParams', '$locat var linkedType = prop['linkedType'] != null ? prop['linkedType'] : ''; var linkedClass = prop['linkedClass'] != null ? prop['linkedClass'] : ''; var sql = 'CREATE PROPERTY ' + $scope.classInject + '.' + propName + ' ' + propType + ' ' + linkedType + ' ' + linkedClass; - console.log(sql); + Spinner.startSpinnerPopup(); CommandApi.queryText({database: $routeParams.database, language: 'sql', text: sql, limit: $scope.limit}, function (data) { - + Spinner.stopSpinnerPopup(); + }, function (error) { + Spinner.stopSpinnerPopup(); }); var i = 1; + Spinner.startSpinnerPopup(); for (entry in prop) { var sql = 'ALTER PROPERTY ' + $scope.classInject + '.' + propName + ' ' + entry + ' ' + prop[entry]; CommandApi.queryText({database: $routeParams.database, language: 'sql', text: sql, limit: $scope.limit}, function (data) { @@ -420,6 +428,7 @@ schemaModule.controller("PropertyController", ['$scope', '$routeParams', '$locat $scope.parentScope.indexes = Database.listIndexesForClass(clazz); $scope.parentScope.apply(); }); + Spinner.startSpinnerPopup(); $scope.hide(); } }); diff --git a/app/scripts/services/database-services.js b/app/scripts/services/database-services.js index 6cfbb7010ac..7f17c26d02f 100644 --- a/app/scripts/services/database-services.js +++ b/app/scripts/services/database-services.js @@ -439,7 +439,6 @@ database.factory('DatabaseApi', function ($http, $resource) { var urlWiki = "https://github.com/orientechnologies/orientdb-studio/wiki/Functions"; - var resource = $resource(API + 'database/:database'); resource.listDatabases = function (callback) { $http.get(API + 'listDatabases').success(callback); @@ -452,7 +451,6 @@ database.factory('DatabaseApi', function ($http, $resource) { return urlWiki; } - resource.connect = function (database, username, password, callback, error) { $http.defaults.headers.common['Authorization'] = 'Basic ' + Base64.encode(username + ':' + password); $http.get(API + 'connect/' + database).success(callback).error(error); @@ -487,7 +485,7 @@ database.factory('DatabaseApi', function ($http, $resource) { } return resource; }); -database.factory('CommandApi', function ($http, $resource, Notification) { +database.factory('CommandApi', function ($http, $resource, Notification, Spinner) { var resource = $resource(API + 'command/:database'); @@ -496,11 +494,16 @@ database.factory('CommandApi', function ($http, $resource, Notification) { var limit = params.limit || 20; var verbose = params.verbose != undefined ? params.verbose : true; var shallow = params.shallow != undefined ? '' : ',shallow'; +// var contentType = params.contentType || 'application/json'; //rid,type,version,class,attribSameRow,indent:2,dateAsLong,shalow,graph var text = API + 'command/' + params.database + "/" + params.language + "/-/" + limit + '?format=rid,type,version' + shallow + ',class,graph'; + + if (params.text) { var query = params.text.trim(); +// var config = {headers: "Content-Type: " + contentType}; $http.post(text, query).success(function (data) { + var time = ((new Date().getTime() - startTime) / 1000); var records = data.result ? data.result.length : ""; @@ -508,10 +511,13 @@ database.factory('CommandApi', function ($http, $resource, Notification) { var noti = "Query executed in " + time + " sec. Returned " + records + " record(s)"; Notification.push({content: noti}); } - if (data != undefined) + if (data != undefined) { callback(data); - else + } + else { callback('ok'); + } + }).error(function (data) { Notification.push({content: data}); if (error) error(data); diff --git a/app/scripts/services/spinner-service.js b/app/scripts/services/spinner-service.js index 596aefa71c8..d8b99f5ff86 100644 --- a/app/scripts/services/spinner-service.js +++ b/app/scripts/services/spinner-service.js @@ -9,10 +9,50 @@ var spinner = angular.module('spinner.services', []); -spinner.factory('Spinner',function(){ - - var spinner = { - loading : false +spinner.factory('Spinner', function () { + var spinnerOpts = { + lines: 9, // The number of lines to draw + length: 7, // The length of each line + width: 7, // The line thickness + radius: 19, // The radius of the inner circle + corners: 1, // Corner roundness (0..1) + rotate: 0, // The rotation offset + direction: 1, // 1: clockwise, -1: counterclockwise + color: [ + 'rgb(0,0,0)', + 'rgb(255,102,0)' + ], // #rgb or #rrggbb or array of colors + speed: 1, // Rounds per second + trail: 60, // Afterglow percentage + shadow: false, // Whether to render a shadow + hwaccel: false, // Whether to use hardware acceleration + className: 'spinner', // The CSS class to assign to the spinner + zIndex: 2e9, // The z-index (defaults to 2000000000) + top: 'auto', // Top position relative to parent in px + left: 'auto' // Left position relative to parent in px }; + var spinner = new Spinner(spinnerOpts); +// $(document).ready(function () { +// var target = document.getElementById('spinner'); +// spinner.spin(target); +// spinner.stop(); +// }) + spinner.start = function () { + var target = document.getElementById('spinner'); + spinner.spin(target); + $("#spinner-container").addClass('spinner-start') + } + spinner.stopSpinner = function () { + spinner.stop(); + $("#spinner-container").removeClass('spinner-start'); + + } + spinner.startSpinnerPopup = function () { + var target = document.getElementById('spinner-popup'); + spinner.spin(target); + } + spinner.stopSpinnerPopup = function () { + spinner.stop(); + } return spinner; }); \ No newline at end of file diff --git a/app/scripts/widgets/widget.js b/app/scripts/widgets/widget.js index ae827fbbfd7..55d9191df68 100644 --- a/app/scripts/widgets/widget.js +++ b/app/scripts/widgets/widget.js @@ -380,15 +380,29 @@ Widget.directive('dtpicker', function () { return { restrict: 'A', require: 'ngModel', - link: function (scope, element, attr,ngModel) { + link: function (scope, element, attr, ngModel) { element.datetimepicker({ format: 'dd/MM/yyyy hh:mm:ss', language: 'en' }); - element.on('changeDate', function(e) { + element.on('changeDate', function (e) { ngModel.$setViewValue(e.date); }); } }; }); +Widget.directive('collaterender', function () { + + + return { + restrict: 'A', + link: function (scope, element, attr, ngModel) { + + var value = scope.result['collate']; + if (value == 'ci') { + scope.result['collate'] = 'Case Insensitive'; + } + } + }; +}); diff --git a/app/styles/main.css b/app/styles/main.css index 754dc1fe588..08d17d46816 100644 --- a/app/styles/main.css +++ b/app/styles/main.css @@ -228,6 +228,17 @@ form .required label:after { background-color: grey; opacity: .8; } +.spinner-start{ + text-align: center; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 1000; + background-color: #d3d3d3; + opacity: .4; +} .ajax-loader { position: absolute; @@ -238,6 +249,13 @@ form .required label:after { display: block; } +#spinner, .spinner, #spinner-popup, .spinner-popup { + position: absolute; + left: 50%; + top: 50%; +} + + .fade-hide, .fade-show { -webkit-transition: all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1s; -moz-transition: all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1s; @@ -407,6 +425,7 @@ ul.horizontallist, ol.horizontallist { table.editClass_panel { margin-left: 20px; } + table.editClass_panel>tbody>tr>td a { margin-left: 5px; } diff --git a/app/views/database/browse.html b/app/views/database/browse.html index 92af3f22823..12b295316f7 100644 --- a/app/views/database/browse.html +++ b/app/views/database/browse.html @@ -6,14 +6,27 @@
  • Ctrl + Space for sql autocomplete
  • + +
    - - - + + + - +
    + +
    + + + + +
    +
    @@ -24,7 +37,8 @@ - + +
    + - - - + + +
    diff --git a/app/views/database/newIndex.html b/app/views/database/newIndex.html index 94d74b1737b..7a6ca0cd1e8 100644 --- a/app/views/database/newIndex.html +++ b/app/views/database/newIndex.html @@ -13,6 +13,10 @@

    Index:{{newIndex['name']}}

    +
    +
    +
    +
    diff --git a/app/views/database/newProperty.html b/app/views/database/newProperty.html index 17f5c262456..4b8113dc34d 100644 --- a/app/views/database/newProperty.html +++ b/app/views/database/newProperty.html @@ -20,6 +20,10 @@

    Property: {{property['name']}}

    +
    +
    +
    +
    diff --git a/app/views/spinner.html b/app/views/spinner.html index aa3c863ea5b..82cc37680fa 100644 --- a/app/views/spinner.html +++ b/app/views/spinner.html @@ -1,3 +1 @@ -
    - -
    \ No newline at end of file +
    \ No newline at end of file