Skip to content

Commit

Permalink
Local signin error
Browse files Browse the repository at this point in the history
  • Loading branch information
newmanw committed Jul 5, 2024
1 parent 8679fa1 commit 3e169f0
Show file tree
Hide file tree
Showing 15 changed files with 334 additions and 173 deletions.
2 changes: 1 addition & 1 deletion instance/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
"homepage": "https://github.com/ngageoint/mage-server",
"dependencies": {
"@ngageoint/mage.service": "../service",
"@ngageoint/mage.web-app": "file:../web-app/dist/ngageoint-mage.web-app-6.3.0-beta.3.tgz"
"@ngageoint/mage.web-app": "file:../web-app/dist"
}
}
10 changes: 5 additions & 5 deletions service/src/app.impl/systemInfo/app.impl.systemInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@ export function CreateReadSystemInfo(
const legacyUsers = Users as any;
const userCount = await new Promise(resolve => {
legacyUsers.count({}, (err:any, count:any) => {
resolve(count)
});
resolve(count)
});
});

// Initialize with base system info
let systemInfoResponse: ExoRedactedSystemInfo = {
version: versionInfo,
initial: userCount == 0,
disclaimer: (await settingsModule.getSetting('disclaimer')) || {},
contactInfo: (await settingsModule.getSetting('contactInfo')) || {}
initial: userCount == 0,
disclaimer: (await settingsModule.getSetting('disclaimer'))?.settings || {},
contactInfo: (await settingsModule.getSetting('contactinfo'))?.settings || {}
};

// Add environment details for authenticated users with permission
Expand Down
36 changes: 18 additions & 18 deletions web-app/admin/src/ng1/admin/admin.tab.html
Original file line number Diff line number Diff line change
@@ -1,65 +1,65 @@
<div class="admin-actions">
<div class="admin-actions-content">

<div class="admin-action" ng-class="{'admin-action-selected': $ctrl.stateName === 'home.dashboard'}" ng-click="$ctrl.tabChanged('home.dashboard')">
<div ng-class="{'admin-action-arrow-left': $ctrl.stateName === 'home.dashboard'}"></div>
<div class="admin-action" ng-class="{'admin-action-selected': $ctrl.stateName === 'admin.dashboard'}" ng-click="$ctrl.tabChanged('admin.dashboard')">
<div ng-class="{'admin-action-arrow-left': $ctrl.stateName === 'admin.dashboard'}"></div>
<div class="admin-badge">
<i class="fa fa-dashboard"></i>
<span ng-if="$ctrl.inactiveUsers.length || $ctrl.unregisteredDevices.length" class="badge badge-notif badge-accent">{{$ctrl.inactiveUsers.length + $ctrl.unregisteredDevices.length}}</span>
</div>
<div>Dashboard</div>
</div>

<div class="admin-action" ng-class="{'admin-action-selected': $ctrl.stateName === 'home.users'}" ng-click="$ctrl.tabChanged('home.users')">
<div ng-class="{'admin-action-arrow-left': $ctrl.stateName === 'home.users'}"></div>
<div class="admin-action" ng-class="{'admin-action-selected': $ctrl.stateName === 'admin.users'}" ng-click="$ctrl.tabChanged('admin.users')">
<div ng-class="{'admin-action-arrow-left': $ctrl.stateName === 'admin.users'}"></div>
<div class="admin-badge">
<i class="fa fa-user"></i>
<span ng-if="$ctrl.inactiveUsers.length" class="badge badge-notif badge-accent">{{$ctrl.inactiveUsers.length}}</span>
</div>
<div>Users</div>
</div>

<div class="admin-action" ng-class="{'admin-action-selected': $ctrl.stateName === 'home.teams'}" ng-click="$ctrl.tabChanged('home.teams')">
<div ng-class="{'admin-action-arrow-left': $ctrl.stateName === 'home.teams'}"></div>
<div class="admin-action" ng-class="{'admin-action-selected': $ctrl.stateName === 'admin.teams'}" ng-click="$ctrl.tabChanged('admin.teams')">
<div ng-class="{'admin-action-arrow-left': $ctrl.stateName === 'admin.teams'}"></div>
<i class="fa fa-users"></i>
<div>Teams</div>
</div>

