-
-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
52 changed files
with
3,202 additions
and
3,202 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
|
||
<div class="modal-header"> | ||
<h3 class="modal-title">Create</h3> | ||
<h3 class="modal-title">Create</h3> | ||
</div> | ||
|
||
<div class="modal-body"> | ||
<uib-alert type="danger" close="closeResponse()" ng-if="response.success === false"> | ||
{{response.message}} | ||
</uib-alert> | ||
<form name="actionCreateForm" ng-submit="create(action)"> | ||
<div class="form-group"> | ||
<label for="name">Name:</label> | ||
<input type="text" id="name" ng-model="action.name" aria-describedby="nameHelp" class="form-control"> | ||
<span class="help-block" id="nameHelp">Name of the action must match the following regexp <code>[A-z0-9\-\_]{3,64}</code></span> | ||
</div> | ||
<div class="form-group"> | ||
<label for="class">Class:</label> | ||
<select id="class" ng-model="action.class" ng-click="loadConfig()" ng-options="action.class as action.name for action in actions" aria-describedby="classHelp" class="form-control"> | ||
</select> | ||
<span class="help-block" id="classHelp">Action class which gets executed. Each action can provide aditional configuration parameters which are loaded if an class was selected</span> | ||
</div> | ||
<uib-alert type="danger" close="closeResponse()" ng-if="response.success === false"> | ||
{{response.message}} | ||
</uib-alert> | ||
<form name="actionCreateForm" ng-submit="create(action)"> | ||
<div class="form-group"> | ||
<label for="name">Name:</label> | ||
<input type="text" id="name" ng-model="action.name" aria-describedby="nameHelp" class="form-control"> | ||
<span class="help-block" id="nameHelp">Name of the action must match the following regexp <code>[A-z0-9\-\_]{3,64}</code></span> | ||
</div> | ||
<div class="form-group"> | ||
<label for="class">Class:</label> | ||
<select id="class" ng-model="action.class" ng-click="loadConfig()" ng-options="action.class as action.name for action in actions" aria-describedby="classHelp" class="form-control"> | ||
</select> | ||
<span class="help-block" id="classHelp">Action class which gets executed. Each action can provide aditional configuration parameters which are loaded if an class was selected</span> | ||
</div> | ||
|
||
<div id="config-form"></div> | ||
<div id="config-form"></div> | ||
|
||
<button type="submit" class="btn btn-primary">Save</button> | ||
<button type="button" ng-click="close()" class="btn btn-default">Cancel</button> | ||
</form> | ||
<button type="submit" class="btn btn-primary">Save</button> | ||
<button type="button" ng-click="close()" class="btn btn-default">Cancel</button> | ||
</form> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
|
||
<div class="modal-header"> | ||
<h3 class="modal-title">Delete</h3> | ||
<h3 class="modal-title">Delete</h3> | ||
</div> | ||
|
||
<div class="modal-body"> | ||
<uib-alert type="danger" close="closeResponse()" ng-if="response.success === false"> | ||
{{response.message}} | ||
</uib-alert> | ||
<form name="actionDeleteForm" ng-submit="delete(action)"> | ||
<input type="hidden" ng-model="action.id" value="{{action.id}}" /> | ||
<div class="form-group"> | ||
<label for="name">Name:</label> | ||
<input type="text" id="name" ng-model="action.name" ng-disabled="true" class="form-control" value="{{action.name}}"> | ||
</div> | ||
<button type="submit" class="btn btn-primary">Save</button> | ||
<button type="button" ng-click="close()" class="btn btn-default">Cancel</button> | ||
</form> | ||
<uib-alert type="danger" close="closeResponse()" ng-if="response.success === false"> | ||
{{response.message}} | ||
</uib-alert> | ||
<form name="actionDeleteForm" ng-submit="delete(action)"> | ||
<input type="hidden" ng-model="action.id" value="{{action.id}}" /> | ||
<div class="form-group"> | ||
<label for="name">Name:</label> | ||
<input type="text" id="name" ng-model="action.name" ng-disabled="true" class="form-control" value="{{action.name}}"> | ||
</div> | ||
<button type="submit" class="btn btn-primary">Save</button> | ||
<button type="button" ng-click="close()" class="btn btn-default">Cancel</button> | ||
</form> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
|
||
<div class="modal-header"> | ||
<h3 class="modal-title">Update</h3> | ||
<h3 class="modal-title">Update</h3> | ||
</div> | ||
|
||
<div class="modal-body"> | ||
<uib-alert type="danger" close="closeResponse()" ng-if="response.success === false"> | ||
{{response.message}} | ||
</uib-alert> | ||
<form name="actionUpdateForm" ng-submit="update(action)"> | ||
<input type="hidden" ng-model="action.id" value="{{action.id}}" /> | ||
<div class="form-group"> | ||
<label for="name">Name:</label> | ||
<input type="text" id="name" ng-model="action.name" aria-describedby="nameHelp" class="form-control"> | ||
<span class="help-block" id="nameHelp">Name of the action must match the following regexp <code>[A-z0-9\-\_]{3,64}</code></span> | ||
</div> | ||
<div class="form-group"> | ||
<label for="class">Class:</label> | ||
<input type="text" id="class" ng-model="action.class" class="form-control" value="{{action.class}}" disabled="disabled" aria-describedby="classHelp"> | ||
<span class="help-block" id="classHelp">Action class which gets executed</span> | ||
</div> | ||
<uib-alert type="danger" close="closeResponse()" ng-if="response.success === false"> | ||
{{response.message}} | ||
</uib-alert> | ||
<form name="actionUpdateForm" ng-submit="update(action)"> | ||
<input type="hidden" ng-model="action.id" value="{{action.id}}" /> | ||
<div class="form-group"> | ||
<label for="name">Name:</label> | ||
<input type="text" id="name" ng-model="action.name" aria-describedby="nameHelp" class="form-control"> | ||
<span class="help-block" id="nameHelp">Name of the action must match the following regexp <code>[A-z0-9\-\_]{3,64}</code></span> | ||
</div> | ||
<div class="form-group"> | ||
<label for="class">Class:</label> | ||
<input type="text" id="class" ng-model="action.class" class="form-control" value="{{action.class}}" disabled="disabled" aria-describedby="classHelp"> | ||
<span class="help-block" id="classHelp">Action class which gets executed</span> | ||
</div> | ||
|
||
<div id="config-form"></div> | ||
<div id="config-form"></div> | ||
|
||
<button type="submit" class="btn btn-primary">Save</button> | ||
<button type="button" ng-click="close()" class="btn btn-default">Cancel</button> | ||
</form> | ||
<button type="submit" class="btn btn-primary">Save</button> | ||
<button type="button" ng-click="close()" class="btn btn-default">Cancel</button> | ||
</form> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,97 +1,97 @@ | ||
'use strict'; | ||
|
||
var fusioApp = angular.module('fusioApp', [ | ||
'ngRoute', | ||
'ngSanitize', | ||
'ui.bootstrap', | ||
'ui.ace', | ||
'chart.js', | ||
'ng-showdown', | ||
'fusioApp.account', | ||
'fusioApp.action', | ||
'fusioApp.app', | ||
'fusioApp.config', | ||
'fusioApp.connection', | ||
'fusioApp.dashboard', | ||
'fusioApp.database', | ||
'fusioApp.import', | ||
'fusioApp.log', | ||
'fusioApp.login', | ||
'fusioApp.logout', | ||
'fusioApp.routes', | ||
'fusioApp.schema', | ||
'fusioApp.scope', | ||
'fusioApp.statistic', | ||
'fusioApp.user' | ||
'ngRoute', | ||
'ngSanitize', | ||
'ui.bootstrap', | ||
'ui.ace', | ||
'chart.js', | ||
'ng-showdown', | ||
'fusioApp.account', | ||
'fusioApp.action', | ||
'fusioApp.app', | ||
'fusioApp.config', | ||
'fusioApp.connection', | ||
'fusioApp.dashboard', | ||
'fusioApp.database', | ||
'fusioApp.import', | ||
'fusioApp.log', | ||
'fusioApp.login', | ||
'fusioApp.logout', | ||
'fusioApp.routes', | ||
'fusioApp.schema', | ||
'fusioApp.scope', | ||
'fusioApp.statistic', | ||
'fusioApp.user' | ||
]); | ||
|
||
fusioApp.value('version', 'v0.3'); | ||
|
||
fusioApp.factory('fusioIsAuthenticated', ['$location', '$window', '$q', function($location, $window, $q) { | ||
return { | ||
responseError: function(response){ | ||
if (response.status == 400 && response.data.message && response.data.message.indexOf('Invalid access token') !== -1) { | ||
$window.sessionStorage.removeItem('fusio_access_token'); | ||
return { | ||
responseError: function(response){ | ||
if (response.status == 400 && response.data.message && response.data.message.indexOf('Invalid access token') !== -1) { | ||
$window.sessionStorage.removeItem('fusio_access_token'); | ||
|
||
$location.path('/login'); | ||
} | ||
$location.path('/login'); | ||
} | ||
|
||
return $q.reject(response); | ||
} | ||
}; | ||
return $q.reject(response); | ||
} | ||
}; | ||
}]); | ||
|
||
fusioApp.config(['$routeProvider', function($routeProvider){ | ||
$routeProvider. | ||
otherwise({ | ||
redirectTo: '/dashboard' | ||
}); | ||
$routeProvider. | ||
otherwise({ | ||
redirectTo: '/dashboard' | ||
}); | ||
}]); | ||
|
||
fusioApp.config(['$httpProvider', function($httpProvider) { | ||
$httpProvider.interceptors.push('fusioIsAuthenticated'); | ||
$httpProvider.interceptors.push('fusioIsAuthenticated'); | ||
}]); | ||
|
||
fusioApp.config(['$showdownProvider', function($showdownProvider){ | ||
}]); | ||
|
||
fusioApp.run(function ($rootScope, $window, $location, $http, helpLoader, version) { | ||
var token = $window.sessionStorage.getItem('fusio_access_token'); | ||
if (token) { | ||
$http.defaults.headers.common['Authorization'] = 'Bearer ' + token; | ||
var token = $window.sessionStorage.getItem('fusio_access_token'); | ||
if (token) { | ||
$http.defaults.headers.common['Authorization'] = 'Bearer ' + token; | ||
|
||
angular.element(document.querySelector('body')).removeClass('fusio-hidden'); | ||
} else { | ||
$location.path('/login'); | ||
} | ||
angular.element(document.querySelector('body')).removeClass('fusio-hidden'); | ||
} else { | ||
$location.path('/login'); | ||
} | ||
|
||
// make help loader global available | ||
$rootScope.help = helpLoader; | ||
// make help loader global available | ||
$rootScope.help = helpLoader; | ||
|
||
// set version | ||
$rootScope.version = version; | ||
// set version | ||
$rootScope.version = version; | ||
}); | ||
|
||
/** | ||
* Simple helper function to guess the API endpoint url | ||
*/ | ||
function guessFusioEndpointUrl() { | ||
var url = window.location.href; | ||
var removePart = function(url, sign) { | ||
var count = (url.match(/\//g) || []).length; | ||
var pos = url.lastIndexOf(sign); | ||
if (count > 2 && pos !== -1) { | ||
return url.substring(0, pos); | ||
} | ||
return url; | ||
} | ||
var parts = ['#', '?', '/']; | ||
for (var i = 0; i < parts.length; i++) { | ||
url = removePart(url, parts[i]); | ||
} | ||
return url + '/index.php/'; | ||
var url = window.location.href; | ||
var removePart = function(url, sign) { | ||
var count = (url.match(/\//g) || []).length; | ||
var pos = url.lastIndexOf(sign); | ||
if (count > 2 && pos !== -1) { | ||
return url.substring(0, pos); | ||
} | ||
return url; | ||
}; | ||
var parts = ['#', '?', '/']; | ||
for (var i = 0; i < parts.length; i++) { | ||
url = removePart(url, parts[i]); | ||
} | ||
return url + '/index.php/'; | ||
} | ||
|
||
if (typeof fusio_url === 'undefined') { | ||
var fusio_url = guessFusioEndpointUrl(); | ||
var fusio_url = guessFusioEndpointUrl(); | ||
} |
Oops, something went wrong.