Skip to content

Utility functions frontend + #155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 55 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
156ae5e
Replaced first ontotext call with the swagger api
havahol Feb 12, 2016
49369ed
Sat up new view with attached controller
havahol Feb 12, 2016
c844787
Added switch
havahol Feb 12, 2016
d8cfc0e
Playing with metadata
havahol Feb 15, 2016
de974eb
Made switch with different utility functions
havahol Feb 16, 2016
b694d66
Messy hack to show public utility functions only
havahol Feb 16, 2016
083d052
Successfully duplicated view - content missing
havahol Feb 17, 2016
1368b0e
Updated listing of utility functions along more info from server
havahol Feb 17, 2016
8ba2112
Refactoring
havahol Feb 17, 2016
ce18521
Display clojure of selected utility function
havahol Feb 17, 2016
df65113
utility function list change on switch switching
havahol Feb 17, 2016
4735845
Removed a few lists
havahol Feb 17, 2016
c41814e
Added switch showing that a function is public or not
havahol Feb 17, 2016
439655d
Added clojure code and public/private symbol
havahol Feb 18, 2016
87ce4d2
Fixed on the view
havahol Feb 18, 2016
60766fd
cleaning up in some of the code
havahol Feb 18, 2016
2ef138f
Added discard changes and tooltips
havahol Feb 19, 2016
0657fd5
Deleting actually deletes
havahol Feb 19, 2016
b3abc0a
Added confirm/abort buttons on delete
havahol Feb 19, 2016
af6984c
Implemented discard changes
havahol Feb 19, 2016
6617c41
Working, but meh, version of change publicity...
havahol Feb 19, 2016
6ef0c8e
Implemented save changes
havahol Feb 19, 2016
5b4c622
Playing with metadata for transformations
havahol Mar 2, 2016
eff5984
Sending text/plain for metadata POST
havahol Mar 2, 2016
edab0a8
More meta data functions
havahol Mar 2, 2016
b8dfc17
Finalized metadata for transformation with PUT w.o. key
havahol Mar 2, 2016
3fe630b
Added configurations along with some tests in havahol view
havahol Mar 2, 2016
8910a93
configuration for queriable data and utility functions
havahol Mar 3, 2016
ffe6634
metadata for utility functions and queriable data stores
havahol Mar 3, 2016
d107c07
config and metadata for data distribtions
havahol Mar 3, 2016
0ec738d
Updated instructions on how to refactor the utility function controller
havahol Mar 3, 2016
22b87de
Refactoring - updated list
havahol Mar 4, 2016
3a92f48
Refactoring - selectedUF works
havahol Mar 4, 2016
6e33942
Refactoring - fixed change publicity and delete
havahol Mar 4, 2016
787b427
Refactoring - Fixed save changes
havahol Mar 4, 2016
1e99387
save clojure code works
havahol Mar 14, 2016
c67b7b8
Brought back discard changes button
havahol Mar 14, 2016
a124776
Adding new locally and changing publicity
havahol Mar 15, 2016
6dd33cb
Deleting locally only for new UFs and some refactoring
havahol Mar 15, 2016
017b6f4
Stores new entry on the server (though with a hack)
havahol Mar 15, 2016
8338cb4
Minor refactoring
havahol Mar 15, 2016
ffe0260
Fixed the color and icon of private and public
havahol Mar 15, 2016
17266be
Binding function name to name inside code
havahol Mar 15, 2016
8ac1a6e
Replace material design with font awesome
havahol Mar 15, 2016
3123841
Added settings to the code mirror
havahol Mar 16, 2016
5b2daa6
Moved the utilityfunction dialog to the proper place
havahol Mar 16, 2016
755d38e
Removed non-relevant code
havahol Mar 16, 2016
ccb42fa
Added watchers on the switches
havahol Mar 16, 2016
b4d8812
Better system for logging
havahol Mar 16, 2016
53b7e12
cleaned up some css mess
havahol Mar 16, 2016
fff9955
Updated configuration.clojure to configuration.code
havahol Mar 18, 2016
833c712
Turning off debug mode
havahol Mar 18, 2016
899b1bd
Merge branch 'master' into usingSwaggerAPI
havahol Mar 18, 2016
66f5e01
Automagical username¨
havahol Mar 18, 2016
d1c7c68
Swagger client jar and compiler for windows
havahol Apr 1, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<meta name="msapplication-TileColor" content="#00e756">
<meta name="msapplication-TileImage" content="/mstile-144x144.png">


