From 8931478a55973dbadc1894d02c54cc12c4dbb6ed Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Tue, 14 Feb 2017 19:37:38 +0530 Subject: [PATCH] Moving error into common logic page. If in cloud mode; change "default": "uuf.page.error" into "default": "cdmf.page.error" in config.json --- .../devicemgt/app/conf/app-conf.json | 1 - .../app/layouts/cdmf.layout.error.hbs | 48 +++++++++++++++++++ .../pages/cdmf.page.error-404/error-404.json | 6 --- .../error.hbs} | 20 +------- .../app/pages/cdmf.page.error/error.json | 5 ++ 5 files changed, 55 insertions(+), 25 deletions(-) create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/layouts/cdmf.layout.error.hbs delete mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.error-404/error-404.json rename components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/{cdmf.page.error-404/error-404.hbs => cdmf.page.error/error.hbs} (58%) create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.error/error.json diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/app-conf.json b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/app-conf.json index bfe2bd2a0f..4be20160d3 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/app-conf.json +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/app-conf.json @@ -40,7 +40,6 @@ } }, "errorPages": { - "404": "cdmf.page.error-404", "default": "uuf.page.error" } } \ No newline at end of file diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/layouts/cdmf.layout.error.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/layouts/cdmf.layout.error.hbs new file mode 100644 index 0000000000..d14f195c32 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/layouts/cdmf.layout.error.hbs @@ -0,0 +1,48 @@ +{{!-- Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + +WSO2 Inc. licenses this file to you under the Apache License, +Version 2.0 (the "License"); you may not use this file except +in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, +either express or implied. See the License for the +specific language governing permissions and limitations +under the License. --}} + + + + + + + + {{defineZone "title"}} + + + +
+
+
+ +
+
+

{{#defineZone "messageTitle"}}Oops something went wrong{{/defineZone}}

+

{{defineZone "messageDescription"}}

+
+ +
+
+ +
+
+
+
+ + \ No newline at end of file diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.error-404/error-404.json b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.error-404/error-404.json deleted file mode 100644 index 581e0119d3..0000000000 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.error-404/error-404.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "1.0.0", - "uri": "/error/404", - "layout": "uuf.layout.default", - "isAnonymous": true -} \ No newline at end of file diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.error-404/error-404.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.error/error.hbs similarity index 58% rename from components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.error-404/error-404.hbs rename to components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.error/error.hbs index a4a31d008c..a1a620b4b8 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.error-404/error-404.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.error/error.hbs @@ -17,22 +17,6 @@ }} {{#zone "title"}}Error | {{@app.conf.appName}}{{/zone}} -{{#zone "breadcrumbs"}} -
  • - - - -
  • -{{/zone}} - -{{#zone "content"}} -
    -

    An Error Occurred!

    - -
    -
    HTTP Status : {{@page.params.status}}
    - -

    {{@page.params.message}}

    -
    -
    +{{#zone "messageDescription"}} + {{@page.params.status}} - {{@page.params.message}} {{/zone}} \ No newline at end of file diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.error/error.json b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.error/error.json new file mode 100644 index 0000000000..adad4c3291 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.error/error.json @@ -0,0 +1,5 @@ +{ + "version": "1.0.0", + "uri": "/errors/default", + "layout" : "cdmf.layout.error" +} \ No newline at end of file