vm9 / orion-explorer-php-frame-work Goto Github PK
View Code? Open in Web Editor NEWA PHP 5 library Orion Context Broker services
License: MIT License
A PHP 5 library Orion Context Broker services
License: MIT License
Based on https://raw.githubusercontent.com/fgalan/oauth2-example-orion-client/master/token_script.sh
#!/bin/bash
echo ""
read -p "Username: " USER
read -s -p "Password: " PASSWORD
echo ""
RESP=`curl -s -d "{\"auth\": {\"passwordCredentials\": {\"username\":\"$USER\", \"password\":\"$PASSWORD\"}}}" -H"Content-type: application/json" http://cloud.lab.fi-ware.org:4730/v2.0/tokens`
TOKEN=`echo $RESP | sed "s/{\"access\":{\"token\":{.*\"id\":\"\(.*\)\"},\"user.*$/\1/g"`
echo -e "\nAccess Token: $TOKEN"
ORGS=`curl -s -H"x-auth-token: $TOKEN" http://cloud.lab.fi-ware.org:4730/v2.0/tenants`
echo -e "\nOrganizations: "
set ORGS2=$ORGS
echo $ORGS | awk -v k="text" '{printf("%-32s %s \n", "ID", "Name"); n=split($0,a,"[{}]"); for (i=1; i<=n; i++) {m=split(a[i], b, "[,:\"]"); if (m>=15) printf("%-32s %s \n", b[9], b[15])}}'
echo ""
read -p "Select an organization from the list above (ID): " ORG
BODY='{"auth": {"token":{"id": "'$TOKEN'"}, "tenantId": "'$ORG'"}}'
RESP1=`curl -s -X POST -H "Content-Type: application/json" -d "$BODY" http://cloud.lab.fi-ware.org:4730/v2.0/tokens`
TOKEN=`echo $RESP1 | sed "s/{\"access\":{\"token\":{.*\"id\":\"\(.*\)\",\"tenant.*$/\1/g"`
echo -e "\nToken: $TOKEN"
echo ""
I recently tried to set up Orion Context Explorer using Orion Context Explorer.
It starts pretty well, however I can not gain access to examples. Without them it's really challenging to do something. I can go to localhost:7000, add some entities and it does not make any difference, however if I want to go to .../examples, server says in terminal [404]: /favicon.ico - No such file or directory. Same problem occurs if I start it on 8000 port as in github documentation.
I'm working on integrating the OCE solution for university laboratory purposes, so if there are any guides or scripts that help accustoming Explorer they would be appreciated.
Thread has been started on stackoverflow, however there is not much of a response:
https://stackoverflow.com/questions/46942952/orion-context-explorer-no-examples-access?noredirect=1#comment80989868_46942952
If I visit orionexplorer.com I am directed to a different web site that has nothing to do with this software in this repo. May be a hack?
Hi,
I don't know where to report what I found in the orionexplorer.com site, so I figure this may be a good place :)
When I visit the portal after having logged in with FIWARE Lab the page keeps constantly reloading. It is unusable like this.
Using Google Chrome in a Mac OSX machine.
Cheers!
Hello,
In orion-explorer it connects by default to the "orion" database.
My entities are stored in another database: "orion-mydatabase", that was created based on the header
"Fiware-Service: mydatabase"
show dbs
local 0.03125GB
orion 0.0625GB //the one orionExplorer connects to
orion-mydatabase 0.0625GB
how can I using orionExlorer connect to another databases beside the default one?
Tanks in advance for your help!
Due to the current implementation, getting the existing entity types and entity count takes a lot of time.
Since it seems to me that orionexplorer does not need all the info returned by the "/v2/types" call, i would recomend to use "/v2/types?options=noAttrDetail" instead, as [documented].(https://fiware-orion.readthedocs.io/en/1.7.0/user/ngsiv2_implementation_notes/#noattrdetail-option)
I've tested changing it in here and it works just fine.
Cheers
I created a subscription for an entity and it would no let me unsubscribe by clicking on the red trash icon next to it. It says:
Erro #undefined: undefined
From
trying to connect to
orion.lab.fi-ware.org:1026
the test connection works but when I push "Create" and error appears:
Erro #undefined: undefined
I believe this is caused by the fact that at Orion/Utils/HttpRequest the getDefaultHeader method is joining the arrays via the + operator which overwrites the key. I believe it should be doing an return array_merge($default, $this->custonHeader);
instead.
Many features was created after last update of Orion Context Explorer.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.