<div class="admin-action" ng-class="{'admin-action-selected': $ctrl.stateName === 'home.events'}" ng-click="$ctrl.tabChanged('home.events')">
<div ng-class="{'admin-action-arrow-left': $ctrl.stateName === 'home.events'}"></div>
<div class="admin-action" ng-class="{'admin-action-selected': $ctrl.stateName === 'admin.events'}" ng-click="$ctrl.tabChanged('admin.events')">
<div ng-class="{'admin-action-arrow-left': $ctrl.stateName === 'admin.events'}"></div>
<i class="fa fa-calendar"></i>
<div>Events</div>
</div>

<div class="admin-action" ng-class="{'admin-action-selected': $ctrl.stateName === 'maindevices'}" ng-click="$ctrl.tabChanged('home.devices')">
<div ng-class="{'admin-action-arrow-left': $ctrl.stateName === 'home.devices'}"></div>
<div class="admin-action" ng-class="{'admin-action-selected': $ctrl.stateName === 'maindevices'}" ng-click="$ctrl.tabChanged('admin.devices')">
<div ng-class="{'admin-action-arrow-left': $ctrl.stateName === 'admin.devices'}"></div>
<div class="admin-badge">
<i class="fa fa-mobile-phone"></i>
<span ng-if="$ctrl.unregisteredDevices.length" class="badge badge-notif badge-accent">{{$ctrl.unregisteredDevices.length}}</span>
</div>
<div>Devices</div>
</div>

<div class="admin-action" ng-class="{'admin-action-selected': $ctrl.stateName === 'home.layers'}" ng-click="$ctrl.tabChanged('home.layers')">
<div ng-class="{'admin-action-arrow-left':$ctrl.stateName === 'home.layers'}"></div>
<div class="admin-action" ng-class="{'admin-action-selected': $ctrl.stateName === 'admin.layers'}" ng-click="$ctrl.tabChanged('admin.layers')">
<div ng-class="{'admin-action-arrow-left':$ctrl.stateName === 'admin.layers'}"></div>
<i class="fa fa-map"></i>
<div>Layers</div>
</div>

<div class="admin-action" ng-class="{'admin-action-selected': $ctrl.stateName === 'home.feeds'}" ng-click="$ctrl.tabChanged('home.feeds')">
<div ng-class="{'admin-action-arrow-left':$ctrl.stateName === 'home.feeds'}"></div>
<div class="admin-action" ng-class="{'admin-action-selected': $ctrl.stateName === 'admin.feeds'}" ng-click="$ctrl.tabChanged('admin.feeds')">
<div ng-class="{'admin-action-arrow-left':$ctrl.stateName === 'admin.feeds'}"></div>
<i class="fa fa-rss"></i>
<div>Feeds</div>
</div>

<div class="admin-action" ng-class="{'admin-action-selected': $ctrl.stateName === 'home.map'}" ng-click="$ctrl.tabChanged('home.map')">
<div ng-class="{'admin-action-arrow-left': $ctrl.stateName === 'home.map'}"></div>
<div class="admin-action" ng-class="{'admin-action-selected': $ctrl.stateName === 'admin.map'}" ng-click="$ctrl.tabChanged('admin.map')">
<div ng-class="{'admin-action-arrow-left': $ctrl.stateName === 'admin.map'}"></div>
<i class="fa fa-globe"></i>
<div>Map</div>
</div>

<div class="admin-action" ng-if="$ctrl.hasPermission('UPDATE_SETTINGS')" ng-class="{'admin-action-selected': $ctrl.stateName === 'home.settings'}" ng-click="$ctrl.tabChanged('home.settings')">
<div ng-class="{'admin-action-arrow-left': $ctrl.stateName === 'home.settings'}"></div>
<div class="admin-action" ng-if="$ctrl.hasPermission('UPDATE_SETTINGS')" ng-class="{'admin-action-selected': $ctrl.stateName === 'admin.settings'}" ng-click="$ctrl.tabChanged('admin.settings')">
<div ng-class="{'admin-action-arrow-left': $ctrl.stateName === 'admin.settings'}"></div>
<i class="fa fa-wrench"></i>
<div>Settings</div>
</div>
Expand Down
82 changes: 41 additions & 41 deletions web-app/admin/src/ng1/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,113 +137,113 @@ function config($httpProvider, $stateProvider, $urlRouterProvider, $animateProvi
};
}

