Solr Default Query in Admin UI does not work - solr

I am changing the default query for the UI in solrconfig.xml but it does not change the default query in the Admin UI. It says legacy config but I don't know where else I should change it to refresh the admin UI. I have reloaded the collection and restarted Solr.
<!-- Legacy config for the admin interface -->
<admin>
<defaultQuery>*:*</defaultQuery>
</admin>
Any ideas?

You can change this by editing the query.html file in the /tpl directory of the webapp.
<textarea name="q" id="q" title="The query string.">*:*</textarea>

Related

Where to put user configuration fields for a custom component in Salesforce

I've built a custom lightning component that is embedded in Record pages, but I can't figure out from documentation how to setup a configuration area for the User to put their data for the component. Can somebody point me in the right directions ?
From the documentation:
Use a design resource to control which attributes are exposed to builder tools like the Lightning App Builder, Community Builder, or Cloud Flow Designer. A design resource lives in the same folder as your .cmp resource, and describes the design-time behavior of the Lightning component—information that visual tools need to display the component in a page or app.
Here's the example given in on that page:
<design:component label="Hello World">
<design:attribute name="subject" label="Subject" description="Name of the person you want to greet" />
<design:attribute name="greeting" label="Greeting" />
</design:component>
By following these instructions, users will be able to configure the input data within Lightning App Builder.

How to show in link Google's universal navigation in multi-language?

As you see below, I set multi-language in Google's universal navigation for my app, but it does not work! it is always displayed in Japanese.
<Extension id="navlink" type="link">
<Name>テスト</Name>
<Name language="en">Test</Name>
<Url>https://test.appspot.com/domain/${DOMAIN_NAME}</Url>
<Scope ref="calendarAPI"/>
</Extension>
Could you show me any idea?
This is a known issue with Google Apps Marketplace. We are hoping to address this next year.

Dynamic html content depending on user's role

I am developing single page application style web application.
I want to create menu based on user's role, for example, for admin users I want show admin menu and html content, for general users I want to show different html content.
I am using asp.net mvc with Razor view engine, so this could be achieved by Razor code as follow :
#if (#User.IsInRole("Admin"){
-- html content for admin --
}else if (#User.IsInRole("General"){
-- html content for general user --
}else{
-- html content for the other users --
}
This was the typical way when I was developing web application in traditional way in the past, however since I started developing single page application style web application, I tried to write pure html code and avoided using server side view engile such as Razor, WebForm in asp.net or Velocity, Jsp tag library in Java EE. I want to write more independent front-end code without server code dependency.
Anyhow, above code can be changed as follow when I use javascript and knockoutjs instead of Razor,
<!-- ko if: isAdmin -->
-- html content for admin --
<!-- /ko -->
<!-- ko if: isGeneralUser -->
-- html content for general user --
<!-- /ko -->
<!-- ko if: isOtherUser -->
-- html content for the other users --
<!-- /ko -->
isAdmin, isGeneralUser and isOtherUser are properties of viewmodel and these values will be set via ajax call which check user's role.
What I am wondering is whether this sort of way to controll content upon user's role is fine or not from security's perspective?
How do you handle view content if those views are different depending on user's role?
I would like to how do you guys handle this kind of situation.
I would use a template binding
<div data-bind="template: { name: template, data: model }"></div>
On the viewmodel set the correct template and model depending on User role, also, you still need to protect the role specific methods server side
A little side note, I've done a little framework for Convention bound templates, its perfect for scenarios like this, its not done yet so I would wait to use it in a production site, but it will be ready in the coming weeks
The Template binding above would with my framework look like
<div data-bind="coc: model"></div>
If the ViewModel is named AdminViewModel than my library will look for a templte named AdminView
A little fiddle http://jsfiddle.net/2Uvd5/1/
edit: Fore a more accurate example on what you wanna do
http://jsfiddle.net/XaZxj/

Force.com Migration Tool : Email Templates

I am looking to retrieve all email templates using Force.com ant migration tool. I believe we can not have bulk retrieve for Email Templates, Reports etc.
Is there any way we can retrieve all email templates in one go without specifying each template name? I believe we can some custom implementation using Metadata API, but wondering if someone has already implemented custom ant task for it.
Thanks in advance.
Email Templates, Reports etc. are in folders, so you must provide the containingFolder attribute to the sf:bulkRetrieve task and you'll get back all the items in that folder. For example:
<sf:bulkRetrieve
username="${sf.username}"
password="${sf.password}"
serverurl="${sf.serverurl}"
retrieveTarget="retrieveUnpackaged"
metadataType="EmailTemplate"
containingFolder="SalesTemplates"
/>
To find the folder names themselves, you can query the Folder object and filter on the Type column for the metadata type you are interested in. For example:
SELECT DeveloperName FROM Folder WHERE Type = 'Email'
Have you tried having the following in your mainfest file.? It should retrieve all the Email Templates:
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>*</members>
<name>EmailTemplate</name>
</types>
<version>23.0</version>
</Package>
If you have the folder/ template names, you can deploy individually, just not using wildcards.
(You could probably script out the member list and construct a dynamic .xml build file)
<types>
<members>Simple_Survey</members>
<members>Simple_Survey/Alert_Managers_NPS_Survey_Created</members>
<name>EmailTemplate</name>
</types>

What is the purpose of the VisitorIdentification control?

My Sitecore starterkit website contains the following control in the head of each layout. Can someone explain what it's purpose is and whether or not it's needed? I could not find any information on it on the Sitecore SDN...
<sc:VisitorIdentification id="VisitorIdentification" runat="server" />
Control's output:
<link href="/layouts/System/VisitorIdentification.aspx" rel="stylesheet" type="text/css" />
Contents of stylesheet:
.sc_visitor {
}
See Analytics Configuration reference, paragraph 4.1.5 "The VisitorIdentification Web control".
Just in case the link about becomes obsolete:
The VisitorIdentification Web control helps the Sitecore analytics engine identify robots. The
VisitorIdentification Web control generates an HTML <link> element that references an empty CSS
resource. The Sitecore analytics engine uses this request to help differentiate robots from actual users.
For more information about automatic robot detection, see the section Automatic Robot Detection.
Important
To assist the analytics engine in robot identification, include the VisitorIdentification Web control in all of
your layouts. For example:
<sc:VisitorIdentification runat="server" />
It is used for OMS/DMS. You can kind of compare it to the Google Analytics script. If you don't use Sitecore DMS, you can delete it

Resources