<!-- build:css(.) styles/vendor.css -->
<!-- bower:css -->
<link rel="stylesheet" href="bower_components/angular-ui-grid/ui-grid.css" />
Expand Down Expand Up @@ -93,6 +94,7 @@

<!-- build:js({.tmp,app}) scripts/scripts.js -->
<script src="scripts/app.js"></script>
<script src="swagger/datagraftClient/API/Client/DefaultApi.js"></script>
<script src="scripts/controllers/transformations.js"></script>
<script src="scripts/controllers/actions.js"></script>
<script src="scripts/controllers/transformation.js"></script>
Expand Down Expand Up @@ -167,6 +169,9 @@
<script src="scripts/directives/removenode.js"></script>
<script src="scripts/directives/showhidedocumentation.js"></script>
<script src="scripts/controllers/readonly.js"></script>
<script src="scripts/services/datagraftapi.js"></script>
<script src="scripts/controllers/utilityfunctions.js"></script>
<!-- endbuild -->
</body>

</html>
70 changes: 44 additions & 26 deletions app/scripts/controllers/transformation.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ angular.module('grafterizerApp')
$scope,
$stateParams,
ontotextAPI,
dataGraftApi,
uploadFile,
$rootScope,
$state,
Expand Down Expand Up @@ -401,14 +402,16 @@ angular.module('grafterizerApp')
$scope.loading = true;
$rootScope.readonlymode = true;

// setTimeout(function() {
ontotextAPI.transformation(id).success(function(data) {
$scope.loading = false;
$rootScope.readonlymode = $state.is('transformations.readonly');
$scope.document = data;
$scope.document.title = data['dct:title'];
$scope.document.description = data['dct:description'];
$scope.document.keywords = data['dcat:keyword'];
// setTimeout(function() {
ontotextAPI.transformation(id).success(function(data) {
//dataGraftApi.getTransformation("comeonnn").success(function(data) {
//dataGraftApi.getTransformation(id).success(function(data) {
$scope.loading = false;
$rootScope.readonlymode = $state.is('transformations.readonly');
$scope.document = data;
$scope.document.title = data['dct:title'];
$scope.document.description = data['dct:description'];
$scope.document.keywords = data['dcat:keyword'];

if (!$scope.document.keywords ||
typeof $scope.document.keywords.length === 'undefined') {
Expand Down Expand Up @@ -647,25 +650,40 @@ angular.module('grafterizerApp')
function() {
angular.copy($scope.originalPrefixers, $scope.transformation.prefixers);
});
};

$scope.defineCustomFunctions = function() {
$scope.originalCustomFunctionDeclarations = [];
angular.copy($scope.transformation.customFunctionDeclarations, $scope
.originalCustomFunctionDeclarations);
$mdDialog.show({
templateUrl: 'views/createcustomfunction.html',
controller: 'CustomfunctionsdialogcontrollerCtrl',
scope: $scope.$new(false, $scope),
clickOutsideToClose: true
}).then(
function() {},
};

// This function should open the dialog box and set controller for it.
// Let's try to use the same controller as we're already in :)
$scope.defineUtilityFunctions = function() {
//$scope.originalCustomFunctionDeclarations = [];
//angular.copy($scope.transformation.customFunctionDeclarations, $scope
// .originalCustomFunctionDeclarations);
$mdDialog.show({
templateUrl: 'views/utilityfunctiondialog.html',
controller: 'UtilityFunctionsCtrl',
scope: $scope.$new(false, $scope),
clickOutsideToClose: true
}).then(
function() {});//,
};

$scope.defineCustomFunctions = function() {
$scope.originalCustomFunctionDeclarations = [];
angular.copy($scope.transformation.customFunctionDeclarations, $scope
.originalCustomFunctionDeclarations);
$mdDialog.show({
templateUrl: 'views/createcustomfunction.html',
controller: 'CustomfunctionsdialogcontrollerCtrl',
scope: $scope.$new(false, $scope),
clickOutsideToClose: true
}).then(
function() {},

function() {
angular.copy($scope.originalCustomFunctionDeclarations, $scope.transformation
.customFunctionDeclarations);
});
};
function() {
angular.copy($scope.originalCustomFunctionDeclarations, $scope.transformation
.customFunctionDeclarations);
});
};

$scope.loadDistribution = function() {
$mdDialog.show({
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/controllers/transformations.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

angular.module('grafterizerApp')
.controller('TransformationsCtrl', function($scope, ontotextAPI, $state) {
.controller('TransformationsCtrl', function($scope, ontotextAPI, dataGraftApi, $state) {

var showTransformations = function(data) {
$scope.transformations = data['dcat:record'].reverse();
Expand Down
Loading