Move Virtual Media files and route
"Virtual media" was already part of the "Server control" submenu but
the files were at app/configuration and the route was /configuration.
Marta Mazur did a similar file and route move here as part of
supporting multiple Virtual Media endpoints:
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-webui/+/25218
Tested: Built and loaded on a Witherspoon. The VM route is now:
#/server-control/virtual-media. Was able to use the VM
panel.
Change-Id: Iec46a8ece7ddfbc356bc1e71875def70c4418027
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/app/common/directives/app-navigation.html b/app/common/directives/app-navigation.html
index 329381c..82a4a70 100644
--- a/app/common/directives/app-navigation.html
+++ b/app/common/directives/app-navigation.html
@@ -66,8 +66,8 @@
<a href="#/server-control/kvm" ng-click="closeSubnav()"
tabindex="{{(showSubMenu && firstLevel == 'server-control') ? 0 : -1}}">KVM</a>
</li>
- <li ng-class="{'active': (path == '/configuration' || path == '/configuration/virtual-media')}">
- <a href="#/configuration/virtual-media" ng-click="closeSubnav()"
+ <li ng-class="{'active': (path == '/server-control/virtual-media')}">
+ <a href="#/server-control/virtual-media" ng-click="closeSubnav()"
tabindex="{{(showSubMenu && firstLevel == 'server-control') ? 0 : -1}}">Virtual Media</a>
</li>
</ul>
diff --git a/app/configuration/index.js b/app/configuration/index.js
index 8a1acda..e7e5369 100644
--- a/app/configuration/index.js
+++ b/app/configuration/index.js
@@ -35,12 +35,6 @@
'controller': 'snmpController',
authenticated: true
})
- .when('/configuration/virtual-media', {
- 'template':
- require('./controllers/virtual-media-controller.html'),
- 'controller': 'virtualMediaController',
- authenticated: true
- })
.when('/configuration/certificate', {
'template':
require('./controllers/certificate-controller.html'),
diff --git a/app/configuration/styles/index.scss b/app/configuration/styles/index.scss
index a8bd1a8..28d98de 100644
--- a/app/configuration/styles/index.scss
+++ b/app/configuration/styles/index.scss
@@ -2,5 +2,4 @@
@import "./snmp.scss";
@import "./date-time.scss";
@import "./firmware.scss";
-@import "./virtual-media.scss";
@import "./certificate.scss";
diff --git a/app/index.js b/app/index.js
index 6673c29..b121d24 100644
--- a/app/index.js
+++ b/app/index.js
@@ -82,6 +82,7 @@
import remote_console_window_controller from './server-control/controllers/remote-console-window-controller.js';
import server_led_controller from './server-control/controllers/server-led-controller.js';
import kvm_controller from './server-control/controllers/kvm-controller.js';
+import vm_controller from './server-control/controllers/virtual-media-controller.js';
import server_health_index from './server-health/index.js';
import inventory_overview_controller from './server-health/controllers/inventory-overview-controller.js';
@@ -99,7 +100,6 @@
import network_controller from './configuration/controllers/network-controller.js';
import snmp_controller from './configuration/controllers/snmp-controller.js';
import firmware_controller from './configuration/controllers/firmware-controller.js';
-import vm_controller from './configuration/controllers/virtual-media-controller.js';
import users_index from './users/index.js';
import user_accounts_controller from './users/controllers/user-accounts-controller.js';
diff --git a/app/configuration/controllers/virtual-media-controller.html b/app/server-control/controllers/virtual-media-controller.html
similarity index 100%
rename from app/configuration/controllers/virtual-media-controller.html
rename to app/server-control/controllers/virtual-media-controller.html
diff --git a/app/configuration/controllers/virtual-media-controller.js b/app/server-control/controllers/virtual-media-controller.js
similarity index 98%
rename from app/configuration/controllers/virtual-media-controller.js
rename to app/server-control/controllers/virtual-media-controller.js
index 24e945a..19c7e73 100644
--- a/app/configuration/controllers/virtual-media-controller.js
+++ b/app/server-control/controllers/virtual-media-controller.js
@@ -1,7 +1,7 @@
/**
* Controller for virtual-media
*
- * @module app/configuration
+ * @module app/serverControl
* @exports virtualMediaController
* @name virtualMediaController
*/
@@ -9,7 +9,7 @@
window.angular && (function(angular) {
'use strict';
- angular.module('app.configuration').controller('virtualMediaController', [
+ angular.module('app.serverControl').controller('virtualMediaController', [
'$scope', 'APIUtils', 'toastService', 'dataService', 'nbdServerService',
function($scope, APIUtils, toastService, dataService, nbdServerService) {
$scope.devices = [];
diff --git a/app/server-control/index.js b/app/server-control/index.js
index 1b8aad5..8bf03b4 100644
--- a/app/server-control/index.js
+++ b/app/server-control/index.js
@@ -53,6 +53,12 @@
'controller': 'kvmController',
authenticated: true
})
+ .when('/server-control/virtual-media', {
+ 'template':
+ require('./controllers/virtual-media-controller.html'),
+ 'controller': 'virtualMediaController',
+ authenticated: true
+ })
.when('/server-control', {
'template':
require('./controllers/power-operations-controller.html'),
diff --git a/app/server-control/styles/index.scss b/app/server-control/styles/index.scss
index 7171a7e..cd91860 100644
--- a/app/server-control/styles/index.scss
+++ b/app/server-control/styles/index.scss
@@ -3,3 +3,4 @@
@import "./remote-console.scss";
@import "./server-led.scss";
@import "./kvm.scss";
+@import "./virtual-media.scss";
diff --git a/app/configuration/styles/virtual-media.scss b/app/server-control/styles/virtual-media.scss
similarity index 100%
rename from app/configuration/styles/virtual-media.scss
rename to app/server-control/styles/virtual-media.scss