[SEBA-165] hide backend and policy_status for services which doesn't have those
Change-Id: Ia360739a77fee5b168962bf3f012f1eae9713772
diff --git a/.gitreview b/.gitreview
index 7d5b1ac..28b50b1 100644
--- a/.gitreview
+++ b/.gitreview
@@ -1,5 +1,6 @@
[gerrit]
host=gerrit.opencord.org
port=29418
-project=xos.git
+project=xos-gui.git
defaultremote=origin
+defaultbranch=master
diff --git a/src/app/core/services/helpers/config.helpers.ts b/src/app/core/services/helpers/config.helpers.ts
index ed8d51c..fff00ee 100644
--- a/src/app/core/services/helpers/config.helpers.ts
+++ b/src/app/core/services/helpers/config.helpers.ts
@@ -91,7 +91,7 @@
'leaf_model_name',
'link_deleted_count',
'policy_code',
- 'backend_code',
+ 'backend_code'
];
public form_excluded_fields = this.excluded_fields.concat([
@@ -196,6 +196,14 @@
prop: f.name
};
+ if (model.sync_implemented !== 'True') {
+ this.excluded_fields.push('backend_status');
+ }
+
+ if (model.policy_implemented !== 'True') {
+ this.excluded_fields.push('policy_status');
+ }
+
if (f.name === 'id' || f.name === 'name') {
col.link = item => this.stateWithParamsForJs(modelName, item.id);
}
diff --git a/src/app/datasources/rest/modeldefs.rest.ts b/src/app/datasources/rest/modeldefs.rest.ts
index f4d935c..078eede 100644
--- a/src/app/datasources/rest/modeldefs.rest.ts
+++ b/src/app/datasources/rest/modeldefs.rest.ts
@@ -33,6 +33,8 @@
app: string;
description: string;
verbose_name: string;
+ sync_implemented?: string;
+ policy_implemented?: string;
}
export interface IXosModeldefsService {