diff --git a/dashboard/src/theme.scss b/dashboard/src/theme.scss
index c78660375..a70c952dd 100644
--- a/dashboard/src/theme.scss
+++ b/dashboard/src/theme.scss
@@ -676,6 +676,21 @@ multiselect {
}
}
+.checklist-item {
+ padding: 8px;
+ border: none;
+ border-left: 2px solid rgb(255, 76, 76);
+ background-color: #ff000014;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.checklist-item-acknowledged {
+ border-left: 2px solid transparent;
+ background-color: transparent;
+}
+
// ----------------------------
// Mail view
// ----------------------------
diff --git a/dashboard/src/views/app.html b/dashboard/src/views/app.html
index 27aba03f1..089013743 100644
--- a/dashboard/src/views/app.html
+++ b/dashboard/src/views/app.html
@@ -770,6 +770,13 @@
+
diff --git a/dashboard/src/views/app.js b/dashboard/src/views/app.js
index 40c88332b..ba2541762 100644
--- a/dashboard/src/views/app.js
+++ b/dashboard/src/views/app.js
@@ -174,6 +174,9 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
$scope.info.notes.busy = false;
$scope.info.notes.content = $scope.app.notes;
$scope.info.notes.editing = false;
+
+ console.log('--', $scope.app)
+ $scope.info.checklist = $scope.app.checklist;
}
};
diff --git a/src/apps.js b/src/apps.js
index 9d5b72158..c730ea24e 100644
--- a/src/apps.js
+++ b/src/apps.js
@@ -1331,7 +1331,6 @@ async function install(data, auditSource) {
env = data.env || {},
label = data.label || null,
tags = data.tags || [],
- checklist = data.manifest.checklist || {},
overwriteDns = 'overwriteDns' in data ? data.overwriteDns : false,
skipDnsSetup = 'skipDnsSetup' in data ? data.skipDnsSetup : false,
enableTurn = 'enableTurn' in data ? data.enableTurn : true,
@@ -1421,7 +1420,6 @@ async function install(data, auditSource) {
env,
label,
tags,
- checklist,
icon,
enableMailbox,
upstreamUri,
diff --git a/src/apptask.js b/src/apptask.js
index c6c829752..aa12ea1ec 100644
--- a/src/apptask.js
+++ b/src/apptask.js
@@ -241,6 +241,30 @@ async function downloadImage(manifest) {
await docker.downloadImage(manifest);
}
+async function updateChecklist(app, newChecks) {
+ assert.strictEqual(typeof app, 'object');
+ assert.strictEqual(typeof newChecks, 'object');
+
+ // add new checklist items depending on sso state
+ const checklist = app.checklist || {};
+ for (let k in newChecks) {
+ if (app.checklist[k]) return;
+
+ const item = {
+ acknowledged: false,
+ sso: newChecks[k].sso,
+ message: newChecks[k].message
+ };
+
+ if (typeof item.sso === 'undefined') checklist[k] = item;
+ else if (item.sso && app.sso) checklist[k] = item;
+ else if (!item.sso && !app.sso) checklist[k] = item;
+ }
+
+ await updateApp(app, { checklist });
+}
+
+
async function startApp(app) {
debug('startApp: starting container');
@@ -350,6 +374,8 @@ async function install(app, args, progressCallback) {
await progressCallback({ percent: 95, message: 'Configuring reverse proxy' });
await reverseProxy.configureApp(app, AuditSource.APPTASK);
+ await updateChecklist(app, app.manifest.checklist);
+
await progressCallback({ percent: 100, message: 'Done' });
await updateApp(app, { installationState: apps.ISTATE_INSTALLED, error: null, health: null });
}
@@ -629,6 +655,8 @@ async function update(app, args, progressCallback) {
await reverseProxy.configureApp(app, AuditSource.APPTASK);
}
+ await updateChecklist(app, updateConfig.manifest.checklist || {});
+
await progressCallback({ percent: 100, message: 'Done' });
await updateApp(app, { installationState: apps.ISTATE_INSTALLED, error: null, health: null, updateTime: new Date() });
}