This file contains hidden or 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
export class Alert extends React.PureComponent<IProps, IState> { | |
constructor(props: IProps) { | |
super(props); | |
this.state = { | |
open: true, | |
}; | |
this.onToggle = this.onToggle.bind(this); | |
} | |
onToggle() { |
This file contains hidden or 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
// in module config | |
signals.connect('authoring:change', (item, diff, $scope) => { ... }); | |
// launch signal | |
signals.send('authoring:change', {item, diff, $scope}); |
This file contains hidden or 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
'use strict'; | |
module.exports = function(grunt) { | |
require('superdesk-core/Gruntfile')(grunt); | |
grunt.loadNpmTasks('grunt-connect-proxy'); | |
var middlewareConfig = grunt.config('connect.test.options.middleware'); | |
grunt.config('connect.test.options.middleware', function(connect, options, middlewares) { | |
middlewares.push(require('grunt-connect-proxy/lib/utils').proxyRequest); |
This file contains hidden or 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
rest: gunicorn -c gunicorn_config.py wsgi | |
wamp: python3 -u ws.py | |
work: celery -A worker worker | |
beat: celery -A worker beat --pid= |
This file contains hidden or 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
{ | |
"headline": "market opening", | |
"subject": [ | |
{ | |
"name": "Adventure", | |
"parent": null, | |
"qcode": "patopic:ADVENTURE" | |
} | |
], | |
"version": 6, |
This file contains hidden or 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
def controller_layer(doc): | |
doc['ctr'] = 1 | |
yield doc | |
doc['ctr'] = 2 | |
return doc | |
def service_layer(doc): | |
doc['srv'] = 1 | |
yield doc |
This file contains hidden or 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
from Eve import Eve | |
import superdesk | |
import superdesk.users | |
import superdesk.auth | |
app = Eve() | |
superdesk.init_app(app) | |
app.run() |
This file contains hidden or 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
{ | |
onPrepare: function() { | |
var reporter = new ScreenShotReporter({ | |
baseDirectory: './screenshots', | |
pathBuilder: function pathBuilder(spec, descriptions, results, capabilities) { | |
return results.passed() + '_' + descriptions.reverse().join('-'); | |
} | |
}); |
This file contains hidden or 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
subject: [ | |
{ | |
name: "politics", | |
code: "11000000" | |
}, | |
{ | |
name: "crime, law and justice", | |
code: "02000000" | |
} | |
], |
This file contains hidden or 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
<input type="checkbox" ng-model="item.selected" sd-custombox /> | |
directive.js: | |
return { | |
require: '?ngModel', | |
link: function($scope, element, attrs, ngModel) { | |
element.click(function() { | |
$scope.$apply(function() { | |
ngModel.$serViewValue(!ngModel.$getViewValue()); |
NewerOlder