How to publish html report inside VSTS - html

I have a simple batch (let's call it run_job.bat) job that I set up in VSTS as release definition. VSTS reads this file from the remote git repository that is also set up in VSTS.
The agent is configured on a remote machine to access certain folder, say C:\AllScans\FolderWhereScanIsRunning\ bring the necessary batch file in there and start the run. The job runs some scan against web application and generates report file with some unknown for me extension.
Another job then runs as queue in VSTS (let's call it run_report.bat) that transforms this unckown file to zip file where .html, .css and .js files are sitting. Simply exporting this manually to another folder and double clicking on the index.html file shows nicely looking html report on how the scan is run, and if there were any failures during it.
My question: is it possible to access this zip file C:\AllScans\FolderWhereScanIsRunning\report.zip, unzip it and bring this index.html file within the VSTS UI? I want be able for my other coworkers to see the results of the scan in html format without leaving VSTS interface? Thanks for the help

There isn't any way to achieve this by default.
A workaround would be deploy the html files to a web page which allow iframe embedding and then use "Embedded Webpage" widget in VSTS to show the content.

Related

Import files into a directory on a HTML document

I am wondering if I can have a webpage where I can tell it to grab my file and put it in a directory, such as: "http://example.ex/folder". Meaning the file I provided is put into the "folder" folder.
Overall process:
Button says: "Import file"
I select a file, and my file is "text.txt"
It takes my file "text.txt" and adds it to the local system/directory of the website.
You can do this using JQuery File Upload and then adding a backend service that captures the file and saves it.
For example, here is a repository that has a basic Python (Flask) server integrated with JQuery File Upload that will take an uploaded file and place it on the server:
https://github.com/ngoduykhanh/flask-file-uploader
I'd put the rest of the code here, but it is a lot - and requires HTML, JavaScript and a back-end language (like Python).
Here is the documentation on JQuery File Upload: https://github.com/blueimp/jQuery-File-Upload
As a word of caution, DO NOT TRUST ANYTHING UPLOADED TO YOUR SERVER. Meaning, do not put it out on the open internet without some sort of authentication or checks in place to make sure only files you intend are uploaded. Otherwise, people will find it and upload scripts turning your device into a Bitcoin miner, spam relay, or bot host.
Instead of doing it this way, why not use SFTP to upload it to your server to host? At least that way you can lock down access.

Enterprise Architect Generate Source Code

I am using Enterprise Architecture to generate C++ classes.
Every time I do a Generate Code, it forces me to navigate to the directory I want to save the files to. Is there a configuration setting for a project or model to tell it to always generate the files to directory X?
Using 'Auto Generate Files' (in the Code generation window) should set the path name to the files automatically, and once a file path is selected, you wouldn't have to select the directory again.

How to load all files in a folder with as3

I need to load a large number of pictures (around 30) in a sequence as a short movie, each .png has the size 960X540.
I don't want the loader depend on the name of each picture as I will make changes frequently.
Is there any suggestions?
Are you trying to load images from a local file system, or a remote web server?
If you want to load images from a local file system folder, you can use AIR's File/getDirectoryListing().
If you want to load images from a remote server, and you do not want to rely on a pre-defined file naming pattern, the server will need to be able to provide directory information, for example a PHP script that reads the directory contents and outputs XML or JSON. There's no general way for a client to probe a web server for files in a directory. Some web servers do have a default web directory listing script that shows when there is no "default" file in a folder (index.html, etc), but that probably won't be quite good enough for what you're trying to do.
As a final note, if you don't mind manually updating a file on the server that lists all the files as XML or JSON, you could create a simple AIR app to process a local file directory and generate the necessary XML or JSON and upload that to your server.

Selenium ide to locate a file and store its path info from any computer

currently in my test scripts for automated file upload to browser, the paths are already defined in the value column
command type
target //input[#type='file']
value /Users/.../.../.../filename.extension
in such cases, this script is unable to run on other computers because the path would be different.
my question will be is
is there a way to locate the file in a general folder (for example file is downloaded and in the "download" folder), by using selenium ide can we get the path of the file (/Users/.../downloads/filename.extension)
store the path of the file with its extension into a notepad which i will be using it for multiple test of file uploads later on.
right now if my colleague needs to run the script from his computer, he have to manually change the value to his path.
You could use a suite file that contains a "setup" file to only change the file name in 1 place and the variable is shared across tests in the suite. You could also select an agreed up on place to store the files: c:\test_info\image.jpg.
Or you can make the file available by URL & not local, Unfortunately javascript prevents that for security: How to get the current file path in javascript
Unfortunately I can't think of any other good way unless you all have the same path in a home directory and could do something like ~/test_dir/photo.jpg

HTML/CSS Editor with Multi-Computer Code Folding

I'm looking for a code editor that saves folded/collapsed code. I want to be able to open the file on a 2nd computer and have the same folded/collapsed code structure. I understand that HTML/CSS cannot have this preference built in. If the editor needs to save the file in some propriety file type, I'm fine with that. I just need to be able to export it as plain HTML/CSS files once it's ready for publishing.
(Windows 7)
UltraEdit supports code folding for text files of any type and it supports also saving/restoring of folds on close/open.
In menu Advanced there is the menu item Configuration. In the settings tree navigate to Editor Display - Code Folding and enable at least the settings Save folded lines and Enable show/hide lines and code folding.
By default UltraEdit remembers which file are open with which lines hidden/folded on exit in file uedit32.ini stored on Windows computers by default in directory %APPDATA%\IDMComp\UltraEdit\. But this file contains also all other user configurations like the 2 settings I wrote above.
Therefore it is better to use a project or at least a workspace for editing the HTML/CSS files for your website(s). A project/workspace can be created in menu Project with New Project/Workspace. Using a project/workspace results in remembering which files are open on closing the project in a separate project related workspace file instead of uedit32.ini. The workspace file remembers not only the open files on closing the project, it remebers also which lines are folded, where the caret is positioned in each file, which file was the active file on close, and some other information to restore the workspace on next opening of the project/workspace.
But before creating the project/workspace, you need to enable the setting Save project information for use on multiple systems at Advanced - Configuration - File Handling - Advanced. As you can read on help page opened by clicking on button Help of this configuration dialog, this setting results in storing the workspace file of a project in same directory as the project file.
The location of the project file is defined by you on creating the project/workspace and is quite often in root directory or a subdirectory of a local copy of a website. With *.prj (the project file) and *.pui (the project user interface file = workspace file) somewhere in directory tree of the website, you have those 2 files also shared between multiple systems together with the HTML and CSS files.
See the user forum topics Create project from an existing directory tree? and Why save files to a Project? in the user-to-user forums of UltraEdit and take also a look on Tutorials/Power Tips page of IDM Computer Solutions, Inc.
SynWrite (Windows) supports it. Make some folding, then save a session file (*.syn). This file contains folded states and more. Anytime later, just open session file (menu File - Sessions) and folding (and more) restored.
You have a CSSMENU editor where you can create menu bars. This editor saves a file in such a way that it can be moved to any other pc as you mentioned . Html file will be saved and the related Css files are stored in another folder where you can move those files as your wish. No need of changing any code.