Slack view_submission Payload block_ids - slack-api

I'm trying to get the submitted data from a slack modal payload (using Integromat) but I'm unable to match the fields as the field names (block_ids) and random and change on each submission.
Not sure where to start, is there something on the Slack side I can do to stop this or how can I handle this in Integromat?
Payload below:
{
"blocks":[
{
"type":"header",
"block_id":"GH6Wh",
"text":{
"type":"plain_text",
"text":"AHome",
"emoji":true
}
},
{
"type":"input",
"block_id":"ayv5",
"label":{
"type":"plain_text",
"text":"Project Title",
"emoji":true
},
"optional":false,
"dispatch_action":false,
"element":{
"type":"plain_text_input",
"action_id":"field_project_title",
"dispatch_action_config":{
"trigger_actions_on":[
"on_enter_pressed"
]
}
}
},
{
"type":"input",
"block_id":"4Tf7",
"label":{
"type":"plain_text",
"text":"Client Project Contacts",
"emoji":true
},
"optional":false,
"dispatch_action":false,
"element":{
"type":"multi_static_select",
"action_id":"client_project_contacts",
"placeholder":{
"type":"plain_text",
"text":"Select",
"emoji":true
},
"options":[
{
"text":{
"type":"plain_text",
"text":"jennifer",
"emoji":true
},
"value":"47dht5f-1942-4448-9842-20fef64dcd67"
}
]
}
},
{
"type":"divider",
"block_id":"a=6G"
},
{
"type":"section",
"block_id":"qtq0W",
"text":{
"type":"mrkdwn",
"text":"Project Start",
"verbatim":false
},
"accessory":{
"type":"datepicker",
"action_id":"field_project_start_date",
"initial_date":"2022-01-19",
"placeholder":{
"type":"plain_text",
"text":"Select a date",
"emoji":true
}
}
},
{
"type":"section",
"block_id":"4YOTI",
"text":{
"type":"mrkdwn",
"text":"Project Finish",
"verbatim":false
},
"accessory":{
"type":"datepicker",
"action_id":"field_project_end_date",
"initial_date":"2022-03-19",
"placeholder":{
"type":"plain_text",
"text":"Select a date",
"emoji":true
}
}
},
{
"type":"divider",
"block_id":"MZU"
},
{
"type":"input",
"block_id":"v09",
"label":{
"type":"plain_text",
"text":"Project Manager",
"emoji":true
},
"optional":false,
"dispatch_action":false,
"element":{
"type":"static_select",
"action_id":"field_project_managers",
"placeholder":{
"type":"plain_text",
"text":"Select",
"emoji":true
},
"options":[
{
"text":{
"type":"plain_text",
"text":"Eric ",
"emoji":true
},
"value":"b85ba51b-2346-481f-98a8-2b94fh994575"
}
]
}
},
{
"type":"input",
"block_id":"gxN9",
"label":{
"type":"plain_text",
"text":"Project Team",
"emoji":true
},
"optional":false,
"dispatch_action":false,
"element":{
"type":"multi_static_select",
"action_id":"field_project_team",
"placeholder":{
"type":"plain_text",
"text":"Select",
"emoji":true
},
"options":[
]
}
},
{
"type":"divider",
"block_id":"CU1k"
},
{
"type":"input",
"block_id":"ows",
"label":{
"type":"plain_text",
"text":"Setup apps",
"emoji":true
},
"optional":true,
"dispatch_action":false,
"element":{
"type":"checkboxes",
"action_id":"setup_apps",
"options":[
{
"text":{
"type":"plain_text",
"text":"Harvest",
"emoji":true
},
"value":"setup_harvest"
},
{
"text":{
"type":"plain_text",
"text":"Dropbox Project Folder",
"emoji":true
},
"value":"setup_dropbox"
}
]
}
},
{
"type":"divider",
"block_id":"Eov"
}
],
"private_metadata":"",
"callback_id":"_project_setup_form_submit",
"state":{
"values":{
"ayv5":{
"field_project_title":{
"type":"plain_text_input",
"value":"cvgf"
}
},
"4Tf7":{
"client_project_contacts":{
"type":"multi_static_select",
"selected_options":[
{
"text":{
"type":"plain_text",
"text":"Jennifer",
"emoji":true
},
"value":"04a96f00-c84d-403c-992f-28fgh34b7ade"
}
]
}
},
"qtq0W":{
"field_project_start_date":{
"type":"datepicker",
"selected_date":"2022-01-19"
}
},
"4YOTI":{
"field_project_end_date":{
"type":"datepicker",
"selected_date":"2022-03-19"
}
},
"v09":{
"field_project_managers":{
"type":"static_select",
"selected_option":{
"text":{
"type":"plain_text",
"text":"Eric",
"emoji":true
},
"value":"b85ba51b-2346-481f-9sa8-2b9468994575"
}
}
},
"gxN9":{
"field_project_team":{
"type":"multi_static_select",
"selected_options":[
{
"text":{
"type":"plain_text",
"text":"Elliot",
"emoji":true
},
"value":"94c4b483-fbg8-4211-971d-38cf615fdc5e"
}
]
}
},
"ows":{
"setup_apps":{
"type":"checkboxes",
"selected_options":[
{
"text":{
"type":"plain_text",
"text":"Harvest",
"emoji":true
},
"value":"setup_harvest"
}
]
}
}
}
}
}

