mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-15 20:41:49 -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
@@ -51,7 +51,7 @@ export default
|
||||
url = GetBasePath("credentials");
|
||||
Rest.setUrl(url);
|
||||
Rest.post(data)
|
||||
.success(function (data) {
|
||||
.then(({data}) => {
|
||||
scope.addedItem = data.id;
|
||||
|
||||
Wait('stop');
|
||||
@@ -83,7 +83,7 @@ export default
|
||||
url = GetBasePath('credentials') + scope.id + '/';
|
||||
Rest.setUrl(url);
|
||||
Rest.put(data)
|
||||
.success(function () {
|
||||
.then(() => {
|
||||
Wait('stop');
|
||||
$state.go($state.current, {}, {reload: true});
|
||||
})
|
||||
|
||||
@@ -85,7 +85,7 @@ export default ['$scope', 'Rest', 'CredentialList', 'Prompt', 'ProcessErrors', '
|
||||
var url = defaultUrl + id + '/';
|
||||
Rest.setUrl(url);
|
||||
Rest.destroy()
|
||||
.success(function() {
|
||||
.then(() => {
|
||||
|
||||
let reloadListStateParams = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user