update frontend
This commit is contained in:
@@ -123,7 +123,7 @@ export class OpsDashboard extends DeesElement {
|
||||
public async firstUpdated() {
|
||||
const simpleLogin = this.shadowRoot.querySelector('dees-simple-login');
|
||||
simpleLogin.addEventListener('login', (e: CustomEvent) => {
|
||||
console.log(e.detail);
|
||||
// Handle logout event
|
||||
this.login(e.detail.data.username, e.detail.data.password);
|
||||
});
|
||||
|
||||
@@ -132,14 +132,13 @@ export class OpsDashboard extends DeesElement {
|
||||
if (appDash) {
|
||||
appDash.addEventListener('viewSwitch', (e: CustomEvent) => {
|
||||
const viewName = e.detail.tabName;
|
||||
console.log('View switched to:', viewName);
|
||||
appstate.uiStatePart.dispatchAction(appstate.setActiveViewAction, viewName.toLowerCase());
|
||||
});
|
||||
}
|
||||
|
||||
// Handle initial state
|
||||
const loginState = appstate.loginStatePart.getState();
|
||||
console.log('Initial login state:', loginState);
|
||||
// Check initial login state
|
||||
if (loginState.identity) {
|
||||
this.loginState = loginState;
|
||||
await simpleLogin.switchToSlottedContent();
|
||||
|
@@ -67,11 +67,7 @@ export class OpsViewNetwork extends DeesElement {
|
||||
await super.connectedCallback();
|
||||
|
||||
// When network view becomes visible, ensure we fetch network data
|
||||
console.log('Network view connected - fetching initial data');
|
||||
await appstate.networkStatePart.dispatchAction(appstate.fetchNetworkStatsAction, null);
|
||||
|
||||
// Also update the active view state
|
||||
appstate.uiStatePart.dispatchAction(appstate.setActiveViewAction, 'network');
|
||||
}
|
||||
|
||||
async disconnectedCallback() {
|
||||
|
Reference in New Issue
Block a user