mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-02 22:21:48 -05:00
Automatically change instances of .success to .then with this linux script:
#Run in awx/awx/ui/client/src
#!/bin/bash -ex
FILES=`grep -l -R "\.success(\s*function\s*(data)\s*{" . | xargs`
sed -i "s/\.success(\s*function\s*(data)\s*{/\.then(({data}) => {/g" $FILES
FILES=`grep -l -R "\.success(\s*function\s*()\s*{" . | xargs`
sed -i "s/\.success(\s*function\s*()\s*{/\.then(() => {/g" $FILES
FILES=`grep -l -R "\.success(this\.success\.bind(this))" . | xargs`
sed -i "s/\.success(this\.success\.bind(this))/\.then(this\.then\.bind(this))/g" $FILES
This commit is contained in:
committed by
Marliana Lara
parent
fabdab78ef
commit
834e6c692c
@@ -59,7 +59,7 @@ export default ['Rest', 'Wait',
|
||||
Wait('start');
|
||||
Rest.setUrl(url + id + '/');
|
||||
Rest.get()
|
||||
.success(function(data) {
|
||||
.then(({data}) => {
|
||||
var fld;
|
||||
for (fld in form.fields) {
|
||||
if (data[fld]) {
|
||||
@@ -280,7 +280,7 @@ export default ['Rest', 'Wait',
|
||||
Wait('start');
|
||||
Rest.setUrl(url + id + '/');
|
||||
Rest.put(params)
|
||||
.success(function() {
|
||||
.then(() => {
|
||||
$state.go('notifications', {}, { reload: true });
|
||||
Wait('stop');
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user