Reorganizes the network-ui code under awx/client/src/network-ui

* Moves network UI source to awx/client/src/network-ui
* Moves network ui partials to awx/ui/client/network-ui
* Renames widgets with suffix partial.svg
* Updates directives to use bundled partials
* Uses ~network-ui for loading UI component
This commit is contained in:
Ben Thomasson 2018-01-03 10:30:25 -05:00
parent f6eecad25e
commit 1c1844d889
No known key found for this signature in database
GPG Key ID: 5818EF4CC895D5F5
125 changed files with 244 additions and 167 deletions

View File

@ -1,6 +0,0 @@
/* Copyright (c) 2017 Red Hat, Inc. */
function button () {
return { restrict: 'A', templateUrl: '/static/network_ui/widgets/button.html' };
}
exports.button = button;

View File

@ -1,6 +0,0 @@
/* Copyright (c) 2017 Red Hat, Inc. */
function configuration () {
return { restrict: 'A', templateUrl: '/static/network_ui/widgets/configuration.html' };
}
exports.configuration = configuration;

View File

@ -1,6 +0,0 @@
/* Copyright (c) 2017 Red Hat, Inc. */
function cursor () {
return { restrict: 'A', templateUrl: '/static/network_ui/widgets/cursor.html' };
}
exports.cursor = cursor;

View File

@ -1,7 +0,0 @@
/* Copyright (c) 2017 Red Hat, Inc. */
function debug () {
return { restrict: 'A', templateUrl: '/static/network_ui/widgets/debug.html' };
}
exports.debug = debug;

View File

@ -1,6 +0,0 @@
/* Copyright (c) 2017 Red Hat, Inc. */
function defaultd () {
return { restrict: 'A', templateUrl: '/static/network_ui/widgets/default.html' };
}
exports.defaultd = defaultd;

View File

@ -1,6 +0,0 @@
/* Copyright (c) 2017 Red Hat, Inc. */
function deviceDetail () {
return { restrict: 'A', templateUrl: '/static/network_ui/widgets/device_detail.html' };
}
exports.deviceDetail = deviceDetail;

View File

@ -1,6 +0,0 @@
/* Copyright (c) 2017 Red Hat, Inc. */
function group () {
return { restrict: 'A', templateUrl: '/static/network_ui/widgets/group.html' };
}
exports.group = group;

View File

@ -1,6 +0,0 @@
/* Copyright (c) 2017 Red Hat, Inc. */
function host () {
return { restrict: 'A', templateUrl: '/static/network_ui/widgets/host.html' };
}
exports.host = host;

View File

@ -1,6 +0,0 @@
/* Copyright (c) 2017 Red Hat, Inc. */
function layer () {
return { restrict: 'A', templateUrl: '/static/network_ui/widgets/layer.html' };
}
exports.layer = layer;

View File

@ -1,6 +0,0 @@
/* Copyright (c) 2017 Red Hat, Inc. */
function link () {
return { restrict: 'A', templateUrl: '/static/network_ui/widgets/link.html' };
}
exports.link = link;

View File

@ -1,6 +0,0 @@
/* Copyright (c) 2017 Red Hat, Inc. */
function map () {
return { restrict: 'A', templateUrl: '/static/network_ui/widgets/map.html' };
}
exports.map = map;

View File

@ -1,6 +0,0 @@
/* Copyright (c) 2017 Red Hat, Inc. */
function awxNetworkUI () {
return { restrict: 'E', templateUrl: '/static/network_ui/widgets/network_ui.html' };
}
exports.awxNetworkUI = awxNetworkUI;

View File

@ -1,6 +0,0 @@
/* Copyright (c) 2017 Red Hat, Inc. */
function process () {
return { restrict: 'A', templateUrl: '/static/network_ui/widgets/process.html' };
}
exports.process = process;

View File

@ -1,6 +0,0 @@
/* Copyright (c) 2017 Red Hat, Inc. */
function quadrants () {
return { restrict: 'A', templateUrl: '/static/network_ui/widgets/quadrants.html' };
}
exports.quadrants = quadrants;

View File

@ -1,6 +0,0 @@
/* Copyright (c) 2017 Red Hat, Inc. */
function rack () {
return { restrict: 'A', templateUrl: '/static/network_ui/widgets/rack.html' };
}
exports.rack = rack;

View File

