From 917a6a10305cfb4822d3c15d67a2db1656bdcd95 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Agneray?= <francois.agneray@lam.fr>
Date: Mon, 13 Sep 2021 12:54:18 +0200
Subject: [PATCH] Instance title => instance label

---
 client/src/app/instance/instance.component.ts | 2 ++
 client/src/index.html                         | 2 +-
 conf-dev/create-db.sh                         | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/client/src/app/instance/instance.component.ts b/client/src/app/instance/instance.component.ts
index 202dddf8..fa981f4b 100644
--- a/client/src/app/instance/instance.component.ts
+++ b/client/src/app/instance/instance.component.ts
@@ -31,6 +31,7 @@ import { AppConfigService } from 'src/app/app-config.service';
  */
 export class InstanceComponent implements OnInit, OnDestroy {
     public favIcon: HTMLLinkElement = document.querySelector('#favicon');
+    public title: HTMLLinkElement = document.querySelector('#title');
     public links = [
         { label: 'Home', icon: 'fas fa-home', routerLink: 'home' }
     ];
@@ -65,6 +66,7 @@ export class InstanceComponent implements OnInit, OnDestroy {
             if (instance.config.design.design_favicon !== '') {
                 this.favIcon.href = `${this.config.apiUrl}/download-instance-file/${instance.name}/${instance.config.design.design_favicon}`;
             }
+            this.title.innerHTML = instance.label;
         })
     }
 
diff --git a/client/src/index.html b/client/src/index.html
index 82bcb25e..341e647c 100644
--- a/client/src/index.html
+++ b/client/src/index.html
@@ -2,7 +2,7 @@
 <html lang="en" class="h-100">
 <head>
   <meta charset="utf-8">
-  <title>Anis - Client</title>
+  <title id="title">Anis - Client</title>
   <base href="/">
   <meta name="viewport" content="width=device-width, initial-scale=1">
   <link rel="icon" id="favicon" type="image/x-icon" href="favicon.ico">
diff --git a/conf-dev/create-db.sh b/conf-dev/create-db.sh
index a4ded484..e328444a 100644
--- a/conf-dev/create-db.sh
+++ b/conf-dev/create-db.sh
@@ -59,7 +59,7 @@ curl -d '{"label":"Spectra graph","value":"spectra_graph","display":20,"select_n
 curl -d '{"label":"Test","dbname":"anis_test","dbtype":"pdo_pgsql","dbhost":"db","dbport":5432,"dblogin":"anis","dbpassword":"anis"}' --header 'Content-Type: application/json' -X POST http://localhost/database
 
 # Add default instance
-curl -d '{"name":"default","label":"Default instance","data_path":"\/DEFAULT","config":{"design":{"design_color":"#7AC29A","design_logo":"","design_favicon":""},"home":{"home_component":"WelcomeComponent","home_config":{"home_component_text":"AstroNomical Information System","home_component_logo":"home_component_logo.png"}},"search":{"search_by_criteria_allowed":true,"search_by_criteria_label":"Search","search_multiple_allowed":false,"search_multiple_label":"Search multiple","search_multiple_all_datasets_selected":false},"documentation":{"documentation_allowed":false,"documentation_label":"Documentation"}}}' --header 'Content-Type: application/json' -X POST http://localhost/instance
+curl -d '{"name":"default","label":"Default instance","data_path":"\/DEFAULT","config":{"design":{"design_color":"#7AC29A","design_logo":"logo.png","design_favicon":"favicon.ico"},"home":{"home_component":"WelcomeComponent","home_config":{"home_component_text":"AstroNomical Information System","home_component_logo":"home_component_logo.png"}},"search":{"search_by_criteria_allowed":true,"search_by_criteria_label":"Search","search_multiple_allowed":false,"search_multiple_label":"Search multiple","search_multiple_all_datasets_selected":false},"documentation":{"documentation_allowed":false,"documentation_label":"Documentation"}}}' --header 'Content-Type: application/json' -X POST http://localhost/instance
 
 # Add ANIS, SVOM and IRIS surveys
 curl -d '{"name":"anis_survey","label":"ANIS survey","description":"Survey used for testing","link":"https://anis.lam.fr","manager":"F. Agneray","id_database":1}' --header 'Content-Type: application/json' -X POST http://localhost/survey
-- 
GitLab