mirror of
https://github.com/ansible/awx.git
synced 2026-01-29 15:24:42 -03:30
* Part 1: building new search components Directives: smart-search, column-sort, paginate Service: QuerySet Model: DjangoSearchModel * Part 2: Implementing new search components, de-implementing old search components Remove old code: * tagSearch directive * old pagination strategy * old column sorting strategy * lookup Add new directives to list/form generator: * smart-search, * paginate * column-sort Connect $state + dataset resolution * upgrade ui-router lib to v1.0.0-beta3 * Custom $urlMatcherFactory.type - queryset * Render lists, forms, related, lookups in named views * Provide html templates in list/form/lookup/related state definitions * Provide dataset through resolve block in state definitions Update utilities * isEmpty filter * use async validation strategy in awlookup directive * Part 3: State implementations (might split into per-module commits) * Support optional state definition flag: squashSearchUrl. *_search params are only URI-encoded if squashSearchUrl is falsey. * * Fix list badge counts * Clear search input after search term(s) applied * Chain of multiple search terms in one submission * Hook up activity stream * Hook up portal mode * Fix pagination range calculations * Hook up organization sub-list views * Hook up listDefinition.search defaults * Fix ng-disabled conditions reflecting RBAC access on form fields * Fix actively-editing indicator in generated lists * form generator - fix undefined span, remove dead event listeners * wrap hosts/groups lists in a panel, fix groups list error * Smart search directive: clear all search tags * Search tags - ‘Clear All’ text - 12px Search key - remove top padding/margin Search key - reverse bolding of relationship fields / label, add commas Search tags - remove padding-bottom Lookup modal - “X” close button styled incorrectly Lookup modal - List title not rendered Lookup modal - 20px margin between buttons * Portal Mode Fix default column-sort on jobs list Hide column-oort on job status column Apply custom search bar sizes * stateDefinition.factory Return ES6 Promise instead of $q promise. $q cannot be safely provided during module.config() phase Some generated state trees (inventory / inventoryManage) need to be reduced to one promise. Side-step issues caused by ui-router de-registering ALL registered states that match placeholder state name/url pattern. e.g. inventories.lazyLoad() would de-register inventoryManage states if a page refresh occured @ /#/inventories/** * Combine generated state trees: inventories + inventoryManage Hook up inventory sync schedule list/form add /form edit views * Hook up system job schedule list/add/edit states * Fix breadcrumb of generated states in /setup view Fix typo in scheduler search prefix * Remove old search system deritus from list definitions * Fix breadcrumb definitions in states registered in app.js config block * Transclude list action buttons in generated form lists * Lookup Modal passes acceptance criterea: Modal cancel/exit - don’t update form field’s ng-model Modal save - do update form field's ng-model Transclude generated list contents into <lookup-modal> directive Lookup modal test spec * Fix typo in merge conflict resolution * Disable failing unit tests pending revision * Integrate smart-search architechture into add-permissions modal * use a semicolon delimiter instead of comma to avoid collision with django __in comparator * Hook up Dashboard > Hosts states, update Dashboard Inventory/Project counts with new search filters * Misc bug splat Add 20px spacing around root ui-view Fix missing closing div in related views Remove dupe line in smart-search controller * Remove defunct LookupHelper code * Rebuild inventories list status tooltips on updates to dataset Code cleanup - remove defunct modules Remove LookupHelper / LookupInit code Remove pre-RBAC permissions module * Add mising stateTree / basePath properties to form definitions * Resolve i18n conflicts in list and form generator Freeze dependencies * Integrate sockets * Final bug splat: fix jobs > job details and jobs > scheduled routing fix mis-resolved merge conflicts swap console.info for $log.debug
97 lines
3.1 KiB
JavaScript
97 lines
3.1 KiB
JavaScript
var path = require('path'),
|
|
webpack = require('webpack');
|
|
|
|
module.exports = function(config) {
|
|
config.set({
|
|
autoWatch: true,
|
|
colors: true,
|
|
logLevel: config.LOG_INFO,
|
|
browsers: ['Chrome', 'Firefox'],
|
|
coverageReporter: {
|
|
reporters: [
|
|
{ type: 'html', subdir: 'html' },
|
|
]
|
|
},
|
|
frameworks: [
|
|
'jasmine',
|
|
],
|
|
reporters: ['progress', 'coverage', 'junit'],
|
|
files: [
|
|
'./client/src/app.js',
|
|
'./node_modules/angular-mocks/angular-mocks.js',
|
|
{ pattern: './tests/**/*-test.js' },
|
|
'client/src/**/*.html'
|
|
],
|
|
preprocessors: {
|
|
'./client/src/app.js': ['webpack', 'sourcemap'],
|
|
'./tests/**/*-test.js': ['webpack', 'sourcemap'],
|
|
'client/src/**/*.html': ['html2js']
|
|
},
|
|
webpack: {
|
|
plugins: [
|
|
// Django-provided definitions
|
|
new webpack.DefinePlugin({
|
|
$basePath: '/static/'
|
|
}),
|
|
// vendor shims:
|
|
// [{expected_local_var : dependency}, ...]
|
|
new webpack.ProvidePlugin({
|
|
$: 'jquery',
|
|
jQuery: 'jquery',
|
|
'window.jQuery': 'jquery',
|
|
_: 'lodash',
|
|
'CodeMirror': 'codemirror',
|
|
'$.fn.datepicker': 'bootstrap-datepicker'
|
|
})
|
|
],
|
|
module: {
|
|
loaders: [{
|
|
test: /\.angular.js$/,
|
|
loader: 'expose?angular'
|
|
},
|
|
|
|
{
|
|
test: /\.js$/,
|
|
loader: 'babel-loader',
|
|
include: [path.resolve() + '/tests/'],
|
|
exclude: '/(node_modules)/',
|
|
query: {
|
|
presets: ['es2015']
|
|
}
|
|
}, {
|
|
test: /\.js$/,
|
|
loader: 'babel-loader',
|
|
include: [path.resolve() + '/client/src/'],
|
|
exclude: '/(node_modules)/',
|
|
query: {
|
|
presets: ['es2015'],
|
|
plugins: ['istanbul']
|
|
}
|
|
}
|
|
]
|
|
},
|
|
resolve: {
|
|
root: [],
|
|
modulesDirectory: ['node_modules'],
|
|
alias: {
|
|
'jquery.resize': path.resolve() + '/node_modules/javascript-detect-element-resize/jquery.resize.js',
|
|
'select2': path.resolve() + '/node_modules/select2/dist/js/select2.full.js'
|
|
}
|
|
},
|
|
devtool: 'inline-source-map',
|
|
debug: true,
|
|
cache: true
|
|
},
|
|
webpackMiddleware: {
|
|
stats: {
|
|
colors: true
|
|
}
|
|
},
|
|
junitReporter: {
|
|
outputDir: 'coverage',
|
|
outputFile: 'ui-unit-test-results.xml',
|
|
useBrowserName: false
|
|
}
|
|
});
|
|
};
|