@ -1,5 +0,0 @@
/* Copyright (c) 2017 Red Hat, Inc. */
function rackIcon () {
return { restrict: 'A', templateUrl: '/static/network_ui/widgets/rack_icon.html' };
}
exports.rackIcon = rackIcon;

View File

@ -1,6 +0,0 @@
/* Copyright (c) 2017 Red Hat, Inc. */
function router () {
return { restrict: 'A', templateUrl: '/static/network_ui/widgets/router.html' };
}
exports.router = router;

View File

@ -1,6 +0,0 @@
/* Copyright (c) 2017 Red Hat, Inc. */
function site () {
return { restrict: 'A', templateUrl: '/static/network_ui/widgets/site.html' };
}
exports.site = site;

View File

@ -1,6 +0,0 @@
/* Copyright (c) 2017 Red Hat, Inc. */
function siteIcon () {
return { restrict: 'A', templateUrl: '/static/network_ui/widgets/site_icon.html' };
}
exports.siteIcon = siteIcon;

View File

@ -1,6 +0,0 @@
/* Copyright (c) 2017 Red Hat, Inc. */
function statusLight () {
return { restrict: 'A', templateUrl: '/static/network_ui/widgets/status_light.html' };
}
exports.statusLight = statusLight;

View File

@ -1,6 +0,0 @@
/* Copyright (c) 2017 Red Hat, Inc. */
function stencil () {
return { restrict: 'A', templateUrl: '/static/network_ui/widgets/stencil.html' };
}
exports.stencil = stencil;

View File

@ -1,6 +0,0 @@
/* Copyright (c) 2017 Red Hat, Inc. */
function stream () {
return { restrict: 'A', templateUrl: '/static/network_ui/widgets/stream.html' };
}
exports.stream = stream;

View File

@ -1,6 +0,0 @@
/* Copyright (c) 2017 Red Hat, Inc. */
function switchd () {
return { restrict: 'A', templateUrl: '/static/network_ui/widgets/switch.html' };
}
exports.switchd = switchd;

View File

@ -1,6 +0,0 @@
/* Copyright (c) 2017 Red Hat, Inc. */
function awxTablesUI () {
return { restrict: 'E', templateUrl: '/static/network_ui/widgets/tables_ui.html' };
}
exports.awxTablesUI = awxTablesUI;

View File

@ -1,6 +0,0 @@
/* Copyright (c) 2017 Red Hat, Inc. */
function taskStatus () {
return { restrict: 'A', templateUrl: '/static/network_ui/widgets/task_status.html' };
}
exports.taskStatus = taskStatus;

View File

@ -1,6 +0,0 @@
/* Copyright (c) 2017 Red Hat, Inc. */
function touch () {
return { restrict: 'A', templateUrl: '/static/network_ui/widgets/touch.html' };
}
exports.touch = touch;

View File

