Code Monkey home page Code Monkey logo

ckanext-right_time_context's People

Contributors

aarranz avatar fdelavega avatar gzarrub avatar iamarnavgarg avatar nisha-nec avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ckanext-right_time_context's Issues

"Go to Resource" button should be hidden for V2 NGSI APIs

Issue Description:
When I created a new resource on the CKAN UI with the format fiware-ngsi and resource is created successfully. Data preview is working fine as shown in below image. But on that screen there is one button visible with name "Go to Resource"
as shown below.

ngsi_view

On clicking on the "Go to Resource" button , it is giving the below error.

Error:

900902
Missing Credentials
Required OAuth credentials not provided. Make sure your API invocation call has a header: "Authorization: Bearer ACCESS_TOKEN"

Investigation:
On the source code analysis, We found that there are two below files which has the functionality of hiding the "Go to Resource" button for V1 APIs.

  1. https://github.com/conwetlab/ckanext-right_time_context/blob/master/ckanext/right_time_context/templates/package/resource_read.html
**Line no 8:**
{% if res.url.lower().find('/querycontext') == -1 and res.url.lower().find('/contextentities/') == -1 %}
  1. https://github.com/conwetlab/ckanext-right_time_context/blob/master/ckanext/right_time_context/templates/package/snippets/resource_item.html
**Line No 15:**
{% if res.url.lower().find('/querycontext')== -1 and res.url.lower().find('/contextentities/')== -1 %}

We found that these entries are only for V1 and these are hiding the "Go to Resource" button on that screen. It is working fine for V1, but for there is no source code for V2 entities and /op/query/.

How "/op/query" will work in ckanext-right-time-context plugin

Hi Team,

I have installed ckanext-right-time-context plugin in my ckan application. I want to know how "/op/query" will work in ckanext-right-time-context plugin.

We add the new resource using the the input parameters which are mentioned below.

URL: https://xx.xx.xx/orion/v2/op/query
Name: type = type
Description: (blank)
Format: fiware-ngsi-registry
Is ID Pattern : id == .* and type =T
Tenant: ckanservice
Service Path: /ckan
Auth Type: (Tried None,OAuth 2.0 parameter value)

After that when we click on the created resource, we are unable to find the preview of the data.

Any help will be appreciable.

Facing Missing header in API invocation call of the context broker

Hi I have installed the right-time-context extension by following the link: https://github.com/conwetlab/ckanext-right_time_context.
When I added a new resource using steps mentioned in the above link I get the following error .

HTTPError: DataPusher received a bad HTTP response when trying to download the data file status=401 url=https://robin.fs.in/orion/v2.0/entities?type=AirQualityObserved response=<ams:fault xmlns:ams="http://wso2.org/apimanager/security">ams:code900902</ams:code>ams:messageMissing Credentials</ams:message>ams:descriptionRequired OAuth credentials not provided. Make sure your API invocation call has a header: "Authorization: Bearer ACCESS_TOKEN"</ams:description></ams:fault>

Can anyone suggest us how to pass the header in the API invocation from the CKAN GUI page.

"resource_create" curl command is not working with right_time_context extension

Issue Description:
I integrated a "ckanext-right_time_context" extnesion with CKAN.
When I executed the "resource_create" API, it returned the below error :

[Tue Aug 15 17:33:43.157707 2023] [wsgi:error] [pid 137:tid 140601585772288] [remote 10.26.3.147:03245]   return self._serialize_resource(resource)
[Tue Aug 15 17:33:43.157710 2023] [wsgi:error] [pid 137:tid 140601585772288] [remote 10.26.3.147:03245] File '/usr/lib/ckan/default/src/ckanext-right_time_context/ckanext/right_time_context/plugin.py', line 175 in _serialize_resource
[Tue Aug 15 17:33:43.157713 2023] [wsgi:error] [pid 137:tid 140601585772288] [remote 10.26.3.147:03245]   if resource['format'] == NGSI_REG_FORMAT:
[Tue Aug 15 17:33:43.157715 2023] [wsgi:error] [pid 137:tid 140601585772288] [remote 10.26.3.147:03245] KeyError: 'format'

Investigation:
On the investigation, I found that "format" key has not been passed in the curl command. As per the document "format" key is optional in resource_create API.

Further when I investigated in the right-time-context source code, I found that in the following file "/usr/lib/ckan/default/src/ckanext-right_time_context/ckanext/right_time_context/plugin.py" at line no 175, currently below condition is checked.

if resource['format'] == NGSI_REG_FORMAT:

When resource_create API is executed without "format" key, it returns the error because format key is not there.

Expected Behaviour:

resource_create API should be working without passing format key in the curl command.

Support of Flask and python3 to integrate in CKAN v2.10.1

I am trying to integrate the ckanext-right_time_context extension into CKAN v2.10.1. However, I am encountering "IRoutes and pylons" error while integrating extension.

In my analysis, I found that these errors are occurring due to flask and python3 changes in CKAN latest code whereas this extension is supporting python2 only.

On ticket #7744 CKAN community has suggested to changes in the extension to support Python 3 and Flask in order to make it compatible with CKAN's latest code.

Please confirm if it is okay to fix according to the issue confirmed in CKAN?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.