cleanup status route

this is now purely a healthcheck route and nothing else

at some point, we will server render password reset and setup account views
This commit is contained in:
Girish Ramakrishnan
2023-08-10 22:15:45 +05:30
parent 1cdd528b45
commit 955a43723f
7 changed files with 26 additions and 13 deletions

View File

@@ -65,7 +65,7 @@ app.controller('PasswordResetController', ['$scope', '$translate', '$http', func
$scope.mode = '';
$scope.busy = false;
$scope.error = false;
$scope.status = null;
$scope.branding = null;
$scope.username = '';
$scope.password = '';
$scope.totpToken = '';
@@ -132,14 +132,14 @@ app.controller('PasswordResetController', ['$scope', '$translate', '$http', func
setTimeout(function () { $('#inputNewPassword').focus(); }, 200);
};
$http.get(API_ORIGIN + '/api/v1/cloudron/status').success(function (data, status) {
$http.get(API_ORIGIN + '/api/v1/auth/branding').success(function (data, status) {
$scope.initialized = true;
if (status !== 200) return;
if (data.language) $translate.use(data.language);
$scope.status = data;
$scope.branding = data;
}).error(function () {
$scope.initialized = false;
});

View File

@@ -70,7 +70,7 @@ app.controller('SetupAccountController', ['$scope', '$translate', '$http', funct
$scope.busy = false;
$scope.error = null;
$scope.view = 'setup';
$scope.status = null;
$scope.branding = null;
$scope.profileLocked = !!search.profileLocked;
$scope.existingUsername = !!search.username;
@@ -133,14 +133,14 @@ app.controller('SetupAccountController', ['$scope', '$translate', '$http', funct
$scope.view = 'noUsername';
$scope.initialized = true;
} else {
$http.get(API_ORIGIN + '/api/v1/cloudron/status').success(function (data, status) {
$http.get(API_ORIGIN + '/api/v1/auth/branding').success(function (data, status) {
$scope.initialized = true;
if (status !== 200) return;
if (data.language) $translate.use(data.language);
$scope.status = data;
$scope.branding = data;
}).error(function () {
$scope.initialized = false;
});

View File

@@ -160,7 +160,7 @@
</div>
<footer class="text-center">
<span class="text-muted" ng-bind-html="status.footer | markdown2html"></span>
<span class="text-muted" ng-bind-html="branding.footer | markdown2html"></span>
</footer>
</div>

View File

@@ -58,7 +58,7 @@
<div class="col-md-12" style="text-align: center;">
<img width="128" height="128" style="margin-top: -84px" src="<%= apiOrigin %>/api/v1/cloudron/avatar"/>
<br/>
<h1><small>{{ 'setupAccount.welcomeTo' | tr }}</small> {{ status.cloudronName || 'Cloudron' }}</h1>
<h1><small>{{ 'setupAccount.welcomeTo' | tr }}</small> {{ branding.cloudronName || 'Cloudron' }}</h1>
<h3>{{ 'setupAccount.description' | tr }}</h3>
</div>
</div>
@@ -154,7 +154,7 @@
</div>
<footer class="text-center ng-cloak">
<span class="text-muted" ng-bind-html="status.footer | markdown2html"></span>
<span class="text-muted" ng-bind-html="branding.footer | markdown2html"></span>
</footer>
</div>