Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit e41d2b9

Browse files
BoykoAlexghillert
authored andcommitted
Bulk Define Tasks UI and Validation
* There is a new bulk define tasks action on the tasks>definitions page which opens a new dialog for entering task definitions * The parser service, previously only used for streams has been moved to the 'shared' area because it is now also used for task parsing too * There is a new controller for the bulk define tasks page. The page is basically one big text box. * When data is entered the new validation service is called to check the syntax of the text and whether the tasks named in the textbox actually exist on the server. * The validation service feeds back errors to the dialog page (asynchronously) which indicates how many problems there are and by clicking the errors count or scrolling the textbox you can quickly find them (they are highlighted in the textbox). * There are a several tests for the new uses of the parser (for parsing tasks) and the validation service.
1 parent 57e5da2 commit e41d2b9

26 files changed

+2227
-1130
lines changed

ui/app/scripts/routes.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,15 @@ define(['./app'], function (dashboard) {
284284
authenticate: true,
285285
feature: 'tasksEnabled'
286286
}
287+
})
288+
.state('home.tasks.bulkDefineTasks', {
289+
url : 'tasks/bulk-define-tasks',
290+
templateUrl : taskTemplatesPath + '/bulk-define-tasks.html',
291+
controller: 'BulkDefineTasksController',
292+
data:{
293+
authenticate: true,
294+
feature: 'tasksEnabled'
295+
}
287296
})
288297
.state('home.tasks.deploymentsLaunch', {
289298
url: 'tasks/definitions/launch/{taskName}',

ui/app/scripts/shared/services.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@
1919
*
2020
* @author Ilayaperumal Gopinathan
2121
*/
22-
define(['angular', 'xregexp'], function (angular) {
22+
define(function (require) {
2323
'use strict';
2424

25+
var angular = require('angular');
26+
require('xregexp');
27+
2528
return angular.module('dataflowShared.services', [])
2629
.factory('DataflowUtils', function ($log, growl, $timeout, $q, $rootScope) {
2730

@@ -57,6 +60,7 @@ define(['angular', 'xregexp'], function (angular) {
5760
}
5861
};
5962
})
63+
.factory('ParserService',require('shared/services/parser'))
6064
.factory('dataflowVersionInfo', function ($resource, $rootScope, DataflowUtils) {
6165
console.log('dataflowVersionInfo');
6266
var dataflowVersionInfoPromise = $resource($rootScope.dataflowServerUrl + '/management/info', {}, {

0 commit comments

Comments
 (0)