forked from locustio/locust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publish Upload Test File (locustio#58)
* change dependencies order in setup.py (locustio#54) * bugfix when hide edit modal while stopping and edit modal still open (locustio#56) * rizal new feature upload test file to eb (locustio#53) * upload test file to deployed eb * enable user to upload test file to deployed eb reload list on selector after file uploaded writing files to slaves distribute file to slaves and reload the test list route config json to user fileio update directories dinamycally reload after upload, populate directory list modify interface add confirmation dialog * fix non geometric elements * fix test not reloaded when not in master slave mode, css file and alert message * erlangga feature create new json keys (locustio#52) * Revert "erlangga feature create new json keys (locustio#52)" (locustio#57) This reverts commit acccdf5.
- Loading branch information
1 parent
19beaf6
commit 8ed35c8
Showing
10 changed files
with
459 additions
and
195 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import logging | ||
import os | ||
import events | ||
import werkzeug | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
def read(uploaded_file_path): | ||
try: | ||
with open(os_path()+uploaded_file_path, "r") as data_file: | ||
data = data_file.read() | ||
except IOError as err: | ||
logger.info("error read: " + err.strerror) | ||
data = None | ||
return data | ||
|
||
def write(file_path, file_content): | ||
try: | ||
with open(os_path()+file_path, "w") as data_file: | ||
data_file.write(file_content) | ||
status = True | ||
message = 'File has been saved' | ||
except IOError as err: | ||
logger.info("error write: " + err.strerror ) | ||
status = False | ||
message = "Can't overwrite protected file. Please rename your test file. i.e : home_production_dilan.py" | ||
return status, message | ||
|
||
def os_path(): | ||
return os.environ['PYTHONPATH'].split(os.pathsep)[-1]+os.sep |
This file contains 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
This file contains 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
Oops, something went wrong.