$urlRouterProvider.otherwise('/home');
$urlRouterProvider.otherwise('/');

$stateProvider.state('home', {
redirectTo: 'home.dashboard',
url: '/home',
$stateProvider.state('admin', {
redirectTo: 'admin.dashboard',
url: '/admin',
component: 'admin'
});

$stateProvider.state('home.dashboard', {
$stateProvider.state('admin.dashboard', {
url: '/dashboard',
component: 'adminDashboard',
resolve: resolveAdmin()
});

$stateProvider.state('home.users', {
$stateProvider.state('admin.users', {
url: '/users',
component: 'adminUsers',
resolve: resolveAdmin()
});

$stateProvider.state('home.createUser', {
$stateProvider.state('admin.createUser', {
url: '/users/new',
component: 'adminUserEdit',
resolve: resolveAdmin()
});

$stateProvider.state('home.bulkUser', {
$stateProvider.state('admin.bulkUser', {
url: '/users/bulk',
component: "adminUserBulk",
resolve: resolveAdmin()
});

$stateProvider.state('home.user', {
$stateProvider.state('admin.user', {
url: '/users/:userId',
component: "adminUser",
resolve: resolveAdmin()
});

$stateProvider.state('home.editUser', {
$stateProvider.state('admin.editUser', {
url: '/users/:userId/edit',
component: "adminUserEdit",
resolve: resolveAdmin()
});

// Admin team routes
$stateProvider.state('home.teams', {
$stateProvider.state('admin.teams', {
url: '/teams',
component: "adminTeams",
resolve: resolveAdmin()
});

$stateProvider.state('home.createTeam', {
$stateProvider.state('admin.createTeam', {
url: '/teams/new',
component: "adminTeamEdit",
resolve: resolveAdmin()
});

$stateProvider.state('home.team', {
$stateProvider.state('admin.team', {
url: '/teams/:teamId',
component: "adminTeam",
resolve: resolveAdmin()
});

$stateProvider.state('home.editTeam', {
$stateProvider.state('admin.editTeam', {
url: '/teams/:teamId/edit',
component: "adminTeamEdit",
resolve: resolveAdmin()
});

$stateProvider.state('home.teamAccess', {
$stateProvider.state('admin.teamAccess', {
url: '/teams/:teamId/access',
component: "adminTeamAccess",
resolve: resolveAdmin()
});

// Admin event routes
$stateProvider.state('home.events', {
$stateProvider.state('admin.events', {
url: '/events',
component: "adminEvents",
resolve: resolveAdmin()
});

$stateProvider.state('home.eventCreate', {
$stateProvider.state('admin.eventCreate', {
url: '/events/new',
component: "adminEventEdit",
resolve: resolveAdmin()
});

$stateProvider.state('home.event', {
$stateProvider.state('admin.event', {
url: '/events/:eventId',
component: "adminEvent",
resolve: resolveAdmin()
});

$stateProvider.state('home.eventEdit', {
$stateProvider.state('admin.eventEdit', {
url: '/events/:eventId/edit',
component: "adminEventEdit",
resolve: resolveAdmin()
});

$stateProvider.state('home.eventAccess', {
$stateProvider.state('admin.eventAccess', {
url: '/events/:eventId/access',
component: "adminEventAccess",
resolve: resolveAdmin()
});

$stateProvider.state('home.fieldsCreate', {
$stateProvider.state('admin.fieldsCreate', {
url: '/events/:eventId/forms/new',
component: "adminEventFormFieldsEdit",
params: {
Expand All @@ -252,124 +252,124 @@ function config($httpProvider, $stateProvider, $urlRouterProvider, $animateProvi
resolve: resolveAdmin()
});

$stateProvider.state('home.formEdit', {
$stateProvider.state('admin.formEdit', {
url: '/events/:eventId/forms/:formId',
component: "adminEventFormEdit",
resolve: resolveAdmin()
});

$stateProvider.state('home.formFieldsEdit', {
$stateProvider.state('admin.formFieldsEdit', {
url: '/events/:eventId/forms/:formId/fields',
component: "adminEventFormFieldsEdit",
resolve: resolveAdmin()
});

$stateProvider.state('home.formMapEdit', {
$stateProvider.state('admin.formMapEdit', {
url: '/events/:eventId/forms/:formId/map',
component: "adminEventFormMapEdit",
resolve: resolveAdmin()
});

$stateProvider.state('home.formFeedEdit', {
$stateProvider.state('admin.formFeedEdit', {
url: '/events/:eventId/forms/:formId/feed',
component: "adminEventFormFeedEdit",
resolve: resolveAdmin()
});

// Admin device routes
$stateProvider.state('home.devices', {
$stateProvider.state('admin.devices', {
url: '/devices',
component: "adminDevices",
resolve: resolveAdmin()
});

$stateProvider.state('home.deviceCreate', {
$stateProvider.state('admin.deviceCreate', {
url: '/devices/new',
component: "adminDeviceEdit",
resolve: resolveAdmin()
});

$stateProvider.state('home.device', {
$stateProvider.state('admin.device', {
url: '/devices/:deviceId',
component: "adminDevice",
resolve: resolveAdmin()
});

$stateProvider.state('home.deviceEdit', {
$stateProvider.state('admin.deviceEdit', {
url: '/devices/:deviceId/edit',
component: "adminDeviceEdit",
resolve: resolveAdmin()
});

// Admin layer routes
$stateProvider.state('home.layers', {
$stateProvider.state('admin.layers', {
url: '/layers',
component: "adminLayers",
resolve: resolveAdmin()
});

$stateProvider.state('home.layerCreate', {
$stateProvider.state('admin.layerCreate', {
url: '/layers/new',
component: "adminLayerEdit",
resolve: resolveAdmin()
});

$stateProvider.state('home.layer', {
$stateProvider.state('admin.layer', {
url: '/layers/:layerId',
component: "adminLayer",
resolve: resolveAdmin()
});

$stateProvider.state('home.layerEdit', {
$stateProvider.state('admin.layerEdit', {
url: '/layers/:layerId/edit',
component: "adminLayerEdit",
resolve: resolveAdmin()
});

// Admin feed routes
$stateProvider.state('home.feeds', {
$stateProvider.state('admin.feeds', {
url: '/feeds',
component: "adminFeeds",
resolve: resolveAdmin()
});
$stateProvider.state('home.feed', {
$stateProvider.state('admin.feed', {
url: '/feeds/:feedId',
component: "adminFeed",
resolve: resolveAdmin()
});
$stateProvider.state('home.feedCreate', {
$stateProvider.state('admin.feedCreate', {
url: '/feeds/new',
component: "feedEdit",
resolve: resolveAdmin()
});
$stateProvider.state('home.feedEdit', {
$stateProvider.state('admin.feedEdit', {
url: '/feeds/:feedId/edit',
component: "feedEdit",
resolve: resolveAdmin()
});

// Admin service routes
$stateProvider.state('home.service', {
$stateProvider.state('admin.service', {
url: '/services/:serviceId',
component: "adminService",
resolve: resolveAdmin()
});

// Admin map routes
$stateProvider.state('home.map', {
$stateProvider.state('admin.map', {
url: '/map',
component: "upgradedAdminMapSettings",
resolve: resolveAdmin()
});

// Admin settings routes
$stateProvider.state('home.settings', {
$stateProvider.state('admin.settings', {
url: '/settings',
component: "upgradedAdminSettings",
resolve: resolveAdmin()
});

$stateProvider.state('home.authenticationCreate', {
$stateProvider.state('admin.authenticationCreate', {
url: '/settings/new',
component: "authenticationCreate",
resolve: resolveAdmin()
Expand Down
Loading

0 comments on commit 3e169f0

Please sign in to comment.