diff --git a/CHANGELOG.md b/CHANGELOG.md index c9ac65caa..d73a2c555 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ +## [0.7.3] +###### 2018-03-14 + +### Fixed +* Bug where NO_CONTENT return codes were failing on Werkzeug WSGI 0.14 + +### Changed +* All node modules are now bundled into webpack + + ## [0.7.2] ###### 2018-03-12 diff --git a/appveyor.yml b/appveyor.yml index 38002c5dc..de589b429 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 0.7.2.{build} +version: 0.7.3.{build} branches: only: diff --git a/walkoff/__init__.py b/walkoff/__init__.py index 30ba0559c..55e7059fb 100644 --- a/walkoff/__init__.py +++ b/walkoff/__init__.py @@ -1,4 +1,4 @@ -__version__ = '0.7.2' +__version__ = '0.7.3' def initialize_databases(): diff --git a/walkoff/client/package.json b/walkoff/client/package.json index e8dc52eb7..58b999988 100644 --- a/walkoff/client/package.json +++ b/walkoff/client/package.json @@ -66,7 +66,6 @@ "jqueryui": "~1.11.1", "json-editor": "~0.7.28", "jstree": "~3.3.4", - "lodash": "~4.17.4", "moment": "~2.20.1", "ng-pick-datetime": "~4.3.2", "ng2-dnd": "^4.2.0", diff --git a/walkoff/client/src/cases/cases.component.ts b/walkoff/client/src/cases/cases.component.ts index 98694342a..b6e0e9825 100644 --- a/walkoff/client/src/cases/cases.component.ts +++ b/walkoff/client/src/cases/cases.component.ts @@ -7,6 +7,7 @@ import { Select2OptionData } from 'ng2-select2'; import 'rxjs/add/operator/debounceTime'; import { CasesService } from './cases.service'; +import { UtilitiesService } from '../utilities.service'; import { CasesModalComponent } from './cases.modal.component'; @@ -31,7 +32,7 @@ interface ICaseHierarchy { styleUrls: [ './cases.css', ], - providers: [CasesService], + providers: [CasesService, UtilitiesService], }) export class CasesComponent implements OnInit { cases: Case[] = []; @@ -115,6 +116,7 @@ export class CasesComponent implements OnInit { constructor( private casesService: CasesService, private modalService: NgbModal, private toastyService: ToastyService, private toastyConfig: ToastyConfig, + private utils: UtilitiesService, ) {} ngOnInit(): void { @@ -214,7 +216,7 @@ export class CasesComponent implements OnInit { modalRef.componentInstance.submitText = 'Add Case'; modalRef.componentInstance.workingCase = new Case(); modalRef.componentInstance.availableSubscriptions = this.availableSubscriptions; - modalRef.componentInstance.subscriptionTree = _.cloneDeep(this.subscriptionTree); + modalRef.componentInstance.subscriptionTree = this.utils.cloneDeep(this.subscriptionTree); this._handleModalClose(modalRef); } @@ -226,10 +228,10 @@ export class CasesComponent implements OnInit { const modalRef = this.modalService.open(CasesModalComponent, { windowClass: 'casesModal' }); modalRef.componentInstance.title = `Edit Case: ${caseToEdit.name}`; modalRef.componentInstance.submitText = 'Save Changes'; - modalRef.componentInstance.workingCase = _.cloneDeep(caseToEdit); + modalRef.componentInstance.workingCase = this.utils.cloneDeep(caseToEdit); delete modalRef.componentInstance.workingCase.$$index; modalRef.componentInstance.availableSubscriptions = this.availableSubscriptions; - modalRef.componentInstance.subscriptionTree = _.cloneDeep(this.subscriptionTree); + modalRef.componentInstance.subscriptionTree = this.utils.cloneDeep(this.subscriptionTree); this._handleModalClose(modalRef); } diff --git a/walkoff/client/src/main.ts b/walkoff/client/src/main.ts index 95852926c..20b5e5560 100644 --- a/walkoff/client/src/main.ts +++ b/walkoff/client/src/main.ts @@ -3,6 +3,20 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { MainModule } from './main.module'; +// Import global JS packages +import 'jquery'; +import 'bootstrap'; +import 'select2'; + +// Import global CSS packages +import 'bootstrap/dist/css/bootstrap.min.css'; +import '@swimlane/ngx-datatable/release/index.css'; +import '@swimlane/ngx-datatable/release/themes/material.css'; +import '@swimlane/ngx-datatable/release/assets/icons.css'; +import 'font-awesome/css/font-awesome.min.css'; +import 'ng2-toasty/style-bootstrap.css'; +import 'select2/dist/css/select2.min.css'; + document.addEventListener('DOMContentLoaded', event => { if (sessionStorage.getItem('refresh_token')) { //TODO: figure out a good way of handling this diff --git a/walkoff/client/src/main/main.css b/walkoff/client/src/main/main.css index 2cbca7fe1..227c925d4 100644 --- a/walkoff/client/src/main/main.css +++ b/walkoff/client/src/main/main.css @@ -1,6 +1,10 @@ -@import '/client/node_modules/@swimlane/ngx-datatable/release/index.css'; -@import '/client/node_modules/@swimlane/ngx-datatable/release/themes/material.css'; -@import '/client/node_modules/@swimlane/ngx-datatable/release/assets/icons.css'; +/* @import '~@swimlane/ngx-datatable/release/index.css'; +@import '~@swimlane/ngx-datatable/release/themes/material.css'; +@import '~@swimlane/ngx-datatable/release/assets/icons.css'; +@import '~bootstrap/dist/css/bootstrap.min.css'; +@import '~font-awesome/css/font-awesome.min.css'; +@import '~ng2-toasty/style-bootstrap.css'; +@import '~select2/dist/css/select2.min.css'; */ /* h1 { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, sans-serif; diff --git a/walkoff/client/src/playbook/playbook.component.ts b/walkoff/client/src/playbook/playbook.component.ts index 86860b80d..c57f53d36 100644 --- a/walkoff/client/src/playbook/playbook.component.ts +++ b/walkoff/client/src/playbook/playbook.component.ts @@ -8,6 +8,13 @@ import 'rxjs/Rx'; import { saveAs } from 'file-saver'; import { plainToClass } from 'class-transformer'; +import * as cytoscape from 'cytoscape'; +import * as clipboard from 'cytoscape-clipboard'; +import * as edgehandles from 'cytoscape-edgehandles'; +import * as gridGuide from 'cytoscape-grid-guide'; +import * as panzoom from 'cytoscape-panzoom'; +import * as undoRedo from 'cytoscape-undo-redo'; + import { PlaybookService } from './playbook.service'; import { AuthService } from '../auth/auth.service'; import { UtilitiesService } from '../utilities.service'; @@ -37,6 +44,8 @@ import { ActionStatusEvent } from '../models/execution/actionStatusEvent'; templateUrl: './playbook.html', styleUrls: [ './playbook.css', + '../../node_modules/cytoscape-panzoom/cytoscape.js-panzoom.css', + '../../node_modules/ng2-dnd/bundles/style.css', ], encapsulation: ViewEncapsulation.None, providers: [PlaybookService, AuthService, UtilitiesService], @@ -112,6 +121,13 @@ export class PlaybookComponent implements OnInit, AfterViewChecked, OnDestroy { ngOnInit(): void { this.toastyConfig.theme = 'bootstrap'; + const cyDummy = cytoscape(); + if (!cyDummy.clipboard) { clipboard(cytoscape, $); } + if (!cyDummy.edgehandles) { cytoscape.use(edgehandles); } + if (!cyDummy.gridGuide) { cytoscape.use(gridGuide); } + if (!cyDummy.panzoom) { cytoscape.use(panzoom); } + if (!cyDummy.undoRedo) { cytoscape.use(undoRedo); } + this.playbookService.getDevices().then(devices => this.devices = devices); this.playbookService.getApis().then(appApis => this.appApis = appApis.sort((a, b) => a.name > b.name ? 1 : -1)); this.getActionStatusSSE(); @@ -509,7 +525,7 @@ export class PlaybookComponent implements OnInit, AfterViewChecked, OnDestroy { }); const nodes = this.loadedWorkflow.actions.map(action => { - const node: any = { group: 'nodes', position: _.clone(action.position) }; + const node: any = { group: 'nodes', position: this.utils.cloneDeep(action.position) }; node.data = { id: action.id, _id: action.id, @@ -569,7 +585,7 @@ export class PlaybookComponent implements OnInit, AfterViewChecked, OnDestroy { // Clone the loadedWorkflow first, so we don't change the parameters // in the editor when converting it to the format the backend expects. - const workflowToSave: Workflow = _.cloneDeep(this.loadedWorkflow); + const workflowToSave: Workflow = this.utils.cloneDeep(this.loadedWorkflow); if (!workflowToSave.start) { this.toastyService.warning('Workflow cannot be saved without a starting action.'); @@ -600,7 +616,7 @@ export class PlaybookComponent implements OnInit, AfterViewChecked, OnDestroy { savePromise = this.playbookService.newWorkflow(this.loadedPlaybook.id, workflowToSave); } } else { - const playbookToSave: Playbook = _.cloneDeep(this.loadedPlaybook); + const playbookToSave: Playbook = this.utils.cloneDeep(this.loadedPlaybook); playbookToSave.workflows = [workflowToSave]; savePromise = this.playbookService.newPlaybook(playbookToSave) .then(newPlaybook => { @@ -1060,7 +1076,7 @@ export class PlaybookComponent implements OnInit, AfterViewChecked, OnDestroy { newNodes.forEach((n: any) => { // Get a copy of the action we just copied - const pastedAction: Action = _.clone(this.loadedWorkflow.actions.find(a => a.id === n.data('_id'))); + const pastedAction: Action = this.utils.cloneDeep(this.loadedWorkflow.actions.find(a => a.id === n.data('_id'))); const newActionUuid = UUID.UUID(); diff --git a/walkoff/client/src/playbook/playbook.css b/walkoff/client/src/playbook/playbook.css index 7ac1a30ab..e1f8ebfd1 100644 --- a/walkoff/client/src/playbook/playbook.css +++ b/walkoff/client/src/playbook/playbook.css @@ -1,5 +1,5 @@ -@import '/client/node_modules/cytoscape-panzoom/cytoscape.js-panzoom.css'; -@import '/client/node_modules/ng2-dnd/bundles/style.css'; +/* @import '/client/node_modules/cytoscape-panzoom/cytoscape.js-panzoom.css'; +@import '/client/node_modules/ng2-dnd/bundles/style.css'; */ #main.playbookMain { padding: 10px 15px 0 15px; diff --git a/walkoff/client/src/playbook/playbook.d.ts b/walkoff/client/src/playbook/playbook.d.ts index 35e4798c8..e15107ae4 100644 --- a/walkoff/client/src/playbook/playbook.d.ts +++ b/walkoff/client/src/playbook/playbook.d.ts @@ -1,7 +1,6 @@ -declare var cytoscape: any; +declare module 'cytoscape'; declare module 'cytoscape-clipboard'; declare module 'cytoscape-edgehandles'; declare module 'cytoscape-grid-guide'; declare module 'cytoscape-panzoom'; declare module 'cytoscape-undo-redo'; -declare var _: any; diff --git a/walkoff/client/src/polyfills.ts b/walkoff/client/src/polyfills.ts index 08a3d9c79..cc3f3f8a0 100644 --- a/walkoff/client/src/polyfills.ts +++ b/walkoff/client/src/polyfills.ts @@ -27,6 +27,7 @@ import 'zone.js/dist/zone'; import 'event-source-polyfill'; import 'reflect-metadata'; + // if ('production' === ENV) { // // Production // } else { diff --git a/walkoff/client/src/scheduler/scheduler.component.ts b/walkoff/client/src/scheduler/scheduler.component.ts index 1f1fc16cb..dace76c52 100644 --- a/walkoff/client/src/scheduler/scheduler.component.ts +++ b/walkoff/client/src/scheduler/scheduler.component.ts @@ -9,6 +9,7 @@ import 'rxjs/add/operator/debounceTime'; import { SchedulerModalComponent } from './scheduler.modal.component'; import { SchedulerService } from './scheduler.service'; +import { UtilitiesService } from '../utilities.service'; import { ScheduledTask } from '../models/scheduler/scheduledTask'; @@ -17,9 +18,10 @@ import { ScheduledTask } from '../models/scheduler/scheduledTask'; templateUrl: './scheduler.html', styleUrls: [ './scheduler.css', + '../../node_modules/ng-pick-datetime/styles/picker.min.css', ], encapsulation: ViewEncapsulation.None, - providers: [SchedulerService], + providers: [SchedulerService, UtilitiesService], }) export class SchedulerComponent implements OnInit { schedulerStatus: string; @@ -32,6 +34,7 @@ export class SchedulerComponent implements OnInit { constructor( private schedulerService: SchedulerService, private modalService: NgbModal, private toastyService: ToastyService, private toastyConfig: ToastyConfig, + private utils: UtilitiesService, ) {} /** @@ -120,7 +123,7 @@ export class SchedulerComponent implements OnInit { modalRef.componentInstance.title = `Edit Task ${task.name}`; modalRef.componentInstance.submitText = 'Save Changes'; modalRef.componentInstance.availableWorkflows = this.availableWorkflows; - modalRef.componentInstance.workingScheduledTask = _.cloneDeep(task); + modalRef.componentInstance.workingScheduledTask = this.utils.cloneDeep(task); delete modalRef.componentInstance.workingScheduledTask.$$index; this._handleModalClose(modalRef); diff --git a/walkoff/client/src/scheduler/scheduler.css b/walkoff/client/src/scheduler/scheduler.css index cd273a462..6a12b80f2 100644 --- a/walkoff/client/src/scheduler/scheduler.css +++ b/walkoff/client/src/scheduler/scheduler.css @@ -1,4 +1,4 @@ -@import '/client/node_modules/ng-pick-datetime/styles/picker.min.css'; +/* @import '/client/node_modules/ng-pick-datetime/styles/picker.min.css'; */ .schedulerMain { padding: 10px 15px; diff --git a/walkoff/client/src/settings/settings.css b/walkoff/client/src/settings/settings.css index a4b9e92ce..3175f7bd1 100644 --- a/walkoff/client/src/settings/settings.css +++ b/walkoff/client/src/settings/settings.css @@ -1,7 +1,3 @@ -/*@import '/client/node_modules/@swimlane/ngx-datatable/release/index.css'; -@import '/client/node_modules/@swimlane/ngx-datatable/release/themes/material.css'; -@import '/client/node_modules/@swimlane/ngx-datatable/release/assets/icons.css';*/ - .settingsMain { padding: 10px 15px; } diff --git a/walkoff/client/src/settings/settings.roles.component.ts b/walkoff/client/src/settings/settings.roles.component.ts index af51994ec..09ea385e5 100644 --- a/walkoff/client/src/settings/settings.roles.component.ts +++ b/walkoff/client/src/settings/settings.roles.component.ts @@ -5,6 +5,7 @@ import { ToastyService, ToastyConfig } from 'ng2-toasty'; import 'rxjs/add/operator/debounceTime'; import { SettingsService } from './settings.service'; +import { UtilitiesService } from '../utilities.service'; import { SettingsRoleModalComponent } from './settings.roles.modal.component'; @@ -19,7 +20,7 @@ import { GenericObject } from '../models/genericObject'; './settings.css', ], encapsulation: ViewEncapsulation.None, - providers: [SettingsService], + providers: [SettingsService, UtilitiesService], }) export class SettingsRolesComponent { availableResourceActions: AvailableResourceAction[] = []; @@ -31,6 +32,7 @@ export class SettingsRolesComponent { constructor( private settingsService: SettingsService, private modalService: NgbModal, private toastyService: ToastyService, private toastyConfig: ToastyConfig, + private utils: UtilitiesService, ) { this.toastyConfig.theme = 'bootstrap'; @@ -80,7 +82,7 @@ export class SettingsRolesComponent { modalRef.componentInstance.title = `Edit Role: ${role.name}`; modalRef.componentInstance.submitText = 'Save Changes'; modalRef.componentInstance.availableResourceActions = this.availableResourceActions; - modalRef.componentInstance.workingRole = _.cloneDeep(role); + modalRef.componentInstance.workingRole = this.utils.cloneDeep(role); this._handleModalClose(modalRef); } diff --git a/walkoff/client/src/settings/settings.roles.modal.component.ts b/walkoff/client/src/settings/settings.roles.modal.component.ts index bc9c178db..860d57739 100644 --- a/walkoff/client/src/settings/settings.roles.modal.component.ts +++ b/walkoff/client/src/settings/settings.roles.modal.component.ts @@ -4,6 +4,7 @@ import { ToastyService, ToastyConfig } from 'ng2-toasty'; import { Select2OptionData } from 'ng2-select2'; import { SettingsService } from './settings.service'; +import { UtilitiesService } from '../utilities.service'; import { Role } from '../models/role'; import { AvailableResourceAction } from '../models/availableResourceAction'; @@ -15,7 +16,7 @@ import { Resource } from '../models/resource'; styleUrls: [ './settings.css', ], - providers: [SettingsService], + providers: [SettingsService, UtilitiesService], }) export class SettingsRoleModalComponent { @Input() workingRole: Role; @@ -32,6 +33,7 @@ export class SettingsRoleModalComponent { constructor( private settingsService: SettingsService, private activeModal: NgbActiveModal, private toastyService: ToastyService, private toastyConfig: ToastyConfig, + private utils: UtilitiesService, ) { this.toastyConfig.theme = 'bootstrap'; @@ -109,7 +111,7 @@ export class SettingsRoleModalComponent { return; } - const toSubmit: Role = _.cloneDeep(this.workingRole); + const toSubmit: Role = this.utils.cloneDeep(this.workingRole); // Remove temp Ids for new resources toSubmit.resources.forEach(resource => { diff --git a/walkoff/client/webpack.common.js b/walkoff/client/webpack.common.js index fbee0b16f..7ab91372e 100644 --- a/walkoff/client/webpack.common.js +++ b/walkoff/client/webpack.common.js @@ -19,6 +19,7 @@ const CheckerPlugin = require('awesome-typescript-loader').CheckerPlugin; // const LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin'); // const ScriptExtHtmlWebpackPlugin = require('script-ext-html-webpack-plugin'); // const ngcWebpack = require('ngc-webpack'); +const ProvidePlugin = require('webpack/lib/ProvidePlugin') /** * Webpack Constants @@ -83,7 +84,7 @@ module.exports = function (options) { }, { test: /\.css$/, - use: ['to-string-loader', 'css-loader'], + use: ['to-string-loader', 'style-loader', 'css-loader'], exclude: [helpers.root('styles')] }, { @@ -101,8 +102,15 @@ module.exports = function (options) { use: 'file-loader' }, { - test: /\.(eot|woff2?|svg|ttf)([\?]?.*)$/, - use: 'file-loader' + test: /.(ttf|otf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/, + use: [{ + loader: 'file-loader', + options: { + name: '[name].[ext]', + // outputPath: 'dist/', // where the fonts will go + publicPath: '/client/dist/' // override the default path + } + }] } ] }, @@ -131,6 +139,11 @@ module.exports = function (options) { name: ['polyfills', 'vendor'].reverse() }), + new ProvidePlugin({ + $: "jquery", + jQuery: "jquery", + }), + // new ContextReplacementPlugin( // // The (\\|\/) piece accounts for path separators in *nix and Windows // /angular(\\|\/)core(\\|\/)@angular/, diff --git a/walkoff/client/webpack.prod.js b/walkoff/client/webpack.prod.js index c91eaefff..152d47d21 100644 --- a/walkoff/client/webpack.prod.js +++ b/walkoff/client/webpack.prod.js @@ -83,28 +83,32 @@ module.exports = function (env) { 'HMR': METADATA.HMR, } }), - new UglifyJsPlugin({ - beautify: false, //prod - output: { - comments: false - }, //prod - mangle: { - screw_ie8: true - }, //prod - compress: { - screw_ie8: true, - warnings: false, - conditionals: true, - unused: true, - comparisons: true, - sequences: true, - dead_code: true, - evaluate: true, - if_return: true, - join_vars: true, - negate_iife: false // we need this for lazy v8 - }, - }), + + // TODO: this plugin is causing problems with a depedency package (doesn't like for..of). + // should be investigated and re-enabled if we can update webpack and its plugins and ensure it all works. + // new UglifyJsPlugin({ + // beautify: false, //prod + // output: { + // comments: false + // }, //prod + // mangle: { + // screw_ie8: true + // }, //prod + // compress: { + // screw_ie8: true, + // warnings: false, + // conditionals: true, + // unused: true, + // comparisons: true, + // sequences: true, + // dead_code: true, + // evaluate: true, + // if_return: true, + // join_vars: true, + // negate_iife: false // we need this for lazy v8 + // }, + // }), + // new NormalModuleReplacementPlugin( // /angular2-hmr/, // helpers.root('config/empty.js') diff --git a/walkoff/server/endpoints/auth.py b/walkoff/server/endpoints/auth.py index bab7daa23..27b02b25f 100644 --- a/walkoff/server/endpoints/auth.py +++ b/walkoff/server/endpoints/auth.py @@ -81,7 +81,7 @@ def __func(): if user is not None: user.logout() revoke_token(decode_token(refresh_token)) - return {}, NO_CONTENT + return None, NO_CONTENT else: return Problem( BAD_REQUEST, diff --git a/walkoff/server/endpoints/cases.py b/walkoff/server/endpoints/cases.py index 8b5efb3db..54c3bc489 100644 --- a/walkoff/server/endpoints/cases.py +++ b/walkoff/server/endpoints/cases.py @@ -132,7 +132,7 @@ def __func(): db.session.delete(case_obj) db.session.commit() current_app.logger.debug('Case deleted {0}'.format(case_id)) - return {}, NO_CONTENT + return None, NO_CONTENT else: current_app.logger.error('Cannot delete case {0}. Case does not exist.'.format(case_id)) return Problem.from_crud_resource( diff --git a/walkoff/server/endpoints/devices.py b/walkoff/server/endpoints/devices.py index 120665ddb..4d0eefda7 100644 --- a/walkoff/server/endpoints/devices.py +++ b/walkoff/server/endpoints/devices.py @@ -63,7 +63,7 @@ def __func(device): executiondb.execution_db.session.delete(device) current_app.logger.info('Device removed {0}'.format(device_id)) executiondb.execution_db.session.commit() - return {}, NO_CONTENT + return None, NO_CONTENT return __func() diff --git a/walkoff/server/endpoints/playbooks.py b/walkoff/server/endpoints/playbooks.py index 959ee80f5..4ff1cb156 100644 --- a/walkoff/server/endpoints/playbooks.py +++ b/walkoff/server/endpoints/playbooks.py @@ -190,7 +190,7 @@ def __func(playbook): executiondb.execution_db.session.delete(playbook) executiondb.execution_db.session.commit() current_app.logger.info('Deleted playbook {0} '.format(playbook_id)) - return {}, NO_CONTENT + return None, NO_CONTENT return __func() @@ -361,7 +361,7 @@ def __func(workflow): executiondb.execution_db.session.commit() current_app.logger.info('Deleted workflow {0}'.format(workflow_id)) - return {}, NO_CONTENT + return None, NO_CONTENT return __func() diff --git a/walkoff/server/endpoints/roles.py b/walkoff/server/endpoints/roles.py index 8dddd7ee9..324560531 100644 --- a/walkoff/server/endpoints/roles.py +++ b/walkoff/server/endpoints/roles.py @@ -94,7 +94,7 @@ def __func(role): clear_resources_for_role(role.name) db.session.delete(role) db.session.commit() - return {}, NO_CONTENT + return None, NO_CONTENT return __func() diff --git a/walkoff/server/endpoints/scheduler.py b/walkoff/server/endpoints/scheduler.py index f1a9cd836..9fa32c156 100644 --- a/walkoff/server/endpoints/scheduler.py +++ b/walkoff/server/endpoints/scheduler.py @@ -152,7 +152,7 @@ def delete_scheduled_task(scheduled_task_id): def __func(task): db.session.delete(task) db.session.commit() - return {}, NO_CONTENT + return None, NO_CONTENT return __func() diff --git a/walkoff/server/endpoints/users.py b/walkoff/server/endpoints/users.py index 2290c93d2..037ef146c 100644 --- a/walkoff/server/endpoints/users.py +++ b/walkoff/server/endpoints/users.py @@ -129,7 +129,7 @@ def __func(user): db.session.delete(user) db.session.commit() current_app.logger.info('User {0} deleted'.format(user.username)) - return {}, NO_CONTENT + return None, NO_CONTENT else: current_app.logger.error('Could not delete user {0}. User is current user.'.format(user.id)) return Problem.from_crud_resource( diff --git a/walkoff/server/endpoints/workflowqueue.py b/walkoff/server/endpoints/workflowqueue.py index 27eab5c56..6e34dede4 100644 --- a/walkoff/server/endpoints/workflowqueue.py +++ b/walkoff/server/endpoints/workflowqueue.py @@ -122,6 +122,6 @@ def __func(): elif status == 'abort': running_context.executor.abort_workflow(execution_id) - return '', NO_CONTENT + return None, NO_CONTENT return __func() diff --git a/walkoff/templates/index.html b/walkoff/templates/index.html index dab544b08..0e3800ed4 100644 --- a/walkoff/templates/index.html +++ b/walkoff/templates/index.html @@ -12,13 +12,13 @@ - + - + - + - + @@ -32,20 +32,18 @@ - + - + - - - - + +