トップナビゲーションバーにはオプションのシステムステータスバッジも追加できます。これによって、メンテナーンス時期など、システム全体のイベントをユーザーに通知できます。 黄色の警告アイコンを使う既存のスタイルをバッジに使用するには、以下の例に従います。
'use strict';
angular
.module('mysystemstatusbadgeextension', ['openshiftConsole'])
.run([
'extensionRegistry',
function(extensionRegistry) {
// Replace http://status.example.com/ with your domain
var system_status_elem = $('<a href="http://status.example.com/"' +
'target="_blank" class="nav-item-iconic system-status"><span title="' +
'System Status" class="fa status-icon pficon-warning-triangle-o">' +
'</span></a>');
// Add the extension point to the registry so the badge appears
// To disable the badge, comment this block out
extensionRegistry
.add('nav-system-status', function() {
return [{
type: 'dom',
node: system_status_elem
}];
});
}
]);
hawtioPluginLoader.addModule('mysystemstatusbadgeextension');
'use strict';
angular
.module('mysystemstatusbadgeextension', ['openshiftConsole'])
.run([
'extensionRegistry',
function(extensionRegistry) {
// Replace http://status.example.com/ with your domain
var system_status_elem = $('<a href="http://status.example.com/"' +
'target="_blank" class="nav-item-iconic system-status"><span title="' +
'System Status" class="fa status-icon pficon-warning-triangle-o">' +
'</span></a>');
// Add the extension point to the registry so the badge appears
// To disable the badge, comment this block out
extensionRegistry
.add('nav-system-status', function() {
return [{
type: 'dom',
node: system_status_elem
}];
});
}
]);
hawtioPluginLoader.addModule('mysystemstatusbadgeextension');
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow