34 lines
1.2 KiB
Python
34 lines
1.2 KiB
Python
with open('/home/creserver/Desktop/Vaishno_workspace/Unified_Dashboard_Suite_Go/web/bulk-api-tester/static/js/app.js', 'r') as f:
|
|
content = f.read()
|
|
|
|
old_save = """ async saveLastRunToServer() {
|
|
try {
|
|
const payload = {
|
|
bulk: { ...this.state.bulk, running: false },
|
|
response: this.state.response,
|
|
responseTab: this.state.responseTab
|
|
};
|
|
await fetch('/api/last-run', {"""
|
|
|
|
new_save = """ async saveLastRunToServer() {
|
|
try {
|
|
const lightweightResults = this.state.bulk.results.map(r => ({
|
|
...r,
|
|
binaryData: null,
|
|
fullContent: null
|
|
}));
|
|
|
|
const payload = {
|
|
bulk: { ...this.state.bulk, running: false, results: lightweightResults },
|
|
response: this.state.response,
|
|
responseTab: this.state.responseTab
|
|
};
|
|
await fetch('/api/last-run', {"""
|
|
|
|
content = content.replace(old_save, new_save)
|
|
|
|
with open('/home/creserver/Desktop/Vaishno_workspace/Unified_Dashboard_Suite_Go/web/bulk-api-tester/static/js/app.js', 'w') as f:
|
|
f.write(content)
|
|
|
|
print("Applied binary stripping patch")
|