Seems like anchor tag will not support default attribute. Also name attribute is invalid for anchor tag. With this you can only use < view name="abc" default="true" />
In order to pass values as querystring by default to dashboard, following are your options based on your use cases:
Scenario 1
If you do not want users to see or modify values for index and query fields, you need to set them as token within a dummy search.
Add the following code in Simple XML using Source editor.
<!-- Dummy Search running without a query. Just to set default tokens -->
<search>
<query></query>
<preview>
<set token="q">search</set>
<set token="index">abc</set>
</preview>
</search>
Then use $q$ and $index$ later on in your query, which I think is already present in your existing Dashboard code.
Scenario 2
Only for Splunk 6.5
Splunk 6.5 has introduced <init> section in Simple XML Views which allows users to set default values on page load through token. Refer to Splunk 6.x Dashboard Examples for Set tokens on page load example.
<init>
<set token="index">abc</token>
<set token="q">search</token>
</init>
Scenario 3
If you want any of the values like index to be changed later on after first time load, you can add two new fields Dropdown (Dynamic with values defined by you) or Textbox (Dynamic with values set by user). Let me take dropdown example.
Add new Dropdown and choose Label as "Select Index".
Under Token Option add Token as index.
Check Search on Change. (This will be required for dashboard refresh with selected value even for first time load).
Under Static Options choose Name as abc and Value as abc.
Next, select Default as abc
Similarly, Add new Dropdown for "Select Query"
Add Token as q
Check Search on Change.
Provide Static Name and Value as search
Finally, select Default as search.
In your existing dashabord you can continue to use $index$ and $q$ as the tokens which will be loaded with default values once the dashboard is loaded.
Disadvantage of 2nd approach is that two token fields will be visible to users.
Advantage could be that you can use Dynamic Options to provide list of indexes in case you need them.
Please try out and let me know if this helps, or if you need further assistance.
NOTE: In either of the above two approaches you will have to use view tag to set default dashboard in your navigation menu XML i.e. < view name="abc" default="true" />
... View more