mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Added categories and search based filtering to the resource dialog. (#12658)
* added filtering to the resource type along with a new component. * -Added caching of cards -Removed unused component props -localized tags -limited the scope of list items * Made some changes in the PR * - Added Iot Category to SQL edge - Moved category names to constants - Moved localization strings to localized constants - Made filtering logic more concise - Changed how category list is generated --Category list can now be ordered -Added back event generation for selectedCard * Fixed bugs, and some additional changes -Fixed radiogroup height to avoid the movement of options below it -Restoring the focus back to the search and listview components - Added focus behaviour for listview - Fixed a typo in comment * Made categories an Enum * Added localized string * localized category string converted categories to enum. * made the filtering logic more concise. * returning string if no localized string formed removed unnecessary returns * fixed the filtering tag logic resetting search when category is changed * removing the iot tag from sql edge deployment * made filtering logic more concise made enum const * added vscode list * some cleanup * Some PR changes - Made PR camelcase - added comments to SQL - removed unnecessary export * -Some PR related changes -Removing unsupported style property -scoping down css and removing unused ones. * Fixed a comment text * Fixed typings for listview event
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
import { ResourceTypeCategories } from './constants';
|
||||
import { FieldType, OptionsType } from './interfaces';
|
||||
|
||||
const localize = nls.loadMessageBundle();
|
||||
@@ -34,5 +35,29 @@ export const optionsTypeRadioOrDropdown = localize('optionsTypeRadioOrDropdown',
|
||||
export const azdataEulaNotAccepted = localize('azdataEulaNotAccepted', "Deployment cannot continue. Azure Data CLI license terms have not yet been accepted. Please accept the EULA to enable the features that requires Azure Data CLI.");
|
||||
export const azdataEulaDeclined = localize('azdataEulaDeclined', "Deployment cannot continue. Azure Data CLI license terms were declined.You can either Accept EULA to continue or Cancel this operation");
|
||||
export const acceptEulaAndSelect = localize('deploymentDialog.RecheckEulaButton', "Accept EULA & Select");
|
||||
|
||||
export const resourceTypePickerDialogTitle = localize('resourceTypePickerDialog.title', "Select the deployment options");
|
||||
export const resourceTypeSearchBoxDescription = localize('resourceTypePickerDialog.resourceSearchPlaceholder', "Filter resources...");
|
||||
export const resoucrceTypeCategoryListViewTitle = localize('resourceTypePickerDialog.tagsListViewTitle', 'Categories');
|
||||
|
||||
export const scriptToNotebook = localize('ui.ScriptToNotebookButton', "Script");
|
||||
export const deployNotebook = localize('ui.DeployButton', "Run");
|
||||
|
||||
export function getResourceTypeCategoryLocalizedString(resourceTypeCategory: string): string {
|
||||
switch (resourceTypeCategory) {
|
||||
case ResourceTypeCategories.All:
|
||||
return localize('resourceTypePickerDialog.resourceTypeCategoryAll', "All");
|
||||
case ResourceTypeCategories.OnPrem:
|
||||
return localize('resourceTypePickerDialog.resourceTypeCategoryOnPrem', "On-premises");
|
||||
case ResourceTypeCategories.SqlServer:
|
||||
return localize('resourceTypePickerDialog.resourceTypeCategoriesSqlServer', "SQL Server");
|
||||
case ResourceTypeCategories.Hybrid:
|
||||
return localize('resourceTypePickerDialog.resourceTypeCategoryOnHybrid', "Hybrid");
|
||||
case ResourceTypeCategories.PostgreSql:
|
||||
return localize('resourceTypePickerDialog.resourceTypeCategoryOnPostgreSql', "PostgreSQL");
|
||||
case ResourceTypeCategories.Cloud:
|
||||
return localize('resourceTypePickerDialog.resourceTypeCategoryOnCloud', "Cloud");
|
||||
default:
|
||||
return resourceTypeCategory;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user