When creating a view, you can (but aren't required to) specify a "block_id" as a property for each block. When an ID isn't provided, it seems to be randomly-generated each time.
Example:
{
"type": "modal",
"callback_id": "modal-identifier",
"title": {
"type": "plain_text",
"text": "Just a modal"
},
"blocks": [
{
"type": "section",
"block_id": "section-identifier",
"text": {
"type": "mrkdwn",
"text": "*Welcome* to ~my~ Block Kit _modal_!"
},
"accessory": {
"type": "button",
"block_id": "just-a-button",
"text": {
"type": "plain_text",
"text": "Just a button",
},
"action_id": "button-identifier",
}
}
],
}
Source, and I added a second "block_id" for the button.

Related

​Output DASH segments are longer than requested with google cloud transcoder

This job sets 2s segments for the video and audio streams. The video total duration is 134s, so I would expect about 67 segments. However we see in the MPD manifest that there are 45 video segments, and 54 audio segments (for each audio track).
Is this the expected behavior? Our player does buffer more than 2s at once.
Why is there a different number of video and audio segments?
Job Config
{
"config":{
"inputs":[
{
"key":"input0",
"uri":"gs://inputfile.mp4"
}
],
"editList":[
{
"key":"atom0",
"inputs":[
"input0"
],
"endTimeOffset":"134.549s",
"startTimeOffset":"0s"
}
],
"elementaryStreams":[
{
"videoStream":{
"codec":"h264",
"profile":"high",
"preset":"veryfast",
"widthPixels":224,
"pixelFormat":"yuv420p",
"bitrateBps":500000,
"rateControlMode":"crf",
"crfLevel":24,
"vbvSizeBits":500000,
"vbvFullnessBits":450000,
"gopDuration":"3s",
"entropyCoder":"cabac",
"frameRate":0.1
},
"key":"thumbnail-lowfps-stream"
},
{
"videoStream":{
"codec":"h264",
"profile":"high",
"preset":"veryfast",
"widthPixels":224,
"pixelFormat":"yuv420p",
"bitrateBps":500000,
"rateControlMode":"crf",
"crfLevel":24,
"vbvSizeBits":500000,
"vbvFullnessBits":450000,
"gopDuration":"3s",
"entropyCoder":"cabac",
"frameRate":1
},
"key":"thumbnail-mediumfps-stream"
},
{
"videoStream":{
"codec":"h264",
"profile":"high",
"preset":"veryfast",
"widthPixels":224,
"pixelFormat":"yuv420p",
"bitrateBps":500000,
"rateControlMode":"crf",
"crfLevel":24,
"vbvSizeBits":500000,
"vbvFullnessBits":450000,
"gopDuration":"3s",
"entropyCoder":"cabac",
"frameRate":5
},
"key":"thumbnail-highfps-stream"
},
{
"videoStream":{
"codec":"h264",
"profile":"high",
"preset":"veryfast",
"widthPixels":224,
"pixelFormat":"yuv420p",
"bitrateBps":500000,
"rateControlMode":"crf",
"crfLevel":24,
"vbvSizeBits":500000,
"vbvFullnessBits":450000,
"gopDuration":"3s",
"entropyCoder":"cabac",
"frameRate":2.23
},
"key":"thumbnail-dynamicfps-stream"
},
{
"videoStream":{
"codec":"h264",
"profile":"high",
"preset":"veryfast",
"widthPixels":400,
"pixelFormat":"yuv420p",
"bitrateBps":500000,
"rateControlMode":"crf",
"crfLevel":24,
"vbvSizeBits":500000,
"vbvFullnessBits":450000,
"gopDuration":"3s",
"entropyCoder":"cabac",
"frameRate":8.919
},
"key":"preview-ld-stream"
},
{
"videoStream":{
"codec":"h264",
"profile":"high",
"preset":"veryfast",
"widthPixels":852,
"pixelFormat":"yuv420p",
"bitrateBps":500000,
"rateControlMode":"crf",
"crfLevel":24,
"vbvSizeBits":500000,
"vbvFullnessBits":450000,
"gopDuration":"3s",
"entropyCoder":"cabac",
"frameRate":30
},
"key":"preview-hd-stream"
},
{
"audioStream":{
"codec":"aac",
"bitrateBps":128000,
"channelCount":2,
"channelLayout":[
"fl",
"fr"
],
"mapping":[
{
"key":"atom0",
"channels":[
{
"inputs":[
{
"key":"input0",
"track":1
}
]
},
{
"inputs":[
{
"key":"input0",
"track":1,
"channel":1
}
]
}
]
}
],
"sampleRateHertz":48000
},
"key":"audio-stream-1"
},
{
"audioStream":{
"codec":"aac",
"bitrateBps":128000,
"channelCount":2,
"channelLayout":[
"fl",
"fr"
],
"mapping":[
{
"key":"atom0",
"channels":[
{
"inputs":[
{
"key":"input0",
"track":2
}
]
},
{
"inputs":[
{
"key":"input0",
"track":2,
"channel":1
}
]
}
]
}
],
"sampleRateHertz":48000
},
"key":"audio-stream-2"
},
{
"audioStream":{
"codec":"aac",
"bitrateBps":128000,
"channelCount":2,
"channelLayout":[
"fl",
"fr"
],
"mapping":[
{
"key":"atom0",
"channels":[
{
"inputs":[
{
"key":"input0",
"track":3
}
]
},
{
"inputs":[
{
"key":"input0",
"track":3,
"channel":1
}
]
}
]
}
],
"sampleRateHertz":48000
},
"key":"audio-stream-3"
},
{
"audioStream":{
"codec":"aac",
"bitrateBps":128000,
"channelCount":2,
"channelLayout":[
"fl",
"fr"
],
"mapping":[
{
"key":"atom0",
"channels":[
{
"inputs":[
{
"key":"input0",
"track":4
}
]
},
{
"inputs":[
{
"key":"input0",
"track":4,
"channel":1
}
]
}
]
}
],
"sampleRateHertz":48000
},
"key":"audio-stream-4"
}
],
"muxStreams":[
{
"key":"thumbnail-lowfps-mux",
"fileName":"small_low_fps.mp4",
"container":"mp4",
"elementaryStreams":[
"thumbnail-lowfps-stream"
]
},
{
"key":"thumbnail-mediumfps-mux",
"fileName":"small_mid_fps.mp4",
"container":"mp4",
"elementaryStreams":[
"thumbnail-mediumfps-stream"
]
},
{
"key":"thumbnail-highfps-mux",
"fileName":"small_high_fps.mp4",
"container":"mp4",
"elementaryStreams":[
"thumbnail-highfps-stream"
]
},
{
"key":"thumbnail-dynamicfps-mux",
"fileName":"small_dynamic_fps.mp4",
"container":"mp4",
"elementaryStreams":[
"thumbnail-dynamicfps-stream"
]
},
{
"key":"preview-ld-mux",
"fileName":"preview_seek.mp4",
"container":"mp4",
"elementaryStreams":[
"preview-ld-stream"
]
},
{
"key":"preview-hd-mux-dash",
"fileName":"preview-hd-mux-dash.m4s",
"container":"fmp4",
"elementaryStreams":[
"preview-hd-stream"
],
"segmentSettings":{
"segmentDuration":"2s"
}
},
{
"key":"audio-stream-1-mux",
"fileName":"audio-stream-1-mux.m4s",
"container":"fmp4",
"elementaryStreams":[
"audio-stream-1"
],
"segmentSettings":{
"segmentDuration":"2s"
}
},
{
"key":"audio-stream-2-mux",
"fileName":"audio-stream-2-mux.m4s",
"container":"fmp4",
"elementaryStreams":[
"audio-stream-2"
],
"segmentSettings":{
"segmentDuration":"2s"
}
},
{
"key":"audio-stream-3-mux",
"fileName":"audio-stream-3-mux.m4s",
"container":"fmp4",
"elementaryStreams":[
"audio-stream-3"
],
"segmentSettings":{
"segmentDuration":"2s"
}
},
{
"key":"audio-stream-4-mux",
"fileName":"audio-stream-4-mux.m4s",
"container":"fmp4",
"elementaryStreams":[
"audio-stream-4"
],
"segmentSettings":{
"segmentDuration":"2s"
}
}
],
"manifests":[
{
"fileName":"preview_main.mpd",
"type":"DASH",
"muxStreams":[
"preview-hd-mux-dash",
"audio-stream-1-mux",
"audio-stream-2-mux",
"audio-stream-3-mux",
"audio-stream-4-mux"
]
}
],
"output":{
"uri":"gs://output-bucket"
},
"spriteSheets":[
{
"format":"jpeg",
"filePrefix":"small_mid_fps_sprite-",
"spriteWidthPixels":224,
"spriteHeightPixels":126,
"columnCount":1,
"rowCount":1,
"startTimeOffset":"0s",
"interval":"1s"
}
]
},
}
The reason this happen is due to gopDuration==3s, and segmentDuration==2s.
gopDuration has to be <= segmentDuration, and, at the same time, segmentDuration has to be divisible by gopDuration.
Once you set gopDuration==2s, you should get what you want.

elastic - QueryingParsingException - query does not support - when searching by association field using a filter

I have a model person that has many addresses (association/table name person_addresses)
I am trying to give the user the ability to find a person by its address.
When I try to search by address, I get: QueryingParsingException - query does not support [addresses.address]
e.g: /api/v1/search/people?q=aaron&address=scarborough
query:
[
{
"query":{
"match":{
"name":"aaron"
}
},
"sort":[
{
"id":{
"order":"desc"
}
}
],
"filter":{
"bool":{
"must":{
"nested":{
"path":"addresses",
"query":{
"terms":{
"addresses.address":"scarborough"
}
}
}
}
}
},
"aggregations":{
"addresses":{
"nested":{
"path":"addresses"
},
"aggregations":{
"nested_items":{
"terms":{
"field":"addresses.address",
"order":{
"_count":"desc"
}
}
}
}
}
}
}
]
mapping:
mapping do
indexes :first_name, type: 'multi_field', fields: {
first_name: { type: 'string', index: 'analyzed' },
na_first_name: { type: 'string', index: 'not_analyzed' }
}
indexes :middle_name, type: 'multi_field', fields: {
middle_name: { type: 'string', index: 'analyzed' },
na_middle_name: { type: 'string', index: 'not_analyzed' }
}
indexes :last_name, type: 'multi_field', fields: {
last_name: { type: 'string', index: 'analyzed' },
na_last_name: { type: 'string', index: 'not_analyzed' }
}
indexes :addresses, type: :nested do
indexes :location, type: :geo_point, index: :not_analyzed
indexes :country, type: :string, index: :not_analyzed
indexes :state, type: :string, index: :not_analyzed
indexes :address, type: :string
indexes :county, type: :string, index: :not_analyzed
indexes :city, type: :string, index: :not_analyzed
indexes :zip, type: :string, index: :not_analyzed
indexes :state_id, type: :long
indexes :county_id, type: :long
indexes :city_id, type: :long
end
end
I have this record indexed:
{
"_index": "pl_people",
"_type": "person",
"_id": "813106",
"_score": null,
"sort": [
-9223372036854775808
],
"resource": "Person",
"parameterized": "813106-aaron-mcguire",
"name": "Aaron McGuire",
"phone": "813-689-6889",
"date_of_birth": "1991-03-01",
"first_name": "Aaron",
"last_name": "McGuire",
"addresses": [
{
"id": 1,
"parameterized": "1",
"address": "123 Scarborough road",
"zip": "L5A2A9",
"city": "Ontario",
"country": "USA",
"state": "California",
"location": null,
"state_id": null,
"county_id": null,
"city_id": null
}
],
"projects": [],
}
index.json.jbuilder:
# frozen_string_literal: true
json.query do
if #term.present?
json.set!(:match, #field => #term)
else
json.set!(:match_all, {})
end
end
json.sort do
json.child! do
json.set!(:id, order: 'desc')
end
end
if [#address].any?(&:present?)
json.filter do
json.partial!('people/index/filters')
end
end
json.aggregations do
json.addresses do
json.nested do
json.set!(:path, 'addresses')
end
json.aggregations do
json.nested_items do
json.terms do
json.set!(:field, 'addresses.address')
json.set!(:order, _count: 'desc')
end
end
end
end
end
_filters.json.jbuilder:
# frozen_string_literal: true
json.bool do
json.must do
if (value = #address).present?
json.nested do
json.path('addresses')
json.query do
json.set!(:terms, 'addresses.address' => value)
end
end
end
end
end
index.rb (person search)
# frozen_string_literal: true
module Searching
module People
class Index < ::Searching::ApplicationSearching
self.valid_params = {
q: { type: :string, on_blank: :remove },
}
delegate :aggregations, to: :results
def initialize(params = {})
super(params)
end
protected
def klass
Person
end
def search
#search ||= ClientSearch.new(
index: [klass].map(&:index_name).join(','),
body: body,
size: limit,
from: offset,
)
end
def body
query_field = params[:field].present? ? params[:field] : :name
Searching::TemplateHandler.(
'people/index',
term: Searching::Util.sanitize_string(params[:q]),
field: query_field,
address: params[:address],
)
end
end
end
end
GET /pl_people
{
"pl_people":{
"aliases":{
},
"mappings":{
"person":{
"properties":{
"ac_name":{
"type":"string",
"analyzer":"autocomplete"
},
"addresses":{
"type":"nested",
"properties":{
"address":{
"type":"string"
},
"city":{
"type":"string",
"index":"not_analyzed"
},
"city_id":{
"type":"long"
},
"country":{
"type":"string",
"index":"not_analyzed"
},
"county":{
"type":"string",
"index":"not_analyzed"
},
"county_id":{
"type":"long"
},
"id":{
"type":"long"
},
"location":{
"type":"geo_point"
},
"parameterized":{
"type":"string"
},
"state":{
"type":"string",
"index":"not_analyzed"
},
"state_id":{
"type":"long"
},
"zip":{
"type":"string",
"index":"not_analyzed"
}
}
},
"author":{
"type":"string",
"index":"not_analyzed"
},
"body":{
"type":"string",
"analyzer":"remove_html",
"fields":{
"ns_body":{
"type":"string",
"analyzer":"remove_html_stopwords"
}
}
},
"charities":{
"type":"nested",
"properties":{
"email":{
"type":"string",
"index":"not_analyzed"
},
"id":{
"type":"long"
}
}
},
"community":{
"properties":{
"name":{
"type":"string",
"index":"not_analyzed"
},
"parameterized":{
"type":"string",
"index":"not_analyzed"
},
"slug":{
"type":"string",
"index":"not_analyzed"
}
}
},
"created_at":{
"type":"date",
"format":"dateOptionalTime"
},
"date_of_birth":{
"type":"date",
"format":"dateOptionalTime"
},
"description":{
"type":"string"
},
"employments":{
"type":"nested",
"properties":{
"email":{
"type":"string",
"index":"not_analyzed"
},
"employment_status":{
"type":"string",
"index":"not_analyzed"
},
"foia_contact":{
"type":"boolean"
},
"id":{
"type":"long"
},
"phone":{
"type":"string",
"index":"not_analyzed"
},
"phone_extension":{
"type":"string",
"index":"not_analyzed"
}
}
},
"first_name":{
"type":"string",
"fields":{
"na_first_name":{
"type":"string",
"index":"not_analyzed"
}
}
},
"last_name":{
"type":"string",
"fields":{
"na_last_name":{
"type":"string",
"index":"not_analyzed"
}
}
},
"market":{
"properties":{
"name":{
"type":"string",
"index":"not_analyzed"
},
"parameterized":{
"type":"string",
"index":"not_analyzed"
},
"slug":{
"type":"string",
"index":"not_analyzed"
}
}
},
"middle_name":{
"type":"string",
"fields":{
"na_middle_name":{
"type":"string",
"index":"not_analyzed"
}
}
},
"most_recent_organization":{
"properties":{
"description":{
"type":"string"
},
"id":{
"type":"long"
},
"name":{
"type":"string"
},
"parameterized":{
"type":"string"
},
"phone":{
"type":"string"
}
}
},
"name":{
"type":"string",
"fields":{
"na_name":{
"type":"string",
"index":"not_analyzed"
},
"ngram_name":{
"type":"string",
"analyzer":"my_start"
},
"ns_name":{
"type":"string",
"analyzer":"no_stopwords"
}
}
},
"organizations":{
"properties":{
"name":{
"type":"string"
},
"parameterized":{
"type":"string",
"index":"not_analyzed"
}
}
},
"package":{
"properties":{
"name":{
"type":"string",
"index":"not_analyzed"
},
"parameterized":{
"type":"string",
"index":"not_analyzed"
},
"slug":{
"type":"string",
"index":"not_analyzed"
}
}
},
"parameterized":{
"type":"string",
"index":"not_analyzed"
},
"phone":{
"type":"string"
},
"photo":{
"properties":{
"large":{
"type":"string"
},
"medium":{
"type":"string"
},
"teaser":{
"type":"string"
},
"thumb":{
"type":"string"
},
"url":{
"type":"string"
}
}
},
"projects":{
"properties":{
"id":{
"type":"long"
},
"name":{
"type":"string",
"index":"not_analyzed"
},
"parameterized":{
"type":"string",
"index":"not_analyzed"
},
"slug":{
"type":"string",
"index":"not_analyzed"
}
}
},
"public_offices":{
"type":"nested",
"properties":{
"email":{
"type":"string",
"index":"not_analyzed"
},
"employment_status":{
"type":"string",
"index":"not_analyzed"
},
"id":{
"type":"long"
}
}
},
"published":{
"type":"string",
"index":"not_analyzed"
},
"region":{
"properties":{
"name":{
"type":"string",
"index":"not_analyzed"
},
"parameterized":{
"type":"string",
"index":"not_analyzed"
},
"slug":{
"type":"string",
"index":"not_analyzed"
}
}
},
"resource":{
"type":"string"
},
"short_description":{
"type":"string"
},
"show_path":{
"type":"string"
},
"time":{
"type":"date",
"format":"dateOptionalTime"
},
"updated_at":{
"type":"date",
"format":"dateOptionalTime"
}
}
}
},
"settings":{
"index":{
"creation_date":"1581684793139",
"analysis":{
"filter":{
"english_stop":{
"type":"stop",
"stopwords":[
"a",
"an",
"and",
"are",
"as",
"at",
"be",
"but",
"by",
"for",
"if",
"in",
"into",
"is",
"it",
"no",
"not",
"of",
"on",
"or",
"such",
"that",
"the",
"their",
"then",
"there",
"these",
"they",
"this",
"to",
"was",
"with"
]
},
"my_edge":{
"min_gram":"2",
"side":"front",
"type":"edgeNGram",
"max_gram":"18"
}
},
"analyzer":{
"no_stopwords":{
"type":"stop",
"stopwords":"_english_"
},
"comma":{
"pattern":",",
"type":"pattern"
},
"default":{
"filter":[
"standard",
"lowercase",
"english_stop",
"word_delimiter"
],
"tokenizer":"standard"
},
"remove_html_stopwords":{
"filter":"stop",
"char_filter":"html_strip",
"type":"custom",
"stopwords":"_english_",
"tokenizer":"lowercase"
},
"autocomplete":{
"filter":[
"lowercase",
"apostrophe"
],
"tokenizer":"keyword"
},
"my_start":{
"filter":[
"asciifolding",
"lowercase",
"my_edge"
],
"tokenizer":"whitespace"
},
"remove_html":{
"filter":"lowercase",
"char_filter":"html_strip",
"type":"custom",
"tokenizer":"standard"
}
}
},
"number_of_shards":"5",
"number_of_replicas":"1",
"version":{
"created":"1070699"
},
"uuid":"LZrnPjxiTwyNf-Ggo3bXtw"
}
},
"warmers":{
}
}
}
Any naming conventions I am not following?
I tried changing person_address for address on filters.json and index.json, but still didnt have any success.
So i reinstall es 1.7 and made some try, simplified your data.
the error was in the "terms" in the filter, you have to use a term / match instead. If you want to add multiple condition it seems you need to build boolean query with a term on each.
Moreover i cant understand why you use a post_filter here (filter at top level = post_filter in es > 2.X), can you explain it?
This is what i done using HEAD if you want reproduce (i simplify the mappings, keeping only relevant fields).
hope it s help.
http://localhost:9200/pl_people/ (POST)
{
"mappings":{
"person":{
"properties":{
"ac_name":{
"type":"string"
},
"addresses":{
"type":"nested",
"properties":{
"address":{
"type":"string"
},
"city":{
"type":"string",
"index":"not_analyzed"
},
"city_id":{
"type":"long"
},
"country":{
"type":"string",
"index":"not_analyzed"
},
"county":{
"type":"string",
"index":"not_analyzed"
},
"county_id":{
"type":"long"
},
"id":{
"type":"long"
},
"location":{
"type":"geo_point"
},
"parameterized":{
"type":"string"
},
"state":{
"type":"string",
"index":"not_analyzed"
},
"state_id":{
"type":"long"
},
"zip":{
"type":"string",
"index":"not_analyzed"
}
}
},
"date_of_birth":{
"type":"date",
"format":"dateOptionalTime"
},
"first_name":{
"type":"string",
"fields":{
"na_first_name":{
"type":"string",
"index":"not_analyzed"
}
}
},
"last_name":{
"type":"string",
"fields":{
"na_last_name":{
"type":"string",
"index":"not_analyzed"
}
}
},
"name":{
"type":"string",
"fields":{
"na_name":{
"type":"string",
"index":"not_analyzed"
},
"ngram_name":{
"type":"string"
},
"ns_name":{
"type":"string"
}
}
},
"parameterized":{
"type":"string",
"index":"not_analyzed"
},
"phone":{
"type":"string"
},
"resource":{
"type":"string"
}
}
}
}
}
http://localhost:9200/pl_people/person/813106 (POST)
{
"ac_name": "Aaron McGuire",
"resource": "Person",
"parameterized": "813106-aaron-mcguire",
"name": "Aaron McGuire",
"phone": "813-689-6889",
"date_of_birth": "1991-03-01",
"first_name": "Aaron",
"last_name": "McGuire",
"addresses": [
{
"id": 1,
"parameterized": "1",
"address": "123 Scarborough road",
"zip": "L5A2A9",
"city": "Ontario",
"country": "USA",
"state": "California"
}
]
}
http://localhost:9200/pl_people/person/_search/ (post)
{
"query": {
"match": {
"name": "aaron"
}
},
"sort": [
{
"id": {
"order": "desc"
}
}
],
"filter": {
"bool": {
"must": {
"nested": {
"path": "addresses",
"query": {
"term": {
"addresses.address": "scarborough"
}
}
}
}
}
},
"aggregations": {
"addresses": {
"nested": {
"path": "addresses"
},
"aggregations": {
"nested_items": {
"terms": {
"field": "addresses.address",
"order": {
"_count": "desc"
}
}
}
}
}
}
}

Container is connecting default cluster when trying to setup new ECS Cluster

I am using following cloud formation script to create a new ECS cluster
*{
"AWSTemplateFormatVersion":"2010-09-09",
"Parameters":{
"KeyName":{
"Type":"AWS::EC2::KeyPair::KeyName",
"Description":"Name of an existing EC2 KeyPair to enable SSH access to the ECS instances."
},
"VpcId":{
"Type":"AWS::EC2::VPC::Id",
"Description":"Select a VPC that allows instances to access the Internet."
},
"SubnetId":{
"Type":"List<AWS::EC2::Subnet::Id>",
"Description":"Select at two subnets in your selected VPC."
},
"DesiredCapacity":{
"Type":"Number",
"Default":"1",
"Description":"Number of instances to launch in your ECS cluster."
},
"MaxSize":{
"Type":"Number",
"Default":"1",
"Description":"Maximum number of instances that can be launched in your ECS cluster."
},
"InstanceType":{
"Description":"EC2 instance type",
"Type":"String",
"Default":"t2.micro",
"AllowedValues":[
"t2.micro",
"t2.small",
"t2.medium",
"t2.large",
"m3.medium",
"m3.large",
"m3.xlarge",
"m3.2xlarge",
"m4.large",
"m4.xlarge",
"m4.2xlarge",
"m4.4xlarge",
"m4.10xlarge",
"c4.large",
"c4.xlarge",
"c4.2xlarge",
"c4.4xlarge",
"c4.8xlarge",
"c3.large",
"c3.xlarge",
"c3.2xlarge",
"c3.4xlarge",
"c3.8xlarge",
"r3.large",
"r3.xlarge",
"r3.2xlarge",
"r3.4xlarge",
"r3.8xlarge",
"i2.xlarge",
"i2.2xlarge",
"i2.4xlarge",
"i2.8xlarge"
],
"ConstraintDescription":"Please choose a valid instance type."
}
},
"Mappings":{
"AWSRegionToAMI":{
"us-east-1":{
"AMIID":"ami-0c65e6401a50512c5"
}
}
},
"Resources":{
"ECSCluster":{
"Type":"AWS::ECS::Cluster"
},
"EcsSecurityGroup":{
"Type":"AWS::EC2::SecurityGroup",
"Properties":{
"GroupDescription":"ECS Security Group",
"VpcId":{
"Ref":"VpcId"
}
}
},
"EcsSecurityGroupHTTPinbound":{
"Type":"AWS::EC2::SecurityGroupIngress",
"Properties":{
"GroupId":{
"Ref":"EcsSecurityGroup"
},
"IpProtocol":"tcp",
"FromPort":"80",
"ToPort":"80",
"CidrIp":"0.0.0.0/0"
}
},
"EcsSecurityGroupSSHinbound":{
"Type":"AWS::EC2::SecurityGroupIngress",
"Properties":{
"GroupId":{
"Ref":"EcsSecurityGroup"
},
"IpProtocol":"tcp",
"FromPort":"22",
"ToPort":"22",
"CidrIp":"0.0.0.0/0"
}
},
"EcsSecurityGroupALBports":{
"Type":"AWS::EC2::SecurityGroupIngress",
"Properties":{
"GroupId":{
"Ref":"EcsSecurityGroup"
},
"IpProtocol":"tcp",
"FromPort":"31000",
"ToPort":"61000",
"SourceSecurityGroupId":{
"Ref":"EcsSecurityGroup"
}
}
},
"CloudwatchLogsGroup":{
"Type":"AWS::Logs::LogGroup",
"Properties":{
"LogGroupName":{
"Fn::Join":[
"-",
[
"ECSLogGroup",
{
"Ref":"AWS::StackName"
}
]
]
},
"RetentionInDays":14
}
},
"taskdefinition":{
"Type":"AWS::ECS::TaskDefinition",
"Properties":{
"Family":{
"Fn::Join":[
"",
[
{
"Ref":"AWS::StackName"
},
"-ecs-demo-app"
]
]
},
"ContainerDefinitions":[
{
"Name":"simple-app",
"Cpu":"10",
"Essential":"true",
"Image":"httpd:2.4",
"Memory":"300",
"LogConfiguration":{
"LogDriver":"awslogs",
"Options":{
"awslogs-group":{
"Ref":"CloudwatchLogsGroup"
},
"awslogs-region":{
"Ref":"AWS::Region"
},
"awslogs-stream-prefix":"ecs-demo-app"
}
},
"MountPoints":[
{
"ContainerPath":"/usr/local/apache2/htdocs",
"SourceVolume":"my-vol"
}
],
"PortMappings":[
{
"ContainerPort":80
}
]
},
{
"Name":"busybox",
"Cpu":10,
"Command":[
"/bin/sh -c \"while true; do echo '<html> <head> <title>Amazon ECS Sample App</title> <style>body {margin-top: 40px; background-color: #333;} </style> </head><body> <div style=color:white;text-align:center> <h1>Amazon ECS Sample App</h1> <h2>Congratulations!</h2> <p>Your application is now running on a container in Amazon ECS.</p>' > top; /bin/date > date ; echo '</div></body></html>' > bottom; cat top date bottom > /usr/local/apache2/htdocs/index.html ; sleep 1; done\""
],
"EntryPoint":[
"sh",
"-c"
],
"Essential":false,
"Image":"busybox",
"Memory":200,
"LogConfiguration":{
"LogDriver":"awslogs",
"Options":{
"awslogs-group":{
"Ref":"CloudwatchLogsGroup"
},
"awslogs-region":{
"Ref":"AWS::Region"
},
"awslogs-stream-prefix":"ecs-demo-app"
}
},
"VolumesFrom":[
{
"SourceContainer":"simple-app"
}
]
}
],
"Volumes":[
{
"Name":"my-vol"
}
]
}
},
"ECSALB":{
"Type":"AWS::ElasticLoadBalancingV2::LoadBalancer",
"Properties":{
"Name":"ECSALB",
"Scheme":"internet-facing",
"LoadBalancerAttributes":[
{
"Key":"idle_timeout.timeout_seconds",
"Value":"30"
}
],
"Subnets":{
"Ref":"SubnetId"
},
"SecurityGroups":[
{
"Ref":"EcsSecurityGroup"
}
]
}
},
"ALBListener":{
"Type":"AWS::ElasticLoadBalancingV2::Listener",
"DependsOn":"ECSServiceRole",
"Properties":{
"DefaultActions":[
{
"Type":"forward",
"TargetGroupArn":{
"Ref":"ECSTG"
}
}
],
"LoadBalancerArn":{
"Ref":"ECSALB"
},
"Port":"80",
"Protocol":"HTTP"
}
},
"ECSALBListenerRule":{
"Type":"AWS::ElasticLoadBalancingV2::ListenerRule",
"DependsOn":"ALBListener",
"Properties":{
"Actions":[
{
"Type":"forward",
"TargetGroupArn":{
"Ref":"ECSTG"
}
}
],
"Conditions":[
{
"Field":"path-pattern",
"Values":[
"/"
]
}
],
"ListenerArn":{
"Ref":"ALBListener"
},
"Priority":1
}
},
"ECSTG":{
"Type":"AWS::ElasticLoadBalancingV2::TargetGroup",
"DependsOn":"ECSALB",
"Properties":{
"HealthCheckIntervalSeconds":10,
"HealthCheckPath":"/",
"HealthCheckProtocol":"HTTP",
"HealthCheckTimeoutSeconds":5,
"HealthyThresholdCount":2,
"Name":"ECSTG",
"Port":80,
"Protocol":"HTTP",
"UnhealthyThresholdCount":2,
"VpcId":{
"Ref":"VpcId"
}
}
},
"ECSAutoScalingGroup":{
"Type":"AWS::AutoScaling::AutoScalingGroup",
"Properties":{
"VPCZoneIdentifier":{
"Ref":"SubnetId"
},
"LaunchConfigurationName":{
"Ref":"ContainerInstances"
},
"MinSize":"1",
"MaxSize":{
"Ref":"MaxSize"
},
"DesiredCapacity":{
"Ref":"DesiredCapacity"
}
},
"CreationPolicy":{
"ResourceSignal":{
"Timeout":"PT300M"
}
},
"UpdatePolicy":{
"AutoScalingReplacingUpdate":{
"WillReplace":"true"
}
}
},
"ContainerInstances":{
"Type":"AWS::AutoScaling::LaunchConfiguration",
"Properties":{
"ImageId":{
"Fn::FindInMap":[
"AWSRegionToAMI",
{
"Ref":"AWS::Region"
},
"AMIID"
]
},
"SecurityGroups":[
{
"Ref":"EcsSecurityGroup"
}
],
"InstanceType":{
"Ref":"InstanceType"
},
"IamInstanceProfile":{
"Ref":"EC2InstanceProfile"
},
"KeyName":{
"Ref":"KeyName"
},
"UserData":{
"Fn::Base64": {
"Fn::Join": [
"",
[
"#!/bin/bash\n",
"# Install the files and packages from the metadata\n",
"sudo /opt/aws/bin/cfn-init -v ",
" --stack ",
{
"Ref": "AWS::StackName"
},
" --resource ContainerInstances ",
" --region ",
{
"Ref": "AWS::Region"
},
"\n",
"sudo yum -y update \n",
"# Signal the status from cfn-init\n",
"sudo /opt/aws/bin/cfn-signal -e $? ",
" --stack ",
{
"Ref": "AWS::StackName"
},
" --resource ECSAutoScalingGroup ",
" --region ",
{
"Ref": "AWS::Region"
},
"\n"
]
]
}
}
}
},
"service":{
"Type":"AWS::ECS::Service",
"DependsOn":"ALBListener",
"Properties":{
"Cluster":{
"Ref":"ECSCluster"
},
"DesiredCount":"1",
"LoadBalancers":[
{
"ContainerName":"simple-app",
"ContainerPort":"80",
"TargetGroupArn":{
"Ref":"ECSTG"
}
}
],
"Role":{
"Ref":"ECSServiceRole"
},
"TaskDefinition":{
"Ref":"taskdefinition"
}
}
},
"ECSServiceRole":{
"Type":"AWS::IAM::Role",
"Properties":{
"AssumeRolePolicyDocument":{
"Statement":[
{
"Effect":"Allow",
"Principal":{
"Service":[
"ecs.amazonaws.com"
]
},
"Action":[
"sts:AssumeRole"
]
}
]
},
"Path":"/",
"Policies":[
{
"PolicyName":"ecs-service",
"PolicyDocument":{
"Statement":[
{
"Effect":"Allow",
"Action":[
"elasticloadbalancing:DeregisterInstancesFromLoadBalancer",
"elasticloadbalancing:DeregisterTargets",
"elasticloadbalancing:Describe*",
"elasticloadbalancing:RegisterInstancesWithLoadBalancer",
"elasticloadbalancing:RegisterTargets",
"ec2:Describe*",
"ec2:AuthorizeSecurityGroupIngress"
],
"Resource":"*"
}
]
}
}
]
}
},
"ServiceScalingTarget":{
"Type":"AWS::ApplicationAutoScaling::ScalableTarget",
"DependsOn":"service",
"Properties":{
"MaxCapacity":2,
"MinCapacity":1,
"ResourceId":{
"Fn::Join":[
"",
[
"service/",
{
"Ref":"ECSCluster"
},
"/",
{
"Fn::GetAtt":[
"service",
"Name"
]
}
]
]
},
"RoleARN":{
"Fn::GetAtt":[
"AutoscalingRole",
"Arn"
]
},
"ScalableDimension":"ecs:service:DesiredCount",
"ServiceNamespace":"ecs"
}
},
"ServiceScalingPolicy":{
"Type":"AWS::ApplicationAutoScaling::ScalingPolicy",
"Properties":{
"PolicyName":"AStepPolicy",
"PolicyType":"StepScaling",
"ScalingTargetId":{
"Ref":"ServiceScalingTarget"
},
"StepScalingPolicyConfiguration":{
"AdjustmentType":"PercentChangeInCapacity",
"Cooldown":60,
"MetricAggregationType":"Average",
"StepAdjustments":[
{
"MetricIntervalLowerBound":0,
"ScalingAdjustment":200
}
]
}
}
},
"ALB500sAlarmScaleUp":{
"Type":"AWS::CloudWatch::Alarm",
"Properties":{
"EvaluationPeriods":"1",
"Statistic":"Average",
"Threshold":"10",
"AlarmDescription":"Alarm if our ALB generates too many HTTP 500s.",
"Period":"60",
"AlarmActions":[
{
"Ref":"ServiceScalingPolicy"
}
],
"Namespace":"AWS/ApplicationELB",
"Dimensions":[
{
"Name":"LoadBalancer",
"Value":{
"Fn::GetAtt" : [
"ECSALB",
"LoadBalancerFullName"
]
}
}
],
"ComparisonOperator":"GreaterThanThreshold",
"MetricName":"HTTPCode_ELB_5XX_Count"
}
},
"EC2Role":{
"Type":"AWS::IAM::Role",
"Properties":{
"AssumeRolePolicyDocument":{
"Statement":[
{
"Effect":"Allow",
"Principal":{
"Service":[
"ec2.amazonaws.com"
]
},
"Action":[
"sts:AssumeRole"
]
}
]
},
"Path":"/",
"Policies":[
{
"PolicyName":"ecs-service",
"PolicyDocument":{
"Statement":[
{
"Effect":"Allow",
"Action":[
"ec2:DescribeTags",
"ecs:CreateCluster",
"ecs:DeregisterContainerInstance",
"ecs:DiscoverPollEndpoint",
"ecs:Poll",
"ecs:RegisterContainerInstance",
"ecs:StartTelemetrySession",
"ecs:UpdateContainerInstancesState",
"ecs:Submit*",
"ecr:GetAuthorizationToken",
"ecr:BatchCheckLayerAvailability",
"ecr:GetDownloadUrlForLayer",
"ecr:BatchGetImage",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource":"*"
}
]
}
}
]
}
},
"AutoscalingRole":{
"Type":"AWS::IAM::Role",
"Properties":{
"AssumeRolePolicyDocument":{
"Statement":[
{
"Effect":"Allow",
"Principal":{
"Service":[
"application-autoscaling.amazonaws.com"
]
},
"Action":[
"sts:AssumeRole"
]
}
]
},
"Path":"/",
"Policies":[
{
"PolicyName":"service-autoscaling",
"PolicyDocument":{
"Statement":[
{
"Effect":"Allow",
"Action":[
"application-autoscaling:*",
"cloudwatch:DescribeAlarms",
"cloudwatch:PutMetricAlarm",
"ecs:DescribeServices",
"ecs:UpdateService"
],
"Resource":"*"
}
]
}
}
]
}
},
"EC2InstanceProfile":{
"Type":"AWS::IAM::InstanceProfile",
"Properties":{
"Path":"/",
"Roles":[
{
"Ref":"EC2Role"
}
]
}
}
},
"Outputs":{
"ecsservice":{
"Value":{
"Ref":"service"
}
},
"ecscluster":{
"Value":{
"Ref":"ECSCluster"
}
},
"ECSALB":{
"Description":"Your ALB DNS URL",
"Value":{
"Fn::Join":[
"",
[
{
"Fn::GetAtt":[
"ECSALB",
"DNSName"
]
}
]
]
}
},
"taskdef":{
"Value":{
"Ref":"taskdefinition"
}
}
}
}*
It got stuck in creating the service resource.
When I try to debug this, I found in the log on EC2 instance for ecs-agent docker:
Registration completed successfully. I am running as 'arn:aws:ecs:us-east-1:504254995642:container-instance/22a5c138-61b0-454f-b64e-f49a76fc6cbe' in cluster 'default'
Please can you suggest how can I configure it to 'my-cluster'
You'll need to add ECS_CLUSTER=my_cluster to /etc/ecs/ecs.config in userData script. That way you're telling ecs-agent to register itself to the correct ECS cluster.
From here.
Here is an example of doing this.
Hope it helps.

"Invalid JSON payload received." when creating a new sheet

I'm just starting out with the Sheets API, and I'm following this setup to create a new sheet: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/create
In this code, the spreadsheetBody object is empty. For this I've used the example on this page: https://developers.google.com/sheets/api/samples/writing and added this code to the spreadsheetBody variable:
{
"range": "Sheet1!A1:D5",
"majorDimension": "ROWS",
"values": [
["Item", "Cost", "Stocked", "Ship Date"],
["Wheel", "$20.50", "4", "3/1/2016"],
["Door", "$15", "2", "3/15/2016"],
["Engine", "$100", "1", "30/20/2016"],
["Totals", "=SUM(B2:B4)", "=SUM(C2:C4)", "=MAX(D2:D4)"]
],
}
However, when I post this I get the error "Invalid JSON payload received. Unknown name "range" at 'spreadsheet': Cannot find field.". What might be wrong here?
The request body you are using is for spreadsheets.values.update.
As a sample, the request body for creating Spreadsheet is as follows. In this sample request body, ["Item", "Cost", "Stocked", "Ship Date"], ["Wheel", "$20.50", "4", "3/1/2016"] was used from the document you use.
Sample request body:
{
"properties":
{
"title": "sampleSpreadsheet"
},
"sheets":
[
{
"data":
[
{
"startRow": 0,
"startColumn": 0,
"rowData":
[
{
"values":
[
{
"userEnteredValue":
{
"stringValue": "Item"
}
},
{
"userEnteredValue":
{
"stringValue": "Cost"
}
},
{
"userEnteredValue":
{
"stringValue": "Stocked"
}
},
{
"userEnteredValue":
{
"stringValue": "Ship Date"
}
}
]
},
{
"values":
[
{
"userEnteredValue":
{
"stringValue": "Wheel"
}
},
{
"userEnteredValue":
{
"numberValue": 20.5
},
"userEnteredFormat":
{
"numberFormat":
{
"type": "NUMBER",
"pattern": "$##.00"
}
}
},
{
"userEnteredValue":
{
"numberValue": 4
}
},
{
"userEnteredValue":
{
"numberValue": 42372
},
"userEnteredFormat":
{
"numberFormat":
{
"type": "DATE",
"pattern": "d/m/yyyy"
}
}
}
]
}
]
}
]
}
]
}
Note:
When this request body is used for spreadsheets.create, a Spreadsheet with the filename of sampleSpreadsheet is created. The sheet has the values of ["Item", "Cost", "Stocked", "Ship Date"], ["Wheel", "$20.50", "4", "3/1/2016"] at "A1:D2".
References:
spreadsheets.create- spreadsheets.batchUpdate

OData don't connect with SAP Web IDE (local installation)

I used automatical OData connection with SAP Web IDE. Unfortunately, Data don't connect and Layout Editor says that Data Set "not defined". I have tried to connect by coding, for example <Table items={/Stats}>, but it doesn't work either. When I use project template (Master-Detail or Worklist), there are no problems with connection and Data is automatically connecting, but when I want to make my project and make a connection, there are always some problems.
Component.js
sap.ui.define([
"sap/ui/core/UIComponent",
"sap/ui/Device",
"Statusverwaltung/model/models"
], function(UIComponent, Device, models) {
"use strict";
return UIComponent.extend("Statusverwaltung.Component", {
metadata: {
manifest: "json"
},
config : {
"resourceBundle" : "i18n/i18n.properties",
"titleResource" : "SHELL_TITLE",
"serviceConfig" : {
name: "UI5STAT1_SRV",
serviceUrl: "/sap/opu/odata/kernc/UI5STAT1_SRV/"
}
},
/**
* The component is initialized by UI5 automatically during the startup of the app and calls the init method once.
* #public
* #override
*/
init: function() {
// call the base component's init function
UIComponent.prototype.init.apply(this, arguments);
// set the device model
this.setModel(models.createDeviceModel(), "device");
}
});
});
Manifest.json
{
"_version": "1.1.0",
"sap.app": {
"_version": "1.1.0",
"id": "Statusverwaltung",
"type": "application",
"i18n": "i18n/i18n.properties",
"applicationVersion": {
"version": "1.0.0"
},
"title": "{{appTitle}}",
"description": "{{appDescription}}",
"sourceTemplate": {
"id": "servicecatalog.connectivityComponent",
"version": "0.0.0"
},
"dataSources": {
"UI5STAT1_SRV": {
"uri": "/sap/opu/odata/kernc/UI5STAT1_SRV/",
"type": "OData",
"settings": {
"odataVersion": "2.0",
"localUri": "webapp/localService/UI5STAT1_SRV/metadata.xml"
}
}
}
},
"sap.ui": {
"_version": "1.1.0",
"technology": "UI5",
"icons": {
"icon": "",
"favIcon": "",
"phone": "",
"phone#2": "",
"tablet": "",
"tablet#2": ""
},
"deviceTypes": {
"desktop": true,
"tablet": true,
"phone": true
},
"supportedThemes": ["sap_hcb", "sap_bluecrystal"]
},
"sap.ui5": {
"_version": "1.1.0",
"rootView": {
"viewName": "Statusverwaltung.view.View",
"type": "XML"
},
"dependencies": {
"minUI5Version": "1.30.0",
"libs": {
"sap.ui.core": {},
"sap.m": {},
"sap.ui.layout": {}
}
},
"contentDensities": {
"compact": true,
"cozy": true
},
"models": {
"i18n": {
"type": "sap.ui.model.resource.ResourceModel",
"settings": {
"bundleName": "Statusverwaltung.i18n.i18n"
}
}
},
"resources": {
"css": [{
"uri": "css/style.css"
}]
},
"routing": {
"targets": {
"View": {
"viewType": "XML",
"transition": "slide",
"clearAggregation": true,
"viewName": "View",
"viewId": "View"
}
}
}
}
}
neo-app.json
{
"welcomeFile": "/webapp/index.html",
"routes": [
{
"path": "/resources",
"target": {
"type": "service",
"name": "sapui5",
"entryPath": "/resources"
},
"description": "SAPUI5 Resources"
},
{
"path": "/test-resources",
"target": {
"type": "service",
"name": "sapui5",
"entryPath": "/test-resources"
},
"description": "SAPUI5 Test Resources"
},
{
"path": "/sap/opu/odata",
"target": {
"type": "destination",
"name": "v01",
"entryPath": "/sap/opu/odata"
},
"description": "V01 description"
}
],
"sendWelcomeFileRedirect": true
}
.project.json
{
"projectType": [
"sap.watt.uitools.ide.fiori",
"sap.watt.uitools.ide.web",
"sap.watt.saptoolsets.fiori.project.ui5template.smartProject",
"sap.watt.saptoolsets.fiori.project.uiadaptation"
],
"build": {
"targetFolder": "dist",
"sourceFolder": "webapp"
},
"generation": [
{
"templateId": "ui5template.basicSAPUI5ApplicationProject",
"templateVersion": "1.32.0",
"dateTimeStamp": "Mon, 17 Oct 2016 08:28:52 GMT"
},
{
"templateId": "servicecatalog.connectivityComponent",
"templateVersion": "0.0.0",
"dateTimeStamp": "Mon, 17 Oct 2016 10:10:52 GMT"
},
{
"templateId": "uiadaptation.changespreviewjs",
"templateVersion": "0.0.0",
"dateTimeStamp": "Tue, 18 Oct 2016 08:08:06 GMT"
}
],
"translation": {
"translationDomain": "",
"supportedLanguages": "en,fr,de",
"defaultLanguage": "en",
"defaultI18NPropertyFile": "i18n.properties",
"resourceModelName": "i18n"
},
"basevalidator": {
"services": {
"xml": "fioriXmlAnalysis",
"js": "fioriJsValidator"
}
},
"codeCheckingTriggers": {
"notifyBeforePush": true,
"notifyBeforePushLevel": "Error",
"blockPush": false,
"blockPushLevel": "Error"
},
"mockpreview": {
"mockUri": "/sap/opu/odata/kernc/UI5STAT1_SRV/",
"metadataFilePath": "webapp/localService/UI5STAT1_SRV/metadata.xml",
"loadJSONFiles": false,
"loadCustomRequests": false,
"mockRequestsFilePath": ""
}
}
It seems like you are never instantiating a model.
You can do that in the manifest.json
"models": {
"i18n": {
"type": "sap.ui.model.resource.ResourceModel",
"settings": {
"bundleName": "Statusverwaltung.i18n.i18n"
}
},
"": {
"dataSource":"UI5STAT1_SRV"
}
},
"" defines the default model so you can use Bindingpaths like {/Stats}.

Resources