@ -22,6 +22,7 @@ const SRC_PATH = path.join(CLIENT_PATH, 'src');
const STATIC_PATH = path.join(UI_PATH, 'static');
const TEST_PATH = path.join(UI_PATH, 'test');
const THEME_PATH = path.join(LIB_PATH, 'theme');
const NETWORK_UI_PATH = path.join(SRC_PATH, 'network-ui');
const APP_ENTRY = path.join(SRC_PATH, 'app.js');
const VENDOR_ENTRY = path.join(SRC_PATH, 'vendor.js');
@ -97,6 +98,15 @@ const base = {
/src\//
]
},
{
test: /\.svg$/,
use: ['ngtemplate-loader', 'html-loader'],
include: [
/lib\/components\//,
/features\//,
/src\//
]
},
{
test: /\.json$/,
loader: 'json-loader',
@ -187,6 +197,7 @@ const base = {
'~test': TEST_PATH,
'~theme': THEME_PATH,
'~ui': UI_PATH,
'~network-ui': NETWORK_UI_PATH,
d3$: '~node_modules/d3/d3.min.js',
'codemirror.jsonlint$': '~node_modules/codemirror/addon/lint/json-lint.js',
jquery: '~node_modules/jquery/dist/jquery.js',

View File

@ -175,4 +175,4 @@
* Network Visualization Style
*
*/
@import '../../src/network_ui/style.less';
@import '../../src/network-ui/style.less';

View File

@ -10,7 +10,6 @@ if ($basePath) {
}
import start from './app.start';
// import networkUI from './../network_ui/static/network_ui/src/main.js';
import portalMode from './portal-mode/main';
import systemTracking from './system-tracking/main';
import inventoriesHosts from './inventories-hosts/main';
@ -47,7 +46,7 @@ import atLibComponents from '~components';
import atLibModels from '~models';
import atLibServices from '~services';
import network_ui from './network_ui/main';
import networkUI from '~network-ui/main';
start.bootstrap(() => {
angular.bootstrap(document.body, ['awApp']);
@ -100,7 +99,7 @@ angular
projects.name,
scheduler.name,
instanceGroups.name,
network_ui.tower.name,
networkUI.tower.name,
'Utilities',
'templates',

View File

@ -0,0 +1,8 @@
/* Copyright (c) 2017 Red Hat, Inc. */
const templateUrl = require('~network-ui/button.partial.svg');
function button () {
return { restrict: 'A', templateUrl};
}
exports.button = button;

View File

@ -1,9 +1,11 @@
/* Copyright (c) 2017 Red Hat, Inc. */
const templateUrl = require('~network-ui/chevron_left.partial.svg');
function chevronLeft () {
return {
restrict: 'A',
templateUrl: '/static/network_ui/widgets/chevron_left.svg',
templateUrl,
scope: {
actionIcon: '='
}

View File

@ -1,9 +1,11 @@
/* Copyright (c) 2017 Red Hat, Inc. */
const templateUrl = require('~network-ui/chevron_right.partial.svg');
function chevronRight () {
return {
restrict: 'A',
templateUrl: '/static/network_ui/widgets/chevron_right.svg',
templateUrl,
scope: {
actionIcon: '='
}

View File

@ -0,0 +1,8 @@
/* Copyright (c) 2017 Red Hat, Inc. */
const templateUrl = require('~network-ui/configuration.partial.svg');
function configuration () {
return { restrict: 'A', templateUrl};
}
exports.configuration = configuration;

View File

@ -1,9 +1,11 @@
/* Copyright (c) 2017 Red Hat, Inc. */
const templateUrl = require('~network-ui/context_menu_button.partial.svg');
function contextMenuButton () {
return {
restrict: 'A',
templateUrl: '/static/network_ui/widgets/context_menu_button.svg',
templateUrl,
scope: {
contextMenuButton: '=',
contextMenu: '='

View File

@ -1,9 +1,11 @@
/* Copyright (c) 2017 Red Hat, Inc. */
const templateUrl = require('~network-ui/context_menu.partial.svg');
function contextMenu () {
return {
restrict: 'A',
templateUrl: '/static/network_ui/widgets/context_menu.svg',
templateUrl,
scope: {
contextMenu: '='
}

View File

@ -0,0 +1,8 @@
/* Copyright (c) 2017 Red Hat, Inc. */
const templateUrl = require('~network-ui/cursor.partial.svg');
function cursor () {
return { restrict: 'A', templateUrl};
}
exports.cursor = cursor;

View File

@ -0,0 +1,9 @@
/* Copyright (c) 2017 Red Hat, Inc. */
const templateUrl = require('~network-ui/debug.partial.svg');
function debug () {
return { restrict: 'A', templateUrl};
}
exports.debug = debug;

View File

@ -0,0 +1,8 @@
/* Copyright (c) 2017 Red Hat, Inc. */
const templateUrl = require('~network-ui/default.partial.svg');
function defaultd () {
return { restrict: 'A', templateUrl};
}
exports.defaultd = defaultd;

View File

@ -0,0 +1,8 @@
/* Copyright (c) 2017 Red Hat, Inc. */
const templateUrl = require('~network-ui/device_detail.partial.svg');
function deviceDetail () {
return { restrict: 'A', templateUrl};
}
exports.deviceDetail = deviceDetail;

View File

@ -0,0 +1,8 @@
/* Copyright (c) 2017 Red Hat, Inc. */
const templateUrl = require('~network-ui/group.partial.svg');
function group () {
return { restrict: 'A', templateUrl};
}
exports.group = group;

View File

@ -0,0 +1,8 @@
/* Copyright (c) 2017 Red Hat, Inc. */
const templateUrl = require('~network-ui/host.partial.svg');
function host () {
return { restrict: 'A', templateUrl};
}
exports.host = host;

View File

@ -1,6 +1,8 @@
/* Copyright (c) 2017 Red Hat, Inc. */
const templateUrl = require('~network-ui/inventory_toolbox_clip_path.partial.svg');
function inventoryToolboxClipPath () {
return { restrict: 'A', templateUrl: '/static/network_ui/widgets/inventory_toolbox_clip_path.html' };
return { restrict: 'A', templateUrl};
}
exports.inventoryToolboxClipPath = inventoryToolboxClipPath;

View File

@ -1,6 +1,8 @@
/* Copyright (c) 2017 Red Hat, Inc. */
const templateUrl = require('~network-ui/inventory_toolbox.partial.svg');
function inventoryToolbox () {
return { restrict: 'A', templateUrl: '/static/network_ui/widgets/inventory_toolbox.html' };
return { restrict: 'A', templateUrl};
}
exports.inventoryToolbox = inventoryToolbox;

View File

@ -0,0 +1,8 @@
/* Copyright (c) 2017 Red Hat, Inc. */
const templateUrl = require('~network-ui/layer.partial.svg');
function layer () {
return { restrict: 'A', templateUrl};
}
exports.layer = layer;

View File

@ -0,0 +1,8 @@
/* Copyright (c) 2017 Red Hat, Inc. */
const templateUrl = require('~network-ui/link.partial.svg');
function link () {
return { restrict: 'A', templateUrl};
}
exports.link = link;

View File

@ -0,0 +1,8 @@
/* Copyright (c) 2017 Red Hat, Inc. */
const templateUrl = require('~network-ui/map.partial.svg');
function map () {
return { restrict: 'A', templateUrl};
}
exports.map = map;

View File

@ -0,0 +1,8 @@
/* Copyright (c) 2017 Red Hat, Inc. */
const templateUrl = require('~network-ui/network_ui.partial.svg');
function awxNetworkUI () {
return { restrict: 'E', templateUrl};
}
exports.awxNetworkUI = awxNetworkUI;

View File

@ -1,6 +1,8 @@
/* Copyright (c) 2017 Red Hat, Inc. */
const templateUrl = require('~network-ui/network_widgets.partial.svg');
function awxNetworkWidgets () {
return { restrict: 'E', templateUrl: '/static/network_ui/widgets/network_widgets.html' };
return { restrict: 'E', templateUrl};
}
exports.awxNetworkWidgets = awxNetworkWidgets;

View File

@ -0,0 +1,8 @@
/* Copyright (c) 2017 Red Hat, Inc. */
const templateUrl = require('~network-ui/process.partial.svg');
function process () {
return { restrict: 'A', templateUrl};
}
exports.process = process;

View File

@ -0,0 +1,8 @@
/* Copyright (c) 2017 Red Hat, Inc. */
const templateUrl = require('~network-ui/quadrants.partial.svg');
function quadrants () {
return { restrict: 'A', templateUrl};
}
exports.quadrants = quadrants;

View File

@ -0,0 +1,8 @@
/* Copyright (c) 2017 Red Hat, Inc. */
const templateUrl = require('~network-ui/rack.partial.svg');
function rack () {
return { restrict: 'A', templateUrl};
}
exports.rack = rack;

View File

@ -0,0 +1,8 @@
/* Copyright (c) 2017 Red Hat, Inc. */
const templateUrl = require('~network-ui/rack_icon.partial.svg');
function rackIcon () {
return { restrict: 'A', templateUrl};
}
exports.rackIcon = rackIcon;

View File

@ -0,0 +1,8 @@
/* Copyright (c) 2017 Red Hat, Inc. */
const templateUrl = require('~network-ui/router.partial.svg');
function router () {
return { restrict: 'A', templateUrl};
}
exports.router = router;

View File

@ -0,0 +1,8 @@
/* Copyright (c) 2017 Red Hat, Inc. */
const templateUrl = require('~network-ui/site.partial.svg');
function site () {
return { restrict: 'A', templateUrl};
}
exports.site = site;

View File

@ -0,0 +1,8 @@
/* Copyright (c) 2017 Red Hat, Inc. */
const templateUrl = require('~network-ui/site_icon.partial.svg');
function siteIcon () {
return { restrict: 'A', templateUrl};
}
exports.siteIcon = siteIcon;

Some files were not shown because too many files have changed in this diff Show More