I need to know how to create a custom HTML page with the related static resource - css, js and images - into Pentaho User Console version 5 that use Jackrabbit as its repository.
I've checked the pentaho wiki and help pages but to no avail.
CSS and JavaScript files
Upload CSS and JS files
Browse files > home > New folder.. > Name: test
home > test > Upload... > {choose files to upload from file system; e.g. test.css and test.js}
Create dashboard, add resources
Create new CDE dashboard [Home > Create New > CDE Dashbaord]
Layout Panel (first, default) > Layout Structure menu (top left) > Add Resource > Resource type: {choose: CSS / JavaScript}; External File
Choose Resource file by clicking on a ^ button. Navigate to home/test/test.css or home/test/test.js
All resource files defined in Layout structure are attached to dashboard's HTML code.
Images
I prefer to store image files within Pentaho server folder.
pentaho-solutions/system/pentaho-cdf-dd/images
which can be later referred from HTML as <img src="images/test_logo.png"/>
or from CSS as background-image: url('test-logo.png');
Related
I am trying to load already trained model into web browser for further use, but I am stuck in the loading step
I am using WAMP and not using node, because the the project is super small and not meant for anything serious.
My question would be, is it even possible to load the module w/o the node ?
I have set up WAMP and folder structure for the mini-project is:
.../www/TestProject/
- index.html
- model/
- model.json
- group1-shard1of1.bin
In the index.html file I tried following ways to load the model
- tf.loadLayersModel('http://...')
- tf.loadLayersModel('localstorage://...')
- tf.loadLayersModel('model/model.json')
I get error messages:
index.html:13 Uncaught (in promise) TypeError: Failed to fetch
Or
Uncaught (in promise) TypeError: Failed to fetch
This is my current script:
<script>
async function model(){
const model = await tf.loadLayersModel('http://model/model.json');
}
model();
</script>
It is possible to load the model since wamp will load all static assets.
However by changing the name of the weight file, it could not be loaded since it is referenced in the topology file model.json. The name of the files need to be kept as they were when they were generated or the corresponding names should changed in the model.json.
Yes, TensorFlow.js can work in Node.js OR client side in the web browser like you want. In that case, so long as you host the HTML, CSS, JS, and the model files so they are accessible then it would work fine. However it seems you have changed the file name to modelbin.bin instead of model.bin. My guess is that you are on Windows and have file extensions turned off so it looked like you had the incorrect name but in fact it was there but hidden. I would recommend ensuring this default extension hiding behaviour in Windows is turned off to prevent this in the future. Simply go to Windows control panel (Start -> Control Panel) and then search for "Folder Options". Click on the search result which opens up new window and click on the "view" tab. In that big list of options uncheck the "Hide extensions for known file types" and you should now see the full name of files on your machine. Rename the file to be just model.bin and then it should load correctly.
I have added a java script file, named 'dtformat.js' in my oracle apex application. The file was added inside the Static Application Files directory.
I added the file in my page using the code
<script src="#APP_IMAGES#dtformat.js" type="text/javascript"> </script>
The console log shows an error,
Loading failed for the <script> with source “#WORKSPACE/r/140/files/static/v74/dtformat.js”. 1 f:471
Then I found something at the location of static files. The size of the uploaded file shows 833, all the other files show 100KB,21KB,300KB as the file size, but this file- dtformat.js shows 833 and not 833KB. KB is excluded. What might be causing this error?
The problem is the path: why #WORKSPACE string is in the path?
#WORKSPACE/r/140/files/static/v74/dtformat.js
I am trying to make an app with electron and vue.js, in this one I want to make a DropZone for file and just get the path of this file. My problem is that electron is opening my file like a file viewer. How can I disable it with vue.js ?
The will-navigate event is designed to catch/parse dropped files in electron. So it is not a vue.js specific issue.
This snippet will prevent the render process from loading the image as content.
mainWindow.webContents.on('will-navigate', (event) => event.preventDefault());
Reference: https://github.com/electron/electron/issues/5919
API Docs: https://github.com/electron/electron/blob/master/docs/api/web-contents.md#event-will-navigate
I am not able to load image in parsetemplate mule esb
It gives me error images/test.jpg not found
My flow is as follow..
Servlet -> ParseTemplate -> Property
I put html page in src/main/app folder as well as in src/main/resources
And I create one folder images in src/main/app and in src/main/resources
html page is as follow..
<br>
<button id="btnReport" type="image" ><image src="images/test.jpg"></button>
I got error images/test.jpg not found
How can I load images in html page?
please help
Parse template is meant to be used to parse files with MEL in it. I don't see how it should fail at all parsing an html tag. You probably have an error in the xml or the file hierarchy.
I have pdf files inside my public/ folder lets say
public/uploads/overviews/myfile.pdf
when i try to access it on my browser like
http://localhost:8000/uploads/overviews/myfile.pdf
it is being downloaded instead to be loaded on browser.
How can I load the pdf file on the browser without getting downloaded by the user?
You may use the following PHP code for view the PDF files:
View File
And the view.php page has the following code:
<?php
$path="uploads/overviews/myfile.pdf";
header('content-type:application/pdf');
echo file_get_contents($path);
?>
Add following line before your link -
Example -
<object data="myfile.pdf" type="application/pdf" width="98%" height="80%">
...view Myfile..
Try the below code :
return Response::make(file_get_contents('uploads/overviews/myfile.pdf'), 200, [
'content-type'=>'application/pdf',
]);