Closed sagargg-zz closed 3 years ago
@sagargg could you paste view spec here when you have only map? I think it is showing up because the given resource is "datastore active", see https://github.com/datopian/data-explorer/blob/master/src/App.js#L105-L107
@anuveyatsu Yes, it will hide query builder aka filter when datastore
is false
but still it will show chart/map builder. See the specs.
{
"widgets": [
{
"active": true,
"datapackage": {
"views": [
{
"specType": "tabularmap",
"id": "27775c43-de82-4f8b-b25a-3214ae1f3eaf",
"spec": {
"latField": "lat",
"lonField": "lng"
}
}
]
},
"name": "Map"
}
],
"datapackage": {
"resources": [
{
"hash": "",
"description": "",
"format": "CSV",
"api": "http://ckan-dev:5000/api/3/action/datastore_search?filters=%7B%7D&resource_id=21c504af-a730-4570-977a-cb6e97c6e133&limit=121&offset=1",
"title": "np.csv",
"package_id": "be8eaf0e-80af-4f4c-9c9a-2f3f13e09ac3",
"mimetype_inner": null,
"url_type": "upload",
"path": "http://ckan-dev:5000/dataset/be8eaf0e-80af-4f4c-9c9a-2f3f13e09ac3/resource/21c504af-a730-4570-977a-cb6e97c6e133/download/np.csv",
"datastore_active": true,
"id": "21c504af-a730-4570-977a-cb6e97c6e133",
"size": 2240,
"mimetype": "text/csv",
"cache_url": null,
"name": "np.csv",
"created": "2021-05-02T13:34:57.620707",
"url": "http://ckan-dev:5000/dataset/be8eaf0e-80af-4f4c-9c9a-2f3f13e09ac3/resource/21c504af-a730-4570-977a-cb6e97c6e133/download/np.csv",
"cache_last_updated": null,
"state": "active",
"last_modified": "2021-05-02T13:34:57.579305",
"position": 2,
"revision_id": "f7e75d20-1d14-4c5d-8714-433d8369f81c",
"resource_type": null,
"schema": {
"fields": [
{
"type": "string",
"name": "city"
},
{
"type": "number",
"name": "lat"
},
{
"type": "number",
"name": "lng"
},
{
"type": "string",
"name": "country"
},
{
"type": "string",
"name": "iso2"
},
{
"type": "string",
"name": "admin_name"
},
{
"type": "string",
"name": "capital"
},
{
"type": "number",
"name": "population"
},
{
"type": "number",
"name": "population_proper"
}
]
}
}
]
}
}
@anuveyatsu is there any way to use datapackage-view.js
only for other custom views?
datapackage-view.js
for custom view (chart/table/map/web) where admin can create a custom view for end-user via backend.@sagargg I think all components are relevant here because:
@anuveyatsu I don't think we need above you mentioned components. I belive all similar features are already there on backend.
Note: custom view means admin created view so that end user can see what admin wants to show.
@sagargg could we keep this issue open for now? It looks like we need to have some discussion on how we should implement this.
@sagargg can this be closed now?
CLOSING AS FIXED
Now we have UI on the backend from where users can build a custom view.
Even user-specified specs for the view on backend, the view renders with unnecessary components eg.
chart builder
,pagination
,total counts
. There is no point to have that on custom view.