From a053d6762a8e1151c55bbd489541f60ba3be7755 Mon Sep 17 00:00:00 2001
From: BaiHuoYu
Date: Wed, 7 Nov 2018 10:35:57 +0800
Subject: [PATCH 01/20] FC
---
contrib/connector/common.go | 147 +++++++++++++++++++++++++++
contrib/connector/connector.go | 1 +
contrib/connector/fc/fc.go | 9 ++
contrib/connector/fc/fibreChannel.go | 21 ++++
contrib/connector/iscsi/helper.go | 134 ++++--------------------
contrib/connector/iscsi/iscsi.go | 6 ++
contrib/connector/rbd/rbd.go | 5 +
7 files changed, 208 insertions(+), 115 deletions(-)
create mode 100644 contrib/connector/common.go
diff --git a/contrib/connector/common.go b/contrib/connector/common.go
new file mode 100644
index 000000000..eb40d1d56
--- /dev/null
+++ b/contrib/connector/common.go
@@ -0,0 +1,147 @@
+// Copyright (c) 2018 Huawei Technologies Co., Ltd. All Rights Reserved.
+//
+// Licensed 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.
+
+package connector
+
+import (
+ "log"
+ "net"
+ "os/exec"
+ "strings"
+)
+
+// execCmd ...
+func ExecCmd(name string, arg ...string) (string, error) {
+ log.Printf("Command: %s %s:\n", name, strings.Join(arg, " "))
+ info, err := exec.Command(name, arg...).CombinedOutput()
+ return string(info), err
+}
+
+// GetFSType returns the File System Type of device
+func GetFSType(device string) string {
+ fsType := ""
+ res, err := ExecCmd("blkid", device)
+ if err != nil {
+ log.Printf("failed to GetFSType: %v", err)
+ return fsType
+ }
+
+ if strings.Contains(string(res), "TYPE=") {
+ for _, v := range strings.Split(string(res), " ") {
+ if strings.Contains(v, "TYPE=") {
+ fsType = strings.Split(v, "=")[1]
+ fsType = strings.Replace(fsType, "\"", "", -1)
+ }
+ }
+ }
+ return fsType
+}
+
+// Format device by File System Type
+func Format(device string, fstype string) error {
+ log.Printf("Format device: %s fstype: %s", device, fstype)
+
+ // Get current File System Type
+ curFSType := GetFSType(device)
+ if curFSType == "" {
+ // Default File Sysem Type is ext4
+ if fstype == "" {
+ fstype = "ext4"
+ }
+ _, err := ExecCmd("mkfs", "-t", fstype, "-F", device)
+ if err != nil {
+ log.Printf("failed to Format: %v", err)
+ return err
+ }
+ } else {
+ log.Printf("Device: %s has been formatted yet. fsType: %s", device, curFSType)
+ }
+ return nil
+}
+
+// Mount device into mount point
+func Mount(device string, mountpoint string) error {
+ log.Printf("Mount device: %s mountpoint: %s", device, mountpoint)
+
+ _, err := ExecCmd("mkdir", "-p", mountpoint)
+ if err != nil {
+ log.Printf("failed to mkdir: %v", err)
+ }
+ _, err = ExecCmd("mount", device, mountpoint)
+ if err != nil {
+ log.Printf("failed to mount: %v", err)
+ return err
+ }
+ return nil
+}
+
+// FormatAndMount device
+func FormatAndMount(device string, fstype string, mountpoint string) error {
+ log.Printf("FormatandMount device: %s fstype: %s mountpoint: %s", device, fstype, mountpoint)
+
+ // Format
+ err := Format(device, fstype)
+ if err != nil {
+ return err
+ }
+
+ // Mount
+ err = Mount(device, mountpoint)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// Umount from mountpoint
+func Umount(mountpoint string) error {
+ log.Printf("Umount mountpoint: %s", mountpoint)
+
+ _, err := ExecCmd("umount", mountpoint)
+ if err != nil {
+ log.Printf("failed to Umount: %v", err)
+ return err
+ }
+ return nil
+}
+
+// GetHostIp return Host IP
+func GetHostIp() string {
+ addrs, err := net.InterfaceAddrs()
+ if err != nil {
+ return "127.0.0.1"
+ }
+
+ for _, address := range addrs {
+ if ipnet, ok := address.(*net.IPNet); ok && !ipnet.IP.IsLoopback() {
+ return ipnet.IP.String()
+ }
+ }
+
+ return "127.0.0.1"
+}
+
+// GetHostName return Host Name
+func GetHostName() (string, error) {
+ hostName, err := ExecCmd("hostname")
+ if err != nil {
+ log.Printf("failed to get host name: %v", err)
+ return "", err
+ }
+
+ hostName = strings.Replace(hostName, "\n", "", -1)
+
+ return hostName, nil
+}
diff --git a/contrib/connector/connector.go b/contrib/connector/connector.go
index 363d741b4..65a1829b3 100644
--- a/contrib/connector/connector.go
+++ b/contrib/connector/connector.go
@@ -21,6 +21,7 @@ import (
type Connector interface {
Attach(map[string]interface{}) (string, error)
Detach(map[string]interface{}) error
+ GetInitiatorInfo() (string, error)
}
func NewConnector(cType string) Connector {
diff --git a/contrib/connector/fc/fc.go b/contrib/connector/fc/fc.go
index ca5c46d49..55a4c58e1 100644
--- a/contrib/connector/fc/fc.go
+++ b/contrib/connector/fc/fc.go
@@ -20,6 +20,10 @@ import (
const (
fcDriver = "fibre_channel"
+ PortName = "port_name"
+ NodeName = "node_name"
+ Wwpn = "wwpn"
+ Wwnn = "wwnn"
)
type FC struct {
@@ -46,3 +50,8 @@ func (f *FC) Attach(conn map[string]interface{}) (string, error) {
func (f *FC) Detach(conn map[string]interface{}) error {
return f.self.disconnectVolume(conn)
}
+
+// GetInitiatorInfo implementation
+func (f *FC) GetInitiatorInfo() (string, error) {
+ return f.self.getInitiatorInfo()
+}
diff --git a/contrib/connector/fc/fibreChannel.go b/contrib/connector/fc/fibreChannel.go
index fb87c714b..3d8050894 100644
--- a/contrib/connector/fc/fibreChannel.go
+++ b/contrib/connector/fc/fibreChannel.go
@@ -215,3 +215,24 @@ func (f *fibreChannel) getFChbasInfo() ([]map[string]string, error) {
return hbasInfos, nil
}
+
+func (f *fibreChannel) getInitiatorInfo() (string, error) {
+ hbas, err := f.getFChbasInfo()
+ if err != nil {
+ return "", err
+ }
+
+ var initiatorInfo []string
+
+ for _, hba := range hbas {
+ if v, ok := hba[PortName]; ok {
+ initiatorInfo = append(initiatorInfo, Wwpn+":"+v)
+ }
+
+ if v, ok := hba[NodeName]; ok {
+ initiatorInfo = append(initiatorInfo, Wwnn+":"+v)
+ }
+ }
+
+ return strings.Join(initiatorInfo, ","), nil
+}
diff --git a/contrib/connector/iscsi/helper.go b/contrib/connector/iscsi/helper.go
index 0262d61a5..093e504ba 100644
--- a/contrib/connector/iscsi/helper.go
+++ b/contrib/connector/iscsi/helper.go
@@ -17,15 +17,16 @@ package iscsi
import (
"errors"
"log"
- "net"
+
"os"
- "os/exec"
+
"path/filepath"
"strconv"
"strings"
"time"
"github.com/mitchellh/mapstructure"
+ "github.com/opensds/opensds/contrib/connector"
)
// IscsiConnectorInfo define
@@ -101,7 +102,7 @@ func waitForPathToExistInternal(devicePath *string, maxRetries int, deviceTransp
// GetInitiator returns all the ISCSI Initiator Name
func GetInitiator() ([]string, error) {
- res, err := execCmd("cat", "/etc/iscsi/initiatorname.iscsi")
+ res, err := connector.ExecCmd("cat", "/etc/iscsi/initiatorname.iscsi")
iqns := []string{}
if err != nil {
log.Printf("Error encountered gathering initiator names: %v", err)
@@ -122,14 +123,14 @@ func GetInitiator() ([]string, error) {
// Login ISCSI Target
func SetAuth(portal string, targetiqn string, name string, passwd string) error {
// Set UserName
- info, err := execCmd("iscsiadm", "-m", "node", "-p", portal, "-T", targetiqn,
+ info, err := connector.ExecCmd("iscsiadm", "-m", "node", "-p", portal, "-T", targetiqn,
"--op=update", "--name", "node.session.auth.username", "--value", name)
if err != nil {
log.Fatalf("Received error on set income username: %v, %v", err, info)
return err
}
// Set Password
- info, err = execCmd("iscsiadm", "-m", "node", "-p", portal, "-T", targetiqn,
+ info, err = connector.ExecCmd("iscsiadm", "-m", "node", "-p", portal, "-T", targetiqn,
"--op=update", "--name", "node.session.auth.password", "--value", passwd)
if err != nil {
log.Fatalf("Received error on set income password: %v, %v", err, info)
@@ -140,7 +141,7 @@ func SetAuth(portal string, targetiqn string, name string, passwd string) error
// Discovery ISCSI Target
func Discovery(portal string) error {
- info, err := execCmd("iscsiadm", "-m", "discovery", "-t", "sendtargets", "-p", portal)
+ info, err := connector.ExecCmd("iscsiadm", "-m", "discovery", "-t", "sendtargets", "-p", portal)
if err != nil {
log.Println("Error encountered in sendtargets:", string(info), err)
return err
@@ -150,7 +151,7 @@ func Discovery(portal string) error {
// Login ISCSI Target
func Login(portal string, targetiqn string) error {
- info, err := execCmd("iscsiadm", "-m", "node", "-p", portal, "-T", targetiqn, "--login")
+ info, err := connector.ExecCmd("iscsiadm", "-m", "node", "-p", portal, "-T", targetiqn, "--login")
if err != nil {
log.Println("Received error on login attempt:", string(info), err)
return err
@@ -160,7 +161,7 @@ func Login(portal string, targetiqn string) error {
// Logout ISCSI Target
func Logout(portal string, targetiqn string) error {
- info, err := execCmd("iscsiadm", "-m", "node", "-p", portal, "-T", targetiqn, "--logout")
+ info, err := connector.ExecCmd("iscsiadm", "-m", "node", "-p", portal, "-T", targetiqn, "--logout")
if err != nil {
log.Println("Received error on logout attempt:", string(info), err)
return err
@@ -170,7 +171,7 @@ func Logout(portal string, targetiqn string) error {
// Delete ISCSI Node
func Delete(targetiqn string) error {
- info, err := execCmd("iscsiadm", "-m", "node", "-o", "delete", "-T", targetiqn)
+ info, err := connector.ExecCmd("iscsiadm", "-m", "node", "-o", "delete", "-T", targetiqn)
if err != nil {
log.Println("Received error on Delete attempt:", string(info), err)
return err
@@ -221,7 +222,7 @@ func Connect(connMap map[string]interface{}) (string, error) {
}
func sessionExists(portal string, tgtIqn string) bool {
- info, err := execCmd("iscsiadm", "-m", "session", "-s")
+ info, err := connector.ExecCmd("iscsiadm", "-m", "session", "-s")
if err != nil {
log.Println("Warning: get session failed,", string(info))
return false
@@ -236,7 +237,7 @@ func sessionExists(portal string, tgtIqn string) bool {
}
func recordExists(portal string, tgtIqn string) bool {
- _, err := execCmd("iscsiadm", "-m", "node", "-o", "show",
+ _, err := connector.ExecCmd("iscsiadm", "-m", "node", "-o", "show",
"-T", tgtIqn, "-p", portal)
return err == nil
}
@@ -256,95 +257,6 @@ func Disconnect(portal string, targetiqn string) error {
return nil
}
-// GetFSType returns the File System Type of device
-func GetFSType(device string) string {
- fsType := ""
- res, err := execCmd("blkid", device)
- if err != nil {
- log.Printf("failed to GetFSType: %v", err)
- return fsType
- }
-
- if strings.Contains(string(res), "TYPE=") {
- for _, v := range strings.Split(string(res), " ") {
- if strings.Contains(v, "TYPE=") {
- fsType = strings.Split(v, "=")[1]
- fsType = strings.Replace(fsType, "\"", "", -1)
- }
- }
- }
- return fsType
-}
-
-// Format device by File System Type
-func Format(device string, fstype string) error {
- log.Printf("Format device: %s fstype: %s", device, fstype)
-
- // Get current File System Type
- curFSType := GetFSType(device)
- if curFSType == "" {
- // Default File Sysem Type is ext4
- if fstype == "" {
- fstype = "ext4"
- }
- _, err := execCmd("mkfs", "-t", fstype, "-F", device)
- if err != nil {
- log.Printf("failed to Format: %v", err)
- return err
- }
- } else {
- log.Printf("Device: %s has been formatted yet. fsType: %s", device, curFSType)
- }
- return nil
-}
-
-// Mount device into mount point
-func Mount(device string, mountpoint string) error {
- log.Printf("Mount device: %s mountpoint: %s", device, mountpoint)
-
- _, err := execCmd("mkdir", "-p", mountpoint)
- if err != nil {
- log.Printf("failed to mkdir: %v", err)
- }
- _, err = execCmd("mount", device, mountpoint)
- if err != nil {
- log.Printf("failed to mount: %v", err)
- return err
- }
- return nil
-}
-
-// FormatAndMount device
-func FormatAndMount(device string, fstype string, mountpoint string) error {
- log.Printf("FormatandMount device: %s fstype: %s mountpoint: %s", device, fstype, mountpoint)
-
- // Format
- err := Format(device, fstype)
- if err != nil {
- return err
- }
-
- // Mount
- err = Mount(device, mountpoint)
- if err != nil {
- return err
- }
-
- return nil
-}
-
-// Umount from mountpoint
-func Umount(mountpoint string) error {
- log.Printf("Umount mountpoint: %s", mountpoint)
-
- _, err := execCmd("umount", mountpoint)
- if err != nil {
- log.Printf("failed to Umount: %v", err)
- return err
- }
- return nil
-}
-
// ParseIscsiConnectInfo decode
func ParseIscsiConnectInfo(connectInfo map[string]interface{}) *IscsiConnectorInfo {
var con IscsiConnectorInfo
@@ -352,24 +264,16 @@ func ParseIscsiConnectInfo(connectInfo map[string]interface{}) *IscsiConnectorIn
return &con
}
-// GetHostIp return Host IP
-func GetHostIp() string {
- addrs, err := net.InterfaceAddrs()
+// getInitiatorInfo implementation
+func getInitiatorInfo() (string, error) {
+ initiators, err := GetInitiator()
if err != nil {
- return "127.0.0.1"
+ return "", err
}
- for _, address := range addrs {
- if ipnet, ok := address.(*net.IPNet); ok && !ipnet.IP.IsLoopback() {
- return ipnet.IP.String()
- }
+ if len(initiators) == 0 {
+ return "", errors.New("The number of iqn is wrong")
}
- return "127.0.0.1"
-}
-
-func execCmd(name string, arg ...string) (string, error) {
- log.Printf("Command: %s %s:\n", name, strings.Join(arg, " "))
- info, err := exec.Command(name, arg...).CombinedOutput()
- return string(info), err
+ return initiators[0], nil
}
diff --git a/contrib/connector/iscsi/iscsi.go b/contrib/connector/iscsi/iscsi.go
index bae2faf73..eefec1f6b 100644
--- a/contrib/connector/iscsi/iscsi.go
+++ b/contrib/connector/iscsi/iscsi.go
@@ -20,6 +20,7 @@ import (
const (
iscsiDriver = "iscsi"
+ Iqn = "iqn"
)
type Iscsi struct{}
@@ -37,3 +38,8 @@ func (isc *Iscsi) Detach(conn map[string]interface{}) error {
return Disconnect(iscsiCon.TgtPortal, iscsiCon.TgtIQN)
}
+
+// GetInitiatorInfo implementation
+func (isc *Iscsi) GetInitiatorInfo() (string, error) {
+ return getInitiatorInfo()
+}
diff --git a/contrib/connector/rbd/rbd.go b/contrib/connector/rbd/rbd.go
index d37089698..05a78a204 100644
--- a/contrib/connector/rbd/rbd.go
+++ b/contrib/connector/rbd/rbd.go
@@ -96,6 +96,11 @@ func (*RBD) Detach(conn map[string]interface{}) error {
return err
}
+// GetInitiatorInfo implementation
+func (*RBD) GetInitiatorInfo() (string, error) {
+ return "", nil
+}
+
func mapDevice(poolName, imageName string, hosts, ports []interface{}) (string, error) {
devName, err := findDevice(poolName, imageName, 1)
if err == nil {
From 97e8b7fc8ec1a19d58e355060c4fe6381c4eec9f Mon Sep 17 00:00:00 2001
From: BaiHuoYu
Date: Wed, 7 Nov 2018 13:54:13 +0800
Subject: [PATCH 02/20] FC
---
pkg/dock/discovery/discovery.go | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/pkg/dock/discovery/discovery.go b/pkg/dock/discovery/discovery.go
index 485eaecd0..b3708db71 100755
--- a/pkg/dock/discovery/discovery.go
+++ b/pkg/dock/discovery/discovery.go
@@ -23,10 +23,11 @@ import (
"fmt"
"os"
"runtime"
- "time"
"strings"
+ "time"
log "github.com/golang/glog"
+ "github.com/opensds/opensds/contrib/connector"
"github.com/opensds/opensds/contrib/connector/fc"
"github.com/opensds/opensds/contrib/connector/iscsi"
"github.com/opensds/opensds/contrib/drivers"
@@ -214,7 +215,7 @@ func (add *attachDockDiscoverer) Discover() error {
bindIp := CONF.BindIp
if bindIp == "" {
- bindIp = iscsi.GetHostIp()
+ bindIp = connector.GetHostIp()
}
wwpns, _ := fc.GetWWPNs()
segments := strings.Split(CONF.OsdsDock.ApiEndpoint, ":")
From 82ffc2798c2b8f2a92fcd60b7c42f43bbaebdb3a Mon Sep 17 00:00:00 2001
From: jerry
Date: Mon, 12 Nov 2018 17:10:40 +0800
Subject: [PATCH 03/20] Fixed syntax error
---
script/devsds/lib/keystone.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/script/devsds/lib/keystone.sh b/script/devsds/lib/keystone.sh
index c722f5265..16536e997 100644
--- a/script/devsds/lib/keystone.sh
+++ b/script/devsds/lib/keystone.sh
@@ -127,7 +127,7 @@ osds::keystone::download_code(){
}
osds::keystone::install(){
- if [ "true" != $USE_EXISTING_KEYSTONE]
+ if [ "true" != $USE_EXISTING_KEYSTONE ]
then
KEYSTONE_IP=$HOST_IP
osds::keystone::create_user
@@ -169,4 +169,4 @@ osds::keystone::uninstall_purge(){
}
## Restore xtrace
-$_XTRACE_KEYSTONE
\ No newline at end of file
+$_XTRACE_KEYSTONE
From 4ba7e2cabb6d3bfbdabbe1b60ed9c789af36ec84 Mon Sep 17 00:00:00 2001
From: jerry
Date: Tue, 13 Nov 2018 10:25:55 +0800
Subject: [PATCH 04/20] Fixed get fs parsing bug
---
contrib/connector/iscsi/helper.go | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/contrib/connector/iscsi/helper.go b/contrib/connector/iscsi/helper.go
index 0262d61a5..6fbbf9916 100644
--- a/contrib/connector/iscsi/helper.go
+++ b/contrib/connector/iscsi/helper.go
@@ -269,7 +269,8 @@ func GetFSType(device string) string {
for _, v := range strings.Split(string(res), " ") {
if strings.Contains(v, "TYPE=") {
fsType = strings.Split(v, "=")[1]
- fsType = strings.Replace(fsType, "\"", "", -1)
+ fsType = strings.TrimSpace(fsType)
+ fsType = strings.Trim(fsType, "\"")
}
}
}
From 81299c056e3e5f068eaf9e11b62c733914e20f25 Mon Sep 17 00:00:00 2001
From: jerry
Date: Tue, 13 Nov 2018 10:57:13 +0800
Subject: [PATCH 05/20] Add deleting uploaded snapshot
---
contrib/backup/multicloud/client.go | 2 +-
contrib/backup/multicloud/driver.go | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/contrib/backup/multicloud/client.go b/contrib/backup/multicloud/client.go
index 8119d29ec..9c4b4c816 100644
--- a/contrib/backup/multicloud/client.go
+++ b/contrib/backup/multicloud/client.go
@@ -101,7 +101,7 @@ func (c *Client) doRequest(method, u string, in interface{}, cb ReqSettingCB) ([
return nil, nil, err
}
- log.Errorf("%s: %s OK\n", method, u)
+ log.V(5).Infof("%s: %s OK\n", method, u)
b, err := req.Bytes()
if err != nil {
log.Errorf("Get byte[] from response failed, method: %s\n url: %s\n error: %v", method, u, err)
diff --git a/contrib/backup/multicloud/driver.go b/contrib/backup/multicloud/driver.go
index 409e1cb52..3d0d9982f 100644
--- a/contrib/backup/multicloud/driver.go
+++ b/contrib/backup/multicloud/driver.go
@@ -137,5 +137,7 @@ func (m *MultiCloud) Restore(backup *backup.BackupSpec, volId string, volFile *o
}
func (m *MultiCloud) Delete(backup *backup.BackupSpec) error {
- return nil
+ bucket := backup.Metadata["bucket"]
+ key := backup.Id
+ return m.client.RemoveObject(bucket, key)
}
From 7cc18cc8e49f84bebf25fb1d70963d834121e324 Mon Sep 17 00:00:00 2001
From: jerry
Date: Tue, 13 Nov 2018 11:16:18 +0800
Subject: [PATCH 06/20] Make client request timeout a little bit longer
---
client/receiver.go | 3 +++
1 file changed, 3 insertions(+)
diff --git a/client/receiver.go b/client/receiver.go
index f14f40988..e24b74e35 100755
--- a/client/receiver.go
+++ b/client/receiver.go
@@ -20,6 +20,7 @@ import (
"io/ioutil"
"net/http"
"strings"
+ "time"
"github.com/astaxie/beego/httplib"
"github.com/gophercloud/gophercloud"
@@ -67,6 +68,8 @@ func NewReceiver() Receiver {
func request(url string, method string, headers HeaderOption, input interface{}, output interface{}) error {
req := httplib.NewBeegoRequest(url, strings.ToUpper(method))
+ // Set the request timeout a little bit longer upload snapshot to cloud temporarily.
+ req.SetTimeout(time.Minute*6, time.Minute*6)
// init body
if input != nil {
req.JSONBody(input)
From d23ca291b11d6894d3c3f4e9439d86063c32c0fb Mon Sep 17 00:00:00 2001
From: PengYiOfOpenSDS
Date: Wed, 14 Nov 2018 10:23:10 +0800
Subject: [PATCH 07/20] CSI-Plugin support FC protocol
---
contrib/connector/common.go | 11 ++++++++--
contrib/connector/connector.go | 10 ++++++++--
contrib/connector/fc/fc.go | 2 +-
contrib/connector/fc/fibreChannel.go | 30 ++++++++++++++++++++++------
contrib/connector/iscsi/helper.go | 24 ++++++++++++++++------
contrib/connector/iscsi/iscsi.go | 4 ++--
contrib/connector/rbd/rbd.go | 13 ++++++++++--
7 files changed, 73 insertions(+), 21 deletions(-)
diff --git a/contrib/connector/common.go b/contrib/connector/common.go
index eb40d1d56..fb8d7f759 100644
--- a/contrib/connector/common.go
+++ b/contrib/connector/common.go
@@ -21,7 +21,13 @@ import (
"strings"
)
-// execCmd ...
+// InitiatorInfo implementation
+type InitiatorInfo struct {
+ HostName string `json:"hostName"`
+ InitiatorData map[string]interface{} `json:"initiatorData"`
+}
+
+// ExecCmd Log and convert the result of exec.Command
func ExecCmd(name string, arg ...string) (string, error) {
log.Printf("Command: %s %s:\n", name, strings.Join(arg, " "))
info, err := exec.Command(name, arg...).CombinedOutput()
@@ -137,11 +143,12 @@ func GetHostIp() string {
func GetHostName() (string, error) {
hostName, err := ExecCmd("hostname")
if err != nil {
- log.Printf("failed to get host name: %v", err)
+ log.Printf("failed to get hostname: %v", err)
return "", err
}
hostName = strings.Replace(hostName, "\n", "", -1)
+ log.Printf("GetHostName result: %v", hostName)
return hostName, nil
}
diff --git a/contrib/connector/connector.go b/contrib/connector/connector.go
index 65a1829b3..d8018a9cb 100644
--- a/contrib/connector/connector.go
+++ b/contrib/connector/connector.go
@@ -16,33 +16,39 @@ package connector
import (
"fmt"
+ "log"
)
+// Connector implementation
type Connector interface {
Attach(map[string]interface{}) (string, error)
Detach(map[string]interface{}) error
- GetInitiatorInfo() (string, error)
+ GetInitiatorInfo() (InitiatorInfo, error)
}
+// NewConnector implementation
func NewConnector(cType string) Connector {
if cnt, exist := cnts[cType]; exist {
return cnt
}
+ log.Printf("%s is not registered to connector", cType)
return nil
}
var cnts = map[string]Connector{}
+// RegisterConnector implementation
func RegisterConnector(cType string, cnt Connector) error {
if _, exist := cnts[cType]; exist {
- return fmt.Errorf("Connector %s already exist.", cType)
+ return fmt.Errorf("Connector %s already exist", cType)
}
cnts[cType] = cnt
return nil
}
+// UnregisterConnector implementation
func UnregisterConnector(cType string) {
if _, exist := cnts[cType]; !exist {
return
diff --git a/contrib/connector/fc/fc.go b/contrib/connector/fc/fc.go
index 55a4c58e1..a7730aa91 100644
--- a/contrib/connector/fc/fc.go
+++ b/contrib/connector/fc/fc.go
@@ -52,6 +52,6 @@ func (f *FC) Detach(conn map[string]interface{}) error {
}
// GetInitiatorInfo implementation
-func (f *FC) GetInitiatorInfo() (string, error) {
+func (f *FC) GetInitiatorInfo() (connector.InitiatorInfo, error) {
return f.self.getInitiatorInfo()
}
diff --git a/contrib/connector/fc/fibreChannel.go b/contrib/connector/fc/fibreChannel.go
index 3d8050894..14f064cdf 100644
--- a/contrib/connector/fc/fibreChannel.go
+++ b/contrib/connector/fc/fibreChannel.go
@@ -23,6 +23,7 @@ import (
"time"
"github.com/mitchellh/mapstructure"
+ "github.com/opensds/opensds/contrib/connector"
)
type FCConnectorInfo struct {
@@ -216,23 +217,40 @@ func (f *fibreChannel) getFChbasInfo() ([]map[string]string, error) {
return hbasInfos, nil
}
-func (f *fibreChannel) getInitiatorInfo() (string, error) {
+func (f *fibreChannel) getInitiatorInfo() (connector.InitiatorInfo, error) {
+ var initiatorInfo connector.InitiatorInfo
+
hbas, err := f.getFChbasInfo()
if err != nil {
- return "", err
+ log.Printf("getFChbasInfo failed: %v", err.Error())
+ return initiatorInfo, err
}
- var initiatorInfo []string
+ var wwpns []string
+ var wwnns []string
for _, hba := range hbas {
if v, ok := hba[PortName]; ok {
- initiatorInfo = append(initiatorInfo, Wwpn+":"+v)
+ wwpns = append(wwpns, v)
}
if v, ok := hba[NodeName]; ok {
- initiatorInfo = append(initiatorInfo, Wwnn+":"+v)
+ wwnns = append(wwnns, v)
}
}
- return strings.Join(initiatorInfo, ","), nil
+ initiatorInfo.InitiatorData = make(map[string]interface{})
+ initiatorInfo.InitiatorData[Wwpn] = wwpns
+ initiatorInfo.InitiatorData[Wwnn] = wwnns
+
+ hostName, err := connector.GetHostName()
+ if err != nil {
+ return initiatorInfo, err
+ }
+
+ initiatorInfo.HostName = hostName
+ log.Printf("getFChbasInfo success: protocol=%v, initiatorInfo=%v",
+ fcDriver, initiatorInfo)
+
+ return initiatorInfo, nil
}
diff --git a/contrib/connector/iscsi/helper.go b/contrib/connector/iscsi/helper.go
index 093e504ba..01281217b 100644
--- a/contrib/connector/iscsi/helper.go
+++ b/contrib/connector/iscsi/helper.go
@@ -17,9 +17,7 @@ package iscsi
import (
"errors"
"log"
-
"os"
-
"path/filepath"
"strconv"
"strings"
@@ -265,15 +263,29 @@ func ParseIscsiConnectInfo(connectInfo map[string]interface{}) *IscsiConnectorIn
}
// getInitiatorInfo implementation
-func getInitiatorInfo() (string, error) {
+func getInitiatorInfo() (connector.InitiatorInfo, error) {
+ var initiatorInfo connector.InitiatorInfo
+
initiators, err := GetInitiator()
if err != nil {
- return "", err
+ return initiatorInfo, err
}
if len(initiators) == 0 {
- return "", errors.New("The number of iqn is wrong")
+ return initiatorInfo, errors.New("The number of iqn is wrong")
+ }
+
+ initiatorInfo.InitiatorData = make(map[string]interface{})
+ initiatorInfo.InitiatorData[Iqn] = initiators[0]
+
+ hostName, err := connector.GetHostName()
+ if err != nil {
+ return initiatorInfo, err
}
- return initiators[0], nil
+ initiatorInfo.HostName = hostName
+ log.Printf("getFChbasInfo success: protocol=%v, initiatorInfo=%v",
+ iscsiDriver, initiatorInfo)
+
+ return initiatorInfo, nil
}
diff --git a/contrib/connector/iscsi/iscsi.go b/contrib/connector/iscsi/iscsi.go
index eefec1f6b..b91617f6a 100644
--- a/contrib/connector/iscsi/iscsi.go
+++ b/contrib/connector/iscsi/iscsi.go
@@ -20,7 +20,7 @@ import (
const (
iscsiDriver = "iscsi"
- Iqn = "iqn"
+ Iqn = "iqn"
)
type Iscsi struct{}
@@ -40,6 +40,6 @@ func (isc *Iscsi) Detach(conn map[string]interface{}) error {
}
// GetInitiatorInfo implementation
-func (isc *Iscsi) GetInitiatorInfo() (string, error) {
+func (isc *Iscsi) GetInitiatorInfo() (connector.InitiatorInfo, error) {
return getInitiatorInfo()
}
diff --git a/contrib/connector/rbd/rbd.go b/contrib/connector/rbd/rbd.go
index 05a78a204..ea9d53bd5 100644
--- a/contrib/connector/rbd/rbd.go
+++ b/contrib/connector/rbd/rbd.go
@@ -97,8 +97,17 @@ func (*RBD) Detach(conn map[string]interface{}) error {
}
// GetInitiatorInfo implementation
-func (*RBD) GetInitiatorInfo() (string, error) {
- return "", nil
+func (*RBD) GetInitiatorInfo() (connector.InitiatorInfo, error) {
+ var initiatorInfo connector.InitiatorInfo
+ hostName, err := connector.GetHostName()
+
+ if err != nil {
+ return initiatorInfo, err
+ }
+
+ initiatorInfo.HostName = hostName
+
+ return initiatorInfo, nil
}
func mapDevice(poolName, imageName string, hosts, ports []interface{}) (string, error) {
From 7651cd752ba39114c8f5aad16e8858356ae0139e Mon Sep 17 00:00:00 2001
From: PengYiOfOpenSDS
Date: Thu, 15 Nov 2018 10:06:31 +0800
Subject: [PATCH 08/20] If the volume is created from snapshot on dorado, the
volume name cannot exceed 31.
---
contrib/drivers/huawei/dorado/dorado.go | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/contrib/drivers/huawei/dorado/dorado.go b/contrib/drivers/huawei/dorado/dorado.go
index 717fb1b6e..3ba42e4f4 100644
--- a/contrib/drivers/huawei/dorado/dorado.go
+++ b/contrib/drivers/huawei/dorado/dorado.go
@@ -74,7 +74,16 @@ func (d *Driver) createVolumeFromSnapshot(opt *pb.CreateVolumeOpts) (*model.Volu
return nil, err1
}
- lun, err := d.client.CreateVolume(opt.GetName(), opt.GetSize(), volumeDesc, poolId)
+ name := opt.GetName()
+ // If the volume is created from snapshot, the volume name cannot exceed 31.
+ if len(opt.GetSnapshotId()) > 0 {
+ if len(name) > 31 {
+ name = string([]byte(name)[:31])
+ log.Infof("volume name is shortened from %s to %s", opt.GetName(), name)
+ }
+ }
+
+ lun, err := d.client.CreateVolume(name, opt.GetSize(), volumeDesc, poolId)
if err != nil {
log.Error("Create Volume Failed:", err)
return nil, err
From e39830c015adffcdb2c55682b23e4e4dff16872b Mon Sep 17 00:00:00 2001
From: jerry
Date: Thu, 15 Nov 2018 11:48:39 +0800
Subject: [PATCH 09/20] Remove uused code, and fixed failback bug
---
contrib/drivers/huawei/dorado/replication.go | 79 +-------------------
1 file changed, 4 insertions(+), 75 deletions(-)
diff --git a/contrib/drivers/huawei/dorado/replication.go b/contrib/drivers/huawei/dorado/replication.go
index 50b70a88d..710d2fb6c 100644
--- a/contrib/drivers/huawei/dorado/replication.go
+++ b/contrib/drivers/huawei/dorado/replication.go
@@ -204,10 +204,6 @@ func (r *ReplicaPairMgr) CheckRemoteAvailable() bool {
return false
}
-func (r *ReplicaPairMgr) UpdateReplicationCapability(stats []string) {
- //rmtOk := r.CheckRemoteAvailable()
-}
-
func (r *ReplicaPairMgr) GetRemoteDevInfo() (id, name string) {
wwn := r.TryGetRemoteWwn()
if wwn == "" {
@@ -220,24 +216,6 @@ func (r *ReplicaPairMgr) GetRemoteDevInfo() (id, name string) {
return dev.Id, dev.Name
}
-func (r *ReplicaPairMgr) BuildRemoteLunParams(localLun *Lun) map[string]interface{} {
- return map[string]interface{}{
- "Type": "11",
- "Name": localLun.Name,
- "Parenttype": "216",
- "ParentId": "",
- "Description": localLun.Description,
- "Alloctype": localLun.AllocType,
- "Capacity": localLun.Capability,
- //"Writepolicy": Self.Conf.Lun_Write_Type,
- //"Prefetchpolicy": Self.Conf.Lun_Prefetch_Type,
- //"Prefetchvalue": Self.Conf.Lun_Prefetch_Value,
- //"Datatransferpolicy": Self.Conf.Lun_Policy,
- //"Readcachepolicy": Self.Conf.Lun_Read_Cache_Policy,
- //"Writecachepolicy": Self.Conf.Lun_Write_Cache_Policy,
- }
-}
-
func (r *ReplicaPairMgr) WaitVolumeOnline(client *DoradoClient, lun *Lun, interval, timeout time.Duration) error {
if lun.RunningStatus == StatusVolumeReady {
return nil
@@ -263,32 +241,6 @@ func (r *ReplicaPairMgr) WaitVolumeOnline(client *DoradoClient, lun *Lun, interv
}, interval, timeout)
}
-func (r *ReplicaPairMgr) CreateRemoteLun(localLun *Lun) (*Lun, error) {
- //params := r.BuildRemoteLunParams(localLun)
- sector, err := strconv.ParseInt(localLun.SectorSize, 10, 64)
- if err != nil {
- return nil, err
- }
- rmtLun, err := r.remoteClient.CreateVolume(localLun.Name, sector, localLun.Description, "0")
- if err != nil {
- return nil, err
- }
- interval := DefaultReplicaWaitInterval
- timeout := DefaultReplicaWaitTimeout
- if err := r.WaitVolumeOnline(r.remoteClient, rmtLun, interval, timeout); err != nil {
- r.remoteClient.DeleteVolume(rmtLun.Id)
- return nil, err
- }
- return rmtLun, err
-}
-
-func (r *ReplicaPairMgr) DeleteRemoteLun(id string) error {
- if r.remoteClient.CheckLunExist(id, "") {
- return r.remoteClient.DeleteVolume(id)
- }
- return nil
-}
-
func (r *ReplicaPairMgr) DeletePair(id string) error {
if !r.localClient.CheckPairExist(id) {
return nil
@@ -303,12 +255,12 @@ func (r *ReplicaPairMgr) DeletePair(id string) error {
return nil
}
-func (r *ReplicaPairMgr) CreateReplication(pLunId, sLunId, replicationMode string, replicaPeriod string) (map[string]string, error) {
+func (r *ReplicaPairMgr) CreateReplication(localLunId, rmtLunId, replicationMode string, replicaPeriod string) (map[string]string, error) {
interval := DefaultReplicaWaitInterval
timeout := DefaultReplicaWaitTimeout
var respMap = make(map[string]string)
- localLun, err := r.localClient.GetVolume(pLunId)
+ localLun, err := r.localClient.GetVolume(localLunId)
if err != nil {
return nil, err
}
@@ -317,39 +269,20 @@ func (r *ReplicaPairMgr) CreateReplication(pLunId, sLunId, replicationMode strin
if err != nil {
return nil, err
}
- var rmtLunId = sLunId
- if sLunId == "" {
- rmtLun, err := r.CreateRemoteLun(localLun)
- if err != nil {
- return nil, err
- }
- rmtLunId = rmtLun.Id
- respMap[KSecondaryLunId] = rmtLunId
- }
-
- var cleanlun = false
- defer func() {
- if cleanlun && sLunId == "" {
- r.DeleteRemoteLun(rmtLunId)
- }
- }()
rmtDevId, rmtDevName := r.GetRemoteDevInfo()
log.Errorf("rmtDevId:%s, rmtDevName:%s", rmtDevId, rmtDevName)
if rmtDevId == "" || rmtDevName == "" {
- cleanlun = true
return nil, fmt.Errorf("get remote deivce info failed")
}
pair, err := r.localOp.Create(localLun.Id, rmtLunId, rmtDevId, rmtDevName, replicationMode, ReplicaSpeed, replicaPeriod)
if err != nil {
- cleanlun = true
return nil, err
}
log.Error("start sync ....", pair)
if err := r.localDriver.Sync(pair.Id, replicationMode == ReplicaSyncMode); err != nil {
r.DeletePair(pair.Id)
- cleanlun = true
return nil, err
}
respMap[KPairId] = pair.Id
@@ -361,9 +294,6 @@ func (r *ReplicaPairMgr) DeleteReplication(pairId, rmtLunId string) error {
log.Error("Delete pair failed,", err)
return err
}
- if rmtLunId != "" {
- return r.DeleteRemoteLun(rmtLunId)
- }
return nil
}
@@ -376,10 +306,9 @@ func (r *ReplicaPairMgr) DeleteReplication(pairId, rmtLunId string) error {
// 5. Enable replications.
func (r *ReplicaPairMgr) Failback(pairId string) error {
+ r.remoteDriver.Enable(pairId, true)
+ r.remoteDriver.WaitReplicaReady(pairId)
r.localDriver.Enable(pairId, false)
- r.localDriver.WaitReplicaReady(pairId)
- r.remoteDriver.Failover(pairId)
- r.remoteDriver.Enable(pairId, false)
return nil
}
From 16cebf9f330e83b7bc7deefd07c818c65d37ff01 Mon Sep 17 00:00:00 2001
From: PengYiOfOpenSDS
Date: Tue, 20 Nov 2018 17:06:04 +0800
Subject: [PATCH 10/20] dorado: create volume from snapshot
---
contrib/drivers/huawei/dorado/dorado.go | 53 +++++++++++--------------
1 file changed, 24 insertions(+), 29 deletions(-)
diff --git a/contrib/drivers/huawei/dorado/dorado.go b/contrib/drivers/huawei/dorado/dorado.go
index 3ba42e4f4..45da19746 100644
--- a/contrib/drivers/huawei/dorado/dorado.go
+++ b/contrib/drivers/huawei/dorado/dorado.go
@@ -74,32 +74,29 @@ func (d *Driver) createVolumeFromSnapshot(opt *pb.CreateVolumeOpts) (*model.Volu
return nil, err1
}
- name := opt.GetName()
- // If the volume is created from snapshot, the volume name cannot exceed 31.
- if len(opt.GetSnapshotId()) > 0 {
- if len(name) > 31 {
- name = string([]byte(name)[:31])
- log.Infof("volume name is shortened from %s to %s", opt.GetName(), name)
- }
- }
-
- lun, err := d.client.CreateVolume(name, opt.GetSize(), volumeDesc, poolId)
+ lun, err := d.client.CreateVolume(EncodeName(opt.GetId()), opt.GetSize(),
+ volumeDesc, poolId)
if err != nil {
log.Error("Create Volume Failed:", err)
return nil, err
}
log.Infof("Create Volume from snapshot, source_lun_id : %s , target_lun_id : %s", snapshot.Id, lun.Id)
-
err = WaitForCondition(func() (bool, error) {
- if lun.HealthStatus == StatusHealth && lun.RunningStatus == StatusVolumeReady {
- return true, nil
+ getVolumeResult, getVolumeErr := d.client.GetVolume(lun.Id)
+ if nil == getVolumeErr {
+ if getVolumeResult.HealthStatus == StatusHealth && getVolumeResult.RunningStatus == StatusVolumeReady {
+ return true, nil
+ } else {
+ log.V(5).Infof("Current lun HealthStatus : %s , RunningStatus : %s",
+ getVolumeResult.HealthStatus, getVolumeResult.RunningStatus)
+ return false, nil
+ }
} else {
- msg := fmt.Sprintf("Volume state is not mathch, lun ID : %s , HealthStatus : %s,RunningStatus : %s",
- lun.Id, lun.HealthStatus, lun.RunningStatus)
- return false, errors.New(msg)
+ return false, getVolumeErr
}
}, LunReadyWaitInterval, LunReadyWaitTimeout)
+
if err != nil {
log.Error(err)
d.client.DeleteVolume(lun.Id)
@@ -127,37 +124,35 @@ func (d *Driver) createVolumeFromSnapshot(opt *pb.CreateVolumeOpts) (*model.Volu
func (d *Driver) copyVolume(opt *pb.CreateVolumeOpts, srcid, tgtid string) error {
metadata := opt.GetMetadata()
copyspeed := metadata["copyspeed"]
- luncopyid, err := d.client.CreateLunCopy(opt.GetName(), srcid, tgtid, copyspeed)
+ luncopyid, err := d.client.CreateLunCopy(EncodeName(opt.GetId()), srcid,
+ tgtid, copyspeed)
if err != nil {
log.Error("Create Lun Copy failed,", err)
return err
}
- defer d.client.DeleteLunCopy(luncopyid)
+
err = d.client.StartLunCopy(luncopyid)
if err != nil {
log.Errorf("Start lun: %s copy failed :%v,", luncopyid, err)
+ d.client.DeleteLunCopy(luncopyid)
return err
}
- lunCopyInfo, err1 := d.client.GetLunInfo(luncopyid)
- if err1 != nil {
- log.Errorf("Get lun info failed :%v", err1)
- return err1
- }
+
err = WaitForCondition(func() (bool, error) {
- if lunCopyInfo.RunningStatus == StatusLuncopyReady || lunCopyInfo.RunningStatus == StatusLunCoping {
+ deleteLunCopyErr := d.client.DeleteLunCopy(luncopyid)
+ if nil == deleteLunCopyErr {
return true, nil
- } else if lunCopyInfo.HealthStatus != StatusHealth {
- msg := fmt.Sprintf("An error occurred during the luncopy operation. Lun name : %s ,Lun copy health status : %s ,Lun copy running status : %s ",
- lunCopyInfo.Name, lunCopyInfo.HealthStatus, lunCopyInfo.RunningStatus)
- return false, errors.New(msg)
}
- return true, nil
+
+ return false, nil
}, LunCopyWaitInterval, LunCopyWaitTimeout)
+
if err != nil {
log.Error(err)
return err
}
+
log.Infof("Copy Volume %s success", tgtid)
return nil
}
From e2c052b978556a78a73bd0d9a9c782bd8e66ae97 Mon Sep 17 00:00:00 2001
From: PengYiOfOpenSDS
Date: Wed, 21 Nov 2018 11:01:13 +0800
Subject: [PATCH 11/20] Optimization code
---
contrib/connector/connector.go | 13 +++++++++++++
contrib/connector/fc/fc.go | 10 +---------
contrib/connector/fc/fibreChannel.go | 10 +++++-----
contrib/connector/iscsi/helper.go | 4 ++--
contrib/connector/iscsi/iscsi.go | 7 +------
contrib/connector/rbd/rbd.go | 6 +-----
6 files changed, 23 insertions(+), 27 deletions(-)
diff --git a/contrib/connector/connector.go b/contrib/connector/connector.go
index d8018a9cb..d7c4aed4f 100644
--- a/contrib/connector/connector.go
+++ b/contrib/connector/connector.go
@@ -19,6 +19,19 @@ import (
"log"
)
+const (
+ FcDriver = "fibre_channel"
+ PortName = "port_name"
+ NodeName = "node_name"
+ Wwpn = "wwpn"
+ Wwnn = "wwnn"
+
+ IscsiDriver = "iscsi"
+ Iqn = "iqn"
+
+ RbdDriver = "rbd"
+)
+
// Connector implementation
type Connector interface {
Attach(map[string]interface{}) (string, error)
diff --git a/contrib/connector/fc/fc.go b/contrib/connector/fc/fc.go
index a7730aa91..c8ee66a31 100644
--- a/contrib/connector/fc/fc.go
+++ b/contrib/connector/fc/fc.go
@@ -18,20 +18,12 @@ import (
"github.com/opensds/opensds/contrib/connector"
)
-const (
- fcDriver = "fibre_channel"
- PortName = "port_name"
- NodeName = "node_name"
- Wwpn = "wwpn"
- Wwnn = "wwnn"
-)
-
type FC struct {
self *fibreChannel
}
func init() {
- connector.RegisterConnector(fcDriver,
+ connector.RegisterConnector(connector.FcDriver,
&FC{
self: &fibreChannel{
helper: &linuxfc{},
diff --git a/contrib/connector/fc/fibreChannel.go b/contrib/connector/fc/fibreChannel.go
index 14f064cdf..ecc0c272b 100644
--- a/contrib/connector/fc/fibreChannel.go
+++ b/contrib/connector/fc/fibreChannel.go
@@ -230,18 +230,18 @@ func (f *fibreChannel) getInitiatorInfo() (connector.InitiatorInfo, error) {
var wwnns []string
for _, hba := range hbas {
- if v, ok := hba[PortName]; ok {
+ if v, ok := hba[connector.PortName]; ok {
wwpns = append(wwpns, v)
}
- if v, ok := hba[NodeName]; ok {
+ if v, ok := hba[connector.NodeName]; ok {
wwnns = append(wwnns, v)
}
}
initiatorInfo.InitiatorData = make(map[string]interface{})
- initiatorInfo.InitiatorData[Wwpn] = wwpns
- initiatorInfo.InitiatorData[Wwnn] = wwnns
+ initiatorInfo.InitiatorData[connector.Wwpn] = wwpns
+ initiatorInfo.InitiatorData[connector.Wwnn] = wwnns
hostName, err := connector.GetHostName()
if err != nil {
@@ -250,7 +250,7 @@ func (f *fibreChannel) getInitiatorInfo() (connector.InitiatorInfo, error) {
initiatorInfo.HostName = hostName
log.Printf("getFChbasInfo success: protocol=%v, initiatorInfo=%v",
- fcDriver, initiatorInfo)
+ connector.FcDriver, initiatorInfo)
return initiatorInfo, nil
}
diff --git a/contrib/connector/iscsi/helper.go b/contrib/connector/iscsi/helper.go
index 01281217b..c10a31546 100644
--- a/contrib/connector/iscsi/helper.go
+++ b/contrib/connector/iscsi/helper.go
@@ -276,7 +276,7 @@ func getInitiatorInfo() (connector.InitiatorInfo, error) {
}
initiatorInfo.InitiatorData = make(map[string]interface{})
- initiatorInfo.InitiatorData[Iqn] = initiators[0]
+ initiatorInfo.InitiatorData[connector.Iqn] = initiators[0]
hostName, err := connector.GetHostName()
if err != nil {
@@ -285,7 +285,7 @@ func getInitiatorInfo() (connector.InitiatorInfo, error) {
initiatorInfo.HostName = hostName
log.Printf("getFChbasInfo success: protocol=%v, initiatorInfo=%v",
- iscsiDriver, initiatorInfo)
+ connector.IscsiDriver, initiatorInfo)
return initiatorInfo, nil
}
diff --git a/contrib/connector/iscsi/iscsi.go b/contrib/connector/iscsi/iscsi.go
index b91617f6a..0e899c3ea 100644
--- a/contrib/connector/iscsi/iscsi.go
+++ b/contrib/connector/iscsi/iscsi.go
@@ -18,15 +18,10 @@ import (
"github.com/opensds/opensds/contrib/connector"
)
-const (
- iscsiDriver = "iscsi"
- Iqn = "iqn"
-)
-
type Iscsi struct{}
func init() {
- connector.RegisterConnector(iscsiDriver, &Iscsi{})
+ connector.RegisterConnector(connector.IscsiDriver, &Iscsi{})
}
func (isc *Iscsi) Attach(conn map[string]interface{}) (string, error) {
diff --git a/contrib/connector/rbd/rbd.go b/contrib/connector/rbd/rbd.go
index ea9d53bd5..a7b939e5e 100644
--- a/contrib/connector/rbd/rbd.go
+++ b/contrib/connector/rbd/rbd.go
@@ -27,10 +27,6 @@ import (
"github.com/opensds/opensds/contrib/connector"
)
-const (
- rbdDriver = "rbd"
-)
-
var (
rbdBusPath = "/sys/bus/rbd"
rbdDevicePath = path.Join(rbdBusPath, "devices")
@@ -42,7 +38,7 @@ type RBD struct{}
var _ connector.Connector = &RBD{}
func init() {
- connector.RegisterConnector(rbdDriver, &RBD{})
+ connector.RegisterConnector(connector.RbdDriver, &RBD{})
}
func (*RBD) Attach(conn map[string]interface{}) (string, error) {
From 7878e5afa1906aa0404ba42fdc5826670ae88cc6 Mon Sep 17 00:00:00 2001
From: jerry
Date: Wed, 21 Nov 2018 16:43:36 +0800
Subject: [PATCH 12/20] Add create volume from cloud snapshot and optmize some
bugs
---
client/receiver.go | 11 +-
contrib/backup/driver.go | 2 +-
contrib/backup/multicloud/client.go | 33 +++-
contrib/backup/multicloud/driver.go | 41 ++++-
contrib/drivers/lvm/lvm.go | 107 ++++++++++---
osdsctl/cli/cli.go | 16 +-
osdsctl/cli/common.go | 8 -
osdsctl/cli/dock.go | 2 -
osdsctl/cli/profile.go | 3 -
osdsctl/cli/replication.go | 4 -
osdsctl/cli/version.go | 2 -
osdsctl/cli/volume.go | 42 +++--
osdsctl/cli/volumeattachment.go | 4 -
osdsctl/cli/volumegroup.go | 4 -
osdsctl/cli/volumesnapshot.go | 4 -
pkg/api/db.go | 17 ++-
pkg/api/volume.go | 1 -
pkg/controller/controller.go | 29 ++--
pkg/dock/proto/dock.pb.go | 228 +++++++++++++++-------------
pkg/dock/proto/dock.proto | 2 +
pkg/model/volume.go | 3 +
21 files changed, 349 insertions(+), 214 deletions(-)
diff --git a/client/receiver.go b/client/receiver.go
index 8c5e3ba0f..2829a9358 100755
--- a/client/receiver.go
+++ b/client/receiver.go
@@ -18,6 +18,7 @@ import (
"encoding/json"
"fmt"
"io/ioutil"
+ "log"
"net/http"
"strings"
"time"
@@ -71,9 +72,16 @@ func request(url string, method string, headers HeaderOption, input interface{},
// Set the request timeout a little bit longer upload snapshot to cloud temporarily.
req.SetTimeout(time.Minute*6, time.Minute*6)
// init body
+ log.Printf("%s %s\n", strings.ToUpper(method), url)
if input != nil {
- req.JSONBody(input)
+ body, err := json.MarshalIndent(input, "", " ")
+ if err != nil {
+ return err
+ }
+ log.Printf("Request body:\n%s\n", string(body))
+ req.Body(body)
}
+
//init header
if headers != nil {
for k, v := range headers {
@@ -90,6 +98,7 @@ func request(url string, method string, headers HeaderOption, input interface{},
return err
}
+ log.Printf("\nStatusCode: %s\nResponse Body:\n%s\n", resp.Status, string(rbody))
if 400 <= resp.StatusCode && resp.StatusCode <= 599 {
return NewHttpError(resp.StatusCode, string(rbody))
}
diff --git a/contrib/backup/driver.go b/contrib/backup/driver.go
index c5007f463..546b7e0df 100644
--- a/contrib/backup/driver.go
+++ b/contrib/backup/driver.go
@@ -28,7 +28,7 @@ type BackupSpec struct {
type BackupDriver interface {
SetUp() error
Backup(backup *BackupSpec, volumeFile *os.File) error
- Restore(backup *BackupSpec, volId string, volFile *os.File) error
+ Restore(backup *BackupSpec, backupId string, volFile *os.File) error
Delete(backup *BackupSpec) error
CleanUp() error
}
diff --git a/contrib/backup/multicloud/client.go b/contrib/backup/multicloud/client.go
index 9c4b4c816..fb2c5520d 100644
--- a/contrib/backup/multicloud/client.go
+++ b/contrib/backup/multicloud/client.go
@@ -25,6 +25,7 @@ import (
"github.com/astaxie/beego/httplib"
log "github.com/golang/glog"
+ "io/ioutil"
)
const (
@@ -102,11 +103,12 @@ func (c *Client) doRequest(method, u string, in interface{}, cb ReqSettingCB) ([
}
log.V(5).Infof("%s: %s OK\n", method, u)
- b, err := req.Bytes()
+ rbody, err := ioutil.ReadAll(resp.Body)
if err != nil {
log.Errorf("Get byte[] from response failed, method: %s\n url: %s\n error: %v", method, u, err)
+ return nil, nil, err
}
- return b, resp.Header, nil
+ return rbody, resp.Header, nil
}
func (c *Client) request(method, p string, in, out interface{}, cb ReqSettingCB) error {
@@ -251,3 +253,30 @@ func (c *Client) AbortMultipartUpload(bucketName, objectKey string) error {
//}
return nil
}
+
+func (c *Client) DownloadPart(bucketName, objectKey string, offset, size int64) ([]byte, error) {
+ p := path.Join("s3", bucketName, objectKey)
+
+ reqSettingCB := func(req *httplib.BeegoHTTPRequest) error {
+ rangeStr := fmt.Sprintf("bytes:%d-%d", offset, offset+size-1)
+ req.Header("Range", rangeStr)
+ req.SetTimeout(c.uploadTimeout, c.uploadTimeout)
+ return nil
+ }
+
+ u, err := url.Parse(p)
+ if err != nil {
+ return nil, err
+ }
+ base, err := url.Parse(c.baseURL)
+ if err != nil {
+ return nil, err
+ }
+
+ fullUrl := base.ResolveReference(u)
+ body, _, err := c.doRequest("GET", fullUrl.String(), nil, reqSettingCB)
+ if err != nil {
+ return nil, err
+ }
+ return body, nil
+}
diff --git a/contrib/backup/multicloud/driver.go b/contrib/backup/multicloud/driver.go
index 3d0d9982f..b6394142f 100644
--- a/contrib/backup/multicloud/driver.go
+++ b/contrib/backup/multicloud/driver.go
@@ -15,6 +15,7 @@
package multicloud
import (
+ "errors"
"io"
"io/ioutil"
"os"
@@ -25,8 +26,8 @@ import (
)
const (
- ConfFile = "/etc/opensds/driver/multi-cloud.yaml"
- UploadChunkSize = 1024 * 1024 * 50
+ ConfFile = "/etc/opensds/driver/multi-cloud.yaml"
+ ChunkSize = 1024 * 1024 * 50
)
func init() {
@@ -89,10 +90,13 @@ func (m *MultiCloud) CleanUp() error {
}
func (m *MultiCloud) Backup(backup *backup.BackupSpec, volFile *os.File) error {
- buf := make([]byte, UploadChunkSize)
+ buf := make([]byte, ChunkSize)
input := &CompleteMultipartUpload{}
- bucket := backup.Metadata["bucket"]
+ bucket, ok := backup.Metadata["bucket"]
+ if !ok {
+ return errors.New("can't find bucket in metadata")
+ }
key := backup.Id
initResp, err := m.client.InitMultiPartUpload(bucket, key)
if err != nil {
@@ -132,7 +136,34 @@ func (m *MultiCloud) Backup(backup *backup.BackupSpec, volFile *os.File) error {
return nil
}
-func (m *MultiCloud) Restore(backup *backup.BackupSpec, volId string, volFile *os.File) error {
+func (m *MultiCloud) Restore(backup *backup.BackupSpec, backupId string, volFile *os.File) error {
+ bucket, ok := backup.Metadata["bucket"]
+ if !ok {
+ return errors.New("can't find bucket in metadata")
+ }
+ var downloadSize = ChunkSize
+ // if the size of data of smaller than require download size
+ // downloading is completed.
+ for offset := int64(0); downloadSize == ChunkSize; offset += ChunkSize {
+ data, err := m.client.DownloadPart(bucket, backupId, offset, ChunkSize)
+ if err != nil {
+ glog.Errorf("download part failed: %v", err)
+ return err
+ }
+ downloadSize = len(data)
+ glog.V(5).Infof("download size: %d\n", downloadSize)
+ volFile.Seek(offset, 0)
+ size, err := volFile.Write(data)
+ if err != nil {
+ glog.Errorf("write part failed: %v", err)
+ return err
+ }
+ if size != downloadSize {
+ return errors.New("size not equal to download size")
+ }
+ glog.V(5).Infof("write buf size len:%d", size)
+ }
+ glog.Infof("restore success ...")
return nil
}
diff --git a/contrib/drivers/lvm/lvm.go b/contrib/drivers/lvm/lvm.go
index f4ffca98d..cea6152b0 100755
--- a/contrib/drivers/lvm/lvm.go
+++ b/contrib/drivers/lvm/lvm.go
@@ -87,7 +87,57 @@ func (d *Driver) Setup() error {
func (*Driver) Unset() error { return nil }
-func (d *Driver) CreateVolume(opt *pb.CreateVolumeOpts) (*model.VolumeSpec, error) {
+func (d *Driver) copySnapshotToVolume(opt *pb.CreateVolumeOpts, lvPath string) error {
+ var snapSize = uint64(opt.GetSnapshotSize())
+ var count = (snapSize << sizeShiftBit) / blocksize
+ var snapName = snapshotPrefix + opt.GetSnapshotId()
+ var snapPath = path.Join("/dev", opt.GetPoolName(), snapName)
+ if _, err := d.handler("dd", []string{
+ "if=" + snapPath,
+ "of=" + lvPath,
+ "count=" + fmt.Sprint(count),
+ "bs=" + fmt.Sprint(blocksize),
+ }); err != nil {
+ log.Error("Failed to create logic volume:", err)
+ return err
+ }
+ return nil
+}
+
+func (d *Driver) downloadSnapshot(bucket, backupId, dest string) error {
+ mc, err := backup.NewBackup("multi-cloud")
+ if err != nil {
+ log.Errorf("get backup driver, err: %v", err)
+ return err
+ }
+
+ if err := mc.SetUp(); err != nil {
+ return err
+ }
+ defer mc.CleanUp()
+
+ file, err := os.OpenFile(dest, os.O_RDWR, 0666)
+ if err != nil {
+ log.Errorf("open lvm snapshot file, err: %v", err)
+ return err
+ }
+ defer file.Close()
+
+ metadata := map[string]string{
+ "bucket": bucket,
+ }
+ b := &backup.BackupSpec{
+ Metadata: metadata,
+ }
+
+ if err := mc.Restore(b, backupId, file); err != nil {
+ log.Errorf("upload snapshot to multi-cloud failed, err: %v", err)
+ return err
+ }
+ return nil
+}
+
+func (d *Driver) CreateVolume(opt *pb.CreateVolumeOpts) (vol *model.VolumeSpec, err error) {
var size = fmt.Sprint(opt.GetSize()) + "G"
var polName = opt.GetPoolName()
var id = opt.GetId()
@@ -121,21 +171,41 @@ func (d *Driver) CreateVolume(opt *pb.CreateVolumeOpts) (*model.VolumeSpec, erro
}
}
- // Copy snapshot to volume
- var snap = opt.GetSnapshotId()
- if snap != "" {
- var snapSize = uint64(opt.GetSnapshotSize())
- var count = (snapSize << sizeShiftBit) / blocksize
- var snapName = snapshotPrefix + snap
- var snapPath = path.Join("/dev", polName, snapName)
- if _, err := d.handler("dd", []string{
- "if=" + snapPath,
- "of=" + lvPath,
- "count=" + fmt.Sprint(count),
- "bs=" + fmt.Sprint(blocksize),
- }); err != nil {
- log.Error("Failed to create logic volume:", err)
- return nil, err
+ // remove created volume if got error
+ defer func() {
+ // using return value as the error flag
+ if vol == nil {
+ _, err := d.handler("lvremove", []string{"-f", lvPath})
+ if err != nil {
+ log.Error("Failed to remove logic volume:", err)
+ }
+ }
+ }()
+
+ // Create volume from snapshot
+ if opt.GetSnapshotId() != "" {
+ if opt.SnapshotFromCloud {
+ // download cloud snapshot to volume
+ data := opt.GetMetadata()
+ backupId, ok := data["backupId"]
+ if !ok {
+ return nil, errors.New("can't find backupId in metadata")
+ }
+ bucket, ok := data["bucket"]
+ if !ok {
+ return nil, errors.New("can't find bucket name in metadata")
+ }
+ err := d.downloadSnapshot(bucket, backupId, lvPath)
+ if err != nil {
+ log.Errorf("Download snapshot failed, %v", err)
+ return nil, err
+ }
+ } else {
+ // copy local snapshot to volume
+ if err := d.copySnapshotToVolume(opt, lvPath); err != nil {
+ log.Errorf("Copy snapshot to volume failed, %v", err)
+ return nil, err
+ }
}
}
@@ -502,11 +572,10 @@ func (d *Driver) deleteUploadedSnapshot(backupId string, bucket string) error {
return nil
}
-func (d *Driver) CreateSnapshot(opt *pb.CreateVolumeSnapshotOpts) (*model.VolumeSnapshotSpec, error) {
+func (d *Driver) CreateSnapshot(opt *pb.CreateVolumeSnapshotOpts) (snap *model.VolumeSnapshotSpec, err error) {
var size = fmt.Sprint(opt.GetSize()) + "G"
var id = opt.GetId()
var snapName = snapshotPrefix + id
- var err error
lvPath, ok := opt.GetMetadata()["lvPath"]
if !ok {
@@ -542,7 +611,7 @@ func (d *Driver) CreateSnapshot(opt *pb.CreateVolumeSnapshotOpts) (*model.Volume
}
defer func() {
- if err != nil {
+ if snap == nil {
log.Errorf("create snapshot failed, rollback it")
d.handler("lvremove", []string{"-f", lvsPath})
}
diff --git a/osdsctl/cli/cli.go b/osdsctl/cli/cli.go
index 060b59c03..da87fe305 100644
--- a/osdsctl/cli/cli.go
+++ b/osdsctl/cli/cli.go
@@ -54,17 +54,27 @@ func init() {
flags.BoolVar(&Debug, "debug", false, "shows debugging output.")
}
-type Writer struct{}
+type DummyWriter struct{}
// do nothing
-func (writer Writer) Write(data []byte) (n int, err error) {
+func (writer DummyWriter) Write(data []byte) (n int, err error) {
+ return len(data), nil
+}
+
+type DebugWriter struct{}
+
+// do nothing
+func (writer DebugWriter) Write(data []byte) (n int, err error) {
+ Debugf("%s", string(data))
return len(data), nil
}
// Run method indicates how to start a cli tool through cobra.
func Run() error {
if !utils.Contained("--debug", os.Args) {
- log.SetOutput(Writer{})
+ log.SetOutput(DummyWriter{})
+ } else {
+ log.SetOutput(DebugWriter{})
}
ep, ok := os.LookupEnv(c.OpensdsEndpoint)
diff --git a/osdsctl/cli/common.go b/osdsctl/cli/common.go
index 87ea347e3..01ff8a333 100644
--- a/osdsctl/cli/common.go
+++ b/osdsctl/cli/common.go
@@ -15,7 +15,6 @@
package cli
import (
- "encoding/json"
"fmt"
"os"
@@ -97,10 +96,3 @@ func ArgsNumCheck(cmd *cobra.Command, args []string, invalidNum int) {
os.Exit(1)
}
}
-
-func PrintResponse(v interface{}) {
- if Debug {
- b, _ := json.Marshal(v)
- Debugln(string(b))
- }
-}
diff --git a/osdsctl/cli/dock.go b/osdsctl/cli/dock.go
index 8d4575b34..fbf8ad9eb 100644
--- a/osdsctl/cli/dock.go
+++ b/osdsctl/cli/dock.go
@@ -83,7 +83,6 @@ func dockAction(cmd *cobra.Command, args []string) {
func dockShowAction(cmd *cobra.Command, args []string) {
ArgsNumCheck(cmd, args, 1)
resp, err := client.GetDock(args[0])
- PrintResponse(resp)
if err != nil {
Fatalln(HttpErrStrip(err))
}
@@ -99,7 +98,6 @@ func dockListAction(cmd *cobra.Command, args []string) {
"Endpoint": dockEndpoint, "Status": dockStatus, "StorageType": dockStorageType}
resp, err := client.ListDocks(opts)
- PrintResponse(resp)
if err != nil {
Fatalln(HttpErrStrip(err))
}
diff --git a/osdsctl/cli/profile.go b/osdsctl/cli/profile.go
index b069af4e3..de9428260 100644
--- a/osdsctl/cli/profile.go
+++ b/osdsctl/cli/profile.go
@@ -100,7 +100,6 @@ func profileCreateAction(cmd *cobra.Command, args []string) {
}
resp, err := client.CreateProfile(prf)
- PrintResponse(resp)
if err != nil {
Fatalln(HttpErrStrip(err))
}
@@ -111,7 +110,6 @@ func profileCreateAction(cmd *cobra.Command, args []string) {
func profileShowAction(cmd *cobra.Command, args []string) {
ArgsNumCheck(cmd, args, 1)
resp, err := client.GetProfile(args[0])
- PrintResponse(resp)
if err != nil {
Fatalln(HttpErrStrip(err))
}
@@ -126,7 +124,6 @@ func profileListAction(cmd *cobra.Command, args []string) {
"Name": profName, "Description": profDescription, "StorageType": profStorageType}
resp, err := client.ListProfiles(opts)
- PrintResponse(resp)
if err != nil {
Fatalln(HttpErrStrip(err))
}
diff --git a/osdsctl/cli/replication.go b/osdsctl/cli/replication.go
index 0089498cd..bb43ed6cf 100644
--- a/osdsctl/cli/replication.go
+++ b/osdsctl/cli/replication.go
@@ -195,7 +195,6 @@ func replicationCreateAction(cmd *cobra.Command, args []string) {
}
resp, err := client.CreateReplication(replica)
- PrintResponse(resp)
if err != nil {
Fatalln(HttpErrStrip(err))
}
@@ -208,7 +207,6 @@ func replicationCreateAction(cmd *cobra.Command, args []string) {
func replicationShowAction(cmd *cobra.Command, args []string) {
ArgsNumCheck(cmd, args, 1)
resp, err := client.GetReplication(args[0])
- PrintResponse(resp)
if err != nil {
Fatalln(HttpErrStrip(err))
}
@@ -227,7 +225,6 @@ func replicationListAction(cmd *cobra.Command, args []string) {
"SecondaryVolumeId": repSecondaryVolumeId}
resp, err := client.ListReplications(opts)
- PrintResponse(resp)
if err != nil {
Fatalln(HttpErrStrip(err))
}
@@ -244,7 +241,6 @@ func replicationUpdateAction(cmd *cobra.Command, args []string) {
}
resp, err := client.UpdateReplication(args[0], replica)
- PrintResponse(resp)
if err != nil {
Fatalln(HttpErrStrip(err))
}
diff --git a/osdsctl/cli/version.go b/osdsctl/cli/version.go
index 67a114390..6e2a8c898 100644
--- a/osdsctl/cli/version.go
+++ b/osdsctl/cli/version.go
@@ -56,7 +56,6 @@ func versionAction(cmd *cobra.Command, args []string) {
func versionShowAction(cmd *cobra.Command, args []string) {
ArgsNumCheck(cmd, args, 1)
resp, err := client.GetVersion(args[0])
- PrintResponse(resp)
if err != nil {
Fatalln(HttpErrStrip(err))
}
@@ -67,7 +66,6 @@ func versionShowAction(cmd *cobra.Command, args []string) {
func versionListAction(cmd *cobra.Command, args []string) {
ArgsNumCheck(cmd, args, 0)
resp, err := client.ListVersions()
- PrintResponse(resp)
if err != nil {
Fatalln(HttpErrStrip(err))
}
diff --git a/osdsctl/cli/volume.go b/osdsctl/cli/volume.go
index 69df03670..ad8d21640 100644
--- a/osdsctl/cli/volume.go
+++ b/osdsctl/cli/volume.go
@@ -78,17 +78,18 @@ var (
)
var (
- volLimit string
- volOffset string
- volSortDir string
- volSortKey string
- volId string
- volTenantId string
- volUserId string
- volStatus string
- volPoolId string
- volProfileId string
- volGroupId string
+ volLimit string
+ volOffset string
+ volSortDir string
+ volSortKey string
+ volId string
+ volTenantId string
+ volUserId string
+ volStatus string
+ volPoolId string
+ volProfileId string
+ volGroupId string
+ snapshotFromCloud bool
)
func init() {
@@ -115,6 +116,7 @@ func init() {
volumeCreateCommand.Flags().StringVarP(&volDesp, "description", "d", "", "the description of created volume")
volumeCreateCommand.Flags().StringVarP(&volAz, "az", "a", "", "the availability zone of created volume")
volumeCreateCommand.Flags().StringVarP(&volSnap, "snapshot", "s", "", "the snapshot to create volume")
+ volumeCreateCommand.Flags().BoolVarP(&snapshotFromCloud, "snapshotFromCloud", "c", false, "download snapshot from cloud")
volumeCommand.AddCommand(volumeShowCommand)
volumeCommand.AddCommand(volumeListCommand)
volumeCommand.AddCommand(volumeDeleteCommand)
@@ -141,16 +143,16 @@ func volumeCreateAction(cmd *cobra.Command, args []string) {
}
vol := &model.VolumeSpec{
- Name: volName,
- Description: volDesp,
- AvailabilityZone: volAz,
- Size: int64(size),
- ProfileId: profileId,
- SnapshotId: volSnap,
+ Name: volName,
+ Description: volDesp,
+ AvailabilityZone: volAz,
+ Size: int64(size),
+ ProfileId: profileId,
+ SnapshotId: volSnap,
+ SnapshotFromCloud: snapshotFromCloud,
}
resp, err := client.CreateVolume(vol)
- PrintResponse(resp)
if err != nil {
Fatalln(HttpErrStrip(err))
}
@@ -163,7 +165,6 @@ func volumeCreateAction(cmd *cobra.Command, args []string) {
func volumeShowAction(cmd *cobra.Command, args []string) {
ArgsNumCheck(cmd, args, 1)
resp, err := client.GetVolume(args[0])
- PrintResponse(resp)
if err != nil {
Fatalln(HttpErrStrip(err))
}
@@ -181,7 +182,6 @@ func volumeListAction(cmd *cobra.Command, args []string) {
"Status": volStatus, "PoolId": volPoolId, "ProfileId": volProfileId, "GroupId": volGroupId}
resp, err := client.ListVolumes(opts)
- PrintResponse(resp)
if err != nil {
Fatalln(HttpErrStrip(err))
}
@@ -209,7 +209,6 @@ func volumeUpdateAction(cmd *cobra.Command, args []string) {
}
resp, err := client.UpdateVolume(args[0], vol)
- PrintResponse(resp)
if err != nil {
Fatalln(HttpErrStrip(err))
}
@@ -230,7 +229,6 @@ func volumeExtendAction(cmd *cobra.Command, args []string) {
}
resp, err := client.ExtendVolume(args[0], body)
- PrintResponse(resp)
if err != nil {
Fatalln(HttpErrStrip(err))
}
diff --git a/osdsctl/cli/volumeattachment.go b/osdsctl/cli/volumeattachment.go
index 33d1841e7..db7b5d007 100644
--- a/osdsctl/cli/volumeattachment.go
+++ b/osdsctl/cli/volumeattachment.go
@@ -110,7 +110,6 @@ func volumeAttachmentCreateAction(cmd *cobra.Command, args []string) {
os.Exit(1)
}
resp, err := client.CreateVolumeAttachment(attachment)
- PrintResponse(resp)
if err != nil {
Fatalln(HttpErrStrip(err))
}
@@ -122,7 +121,6 @@ func volumeAttachmentCreateAction(cmd *cobra.Command, args []string) {
func volumeAttachmentShowAction(cmd *cobra.Command, args []string) {
ArgsNumCheck(cmd, args, 1)
resp, err := client.GetVolumeAttachment(args[0])
- PrintResponse(resp)
if err != nil {
Fatalln(HttpErrStrip(err))
}
@@ -140,7 +138,6 @@ func volumeAttachmentListAction(cmd *cobra.Command, args []string) {
"Status": volAtmStatus, "Mountpoint": volAtmMountpoint}
resp, err := client.ListVolumeAttachments(opts)
- PrintResponse(resp)
if err != nil {
Fatalln(HttpErrStrip(err))
}
@@ -167,7 +164,6 @@ func volumeAttachmentUpdateAction(cmd *cobra.Command, args []string) {
}
resp, err := client.UpdateVolumeAttachment(args[0], attachment)
- PrintResponse(resp)
if err != nil {
Fatalln(HttpErrStrip(err))
}
diff --git a/osdsctl/cli/volumegroup.go b/osdsctl/cli/volumegroup.go
index 0cc314876..c74f7c538 100644
--- a/osdsctl/cli/volumegroup.go
+++ b/osdsctl/cli/volumegroup.go
@@ -126,7 +126,6 @@ func volumeGroupCreateAction(cmd *cobra.Command, args []string) {
}
resp, err := client.CreateVolumeGroup(vg)
- PrintResponse(resp)
if err != nil {
Fatalln(HttpErrStrip(err))
}
@@ -137,7 +136,6 @@ func volumeGroupCreateAction(cmd *cobra.Command, args []string) {
func volumeGroupShowAction(cmd *cobra.Command, args []string) {
ArgsNumCheck(cmd, args, 1)
resp, err := client.GetVolumeGroup(args[0])
- PrintResponse(resp)
if err != nil {
Fatalln(HttpErrStrip(err))
}
@@ -154,7 +152,6 @@ func volumeGroupListAction(cmd *cobra.Command, args []string) {
"Status": vgStatus, "PoolId": vgPoolId}
resp, err := client.ListVolumeGroups(opts)
- PrintResponse(resp)
if err != nil {
Fatalln(HttpErrStrip(err))
}
@@ -181,7 +178,6 @@ func volumeGroupUpdateAction(cmd *cobra.Command, args []string) {
}
resp, err := client.UpdateVolumeGroup(args[0], snp)
- PrintResponse(resp)
if err != nil {
Fatalln(HttpErrStrip(err))
}
diff --git a/osdsctl/cli/volumesnapshot.go b/osdsctl/cli/volumesnapshot.go
index adf78a392..463d11493 100644
--- a/osdsctl/cli/volumesnapshot.go
+++ b/osdsctl/cli/volumesnapshot.go
@@ -119,7 +119,6 @@ func volumeSnapshotCreateAction(cmd *cobra.Command, args []string) {
}
resp, err := client.CreateVolumeSnapshot(snp)
- PrintResponse(resp)
if err != nil {
Fatalln(HttpErrStrip(err))
}
@@ -130,7 +129,6 @@ func volumeSnapshotCreateAction(cmd *cobra.Command, args []string) {
func volumeSnapshotShowAction(cmd *cobra.Command, args []string) {
ArgsNumCheck(cmd, args, 1)
resp, err := client.GetVolumeSnapshot(args[0])
- PrintResponse(resp)
if err != nil {
Fatalln(HttpErrStrip(err))
}
@@ -147,7 +145,6 @@ func volumeSnapshotListAction(cmd *cobra.Command, args []string) {
"Status": volSnapStatus, "VolumeId": volSnapVolumeId}
resp, err := client.ListVolumeSnapshots(opts)
- PrintResponse(resp)
if err != nil {
Fatalln(HttpErrStrip(err))
}
@@ -172,7 +169,6 @@ func volumeSnapshotUpdateAction(cmd *cobra.Command, args []string) {
}
resp, err := client.UpdateVolumeSnapshot(args[0], snp)
- PrintResponse(resp)
if err != nil {
Fatalln(HttpErrStrip(err))
}
diff --git a/pkg/api/db.go b/pkg/api/db.go
index 2ecc9d7da..1be2bdebc 100644
--- a/pkg/api/db.go
+++ b/pkg/api/db.go
@@ -72,14 +72,15 @@ func CreateVolumeDBEntry(ctx *c.Context, in *model.VolumeSpec) (*model.VolumeSpe
Id: in.Id,
CreatedAt: in.CreatedAt,
},
- UserId: ctx.UserId,
- Name: in.Name,
- Description: in.Description,
- ProfileId: in.ProfileId,
- Size: in.Size,
- AvailabilityZone: in.AvailabilityZone,
- Status: model.VolumeCreating,
- SnapshotId: in.SnapshotId,
+ UserId: ctx.UserId,
+ Name: in.Name,
+ Description: in.Description,
+ ProfileId: in.ProfileId,
+ Size: in.Size,
+ AvailabilityZone: in.AvailabilityZone,
+ Status: model.VolumeCreating,
+ SnapshotId: in.SnapshotId,
+ SnapshotFromCloud: in.SnapshotFromCloud,
}
result, err := db.C.CreateVolume(ctx, vol)
if err != nil {
diff --git a/pkg/api/volume.go b/pkg/api/volume.go
index ae27da59f..f6edc51fa 100755
--- a/pkg/api/volume.go
+++ b/pkg/api/volume.go
@@ -51,7 +51,6 @@ func (this *VolumePortal) CreateVolume() {
log.Error(reason)
return
}
-
// NOTE:It will create a volume entry into the database and initialize its status
// as "creating". It will not wait for the real volume creation to complete
// and will return result immediately.
diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go
index 64b29bfe6..d0a73cdf2 100755
--- a/pkg/controller/controller.go
+++ b/pkg/controller/controller.go
@@ -106,6 +106,9 @@ func (c *Controller) CreateVolume(ctx *c.Context, in *model.VolumeSpec, errchanV
}
snapSize = snapVol.Size
in.PoolId = snapVol.PoolId
+ if in.SnapshotFromCloud {
+ in.Metadata = utils.MergeStringMaps(in.Metadata, snap.Metadata)
+ }
}
polInfo, err := c.selector.SelectSupportedPoolForVolume(in)
@@ -130,18 +133,20 @@ func (c *Controller) CreateVolume(ctx *c.Context, in *model.VolumeSpec, errchanV
}
c.volumeController.SetDock(dockInfo)
opt := &pb.CreateVolumeOpts{
- Id: in.Id,
- Name: in.Name,
- Description: in.Description,
- Size: in.Size,
- AvailabilityZone: in.AvailabilityZone,
- PoolId: polInfo.Id,
- ProfileId: prf.Id,
- SnapshotId: in.SnapshotId,
- SnapshotSize: snapSize,
- PoolName: polInfo.Name,
- DriverName: dockInfo.DriverName,
- Context: ctx.ToJson(),
+ Id: in.Id,
+ Name: in.Name,
+ Description: in.Description,
+ Size: in.Size,
+ AvailabilityZone: in.AvailabilityZone,
+ PoolId: polInfo.Id,
+ ProfileId: prf.Id,
+ SnapshotId: in.SnapshotId,
+ SnapshotSize: snapSize,
+ PoolName: polInfo.Name,
+ DriverName: dockInfo.DriverName,
+ Context: ctx.ToJson(),
+ Metadata: in.Metadata,
+ SnapshotFromCloud: in.SnapshotFromCloud,
}
result, err := c.volumeController.CreateVolume(opt)
diff --git a/pkg/dock/proto/dock.pb.go b/pkg/dock/proto/dock.pb.go
index 81062def2..cec0addd6 100644
--- a/pkg/dock/proto/dock.pb.go
+++ b/pkg/dock/proto/dock.pb.go
@@ -86,6 +86,8 @@ type CreateVolumeOpts struct {
ReplicationId string `protobuf:"bytes,14,opt,name=replicationId" json:"replicationId,omitempty"`
// The size of snapshot
SnapshotSize int64 `protobuf:"varint,15,opt,name=snapshotSize" json:"snapshotSize,omitempty"`
+ // Down load snapshot from cloud
+ SnapshotFromCloud bool `protobuf:"varint,16,opt,name=snapshotFromCloud" json:"snapshotFromCloud,omitempty"`
}
func (m *CreateVolumeOpts) Reset() { *m = CreateVolumeOpts{} }
@@ -198,6 +200,13 @@ func (m *CreateVolumeOpts) GetSnapshotSize() int64 {
return 0
}
+func (m *CreateVolumeOpts) GetSnapshotFromCloud() bool {
+ if m != nil {
+ return m.SnapshotFromCloud
+ }
+ return false
+}
+
// DeleteVolumeOpts is a structure which indicates all required properties
// for deleting a volume.
type DeleteVolumeOpts struct {
@@ -2850,114 +2859,115 @@ var _AttachDock_serviceDesc = grpc.ServiceDesc{
func init() { proto1.RegisterFile("dock.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
- // 1729 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcd, 0x73, 0xdc, 0xc4,
- 0x12, 0xcf, 0x4a, 0x5e, 0xef, 0x6e, 0xfb, 0x6b, 0x3d, 0xb6, 0x13, 0xd5, 0xc6, 0xf1, 0xf3, 0xdb,
- 0x97, 0x97, 0xf2, 0x4b, 0xf2, 0x0c, 0x59, 0xa8, 0x0a, 0x1f, 0xc5, 0x87, 0x8d, 0x9d, 0x78, 0x8b,
- 0x98, 0x38, 0x0a, 0xe4, 0xc0, 0x4d, 0x91, 0x26, 0x58, 0x65, 0xad, 0x46, 0x25, 0xc9, 0x9b, 0x98,
- 0x13, 0x15, 0x38, 0x04, 0x8e, 0xdc, 0x38, 0x52, 0x1c, 0x38, 0xf1, 0x4f, 0x50, 0x14, 0x7f, 0x00,
- 0x55, 0xdc, 0x72, 0xe0, 0x4a, 0x15, 0x7f, 0x42, 0x0e, 0x94, 0x66, 0x24, 0x59, 0x1f, 0xa3, 0x59,
- 0x99, 0xb5, 0x1d, 0xa7, 0xe2, 0xd3, 0xae, 0x7a, 0x46, 0x3d, 0xdd, 0xbf, 0xee, 0x5f, 0x8f, 0x34,
- 0x6a, 0x00, 0x83, 0xe8, 0x3b, 0xcb, 0x8e, 0x4b, 0x7c, 0x82, 0xaa, 0xf4, 0xa7, 0xfd, 0x73, 0x15,
- 0x9a, 0x1f, 0xb8, 0x58, 0xf3, 0xf1, 0x3d, 0x62, 0xed, 0xf6, 0xf0, 0x6d, 0xc7, 0xf7, 0xd0, 0x24,
- 0x48, 0xa6, 0xa1, 0x54, 0x16, 0x2b, 0x4b, 0x0d, 0x55, 0x32, 0x0d, 0x84, 0x60, 0xc4, 0xd6, 0x7a,
- 0x58, 0x91, 0xa8, 0x84, 0xfe, 0x0f, 0x64, 0x9e, 0xf9, 0x39, 0x56, 0xe4, 0xc5, 0xca, 0x92, 0xac,
- 0xd2, 0xff, 0x68, 0x11, 0xc6, 0x0c, 0xec, 0xe9, 0xae, 0xe9, 0xf8, 0x26, 0xb1, 0x95, 0x11, 0x3a,
- 0x3d, 0x29, 0x42, 0x0b, 0x00, 0x9e, 0xad, 0x39, 0xde, 0x36, 0xf1, 0xbb, 0x86, 0x52, 0xa5, 0x13,
- 0x12, 0x12, 0x74, 0x19, 0x9a, 0x5a, 0x5f, 0x33, 0x2d, 0xed, 0xbe, 0x69, 0x99, 0xfe, 0xde, 0xa7,
- 0xc4, 0xc6, 0xca, 0x28, 0x9d, 0x95, 0x93, 0xa3, 0x79, 0x68, 0x38, 0x2e, 0x79, 0x60, 0x5a, 0xb8,
- 0x6b, 0x28, 0x35, 0x3a, 0x69, 0x5f, 0x80, 0xce, 0xc2, 0xa8, 0x43, 0x88, 0xd5, 0x35, 0x94, 0x3a,
- 0x1d, 0x0a, 0xaf, 0x50, 0x0b, 0xea, 0xc1, 0xbf, 0x8f, 0x02, 0x7f, 0x1a, 0x74, 0x24, 0xbe, 0x46,
- 0x2b, 0x50, 0xef, 0x61, 0x5f, 0x33, 0x34, 0x5f, 0x53, 0x60, 0x51, 0x5e, 0x1a, 0xeb, 0xfc, 0x97,
- 0xa1, 0xb5, 0x9c, 0x85, 0x68, 0x79, 0x33, 0x9c, 0xb7, 0x6e, 0xfb, 0xee, 0x9e, 0x1a, 0xdf, 0x16,
- 0x38, 0x68, 0xb8, 0x66, 0x1f, 0xbb, 0x74, 0x81, 0x31, 0xe6, 0xe0, 0xbe, 0x04, 0x29, 0x50, 0xd3,
- 0x89, 0xed, 0xe3, 0x47, 0xbe, 0x32, 0x4e, 0x07, 0xa3, 0x4b, 0xb4, 0x0d, 0x73, 0x2e, 0x76, 0x2c,
- 0x53, 0xd7, 0x02, 0xa4, 0xd6, 0xe8, 0x2d, 0x6b, 0x81, 0x25, 0x13, 0xd4, 0x92, 0x4e, 0x91, 0x25,
- 0x2a, 0xef, 0x26, 0x66, 0x16, 0x5f, 0x21, 0xba, 0x08, 0x13, 0x89, 0x81, 0xae, 0xa1, 0x4c, 0x52,
- 0x4b, 0xd2, 0x42, 0xd4, 0x86, 0xf1, 0x28, 0x30, 0x77, 0x83, 0x40, 0x4f, 0xd1, 0x40, 0xa7, 0x64,
- 0xad, 0xb7, 0x61, 0x22, 0x05, 0x04, 0x6a, 0x82, 0xbc, 0x83, 0xf7, 0xc2, 0xd4, 0x09, 0xfe, 0xa2,
- 0x59, 0xa8, 0xf6, 0x35, 0x6b, 0x37, 0x4a, 0x1e, 0x76, 0xf1, 0x96, 0xf4, 0x46, 0xa5, 0xb5, 0x01,
- 0xad, 0x62, 0xdb, 0x0f, 0xa2, 0xa9, 0xfd, 0xb4, 0x02, 0xcd, 0x35, 0x6c, 0x61, 0x61, 0x12, 0x27,
- 0x83, 0x2b, 0xa5, 0x82, 0x9b, 0xbd, 0xb5, 0x64, 0x70, 0x65, 0x51, 0x70, 0x47, 0x52, 0xc1, 0x1d,
- 0x0a, 0xa8, 0xf6, 0x2f, 0x32, 0x34, 0xd7, 0x1f, 0xf9, 0xd8, 0x36, 0x4e, 0x39, 0x2a, 0xe0, 0x68,
- 0x16, 0xa2, 0xc3, 0xe7, 0xe8, 0x70, 0x61, 0xfc, 0x4d, 0x02, 0x25, 0xc9, 0xde, 0xbb, 0x21, 0xa4,
- 0x47, 0x1c, 0xce, 0x16, 0xd4, 0xfb, 0x74, 0xbd, 0x38, 0x98, 0xf1, 0x35, 0xea, 0x26, 0xc0, 0x1c,
- 0xa5, 0x60, 0xfe, 0x9f, 0x53, 0x66, 0x92, 0x86, 0x96, 0x04, 0xb5, 0x26, 0x02, 0xb5, 0x7e, 0x88,
- 0xa0, 0x3e, 0x91, 0x40, 0x49, 0xf2, 0x57, 0x08, 0x6a, 0x12, 0x0a, 0x49, 0x00, 0x85, 0x9c, 0x82,
- 0xa2, 0x48, 0x7d, 0x49, 0x28, 0x46, 0x44, 0x50, 0x54, 0x0f, 0x11, 0x8a, 0xef, 0x64, 0x98, 0x65,
- 0x61, 0x5b, 0xf1, 0x7d, 0x4d, 0xdf, 0xee, 0x61, 0xfb, 0xe0, 0x30, 0x5c, 0x84, 0x09, 0x83, 0xdc,
- 0x22, 0xba, 0x66, 0x31, 0x25, 0x34, 0xd9, 0xea, 0x6a, 0x5a, 0x18, 0xd0, 0xba, 0xb7, 0x6b, 0xf9,
- 0xe6, 0x96, 0xe6, 0x6f, 0x53, 0x07, 0xeb, 0xea, 0xbe, 0x00, 0x5d, 0x81, 0xfa, 0x36, 0xf1, 0xfc,
- 0xae, 0xfd, 0x80, 0x50, 0x07, 0xc7, 0x3a, 0x53, 0x21, 0x94, 0x1b, 0xa1, 0x58, 0x8d, 0x27, 0xa0,
- 0xf5, 0x5c, 0x0a, 0xfe, 0x2f, 0x95, 0x82, 0x69, 0x5f, 0x0e, 0x3f, 0xfd, 0xd0, 0x25, 0x98, 0x5c,
- 0xd1, 0x75, 0xec, 0x79, 0x5b, 0xc1, 0xaa, 0x3a, 0xb1, 0xc2, 0x92, 0x93, 0x91, 0x0e, 0x17, 0x9b,
- 0xdf, 0x25, 0x98, 0x65, 0x79, 0x34, 0x44, 0x6c, 0x92, 0xb8, 0xca, 0x07, 0xc1, 0x75, 0x24, 0x85,
- 0x2b, 0xcf, 0x8e, 0x92, 0xb8, 0x56, 0x45, 0xb8, 0x8e, 0x0e, 0xc2, 0xb5, 0x76, 0xf8, 0xb8, 0xfe,
- 0x24, 0xc3, 0x3c, 0xcb, 0x93, 0x88, 0x99, 0x03, 0xf0, 0x4d, 0x6f, 0x6e, 0x52, 0x6e, 0x73, 0x3b,
- 0xf6, 0xfc, 0xdf, 0xcc, 0xe5, 0xff, 0xb5, 0x54, 0xfe, 0xf3, 0xfd, 0x7a, 0x51, 0x79, 0xf0, 0xa7,
- 0x04, 0xf3, 0x2c, 0xff, 0x0e, 0x29, 0x5e, 0x07, 0xe2, 0xc4, 0x66, 0x8e, 0x13, 0xd7, 0x52, 0x9c,
- 0x18, 0x0a, 0xeb, 0x13, 0xc7, 0x8d, 0x2f, 0x2a, 0x50, 0x8f, 0x40, 0xa0, 0x8f, 0x54, 0x96, 0xe6,
- 0x3f, 0x20, 0x6e, 0x2f, 0xbc, 0x3b, 0xbe, 0x0e, 0x1e, 0xc3, 0x88, 0xf7, 0xf1, 0x9e, 0x13, 0xe9,
- 0x08, 0xaf, 0x82, 0xe7, 0x8d, 0x00, 0xba, 0xf0, 0x41, 0x97, 0xfe, 0xa7, 0xf1, 0x71, 0xc2, 0x3d,
- 0x4d, 0x32, 0x9d, 0x80, 0x09, 0xa6, 0x6d, 0xfa, 0xa6, 0xe6, 0x13, 0x37, 0x84, 0x60, 0x5f, 0xd0,
- 0xee, 0x03, 0xb0, 0x7d, 0x93, 0xbe, 0x77, 0xbc, 0x02, 0x23, 0x14, 0xfa, 0x0a, 0x85, 0xfe, 0x7c,
- 0x08, 0xfd, 0xfe, 0x84, 0xe5, 0xfd, 0x37, 0x17, 0x3a, 0xb1, 0x75, 0x1d, 0x1a, 0xff, 0xec, 0x85,
- 0xe0, 0x87, 0x06, 0xcc, 0x31, 0xfa, 0x24, 0xde, 0x30, 0x4a, 0x3f, 0x67, 0x65, 0x9e, 0xa9, 0xe4,
- 0xfc, 0x33, 0xd5, 0x12, 0x4c, 0x39, 0xae, 0xd9, 0xd3, 0xdc, 0xbd, 0x7b, 0x51, 0xb1, 0x66, 0x90,
- 0x64, 0xc5, 0xe8, 0x2a, 0x4c, 0x7b, 0x58, 0x27, 0xb6, 0x91, 0x9c, 0xcb, 0x70, 0xca, 0x0f, 0x3c,
- 0xe7, 0x47, 0xeb, 0xc7, 0x15, 0x98, 0x0f, 0xed, 0xe7, 0xbe, 0x98, 0x29, 0x63, 0x34, 0x70, 0xef,
- 0xa6, 0xea, 0x53, 0x06, 0xe0, 0xe5, 0x2d, 0x81, 0x02, 0x16, 0x5b, 0xe1, 0x1a, 0xe8, 0x49, 0x05,
- 0x16, 0x62, 0x60, 0xf8, 0x66, 0x8c, 0x53, 0x33, 0xde, 0x17, 0x9a, 0x71, 0x57, 0xa8, 0x82, 0x19,
- 0x32, 0x60, 0x9d, 0x00, 0x43, 0x83, 0xe8, 0x3b, 0x5d, 0x43, 0x99, 0x60, 0x18, 0xb2, 0xab, 0x0c,
- 0xef, 0x27, 0x45, 0xbc, 0x9f, 0x4a, 0xf3, 0x3e, 0x60, 0x8b, 0x17, 0x22, 0xa4, 0x34, 0xd9, 0xbe,
- 0x11, 0x0b, 0xd0, 0x8d, 0x44, 0x79, 0x9a, 0xa6, 0x3e, 0x5e, 0x16, 0xfa, 0x58, 0x54, 0x97, 0xde,
- 0x84, 0xc9, 0x7e, 0x4c, 0xaa, 0x5b, 0xa6, 0xe7, 0x2b, 0x88, 0x6a, 0x9b, 0xce, 0x31, 0x4e, 0xcd,
- 0x4c, 0x0c, 0x12, 0x3b, 0x71, 0x0a, 0xb0, 0x49, 0x0c, 0xac, 0xcc, 0xb0, 0xc4, 0xce, 0x88, 0x83,
- 0xc4, 0x4e, 0xd8, 0xb3, 0x85, 0x5d, 0x93, 0x18, 0xca, 0x2c, 0x7d, 0x33, 0xc9, 0x0f, 0xa0, 0x0e,
- 0xcc, 0x26, 0x84, 0xab, 0x9a, 0x6d, 0x3c, 0x34, 0x0d, 0x7f, 0x5b, 0x99, 0xa3, 0x37, 0x70, 0xc7,
- 0x5a, 0xb7, 0xe1, 0xdf, 0x03, 0x93, 0xe9, 0x40, 0x07, 0x0e, 0x77, 0xe0, 0x3f, 0x25, 0xd2, 0xe2,
- 0x40, 0x2a, 0x87, 0x2a, 0xd0, 0x4f, 0x6b, 0x30, 0xc7, 0x36, 0x9e, 0xd3, 0x2a, 0x75, 0x64, 0x55,
- 0x8a, 0x0b, 0xf0, 0xf1, 0x57, 0x29, 0xbe, 0x19, 0x27, 0xb3, 0x4a, 0x25, 0xeb, 0x50, 0x33, 0x55,
- 0x87, 0xf8, 0x5e, 0x14, 0xd5, 0xa1, 0x54, 0xb5, 0x9b, 0xce, 0x54, 0xbb, 0x97, 0x83, 0xde, 0xeb,
- 0xb6, 0x76, 0xdf, 0x3a, 0xa5, 0xf7, 0xd1, 0xd1, 0x9b, 0x0b, 0xf0, 0xf1, 0xd3, 0x9b, 0x6f, 0xc6,
- 0x8b, 0x46, 0x6f, 0xbe, 0x17, 0xa7, 0xf4, 0xe6, 0xd2, 0xfb, 0x8f, 0x1a, 0x9c, 0x5d, 0x33, 0xbd,
- 0x53, 0x7e, 0x1f, 0x8c, 0xdf, 0x5f, 0x96, 0xe3, 0xf7, 0x7b, 0xd1, 0x8e, 0xc3, 0x45, 0x78, 0x68,
- 0x82, 0x7f, 0x5d, 0x96, 0xe0, 0x2b, 0x62, 0x3b, 0x4e, 0x26, 0xc3, 0x6f, 0xe6, 0x18, 0x7e, 0x45,
- 0xec, 0xc6, 0x29, 0xc5, 0xb9, 0x14, 0xff, 0xb5, 0x0e, 0xe7, 0x6e, 0x68, 0xa6, 0x45, 0xfa, 0xd8,
- 0x3d, 0xe5, 0x78, 0x79, 0x8e, 0x7f, 0x55, 0x8e, 0xe3, 0xd1, 0xe6, 0x59, 0x00, 0xf1, 0xd0, 0x24,
- 0xff, 0xa6, 0x2c, 0xc9, 0x57, 0x07, 0x18, 0x72, 0x32, 0x59, 0xfe, 0x2a, 0xcc, 0x68, 0x96, 0x45,
- 0x1e, 0xb2, 0xd3, 0x4a, 0x1c, 0x7e, 0xf9, 0x0c, 0x8f, 0x15, 0x78, 0x43, 0x68, 0x19, 0x50, 0x6c,
- 0xe5, 0xaa, 0xa6, 0xef, 0x60, 0xdb, 0xe8, 0x1a, 0x94, 0xd7, 0x0d, 0x95, 0x33, 0x82, 0x36, 0x12,
- 0x75, 0x84, 0x1d, 0x21, 0x5c, 0x1d, 0x80, 0x54, 0xa9, 0x42, 0x32, 0xf3, 0xd2, 0x15, 0x92, 0xef,
- 0xa5, 0xe8, 0x3c, 0x92, 0x45, 0xe2, 0xa6, 0x4b, 0x76, 0x9d, 0xd2, 0x65, 0x64, 0x50, 0xdb, 0xc1,
- 0xe0, 0x6f, 0xc0, 0xbc, 0x72, 0x50, 0x2d, 0x28, 0x07, 0x0b, 0x00, 0x9a, 0x11, 0x66, 0x8c, 0x47,
- 0x3f, 0x49, 0x34, 0xd4, 0x84, 0x84, 0x75, 0x8f, 0xf4, 0x48, 0x1f, 0x47, 0x53, 0x6a, 0x74, 0x4a,
- 0x5a, 0x58, 0x58, 0x36, 0x12, 0xe9, 0xdc, 0x48, 0xa5, 0x73, 0xfb, 0xc7, 0x0a, 0xcc, 0x7d, 0xe2,
- 0x18, 0x25, 0x30, 0x4a, 0xe3, 0x21, 0xe5, 0xf0, 0x48, 0x7b, 0x20, 0x0f, 0xf6, 0x60, 0x84, 0xe7,
- 0x41, 0xe1, 0x57, 0xda, 0xb6, 0x16, 0x1d, 0xdb, 0x0c, 0x6b, 0x68, 0x62, 0x09, 0x39, 0xbd, 0xc4,
- 0xb3, 0x0a, 0x34, 0x19, 0x79, 0x13, 0x2d, 0x1f, 0x97, 0x60, 0x52, 0x4b, 0x7f, 0x35, 0x60, 0x4b,
- 0x65, 0xa4, 0xc1, 0x3c, 0x9d, 0xd8, 0x36, 0xd6, 0x69, 0xce, 0xb3, 0x7e, 0x17, 0x3a, 0x2f, 0x2d,
- 0x4d, 0xb5, 0x52, 0xc8, 0xa9, 0x56, 0x8a, 0xec, 0xd2, 0x85, 0xbc, 0x3e, 0xa2, 0x8e, 0x97, 0x67,
- 0xb4, 0xa1, 0xe7, 0xb9, 0xb9, 0x9f, 0x5d, 0xfa, 0xb8, 0xdd, 0xff, 0xab, 0x02, 0x53, 0x37, 0xb1,
- 0x8d, 0x5d, 0x53, 0x57, 0xb1, 0xe7, 0x10, 0xdb, 0xc3, 0xe8, 0x3a, 0x8c, 0xba, 0xd8, 0xdb, 0xb5,
- 0x7c, 0xaa, 0x62, 0xac, 0x73, 0x21, 0xb4, 0x35, 0x33, 0x6f, 0x59, 0xa5, 0x93, 0x36, 0xce, 0xa8,
- 0xe1, 0x74, 0xf4, 0x3a, 0x54, 0xb1, 0xeb, 0x12, 0x97, 0x2e, 0x33, 0xd6, 0x99, 0x2f, 0xb8, 0x6f,
- 0x3d, 0x98, 0xb3, 0x71, 0x46, 0x65, 0x93, 0x5b, 0x6d, 0x18, 0x65, 0x9a, 0x02, 0x1f, 0x7b, 0xd8,
- 0xf3, 0xb4, 0xcf, 0x70, 0x68, 0x7c, 0x74, 0xd9, 0x7a, 0x07, 0xaa, 0xf4, 0xae, 0xa0, 0x68, 0xe9,
- 0xc4, 0x88, 0xc6, 0xe9, 0xff, 0x6c, 0x51, 0x92, 0x72, 0x45, 0x69, 0xb5, 0x06, 0x55, 0x17, 0x3b,
- 0xd6, 0x5e, 0xe7, 0x71, 0x03, 0x26, 0xb6, 0x5c, 0xd2, 0x37, 0xbd, 0x20, 0x34, 0x44, 0xdf, 0x41,
- 0x2b, 0x30, 0x9e, 0x2c, 0x97, 0xe8, 0x5c, 0x41, 0xf3, 0x5b, 0xeb, 0x2c, 0xdf, 0x9b, 0xf6, 0x99,
- 0x40, 0x45, 0x92, 0xa4, 0xb1, 0x8a, 0x6c, 0xb3, 0x97, 0x58, 0x45, 0xb2, 0xa7, 0x28, 0x56, 0x91,
- 0x6d, 0x34, 0x12, 0xa8, 0xb8, 0x13, 0xb5, 0x64, 0xa4, 0xdb, 0x47, 0xd0, 0xbf, 0x06, 0xb4, 0xd9,
- 0x88, 0x55, 0xf2, 0x3a, 0x52, 0x62, 0x95, 0x45, 0xed, 0x2a, 0x02, 0x95, 0xdd, 0xa8, 0x07, 0x74,
- 0xff, 0xc3, 0x27, 0x3a, 0x2f, 0xe8, 0xc2, 0x10, 0xab, 0xca, 0xf6, 0x17, 0xc4, 0xaa, 0x78, 0x8d,
- 0x07, 0x02, 0x55, 0x1f, 0xc2, 0x74, 0xee, 0xbb, 0x07, 0x9a, 0x17, 0x7d, 0x11, 0x11, 0x2b, 0xcb,
- 0x1d, 0x5e, 0xc6, 0xca, 0xb8, 0xc7, 0x9a, 0x62, 0x65, 0xb9, 0xa3, 0x92, 0x58, 0x19, 0xf7, 0x10,
- 0x45, 0xa0, 0x6c, 0x13, 0x50, 0xfe, 0xad, 0x0c, 0x5d, 0x10, 0xbe, 0xb0, 0x09, 0xd4, 0xdd, 0x86,
- 0x19, 0xce, 0xc3, 0x19, 0x5a, 0x10, 0x3f, 0xb8, 0x95, 0x09, 0x43, 0x62, 0xb7, 0xcb, 0x84, 0x21,
- 0xb3, 0x0f, 0x8a, 0x95, 0xe5, 0xf6, 0xf8, 0x58, 0x19, 0x77, 0xf7, 0x2f, 0x13, 0x53, 0x9e, 0x32,
- 0xee, 0x0e, 0x5d, 0xac, 0xac, 0xf3, 0x6d, 0x05, 0x80, 0xa5, 0x66, 0x54, 0x81, 0x92, 0x9b, 0x60,
- 0xcc, 0xfd, 0xec, 0xce, 0x38, 0xa8, 0x02, 0x71, 0x54, 0x64, 0x77, 0x97, 0x62, 0x15, 0xf7, 0x47,
- 0xe9, 0xc0, 0x6b, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x8a, 0x10, 0x4d, 0x50, 0xb9, 0x2d, 0x00,
+ // 1745 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcd, 0x73, 0xdb, 0x44,
+ 0x14, 0xaf, 0xe5, 0x38, 0xb6, 0x5f, 0xbe, 0x9c, 0x4d, 0xd2, 0x6a, 0xdc, 0x34, 0x04, 0x53, 0x3a,
+ 0xa1, 0x2d, 0x81, 0x1a, 0x66, 0xca, 0xc7, 0xf0, 0x91, 0x34, 0x69, 0xe3, 0xa1, 0xa1, 0xa9, 0x0a,
+ 0x3d, 0x70, 0x53, 0xa5, 0x2d, 0xd1, 0x44, 0xd6, 0x6a, 0x24, 0xc5, 0x6d, 0x38, 0x31, 0x85, 0x43,
+ 0xe1, 0xc8, 0x8d, 0x23, 0xc3, 0x81, 0x13, 0xff, 0x05, 0xc3, 0x1f, 0xc0, 0x0c, 0xb7, 0x1e, 0xb8,
+ 0x32, 0xc3, 0x81, 0x3f, 0xa0, 0x07, 0x46, 0xbb, 0x92, 0xac, 0x8f, 0xd5, 0x5a, 0xc1, 0x49, 0x9a,
+ 0x4e, 0x73, 0xb2, 0xf5, 0x76, 0xf5, 0xf6, 0xbd, 0xdf, 0xbe, 0xdf, 0xdb, 0x0f, 0x3d, 0x00, 0x9d,
+ 0x68, 0x3b, 0xcb, 0xb6, 0x43, 0x3c, 0x82, 0x2a, 0xf4, 0xa7, 0xf5, 0x6f, 0x05, 0x1a, 0xd7, 0x1c,
+ 0xac, 0x7a, 0xf8, 0x2e, 0x31, 0x77, 0xbb, 0xf8, 0x96, 0xed, 0xb9, 0x68, 0x12, 0x24, 0x43, 0x97,
+ 0x4b, 0x8b, 0xa5, 0xa5, 0xba, 0x22, 0x19, 0x3a, 0x42, 0x30, 0x62, 0xa9, 0x5d, 0x2c, 0x4b, 0x54,
+ 0x42, 0xff, 0xfb, 0x32, 0xd7, 0xf8, 0x0a, 0xcb, 0xe5, 0xc5, 0xd2, 0x52, 0x59, 0xa1, 0xff, 0xd1,
+ 0x22, 0x8c, 0xe9, 0xd8, 0xd5, 0x1c, 0xc3, 0xf6, 0x0c, 0x62, 0xc9, 0x23, 0xb4, 0x7b, 0x5c, 0x84,
+ 0x16, 0x00, 0x5c, 0x4b, 0xb5, 0xdd, 0x6d, 0xe2, 0x75, 0x74, 0xb9, 0x42, 0x3b, 0xc4, 0x24, 0xe8,
+ 0x22, 0x34, 0xd4, 0x9e, 0x6a, 0x98, 0xea, 0x3d, 0xc3, 0x34, 0xbc, 0xbd, 0x2f, 0x88, 0x85, 0xe5,
+ 0x51, 0xda, 0x2b, 0x23, 0x47, 0xf3, 0x50, 0xb7, 0x1d, 0x72, 0xdf, 0x30, 0x71, 0x47, 0x97, 0xab,
+ 0xb4, 0x53, 0x5f, 0x80, 0x4e, 0xc3, 0xa8, 0x4d, 0x88, 0xd9, 0xd1, 0xe5, 0x1a, 0x6d, 0x0a, 0x9e,
+ 0x50, 0x13, 0x6a, 0xfe, 0xbf, 0x4f, 0x7d, 0x7f, 0xea, 0xb4, 0x25, 0x7a, 0x46, 0x2b, 0x50, 0xeb,
+ 0x62, 0x4f, 0xd5, 0x55, 0x4f, 0x95, 0x61, 0xb1, 0xbc, 0x34, 0xd6, 0x7e, 0x95, 0xa1, 0xb5, 0x9c,
+ 0x86, 0x68, 0x79, 0x33, 0xe8, 0xb7, 0x6e, 0x79, 0xce, 0x9e, 0x12, 0xbd, 0xe6, 0x3b, 0xa8, 0x3b,
+ 0x46, 0x0f, 0x3b, 0x74, 0x80, 0x31, 0xe6, 0x60, 0x5f, 0x82, 0x64, 0xa8, 0x6a, 0xc4, 0xf2, 0xf0,
+ 0x43, 0x4f, 0x1e, 0xa7, 0x8d, 0xe1, 0x23, 0xda, 0x86, 0x39, 0x07, 0xdb, 0xa6, 0xa1, 0xa9, 0x3e,
+ 0x52, 0x6b, 0xf4, 0x95, 0x35, 0xdf, 0x92, 0x09, 0x6a, 0x49, 0x3b, 0xcf, 0x12, 0x85, 0xf7, 0x12,
+ 0x33, 0x8b, 0xaf, 0x10, 0x9d, 0x87, 0x89, 0x58, 0x43, 0x47, 0x97, 0x27, 0xa9, 0x25, 0x49, 0x21,
+ 0x6a, 0xc1, 0x78, 0x38, 0x31, 0x77, 0xfc, 0x89, 0x9e, 0xa2, 0x13, 0x9d, 0x90, 0xa1, 0xcb, 0x30,
+ 0x1d, 0x3e, 0x5f, 0x77, 0x48, 0xf7, 0x9a, 0x49, 0x76, 0x75, 0xb9, 0xb1, 0x58, 0x5a, 0xaa, 0x29,
+ 0xd9, 0x86, 0xe6, 0xfb, 0x30, 0x91, 0x80, 0x0d, 0x35, 0xa0, 0xbc, 0x83, 0xf7, 0x82, 0x40, 0xf3,
+ 0xff, 0xa2, 0x59, 0xa8, 0xf4, 0x54, 0x73, 0x37, 0x0c, 0x35, 0xf6, 0xf0, 0x9e, 0xf4, 0x4e, 0xa9,
+ 0xb9, 0x01, 0xcd, 0x7c, 0x4f, 0xf7, 0xa3, 0xa9, 0xf5, 0xa4, 0x04, 0x8d, 0x35, 0x6c, 0x62, 0x61,
+ 0xc8, 0xc7, 0x43, 0x41, 0x4a, 0x84, 0x42, 0xfa, 0xd5, 0x82, 0xa1, 0x50, 0x16, 0x85, 0xc2, 0x48,
+ 0x22, 0x14, 0x86, 0x02, 0xaa, 0xf5, 0x5b, 0x19, 0x1a, 0xeb, 0x0f, 0x3d, 0x6c, 0xe9, 0x27, 0x8c,
+ 0x16, 0x30, 0x3a, 0x0d, 0xd1, 0xc1, 0x33, 0x7a, 0xb8, 0x69, 0xfc, 0x43, 0x02, 0x39, 0xce, 0xf5,
+ 0x3b, 0x01, 0xa4, 0x87, 0x3c, 0x9d, 0x4d, 0xa8, 0xf5, 0xe8, 0x78, 0xd1, 0x64, 0x46, 0xcf, 0xa8,
+ 0x13, 0x03, 0x73, 0x94, 0x82, 0xf9, 0x3a, 0x27, 0x29, 0xc5, 0x0d, 0x2d, 0x08, 0x6a, 0x55, 0x04,
+ 0x6a, 0xed, 0x00, 0x41, 0x7d, 0x2c, 0x81, 0x1c, 0xe7, 0xaf, 0x10, 0xd4, 0x38, 0x14, 0x92, 0x00,
+ 0x8a, 0x72, 0x02, 0x8a, 0x3c, 0xf5, 0x05, 0xa1, 0x18, 0x11, 0x41, 0x51, 0x39, 0x40, 0x28, 0x7e,
+ 0x2c, 0xc3, 0x2c, 0x9b, 0xb6, 0x15, 0xcf, 0x53, 0xb5, 0xed, 0x2e, 0xb6, 0xf6, 0x0f, 0xc3, 0x79,
+ 0x98, 0xd0, 0xc9, 0x4d, 0xa2, 0xa9, 0x26, 0x53, 0x42, 0x83, 0xad, 0xa6, 0x24, 0x85, 0x3e, 0xad,
+ 0xbb, 0xbb, 0xa6, 0x67, 0x6c, 0xa9, 0xde, 0x36, 0x75, 0xb0, 0xa6, 0xf4, 0x05, 0xe8, 0x12, 0xd4,
+ 0xb6, 0x89, 0xeb, 0x75, 0xac, 0xfb, 0x84, 0x3a, 0x38, 0xd6, 0x9e, 0x0a, 0xa0, 0xdc, 0x08, 0xc4,
+ 0x4a, 0xd4, 0x01, 0xad, 0x67, 0x42, 0xf0, 0xb5, 0x44, 0x08, 0x26, 0x7d, 0x39, 0xf8, 0xf0, 0x43,
+ 0x17, 0x60, 0x72, 0x45, 0xd3, 0xb0, 0xeb, 0x6e, 0xf9, 0xa3, 0x6a, 0xc4, 0x0c, 0x52, 0x4e, 0x4a,
+ 0x3a, 0xdc, 0xdc, 0xfc, 0x29, 0xc1, 0x2c, 0x8b, 0xa3, 0x21, 0xe6, 0x26, 0x8e, 0x6b, 0x79, 0x3f,
+ 0xb8, 0x8e, 0x24, 0x70, 0xe5, 0xd9, 0x51, 0x10, 0xd7, 0x8a, 0x08, 0xd7, 0xd1, 0x41, 0xb8, 0x56,
+ 0x0f, 0x1e, 0xd7, 0x5f, 0xcb, 0x30, 0xcf, 0xe2, 0x24, 0x64, 0xe6, 0x00, 0x7c, 0x93, 0x8b, 0x9b,
+ 0x94, 0x59, 0xdc, 0x8e, 0x3c, 0xfe, 0x37, 0x33, 0xf1, 0x7f, 0x25, 0x11, 0xff, 0x7c, 0xbf, 0x9e,
+ 0x57, 0x1e, 0xfc, 0x2d, 0xc1, 0x3c, 0x8b, 0xbf, 0x03, 0x9a, 0xaf, 0x7d, 0x71, 0x62, 0x33, 0xc3,
+ 0x89, 0x2b, 0x09, 0x4e, 0x0c, 0x85, 0xf5, 0xb1, 0xe3, 0xc6, 0xd7, 0x25, 0xa8, 0x85, 0x20, 0xd0,
+ 0x2d, 0x95, 0xa9, 0x7a, 0xf7, 0x89, 0xd3, 0x0d, 0xde, 0x8e, 0x9e, 0xfd, 0x6d, 0x18, 0x71, 0x3f,
+ 0xdb, 0xb3, 0x43, 0x1d, 0xc1, 0x93, 0xbf, 0xdf, 0xf0, 0xa1, 0x0b, 0x36, 0xba, 0xf4, 0x3f, 0x9d,
+ 0x1f, 0x3b, 0x58, 0xd3, 0x24, 0xc3, 0xf6, 0x99, 0x60, 0x58, 0x86, 0x67, 0xa8, 0x1e, 0x71, 0x02,
+ 0x08, 0xfa, 0x82, 0x56, 0x0f, 0x80, 0xad, 0x9b, 0xf4, 0x94, 0xf2, 0x06, 0x8c, 0x50, 0xe8, 0x4b,
+ 0x14, 0xfa, 0xb3, 0x01, 0xf4, 0xfd, 0x0e, 0xcb, 0xfd, 0x73, 0x0e, 0xed, 0xd8, 0xbc, 0x0a, 0xf5,
+ 0xff, 0x77, 0x20, 0xf8, 0xb9, 0x0e, 0x73, 0x8c, 0x3e, 0xb1, 0x13, 0x46, 0xe1, 0x7d, 0x56, 0x6a,
+ 0x4f, 0x55, 0xce, 0xee, 0xa9, 0x96, 0x60, 0xca, 0x76, 0x8c, 0xae, 0xea, 0xec, 0xdd, 0x0d, 0x93,
+ 0x35, 0x83, 0x24, 0x2d, 0xa6, 0xe7, 0x29, 0xac, 0x11, 0x4b, 0x8f, 0xf7, 0x65, 0x38, 0x65, 0x1b,
+ 0x9e, 0xf1, 0xd6, 0xfa, 0x51, 0x09, 0xe6, 0x03, 0xfb, 0xb9, 0x07, 0x33, 0x79, 0x8c, 0x4e, 0xdc,
+ 0x87, 0x89, 0xfc, 0x94, 0x02, 0x78, 0x79, 0x4b, 0xa0, 0x80, 0xcd, 0xad, 0x70, 0x0c, 0xf4, 0xb8,
+ 0x04, 0x0b, 0x11, 0x30, 0x7c, 0x33, 0xc6, 0xa9, 0x19, 0x1f, 0x0b, 0xcd, 0xb8, 0x23, 0x54, 0xc1,
+ 0x0c, 0x19, 0x30, 0x8e, 0x8f, 0xa1, 0x4e, 0xb4, 0x9d, 0x8e, 0x2e, 0x4f, 0x30, 0x0c, 0xd9, 0x53,
+ 0x8a, 0xf7, 0x93, 0x22, 0xde, 0x4f, 0x25, 0x79, 0xef, 0xb3, 0xc5, 0x0d, 0x10, 0x0a, 0x4e, 0xd5,
+ 0x7d, 0x01, 0xba, 0x1e, 0x4b, 0x4f, 0xd3, 0xd4, 0xc7, 0x8b, 0x42, 0x1f, 0xf3, 0xf2, 0xd2, 0xbb,
+ 0x30, 0xd9, 0x8b, 0x48, 0x75, 0xd3, 0x70, 0x3d, 0x19, 0x51, 0x6d, 0xd3, 0x19, 0xc6, 0x29, 0xa9,
+ 0x8e, 0x7e, 0x60, 0xc7, 0xee, 0x0c, 0x36, 0x89, 0x8e, 0xe5, 0x19, 0x16, 0xd8, 0x29, 0xb1, 0x1f,
+ 0xd8, 0x31, 0x7b, 0xb6, 0xb0, 0x63, 0x10, 0x5d, 0x9e, 0xa5, 0x27, 0x93, 0x6c, 0x03, 0x6a, 0xc3,
+ 0x6c, 0x4c, 0xb8, 0xaa, 0x5a, 0xfa, 0x03, 0x43, 0xf7, 0xb6, 0xe5, 0x39, 0xfa, 0x02, 0xb7, 0xad,
+ 0x79, 0x0b, 0x5e, 0x1e, 0x18, 0x4c, 0xfb, 0xba, 0x70, 0xb8, 0x0d, 0xaf, 0x14, 0x08, 0x8b, 0x7d,
+ 0xa9, 0x1c, 0x2a, 0x41, 0x3f, 0xa9, 0xc2, 0x1c, 0x5b, 0x78, 0x4e, 0xb2, 0xd4, 0xa1, 0x65, 0x29,
+ 0x2e, 0xc0, 0x47, 0x9f, 0xa5, 0xf8, 0x66, 0x1c, 0xcf, 0x2c, 0x15, 0xcf, 0x43, 0x8d, 0x44, 0x1e,
+ 0xe2, 0x7b, 0x91, 0x97, 0x87, 0x12, 0xd9, 0x6e, 0x3a, 0x95, 0xed, 0x5e, 0x0c, 0x7a, 0xaf, 0x5b,
+ 0xea, 0x3d, 0xf3, 0x84, 0xde, 0x87, 0x47, 0x6f, 0x2e, 0xc0, 0x47, 0x4f, 0x6f, 0xbe, 0x19, 0xcf,
+ 0x1b, 0xbd, 0xf9, 0x5e, 0x9c, 0xd0, 0x9b, 0x4b, 0xef, 0xbf, 0xaa, 0x70, 0x7a, 0xcd, 0x70, 0x4f,
+ 0xf8, 0xbd, 0x3f, 0x7e, 0x7f, 0x53, 0x8c, 0xdf, 0x1f, 0x85, 0x2b, 0x0e, 0x17, 0xe1, 0xa1, 0x09,
+ 0xfe, 0x5d, 0x51, 0x82, 0xaf, 0x88, 0xed, 0x38, 0x9e, 0x0c, 0xbf, 0x91, 0x61, 0xf8, 0x25, 0xb1,
+ 0x1b, 0x27, 0x14, 0xe7, 0x52, 0xfc, 0xf7, 0x1a, 0x9c, 0xb9, 0xae, 0x1a, 0x26, 0xe9, 0x61, 0xe7,
+ 0x84, 0xe3, 0xc5, 0x39, 0xfe, 0x6d, 0x31, 0x8e, 0x87, 0x8b, 0x67, 0x0e, 0xc4, 0x43, 0x93, 0xfc,
+ 0xfb, 0xa2, 0x24, 0x5f, 0x1d, 0x60, 0xc8, 0xf1, 0x64, 0xf9, 0x9b, 0x30, 0xa3, 0x9a, 0x26, 0x79,
+ 0xc0, 0x6e, 0x2b, 0x71, 0xf0, 0xe5, 0x33, 0xb8, 0x56, 0xe0, 0x35, 0xa1, 0x65, 0x40, 0x91, 0x95,
+ 0xab, 0xaa, 0xb6, 0x83, 0x2d, 0xbd, 0xa3, 0x53, 0x5e, 0xd7, 0x15, 0x4e, 0x0b, 0xda, 0x88, 0xe5,
+ 0x11, 0x76, 0x85, 0x70, 0x79, 0x00, 0x52, 0x85, 0x12, 0xc9, 0xcc, 0x0b, 0x97, 0x48, 0x7e, 0x92,
+ 0xc2, 0xfb, 0x48, 0x36, 0x13, 0x37, 0x1c, 0xb2, 0x6b, 0x17, 0x4e, 0x23, 0x83, 0xca, 0x0e, 0x06,
+ 0x7f, 0x03, 0xe6, 0xa5, 0x83, 0x4a, 0x4e, 0x3a, 0x58, 0x00, 0x50, 0xf5, 0x20, 0x62, 0x5c, 0xfa,
+ 0x49, 0xa2, 0xae, 0xc4, 0x24, 0xac, 0xd6, 0xa4, 0x4b, 0x7a, 0x38, 0xec, 0x52, 0xa5, 0x5d, 0x92,
+ 0xc2, 0xdc, 0xb4, 0x11, 0x0b, 0xe7, 0x7a, 0x22, 0x9c, 0x5b, 0xbf, 0x94, 0x60, 0xee, 0x73, 0x5b,
+ 0x2f, 0x80, 0x51, 0x12, 0x0f, 0x29, 0x83, 0x47, 0xd2, 0x83, 0xf2, 0x60, 0x0f, 0x46, 0x78, 0x1e,
+ 0xe4, 0x7e, 0xa5, 0x6d, 0xa9, 0xe1, 0xb5, 0xcd, 0xb0, 0x86, 0xc6, 0x86, 0x28, 0x27, 0x87, 0x78,
+ 0x5a, 0x82, 0x06, 0x23, 0x6f, 0xac, 0xe4, 0xe3, 0x02, 0x4c, 0xaa, 0xc9, 0xaf, 0x06, 0x6c, 0xa8,
+ 0x94, 0xd4, 0xef, 0xa7, 0x11, 0xcb, 0xc2, 0x1a, 0x8d, 0x79, 0x56, 0xef, 0x42, 0xfb, 0x25, 0xa5,
+ 0x89, 0x52, 0x8a, 0x72, 0xa2, 0x94, 0x22, 0x3d, 0x74, 0x2e, 0xaf, 0x0f, 0xa9, 0xe2, 0xe5, 0x29,
+ 0x2d, 0xe8, 0x79, 0x66, 0xee, 0xa7, 0x87, 0x3e, 0x6a, 0xf7, 0xff, 0x29, 0xc1, 0xd4, 0x0d, 0x6c,
+ 0x61, 0xc7, 0xd0, 0x14, 0xec, 0xda, 0xc4, 0x72, 0x31, 0xba, 0x0a, 0xa3, 0x0e, 0x76, 0x77, 0x4d,
+ 0x8f, 0xaa, 0x18, 0x6b, 0x9f, 0x0b, 0x6c, 0x4d, 0xf5, 0x5b, 0x56, 0x68, 0xa7, 0x8d, 0x53, 0x4a,
+ 0xd0, 0x1d, 0xbd, 0x0d, 0x15, 0xec, 0x38, 0xc4, 0xa1, 0xc3, 0x8c, 0xb5, 0xe7, 0x73, 0xde, 0x5b,
+ 0xf7, 0xfb, 0x6c, 0x9c, 0x52, 0x58, 0xe7, 0x66, 0x0b, 0x46, 0x99, 0x26, 0xdf, 0xc7, 0x2e, 0x76,
+ 0x5d, 0xf5, 0x4b, 0x1c, 0x18, 0x1f, 0x3e, 0x36, 0x3f, 0x80, 0x0a, 0x7d, 0xcb, 0x4f, 0x5a, 0x1a,
+ 0xd1, 0xc3, 0x76, 0xfa, 0x3f, 0x9d, 0x94, 0xa4, 0x4c, 0x52, 0x5a, 0xad, 0x42, 0xc5, 0xc1, 0xb6,
+ 0xb9, 0xd7, 0x7e, 0x54, 0x87, 0x89, 0x2d, 0x87, 0xf4, 0x0c, 0xd7, 0x9f, 0x1a, 0xa2, 0xed, 0xa0,
+ 0x15, 0x18, 0x8f, 0xa7, 0x4b, 0x74, 0x26, 0xa7, 0x54, 0xae, 0x79, 0x9a, 0xef, 0x4d, 0xeb, 0x94,
+ 0xaf, 0x22, 0x4e, 0xd2, 0x48, 0x45, 0xba, 0xd8, 0x4b, 0xac, 0x22, 0x5e, 0x53, 0x14, 0xa9, 0x48,
+ 0x17, 0x1a, 0x09, 0x54, 0xdc, 0x0e, 0x4b, 0x32, 0x92, 0xe5, 0x23, 0xe8, 0xa5, 0x01, 0x65, 0x36,
+ 0x62, 0x95, 0xbc, 0x8a, 0x94, 0x48, 0x65, 0x5e, 0xb9, 0x8a, 0x40, 0x65, 0x27, 0xac, 0x18, 0xed,
+ 0x7f, 0xf8, 0x44, 0x67, 0x05, 0x55, 0x18, 0x62, 0x55, 0xe9, 0xfa, 0x82, 0x48, 0x15, 0xaf, 0xf0,
+ 0x40, 0xa0, 0xea, 0x13, 0x98, 0xce, 0x7c, 0xf7, 0x40, 0xf3, 0xa2, 0x2f, 0x22, 0x62, 0x65, 0x99,
+ 0xcb, 0xcb, 0x48, 0x19, 0xf7, 0x5a, 0x53, 0xac, 0x2c, 0x73, 0x55, 0x12, 0x29, 0xe3, 0x5e, 0xa2,
+ 0x08, 0x94, 0x6d, 0x02, 0xca, 0x9e, 0xca, 0xd0, 0x39, 0xe1, 0x81, 0x4d, 0xa0, 0xee, 0x16, 0xcc,
+ 0x70, 0x36, 0x67, 0x68, 0x41, 0xbc, 0x71, 0x2b, 0x32, 0x0d, 0xb1, 0xd5, 0x2e, 0x35, 0x0d, 0xa9,
+ 0x75, 0x50, 0xac, 0x2c, 0xb3, 0xc6, 0x47, 0xca, 0xb8, 0xab, 0x7f, 0x91, 0x39, 0xe5, 0x29, 0xe3,
+ 0xae, 0xd0, 0xf9, 0xca, 0xda, 0x3f, 0x94, 0x00, 0x58, 0x68, 0x86, 0x19, 0x28, 0xbe, 0x08, 0x46,
+ 0xdc, 0x4f, 0xaf, 0x8c, 0x83, 0x32, 0x10, 0x47, 0x45, 0x7a, 0x75, 0xc9, 0x57, 0x71, 0x6f, 0x94,
+ 0x36, 0xbc, 0xf5, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf2, 0xc0, 0xba, 0xdf, 0xe7, 0x2d, 0x00,
0x00,
}
diff --git a/pkg/dock/proto/dock.proto b/pkg/dock/proto/dock.proto
index 726fe837a..2d067f75a 100755
--- a/pkg/dock/proto/dock.proto
+++ b/pkg/dock/proto/dock.proto
@@ -114,6 +114,8 @@ message CreateVolumeOpts {
string replicationId = 14;
// The size of snapshot
int64 snapshotSize = 15;
+ // Down load snapshot from cloud
+ bool snapshotFromCloud = 16;
}
// DeleteVolumeOpts is a structure which indicates all required properties
diff --git a/pkg/model/volume.go b/pkg/model/volume.go
index 8c7b9439f..ee9c48890 100755
--- a/pkg/model/volume.go
+++ b/pkg/model/volume.go
@@ -71,6 +71,9 @@ type VolumeSpec struct {
// The uuid of the snapshot which the volume is created
SnapshotId string `json:"snapshotId, omitempty"`
+ // Download Snapshot From Cloud
+ SnapshotFromCloud bool `json:"snapshotFromCloud, omitempty"`
+
// The uuid of the replication which the volume belongs to.
ReplicationId string `json:"replicationId,omitempty"`
From 41e0cec85d7fb380bcd867e5a83e5658a7c017dd Mon Sep 17 00:00:00 2001
From: jerry
Date: Thu, 22 Nov 2018 20:21:07 +0800
Subject: [PATCH 13/20] make log flushing shorter, and fixed some flag bugs
---
cmd/osdsdock/osdsdock.go | 3 ++-
cmd/osdslet/osdslet.go | 3 ++-
pkg/api/filter/accesslog/accesslog.go | 29 +++++++++++++++++++++++
pkg/api/router.go | 2 ++
pkg/utils/config/config_define.go | 15 +++++++-----
pkg/utils/config/flag.go | 33 +++++++++------------------
pkg/utils/logs/logs.go | 26 +++++++++++++++++++++
7 files changed, 81 insertions(+), 30 deletions(-)
create mode 100644 pkg/api/filter/accesslog/accesslog.go
diff --git a/cmd/osdsdock/osdsdock.go b/cmd/osdsdock/osdsdock.go
index 2d15113fe..16244c185 100755
--- a/cmd/osdsdock/osdsdock.go
+++ b/cmd/osdsdock/osdsdock.go
@@ -30,12 +30,13 @@ import (
func init() {
def := GetDefaultConfig()
- flag := CONF.Flag
+ flag := &CONF.Flag
flag.StringVar(&CONF.OsdsDock.ApiEndpoint, "api-endpoint", def.OsdsDock.ApiEndpoint, "Listen endpoint of dock service")
flag.StringVar(&CONF.OsdsDock.DockType, "dock-type", def.OsdsDock.DockType, "Type of dock service")
flag.StringVar(&CONF.Database.Endpoint, "db-endpoint", def.Database.Endpoint, "Connection endpoint of database service")
flag.StringVar(&CONF.Database.Driver, "db-driver", def.Database.Driver, "Driver name of database service")
// flag.StringVar(&CONF.Database.Credential, "db-credential", def.Database.Credential, "Connection credential of database service")
+ flag.DurationVar(&CONF.OsdsLet.LogFlushFrequency, "log-flush-frequency", def.OsdsLet.LogFlushFrequency, "Maximum number of seconds between log flushes")
daemon.SetDaemonFlag(&CONF.OsdsDock.Daemon, def.OsdsDock.Daemon)
CONF.Load("/etc/opensds/opensds.conf")
daemon.CheckAndRunDaemon(CONF.OsdsDock.Daemon)
diff --git a/cmd/osdslet/osdslet.go b/cmd/osdslet/osdslet.go
index 429a21e8b..cdcaa4695 100755
--- a/cmd/osdslet/osdslet.go
+++ b/cmd/osdslet/osdslet.go
@@ -30,11 +30,12 @@ import (
func init() {
def := GetDefaultConfig()
- flag := CONF.Flag
+ flag := &CONF.Flag
flag.StringVar(&CONF.OsdsLet.ApiEndpoint, "api-endpoint", def.OsdsLet.ApiEndpoint, "Listen endpoint of controller service")
flag.StringVar(&CONF.Database.Endpoint, "db-endpoint", def.Database.Endpoint, "Connection endpoint of database service")
flag.StringVar(&CONF.Database.Driver, "db-driver", def.Database.Driver, "Driver name of database service")
flag.StringVar(&CONF.Database.Credential, "db-credential", def.Database.Credential, "Connection credential of database service")
+ flag.DurationVar(&CONF.OsdsLet.LogFlushFrequency, "log-flush-frequency", def.OsdsLet.LogFlushFrequency, "Maximum number of seconds between log flushes")
daemon.SetDaemonFlag(&CONF.OsdsLet.Daemon, def.OsdsLet.Daemon)
CONF.Load("/etc/opensds/opensds.conf")
daemon.CheckAndRunDaemon(CONF.OsdsLet.Daemon)
diff --git a/pkg/api/filter/accesslog/accesslog.go b/pkg/api/filter/accesslog/accesslog.go
new file mode 100644
index 000000000..7ed845864
--- /dev/null
+++ b/pkg/api/filter/accesslog/accesslog.go
@@ -0,0 +1,29 @@
+// Copyright (c) 2017 Huawei Technologies Co., Ltd. All Rights Reserved.
+//
+// Licensed 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.
+
+package accesslog
+
+import (
+ "github.com/astaxie/beego"
+ bctx "github.com/astaxie/beego/context"
+ "github.com/golang/glog"
+)
+
+func Factory() beego.FilterFunc {
+ return func(httpCtx *bctx.Context) {
+ r := httpCtx.Request
+ glog.Infof("\033[32m[D] %s -- %s %s\033[0m\n", r.RemoteAddr, r.Method,
+ r.URL)
+ }
+}
diff --git a/pkg/api/router.go b/pkg/api/router.go
index 54d171bac..40611683c 100755
--- a/pkg/api/router.go
+++ b/pkg/api/router.go
@@ -25,6 +25,7 @@ import (
"github.com/astaxie/beego"
bctx "github.com/astaxie/beego/context"
+ "github.com/opensds/opensds/pkg/api/filter/accesslog"
"github.com/opensds/opensds/pkg/api/filter/auth"
"github.com/opensds/opensds/pkg/api/filter/context"
"github.com/opensds/opensds/pkg/utils/constants"
@@ -103,6 +104,7 @@ func Run(host string) {
pattern := fmt.Sprintf("/%s/*", constants.APIVersion)
beego.InsertFilter(pattern, beego.BeforeExec, context.Factory())
beego.InsertFilter(pattern, beego.BeforeExec, auth.Factory())
+ beego.InsertFilter("*", beego.BeforeExec, accesslog.Factory())
beego.AddNamespace(ns)
// add router for api version
diff --git a/pkg/utils/config/config_define.go b/pkg/utils/config/config_define.go
index fcddbbd00..a0057cbbb 100755
--- a/pkg/utils/config/config_define.go
+++ b/pkg/utils/config/config_define.go
@@ -14,15 +14,18 @@
package config
+import "time"
+
type Default struct{}
type OsdsLet struct {
- ApiEndpoint string `conf:"api_endpoint,localhost:50040"`
- Graceful bool `conf:"graceful,true"`
- SocketOrder string `conf:"socket_order"`
- AuthStrategy string `conf:"auth_strategy,noauth"`
- Daemon bool `conf:"daemon,false"`
- PolicyPath string `conf:"policy_path,/etc/opensds/policy.json"`
+ ApiEndpoint string `conf:"api_endpoint,localhost:50040"`
+ Graceful bool `conf:"graceful,true"`
+ SocketOrder string `conf:"socket_order"`
+ AuthStrategy string `conf:"auth_strategy,noauth"`
+ Daemon bool `conf:"daemon,false"`
+ PolicyPath string `conf:"policy_path,/etc/opensds/policy.json"`
+ LogFlushFrequency time.Duration `conf:"log_flush_frequency,5000000000"` // Default value is 5s
}
type OsdsDock struct {
diff --git a/pkg/utils/config/flag.go b/pkg/utils/config/flag.go
index e3a02acae..c4ac24c5e 100755
--- a/pkg/utils/config/flag.go
+++ b/pkg/utils/config/flag.go
@@ -17,8 +17,7 @@ package config
import (
gflag "flag"
"reflect"
-
- log "github.com/golang/glog"
+ "time"
)
type Flag struct {
@@ -83,6 +82,13 @@ func (f *FlagSet) StringVar(p *string, name string, defValue string, usage strin
f.Add(name, flag)
}
+func (f *FlagSet) DurationVar(p *time.Duration, name string, defValue time.Duration, usage string) {
+ inVal := new(time.Duration)
+ flag := &Flag{Value: p, InValue: inVal}
+ gflag.DurationVar(inVal, name, defValue, usage)
+ f.Add(name, flag)
+}
+
func (f *FlagSet) Add(name string, flag *Flag) {
if f.flagMap == nil {
f.flagMap = make(map[string]*Flag)
@@ -103,25 +109,8 @@ func (f *FlagSet) AssignValue() {
if _, ok := f.flagMap[name]; !ok {
continue
}
- typ := reflect.TypeOf(f.flagMap[name].InValue)
- val := reflect.ValueOf(f.flagMap[name].InValue)
- switch typ.Elem().Kind() {
- case reflect.String:
- *f.flagMap[name].Value.(*string) = val.Elem().String()
- case reflect.Bool:
- *f.flagMap[name].Value.(*bool) = val.Elem().Bool()
- case reflect.Int:
- *f.flagMap[name].Value.(*int) = int(val.Elem().Int())
- case reflect.Int64:
- *f.flagMap[name].Value.(*int64) = val.Elem().Int()
- case reflect.Uint:
- *f.flagMap[name].Value.(*uint) = uint(val.Elem().Uint())
- case reflect.Uint64:
- *f.flagMap[name].Value.(*uint64) = val.Elem().Uint()
- case reflect.Float64:
- *f.flagMap[name].Value.(*float64) = val.Elem().Float()
- default:
- log.Error("Flag do not support this type.")
- }
+ iv := reflect.ValueOf(f.flagMap[name].InValue).Elem()
+ v := reflect.ValueOf(f.flagMap[name].Value).Elem()
+ v.Set(iv)
}
}
diff --git a/pkg/utils/logs/logs.go b/pkg/utils/logs/logs.go
index eea1f7ba1..6e7d201a5 100755
--- a/pkg/utils/logs/logs.go
+++ b/pkg/utils/logs/logs.go
@@ -18,13 +18,25 @@ import (
"flag"
"log"
"os"
+ "time"
+ "fmt"
"github.com/golang/glog"
"github.com/opensds/opensds/pkg/utils"
+ "github.com/opensds/opensds/pkg/utils/config"
+ "os/signal"
+ "syscall"
)
const DefaultLogDir = "/var/log/opensds"
+// flushDaemon periodically flushes the log file buffers.
+func flushDaemon(period time.Duration) {
+ for _ = range time.NewTicker(period).C {
+ glog.Flush()
+ }
+}
+
func init() {
//Set OpenSDS default log directory.
flag.CommandLine.VisitAll(func(flag *flag.Flag) {
@@ -42,6 +54,18 @@ func (writer GlogWriter) Write(data []byte) (n int, err error) {
return len(data), nil
}
+// flush log when be interrupted.
+func handleInterrupt() {
+ sigs := make(chan os.Signal, 1)
+ signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM, syscall.SIGKILL, syscall.SIGQUIT)
+ go func() {
+ sig := <-sigs
+ fmt.Println(sig)
+ FlushLogs()
+ os.Exit(-1)
+ }()
+}
+
func InitLogs() {
log.SetOutput(GlogWriter{})
log.SetFlags(log.LstdFlags | log.Lshortfile)
@@ -49,6 +73,8 @@ func InitLogs() {
if exist, _ := utils.PathExists(logDir); !exist {
os.MkdirAll(logDir, 0755)
}
+ go flushDaemon(config.CONF.LogFlushFrequency)
+ handleInterrupt()
}
func FlushLogs() {
From 88f1d3cb459e9e54985bfb76dbe932a3db3f1d94 Mon Sep 17 00:00:00 2001
From: jerry
Date: Thu, 22 Nov 2018 20:33:58 +0800
Subject: [PATCH 14/20] Fixed gofmt issue
---
pkg/utils/logs/logs.go | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pkg/utils/logs/logs.go b/pkg/utils/logs/logs.go
index 6e7d201a5..611420bc5 100755
--- a/pkg/utils/logs/logs.go
+++ b/pkg/utils/logs/logs.go
@@ -16,16 +16,16 @@ package logs
import (
"flag"
+ "fmt"
"log"
"os"
+ "os/signal"
+ "syscall"
"time"
- "fmt"
"github.com/golang/glog"
"github.com/opensds/opensds/pkg/utils"
"github.com/opensds/opensds/pkg/utils/config"
- "os/signal"
- "syscall"
)
const DefaultLogDir = "/var/log/opensds"
From 019a212fff1675f729852bed3689d47ec5874969 Mon Sep 17 00:00:00 2001
From: jerry
Date: Fri, 23 Nov 2018 11:25:55 +0800
Subject: [PATCH 15/20] add paramters to volume specs, and fixed some api specs
error
---
openapi-spec/swagger.yaml | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/openapi-spec/swagger.yaml b/openapi-spec/swagger.yaml
index 58bb18dd8..6381f25d9 100755
--- a/openapi-spec/swagger.yaml
+++ b/openapi-spec/swagger.yaml
@@ -1470,13 +1470,12 @@ definitions:
type: string
poolId:
type: string
- readOnly: true
- SnapshotId:
+ snapshotId:
type: string
- readOnly: true
groupId:
- type: string
- readOnly: true
+ type: string
+ snapshotFromCloud:
+ type: boolean
Attachment:
description: >-
Attachment is a description of volume attached resource.
From bb64def0aa223913ab1d09142b5baee76ed1f5d3 Mon Sep 17 00:00:00 2001
From: Jerry
Date: Fri, 23 Nov 2018 17:25:22 +0800
Subject: [PATCH 16/20] Add unit test and fixed some bugs (#553)
* Add unit test and fixed some bugs
* Fixed CI error
* Fxied CI error
---
cmd/osdsdock/osdsdock.go | 4 +-
cmd/osdslet/osdslet.go | 2 +-
contrib/cindercompatibleapi/main.go | 3 +-
.../huawei/fusionstorage/fusionstorage.go | 2 +-
.../drivers/huawei/fusionstorage/parser.go | 4 +-
pkg/utils/config/config.go | 125 ++++++++++++++----
pkg/utils/config/config_define.go | 15 ++-
pkg/utils/config/config_test.go | 42 ++++--
pkg/utils/config/testdata/opensds.conf | 3 +
pkg/utils/logs/logs.go | 6 +-
script/CI/coverage | 2 +-
test/e2e/e2ef_test.go | 1 +
12 files changed, 150 insertions(+), 59 deletions(-)
diff --git a/cmd/osdsdock/osdsdock.go b/cmd/osdsdock/osdsdock.go
index 16244c185..acdd642e4 100755
--- a/cmd/osdsdock/osdsdock.go
+++ b/cmd/osdsdock/osdsdock.go
@@ -36,7 +36,7 @@ func init() {
flag.StringVar(&CONF.Database.Endpoint, "db-endpoint", def.Database.Endpoint, "Connection endpoint of database service")
flag.StringVar(&CONF.Database.Driver, "db-driver", def.Database.Driver, "Driver name of database service")
// flag.StringVar(&CONF.Database.Credential, "db-credential", def.Database.Credential, "Connection credential of database service")
- flag.DurationVar(&CONF.OsdsLet.LogFlushFrequency, "log-flush-frequency", def.OsdsLet.LogFlushFrequency, "Maximum number of seconds between log flushes")
+ flag.DurationVar(&CONF.OsdsDock.LogFlushFrequency, "log-flush-frequency", def.OsdsLet.LogFlushFrequency, "Maximum number of seconds between log flushes")
daemon.SetDaemonFlag(&CONF.OsdsDock.Daemon, def.OsdsDock.Daemon)
CONF.Load("/etc/opensds/opensds.conf")
daemon.CheckAndRunDaemon(CONF.OsdsDock.Daemon)
@@ -44,7 +44,7 @@ func init() {
func main() {
// Open OpenSDS dock service log file.
- logs.InitLogs()
+ logs.InitLogs(CONF.OsdsDock.LogFlushFrequency)
defer logs.FlushLogs()
// Set up database session.
diff --git a/cmd/osdslet/osdslet.go b/cmd/osdslet/osdslet.go
index cdcaa4695..f5cc15a9c 100755
--- a/cmd/osdslet/osdslet.go
+++ b/cmd/osdslet/osdslet.go
@@ -43,7 +43,7 @@ func init() {
func main() {
// Open OpenSDS orchestrator service log file.
- logs.InitLogs()
+ logs.InitLogs(CONF.OsdsLet.LogFlushFrequency)
defer logs.FlushLogs()
// Set up database session.
diff --git a/contrib/cindercompatibleapi/main.go b/contrib/cindercompatibleapi/main.go
index 52d76933e..e12a8488b 100644
--- a/contrib/cindercompatibleapi/main.go
+++ b/contrib/cindercompatibleapi/main.go
@@ -23,6 +23,7 @@ import (
"flag"
"fmt"
"os"
+ "time"
"github.com/opensds/opensds/contrib/cindercompatibleapi/api"
"github.com/opensds/opensds/pkg/utils/logs"
@@ -30,7 +31,7 @@ import (
func main() {
flag.Parse()
- logs.InitLogs()
+ logs.InitLogs(5 * time.Second)
defer logs.FlushLogs()
cinderEndpoint, ok := os.LookupEnv("CINDER_ENDPOINT")
diff --git a/contrib/drivers/huawei/fusionstorage/fusionstorage.go b/contrib/drivers/huawei/fusionstorage/fusionstorage.go
index 6faed39b1..8ab10ea24 100644
--- a/contrib/drivers/huawei/fusionstorage/fusionstorage.go
+++ b/contrib/drivers/huawei/fusionstorage/fusionstorage.go
@@ -204,7 +204,7 @@ func (d *Driver) DeleteSnapshot(opt *pb.DeleteVolumeSnapshotOpts) error {
log.Errorf("Delete volume snapshot (%s) failed: %v", opt.GetId(), err)
return err
}
- log.Info("Remove volume snapshot (%s) success", opt.GetId())
+ log.Infof("Remove volume snapshot (%s) success", opt.GetId())
return nil
}
diff --git a/contrib/drivers/huawei/fusionstorage/parser.go b/contrib/drivers/huawei/fusionstorage/parser.go
index d04c1bed7..1b5561170 100644
--- a/contrib/drivers/huawei/fusionstorage/parser.go
+++ b/contrib/drivers/huawei/fusionstorage/parser.go
@@ -76,7 +76,7 @@ func Value(data map[string]string, v reflect.Value) error {
case reflect.String:
iv.SetString(s)
default:
- return fmt.Errorf("fsc: Unexpected key type", iv.Kind()) // should never occur
+ return fmt.Errorf("fsc: Unexpected key type %v", iv.Kind()) // should never occur
}
}
return nil
@@ -112,7 +112,7 @@ func unmarshalSlice(data string, v reflect.Value) error {
func Unmarshal(data []byte, v interface{}) error {
rv := reflect.ValueOf(v)
if rv.Kind() != reflect.Ptr || rv.IsNil() {
- return fmt.Errorf("invalid type of %s ,reflect.TypeOf(v) ")
+ return fmt.Errorf("invalid value kind %v", rv.Kind())
}
rv = rv.Elem()
switch rv.Kind() {
diff --git a/pkg/utils/config/config.go b/pkg/utils/config/config.go
index a81929a7e..79909bd92 100755
--- a/pkg/utils/config/config.go
+++ b/pkg/utils/config/config.go
@@ -16,12 +16,14 @@ package config
import (
gflag "flag"
+ "fmt"
+ "log"
"reflect"
"strconv"
"strings"
+ "time"
"github.com/go-ini/ini"
- log "github.com/golang/glog"
)
const (
@@ -29,73 +31,112 @@ const (
ConfDefaultValue
)
-func setSlice(v reflect.Value, str string) {
+func setSlice(v reflect.Value, str string) error {
sList := strings.Split(str, ",")
s := reflect.MakeSlice(v.Type(), 0, 5)
switch v.Type().Elem().Kind() {
case reflect.Bool:
for _, elm := range sList {
- val, _ := strconv.ParseBool(elm)
+ val, err := strconv.ParseBool(elm)
+ if err != nil {
+ return fmt.Errorf("cann't convert slice item %s to Bool, %v", elm, err)
+ }
s = reflect.Append(s, reflect.ValueOf(val))
}
case reflect.Int:
for _, elm := range sList {
- val, _ := strconv.Atoi(elm)
+ val, err := strconv.Atoi(elm)
+ if err != nil {
+ return fmt.Errorf("cann't convert slice item %s to Int, %v", elm, err)
+ }
s = reflect.Append(s, reflect.ValueOf(val))
}
case reflect.Int8:
for _, elm := range sList {
- val, _ := strconv.ParseInt(elm, 10, 64)
+ val, err := strconv.ParseInt(elm, 10, 64)
+ if err != nil {
+ return fmt.Errorf("cann't convert slice item %s to Int8, %v", elm, err)
+ }
s = reflect.Append(s, reflect.ValueOf(int8(val)))
}
case reflect.Int16:
for _, elm := range sList {
- val, _ := strconv.ParseInt(elm, 10, 64)
+ val, err := strconv.ParseInt(elm, 10, 64)
+ if err != nil {
+ return fmt.Errorf("cann't convert slice item %s to Int16, %v", elm, err)
+ }
s = reflect.Append(s, reflect.ValueOf(int16(val)))
}
case reflect.Int32:
for _, elm := range sList {
- val, _ := strconv.ParseInt(elm, 10, 64)
+ val, err := strconv.ParseInt(elm, 10, 64)
+ if err != nil {
+ return fmt.Errorf("cann't convert slice item %s to Int32, %v", elm, err)
+ }
s = reflect.Append(s, reflect.ValueOf(int32(val)))
}
case reflect.Int64:
for _, elm := range sList {
- val, _ := strconv.ParseInt(elm, 10, 64)
+ val, err := strconv.ParseInt(elm, 10, 64)
+ if err != nil {
+ return fmt.Errorf("cann't convert slice item %s to Int64, %v", elm, err)
+ }
s = reflect.Append(s, reflect.ValueOf(int64(val)))
}
case reflect.Uint:
for _, elm := range sList {
- val, _ := strconv.ParseUint(elm, 10, 64)
+ val, err := strconv.ParseUint(elm, 10, 64)
+ if err != nil {
+ return fmt.Errorf("cann't convert slice item %s to Uint, %v", elm, err)
+ }
s = reflect.Append(s, reflect.ValueOf(uint(val)))
}
case reflect.Uint8:
for _, elm := range sList {
- val, _ := strconv.ParseUint(elm, 10, 64)
+ val, err := strconv.ParseUint(elm, 10, 64)
+ if err != nil {
+ return fmt.Errorf("cann't convert slice item %s to Uint8, %v", elm, err)
+ }
s = reflect.Append(s, reflect.ValueOf(uint8(val)))
}
case reflect.Uint16:
for _, elm := range sList {
- val, _ := strconv.ParseUint(elm, 10, 64)
+ val, err := strconv.ParseUint(elm, 10, 64)
+ if err != nil {
+ return fmt.Errorf("cann't convert slice item %s to Uint16, %v", elm, err)
+ }
s = reflect.Append(s, reflect.ValueOf(uint16(val)))
}
case reflect.Uint32:
for _, elm := range sList {
- val, _ := strconv.ParseUint(elm, 10, 64)
+ val, err := strconv.ParseUint(elm, 10, 64)
+ if err != nil {
+ return fmt.Errorf("cann't convert slice item %s to Uint32, %v", elm, err)
+ }
s = reflect.Append(s, reflect.ValueOf(uint32(val)))
}
case reflect.Uint64:
for _, elm := range sList {
- val, _ := strconv.ParseUint(elm, 10, 64)
+ val, err := strconv.ParseUint(elm, 10, 64)
+ if err != nil {
+ return fmt.Errorf("cann't convert slice item %s to Uint64, %v", elm, err)
+ }
s = reflect.Append(s, reflect.ValueOf(uint64(val)))
}
case reflect.Float32:
for _, elm := range sList {
- val, _ := strconv.ParseFloat(elm, 64)
+ val, err := strconv.ParseFloat(elm, 64)
+ if err != nil {
+ return fmt.Errorf("cann't convert slice item %s to Float32, %v", elm, err)
+ }
s = reflect.Append(s, reflect.ValueOf(float32(val)))
}
case reflect.Float64:
for _, elm := range sList {
- val, _ := strconv.ParseFloat(elm, 64)
+ val, err := strconv.ParseFloat(elm, 64)
+ if err != nil {
+ return fmt.Errorf("cann't convert slice item %s to Float54, %v", elm, err)
+ }
s = reflect.Append(s, reflect.ValueOf(val))
}
case reflect.String:
@@ -103,12 +144,13 @@ func setSlice(v reflect.Value, str string) {
s = reflect.Append(s, reflect.ValueOf(elm))
}
default:
- log.Error("Not support this type of slice.")
+ log.Printf("[ERROR] Does not support this type of slice.")
}
v.Set(s)
+ return nil
}
-func parseItems(section string, v reflect.Value, cfg *ini.File) {
+func parseItems(section string, v reflect.Value, cfg *ini.File) error {
for i := 0; i < v.Type().NumField(); i++ {
field := v.Field(i)
@@ -132,16 +174,38 @@ func parseItems(section string, v reflect.Value, cfg *ini.File) {
}
switch field.Kind() {
case reflect.Bool:
- val, _ := strconv.ParseBool(strVal)
+ val, err := strconv.ParseBool(strVal)
+ if err != nil {
+ return fmt.Errorf("cann't convert %s:%s to Bool, %v", tags[0], strVal, err)
+ }
field.SetBool(val)
+ case reflect.ValueOf(time.Second).Kind():
+ if field.Type().String() == "time.Duration" {
+ v, err := time.ParseDuration(strVal)
+ if err != nil {
+ return fmt.Errorf("cann't convert %s:%s to Duration, %v", tags[0], strVal, err)
+ }
+ field.SetInt(int64(v))
+ break
+ }
+ fallthrough
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- val, _ := strconv.ParseInt(strVal, 10, 64)
+ val, err := strconv.ParseInt(strVal, 10, 64)
+ if err != nil {
+ return fmt.Errorf("cann't convert %s:%s to Int, %v", tags[0], strVal, err)
+ }
field.SetInt(val)
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
- val, _ := strconv.ParseUint(strVal, 10, 64)
+ val, err := strconv.ParseUint(strVal, 10, 64)
+ if err != nil {
+ return fmt.Errorf("cann't convert %s:%s to Uint, %v", tags[0], strVal, err)
+ }
field.SetUint(val)
case reflect.Float32, reflect.Float64:
- val, _ := strconv.ParseFloat(strVal, 64)
+ val, err := strconv.ParseFloat(strVal, 64)
+ if err != nil {
+ return fmt.Errorf("cann't convert %s:%s to Float, %v", tags[0], strVal, err)
+ }
field.SetFloat(val)
case reflect.String:
field.SetString(strVal)
@@ -150,9 +214,10 @@ func parseItems(section string, v reflect.Value, cfg *ini.File) {
default:
}
}
+ return nil
}
-func parseSections(cfg *ini.File, t reflect.Type, v reflect.Value) {
+func parseSections(cfg *ini.File, t reflect.Type, v reflect.Value) error {
if v.Kind() == reflect.Ptr {
v = v.Elem()
t = t.Elem()
@@ -164,21 +229,27 @@ func parseSections(cfg *ini.File, t reflect.Type, v reflect.Value) {
continue
}
if "" == section {
- parseSections(cfg, field.Type(), field)
+ if err := parseSections(cfg, field.Type(), field); err != nil {
+ return err
+ }
+ }
+ if err := parseItems(section, field, cfg); err != nil {
+ return err
}
- parseItems(section, field, cfg)
}
+ return nil
}
func initConf(confFile string, conf interface{}) {
cfg, err := ini.Load(confFile)
if err != nil && confFile != "" {
- log.Info("Read configuration failed, use default value")
+ log.Printf("[ERROR] Read configuration failed, use default value")
}
t := reflect.TypeOf(conf)
v := reflect.ValueOf(conf)
- parseSections(cfg, t, v)
-
+ if err := parseSections(cfg, t, v); err != nil {
+ log.Fatalf("[ERROR] parse configure file failed: %v", err)
+ }
}
// Global Configuration Variable
diff --git a/pkg/utils/config/config_define.go b/pkg/utils/config/config_define.go
index a0057cbbb..c1f44ee16 100755
--- a/pkg/utils/config/config_define.go
+++ b/pkg/utils/config/config_define.go
@@ -25,16 +25,17 @@ type OsdsLet struct {
AuthStrategy string `conf:"auth_strategy,noauth"`
Daemon bool `conf:"daemon,false"`
PolicyPath string `conf:"policy_path,/etc/opensds/policy.json"`
- LogFlushFrequency time.Duration `conf:"log_flush_frequency,5000000000"` // Default value is 5s
+ LogFlushFrequency time.Duration `conf:"log_flush_frequency,5s"` // Default value is 5s
}
type OsdsDock struct {
- ApiEndpoint string `conf:"api_endpoint,localhost:50050"`
- DockType string `conf:"dock_type,provisioner"`
- EnabledBackends []string `conf:"enabled_backends,lvm"`
- Daemon bool `conf:"daemon,false"`
- BindIp string `conf:"bind_ip"` // Just used for attacher dock
- HostBasedReplicationDriver string `conf:"host_based_replication_driver,drbd"`
+ ApiEndpoint string `conf:"api_endpoint,localhost:50050"`
+ DockType string `conf:"dock_type,provisioner"`
+ EnabledBackends []string `conf:"enabled_backends,lvm"`
+ Daemon bool `conf:"daemon,false"`
+ BindIp string `conf:"bind_ip"` // Just used for attacher dock
+ HostBasedReplicationDriver string `conf:"host_based_replication_driver,drbd"`
+ LogFlushFrequency time.Duration `conf:"log_flush_frequency,5s"` // Default value is 5s
Backends
}
diff --git a/pkg/utils/config/config_test.go b/pkg/utils/config/config_test.go
index 13f207444..7fe1b4318 100755
--- a/pkg/utils/config/config_test.go
+++ b/pkg/utils/config/config_test.go
@@ -17,23 +17,25 @@ package config
import (
"reflect"
"testing"
+ "time"
)
type TestStruct struct {
- Bool bool `conf:"bool,true"`
- Int int `conf:"int,-456789"`
- Int8 int8 `conf:"int8,-111"`
- Int16 int `conf:"int16,-4567"`
- Int32 int `conf:"int32,-456789"`
- Int64 int64 `conf:"int64,-456789"`
- Uint uint `conf:"uint,456789"`
- Uint8 uint8 `conf:"uint8,111"`
- Uint16 uint16 `conf:"uint16,4567"`
- Uint32 uint32 `conf:"uint32,456789"`
- Uint64 uint64 `conf:"uint64,456789"`
- Float32 float32 `conf:"float32,0.456789"`
- Float64 float64 `conf:"float64,0.456789"`
- String string `conf:"string,DefaultValue"`
+ Bool bool `conf:"bool,true"`
+ Int int `conf:"int,-456789"`
+ Int8 int8 `conf:"int8,-111"`
+ Int16 int `conf:"int16,-4567"`
+ Int32 int `conf:"int32,-456789"`
+ Int64 int64 `conf:"int64,-456789"`
+ Uint uint `conf:"uint,456789"`
+ Uint8 uint8 `conf:"uint8,111"`
+ Uint16 uint16 `conf:"uint16,4567"`
+ Uint32 uint32 `conf:"uint32,456789"`
+ Uint64 uint64 `conf:"uint64,456789"`
+ Float32 float32 `conf:"float32,0.456789"`
+ Float64 float64 `conf:"float64,0.456789"`
+ String string `conf:"string,DefaultValue"`
+ Duration time.Duration `conf:"duration,10s"`
}
type TestSliceStruct struct {
@@ -105,6 +107,9 @@ func TestFunctionAllType(t *testing.T) {
if conf.TestStruct.Float64 != 0.123456 {
t.Error("Test TestStuct Float64 error")
}
+ if conf.TestStruct.Duration != 5*time.Second {
+ t.Error("Test TestStuct time Duration error")
+ }
if conf.TestStruct.String != "HelloWorld" {
t.Error("Test TestStuct String error")
}
@@ -207,6 +212,9 @@ func TestFunctionDefaultValue(t *testing.T) {
if conf.TestStruct.String != "DefaultValue" {
t.Error("Test TestStuct String error")
}
+ if conf.TestStruct.Duration != 10*time.Second {
+ t.Error("Test TestStuct String error")
+ }
if !reflect.DeepEqual(conf.TestSliceStruct.SliceString, []string{"slice", "string", "test"}) {
t.Error("Test TestSliceStruct String error")
@@ -263,9 +271,15 @@ func TestOpensdsConfig(t *testing.T) {
if CONF.OsdsLet.SocketOrder != "inc" {
t.Error("Test OsdsLet.SocketOrder error")
}
+ if CONF.OsdsLet.LogFlushFrequency != 2*time.Second {
+ t.Error("Test OsdsDock.ApiEndpoint error")
+ }
if CONF.OsdsDock.ApiEndpoint != "localhost:50050" {
t.Error("Test OsdsDock.ApiEndpoint error")
}
+ if CONF.OsdsDock.LogFlushFrequency != 4*time.Second {
+ t.Error("Test OsdsDock.ApiEndpoint error")
+ }
if CONF.OsdsDock.EnabledBackends[0] != "ceph" {
t.Error("OsdsDock.EnabledBackends[0] error")
}
diff --git a/pkg/utils/config/testdata/opensds.conf b/pkg/utils/config/testdata/opensds.conf
index e9546749e..78f50b8dd 100755
--- a/pkg/utils/config/testdata/opensds.conf
+++ b/pkg/utils/config/testdata/opensds.conf
@@ -3,11 +3,13 @@ api_endpoint = localhost:50040
graceful = True
log_file = /var/log/opensds/osdslet.log
socket_order = inc
+log_flush_frequency = 2s
[osdsdock]
api_endpoint = localhost:50050
log_file = /var/log/opensds/osdsdock.log
enabled_backends = ceph,cinder,sample,lvm
+log_flush_frequency = 4s
[ceph]
name = ceph
@@ -53,6 +55,7 @@ uint64=123456
float32=0.123456
float64=0.123456
string=HelloWorld
+duration=5s
[test_slice_struct]
slice_bool=False,True,False
diff --git a/pkg/utils/logs/logs.go b/pkg/utils/logs/logs.go
index 611420bc5..25e6c384b 100755
--- a/pkg/utils/logs/logs.go
+++ b/pkg/utils/logs/logs.go
@@ -25,7 +25,6 @@ import (
"github.com/golang/glog"
"github.com/opensds/opensds/pkg/utils"
- "github.com/opensds/opensds/pkg/utils/config"
)
const DefaultLogDir = "/var/log/opensds"
@@ -66,14 +65,15 @@ func handleInterrupt() {
}()
}
-func InitLogs() {
+func InitLogs(LogFlushFrequency time.Duration) {
log.SetOutput(GlogWriter{})
log.SetFlags(log.LstdFlags | log.Lshortfile)
logDir := flag.CommandLine.Lookup("log_dir").Value.String()
if exist, _ := utils.PathExists(logDir); !exist {
os.MkdirAll(logDir, 0755)
}
- go flushDaemon(config.CONF.LogFlushFrequency)
+ glog.Infof("[Info] LogFlushFrequency: %v", LogFlushFrequency)
+ go flushDaemon(LogFlushFrequency)
handleInterrupt()
}
diff --git a/script/CI/coverage b/script/CI/coverage
index ca1bd4141..2b62cefe0 100755
--- a/script/CI/coverage
+++ b/script/CI/coverage
@@ -24,7 +24,7 @@ for testpkg in $(go list ./osdsctl/... ./client/... ./pkg/... ./contrib/...); do
test $testpkg == "$MODEL_PACKAGE" && continue
test $testpkg == "$PROTOBUF_PACKAGE" && continue
covpkg="${testpkg/"/testing"/}"
- go test -covermode count -coverprofile "testing_"$n.coverprofile -coverpkg $covpkg $testpkg 2>/dev/null
+ go test -covermode count -coverprofile "testing_"$n.coverprofile -coverpkg $covpkg $testpkg
n=$((n+1))
done
diff --git a/test/e2e/e2ef_test.go b/test/e2e/e2ef_test.go
index 822ee9ce0..4eca86272 100644
--- a/test/e2e/e2ef_test.go
+++ b/test/e2e/e2ef_test.go
@@ -175,6 +175,7 @@ func TestExtendVolumeFlow(t *testing.T) {
body = &model.ExtendVolumeSpec{
NewSize: int64(3),
}
+ time.Sleep(3 * 1e9)
_, err = u.ExtendVolume(vol.Id, body)
if err != nil {
t.Error("Extend volume fail", err)
From c71ac7f1efdedf3c9f1fd1de8816c3368782e3f5 Mon Sep 17 00:00:00 2001
From: Xing Yang
Date: Fri, 23 Nov 2018 13:12:40 -0500
Subject: [PATCH 17/20] Fix function name in the log msg
---
contrib/connector/iscsi/helper.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/connector/iscsi/helper.go b/contrib/connector/iscsi/helper.go
index c10a31546..d5734f1d4 100644
--- a/contrib/connector/iscsi/helper.go
+++ b/contrib/connector/iscsi/helper.go
@@ -284,7 +284,7 @@ func getInitiatorInfo() (connector.InitiatorInfo, error) {
}
initiatorInfo.HostName = hostName
- log.Printf("getFChbasInfo success: protocol=%v, initiatorInfo=%v",
+ log.Printf("getInitiatorInfo success: protocol=%v, initiatorInfo=%v",
connector.IscsiDriver, initiatorInfo)
return initiatorInfo, nil
From bbac7d4270fe514a8d9e4537176a19a0733c2a77 Mon Sep 17 00:00:00 2001
From: leonwanghui
Date: Wed, 28 Nov 2018 10:38:12 +0800
Subject: [PATCH 18/20] Remove dashboard module
---
.travis.yml | 1 +
dashboard/.angular-cli.json | 71 -
dashboard/.editorconfig | 13 -
dashboard/.gitignore | 50 -
dashboard/.npmignore | 67 -
dashboard/.travis.yml | 23 -
dashboard/Dockerfile | 35 -
dashboard/LICENSE.md | 21 -
dashboard/Makefile | 53 -
dashboard/README.md | 77 -
dashboard/e2e/accordion.e2e-spec.ts | 20 -
dashboard/e2e/app.e2e-spec.ts | 16 -
dashboard/e2e/app.po.ts | 11 -
dashboard/e2e/fieldset.e2e-spec.ts | 27 -
dashboard/e2e/inputtext.e2e-spec.ts | 34 -
dashboard/e2e/panel.e2e-spec.ts | 27 -
dashboard/e2e/tabview.e2e-spec.ts | 49 -
dashboard/e2e/tsconfig.e2e.json | 12 -
dashboard/exports/accordion.d.ts | 1 -
dashboard/exports/accordion.js | 7 -
dashboard/exports/api.d.ts | 1 -
dashboard/exports/api.js | 7 -
dashboard/exports/autocomplete.d.ts | 1 -
dashboard/exports/autocomplete.js | 7 -
dashboard/exports/blockui.d.ts | 1 -
dashboard/exports/blockui.js | 7 -
dashboard/exports/breadcrumb.d.ts | 1 -
dashboard/exports/breadcrumb.js | 7 -
dashboard/exports/button.d.ts | 1 -
dashboard/exports/button.js | 7 -
dashboard/exports/calendar.d.ts | 1 -
dashboard/exports/calendar.js | 7 -
dashboard/exports/captcha.d.ts | 1 -
dashboard/exports/captcha.js | 7 -
dashboard/exports/card.d.ts | 1 -
dashboard/exports/card.js | 7 -
dashboard/exports/carousel.d.ts | 1 -
dashboard/exports/carousel.js | 7 -
dashboard/exports/chart.d.ts | 1 -
dashboard/exports/chart.js | 7 -
dashboard/exports/checkbox.d.ts | 1 -
dashboard/exports/checkbox.js | 7 -
dashboard/exports/chips.d.ts | 1 -
dashboard/exports/chips.js | 7 -
dashboard/exports/codehighlighter.d.ts | 1 -
dashboard/exports/codehighlighter.js | 7 -
dashboard/exports/colorpicker.d.ts | 1 -
dashboard/exports/colorpicker.js | 7 -
dashboard/exports/confirmdialog.d.ts | 1 -
dashboard/exports/confirmdialog.js | 7 -
dashboard/exports/contextmenu.d.ts | 1 -
dashboard/exports/contextmenu.js | 7 -
dashboard/exports/datagrid.d.ts | 1 -
dashboard/exports/datagrid.js | 7 -
dashboard/exports/datalist.d.ts | 1 -
dashboard/exports/datalist.js | 7 -
dashboard/exports/datascroller.d.ts | 1 -
dashboard/exports/datascroller.js | 7 -
dashboard/exports/datatable.d.ts | 1 -
dashboard/exports/datatable.js | 7 -
dashboard/exports/dataview.d.ts | 1 -
dashboard/exports/dataview.js | 7 -
dashboard/exports/defer.d.ts | 1 -
dashboard/exports/defer.js | 7 -
dashboard/exports/dialog.d.ts | 1 -
dashboard/exports/dialog.js | 7 -
dashboard/exports/dragdrop.d.ts | 1 -
dashboard/exports/dragdrop.js | 7 -
dashboard/exports/dropdown.d.ts | 1 -
dashboard/exports/dropdown.js | 7 -
dashboard/exports/editor.d.ts | 1 -
dashboard/exports/editor.js | 7 -
dashboard/exports/fieldset.d.ts | 1 -
dashboard/exports/fieldset.js | 7 -
dashboard/exports/fileupload.d.ts | 1 -
dashboard/exports/fileupload.js | 7 -
dashboard/exports/galleria.d.ts | 1 -
dashboard/exports/galleria.js | 7 -
dashboard/exports/gmap.d.ts | 1 -
dashboard/exports/gmap.js | 7 -
dashboard/exports/growl.d.ts | 1 -
dashboard/exports/growl.js | 7 -
dashboard/exports/inplace.d.ts | 1 -
dashboard/exports/inplace.js | 7 -
dashboard/exports/inputmask.d.ts | 1 -
dashboard/exports/inputmask.js | 7 -
dashboard/exports/inputswitch.d.ts | 1 -
dashboard/exports/inputswitch.js | 7 -
dashboard/exports/inputtext.d.ts | 1 -
dashboard/exports/inputtext.js | 7 -
dashboard/exports/inputtextarea.d.ts | 1 -
dashboard/exports/inputtextarea.js | 7 -
dashboard/exports/keyfilter.d.ts | 1 -
dashboard/exports/keyfilter.js | 7 -
dashboard/exports/lightbox.d.ts | 1 -
dashboard/exports/lightbox.js | 7 -
dashboard/exports/listbox.d.ts | 1 -
dashboard/exports/listbox.js | 7 -
dashboard/exports/megamenu.d.ts | 1 -
dashboard/exports/megamenu.js | 7 -
dashboard/exports/menu.d.ts | 1 -
dashboard/exports/menu.js | 7 -
dashboard/exports/menubar.d.ts | 1 -
dashboard/exports/menubar.js | 7 -
dashboard/exports/message.d.ts | 1 -
dashboard/exports/message.js | 7 -
dashboard/exports/messages.d.ts | 1 -
dashboard/exports/messages.js | 7 -
dashboard/exports/multiselect.d.ts | 1 -
dashboard/exports/multiselect.js | 7 -
dashboard/exports/orderlist.d.ts | 1 -
dashboard/exports/orderlist.js | 7 -
dashboard/exports/organizationchart.d.ts | 1 -
dashboard/exports/organizationchart.js | 7 -
dashboard/exports/overlaypanel.d.ts | 1 -
dashboard/exports/overlaypanel.js | 7 -
dashboard/exports/paginator.d.ts | 1 -
dashboard/exports/paginator.js | 7 -
dashboard/exports/panel.d.ts | 1 -
dashboard/exports/panel.js | 7 -
dashboard/exports/panelmenu.d.ts | 1 -
dashboard/exports/panelmenu.js | 7 -
dashboard/exports/password.d.ts | 1 -
dashboard/exports/password.js | 7 -
dashboard/exports/picklist.d.ts | 1 -
dashboard/exports/picklist.js | 7 -
dashboard/exports/progressbar.d.ts | 1 -
dashboard/exports/progressbar.js | 7 -
dashboard/exports/progressspinner.d.ts | 1 -
dashboard/exports/progressspinner.js | 7 -
dashboard/exports/radiobutton.d.ts | 1 -
dashboard/exports/radiobutton.js | 7 -
dashboard/exports/rating.d.ts | 1 -
dashboard/exports/rating.js | 7 -
dashboard/exports/schedule.d.ts | 1 -
dashboard/exports/schedule.js | 7 -
dashboard/exports/scrollpanel.d.ts | 1 -
dashboard/exports/scrollpanel.js | 7 -
dashboard/exports/selectbutton.d.ts | 1 -
dashboard/exports/selectbutton.js | 7 -
dashboard/exports/shared.d.ts | 1 -
dashboard/exports/shared.js | 7 -
dashboard/exports/sidebar.d.ts | 1 -
dashboard/exports/sidebar.js | 7 -
dashboard/exports/slidemenu.d.ts | 1 -
dashboard/exports/slidemenu.js | 7 -
dashboard/exports/slider.d.ts | 1 -
dashboard/exports/slider.js | 7 -
dashboard/exports/spinner.d.ts | 1 -
dashboard/exports/spinner.js | 7 -
dashboard/exports/splitbutton.d.ts | 1 -
dashboard/exports/splitbutton.js | 7 -
dashboard/exports/steps.d.ts | 1 -
dashboard/exports/steps.js | 7 -
dashboard/exports/table.d.ts | 1 -
dashboard/exports/table.js | 7 -
dashboard/exports/tabmenu.d.ts | 1 -
dashboard/exports/tabmenu.js | 7 -
dashboard/exports/tabview.d.ts | 1 -
dashboard/exports/tabview.js | 7 -
dashboard/exports/terminal.d.ts | 1 -
dashboard/exports/terminal.js | 7 -
dashboard/exports/tieredmenu.d.ts | 1 -
dashboard/exports/tieredmenu.js | 7 -
dashboard/exports/togglebutton.d.ts | 1 -
dashboard/exports/togglebutton.js | 7 -
dashboard/exports/toolbar.d.ts | 1 -
dashboard/exports/toolbar.js | 7 -
dashboard/exports/tooltip.d.ts | 1 -
dashboard/exports/tooltip.js | 7 -
dashboard/exports/tree.d.ts | 1 -
dashboard/exports/tree.js | 7 -
dashboard/exports/treetable.d.ts | 1 -
dashboard/exports/treetable.js | 7 -
dashboard/exports/tristatecheckbox.d.ts | 1 -
dashboard/exports/tristatecheckbox.js | 7 -
dashboard/gulpfile.js | 62 -
dashboard/image_builder.sh | 41 -
dashboard/karma.conf.js | 39 -
dashboard/package-lock.json | 13057 ----------------
dashboard/package.json | 71 -
dashboard/protractor.conf.js | 28 -
dashboard/proxy.conf.json | 10 -
dashboard/src/app/app-routing.module.ts | 25 -
dashboard/src/app/app.component.html | 51 -
dashboard/src/app/app.component.ts | 445 -
dashboard/src/app/app.module.ts | 38 -
dashboard/src/app/app.service.ts | 18 -
.../src/app/business/block/block.component.ts | 51 -
dashboard/src/app/business/block/block.html | 14 -
.../src/app/business/block/block.module.ts | 28 -
.../create-volume-group.component.html | 3 -
.../create-volume-group.component.ts | 17 -
.../create-volume.component.html | 92 -
.../create-volume/create-volume.component.ts | 274 -
.../create-volume/create-volume.module.ts | 47 -
.../replication-group.component.html | 106 -
.../replication-group.component.ts | 111 -
.../replication-list.component.html | 71 -
.../replication-list.component.ts | 241 -
.../snapshot-list.component.html | 71 -
.../snapshot-list/snapshot-list.component.ts | 221 -
.../volume-detail.component.html | 64 -
.../volume-detail/volume-detail.component.ts | 65 -
.../volume-detail/volume-detail.module.ts | 48 -
.../volume-group-detail.component.html | 84 -
.../volume-group-detail.component.ts | 156 -
.../volume-group-detail.module.ts | 39 -
.../src/app/business/block/volume.service.ts | 192 -
.../business/block/volumeGroup.component.ts | 213 -
.../src/app/business/block/volumeGroup.html | 66 -
.../app/business/block/volumeGroup.module.ts | 23 -
.../business/block/volumeList.component.ts | 367 -
.../src/app/business/block/volumeList.html | 159 -
.../app/business/block/volumeList.module.ts | 39 -
.../cloud-service-item.component.html | 13 -
.../cloud-service-item.component.scss | 15 -
.../cloud-service-item.component.spec.ts | 0
.../cloud-service-item.component.ts | 22 -
.../app/business/cloud/cloud.component.html | 11 -
.../app/business/cloud/cloud.component.scss | 0
.../src/app/business/cloud/cloud.component.ts | 15 -
.../src/app/business/cloud/cloud.module.ts | 38 -
.../cloud/migration/migration.component.html | 3 -
.../cloud/migration/migration.component.scss | 0
.../cloud/migration/migration.component.ts | 15 -
.../cloud/registry/registry.component.html | 41 -
.../cloud/registry/registry.component.scss | 0
.../cloud/registry/registry.component.ts | 90 -
.../replication/replication.component.html | 29 -
.../replication/replication.component.scss | 0
.../replication/replication.component.ts | 15 -
.../src/app/business/home/home.component.html | 125 -
.../src/app/business/home/home.component.scss | 43 -
.../src/app/business/home/home.component.ts | 271 -
.../src/app/business/home/home.module.ts | 28 -
.../imgItem.component/imgItem.component.html | 10 -
.../imgItem.component/imgItem.component.scss | 13 -
.../imgItem.component/imgItem.component.ts | 21 -
.../business/identity/identity.component.ts | 48 -
.../src/app/business/identity/identity.html | 12 -
.../app/business/identity/identity.module.ts | 25 -
.../tenantDetail/tenantDetail.component.ts | 205 -
.../identity/tenantDetail/tenantDetail.html | 61 -
.../tenantDetail/tenantDetail.module.ts | 12 -
.../identity/tenantDetail/tenantDetail.scss | 15 -
.../business/identity/tenantList.component.ts | 248 -
.../src/app/business/identity/tenantList.html | 53 -
.../business/identity/tenantList.module.ts | 29 -
.../userDetail/userDetail.component.ts | 54 -
.../identity/userDetail/userDetail.html | 7 -
.../identity/userDetail/userDetail.module.ts | 12 -
.../identity/userDetail/userDetail.scss | 18 -
.../business/identity/userList.component.ts | 395 -
.../src/app/business/identity/userList.html | 81 -
.../app/business/identity/userList.module.ts | 33 -
.../createProfile.component.html | 185 -
.../createProfile/createProfile.component.ts | 482 -
.../createProfile/createProfile.module.ts | 43 -
.../modifyProfile.component.html | 50 -
.../modifyProfile/modifyProfile.component.ts | 152 -
.../modifyProfile/modifyProfile.module.ts | 35 -
.../business/profile/profile.component.html | 26 -
.../app/business/profile/profile.component.ts | 96 -
.../app/business/profile/profile.module.ts | 40 -
.../app/business/profile/profile.service.ts | 48 -
.../profileCard/profile-card.component.html | 33 -
.../profileCard/profile-card.component.ts | 156 -
.../suspension-frame.component.html | 9 -
.../suspension-frame.component.ts | 53 -
.../storage-pools-table.component.html | 41 -
.../storage-pools-table.component.ts | 75 -
.../storage-pools-table.module.ts | 26 -
.../resource/region/region.component.ts | 57 -
.../app/business/resource/region/region.html | 5 -
.../business/resource/region/region.module.ts | 18 -
.../business/resource/resource.component.ts | 49 -
.../src/app/business/resource/resource.html | 11 -
.../app/business/resource/resource.module.ts | 32 -
.../app/business/resource/resource.service.ts | 20 -
.../resource/storage/storage.component.ts | 83 -
.../business/resource/storage/storage.html | 19 -
.../resource/storage/storage.module.ts | 20 -
.../business/resource/zone/zone.component.ts | 67 -
.../src/app/business/resource/zone/zone.html | 6 -
.../app/business/resource/zone/zone.module.ts | 21 -
dashboard/src/app/business/scss-variable.scss | 75 -
.../business/service/service.component.html | 3 -
.../app/business/service/service.component.ts | 48 -
.../app/business/service/service.module.ts | 17 -
.../app/components/accordion/accordion.css | 44 -
.../components/accordion/accordion.spec.ts | 24 -
.../src/app/components/accordion/accordion.ts | 209 -
.../components/autocomplete/autocomplete.css | 163 -
.../autocomplete/autocomplete.spec.ts | 24 -
.../components/autocomplete/autocomplete.ts | 643 -
dashboard/src/app/components/badge/badge.scss | 117 -
dashboard/src/app/components/badge/badge.ts | 196 -
.../src/app/components/blockui/blockui.css | 11 -
.../app/components/blockui/blockui.spec.ts | 24 -
.../src/app/components/blockui/blockui.ts | 80 -
.../app/components/breadcrumb/breadcrumb.css | 21 -
.../components/breadcrumb/breadcrumb.spec.ts | 24 -
.../app/components/breadcrumb/breadcrumb.ts | 80 -
.../src/app/components/button/button.scss | 324 -
.../src/app/components/button/button.spec.ts | 24 -
dashboard/src/app/components/button/button.ts | 158 -
.../src/app/components/calendar/calendar.css | 236 -
.../app/components/calendar/calendar.spec.ts | 24 -
.../src/app/components/calendar/calendar.ts | 1777 ---
.../app/components/captcha/captcha.spec.ts | 24 -
.../src/app/components/captcha/captcha.ts | 92 -
dashboard/src/app/components/card/card.css | 50 -
.../src/app/components/card/card.spec.ts | 24 -
dashboard/src/app/components/card/card.ts | 53 -
.../src/app/components/carousel/carousel.css | 85 -
.../app/components/carousel/carousel.spec.ts | 24 -
.../src/app/components/carousel/carousel.ts | 327 -
.../src/app/components/chart/chart.spec.ts | 24 -
dashboard/src/app/components/chart/chart.ts | 112 -
.../src/app/components/checkbox/checkbox.css | 25 -
.../app/components/checkbox/checkbox.spec.ts | 33 -
.../src/app/components/checkbox/checkbox.ts | 157 -
dashboard/src/app/components/chips/chips.css | 59 -
.../src/app/components/chips/chips.spec.ts | 24 -
dashboard/src/app/components/chips/chips.ts | 227 -
.../codehighlighter/codehighlighter.spec.ts | 24 -
.../codehighlighter/codehighlighter.ts | 25 -
.../components/colorpicker/colorpicker.css | 87 -
.../colorpicker/colorpicker.spec.ts | 24 -
.../app/components/colorpicker/colorpicker.ts | 507 -
.../components/colorpicker/images/color.png | Bin 10355 -> 0 bytes
.../app/components/colorpicker/images/hue.png | Bin 293 -> 0 bytes
dashboard/src/app/components/common/I18N.ts | 12 -
dashboard/src/app/components/common/api.ts | 44 -
.../src/app/components/common/blockableui.ts | 3 -
.../src/app/components/common/common.scss | 193 -
.../src/app/components/common/confirmation.ts | 17 -
.../components/common/confirmationservice.ts | 23 -
.../app/components/common/filtermetadata.ts | 4 -
.../src/app/components/common/keys.pipe.ts | 8 -
.../app/components/common/lazyloadevent.ts | 12 -
.../src/app/components/common/menuitem.ts | 24 -
.../src/app/components/common/message.ts | 7 -
.../app/components/common/messageservice.ts | 28 -
.../src/app/components/common/selectitem.ts | 7 -
.../app/components/common/selectitemgroup.ts | 7 -
dashboard/src/app/components/common/shared.ts | 153 -
.../src/app/components/common/sortevent.ts | 9 -
.../src/app/components/common/sortmeta.ts | 4 -
.../components/common/treedragdropservice.ts | 23 -
.../src/app/components/common/treenode.ts | 17 -
.../components/common/treenodedragevent.ts | 9 -
.../confirmdialog/confirmdialog.spec.ts | 24 -
.../components/confirmdialog/confirmdialog.ts | 314 -
.../components/contextmenu/contextmenu.css | 44 -
.../contextmenu/contextmenu.spec.ts | 24 -
.../app/components/contextmenu/contextmenu.ts | 284 -
.../src/app/components/datagrid/datagrid.css | 34 -
.../app/components/datagrid/datagrid.spec.ts | 24 -
.../src/app/components/datagrid/datagrid.ts | 205 -
.../src/app/components/datalist/datalist.css | 39 -
.../app/components/datalist/datalist.spec.ts | 24 -
.../src/app/components/datalist/datalist.ts | 211 -
.../components/datascroller/datascroller.css | 28 -
.../datascroller/datascroller.spec.ts | 24 -
.../components/datascroller/datascroller.ts | 203 -
.../app/components/datatable/datatable.scss | 404 -
.../components/datatable/datatable.spec.ts | 24 -
.../src/app/components/datatable/datatable.ts | 2671 ----
.../src/app/components/dataview/dataview.css | 37 -
.../src/app/components/dataview/dataview.ts | 293 -
dashboard/src/app/components/defer/defer.ts | 66 -
.../src/app/components/dialog/dialog.scss | 165 -
.../src/app/components/dialog/dialog.spec.ts | 92 -
dashboard/src/app/components/dialog/dialog.ts | 593 -
.../src/app/components/dom/domhandler.ts | 468 -
.../app/components/dragdrop/dragdrop.spec.ts | 24 -
.../src/app/components/dragdrop/dragdrop.ts | 226 -
.../src/app/components/dropdown/dropdown.scss | 131 -
.../app/components/dropdown/dropdown.spec.ts | 24 -
.../src/app/components/dropdown/dropdown.ts | 761 -
.../src/app/components/dropmenu/dropmenu.scss | 145 -
.../src/app/components/dropmenu/dropmenu.ts | 266 -
.../src/app/components/editor/editor.spec.ts | 24 -
dashboard/src/app/components/editor/editor.ts | 193 -
.../src/app/components/fieldset/fieldset.css | 29 -
.../app/components/fieldset/fieldset.spec.ts | 59 -
.../src/app/components/fieldset/fieldset.ts | 113 -
.../app/components/fileupload/fileupload.css | 96 -
.../components/fileupload/fileupload.spec.ts | 24 -
.../app/components/fileupload/fileupload.ts | 459 -
dashboard/src/app/components/form/form.scss | 103 -
dashboard/src/app/components/form/form.ts | 136 -
.../src/app/components/galleria/galleria.css | 81 -
.../app/components/galleria/galleria.spec.ts | 24 -
.../src/app/components/galleria/galleria.ts | 246 -
.../src/app/components/gmap/gmap.spec.ts | 24 -
dashboard/src/app/components/gmap/gmap.ts | 165 -
dashboard/src/app/components/grid/grid.css | 774 -
dashboard/src/app/components/growl/growl.css | 54 -
.../src/app/components/growl/growl.spec.ts | 24 -
dashboard/src/app/components/growl/growl.ts | 218 -
.../src/app/components/inplace/inplace.css | 11 -
.../app/components/inplace/inplace.spec.ts | 24 -
.../src/app/components/inplace/inplace.ts | 71 -
.../components/inputmask/inputmask.spec.ts | 24 -
.../src/app/components/inputmask/inputmask.ts | 620 -
.../components/inputswitch/inputswitch.css | 58 -
.../inputswitch/inputswitch.spec.ts | 24 -
.../app/components/inputswitch/inputswitch.ts | 215 -
.../app/components/inputtext/inputtext.scss | 112 -
.../components/inputtext/inputtext.spec.ts | 24 -
.../src/app/components/inputtext/inputtext.ts | 42 -
.../inputtextarea/inputtextarea.css | 15 -
.../inputtextarea/inputtextarea.spec.ts | 24 -
.../components/inputtextarea/inputtextarea.ts | 94 -
.../components/keyfilter/keyfilter.spec.ts | 24 -
.../src/app/components/keyfilter/keyfilter.ts | 140 -
.../components/lightbox/images/loading.gif | Bin 9427 -> 0 bytes
.../src/app/components/lightbox/lightbox.css | 61 -
.../app/components/lightbox/lightbox.spec.ts | 24 -
.../src/app/components/lightbox/lightbox.ts | 231 -
.../src/app/components/listbox/listbox.css | 72 -
.../app/components/listbox/listbox.spec.ts | 24 -
.../src/app/components/listbox/listbox.ts | 416 -
.../src/app/components/megamenu/megamenu.css | 76 -
.../app/components/megamenu/megamenu.spec.ts | 24 -
.../src/app/components/megamenu/megamenu.ts | 183 -
dashboard/src/app/components/menu/menu.css | 34 -
.../src/app/components/menu/menu.spec.ts | 24 -
dashboard/src/app/components/menu/menu.ts | 188 -
.../src/app/components/menubar/menubar.css | 70 -
.../app/components/menubar/menubar.spec.ts | 24 -
.../src/app/components/menubar/menubar.ts | 219 -
.../src/app/components/message/message.css | 10 -
.../app/components/message/message.spec.ts | 24 -
.../src/app/components/message/message.ts | 59 -
.../src/app/components/messages/messages.css | 81 -
.../app/components/messages/messages.spec.ts | 24 -
.../src/app/components/messages/messages.ts | 125 -
dashboard/src/app/components/msgbox/msgbox.ts | 41 -
.../components/multiselect/multiselect.css | 149 -
.../multiselect/multiselect.spec.ts | 24 -
.../app/components/multiselect/multiselect.ts | 504 -
.../app/components/orderlist/orderlist.css | 118 -
.../components/orderlist/orderlist.spec.ts | 24 -
.../src/app/components/orderlist/orderlist.ts | 354 -
.../organizationchart/organizationchart.css | 46 -
.../organizationchart.spec.ts | 24 -
.../organizationchart/organizationchart.ts | 215 -
.../components/overlaypanel/overlaypanel.css | 18 -
.../overlaypanel/overlaypanel.spec.ts | 24 -
.../components/overlaypanel/overlaypanel.ts | 186 -
.../app/components/paginator/paginator.scss | 114 -
.../components/paginator/paginator.spec.ts | 24 -
.../src/app/components/paginator/paginator.ts | 231 -
dashboard/src/app/components/panel/panel.css | 33 -
.../src/app/components/panel/panel.spec.ts | 59 -
dashboard/src/app/components/panel/panel.ts | 122 -
.../app/components/panelmenu/panelmenu.css | 54 -
.../components/panelmenu/panelmenu.spec.ts | 24 -
.../src/app/components/panelmenu/panelmenu.ts | 164 -
.../password/images/password-meter.png | Bin 1565 -> 0 bytes
.../src/app/components/password/password.css | 20 -
.../app/components/password/password.spec.ts | 24 -
.../src/app/components/password/password.ts | 164 -
.../src/app/components/picklist/picklist.css | 202 -
.../app/components/picklist/picklist.spec.ts | 24 -
.../src/app/components/picklist/picklist.ts | 660 -
.../components/progressbar/progressbar.css | 110 -
.../progressbar/progressbar.spec.ts | 24 -
.../app/components/progressbar/progressbar.ts | 35 -
.../progressspinner/progressspinner.css | 71 -
.../progressspinner/progressspinner.spec.ts | 24 -
.../progressspinner/progressspinner.ts | 33 -
.../components/radiobutton/radiobutton.css | 33 -
.../radiobutton/radiobutton.spec.ts | 32 -
.../app/components/radiobutton/radiobutton.ts | 119 -
.../src/app/components/rating/rating.spec.ts | 24 -
dashboard/src/app/components/rating/rating.ts | 117 -
.../src/app/components/schedule/schedule.css | 3 -
.../app/components/schedule/schedule.spec.ts | 24 -
.../src/app/components/schedule/schedule.ts | 402 -
.../components/scrollpanel/scrollpanel.css | 54 -
.../scrollpanel/scrollpanel.spec.ts | 24 -
.../app/components/scrollpanel/scrollpanel.ts | 202 -
.../components/selectbutton/selectbutton.css | 19 -
.../selectbutton/selectbutton.spec.ts | 55 -
.../components/selectbutton/selectbutton.ts | 155 -
.../src/app/components/sidebar/sidebar.css | 117 -
.../app/components/sidebar/sidebar.spec.ts | 24 -
.../src/app/components/sidebar/sidebar.ts | 188 -
.../app/components/slidemenu/slidemenu.css | 86 -
.../components/slidemenu/slidemenu.spec.ts | 24 -
.../src/app/components/slidemenu/slidemenu.ts | 228 -
.../src/app/components/slider/slider.css | 65 -
.../src/app/components/slider/slider.spec.ts | 24 -
dashboard/src/app/components/slider/slider.ts | 369 -
.../src/app/components/spinner/spinner.css | 72 -
.../app/components/spinner/spinner.spec.ts | 67 -
.../src/app/components/spinner/spinner.ts | 316 -
.../components/splitbutton/splitbutton.css | 29 -
.../splitbutton/splitbutton.spec.ts | 24 -
.../app/components/splitbutton/splitbutton.ts | 194 -
dashboard/src/app/components/steps/steps.css | 49 -
.../src/app/components/steps/steps.spec.ts | 24 -
dashboard/src/app/components/steps/steps.ts | 69 -
dashboard/src/app/components/table/table.css | 224 -
dashboard/src/app/components/table/table.ts | 2889 ----
.../src/app/components/tabmenu/tabmenu.css | 35 -
.../app/components/tabmenu/tabmenu.spec.ts | 24 -
.../src/app/components/tabmenu/tabmenu.ts | 71 -
.../src/app/components/tabview/tabview.scss | 143 -
.../app/components/tabview/tabview.spec.ts | 24 -
.../src/app/components/tabview/tabview.ts | 310 -
.../src/app/components/terminal/terminal.css | 25 -
.../app/components/terminal/terminal.spec.ts | 24 -
.../src/app/components/terminal/terminal.ts | 99 -
.../components/terminal/terminalservice.ts | 25 -
.../app/components/tieredmenu/tieredmenu.css | 49 -
.../components/tieredmenu/tieredmenu.spec.ts | 24 -
.../app/components/tieredmenu/tieredmenu.ts | 217 -
.../togglebutton/togglebutton.spec.ts | 47 -
.../components/togglebutton/togglebutton.ts | 122 -
.../src/app/components/toolbar/toolbar.css | 11 -
.../app/components/toolbar/toolbar.spec.ts | 24 -
.../src/app/components/toolbar/toolbar.ts | 32 -
.../src/app/components/tooltip/tooltip.css | 67 -
.../app/components/tooltip/tooltip.spec.ts | 24 -
.../src/app/components/tooltip/tooltip.ts | 388 -
.../src/app/components/tree/images/line.gif | Bin 13112 -> 0 bytes
dashboard/src/app/components/tree/tree.css | 186 -
.../src/app/components/tree/tree.spec.ts | 24 -
dashboard/src/app/components/tree/tree.ts | 779 -
.../app/components/treetable/treetable.css | 134 -
.../components/treetable/treetable.spec.ts | 24 -
.../src/app/components/treetable/treetable.ts | 449 -
.../tristatecheckbox/tristatecheckbox.spec.ts | 24 -
.../tristatecheckbox/tristatecheckbox.ts | 125 -
.../app/components/utils/objectutils.spec.ts | 114 -
.../src/app/components/utils/objectutils.ts | 164 -
dashboard/src/app/i18n/en/exception.json | 4 -
dashboard/src/app/i18n/en/keyID.json | 117 -
dashboard/src/app/i18n/en/widgetsKeyID.json | 15 -
dashboard/src/app/i18n/zh/exception.json | 4 -
dashboard/src/app/i18n/zh/keyID.json | 117 -
dashboard/src/app/i18n/zh/widgetsKeyID.json | 15 -
dashboard/src/app/shared/api.ts | 7 -
.../app/shared/service/Exception.service.ts | 49 -
.../src/app/shared/service/Http.service.ts | 103 -
.../src/app/shared/service/I18N.service.ts | 52 -
.../src/app/shared/service/MsgBox.service.ts | 91 -
.../app/shared/service/ParamStor.service.ts | 59 -
dashboard/src/app/shared/service/api.ts | 47 -
dashboard/src/app/shared/shared.config.ts | 93 -
dashboard/src/app/shared/shared.module.ts | 46 -
dashboard/src/app/shared/utils/consts.ts | 29 -
dashboard/src/app/shared/utils/mask.ts | 35 -
dashboard/src/app/shared/utils/utils.ts | 146 -
dashboard/src/assets/.gitkeep | 0
.../src/assets/business/css/primeng.scss | 69 -
dashboard/src/assets/business/css/site.scss | 1563 --
.../src/assets/business/favicon/favicon.ico | Bin 1150 -> 0 bytes
.../fonts/roboto-v15-latin-regular.eot | Bin 16227 -> 0 bytes
.../fonts/roboto-v15-latin-regular.svg | 308 -
.../fonts/roboto-v15-latin-regular.ttf | Bin 32652 -> 0 bytes
.../fonts/roboto-v15-latin-regular.woff | Bin 18520 -> 0 bytes
.../fonts/roboto-v15-latin-regular.woff2 | Bin 14584 -> 0 bytes
.../business/images/cloud_service/AWS S3.png | Bin 10197 -> 0 bytes
.../images/cloud_service/Huawei OBS.png | Bin 12423 -> 0 bytes
.../Microsoft Azure Blob Storage.png | Bin 6611 -> 0 bytes
.../business/images/cloud_service/u2309.png | Bin 8761 -> 0 bytes
.../images/home_admin/Block Storages.png | Bin 941 -> 0 bytes
.../home_admin/Cross-Region Migrations.png | Bin 1408 -> 0 bytes
.../home_admin/Cross-Region Replications.png | Bin 1566 -> 0 bytes
.../images/home_admin/Storage Pools.png | Bin 719 -> 0 bytes
.../business/images/home_admin/Tenants.png | Bin 1495 -> 0 bytes
.../business/images/home_admin/Users.png | Bin 1322 -> 0 bytes
.../images/home_admin/Volume Replications.png | Bin 2182 -> 0 bytes
.../images/home_admin/Volume Snapshots.png | Bin 1658 -> 0 bytes
.../business/images/home_admin/Volumes.png | Bin 1635 -> 0 bytes
.../business/images/home_admin/u199.png | Bin 23145 -> 0 bytes
.../business/images/home_admin/u236.png | Bin 152 -> 0 bytes
.../business/images/icons/button-active.svg | 41 -
.../assets/business/images/icons/button.svg | 41 -
.../business/images/icons/charts-active.svg | 13 -
.../assets/business/images/icons/charts.svg | 13 -
.../business/images/icons/data-active.svg | 15 -
.../src/assets/business/images/icons/data.svg | 15 -
.../business/images/icons/dragdrop-active.svg | 132 -
.../assets/business/images/icons/dragdrop.svg | 132 -
.../business/images/icons/file-active.svg | 15 -
.../src/assets/business/images/icons/file.svg | 15 -
.../business/images/icons/input-active.svg | 34 -
.../assets/business/images/icons/input.svg | 34 -
.../business/images/icons/menu-active.svg | 29 -
.../src/assets/business/images/icons/menu.svg | 29 -
.../business/images/icons/message-active.svg | 15 -
.../assets/business/images/icons/message.svg | 15 -
.../business/images/icons/misc-active.svg | 20 -
.../src/assets/business/images/icons/misc.svg | 20 -
.../images/icons/multimedia-active.svg | 20 -
.../business/images/icons/multimedia.svg | 20 -
.../business/images/icons/overlay-active.svg | 17 -
.../assets/business/images/icons/overlay.svg | 17 -
.../business/images/icons/panel-active.svg | 12 -
.../assets/business/images/icons/panel.svg | 12 -
.../src/assets/business/images/login-bg.png | Bin 66797 -> 0 bytes
.../src/assets/business/images/logo-white.png | Bin 4809 -> 0 bytes
dashboard/src/assets/business/images/logo.png | Bin 7009 -> 0 bytes
.../src/assets/business/images/menu-bg.png | Bin 6787 -> 0 bytes
.../assets/business/images/profile/u1065.png | Bin 513 -> 0 bytes
.../assets/business/images/profile/u1985.png | Bin 584 -> 0 bytes
.../assets/business/images/profile/u2861.png | Bin 304 -> 0 bytes
.../assets/business/images/profile/u2987.png | Bin 572 -> 0 bytes
.../assets/business/images/volume/u436.png | Bin 511 -> 0 bytes
.../assets/business/images/volume/u583.png | Bin 2241 -> 0 bytes
.../assets/business/images/volume/u585.png | Bin 2472 -> 0 bytes
.../business/images/volume/u740p000.png | Bin 237 -> 0 bytes
.../business/images/volume/u740p002.png | Bin 348 -> 0 bytes
.../business/images/volume/u760p000.png | Bin 211 -> 0 bytes
.../assets/business/images/volume/u937.png | Bin 1794 -> 0 bytes
.../src/assets/components/images/line.gif | Bin 13112 -> 0 bytes
.../src/assets/components/images/loading.gif | Bin 9427 -> 0 bytes
.../components/images/password-meter.png | Bin 1565 -> 0 bytes
.../src/assets/components/themes/_theme.scss | 712 -
.../components/themes/default/default.scss | 926 --
.../fonts/roboto-v15-latin-regular.eot | Bin 16227 -> 0 bytes
.../fonts/roboto-v15-latin-regular.svg | 308 -
.../fonts/roboto-v15-latin-regular.ttf | Bin 32652 -> 0 bytes
.../fonts/roboto-v15-latin-regular.woff | Bin 18520 -> 0 bytes
.../fonts/roboto-v15-latin-regular.woff2 | Bin 14584 -> 0 bytes
.../themes/default/images/icons_16.png | Bin 4020 -> 0 bytes
.../themes/default/images/slider_handles.png | Bin 1945 -> 0 bytes
.../default/images/slider_handles@2x.png | Bin 3603 -> 0 bytes
.../images/ui-bg_flat_0_aaaaaa_40x100.png | Bin 180 -> 0 bytes
.../images/ui-bg_flat_75_ffffff_40x100.png | Bin 178 -> 0 bytes
.../images/ui-bg_glass_55_fbf9ee_1x400.png | Bin 120 -> 0 bytes
.../images/ui-bg_glass_65_ffffff_1x400.png | Bin 105 -> 0 bytes
.../images/ui-bg_glass_75_dadada_1x400.png | Bin 111 -> 0 bytes
.../images/ui-bg_glass_75_e6e6e6_1x400.png | Bin 110 -> 0 bytes
.../images/ui-bg_glass_95_fef1ec_1x400.png | Bin 119 -> 0 bytes
.../ui-bg_highlight-soft_75_cccccc_1x100.png | Bin 101 -> 0 bytes
.../images/ui-icons_222222_256x240.png | Bin 4369 -> 0 bytes
.../images/ui-icons_2e83ff_256x240.png | Bin 5355 -> 0 bytes
.../images/ui-icons_454545_256x240.png | Bin 4369 -> 0 bytes
.../images/ui-icons_cd0a0a_256x240.png | Bin 4369 -> 0 bytes
.../images/ui-icons_ffffff_256x240.png | Bin 4369 -> 0 bytes
.../src/environments/environment.prod.ts | 3 -
dashboard/src/environments/environment.ts | 8 -
dashboard/src/index.html | 17 -
dashboard/src/main.ts | 11 -
dashboard/src/polyfills.ts | 73 -
dashboard/src/styles.scss | 3 -
dashboard/src/test.ts | 32 -
dashboard/src/tsconfig.app.json | 13 -
dashboard/src/tsconfig.spec.json | 20 -
dashboard/src/typings.d.ts | 8 -
dashboard/src/upload.php | 1 -
dashboard/tsconfig-aot.json | 24 -
dashboard/tsconfig-release.json | 24 -
dashboard/tsconfig.json | 20 -
dashboard/tslint.json | 142 -
664 files changed, 1 insertion(+), 63395 deletions(-)
delete mode 100644 dashboard/.angular-cli.json
delete mode 100644 dashboard/.editorconfig
delete mode 100644 dashboard/.gitignore
delete mode 100644 dashboard/.npmignore
delete mode 100644 dashboard/.travis.yml
delete mode 100644 dashboard/Dockerfile
delete mode 100644 dashboard/LICENSE.md
delete mode 100644 dashboard/Makefile
delete mode 100644 dashboard/README.md
delete mode 100644 dashboard/e2e/accordion.e2e-spec.ts
delete mode 100644 dashboard/e2e/app.e2e-spec.ts
delete mode 100644 dashboard/e2e/app.po.ts
delete mode 100644 dashboard/e2e/fieldset.e2e-spec.ts
delete mode 100644 dashboard/e2e/inputtext.e2e-spec.ts
delete mode 100644 dashboard/e2e/panel.e2e-spec.ts
delete mode 100644 dashboard/e2e/tabview.e2e-spec.ts
delete mode 100644 dashboard/e2e/tsconfig.e2e.json
delete mode 100644 dashboard/exports/accordion.d.ts
delete mode 100644 dashboard/exports/accordion.js
delete mode 100644 dashboard/exports/api.d.ts
delete mode 100644 dashboard/exports/api.js
delete mode 100644 dashboard/exports/autocomplete.d.ts
delete mode 100644 dashboard/exports/autocomplete.js
delete mode 100644 dashboard/exports/blockui.d.ts
delete mode 100644 dashboard/exports/blockui.js
delete mode 100644 dashboard/exports/breadcrumb.d.ts
delete mode 100644 dashboard/exports/breadcrumb.js
delete mode 100644 dashboard/exports/button.d.ts
delete mode 100644 dashboard/exports/button.js
delete mode 100644 dashboard/exports/calendar.d.ts
delete mode 100644 dashboard/exports/calendar.js
delete mode 100644 dashboard/exports/captcha.d.ts
delete mode 100644 dashboard/exports/captcha.js
delete mode 100644 dashboard/exports/card.d.ts
delete mode 100644 dashboard/exports/card.js
delete mode 100644 dashboard/exports/carousel.d.ts
delete mode 100644 dashboard/exports/carousel.js
delete mode 100644 dashboard/exports/chart.d.ts
delete mode 100644 dashboard/exports/chart.js
delete mode 100644 dashboard/exports/checkbox.d.ts
delete mode 100644 dashboard/exports/checkbox.js
delete mode 100644 dashboard/exports/chips.d.ts
delete mode 100644 dashboard/exports/chips.js
delete mode 100644 dashboard/exports/codehighlighter.d.ts
delete mode 100644 dashboard/exports/codehighlighter.js
delete mode 100644 dashboard/exports/colorpicker.d.ts
delete mode 100644 dashboard/exports/colorpicker.js
delete mode 100644 dashboard/exports/confirmdialog.d.ts
delete mode 100644 dashboard/exports/confirmdialog.js
delete mode 100644 dashboard/exports/contextmenu.d.ts
delete mode 100644 dashboard/exports/contextmenu.js
delete mode 100644 dashboard/exports/datagrid.d.ts
delete mode 100644 dashboard/exports/datagrid.js
delete mode 100644 dashboard/exports/datalist.d.ts
delete mode 100644 dashboard/exports/datalist.js
delete mode 100644 dashboard/exports/datascroller.d.ts
delete mode 100644 dashboard/exports/datascroller.js
delete mode 100644 dashboard/exports/datatable.d.ts
delete mode 100644 dashboard/exports/datatable.js
delete mode 100644 dashboard/exports/dataview.d.ts
delete mode 100644 dashboard/exports/dataview.js
delete mode 100644 dashboard/exports/defer.d.ts
delete mode 100644 dashboard/exports/defer.js
delete mode 100644 dashboard/exports/dialog.d.ts
delete mode 100644 dashboard/exports/dialog.js
delete mode 100644 dashboard/exports/dragdrop.d.ts
delete mode 100644 dashboard/exports/dragdrop.js
delete mode 100644 dashboard/exports/dropdown.d.ts
delete mode 100644 dashboard/exports/dropdown.js
delete mode 100644 dashboard/exports/editor.d.ts
delete mode 100644 dashboard/exports/editor.js
delete mode 100644 dashboard/exports/fieldset.d.ts
delete mode 100644 dashboard/exports/fieldset.js
delete mode 100644 dashboard/exports/fileupload.d.ts
delete mode 100644 dashboard/exports/fileupload.js
delete mode 100644 dashboard/exports/galleria.d.ts
delete mode 100644 dashboard/exports/galleria.js
delete mode 100644 dashboard/exports/gmap.d.ts
delete mode 100644 dashboard/exports/gmap.js
delete mode 100644 dashboard/exports/growl.d.ts
delete mode 100644 dashboard/exports/growl.js
delete mode 100644 dashboard/exports/inplace.d.ts
delete mode 100644 dashboard/exports/inplace.js
delete mode 100644 dashboard/exports/inputmask.d.ts
delete mode 100644 dashboard/exports/inputmask.js
delete mode 100644 dashboard/exports/inputswitch.d.ts
delete mode 100644 dashboard/exports/inputswitch.js
delete mode 100644 dashboard/exports/inputtext.d.ts
delete mode 100644 dashboard/exports/inputtext.js
delete mode 100644 dashboard/exports/inputtextarea.d.ts
delete mode 100644 dashboard/exports/inputtextarea.js
delete mode 100644 dashboard/exports/keyfilter.d.ts
delete mode 100644 dashboard/exports/keyfilter.js
delete mode 100644 dashboard/exports/lightbox.d.ts
delete mode 100644 dashboard/exports/lightbox.js
delete mode 100644 dashboard/exports/listbox.d.ts
delete mode 100644 dashboard/exports/listbox.js
delete mode 100644 dashboard/exports/megamenu.d.ts
delete mode 100644 dashboard/exports/megamenu.js
delete mode 100644 dashboard/exports/menu.d.ts
delete mode 100644 dashboard/exports/menu.js
delete mode 100644 dashboard/exports/menubar.d.ts
delete mode 100644 dashboard/exports/menubar.js
delete mode 100644 dashboard/exports/message.d.ts
delete mode 100644 dashboard/exports/message.js
delete mode 100644 dashboard/exports/messages.d.ts
delete mode 100644 dashboard/exports/messages.js
delete mode 100644 dashboard/exports/multiselect.d.ts
delete mode 100644 dashboard/exports/multiselect.js
delete mode 100644 dashboard/exports/orderlist.d.ts
delete mode 100644 dashboard/exports/orderlist.js
delete mode 100644 dashboard/exports/organizationchart.d.ts
delete mode 100644 dashboard/exports/organizationchart.js
delete mode 100644 dashboard/exports/overlaypanel.d.ts
delete mode 100644 dashboard/exports/overlaypanel.js
delete mode 100644 dashboard/exports/paginator.d.ts
delete mode 100644 dashboard/exports/paginator.js
delete mode 100644 dashboard/exports/panel.d.ts
delete mode 100644 dashboard/exports/panel.js
delete mode 100644 dashboard/exports/panelmenu.d.ts
delete mode 100644 dashboard/exports/panelmenu.js
delete mode 100644 dashboard/exports/password.d.ts
delete mode 100644 dashboard/exports/password.js
delete mode 100644 dashboard/exports/picklist.d.ts
delete mode 100644 dashboard/exports/picklist.js
delete mode 100644 dashboard/exports/progressbar.d.ts
delete mode 100644 dashboard/exports/progressbar.js
delete mode 100644 dashboard/exports/progressspinner.d.ts
delete mode 100644 dashboard/exports/progressspinner.js
delete mode 100644 dashboard/exports/radiobutton.d.ts
delete mode 100644 dashboard/exports/radiobutton.js
delete mode 100644 dashboard/exports/rating.d.ts
delete mode 100644 dashboard/exports/rating.js
delete mode 100644 dashboard/exports/schedule.d.ts
delete mode 100644 dashboard/exports/schedule.js
delete mode 100644 dashboard/exports/scrollpanel.d.ts
delete mode 100644 dashboard/exports/scrollpanel.js
delete mode 100644 dashboard/exports/selectbutton.d.ts
delete mode 100644 dashboard/exports/selectbutton.js
delete mode 100644 dashboard/exports/shared.d.ts
delete mode 100644 dashboard/exports/shared.js
delete mode 100644 dashboard/exports/sidebar.d.ts
delete mode 100644 dashboard/exports/sidebar.js
delete mode 100644 dashboard/exports/slidemenu.d.ts
delete mode 100644 dashboard/exports/slidemenu.js
delete mode 100644 dashboard/exports/slider.d.ts
delete mode 100644 dashboard/exports/slider.js
delete mode 100644 dashboard/exports/spinner.d.ts
delete mode 100644 dashboard/exports/spinner.js
delete mode 100644 dashboard/exports/splitbutton.d.ts
delete mode 100644 dashboard/exports/splitbutton.js
delete mode 100644 dashboard/exports/steps.d.ts
delete mode 100644 dashboard/exports/steps.js
delete mode 100644 dashboard/exports/table.d.ts
delete mode 100644 dashboard/exports/table.js
delete mode 100644 dashboard/exports/tabmenu.d.ts
delete mode 100644 dashboard/exports/tabmenu.js
delete mode 100644 dashboard/exports/tabview.d.ts
delete mode 100644 dashboard/exports/tabview.js
delete mode 100644 dashboard/exports/terminal.d.ts
delete mode 100644 dashboard/exports/terminal.js
delete mode 100644 dashboard/exports/tieredmenu.d.ts
delete mode 100644 dashboard/exports/tieredmenu.js
delete mode 100644 dashboard/exports/togglebutton.d.ts
delete mode 100644 dashboard/exports/togglebutton.js
delete mode 100644 dashboard/exports/toolbar.d.ts
delete mode 100644 dashboard/exports/toolbar.js
delete mode 100644 dashboard/exports/tooltip.d.ts
delete mode 100644 dashboard/exports/tooltip.js
delete mode 100644 dashboard/exports/tree.d.ts
delete mode 100644 dashboard/exports/tree.js
delete mode 100644 dashboard/exports/treetable.d.ts
delete mode 100644 dashboard/exports/treetable.js
delete mode 100644 dashboard/exports/tristatecheckbox.d.ts
delete mode 100644 dashboard/exports/tristatecheckbox.js
delete mode 100644 dashboard/gulpfile.js
delete mode 100644 dashboard/image_builder.sh
delete mode 100644 dashboard/karma.conf.js
delete mode 100644 dashboard/package-lock.json
delete mode 100644 dashboard/package.json
delete mode 100644 dashboard/protractor.conf.js
delete mode 100644 dashboard/proxy.conf.json
delete mode 100644 dashboard/src/app/app-routing.module.ts
delete mode 100644 dashboard/src/app/app.component.html
delete mode 100644 dashboard/src/app/app.component.ts
delete mode 100644 dashboard/src/app/app.module.ts
delete mode 100644 dashboard/src/app/app.service.ts
delete mode 100644 dashboard/src/app/business/block/block.component.ts
delete mode 100644 dashboard/src/app/business/block/block.html
delete mode 100644 dashboard/src/app/business/block/block.module.ts
delete mode 100644 dashboard/src/app/business/block/create-volume-group/create-volume-group.component.html
delete mode 100644 dashboard/src/app/business/block/create-volume-group/create-volume-group.component.ts
delete mode 100644 dashboard/src/app/business/block/create-volume/create-volume.component.html
delete mode 100644 dashboard/src/app/business/block/create-volume/create-volume.component.ts
delete mode 100644 dashboard/src/app/business/block/create-volume/create-volume.module.ts
delete mode 100644 dashboard/src/app/business/block/create-volume/replication-group/replication-group.component.html
delete mode 100644 dashboard/src/app/business/block/create-volume/replication-group/replication-group.component.ts
delete mode 100644 dashboard/src/app/business/block/volume-detail/replication-list/replication-list.component.html
delete mode 100644 dashboard/src/app/business/block/volume-detail/replication-list/replication-list.component.ts
delete mode 100644 dashboard/src/app/business/block/volume-detail/snapshot-list/snapshot-list.component.html
delete mode 100644 dashboard/src/app/business/block/volume-detail/snapshot-list/snapshot-list.component.ts
delete mode 100644 dashboard/src/app/business/block/volume-detail/volume-detail.component.html
delete mode 100644 dashboard/src/app/business/block/volume-detail/volume-detail.component.ts
delete mode 100644 dashboard/src/app/business/block/volume-detail/volume-detail.module.ts
delete mode 100644 dashboard/src/app/business/block/volume-group-detail/volume-group-detail.component.html
delete mode 100644 dashboard/src/app/business/block/volume-group-detail/volume-group-detail.component.ts
delete mode 100644 dashboard/src/app/business/block/volume-group-detail/volume-group-detail.module.ts
delete mode 100644 dashboard/src/app/business/block/volume.service.ts
delete mode 100644 dashboard/src/app/business/block/volumeGroup.component.ts
delete mode 100644 dashboard/src/app/business/block/volumeGroup.html
delete mode 100644 dashboard/src/app/business/block/volumeGroup.module.ts
delete mode 100644 dashboard/src/app/business/block/volumeList.component.ts
delete mode 100644 dashboard/src/app/business/block/volumeList.html
delete mode 100644 dashboard/src/app/business/block/volumeList.module.ts
delete mode 100644 dashboard/src/app/business/cloud/cloud-service-item/cloud-service-item.component.html
delete mode 100644 dashboard/src/app/business/cloud/cloud-service-item/cloud-service-item.component.scss
delete mode 100644 dashboard/src/app/business/cloud/cloud-service-item/cloud-service-item.component.spec.ts
delete mode 100644 dashboard/src/app/business/cloud/cloud-service-item/cloud-service-item.component.ts
delete mode 100644 dashboard/src/app/business/cloud/cloud.component.html
delete mode 100644 dashboard/src/app/business/cloud/cloud.component.scss
delete mode 100644 dashboard/src/app/business/cloud/cloud.component.ts
delete mode 100644 dashboard/src/app/business/cloud/cloud.module.ts
delete mode 100644 dashboard/src/app/business/cloud/migration/migration.component.html
delete mode 100644 dashboard/src/app/business/cloud/migration/migration.component.scss
delete mode 100644 dashboard/src/app/business/cloud/migration/migration.component.ts
delete mode 100644 dashboard/src/app/business/cloud/registry/registry.component.html
delete mode 100644 dashboard/src/app/business/cloud/registry/registry.component.scss
delete mode 100644 dashboard/src/app/business/cloud/registry/registry.component.ts
delete mode 100644 dashboard/src/app/business/cloud/replication/replication.component.html
delete mode 100644 dashboard/src/app/business/cloud/replication/replication.component.scss
delete mode 100644 dashboard/src/app/business/cloud/replication/replication.component.ts
delete mode 100644 dashboard/src/app/business/home/home.component.html
delete mode 100644 dashboard/src/app/business/home/home.component.scss
delete mode 100644 dashboard/src/app/business/home/home.component.ts
delete mode 100644 dashboard/src/app/business/home/home.module.ts
delete mode 100644 dashboard/src/app/business/home/imgItem.component/imgItem.component.html
delete mode 100644 dashboard/src/app/business/home/imgItem.component/imgItem.component.scss
delete mode 100644 dashboard/src/app/business/home/imgItem.component/imgItem.component.ts
delete mode 100644 dashboard/src/app/business/identity/identity.component.ts
delete mode 100644 dashboard/src/app/business/identity/identity.html
delete mode 100644 dashboard/src/app/business/identity/identity.module.ts
delete mode 100644 dashboard/src/app/business/identity/tenantDetail/tenantDetail.component.ts
delete mode 100644 dashboard/src/app/business/identity/tenantDetail/tenantDetail.html
delete mode 100644 dashboard/src/app/business/identity/tenantDetail/tenantDetail.module.ts
delete mode 100644 dashboard/src/app/business/identity/tenantDetail/tenantDetail.scss
delete mode 100644 dashboard/src/app/business/identity/tenantList.component.ts
delete mode 100644 dashboard/src/app/business/identity/tenantList.html
delete mode 100644 dashboard/src/app/business/identity/tenantList.module.ts
delete mode 100644 dashboard/src/app/business/identity/userDetail/userDetail.component.ts
delete mode 100644 dashboard/src/app/business/identity/userDetail/userDetail.html
delete mode 100644 dashboard/src/app/business/identity/userDetail/userDetail.module.ts
delete mode 100644 dashboard/src/app/business/identity/userDetail/userDetail.scss
delete mode 100644 dashboard/src/app/business/identity/userList.component.ts
delete mode 100644 dashboard/src/app/business/identity/userList.html
delete mode 100644 dashboard/src/app/business/identity/userList.module.ts
delete mode 100644 dashboard/src/app/business/profile/createProfile/createProfile.component.html
delete mode 100644 dashboard/src/app/business/profile/createProfile/createProfile.component.ts
delete mode 100644 dashboard/src/app/business/profile/createProfile/createProfile.module.ts
delete mode 100644 dashboard/src/app/business/profile/modifyProfile/modifyProfile.component.html
delete mode 100644 dashboard/src/app/business/profile/modifyProfile/modifyProfile.component.ts
delete mode 100644 dashboard/src/app/business/profile/modifyProfile/modifyProfile.module.ts
delete mode 100644 dashboard/src/app/business/profile/profile.component.html
delete mode 100644 dashboard/src/app/business/profile/profile.component.ts
delete mode 100644 dashboard/src/app/business/profile/profile.module.ts
delete mode 100644 dashboard/src/app/business/profile/profile.service.ts
delete mode 100644 dashboard/src/app/business/profile/profileCard/profile-card.component.html
delete mode 100644 dashboard/src/app/business/profile/profileCard/profile-card.component.ts
delete mode 100644 dashboard/src/app/business/profile/profileCard/suspension-frame/suspension-frame.component.html
delete mode 100644 dashboard/src/app/business/profile/profileCard/suspension-frame/suspension-frame.component.ts
delete mode 100644 dashboard/src/app/business/profile/storage-pools-table/storage-pools-table.component.html
delete mode 100644 dashboard/src/app/business/profile/storage-pools-table/storage-pools-table.component.ts
delete mode 100644 dashboard/src/app/business/profile/storage-pools-table/storage-pools-table.module.ts
delete mode 100644 dashboard/src/app/business/resource/region/region.component.ts
delete mode 100644 dashboard/src/app/business/resource/region/region.html
delete mode 100644 dashboard/src/app/business/resource/region/region.module.ts
delete mode 100644 dashboard/src/app/business/resource/resource.component.ts
delete mode 100644 dashboard/src/app/business/resource/resource.html
delete mode 100644 dashboard/src/app/business/resource/resource.module.ts
delete mode 100644 dashboard/src/app/business/resource/resource.service.ts
delete mode 100644 dashboard/src/app/business/resource/storage/storage.component.ts
delete mode 100644 dashboard/src/app/business/resource/storage/storage.html
delete mode 100644 dashboard/src/app/business/resource/storage/storage.module.ts
delete mode 100644 dashboard/src/app/business/resource/zone/zone.component.ts
delete mode 100644 dashboard/src/app/business/resource/zone/zone.html
delete mode 100644 dashboard/src/app/business/resource/zone/zone.module.ts
delete mode 100644 dashboard/src/app/business/scss-variable.scss
delete mode 100644 dashboard/src/app/business/service/service.component.html
delete mode 100644 dashboard/src/app/business/service/service.component.ts
delete mode 100644 dashboard/src/app/business/service/service.module.ts
delete mode 100644 dashboard/src/app/components/accordion/accordion.css
delete mode 100644 dashboard/src/app/components/accordion/accordion.spec.ts
delete mode 100644 dashboard/src/app/components/accordion/accordion.ts
delete mode 100644 dashboard/src/app/components/autocomplete/autocomplete.css
delete mode 100644 dashboard/src/app/components/autocomplete/autocomplete.spec.ts
delete mode 100644 dashboard/src/app/components/autocomplete/autocomplete.ts
delete mode 100644 dashboard/src/app/components/badge/badge.scss
delete mode 100644 dashboard/src/app/components/badge/badge.ts
delete mode 100644 dashboard/src/app/components/blockui/blockui.css
delete mode 100644 dashboard/src/app/components/blockui/blockui.spec.ts
delete mode 100644 dashboard/src/app/components/blockui/blockui.ts
delete mode 100644 dashboard/src/app/components/breadcrumb/breadcrumb.css
delete mode 100644 dashboard/src/app/components/breadcrumb/breadcrumb.spec.ts
delete mode 100644 dashboard/src/app/components/breadcrumb/breadcrumb.ts
delete mode 100644 dashboard/src/app/components/button/button.scss
delete mode 100644 dashboard/src/app/components/button/button.spec.ts
delete mode 100644 dashboard/src/app/components/button/button.ts
delete mode 100644 dashboard/src/app/components/calendar/calendar.css
delete mode 100644 dashboard/src/app/components/calendar/calendar.spec.ts
delete mode 100644 dashboard/src/app/components/calendar/calendar.ts
delete mode 100644 dashboard/src/app/components/captcha/captcha.spec.ts
delete mode 100644 dashboard/src/app/components/captcha/captcha.ts
delete mode 100644 dashboard/src/app/components/card/card.css
delete mode 100644 dashboard/src/app/components/card/card.spec.ts
delete mode 100644 dashboard/src/app/components/card/card.ts
delete mode 100644 dashboard/src/app/components/carousel/carousel.css
delete mode 100644 dashboard/src/app/components/carousel/carousel.spec.ts
delete mode 100644 dashboard/src/app/components/carousel/carousel.ts
delete mode 100644 dashboard/src/app/components/chart/chart.spec.ts
delete mode 100644 dashboard/src/app/components/chart/chart.ts
delete mode 100644 dashboard/src/app/components/checkbox/checkbox.css
delete mode 100644 dashboard/src/app/components/checkbox/checkbox.spec.ts
delete mode 100644 dashboard/src/app/components/checkbox/checkbox.ts
delete mode 100644 dashboard/src/app/components/chips/chips.css
delete mode 100644 dashboard/src/app/components/chips/chips.spec.ts
delete mode 100644 dashboard/src/app/components/chips/chips.ts
delete mode 100644 dashboard/src/app/components/codehighlighter/codehighlighter.spec.ts
delete mode 100644 dashboard/src/app/components/codehighlighter/codehighlighter.ts
delete mode 100644 dashboard/src/app/components/colorpicker/colorpicker.css
delete mode 100644 dashboard/src/app/components/colorpicker/colorpicker.spec.ts
delete mode 100644 dashboard/src/app/components/colorpicker/colorpicker.ts
delete mode 100644 dashboard/src/app/components/colorpicker/images/color.png
delete mode 100644 dashboard/src/app/components/colorpicker/images/hue.png
delete mode 100644 dashboard/src/app/components/common/I18N.ts
delete mode 100644 dashboard/src/app/components/common/api.ts
delete mode 100644 dashboard/src/app/components/common/blockableui.ts
delete mode 100644 dashboard/src/app/components/common/common.scss
delete mode 100644 dashboard/src/app/components/common/confirmation.ts
delete mode 100644 dashboard/src/app/components/common/confirmationservice.ts
delete mode 100644 dashboard/src/app/components/common/filtermetadata.ts
delete mode 100644 dashboard/src/app/components/common/keys.pipe.ts
delete mode 100644 dashboard/src/app/components/common/lazyloadevent.ts
delete mode 100644 dashboard/src/app/components/common/menuitem.ts
delete mode 100644 dashboard/src/app/components/common/message.ts
delete mode 100644 dashboard/src/app/components/common/messageservice.ts
delete mode 100644 dashboard/src/app/components/common/selectitem.ts
delete mode 100644 dashboard/src/app/components/common/selectitemgroup.ts
delete mode 100644 dashboard/src/app/components/common/shared.ts
delete mode 100644 dashboard/src/app/components/common/sortevent.ts
delete mode 100644 dashboard/src/app/components/common/sortmeta.ts
delete mode 100644 dashboard/src/app/components/common/treedragdropservice.ts
delete mode 100644 dashboard/src/app/components/common/treenode.ts
delete mode 100644 dashboard/src/app/components/common/treenodedragevent.ts
delete mode 100644 dashboard/src/app/components/confirmdialog/confirmdialog.spec.ts
delete mode 100644 dashboard/src/app/components/confirmdialog/confirmdialog.ts
delete mode 100644 dashboard/src/app/components/contextmenu/contextmenu.css
delete mode 100644 dashboard/src/app/components/contextmenu/contextmenu.spec.ts
delete mode 100644 dashboard/src/app/components/contextmenu/contextmenu.ts
delete mode 100644 dashboard/src/app/components/datagrid/datagrid.css
delete mode 100644 dashboard/src/app/components/datagrid/datagrid.spec.ts
delete mode 100644 dashboard/src/app/components/datagrid/datagrid.ts
delete mode 100644 dashboard/src/app/components/datalist/datalist.css
delete mode 100644 dashboard/src/app/components/datalist/datalist.spec.ts
delete mode 100644 dashboard/src/app/components/datalist/datalist.ts
delete mode 100644 dashboard/src/app/components/datascroller/datascroller.css
delete mode 100644 dashboard/src/app/components/datascroller/datascroller.spec.ts
delete mode 100644 dashboard/src/app/components/datascroller/datascroller.ts
delete mode 100644 dashboard/src/app/components/datatable/datatable.scss
delete mode 100644 dashboard/src/app/components/datatable/datatable.spec.ts
delete mode 100644 dashboard/src/app/components/datatable/datatable.ts
delete mode 100644 dashboard/src/app/components/dataview/dataview.css
delete mode 100644 dashboard/src/app/components/dataview/dataview.ts
delete mode 100644 dashboard/src/app/components/defer/defer.ts
delete mode 100644 dashboard/src/app/components/dialog/dialog.scss
delete mode 100644 dashboard/src/app/components/dialog/dialog.spec.ts
delete mode 100644 dashboard/src/app/components/dialog/dialog.ts
delete mode 100644 dashboard/src/app/components/dom/domhandler.ts
delete mode 100644 dashboard/src/app/components/dragdrop/dragdrop.spec.ts
delete mode 100644 dashboard/src/app/components/dragdrop/dragdrop.ts
delete mode 100644 dashboard/src/app/components/dropdown/dropdown.scss
delete mode 100644 dashboard/src/app/components/dropdown/dropdown.spec.ts
delete mode 100644 dashboard/src/app/components/dropdown/dropdown.ts
delete mode 100644 dashboard/src/app/components/dropmenu/dropmenu.scss
delete mode 100644 dashboard/src/app/components/dropmenu/dropmenu.ts
delete mode 100644 dashboard/src/app/components/editor/editor.spec.ts
delete mode 100644 dashboard/src/app/components/editor/editor.ts
delete mode 100644 dashboard/src/app/components/fieldset/fieldset.css
delete mode 100644 dashboard/src/app/components/fieldset/fieldset.spec.ts
delete mode 100644 dashboard/src/app/components/fieldset/fieldset.ts
delete mode 100644 dashboard/src/app/components/fileupload/fileupload.css
delete mode 100644 dashboard/src/app/components/fileupload/fileupload.spec.ts
delete mode 100644 dashboard/src/app/components/fileupload/fileupload.ts
delete mode 100644 dashboard/src/app/components/form/form.scss
delete mode 100644 dashboard/src/app/components/form/form.ts
delete mode 100644 dashboard/src/app/components/galleria/galleria.css
delete mode 100644 dashboard/src/app/components/galleria/galleria.spec.ts
delete mode 100644 dashboard/src/app/components/galleria/galleria.ts
delete mode 100644 dashboard/src/app/components/gmap/gmap.spec.ts
delete mode 100644 dashboard/src/app/components/gmap/gmap.ts
delete mode 100644 dashboard/src/app/components/grid/grid.css
delete mode 100644 dashboard/src/app/components/growl/growl.css
delete mode 100644 dashboard/src/app/components/growl/growl.spec.ts
delete mode 100644 dashboard/src/app/components/growl/growl.ts
delete mode 100644 dashboard/src/app/components/inplace/inplace.css
delete mode 100644 dashboard/src/app/components/inplace/inplace.spec.ts
delete mode 100644 dashboard/src/app/components/inplace/inplace.ts
delete mode 100644 dashboard/src/app/components/inputmask/inputmask.spec.ts
delete mode 100644 dashboard/src/app/components/inputmask/inputmask.ts
delete mode 100644 dashboard/src/app/components/inputswitch/inputswitch.css
delete mode 100644 dashboard/src/app/components/inputswitch/inputswitch.spec.ts
delete mode 100644 dashboard/src/app/components/inputswitch/inputswitch.ts
delete mode 100644 dashboard/src/app/components/inputtext/inputtext.scss
delete mode 100644 dashboard/src/app/components/inputtext/inputtext.spec.ts
delete mode 100644 dashboard/src/app/components/inputtext/inputtext.ts
delete mode 100644 dashboard/src/app/components/inputtextarea/inputtextarea.css
delete mode 100644 dashboard/src/app/components/inputtextarea/inputtextarea.spec.ts
delete mode 100644 dashboard/src/app/components/inputtextarea/inputtextarea.ts
delete mode 100644 dashboard/src/app/components/keyfilter/keyfilter.spec.ts
delete mode 100644 dashboard/src/app/components/keyfilter/keyfilter.ts
delete mode 100644 dashboard/src/app/components/lightbox/images/loading.gif
delete mode 100644 dashboard/src/app/components/lightbox/lightbox.css
delete mode 100644 dashboard/src/app/components/lightbox/lightbox.spec.ts
delete mode 100644 dashboard/src/app/components/lightbox/lightbox.ts
delete mode 100644 dashboard/src/app/components/listbox/listbox.css
delete mode 100644 dashboard/src/app/components/listbox/listbox.spec.ts
delete mode 100644 dashboard/src/app/components/listbox/listbox.ts
delete mode 100644 dashboard/src/app/components/megamenu/megamenu.css
delete mode 100644 dashboard/src/app/components/megamenu/megamenu.spec.ts
delete mode 100644 dashboard/src/app/components/megamenu/megamenu.ts
delete mode 100644 dashboard/src/app/components/menu/menu.css
delete mode 100644 dashboard/src/app/components/menu/menu.spec.ts
delete mode 100644 dashboard/src/app/components/menu/menu.ts
delete mode 100644 dashboard/src/app/components/menubar/menubar.css
delete mode 100644 dashboard/src/app/components/menubar/menubar.spec.ts
delete mode 100644 dashboard/src/app/components/menubar/menubar.ts
delete mode 100644 dashboard/src/app/components/message/message.css
delete mode 100644 dashboard/src/app/components/message/message.spec.ts
delete mode 100644 dashboard/src/app/components/message/message.ts
delete mode 100644 dashboard/src/app/components/messages/messages.css
delete mode 100644 dashboard/src/app/components/messages/messages.spec.ts
delete mode 100644 dashboard/src/app/components/messages/messages.ts
delete mode 100644 dashboard/src/app/components/msgbox/msgbox.ts
delete mode 100644 dashboard/src/app/components/multiselect/multiselect.css
delete mode 100644 dashboard/src/app/components/multiselect/multiselect.spec.ts
delete mode 100644 dashboard/src/app/components/multiselect/multiselect.ts
delete mode 100644 dashboard/src/app/components/orderlist/orderlist.css
delete mode 100644 dashboard/src/app/components/orderlist/orderlist.spec.ts
delete mode 100644 dashboard/src/app/components/orderlist/orderlist.ts
delete mode 100644 dashboard/src/app/components/organizationchart/organizationchart.css
delete mode 100644 dashboard/src/app/components/organizationchart/organizationchart.spec.ts
delete mode 100644 dashboard/src/app/components/organizationchart/organizationchart.ts
delete mode 100644 dashboard/src/app/components/overlaypanel/overlaypanel.css
delete mode 100644 dashboard/src/app/components/overlaypanel/overlaypanel.spec.ts
delete mode 100644 dashboard/src/app/components/overlaypanel/overlaypanel.ts
delete mode 100644 dashboard/src/app/components/paginator/paginator.scss
delete mode 100644 dashboard/src/app/components/paginator/paginator.spec.ts
delete mode 100644 dashboard/src/app/components/paginator/paginator.ts
delete mode 100644 dashboard/src/app/components/panel/panel.css
delete mode 100644 dashboard/src/app/components/panel/panel.spec.ts
delete mode 100644 dashboard/src/app/components/panel/panel.ts
delete mode 100644 dashboard/src/app/components/panelmenu/panelmenu.css
delete mode 100644 dashboard/src/app/components/panelmenu/panelmenu.spec.ts
delete mode 100644 dashboard/src/app/components/panelmenu/panelmenu.ts
delete mode 100644 dashboard/src/app/components/password/images/password-meter.png
delete mode 100644 dashboard/src/app/components/password/password.css
delete mode 100644 dashboard/src/app/components/password/password.spec.ts
delete mode 100644 dashboard/src/app/components/password/password.ts
delete mode 100644 dashboard/src/app/components/picklist/picklist.css
delete mode 100644 dashboard/src/app/components/picklist/picklist.spec.ts
delete mode 100644 dashboard/src/app/components/picklist/picklist.ts
delete mode 100644 dashboard/src/app/components/progressbar/progressbar.css
delete mode 100644 dashboard/src/app/components/progressbar/progressbar.spec.ts
delete mode 100644 dashboard/src/app/components/progressbar/progressbar.ts
delete mode 100644 dashboard/src/app/components/progressspinner/progressspinner.css
delete mode 100644 dashboard/src/app/components/progressspinner/progressspinner.spec.ts
delete mode 100644 dashboard/src/app/components/progressspinner/progressspinner.ts
delete mode 100644 dashboard/src/app/components/radiobutton/radiobutton.css
delete mode 100644 dashboard/src/app/components/radiobutton/radiobutton.spec.ts
delete mode 100644 dashboard/src/app/components/radiobutton/radiobutton.ts
delete mode 100644 dashboard/src/app/components/rating/rating.spec.ts
delete mode 100644 dashboard/src/app/components/rating/rating.ts
delete mode 100644 dashboard/src/app/components/schedule/schedule.css
delete mode 100644 dashboard/src/app/components/schedule/schedule.spec.ts
delete mode 100644 dashboard/src/app/components/schedule/schedule.ts
delete mode 100644 dashboard/src/app/components/scrollpanel/scrollpanel.css
delete mode 100644 dashboard/src/app/components/scrollpanel/scrollpanel.spec.ts
delete mode 100644 dashboard/src/app/components/scrollpanel/scrollpanel.ts
delete mode 100644 dashboard/src/app/components/selectbutton/selectbutton.css
delete mode 100644 dashboard/src/app/components/selectbutton/selectbutton.spec.ts
delete mode 100644 dashboard/src/app/components/selectbutton/selectbutton.ts
delete mode 100644 dashboard/src/app/components/sidebar/sidebar.css
delete mode 100644 dashboard/src/app/components/sidebar/sidebar.spec.ts
delete mode 100644 dashboard/src/app/components/sidebar/sidebar.ts
delete mode 100644 dashboard/src/app/components/slidemenu/slidemenu.css
delete mode 100644 dashboard/src/app/components/slidemenu/slidemenu.spec.ts
delete mode 100644 dashboard/src/app/components/slidemenu/slidemenu.ts
delete mode 100644 dashboard/src/app/components/slider/slider.css
delete mode 100644 dashboard/src/app/components/slider/slider.spec.ts
delete mode 100644 dashboard/src/app/components/slider/slider.ts
delete mode 100644 dashboard/src/app/components/spinner/spinner.css
delete mode 100644 dashboard/src/app/components/spinner/spinner.spec.ts
delete mode 100644 dashboard/src/app/components/spinner/spinner.ts
delete mode 100644 dashboard/src/app/components/splitbutton/splitbutton.css
delete mode 100644 dashboard/src/app/components/splitbutton/splitbutton.spec.ts
delete mode 100644 dashboard/src/app/components/splitbutton/splitbutton.ts
delete mode 100644 dashboard/src/app/components/steps/steps.css
delete mode 100644 dashboard/src/app/components/steps/steps.spec.ts
delete mode 100644 dashboard/src/app/components/steps/steps.ts
delete mode 100644 dashboard/src/app/components/table/table.css
delete mode 100644 dashboard/src/app/components/table/table.ts
delete mode 100644 dashboard/src/app/components/tabmenu/tabmenu.css
delete mode 100644 dashboard/src/app/components/tabmenu/tabmenu.spec.ts
delete mode 100644 dashboard/src/app/components/tabmenu/tabmenu.ts
delete mode 100644 dashboard/src/app/components/tabview/tabview.scss
delete mode 100644 dashboard/src/app/components/tabview/tabview.spec.ts
delete mode 100644 dashboard/src/app/components/tabview/tabview.ts
delete mode 100644 dashboard/src/app/components/terminal/terminal.css
delete mode 100644 dashboard/src/app/components/terminal/terminal.spec.ts
delete mode 100644 dashboard/src/app/components/terminal/terminal.ts
delete mode 100644 dashboard/src/app/components/terminal/terminalservice.ts
delete mode 100644 dashboard/src/app/components/tieredmenu/tieredmenu.css
delete mode 100644 dashboard/src/app/components/tieredmenu/tieredmenu.spec.ts
delete mode 100644 dashboard/src/app/components/tieredmenu/tieredmenu.ts
delete mode 100644 dashboard/src/app/components/togglebutton/togglebutton.spec.ts
delete mode 100644 dashboard/src/app/components/togglebutton/togglebutton.ts
delete mode 100644 dashboard/src/app/components/toolbar/toolbar.css
delete mode 100644 dashboard/src/app/components/toolbar/toolbar.spec.ts
delete mode 100644 dashboard/src/app/components/toolbar/toolbar.ts
delete mode 100644 dashboard/src/app/components/tooltip/tooltip.css
delete mode 100644 dashboard/src/app/components/tooltip/tooltip.spec.ts
delete mode 100644 dashboard/src/app/components/tooltip/tooltip.ts
delete mode 100644 dashboard/src/app/components/tree/images/line.gif
delete mode 100644 dashboard/src/app/components/tree/tree.css
delete mode 100644 dashboard/src/app/components/tree/tree.spec.ts
delete mode 100644 dashboard/src/app/components/tree/tree.ts
delete mode 100644 dashboard/src/app/components/treetable/treetable.css
delete mode 100644 dashboard/src/app/components/treetable/treetable.spec.ts
delete mode 100644 dashboard/src/app/components/treetable/treetable.ts
delete mode 100644 dashboard/src/app/components/tristatecheckbox/tristatecheckbox.spec.ts
delete mode 100644 dashboard/src/app/components/tristatecheckbox/tristatecheckbox.ts
delete mode 100644 dashboard/src/app/components/utils/objectutils.spec.ts
delete mode 100644 dashboard/src/app/components/utils/objectutils.ts
delete mode 100644 dashboard/src/app/i18n/en/exception.json
delete mode 100644 dashboard/src/app/i18n/en/keyID.json
delete mode 100644 dashboard/src/app/i18n/en/widgetsKeyID.json
delete mode 100644 dashboard/src/app/i18n/zh/exception.json
delete mode 100644 dashboard/src/app/i18n/zh/keyID.json
delete mode 100644 dashboard/src/app/i18n/zh/widgetsKeyID.json
delete mode 100644 dashboard/src/app/shared/api.ts
delete mode 100644 dashboard/src/app/shared/service/Exception.service.ts
delete mode 100644 dashboard/src/app/shared/service/Http.service.ts
delete mode 100644 dashboard/src/app/shared/service/I18N.service.ts
delete mode 100644 dashboard/src/app/shared/service/MsgBox.service.ts
delete mode 100644 dashboard/src/app/shared/service/ParamStor.service.ts
delete mode 100644 dashboard/src/app/shared/service/api.ts
delete mode 100644 dashboard/src/app/shared/shared.config.ts
delete mode 100644 dashboard/src/app/shared/shared.module.ts
delete mode 100644 dashboard/src/app/shared/utils/consts.ts
delete mode 100644 dashboard/src/app/shared/utils/mask.ts
delete mode 100644 dashboard/src/app/shared/utils/utils.ts
delete mode 100644 dashboard/src/assets/.gitkeep
delete mode 100644 dashboard/src/assets/business/css/primeng.scss
delete mode 100644 dashboard/src/assets/business/css/site.scss
delete mode 100644 dashboard/src/assets/business/favicon/favicon.ico
delete mode 100644 dashboard/src/assets/business/fonts/roboto-v15-latin-regular.eot
delete mode 100644 dashboard/src/assets/business/fonts/roboto-v15-latin-regular.svg
delete mode 100644 dashboard/src/assets/business/fonts/roboto-v15-latin-regular.ttf
delete mode 100644 dashboard/src/assets/business/fonts/roboto-v15-latin-regular.woff
delete mode 100644 dashboard/src/assets/business/fonts/roboto-v15-latin-regular.woff2
delete mode 100644 dashboard/src/assets/business/images/cloud_service/AWS S3.png
delete mode 100644 dashboard/src/assets/business/images/cloud_service/Huawei OBS.png
delete mode 100644 dashboard/src/assets/business/images/cloud_service/Microsoft Azure Blob Storage.png
delete mode 100644 dashboard/src/assets/business/images/cloud_service/u2309.png
delete mode 100644 dashboard/src/assets/business/images/home_admin/Block Storages.png
delete mode 100644 dashboard/src/assets/business/images/home_admin/Cross-Region Migrations.png
delete mode 100644 dashboard/src/assets/business/images/home_admin/Cross-Region Replications.png
delete mode 100644 dashboard/src/assets/business/images/home_admin/Storage Pools.png
delete mode 100644 dashboard/src/assets/business/images/home_admin/Tenants.png
delete mode 100644 dashboard/src/assets/business/images/home_admin/Users.png
delete mode 100644 dashboard/src/assets/business/images/home_admin/Volume Replications.png
delete mode 100644 dashboard/src/assets/business/images/home_admin/Volume Snapshots.png
delete mode 100644 dashboard/src/assets/business/images/home_admin/Volumes.png
delete mode 100644 dashboard/src/assets/business/images/home_admin/u199.png
delete mode 100644 dashboard/src/assets/business/images/home_admin/u236.png
delete mode 100644 dashboard/src/assets/business/images/icons/button-active.svg
delete mode 100644 dashboard/src/assets/business/images/icons/button.svg
delete mode 100644 dashboard/src/assets/business/images/icons/charts-active.svg
delete mode 100644 dashboard/src/assets/business/images/icons/charts.svg
delete mode 100644 dashboard/src/assets/business/images/icons/data-active.svg
delete mode 100644 dashboard/src/assets/business/images/icons/data.svg
delete mode 100644 dashboard/src/assets/business/images/icons/dragdrop-active.svg
delete mode 100644 dashboard/src/assets/business/images/icons/dragdrop.svg
delete mode 100644 dashboard/src/assets/business/images/icons/file-active.svg
delete mode 100644 dashboard/src/assets/business/images/icons/file.svg
delete mode 100644 dashboard/src/assets/business/images/icons/input-active.svg
delete mode 100644 dashboard/src/assets/business/images/icons/input.svg
delete mode 100644 dashboard/src/assets/business/images/icons/menu-active.svg
delete mode 100644 dashboard/src/assets/business/images/icons/menu.svg
delete mode 100644 dashboard/src/assets/business/images/icons/message-active.svg
delete mode 100644 dashboard/src/assets/business/images/icons/message.svg
delete mode 100644 dashboard/src/assets/business/images/icons/misc-active.svg
delete mode 100644 dashboard/src/assets/business/images/icons/misc.svg
delete mode 100644 dashboard/src/assets/business/images/icons/multimedia-active.svg
delete mode 100644 dashboard/src/assets/business/images/icons/multimedia.svg
delete mode 100644 dashboard/src/assets/business/images/icons/overlay-active.svg
delete mode 100644 dashboard/src/assets/business/images/icons/overlay.svg
delete mode 100644 dashboard/src/assets/business/images/icons/panel-active.svg
delete mode 100644 dashboard/src/assets/business/images/icons/panel.svg
delete mode 100644 dashboard/src/assets/business/images/login-bg.png
delete mode 100644 dashboard/src/assets/business/images/logo-white.png
delete mode 100644 dashboard/src/assets/business/images/logo.png
delete mode 100644 dashboard/src/assets/business/images/menu-bg.png
delete mode 100644 dashboard/src/assets/business/images/profile/u1065.png
delete mode 100644 dashboard/src/assets/business/images/profile/u1985.png
delete mode 100644 dashboard/src/assets/business/images/profile/u2861.png
delete mode 100644 dashboard/src/assets/business/images/profile/u2987.png
delete mode 100644 dashboard/src/assets/business/images/volume/u436.png
delete mode 100644 dashboard/src/assets/business/images/volume/u583.png
delete mode 100644 dashboard/src/assets/business/images/volume/u585.png
delete mode 100644 dashboard/src/assets/business/images/volume/u740p000.png
delete mode 100644 dashboard/src/assets/business/images/volume/u740p002.png
delete mode 100644 dashboard/src/assets/business/images/volume/u760p000.png
delete mode 100644 dashboard/src/assets/business/images/volume/u937.png
delete mode 100644 dashboard/src/assets/components/images/line.gif
delete mode 100644 dashboard/src/assets/components/images/loading.gif
delete mode 100644 dashboard/src/assets/components/images/password-meter.png
delete mode 100644 dashboard/src/assets/components/themes/_theme.scss
delete mode 100644 dashboard/src/assets/components/themes/default/default.scss
delete mode 100644 dashboard/src/assets/components/themes/default/fonts/roboto-v15-latin-regular.eot
delete mode 100644 dashboard/src/assets/components/themes/default/fonts/roboto-v15-latin-regular.svg
delete mode 100644 dashboard/src/assets/components/themes/default/fonts/roboto-v15-latin-regular.ttf
delete mode 100644 dashboard/src/assets/components/themes/default/fonts/roboto-v15-latin-regular.woff
delete mode 100644 dashboard/src/assets/components/themes/default/fonts/roboto-v15-latin-regular.woff2
delete mode 100644 dashboard/src/assets/components/themes/default/images/icons_16.png
delete mode 100644 dashboard/src/assets/components/themes/default/images/slider_handles.png
delete mode 100644 dashboard/src/assets/components/themes/default/images/slider_handles@2x.png
delete mode 100644 dashboard/src/assets/components/themes/default/images/ui-bg_flat_0_aaaaaa_40x100.png
delete mode 100644 dashboard/src/assets/components/themes/default/images/ui-bg_flat_75_ffffff_40x100.png
delete mode 100644 dashboard/src/assets/components/themes/default/images/ui-bg_glass_55_fbf9ee_1x400.png
delete mode 100644 dashboard/src/assets/components/themes/default/images/ui-bg_glass_65_ffffff_1x400.png
delete mode 100644 dashboard/src/assets/components/themes/default/images/ui-bg_glass_75_dadada_1x400.png
delete mode 100644 dashboard/src/assets/components/themes/default/images/ui-bg_glass_75_e6e6e6_1x400.png
delete mode 100644 dashboard/src/assets/components/themes/default/images/ui-bg_glass_95_fef1ec_1x400.png
delete mode 100644 dashboard/src/assets/components/themes/default/images/ui-bg_highlight-soft_75_cccccc_1x100.png
delete mode 100644 dashboard/src/assets/components/themes/default/images/ui-icons_222222_256x240.png
delete mode 100644 dashboard/src/assets/components/themes/default/images/ui-icons_2e83ff_256x240.png
delete mode 100644 dashboard/src/assets/components/themes/default/images/ui-icons_454545_256x240.png
delete mode 100644 dashboard/src/assets/components/themes/default/images/ui-icons_cd0a0a_256x240.png
delete mode 100644 dashboard/src/assets/components/themes/default/images/ui-icons_ffffff_256x240.png
delete mode 100644 dashboard/src/environments/environment.prod.ts
delete mode 100644 dashboard/src/environments/environment.ts
delete mode 100644 dashboard/src/index.html
delete mode 100644 dashboard/src/main.ts
delete mode 100644 dashboard/src/polyfills.ts
delete mode 100644 dashboard/src/styles.scss
delete mode 100644 dashboard/src/test.ts
delete mode 100644 dashboard/src/tsconfig.app.json
delete mode 100644 dashboard/src/tsconfig.spec.json
delete mode 100644 dashboard/src/typings.d.ts
delete mode 100644 dashboard/src/upload.php
delete mode 100644 dashboard/tsconfig-aot.json
delete mode 100644 dashboard/tsconfig-release.json
delete mode 100644 dashboard/tsconfig.json
delete mode 100644 dashboard/tslint.json
diff --git a/.travis.yml b/.travis.yml
index e6c9d4ba4..5fd1ac82c 100755
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,6 +7,7 @@ go_import_path: github.com/opensds/opensds
go:
- 1.9.x
+ - 1.11.x
- tip
env:
diff --git a/dashboard/.angular-cli.json b/dashboard/.angular-cli.json
deleted file mode 100644
index df63f8d03..000000000
--- a/dashboard/.angular-cli.json
+++ /dev/null
@@ -1,71 +0,0 @@
-{
- "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
- "project": {
- "name": "primeng"
- },
- "apps": [
- {
- "root": "src",
- "outDir": "dist",
- "assets": [
- "assets",
- "upload.php",
- "favicon.png",
- { "glob": "**/**", "input": "./assets", "output": "./assets/"},
- { "glob": "**/**", "input": "./app/i18n", "output": "./src/app/i18n/"}
- ],
- "index": "index.html",
- "main": "main.ts",
- "polyfills": "polyfills.ts",
- "test": "test.ts",
- "tsconfig": "tsconfig.app.json",
- "testTsconfig": "tsconfig.spec.json",
- "prefix": "app",
- "styles": [
- "../node_modules/fullcalendar/dist/fullcalendar.min.css",
- "../node_modules/quill/dist/quill.snow.css",
- "../node_modules/font-awesome/css/font-awesome.min.css",
- "styles.scss"
- ],
- "scripts": [
- "../node_modules/jquery/dist/jquery.js",
- "../node_modules/moment/moment.js",
- "../node_modules/chart.js/dist/Chart.js",
- "../node_modules/fullcalendar/dist/fullcalendar.js",
- "../node_modules/quill/dist/quill.js",
- "../node_modules/prismjs/prism.js",
- "../node_modules/prismjs/components/prism-typescript.js"
- ],
- "environmentSource": "environments/environment.ts",
- "environments": {
- "dev": "environments/environment.ts",
- "prod": "environments/environment.prod.ts"
- }
- }
- ],
- "e2e": {
- "protractor": {
- "config": "./protractor.conf.js"
- }
- },
- "lint": [
- {
- "project": "src/tsconfig.app.json"
- },
- {
- "project": "src/tsconfig.spec.json"
- },
- {
- "project": "e2e/tsconfig.e2e.json"
- }
- ],
- "test": {
- "karma": {
- "config": "./karma.conf.js"
- }
- },
- "defaults": {
- "styleExt": "css",
- "component": {}
- }
-}
diff --git a/dashboard/.editorconfig b/dashboard/.editorconfig
deleted file mode 100644
index 9b7352176..000000000
--- a/dashboard/.editorconfig
+++ /dev/null
@@ -1,13 +0,0 @@
-# Editor configuration, see http://editorconfig.org
-root = true
-
-[*]
-charset = utf-8
-indent_style = space
-indent_size = 4
-insert_final_newline = true
-trim_trailing_whitespace = true
-
-[*.md]
-max_line_length = off
-trim_trailing_whitespace = false
diff --git a/dashboard/.gitignore b/dashboard/.gitignore
deleted file mode 100644
index 825c75d0a..000000000
--- a/dashboard/.gitignore
+++ /dev/null
@@ -1,50 +0,0 @@
-# See http://help.github.com/ignore-files/ for more about ignoring files.
-
-# compiled output
-/dist
-/tmp
-/out-tsc
-/components
-/resources
-/aot
-
-# dependencies
-/node_modules
-
-# IDEs and editors
-/.idea
-.project
-.classpath
-.c9/
-*.launch
-.settings/
-*.sublime-workspace
-
-# IDE - VSCode
-.vscode/*
-!.vscode/settings.json
-!.vscode/tasks.json
-!.vscode/launch.json
-!.vscode/extensions.json
-
-# misc
-/.sass-cache
-/connect.lock
-/coverage
-/libpeerconnection.log
-npm-debug.log
-testem.log
-/typings
-
-# themes
-/src/assets/components/themes/**/*.css
-/src/assets/components/themes/**/*.map
-!/src/assets/components/themes/bootstrap/theme.css
-
-# e2e
-/e2e/*.js
-/e2e/*.map
-
-# System Files
-.DS_Store
-Thumbs.db
diff --git a/dashboard/.npmignore b/dashboard/.npmignore
deleted file mode 100644
index 98f95cfdc..000000000
--- a/dashboard/.npmignore
+++ /dev/null
@@ -1,67 +0,0 @@
-# compiled output
-/dist
-/tmp
-/out-tsc
-/aot
-
-# source
-src
-
-# test
-e2e
-karma.conf.js
-protractor.conf.js
-*.spec.d.ts
-*.spec.js
-*.spec.js.map
-*.spec.metadata.json
-*.spec.ngsummary.json
-
-# dependencies
-node_modules
-
-# IDEs and editors
-/.idea
-.project
-.classpath
-.c9/
-*.launch
-.settings/
-*.sublime-workspace
-.editor-config
-
-# IDE - VSCode
-.vscode/*
-!.vscode/settings.json
-!.vscode/tasks.json
-!.vscode/launch.json
-!.vscode/extensions.json
-
-# misc
-/.sass-cache
-/connect.lock
-/coverage
-/libpeerconnection.log
-npm-debug.log
-testem.log
-/typings
-.gitignore
-exports
-
-# config
-.angular-cli.json
-tsconfig.json
-tsconfig-release.json
-tsconfig-aot.json
-tslint.json
-gulpfile.js
-.github
-
-# System Files
-.DS_Store
-Thumbs.db
-
-# aot
-*.ngfactory.js
-*.ngfactory.js.map
-*.ngsummary.json
\ No newline at end of file
diff --git a/dashboard/.travis.yml b/dashboard/.travis.yml
deleted file mode 100644
index 7cbe366e4..000000000
--- a/dashboard/.travis.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-language: node_js
-sudo: required
-node_js:
- - node
-
-before_script:
- - "sudo chown root /opt/google/chrome/chrome-sandbox"
- - "sudo chmod 4755 /opt/google/chrome/chrome-sandbox"
-
-before_install:
- - export CHROME_BIN=chromium-browser
- - export DISPLAY=:99.0
- - sh -e /etc/init.d/xvfb start
-
-script: # the build step
- - node_modules/.bin/ng test --colors=false --progress=false --single-run
-
-
-cache:
- yarn: true
- directories:
- - ./node_modules
- - ./.chrome/chromium
\ No newline at end of file
diff --git a/dashboard/Dockerfile b/dashboard/Dockerfile
deleted file mode 100644
index cb51b0043..000000000
--- a/dashboard/Dockerfile
+++ /dev/null
@@ -1,35 +0,0 @@
-# Docker build usage:
-# docker build . -t opensdsio/dashboard:latest
-# Docker run usage:
-# docker run -d -p 8088:8088 opensdsio/dashboard:latest
-
-FROM ubuntu:16.04
-MAINTAINER Leon Wang
-
-ARG DEBIAN_FRONTEND=noninteractive
-
-# Download and install some packages.
-RUN apt-get update && apt-get install -y --no-install-recommends \
- sudo \
- wget \
- make \
- g++ \
- nginx \
- && rm -rf /var/lib/apt/lists/* \
- && apt-get clean
-RUN wget --no-check-certificate https://deb.nodesource.com/setup_8.x \
- && chmod +x setup_8.x && ./setup_8.x \
- && apt-get install -y nodejs
-
-# Current directory is always /opt/dashboard.
-WORKDIR /opt/dashboard
-
-# Copy dashboard source code into container before running command.
-COPY ./ ./
-
-RUN chmod 755 ./image_builder.sh \
- && sudo ./image_builder.sh
-RUN sudo ./image_builder.sh --rebuild
-
-# Define default command.
-CMD /usr/sbin/nginx -g "daemon off;"
diff --git a/dashboard/LICENSE.md b/dashboard/LICENSE.md
deleted file mode 100644
index 02647baee..000000000
--- a/dashboard/LICENSE.md
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2016-2017 PrimeTek
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
\ No newline at end of file
diff --git a/dashboard/Makefile b/dashboard/Makefile
deleted file mode 100644
index 9601d10fb..000000000
--- a/dashboard/Makefile
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright (c) 2018 Huawei Technologies Co., Ltd. All Rights Reserved.
-#
-# Licensed 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.
-
-IMAGE = opensdsio/dashboard
-VERSION := latest
-
-all:build
-.PHONY: all
-
-build:dashboard
-.PHONY: build
-
-dashboard:package
- chmod +x ./image_builder.sh \
- && ./image_builder.sh
-.PHONY: dashboard
-
-package:
- apt-get update && apt-get install -y --no-install-recommends \
- wget \
- make \
- g++ \
- nginx \
- && rm -rf /var/lib/apt/lists/* \
- && apt-get clean
- wget --no-check-certificate https://deb.nodesource.com/setup_8.x \
- && chmod +x setup_8.x && ./setup_8.x \
- && apt-get install -y nodejs
-.PHONY: package
-
-docker:
- docker build . -t $(IMAGE):$(VERSION)
-.PHONY: docker
-
-clean:
- service nginx stop
- rm -rf /etc/nginx/sites-available/default /var/www/html/* ./dist warn=False
- npm uninstall --unsafe-perm
- npm uninstall --unsafe-perm -g @angular/cli@1.7.4
- apt-get --purge remove -y nodejs nginx \
- && rm -rf ./setup_8.x warn=False
-.PHONY: clean
diff --git a/dashboard/README.md b/dashboard/README.md
deleted file mode 100644
index 2e26c0f97..000000000
--- a/dashboard/README.md
+++ /dev/null
@@ -1,77 +0,0 @@
-# Summary
-OpenSDS dashboard uses the front-end development framework Angular5 (https://angular.io/)
-and relies on PrimeNG UI Components (https://www.primefaces.org/primeng/). Regardless of
-deployment or two development, prepare the corresponding environment.
-
-# Prerequisite
-
-### 1. Ubuntu
-* Version information
-```shell
-root@proxy:~# cat /etc/issue
-Ubuntu 16.04.2 LTS \n \l
-```
-
-### 2. Nginx installation
-```shell
-sudo apt-get install nginx
-```
-
-### 3. NodeJS installation, NPM will be installed with nodejs.
-```shell
-curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
-sudo apt-get install -y nodejs
-```
-
-### 4. Angular CLI installation
-Specify the version[1.7.4] of angular5 suitable for installation.
-```shell
-sudo npm install -g @angular/cli@1.7.4
-```
-
-
-# Build & Start
-### 1. Git clone dashboard code.
-```shell
-git clone https://github.com/opensds/opensds.git
-```
-
-### 2. Build opensds dashboard.
-After the build work finished, the files in the `dist` folder should be copied to the folder ` /var/www/html/`.
-```shell
-cd opensds/dashboard
-sudo npm install
-sudo ng build --prod
-```
-
-```shell
-cp -R opensds/dashboard/dist/* /var/www/html/
-```
-
-### 3. Set nginx default config.
-```shell
-vi /etc/nginx/sites-available/default
-```
-Configure proxy, points to the resource server and the authentication server respectively.
-Such as:
-* Keystone server `http://1.1.1.0:5000`
-* Resource server `http://1.1.1.0:50040`
-```shell
-location /v3/ {
- proxy_pass http://1.1.1.0:5000/v3/;
-}
-
-location /v1beta/ {
- proxy_pass http://1.1.1.0:50040/v1beta/;
-}
-```
-
-### 4. Restart nginx
-```shell
-service nginx restart
-```
-
-### 5. Access dashboard in browser.
-```shell
-http://localhost/
-```
diff --git a/dashboard/e2e/accordion.e2e-spec.ts b/dashboard/e2e/accordion.e2e-spec.ts
deleted file mode 100644
index 5476c373d..000000000
--- a/dashboard/e2e/accordion.e2e-spec.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import {browser, by, element, ElementArrayFinder} from 'protractor';
-
-describe('Accordion', () => {
- let accordionHeaders: ElementArrayFinder;
- let accordionContents: ElementArrayFinder;
-
- describe('Header Click', () => {
- beforeEach(() => {
- browser.get('#/accordion');
- accordionContents = element.all(by.css('.ui-accordion-content-wrapper'));
- accordionHeaders = element.all(by.css('.ui-accordion-header'));
- });
-
- it('should close active content', () => {
- accordionHeaders.get(0).click();
- expect(accordionContents.get(0).getCssValue('overflow')).toBe('hidden');
- });
-
- });
-});
\ No newline at end of file
diff --git a/dashboard/e2e/app.e2e-spec.ts b/dashboard/e2e/app.e2e-spec.ts
deleted file mode 100644
index 83f61bb6a..000000000
--- a/dashboard/e2e/app.e2e-spec.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { PrimengPage } from './app.po';
-
-describe('primeng App', () => {
- let page: PrimengPage;
-
- beforeEach(() => {
- page = new PrimengPage();
- });
-
- it('should display welcome message', done => {
- page.navigateTo();
- page.getPROText()
- .then(msg => expect(msg).toEqual('PrimeNG PRO Support'))
- .then(done, done.fail);
- });
-});
diff --git a/dashboard/e2e/app.po.ts b/dashboard/e2e/app.po.ts
deleted file mode 100644
index 7b1a2d7ee..000000000
--- a/dashboard/e2e/app.po.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { browser, by, element } from 'protractor';
-
-export class PrimengPage {
- navigateTo() {
- return browser.get('/');
- }
-
- getPROText() {
- return element(by.css('.pro-title')).getText();
- }
-}
diff --git a/dashboard/e2e/fieldset.e2e-spec.ts b/dashboard/e2e/fieldset.e2e-spec.ts
deleted file mode 100644
index 4b417a44d..000000000
--- a/dashboard/e2e/fieldset.e2e-spec.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import {browser, by, element, ElementFinder, ElementArrayFinder} from 'protractor';
-
-describe('Fieldset', () => {
- let legend: ElementFinder;
- let contentWrapper: ElementArrayFinder;
-
- describe('Toggle Icon Click', () => {
- beforeEach(() => {
- browser.get('#/fieldset');
- legend = element(by.css('.ui-fieldset-toggleable .ui-fieldset-legend'));
- contentWrapper = element.all(by.css('.ui-fieldset-content-wrapper'));
- });
-
- it('should close active content', () => {
- legend.click();
- expect(contentWrapper.get(1).getCssValue('overflow')).toBe('hidden');
- });
-
- it('should toggle content', () => {
- legend.click();
- browser.sleep(1000);
- legend.click();
- expect(contentWrapper.get(1).getCssValue('height')).not.toBe('0');
- });
-
- });
-});
\ No newline at end of file
diff --git a/dashboard/e2e/inputtext.e2e-spec.ts b/dashboard/e2e/inputtext.e2e-spec.ts
deleted file mode 100644
index 6022bcbb3..000000000
--- a/dashboard/e2e/inputtext.e2e-spec.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import {browser, by, element} from 'protractor';
-
-describe('InputText', () => {
- describe('Attribute Value', () => {
- let inputEl = element(by.id('input'));
- let spanEl = element(by.id('text'));
-
- beforeEach(() => {
- browser.get('#/inputtext');
- });
-
- it('should be displayed in the span element', () => {
- inputEl.sendKeys('PrimeNG Rocks');
- expect(spanEl.getText()).toBe('PrimeNG Rocks');
- });
- });
-
- describe('Disabled property', () => {
- let disabledInput = element(by.id('disabled-input'));
- let disableBtn = element(by.id('disabled-btn'));
-
- beforeEach(() => {
- browser.get('#/inputtext');
- });
-
- it('should prevent click handlers from executing when disabled', () => {
- expect(disabledInput.isEnabled()).toBe(false);
- });
- it('should become enabled with button click', () => {
- disableBtn.click();
- expect(disabledInput.isEnabled()).toBe(true);
- });
- });
-});
\ No newline at end of file
diff --git a/dashboard/e2e/panel.e2e-spec.ts b/dashboard/e2e/panel.e2e-spec.ts
deleted file mode 100644
index 299b0af9d..000000000
--- a/dashboard/e2e/panel.e2e-spec.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import {browser, by, element, ElementFinder, ElementArrayFinder} from 'protractor';
-
-describe('Panel', () => {
- let toggleIcon: ElementFinder;
- let contentWrapper: ElementArrayFinder;
-
- describe('Toggle Icon Click', () => {
- beforeEach(() => {
- browser.get('#/panel');
- toggleIcon = element(by.css('.ui-panel-titlebar-icon'));
- contentWrapper = element.all(by.css('.ui-panel-content-wrapper'));
- });
-
- it('should close active content', () => {
- toggleIcon.click();
- expect(contentWrapper.get(0).getCssValue('overflow')).toBe('hidden');
- });
-
- it('should toggle content', () => {
- toggleIcon.click();
- browser.sleep(1000);
- toggleIcon.click();
- expect(contentWrapper.get(0).getCssValue('height')).not.toBe('0');
- });
-
- });
-});
\ No newline at end of file
diff --git a/dashboard/e2e/tabview.e2e-spec.ts b/dashboard/e2e/tabview.e2e-spec.ts
deleted file mode 100644
index ba717e9be..000000000
--- a/dashboard/e2e/tabview.e2e-spec.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-import {browser, by, element, ElementArrayFinder} from 'protractor';
-
-describe('TabView', () => {
- let tabPanels: ElementArrayFinder;
- let tabElements: ElementArrayFinder;
- let closeIcons: ElementArrayFinder;
- let closableTabPanels: ElementArrayFinder;
- let closableTabElements: ElementArrayFinder;
-
- describe('Tab Click', () => {
- beforeEach(() => {
- browser.get('#/tabview');
- tabPanels = element.all(by.css('.ui-tabview-panel'));
- tabElements = element.all(by.css('.ui-tabview-nav li'));
- });
-
- it('should switch panels', () => {
- tabElements.get(1).click();
- expect(tabPanels.get(1).getCssValue('display')).toBe('block');
- });
-
- });
- describe('Close Icon Click', () => {
- beforeEach(() => {
- browser.get('#/tabview');
- closableTabElements = element.all(by.css('#closableTabView .ui-tabview-nav li'));
- closeIcons = element.all(by.css('#closableTabView .ui-tabview-nav li .ui-tabview-close'));
- });
-
- it('should delete closed panel', () => {
- closeIcons.get(0).click();
- expect(closableTabElements.count()).toBe(2);
- });
- });
- describe('Close Icon Click on an active tab', () => {
- beforeEach(() => {
- browser.get('#/tabview');
- closableTabPanels = element.all(by.css('#closableTabView .ui-tabview-panel'));
- closableTabElements = element.all(by.css('#closableTabView .ui-tabview-nav li'));
- closeIcons = element.all(by.css('#closableTabView .ui-tabview-nav li .ui-tabview-close'));
- });
-
- it('should close that panel and first tab should be active', () => {
- closableTabElements.get(2).click();
- closeIcons.get(1).click();
- expect(closableTabPanels.get(0).getCssValue('display')).toBe('block');
- });
- });
-});
\ No newline at end of file
diff --git a/dashboard/e2e/tsconfig.e2e.json b/dashboard/e2e/tsconfig.e2e.json
deleted file mode 100644
index e2a9a2fc7..000000000
--- a/dashboard/e2e/tsconfig.e2e.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "extends": "../tsconfig.json",
- "compilerOptions": {
- "outDir": "../out-tsc/e2e",
- "module": "commonjs",
- "target": "es5",
- "types": [
- "jasmine",
- "node"
- ]
- }
-}
diff --git a/dashboard/exports/accordion.d.ts b/dashboard/exports/accordion.d.ts
deleted file mode 100644
index 452bb1c17..000000000
--- a/dashboard/exports/accordion.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/accordion/accordion';
\ No newline at end of file
diff --git a/dashboard/exports/accordion.js b/dashboard/exports/accordion.js
deleted file mode 100644
index 01ce630d8..000000000
--- a/dashboard/exports/accordion.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/accordion/accordion"));
\ No newline at end of file
diff --git a/dashboard/exports/api.d.ts b/dashboard/exports/api.d.ts
deleted file mode 100644
index 719f575ac..000000000
--- a/dashboard/exports/api.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/common/api';
\ No newline at end of file
diff --git a/dashboard/exports/api.js b/dashboard/exports/api.js
deleted file mode 100644
index 0a03470e5..000000000
--- a/dashboard/exports/api.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/common/api"));
\ No newline at end of file
diff --git a/dashboard/exports/autocomplete.d.ts b/dashboard/exports/autocomplete.d.ts
deleted file mode 100644
index 1ac0ce8cd..000000000
--- a/dashboard/exports/autocomplete.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/autocomplete/autocomplete';
\ No newline at end of file
diff --git a/dashboard/exports/autocomplete.js b/dashboard/exports/autocomplete.js
deleted file mode 100644
index 8d1ad87ff..000000000
--- a/dashboard/exports/autocomplete.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/autocomplete/autocomplete"));
\ No newline at end of file
diff --git a/dashboard/exports/blockui.d.ts b/dashboard/exports/blockui.d.ts
deleted file mode 100644
index 64124130b..000000000
--- a/dashboard/exports/blockui.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/blockui/blockui';
\ No newline at end of file
diff --git a/dashboard/exports/blockui.js b/dashboard/exports/blockui.js
deleted file mode 100644
index 06926523c..000000000
--- a/dashboard/exports/blockui.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/blockui/blockui"));
\ No newline at end of file
diff --git a/dashboard/exports/breadcrumb.d.ts b/dashboard/exports/breadcrumb.d.ts
deleted file mode 100644
index b81a3729d..000000000
--- a/dashboard/exports/breadcrumb.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/breadcrumb/breadcrumb';
\ No newline at end of file
diff --git a/dashboard/exports/breadcrumb.js b/dashboard/exports/breadcrumb.js
deleted file mode 100644
index f4ed86279..000000000
--- a/dashboard/exports/breadcrumb.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/breadcrumb/breadcrumb"));
\ No newline at end of file
diff --git a/dashboard/exports/button.d.ts b/dashboard/exports/button.d.ts
deleted file mode 100644
index 945534232..000000000
--- a/dashboard/exports/button.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/button/button';
\ No newline at end of file
diff --git a/dashboard/exports/button.js b/dashboard/exports/button.js
deleted file mode 100644
index 9b5036483..000000000
--- a/dashboard/exports/button.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/button/button"));
\ No newline at end of file
diff --git a/dashboard/exports/calendar.d.ts b/dashboard/exports/calendar.d.ts
deleted file mode 100644
index eadf99239..000000000
--- a/dashboard/exports/calendar.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/calendar/calendar';
\ No newline at end of file
diff --git a/dashboard/exports/calendar.js b/dashboard/exports/calendar.js
deleted file mode 100644
index f048d89eb..000000000
--- a/dashboard/exports/calendar.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/calendar/calendar"));
\ No newline at end of file
diff --git a/dashboard/exports/captcha.d.ts b/dashboard/exports/captcha.d.ts
deleted file mode 100644
index 8116f2ba7..000000000
--- a/dashboard/exports/captcha.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/captcha/captcha';
\ No newline at end of file
diff --git a/dashboard/exports/captcha.js b/dashboard/exports/captcha.js
deleted file mode 100644
index 5ad37eb5f..000000000
--- a/dashboard/exports/captcha.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/captcha/captcha"));
\ No newline at end of file
diff --git a/dashboard/exports/card.d.ts b/dashboard/exports/card.d.ts
deleted file mode 100644
index c4e0d1f51..000000000
--- a/dashboard/exports/card.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/card/card';
\ No newline at end of file
diff --git a/dashboard/exports/card.js b/dashboard/exports/card.js
deleted file mode 100644
index fe72ed2f9..000000000
--- a/dashboard/exports/card.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/card/card"));
\ No newline at end of file
diff --git a/dashboard/exports/carousel.d.ts b/dashboard/exports/carousel.d.ts
deleted file mode 100644
index 2fdb7c0f7..000000000
--- a/dashboard/exports/carousel.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/carousel/carousel';
\ No newline at end of file
diff --git a/dashboard/exports/carousel.js b/dashboard/exports/carousel.js
deleted file mode 100644
index 7a093b101..000000000
--- a/dashboard/exports/carousel.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/carousel/carousel"));
\ No newline at end of file
diff --git a/dashboard/exports/chart.d.ts b/dashboard/exports/chart.d.ts
deleted file mode 100644
index 32e069313..000000000
--- a/dashboard/exports/chart.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/chart/chart';
\ No newline at end of file
diff --git a/dashboard/exports/chart.js b/dashboard/exports/chart.js
deleted file mode 100644
index 5a822b266..000000000
--- a/dashboard/exports/chart.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/chart/chart"));
\ No newline at end of file
diff --git a/dashboard/exports/checkbox.d.ts b/dashboard/exports/checkbox.d.ts
deleted file mode 100644
index 6e455b294..000000000
--- a/dashboard/exports/checkbox.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/checkbox/checkbox';
\ No newline at end of file
diff --git a/dashboard/exports/checkbox.js b/dashboard/exports/checkbox.js
deleted file mode 100644
index 81c5fd123..000000000
--- a/dashboard/exports/checkbox.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/checkbox/checkbox"));
\ No newline at end of file
diff --git a/dashboard/exports/chips.d.ts b/dashboard/exports/chips.d.ts
deleted file mode 100644
index 8f55793e4..000000000
--- a/dashboard/exports/chips.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/chips/chips';
\ No newline at end of file
diff --git a/dashboard/exports/chips.js b/dashboard/exports/chips.js
deleted file mode 100644
index 436f3913c..000000000
--- a/dashboard/exports/chips.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/chips/chips"));
\ No newline at end of file
diff --git a/dashboard/exports/codehighlighter.d.ts b/dashboard/exports/codehighlighter.d.ts
deleted file mode 100644
index c8d5f58d9..000000000
--- a/dashboard/exports/codehighlighter.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/codehighlighter/codehighlighter';
\ No newline at end of file
diff --git a/dashboard/exports/codehighlighter.js b/dashboard/exports/codehighlighter.js
deleted file mode 100644
index d137e15ec..000000000
--- a/dashboard/exports/codehighlighter.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/codehighlighter/codehighlighter"));
\ No newline at end of file
diff --git a/dashboard/exports/colorpicker.d.ts b/dashboard/exports/colorpicker.d.ts
deleted file mode 100644
index 552c7d866..000000000
--- a/dashboard/exports/colorpicker.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/colorpicker/colorpicker';
\ No newline at end of file
diff --git a/dashboard/exports/colorpicker.js b/dashboard/exports/colorpicker.js
deleted file mode 100644
index 2dde45ecf..000000000
--- a/dashboard/exports/colorpicker.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/colorpicker/colorpicker"));
\ No newline at end of file
diff --git a/dashboard/exports/confirmdialog.d.ts b/dashboard/exports/confirmdialog.d.ts
deleted file mode 100644
index 23e6bfcc6..000000000
--- a/dashboard/exports/confirmdialog.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/confirmdialog/confirmdialog';
\ No newline at end of file
diff --git a/dashboard/exports/confirmdialog.js b/dashboard/exports/confirmdialog.js
deleted file mode 100644
index 02cf7970d..000000000
--- a/dashboard/exports/confirmdialog.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/confirmdialog/confirmdialog"));
\ No newline at end of file
diff --git a/dashboard/exports/contextmenu.d.ts b/dashboard/exports/contextmenu.d.ts
deleted file mode 100644
index 6f6f7add3..000000000
--- a/dashboard/exports/contextmenu.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/contextmenu/contextmenu';
\ No newline at end of file
diff --git a/dashboard/exports/contextmenu.js b/dashboard/exports/contextmenu.js
deleted file mode 100644
index e2eaf2350..000000000
--- a/dashboard/exports/contextmenu.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/contextmenu/contextmenu"));
\ No newline at end of file
diff --git a/dashboard/exports/datagrid.d.ts b/dashboard/exports/datagrid.d.ts
deleted file mode 100644
index ccbe60863..000000000
--- a/dashboard/exports/datagrid.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/datagrid/datagrid';
\ No newline at end of file
diff --git a/dashboard/exports/datagrid.js b/dashboard/exports/datagrid.js
deleted file mode 100644
index 012a164ee..000000000
--- a/dashboard/exports/datagrid.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/datagrid/datagrid"));
\ No newline at end of file
diff --git a/dashboard/exports/datalist.d.ts b/dashboard/exports/datalist.d.ts
deleted file mode 100644
index 1a2433b09..000000000
--- a/dashboard/exports/datalist.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/datalist/datalist';
\ No newline at end of file
diff --git a/dashboard/exports/datalist.js b/dashboard/exports/datalist.js
deleted file mode 100644
index 2e41aaa52..000000000
--- a/dashboard/exports/datalist.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/datalist/datalist"));
\ No newline at end of file
diff --git a/dashboard/exports/datascroller.d.ts b/dashboard/exports/datascroller.d.ts
deleted file mode 100644
index a2ac4baad..000000000
--- a/dashboard/exports/datascroller.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/datascroller/datascroller';
\ No newline at end of file
diff --git a/dashboard/exports/datascroller.js b/dashboard/exports/datascroller.js
deleted file mode 100644
index 4b5f82c5f..000000000
--- a/dashboard/exports/datascroller.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/datascroller/datascroller"));
\ No newline at end of file
diff --git a/dashboard/exports/datatable.d.ts b/dashboard/exports/datatable.d.ts
deleted file mode 100644
index cc9a4d1e2..000000000
--- a/dashboard/exports/datatable.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/datatable/datatable';
\ No newline at end of file
diff --git a/dashboard/exports/datatable.js b/dashboard/exports/datatable.js
deleted file mode 100644
index bab7d0f3e..000000000
--- a/dashboard/exports/datatable.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/datatable/datatable"));
\ No newline at end of file
diff --git a/dashboard/exports/dataview.d.ts b/dashboard/exports/dataview.d.ts
deleted file mode 100644
index 595fa964e..000000000
--- a/dashboard/exports/dataview.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/dataview/dataview';
\ No newline at end of file
diff --git a/dashboard/exports/dataview.js b/dashboard/exports/dataview.js
deleted file mode 100644
index ed0c29d23..000000000
--- a/dashboard/exports/dataview.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/dataview/dataview"));
\ No newline at end of file
diff --git a/dashboard/exports/defer.d.ts b/dashboard/exports/defer.d.ts
deleted file mode 100644
index 295dc29e1..000000000
--- a/dashboard/exports/defer.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/defer/defer';
\ No newline at end of file
diff --git a/dashboard/exports/defer.js b/dashboard/exports/defer.js
deleted file mode 100644
index 587cd4a05..000000000
--- a/dashboard/exports/defer.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/defer/defer"));
\ No newline at end of file
diff --git a/dashboard/exports/dialog.d.ts b/dashboard/exports/dialog.d.ts
deleted file mode 100644
index 319213f8a..000000000
--- a/dashboard/exports/dialog.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/dialog/dialog';
\ No newline at end of file
diff --git a/dashboard/exports/dialog.js b/dashboard/exports/dialog.js
deleted file mode 100644
index c618248a6..000000000
--- a/dashboard/exports/dialog.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/dialog/dialog"));
\ No newline at end of file
diff --git a/dashboard/exports/dragdrop.d.ts b/dashboard/exports/dragdrop.d.ts
deleted file mode 100644
index 42002ad67..000000000
--- a/dashboard/exports/dragdrop.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/dragdrop/dragdrop';
\ No newline at end of file
diff --git a/dashboard/exports/dragdrop.js b/dashboard/exports/dragdrop.js
deleted file mode 100644
index 6cf00b128..000000000
--- a/dashboard/exports/dragdrop.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/dragdrop/dragdrop"));
\ No newline at end of file
diff --git a/dashboard/exports/dropdown.d.ts b/dashboard/exports/dropdown.d.ts
deleted file mode 100644
index 59a9b3a7f..000000000
--- a/dashboard/exports/dropdown.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/dropdown/dropdown';
\ No newline at end of file
diff --git a/dashboard/exports/dropdown.js b/dashboard/exports/dropdown.js
deleted file mode 100644
index c9df1e3fe..000000000
--- a/dashboard/exports/dropdown.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/dropdown/dropdown"));
\ No newline at end of file
diff --git a/dashboard/exports/editor.d.ts b/dashboard/exports/editor.d.ts
deleted file mode 100644
index 8a147719b..000000000
--- a/dashboard/exports/editor.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/editor/editor';
\ No newline at end of file
diff --git a/dashboard/exports/editor.js b/dashboard/exports/editor.js
deleted file mode 100644
index ee153ec23..000000000
--- a/dashboard/exports/editor.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/editor/editor"));
\ No newline at end of file
diff --git a/dashboard/exports/fieldset.d.ts b/dashboard/exports/fieldset.d.ts
deleted file mode 100644
index c7e44238a..000000000
--- a/dashboard/exports/fieldset.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/fieldset/fieldset';
\ No newline at end of file
diff --git a/dashboard/exports/fieldset.js b/dashboard/exports/fieldset.js
deleted file mode 100644
index be4397a07..000000000
--- a/dashboard/exports/fieldset.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/fieldset/fieldset"));
\ No newline at end of file
diff --git a/dashboard/exports/fileupload.d.ts b/dashboard/exports/fileupload.d.ts
deleted file mode 100644
index 2c5b61d27..000000000
--- a/dashboard/exports/fileupload.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/fileupload/fileupload';
\ No newline at end of file
diff --git a/dashboard/exports/fileupload.js b/dashboard/exports/fileupload.js
deleted file mode 100644
index f6d989a36..000000000
--- a/dashboard/exports/fileupload.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/fileupload/fileupload"));
\ No newline at end of file
diff --git a/dashboard/exports/galleria.d.ts b/dashboard/exports/galleria.d.ts
deleted file mode 100644
index 5355b48d8..000000000
--- a/dashboard/exports/galleria.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/galleria/galleria';
\ No newline at end of file
diff --git a/dashboard/exports/galleria.js b/dashboard/exports/galleria.js
deleted file mode 100644
index 0dbf04949..000000000
--- a/dashboard/exports/galleria.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/galleria/galleria"));
\ No newline at end of file
diff --git a/dashboard/exports/gmap.d.ts b/dashboard/exports/gmap.d.ts
deleted file mode 100644
index 11cba6531..000000000
--- a/dashboard/exports/gmap.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/gmap/gmap';
\ No newline at end of file
diff --git a/dashboard/exports/gmap.js b/dashboard/exports/gmap.js
deleted file mode 100644
index b89a2c90e..000000000
--- a/dashboard/exports/gmap.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/gmap/gmap"));
\ No newline at end of file
diff --git a/dashboard/exports/growl.d.ts b/dashboard/exports/growl.d.ts
deleted file mode 100644
index 0892d8792..000000000
--- a/dashboard/exports/growl.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/growl/growl';
\ No newline at end of file
diff --git a/dashboard/exports/growl.js b/dashboard/exports/growl.js
deleted file mode 100644
index dca7b5e94..000000000
--- a/dashboard/exports/growl.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/growl/growl"));
\ No newline at end of file
diff --git a/dashboard/exports/inplace.d.ts b/dashboard/exports/inplace.d.ts
deleted file mode 100644
index 1b1b4c02a..000000000
--- a/dashboard/exports/inplace.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/inplace/inplace';
\ No newline at end of file
diff --git a/dashboard/exports/inplace.js b/dashboard/exports/inplace.js
deleted file mode 100644
index c5c6847e5..000000000
--- a/dashboard/exports/inplace.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/inplace/inplace"));
\ No newline at end of file
diff --git a/dashboard/exports/inputmask.d.ts b/dashboard/exports/inputmask.d.ts
deleted file mode 100644
index 05a587e78..000000000
--- a/dashboard/exports/inputmask.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/inputmask/inputmask';
\ No newline at end of file
diff --git a/dashboard/exports/inputmask.js b/dashboard/exports/inputmask.js
deleted file mode 100644
index 14864e4c1..000000000
--- a/dashboard/exports/inputmask.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/inputmask/inputmask"));
\ No newline at end of file
diff --git a/dashboard/exports/inputswitch.d.ts b/dashboard/exports/inputswitch.d.ts
deleted file mode 100644
index 4ff45dfbb..000000000
--- a/dashboard/exports/inputswitch.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/inputswitch/inputswitch';
\ No newline at end of file
diff --git a/dashboard/exports/inputswitch.js b/dashboard/exports/inputswitch.js
deleted file mode 100644
index 61301252c..000000000
--- a/dashboard/exports/inputswitch.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/inputswitch/inputswitch"));
\ No newline at end of file
diff --git a/dashboard/exports/inputtext.d.ts b/dashboard/exports/inputtext.d.ts
deleted file mode 100644
index 3359c9c70..000000000
--- a/dashboard/exports/inputtext.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/inputtext/inputtext';
\ No newline at end of file
diff --git a/dashboard/exports/inputtext.js b/dashboard/exports/inputtext.js
deleted file mode 100644
index 84752274d..000000000
--- a/dashboard/exports/inputtext.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/inputtext/inputtext"));
\ No newline at end of file
diff --git a/dashboard/exports/inputtextarea.d.ts b/dashboard/exports/inputtextarea.d.ts
deleted file mode 100644
index 76331c7e0..000000000
--- a/dashboard/exports/inputtextarea.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/inputtextarea/inputtextarea';
\ No newline at end of file
diff --git a/dashboard/exports/inputtextarea.js b/dashboard/exports/inputtextarea.js
deleted file mode 100644
index 99ade804c..000000000
--- a/dashboard/exports/inputtextarea.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/inputtextarea/inputtextarea"));
\ No newline at end of file
diff --git a/dashboard/exports/keyfilter.d.ts b/dashboard/exports/keyfilter.d.ts
deleted file mode 100644
index c45db1f27..000000000
--- a/dashboard/exports/keyfilter.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/keyfilter/keyfilter';
\ No newline at end of file
diff --git a/dashboard/exports/keyfilter.js b/dashboard/exports/keyfilter.js
deleted file mode 100644
index f974d6867..000000000
--- a/dashboard/exports/keyfilter.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/keyfilter/keyfilter"));
\ No newline at end of file
diff --git a/dashboard/exports/lightbox.d.ts b/dashboard/exports/lightbox.d.ts
deleted file mode 100644
index 4fecd3bba..000000000
--- a/dashboard/exports/lightbox.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/lightbox/lightbox';
\ No newline at end of file
diff --git a/dashboard/exports/lightbox.js b/dashboard/exports/lightbox.js
deleted file mode 100644
index c81b75360..000000000
--- a/dashboard/exports/lightbox.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/lightbox/lightbox"));
\ No newline at end of file
diff --git a/dashboard/exports/listbox.d.ts b/dashboard/exports/listbox.d.ts
deleted file mode 100644
index b7519c1d2..000000000
--- a/dashboard/exports/listbox.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/listbox/listbox';
\ No newline at end of file
diff --git a/dashboard/exports/listbox.js b/dashboard/exports/listbox.js
deleted file mode 100644
index de5ff0317..000000000
--- a/dashboard/exports/listbox.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/listbox/listbox"));
\ No newline at end of file
diff --git a/dashboard/exports/megamenu.d.ts b/dashboard/exports/megamenu.d.ts
deleted file mode 100644
index 56b7dc67c..000000000
--- a/dashboard/exports/megamenu.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/megamenu/megamenu';
\ No newline at end of file
diff --git a/dashboard/exports/megamenu.js b/dashboard/exports/megamenu.js
deleted file mode 100644
index 9c93b4cee..000000000
--- a/dashboard/exports/megamenu.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/megamenu/megamenu"));
\ No newline at end of file
diff --git a/dashboard/exports/menu.d.ts b/dashboard/exports/menu.d.ts
deleted file mode 100644
index 2098c7a80..000000000
--- a/dashboard/exports/menu.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/menu/menu';
\ No newline at end of file
diff --git a/dashboard/exports/menu.js b/dashboard/exports/menu.js
deleted file mode 100644
index ccb487dca..000000000
--- a/dashboard/exports/menu.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/menu/menu"));
\ No newline at end of file
diff --git a/dashboard/exports/menubar.d.ts b/dashboard/exports/menubar.d.ts
deleted file mode 100644
index c841483f2..000000000
--- a/dashboard/exports/menubar.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/menubar/menubar';
\ No newline at end of file
diff --git a/dashboard/exports/menubar.js b/dashboard/exports/menubar.js
deleted file mode 100644
index 6fb64bb2c..000000000
--- a/dashboard/exports/menubar.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/menubar/menubar"));
\ No newline at end of file
diff --git a/dashboard/exports/message.d.ts b/dashboard/exports/message.d.ts
deleted file mode 100644
index 530a8bc60..000000000
--- a/dashboard/exports/message.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/message/message';
\ No newline at end of file
diff --git a/dashboard/exports/message.js b/dashboard/exports/message.js
deleted file mode 100644
index cfdc590ea..000000000
--- a/dashboard/exports/message.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/message/message"));
\ No newline at end of file
diff --git a/dashboard/exports/messages.d.ts b/dashboard/exports/messages.d.ts
deleted file mode 100644
index 4c034ca49..000000000
--- a/dashboard/exports/messages.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/messages/messages';
\ No newline at end of file
diff --git a/dashboard/exports/messages.js b/dashboard/exports/messages.js
deleted file mode 100644
index e7cdbf25f..000000000
--- a/dashboard/exports/messages.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/messages/messages"));
\ No newline at end of file
diff --git a/dashboard/exports/multiselect.d.ts b/dashboard/exports/multiselect.d.ts
deleted file mode 100644
index 7bda86c6b..000000000
--- a/dashboard/exports/multiselect.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/multiselect/multiselect';
\ No newline at end of file
diff --git a/dashboard/exports/multiselect.js b/dashboard/exports/multiselect.js
deleted file mode 100644
index c0ad550f3..000000000
--- a/dashboard/exports/multiselect.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/multiselect/multiselect"));
\ No newline at end of file
diff --git a/dashboard/exports/orderlist.d.ts b/dashboard/exports/orderlist.d.ts
deleted file mode 100644
index 90edacb80..000000000
--- a/dashboard/exports/orderlist.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/orderlist/orderlist';
\ No newline at end of file
diff --git a/dashboard/exports/orderlist.js b/dashboard/exports/orderlist.js
deleted file mode 100644
index dc34b4daf..000000000
--- a/dashboard/exports/orderlist.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/orderlist/orderlist"));
\ No newline at end of file
diff --git a/dashboard/exports/organizationchart.d.ts b/dashboard/exports/organizationchart.d.ts
deleted file mode 100644
index 6ea484fbd..000000000
--- a/dashboard/exports/organizationchart.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/organizationchart/organizationchart';
\ No newline at end of file
diff --git a/dashboard/exports/organizationchart.js b/dashboard/exports/organizationchart.js
deleted file mode 100644
index 707856b17..000000000
--- a/dashboard/exports/organizationchart.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/organizationchart/organizationchart"));
\ No newline at end of file
diff --git a/dashboard/exports/overlaypanel.d.ts b/dashboard/exports/overlaypanel.d.ts
deleted file mode 100644
index b024ecb06..000000000
--- a/dashboard/exports/overlaypanel.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/overlaypanel/overlaypanel';
\ No newline at end of file
diff --git a/dashboard/exports/overlaypanel.js b/dashboard/exports/overlaypanel.js
deleted file mode 100644
index 9270ed15b..000000000
--- a/dashboard/exports/overlaypanel.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/overlaypanel/overlaypanel"));
\ No newline at end of file
diff --git a/dashboard/exports/paginator.d.ts b/dashboard/exports/paginator.d.ts
deleted file mode 100644
index 786177c39..000000000
--- a/dashboard/exports/paginator.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/paginator/paginator';
\ No newline at end of file
diff --git a/dashboard/exports/paginator.js b/dashboard/exports/paginator.js
deleted file mode 100644
index f81ca12ae..000000000
--- a/dashboard/exports/paginator.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/paginator/paginator"));
\ No newline at end of file
diff --git a/dashboard/exports/panel.d.ts b/dashboard/exports/panel.d.ts
deleted file mode 100644
index 2d97c4f7a..000000000
--- a/dashboard/exports/panel.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/panel/panel';
\ No newline at end of file
diff --git a/dashboard/exports/panel.js b/dashboard/exports/panel.js
deleted file mode 100644
index a0ea4b6cb..000000000
--- a/dashboard/exports/panel.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/panel/panel"));
\ No newline at end of file
diff --git a/dashboard/exports/panelmenu.d.ts b/dashboard/exports/panelmenu.d.ts
deleted file mode 100644
index 2fda895ee..000000000
--- a/dashboard/exports/panelmenu.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/panelmenu/panelmenu';
\ No newline at end of file
diff --git a/dashboard/exports/panelmenu.js b/dashboard/exports/panelmenu.js
deleted file mode 100644
index 4f11922e8..000000000
--- a/dashboard/exports/panelmenu.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/panelmenu/panelmenu"));
\ No newline at end of file
diff --git a/dashboard/exports/password.d.ts b/dashboard/exports/password.d.ts
deleted file mode 100644
index 14befa5e3..000000000
--- a/dashboard/exports/password.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/password/password';
\ No newline at end of file
diff --git a/dashboard/exports/password.js b/dashboard/exports/password.js
deleted file mode 100644
index f6f08f053..000000000
--- a/dashboard/exports/password.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/password/password"));
\ No newline at end of file
diff --git a/dashboard/exports/picklist.d.ts b/dashboard/exports/picklist.d.ts
deleted file mode 100644
index 00d26f555..000000000
--- a/dashboard/exports/picklist.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/picklist/picklist';
\ No newline at end of file
diff --git a/dashboard/exports/picklist.js b/dashboard/exports/picklist.js
deleted file mode 100644
index ccb03f180..000000000
--- a/dashboard/exports/picklist.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/picklist/picklist"));
\ No newline at end of file
diff --git a/dashboard/exports/progressbar.d.ts b/dashboard/exports/progressbar.d.ts
deleted file mode 100644
index ec5a777e3..000000000
--- a/dashboard/exports/progressbar.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/progressbar/progressbar';
\ No newline at end of file
diff --git a/dashboard/exports/progressbar.js b/dashboard/exports/progressbar.js
deleted file mode 100644
index e21a9299f..000000000
--- a/dashboard/exports/progressbar.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/progressbar/progressbar"));
\ No newline at end of file
diff --git a/dashboard/exports/progressspinner.d.ts b/dashboard/exports/progressspinner.d.ts
deleted file mode 100644
index 857379f33..000000000
--- a/dashboard/exports/progressspinner.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/progressspinner/progressspinner';
\ No newline at end of file
diff --git a/dashboard/exports/progressspinner.js b/dashboard/exports/progressspinner.js
deleted file mode 100644
index 523742c94..000000000
--- a/dashboard/exports/progressspinner.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/progressspinner/progressspinner"));
\ No newline at end of file
diff --git a/dashboard/exports/radiobutton.d.ts b/dashboard/exports/radiobutton.d.ts
deleted file mode 100644
index 8969af7db..000000000
--- a/dashboard/exports/radiobutton.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/radiobutton/radiobutton';
\ No newline at end of file
diff --git a/dashboard/exports/radiobutton.js b/dashboard/exports/radiobutton.js
deleted file mode 100644
index f99063786..000000000
--- a/dashboard/exports/radiobutton.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/radiobutton/radiobutton"));
\ No newline at end of file
diff --git a/dashboard/exports/rating.d.ts b/dashboard/exports/rating.d.ts
deleted file mode 100644
index 8f352d26b..000000000
--- a/dashboard/exports/rating.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/rating/rating';
\ No newline at end of file
diff --git a/dashboard/exports/rating.js b/dashboard/exports/rating.js
deleted file mode 100644
index 89a99275f..000000000
--- a/dashboard/exports/rating.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/rating/rating"));
\ No newline at end of file
diff --git a/dashboard/exports/schedule.d.ts b/dashboard/exports/schedule.d.ts
deleted file mode 100644
index 6af565faf..000000000
--- a/dashboard/exports/schedule.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/schedule/schedule';
\ No newline at end of file
diff --git a/dashboard/exports/schedule.js b/dashboard/exports/schedule.js
deleted file mode 100644
index eaadb03e9..000000000
--- a/dashboard/exports/schedule.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/schedule/schedule"));
\ No newline at end of file
diff --git a/dashboard/exports/scrollpanel.d.ts b/dashboard/exports/scrollpanel.d.ts
deleted file mode 100644
index edb73e68a..000000000
--- a/dashboard/exports/scrollpanel.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/scrollpanel/scrollpanel';
\ No newline at end of file
diff --git a/dashboard/exports/scrollpanel.js b/dashboard/exports/scrollpanel.js
deleted file mode 100644
index 41986a4b4..000000000
--- a/dashboard/exports/scrollpanel.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/scrollpanel/scrollpanel"));
\ No newline at end of file
diff --git a/dashboard/exports/selectbutton.d.ts b/dashboard/exports/selectbutton.d.ts
deleted file mode 100644
index 2f3e809af..000000000
--- a/dashboard/exports/selectbutton.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/selectbutton/selectbutton';
\ No newline at end of file
diff --git a/dashboard/exports/selectbutton.js b/dashboard/exports/selectbutton.js
deleted file mode 100644
index 30524f893..000000000
--- a/dashboard/exports/selectbutton.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/selectbutton/selectbutton"));
\ No newline at end of file
diff --git a/dashboard/exports/shared.d.ts b/dashboard/exports/shared.d.ts
deleted file mode 100644
index 80786466f..000000000
--- a/dashboard/exports/shared.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/common/shared';
\ No newline at end of file
diff --git a/dashboard/exports/shared.js b/dashboard/exports/shared.js
deleted file mode 100644
index 4ae5ca2e6..000000000
--- a/dashboard/exports/shared.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/common/shared"));
\ No newline at end of file
diff --git a/dashboard/exports/sidebar.d.ts b/dashboard/exports/sidebar.d.ts
deleted file mode 100644
index 28aa57888..000000000
--- a/dashboard/exports/sidebar.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/sidebar/sidebar';
\ No newline at end of file
diff --git a/dashboard/exports/sidebar.js b/dashboard/exports/sidebar.js
deleted file mode 100644
index 65e1457d8..000000000
--- a/dashboard/exports/sidebar.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/sidebar/sidebar"));
\ No newline at end of file
diff --git a/dashboard/exports/slidemenu.d.ts b/dashboard/exports/slidemenu.d.ts
deleted file mode 100644
index 8337e345a..000000000
--- a/dashboard/exports/slidemenu.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/slidemenu/slidemenu';
\ No newline at end of file
diff --git a/dashboard/exports/slidemenu.js b/dashboard/exports/slidemenu.js
deleted file mode 100644
index 1640a183a..000000000
--- a/dashboard/exports/slidemenu.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/slidemenu/slidemenu"));
\ No newline at end of file
diff --git a/dashboard/exports/slider.d.ts b/dashboard/exports/slider.d.ts
deleted file mode 100644
index daa647ed1..000000000
--- a/dashboard/exports/slider.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/slider/slider';
\ No newline at end of file
diff --git a/dashboard/exports/slider.js b/dashboard/exports/slider.js
deleted file mode 100644
index 76d0b2629..000000000
--- a/dashboard/exports/slider.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/slider/slider"));
\ No newline at end of file
diff --git a/dashboard/exports/spinner.d.ts b/dashboard/exports/spinner.d.ts
deleted file mode 100644
index ef0c15147..000000000
--- a/dashboard/exports/spinner.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/spinner/spinner';
\ No newline at end of file
diff --git a/dashboard/exports/spinner.js b/dashboard/exports/spinner.js
deleted file mode 100644
index 5feafe33b..000000000
--- a/dashboard/exports/spinner.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/spinner/spinner"));
\ No newline at end of file
diff --git a/dashboard/exports/splitbutton.d.ts b/dashboard/exports/splitbutton.d.ts
deleted file mode 100644
index 1c84d1712..000000000
--- a/dashboard/exports/splitbutton.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/splitbutton/splitbutton';
\ No newline at end of file
diff --git a/dashboard/exports/splitbutton.js b/dashboard/exports/splitbutton.js
deleted file mode 100644
index 343d9cc50..000000000
--- a/dashboard/exports/splitbutton.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/splitbutton/splitbutton"));
\ No newline at end of file
diff --git a/dashboard/exports/steps.d.ts b/dashboard/exports/steps.d.ts
deleted file mode 100644
index 2f4735fa7..000000000
--- a/dashboard/exports/steps.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/steps/steps';
\ No newline at end of file
diff --git a/dashboard/exports/steps.js b/dashboard/exports/steps.js
deleted file mode 100644
index 7119f35d2..000000000
--- a/dashboard/exports/steps.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/steps/steps"));
\ No newline at end of file
diff --git a/dashboard/exports/table.d.ts b/dashboard/exports/table.d.ts
deleted file mode 100644
index c171708f7..000000000
--- a/dashboard/exports/table.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/table/table';
\ No newline at end of file
diff --git a/dashboard/exports/table.js b/dashboard/exports/table.js
deleted file mode 100644
index cbd8e99ca..000000000
--- a/dashboard/exports/table.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/table/table"));
\ No newline at end of file
diff --git a/dashboard/exports/tabmenu.d.ts b/dashboard/exports/tabmenu.d.ts
deleted file mode 100644
index 3c519f064..000000000
--- a/dashboard/exports/tabmenu.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/tabmenu/tabmenu';
\ No newline at end of file
diff --git a/dashboard/exports/tabmenu.js b/dashboard/exports/tabmenu.js
deleted file mode 100644
index a76ba2be9..000000000
--- a/dashboard/exports/tabmenu.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/tabmenu/tabmenu"));
\ No newline at end of file
diff --git a/dashboard/exports/tabview.d.ts b/dashboard/exports/tabview.d.ts
deleted file mode 100644
index 7e74bf4f8..000000000
--- a/dashboard/exports/tabview.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/tabview/tabview';
\ No newline at end of file
diff --git a/dashboard/exports/tabview.js b/dashboard/exports/tabview.js
deleted file mode 100644
index ce6daf5df..000000000
--- a/dashboard/exports/tabview.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/tabview/tabview"));
\ No newline at end of file
diff --git a/dashboard/exports/terminal.d.ts b/dashboard/exports/terminal.d.ts
deleted file mode 100644
index b597ebde8..000000000
--- a/dashboard/exports/terminal.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/terminal/terminal';
\ No newline at end of file
diff --git a/dashboard/exports/terminal.js b/dashboard/exports/terminal.js
deleted file mode 100644
index 1f5049d3d..000000000
--- a/dashboard/exports/terminal.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/terminal/terminal"));
\ No newline at end of file
diff --git a/dashboard/exports/tieredmenu.d.ts b/dashboard/exports/tieredmenu.d.ts
deleted file mode 100644
index 8781fdda4..000000000
--- a/dashboard/exports/tieredmenu.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/tieredmenu/tieredmenu';
\ No newline at end of file
diff --git a/dashboard/exports/tieredmenu.js b/dashboard/exports/tieredmenu.js
deleted file mode 100644
index c2920695b..000000000
--- a/dashboard/exports/tieredmenu.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/tieredmenu/tieredmenu"));
\ No newline at end of file
diff --git a/dashboard/exports/togglebutton.d.ts b/dashboard/exports/togglebutton.d.ts
deleted file mode 100644
index eec3875eb..000000000
--- a/dashboard/exports/togglebutton.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/togglebutton/togglebutton';
\ No newline at end of file
diff --git a/dashboard/exports/togglebutton.js b/dashboard/exports/togglebutton.js
deleted file mode 100644
index 78f25a189..000000000
--- a/dashboard/exports/togglebutton.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/togglebutton/togglebutton"));
\ No newline at end of file
diff --git a/dashboard/exports/toolbar.d.ts b/dashboard/exports/toolbar.d.ts
deleted file mode 100644
index 35b9790fd..000000000
--- a/dashboard/exports/toolbar.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/toolbar/toolbar';
\ No newline at end of file
diff --git a/dashboard/exports/toolbar.js b/dashboard/exports/toolbar.js
deleted file mode 100644
index 88b5112fa..000000000
--- a/dashboard/exports/toolbar.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/toolbar/toolbar"));
\ No newline at end of file
diff --git a/dashboard/exports/tooltip.d.ts b/dashboard/exports/tooltip.d.ts
deleted file mode 100644
index b188f0d2d..000000000
--- a/dashboard/exports/tooltip.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/tooltip/tooltip';
\ No newline at end of file
diff --git a/dashboard/exports/tooltip.js b/dashboard/exports/tooltip.js
deleted file mode 100644
index 270701079..000000000
--- a/dashboard/exports/tooltip.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/tooltip/tooltip"));
\ No newline at end of file
diff --git a/dashboard/exports/tree.d.ts b/dashboard/exports/tree.d.ts
deleted file mode 100644
index c6c79854d..000000000
--- a/dashboard/exports/tree.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/tree/tree';
\ No newline at end of file
diff --git a/dashboard/exports/tree.js b/dashboard/exports/tree.js
deleted file mode 100644
index 2f111e9ab..000000000
--- a/dashboard/exports/tree.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/tree/tree"));
\ No newline at end of file
diff --git a/dashboard/exports/treetable.d.ts b/dashboard/exports/treetable.d.ts
deleted file mode 100644
index 3e3ce3e46..000000000
--- a/dashboard/exports/treetable.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/treetable/treetable';
\ No newline at end of file
diff --git a/dashboard/exports/treetable.js b/dashboard/exports/treetable.js
deleted file mode 100644
index c1eb56bba..000000000
--- a/dashboard/exports/treetable.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/treetable/treetable"));
\ No newline at end of file
diff --git a/dashboard/exports/tristatecheckbox.d.ts b/dashboard/exports/tristatecheckbox.d.ts
deleted file mode 100644
index 70e6e5065..000000000
--- a/dashboard/exports/tristatecheckbox.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './components/tristatecheckbox/tristatecheckbox';
\ No newline at end of file
diff --git a/dashboard/exports/tristatecheckbox.js b/dashboard/exports/tristatecheckbox.js
deleted file mode 100644
index 68ec104a4..000000000
--- a/dashboard/exports/tristatecheckbox.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Shorthand */
-"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./components/tristatecheckbox/tristatecheckbox"));
\ No newline at end of file
diff --git a/dashboard/gulpfile.js b/dashboard/gulpfile.js
deleted file mode 100644
index a2eb160dd..000000000
--- a/dashboard/gulpfile.js
+++ /dev/null
@@ -1,62 +0,0 @@
-'use strict';
-
-var gulp = require('gulp'),
- concat = require('gulp-concat'),
- uglifycss = require('gulp-uglifycss'),
- rename = require('gulp-rename'),
- del = require('del'),
- flatten = require('gulp-flatten');
-
-gulp.task('build-css', function() {
- gulp.src([
- 'src/app/components/common/common.scss',
- 'src/app/components/**/*.css'
- ])
- .pipe(concat('primeng.css'))
- .pipe(gulp.dest('resources'));
-});
-
-gulp.task('build-css-prod', function() {
- gulp.src([
- 'src/app/components/common/common.scss',
- 'src/app/components/**/*.css'
- ])
- .pipe(concat('primeng.css'))
- .pipe(gulp.dest('resources'))
- .pipe(uglifycss({"uglyComments": true}))
- .pipe(rename('primeng.min.css'))
- .pipe(gulp.dest('resources'));
-});
-
-gulp.task('copy-component-css', function () {
- gulp.src([
- 'src/app/components/**/*.css'
- ])
- .pipe(gulp.dest('resources/components'));
-});
-
-gulp.task('images', function() {
- return gulp.src(['src/app/components/**/images/*.png', 'src/app/components/**/images/*.gif'])
- .pipe(flatten())
- .pipe(gulp.dest('resources/images'));
-});
-
-gulp.task('themes', function() {
- return gulp.src(['src/assets/components/themes/**/*'])
- .pipe(gulp.dest('resources/themes'));
-});
-
-gulp.task('build-exports', function() {
- return gulp.src(['exports/*.js','exports/*.d.ts'])
- .pipe(gulp.dest('./'));
-});
-
-//Cleaning previous gulp tasks from project
-gulp.task('clean', function() {
- del(['resources']);
-});
-
-//Building project with run sequence
-gulp.task('build-assets', ['clean','copy-component-css', 'build-css-prod', 'images', 'themes']);
-
-
\ No newline at end of file
diff --git a/dashboard/image_builder.sh b/dashboard/image_builder.sh
deleted file mode 100644
index d7b2b9acb..000000000
--- a/dashboard/image_builder.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/bash
-
-# Copyright (c) 2018 Huawei Technologies Co., Ltd. All Rights Reserved.
-#
-# Licensed 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.
-
-if [[ "X$1" == "X--rebuild" ]]; then
- npm rebuild node-sass --force
-fi
-
-npm install --unsafe-perm -g @angular/cli@1.7.4
-npm install --unsafe-perm
-ng build --prod
-
-cp -R ./dist/* /var/www/html/
-
-cat > /etc/nginx/sites-available/default <
-
-
-
-
-
-
-
-
-
-
default_region{{ currentTenant }}
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/dashboard/src/app/app.component.ts b/dashboard/src/app/app.component.ts
deleted file mode 100644
index 42a8b561b..000000000
--- a/dashboard/src/app/app.component.ts
+++ /dev/null
@@ -1,445 +0,0 @@
-import { Component, OnInit, ViewContainerRef, ViewChild, Directive, ElementRef, HostBinding, HostListener, AfterViewInit } from '@angular/core';
-import { Http } from '@angular/http';
-import { Router } from '@angular/router';
-import { I18NService, Consts, ParamStorService } from 'app/shared/api';
-// import { AppService } from 'app/app.service';
-import { I18nPluralPipe } from '@angular/common';
-import { MenuItem, SelectItem } from './components/common/api';
-
-@Component({
- selector: 'app-root',
- templateUrl: './app.component.html',
- styleUrls: []
-})
-export class AppComponent implements OnInit, AfterViewInit{
- chromeBrowser: boolean = false;
-
- isLogin: boolean;
-
- hideLoginForm: boolean = false;
-
- linkUrl = "";
-
- username: string;
-
- password: string;
-
- dropMenuItems: MenuItem[];
-
- currentTenant: string="";
-
- showLoginAnimation: boolean=false;
-
- showLogoutAnimation: boolean=false;
- currentTime=new Date().getTime();
- lastTime=new Date().getTime();
- minExpireTime = 2 * 60 * 1000;
- advanceRefreshTime = 1*60*1000;
- defaultExpireTime = 10*60*1000;
- interval:any;
- intervalRefreshToken:any;
- showErrorMsg:boolean=false;
- errorMsg:string="";
-
- tenantItems = [];
-
- menuItems = [];
-
- menuItems_tenant = [
- {
- "title": "Home",
- "description": "Resources statistics",
- "routerLink": "/home"
- },
- {
- "title": "Volume",
- "description": "Block storage resources",
- "routerLink": "/block"
- }
- ]
-
- menuItems_admin = [
- {
- "title": "Home",
- "description": "Resources statistics",
- "routerLink": "/home"
- },
- {
- "title": "Volume",
- "description": "Block storage resources",
- "routerLink": "/block"
- },
- // {
- // "title": "Multi-Cloud Service",
- // "description": "5 replications, 1 migrations",
- // "routerLink": "/cloud"
- // },
- {
- "title": "Profile",
- "description": "Block profiles",
- "routerLink": "/profile"
- },
- {
- "title": "Resource",
- "description": "Regions, availability zones and storages",
- "routerLink": "/resource"
- },
- {
- "title": "Identity",
- "description": "Managing tenants and users",
- "routerLink": "/identity"
- }
- ];
-
- activeItem: any;
-
- private msgs: any = [{ severity: 'warn', summary: 'Warn Message', detail: 'There are unsaved changes'}];
-
- constructor(
- private el: ElementRef,
- private viewContainerRef: ViewContainerRef,
- private http: Http,
- private router: Router,
- private paramStor: ParamStorService,
- public I18N: I18NService
- ){}
-
- ngOnInit() {
- let currentUserInfo = this.paramStor.CURRENT_USER();
- if(currentUserInfo != undefined && currentUserInfo != ""){
- this.hideLoginForm = true;
-
- let [username, userid, tenantname, tenantid] = [
- this.paramStor.CURRENT_USER().split("|")[0],
- this.paramStor.CURRENT_USER().split("|")[1],
- this.paramStor.CURRENT_TENANT().split("|")[0],
- this.paramStor.CURRENT_TENANT().split("|")[1] ];
- this.AuthWithTokenScoped({'name': username, 'id': userid});
- }else{
- this.isLogin = false;
- this.hideLoginForm = false;
- }
- }
- checkTimeOut(){
- this.currentTime = new Date().getTime(); //update current time
- let timeout = this.paramStor.TOKEN_PERIOD() ? this.paramStor.TOKEN_PERIOD() : this.defaultExpireTime;
- if(this.currentTime - this.lastTime > timeout){ //check time out
- this.logout();
- }
- }
- refreshLastTime(){
- this.lastTime = new Date().getTime();
- }
- /**
- * this function must be called after AuthWithTokenScoped succeed ,because it need username and password
- */
- refreshToken(){
- let request: any = { auth: {} };
- request.auth = {
- "identity": {
- "methods": [
- "password"
- ],
- "password":{
- "user": {
- "name": this.paramStor.CURRENT_USER().split("|")[0],
- "domain": {
- "name": "Default"
- },
- "password": this.paramStor.PASSWORD()
- }
- }
- }
- }
-
- this.http.post("/v3/auth/tokens", request).subscribe((res)=>{
- let token_id = res.headers.get('x-subject-token');
- let projectName = this.paramStor.CURRENT_TENANT().split("|")[0];
- let req: any = { auth: {} };
- req.auth = {
- "identity": {
- "methods": [
- "token"
- ],
- "token": {
- "id": token_id
- }
- },
- "scope": {
- "project": {
- "name": projectName,
- "domain": { "id": "default" }
- }
- }
- }
-
- this.http.post("/v3/auth/tokens", req).subscribe((r)=>{
- this.paramStor.AUTH_TOKEN( r.headers.get('x-subject-token') );
- });
- },
- error=>{
- console.log("Username or password incorrect.")
- });
- }
- ngAfterViewInit(){
- this.loginBgAnimation();
- }
-
- loginBgAnimation(){
- let obj =this.el.nativeElement.querySelector(".login-bg");
- if(obj){
- let obj_w = obj.clientWidth;
- let obj_h = obj.clientHeight;
- let dis = 50;
- obj.addEventListener("mousemove", (e)=>{
- let MX = e.clientX;
- let MY = e.clientY;
- let offsetX = (obj_w - 2258)*0.5 + (obj_w-MX)*dis / obj_w;
- let offsetY = (obj_h - 1363)*0.5 + (obj_h-MY)*dis / obj_h;
- obj.style.backgroundPositionX = offsetX +"px";
- obj.style.backgroundPositionY = offsetY +"px";
- })
- }
- }
-
- login() {
- let request: any = { auth: {} };
- request.auth = {
- "identity": {
- "methods": [
- "password"
- ],
- "password":{
- "user": {
- "name": this.username,
- "domain": {
- "name": "Default"
- },
- "password": this.password
- }
- }
- }
- }
-
- this.http.post("/v3/auth/tokens", request).subscribe((res)=>{
- //set token period start
- let token = res.json().token;
- let expires_at = token.expires_at;
- let issued_at = token.issued_at;
- let tokenPeriod = Date.parse(expires_at) - Date.parse(issued_at);
- if(tokenPeriod >= this.minExpireTime){
- this.paramStor.TOKEN_PERIOD(tokenPeriod);
- }
- //set token period end
- this.paramStor.AUTH_TOKEN(res.headers.get('x-subject-token'));
- this.paramStor.PASSWORD(this.password);
- let user = res.json().token.user;
- this.AuthWithTokenScoped(user);
- this.showErrorMsg = false;
- },
- error=>{
- switch(error.status){
- case 401:
- this.errorMsg = this.I18N.keyID['sds_login_error_msg_401'];
- break;
- case 503:
- this.errorMsg = this.I18N.keyID['sds_login_error_msg_503'];
- break;
- default:
- this.errorMsg = this.I18N.keyID['sds_login_error_msg_default'];
- }
- this.showErrorMsg = true;
- });
- }
-
- AuthWithTokenScoped(user, tenant?){
- if(this.interval){
- clearInterval(this.interval);
- }
- this.lastTime=new Date().getTime();
- this.interval = window.setInterval(()=>{
- this.checkTimeOut()
- }, 10000);
- // Get user owned tenants
- let reqUser: any = { params:{} };
- this.http.get("/v3/users/"+ user.id +"/projects", reqUser).subscribe((objRES) => {
- let projects = objRES.json().projects;
- let defaultProject = user.name != 'admin' ? projects[0] : projects.filter((project) => { return project.name == 'admin'})[0];
- let project = tenant===undefined ? defaultProject : tenant;
-
- this.tenantItems = [];
- projects.map(item => {
- let tenantItemObj = {};
- tenantItemObj["label"] = item.name;
- tenantItemObj["command"] = ()=>{
- let username = this.paramStor.CURRENT_USER().split("|")[0];
- let userid = this.paramStor.CURRENT_USER().split("|")[1];
- this.AuthWithTokenScoped({'name': username, 'id': userid}, item);
- };
- this.tenantItems.push(tenantItemObj);
- })
-
- // Get token authentication with scoped
- let token_id = this.paramStor.AUTH_TOKEN();
- let req: any = { auth: {} };
- req.auth = {
- "identity": {
- "methods": [
- "token"
- ],
- "token": {
- "id": token_id
- }
- },
- "scope": {
- "project": {
- "name": project.name,
- "domain": { "id": "default" }
- }
- }
- }
-
- this.http.post("/v3/auth/tokens", req).subscribe((r)=>{
- this.paramStor.AUTH_TOKEN( r.headers.get('x-subject-token') );
- this.paramStor.CURRENT_TENANT(project.name + "|" + project.id);
- this.paramStor.CURRENT_USER(user.name + "|"+ user.id);
-
- this.username = this.paramStor.CURRENT_USER().split("|")[0];
- this.currentTenant = this.paramStor.CURRENT_TENANT().split("|")[0];
-
- if(this.username == "admin"){
- this.menuItems = this.menuItems_admin;
- this.dropMenuItems = [
- {
- label: "Switch Region",
- items: [{ label: "default_region", command:()=>{} }]
- },
- {
- label: "Logout",
- command:()=>{ this.logout() }
- }
- ];
- }else{
- this.menuItems = this.menuItems_tenant;
- this.dropMenuItems = [
- {
- label: "Switch Region",
- items: [{ label: "default_region", command:()=>{} }]
- },
- {
- label: "Switch Tenant",
- items: this.tenantItems
- },
- {
- label: "Logout",
- command:()=>{ this.logout() }
- }
- ];
- }
-
- this.isLogin = true;
- this.router.navigateByUrl("home");
- this.activeItem = this.menuItems[0];
-
- // annimation for after login
- this.showLoginAnimation = true;
- setTimeout(() => {
- this.showLoginAnimation = false;
- this.hideLoginForm = true;
- }, 500);
- if(this.intervalRefreshToken){
- clearInterval(this.intervalRefreshToken);
- }
- let tokenPeriod = this.paramStor.TOKEN_PERIOD();
- let refreshTime = tokenPeriod ? (Number(tokenPeriod) - this.advanceRefreshTime) : this.defaultExpireTime;
- this.intervalRefreshToken = window.setInterval(()=>{
- this.refreshToken()
- },refreshTime);
- })
- },
- error => {
- this.logout();
- })
- }
-
- logout() {
- this.paramStor.AUTH_TOKEN("");
- this.paramStor.CURRENT_USER("");
- this.paramStor.CURRENT_TENANT("");
- this.paramStor.PASSWORD("");
- this.paramStor.TOKEN_PERIOD("");
- if(this.interval){
- clearInterval(this.interval);
- }
- if(this.intervalRefreshToken){
- clearInterval(this.intervalRefreshToken);
- }
- // annimation for after logout
- this.hideLoginForm = false;
- this.showLogoutAnimation = true;
- setTimeout(() => {
- this.showLogoutAnimation = false;
- this.username = "";
- this.password = "";
- this.isLogin = false;
- }, 500);
-
- }
-
- onKeyDown(e) {
- let keycode = window.event ? e.keyCode : e.which;
- if(keycode == 13){
- this.login();
- }
- }
-
- menuItemClick(event, item) {
- this.activeItem = item;
- }
-
- supportCurrentBrowser(){
- let ie,
- firefox,
- safari,
- chrome,
- cIE = 11,
- cFirefox = 40,
- cChrome = 40;
- let ua = navigator.userAgent.toLowerCase();
- let isLinux = (ua.indexOf('linux') >= 0);
-
- if(this.isIE()) {
- if(ua.indexOf('msie') >= 0) {
- ie = this.getSys(ua.match(/msie ([\d]+)/));
- } else {
- ie = this.getSys(ua.match(/trident.*rv:([\d]+)/));
- }
- }else if(navigator.userAgent.indexOf("Firefox") > 0){
- firefox = this.getSys(ua.match(/firefox\/([\d]+)/));
- }else if(ua.indexOf("safari") != -1 && !(ua.indexOf("chrome") != -1)) {
- safari = this.getSys(ua.match(/version\/([\d]+)/));
- }else if(ua.indexOf("chrome") != -1) {
- chrome = this.getSys(ua.match(/chrome\/([\d]+)/));
- }
-
- if ((firefox) / 1 < cFirefox || (chrome) / 1 < cChrome || (ie) / 1 < cIE) {
- return true;
- }
-
- return false;
- }
-
- isIE() {
- return navigator.userAgent.toLowerCase().indexOf('trident') >= 0;
- }
-
- getSys (browserVersionArr) {
- if( !browserVersionArr) {
- return 0;
- } else if( browserVersionArr.length < 2) {
- return 0;
- } else {
- return browserVersionArr[1];
- }
- }
-}
diff --git a/dashboard/src/app/app.module.ts b/dashboard/src/app/app.module.ts
deleted file mode 100644
index 058c62394..000000000
--- a/dashboard/src/app/app.module.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-import { BrowserModule } from '@angular/platform-browser';
-import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
-import { CommonModule } from '@angular/common';
-import { NgModule, APP_INITIALIZER } from '@angular/core';
-import { HttpModule } from "@angular/http";
-import { AppRoutingModule } from './app-routing.module';
-import { AppComponent } from './app.component';
-import { SharedModule } from './shared/shared.module';
-import { DropMenuModule, SelectButtonModule, ButtonModule, InputTextModule } from './components/common/api';
-// import { AppService } from './app.service';
-import { LocationStrategy, HashLocationStrategy } from '@angular/common';
-
-import { MessagesModule } from './components/messages/messages';
-
-@NgModule({
- declarations: [
- AppComponent
- ],
- imports: [
- BrowserModule,
- CommonModule,
- AppRoutingModule,
- MessagesModule,
- HttpModule,
- BrowserAnimationsModule,
- SharedModule.forRoot(),
- DropMenuModule,
- SelectButtonModule,
- ButtonModule,
- InputTextModule
- ],
- providers: [
- // AppService,
- { provide: LocationStrategy, useClass: HashLocationStrategy }
- ],
- bootstrap: [AppComponent]
-})
-export class AppModule { }
\ No newline at end of file
diff --git a/dashboard/src/app/app.service.ts b/dashboard/src/app/app.service.ts
deleted file mode 100644
index 886b4f82e..000000000
--- a/dashboard/src/app/app.service.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { Injectable, Output, EventEmitter } from '@angular/core';
-import { Http } from '@angular/http';
-
-@Injectable()
-export class AppService {
- constructor(private http: Http){}
-
- @Output() onHeaderTitleChange = new EventEmitter();
-
- changeHeaderTitle(){
- this.onHeaderTitleChange.emit();
- }
-
- logOut(){
- // return this.http.get("v1/portal/logout");
- }
-
-}
\ No newline at end of file
diff --git a/dashboard/src/app/business/block/block.component.ts b/dashboard/src/app/business/block/block.component.ts
deleted file mode 100644
index ad96bc7c9..000000000
--- a/dashboard/src/app/business/block/block.component.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-import { Router,ActivatedRoute } from '@angular/router';
-import { Component, OnInit, ViewContainerRef, ViewChild, Directive, ElementRef, HostBinding, HostListener } from '@angular/core';
-import { I18NService } from 'app/shared/api';
-import { AppService } from 'app/app.service';
-import { trigger, state, style, transition, animate} from '@angular/animations';
-import { I18nPluralPipe } from '@angular/common';
-
-@Component({
- templateUrl: './block.html',
- styleUrls: [],
- animations: [
- trigger('overlayState', [
- state('hidden', style({
- opacity: 0
- })),
- state('visible', style({
- opacity: 1
- })),
- transition('visible => hidden', animate('400ms ease-in')),
- transition('hidden => visible', animate('400ms ease-out'))
- ]),
-
- trigger('notificationTopbar', [
- state('hidden', style({
- height: '0',
- opacity: 0
- })),
- state('visible', style({
- height: '*',
- opacity: 1
- })),
- transition('visible => hidden', animate('400ms ease-in')),
- transition('hidden => visible', animate('400ms ease-out'))
- ])
- ]
-})
-export class BlockComponent implements OnInit{
- fromGroup:boolean=false;
- constructor(
- public I18N: I18NService,
- private router: Router,
- private ActivatedRoute:ActivatedRoute
- ){}
-
- ngOnInit() {
- this.ActivatedRoute.params.subscribe(
- (params) => this.fromGroup = !!params.fromRoute
- );
- }
-
-}
diff --git a/dashboard/src/app/business/block/block.html b/dashboard/src/app/business/block/block.html
deleted file mode 100644
index 95616263b..000000000
--- a/dashboard/src/app/business/block/block.html
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/dashboard/src/app/business/block/block.module.ts b/dashboard/src/app/business/block/block.module.ts
deleted file mode 100644
index 9a52e7f0f..000000000
--- a/dashboard/src/app/business/block/block.module.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import { NgModule, APP_INITIALIZER } from '@angular/core';
-import { BlockComponent } from './block.component';
-import { RouterModule } from '@angular/router';
-import { TabViewModule, ButtonModule } from '../../components/common/api';
-import { VolumeListModule } from './volumeList.module';
-import { VolumeGroupModule } from './volumeGroup.module';
-import { CreateVolumeGroupComponent } from './create-volume-group/create-volume-group.component';
-
-let routers = [{
- path: '',
- component: BlockComponent
-}]
-
-@NgModule({
- declarations: [
- BlockComponent,
- CreateVolumeGroupComponent
- ],
- imports: [
- RouterModule.forChild(routers),
- VolumeListModule,
- VolumeGroupModule,
- TabViewModule,
- ButtonModule
- ],
- providers: []
-})
-export class BlockModule { }
\ No newline at end of file
diff --git a/dashboard/src/app/business/block/create-volume-group/create-volume-group.component.html b/dashboard/src/app/business/block/create-volume-group/create-volume-group.component.html
deleted file mode 100644
index 86859275d..000000000
--- a/dashboard/src/app/business/block/create-volume-group/create-volume-group.component.html
+++ /dev/null
@@ -1,3 +0,0 @@
-
- create-volume-group works!
-
diff --git a/dashboard/src/app/business/block/create-volume-group/create-volume-group.component.ts b/dashboard/src/app/business/block/create-volume-group/create-volume-group.component.ts
deleted file mode 100644
index 0c714bf6f..000000000
--- a/dashboard/src/app/business/block/create-volume-group/create-volume-group.component.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-
-@Component({
- selector: 'app-create-volume-group',
- templateUrl: './create-volume-group.component.html',
- styleUrls: [
-
- ]
-})
-export class CreateVolumeGroupComponent implements OnInit {
-
- constructor() { }
-
- ngOnInit() {
- }
-
-}
diff --git a/dashboard/src/app/business/block/create-volume/create-volume.component.html b/dashboard/src/app/business/block/create-volume/create-volume.component.html
deleted file mode 100644
index 784ac2f46..000000000
--- a/dashboard/src/app/business/block/create-volume/create-volume.component.html
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
diff --git a/dashboard/src/app/business/block/create-volume/create-volume.component.ts b/dashboard/src/app/business/block/create-volume/create-volume.component.ts
deleted file mode 100644
index 39e5363e0..000000000
--- a/dashboard/src/app/business/block/create-volume/create-volume.component.ts
+++ /dev/null
@@ -1,274 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
-import { trigger, state, style, transition, animate } from '@angular/animations';
-import { Validators, FormControl, FormGroup, FormBuilder } from '@angular/forms';
-
-import { Message, SelectItem } from './../../../components/common/api';
-
-import { VolumeService ,ReplicationService} from './../volume.service';
-import { ProfileService } from './../../profile/profile.service';
-import { AvailabilityZonesService } from './../../resource/resource.service';
-import { I18NService,Utils } from 'app/shared/api';
-
-@Component({
- selector: 'app-create-volume',
- templateUrl: './create-volume.component.html',
- styleUrls: [
-
- ],
- animations: [
- trigger('overlayState', [
- state('hidden', style({
- opacity: 0
- })),
- state('visible', style({
- opacity: 1
- })),
- transition('visible => hidden', animate('400ms ease-in')),
- transition('hidden => visible', animate('400ms ease-out'))
- ]),
-
- trigger('notificationTopbar', [
- state('hidden', style({
- height: '0',
- opacity: 0
- })),
- state('visible', style({
- height: '*',
- opacity: 1
- })),
- transition('visible => hidden', animate('400ms ease-in')),
- transition('hidden => visible', animate('400ms ease-out'))
- ])
- ]
-})
-export class CreateVolumeComponent implements OnInit {
-
- label = {
- zone: this.i18n.keyID["sds_block_volume_az"],
- name: this.i18n.keyID["sds_block_volume_name"],
- profile: this.i18n.keyID["sds_block_volume_profile"],
- capacity: this.i18n.keyID["sds_home_capacity"],
- quantity: this.i18n.keyID["sds_block_volume_quantity"]
- };
- availabilityZones = [];
- volumeform;
- volumeItems = [0];
- capacityUnit = [];
- profileOptions = [];
- capacity = 'GB';
- createVolumes = [];
- value: boolean;
- showReplicationConf = false;
- errorMessage = {
- "zone": { required: "Zone is required."}
- };
- validRule= {
- 'name':'^[a-zA-Z]{1}([a-zA-Z0-9]|[_]){0,127}$'
- };
- defaultProfile = {
- label: null,
- value: {id:null,profileName:null}
- };
- constructor(
- private router: Router,
- private fb: FormBuilder,
- private ProfileService: ProfileService,
- private VolumeService: VolumeService,
- private replicationService:ReplicationService,
- private availabilityZonesService:AvailabilityZonesService,
- public i18n:I18NService
- ) {}
-
- ngOnInit() {
- this.getAZ();
- this.getProfiles();
-
- this.capacityUnit = [
- {
- label: 'GB', value: 'GB'
- },
- {
- label: 'TB', value: 'TB'
- }
- ];
- this.volumeform = this.fb.group({
- 'zone': new FormControl('', Validators.required),
- 'name0': new FormControl('', {validators:[Validators.required,Validators.pattern(this.validRule.name)]}),
- 'profileId0': new FormControl(this.defaultProfile, {validators:[Validators.required,this.checkProfile]}),
- 'size0': new FormControl(1, Validators.required),
- 'capacity0': new FormControl(''),
- 'quantity0': new FormControl(1)
- });
- this.volumeform.valueChanges.subscribe(
- (value:string)=>{
- this.createVolumes = this.getVolumesDataArray(this.volumeform.value);
- this.setRepForm();
- }
- );
- this.createVolumes = this.getVolumesDataArray(this.volumeform.value);
- this.setRepForm();
- }
-
- addVolumeItem() {
- this.volumeItems.push(
- this.volumeItems[this.volumeItems.length-1] + 1
- );
- this.volumeItems.forEach(index => {
- if(index !== 0){
- this.volumeform.addControl('name'+index, this.fb.control('', Validators.required));
- this.volumeform.addControl('profileId'+index, this.fb.control(this.defaultProfile,Validators.required));
- this.volumeform.addControl('size'+index, this.fb.control(1, Validators.required));
- this.volumeform.addControl('capacity'+index, this.fb.control('GB', Validators.required));
- this.volumeform.addControl('quantity'+index, this.fb.control(1));
- }
- });
- }
- getAZ(){
- this.availabilityZonesService.getAZ().subscribe((azRes) => {
- let AZs=azRes.json();
- let azArr = [];
- if(AZs && AZs.length !== 0){
- AZs.forEach(item =>{
- let obj = {label: item, value: item};
- azArr.push(obj);
- })
- }
- this.availabilityZones = azArr;
- })
- }
- getProfiles() {
- this.ProfileService.getProfiles().subscribe((res) => {
- let profiles = res.json();
- profiles.forEach(profile => {
- this.profileOptions.push({
- label: profile.name,
- value: {id:profile.id,profileName:profile.name}
- });
- });
- });
- }
-
- deleteVolumeItem(index) {
- this.volumeItems.splice(index, 1);
- this.volumeform.removeControl('name'+index);
- this.volumeform.removeControl('profileId'+index);
- this.volumeform.removeControl('size'+index);
- this.volumeform.removeControl('capacity'+index);
- this.volumeform.removeControl('quantity'+index);
- }
-
- createVolume(param){
- this.VolumeService.createVolume(param).subscribe((res) => {
- this.router.navigate(['/block']);
- });
- }
- createVolumeAndReplication(volParam,repParam){
- this.VolumeService.createVolume(volParam).subscribe((res2) => {
- this.VolumeService.createVolume(repParam).subscribe((res) => {
- let param = {
- "name":res.json().name ,
- "primaryVolumeId": res2.json().id,
- "availabilityZone": res.json().availabilityZone,
- "profileId": res.json().profileId,
- "replicationMode":"async",
- "replicationPeriod":this.createVolumes["formGroup"].value.period,
- "secondaryVolumeId":res.json().id
- }
- this.replicationService.createReplication(param).subscribe((res) => {});
- this.router.navigate(['/block']);
- });
- });
- }
- onSubmit(value) {
- if(!this.volumeform.valid){
- for(let i in this.volumeform.controls){
- this.volumeform.controls[i].markAsTouched();
- }
- return;
- }
- if(this.showReplicationConf && !this.createVolumes["formGroup"].valid){
- for(let i in this.createVolumes["formGroup"].controls){
- this.createVolumes["formGroup"].controls[i].markAsTouched();
- }
- return;
- }
- let dataArr = this.getVolumesDataArray(value);
- let volumeData = [];
- dataArr.forEach(item => {
- volumeData.push({
- name: item.name,
- size: item.size,
- availabilityZone: item.availabilityZone,
- profileId: item.profile.id
- });
- });
- for(let i in volumeData){
- if(this.showReplicationConf){
- let repVolume = {
- name:null,
- profileId:null,
- availabilityZone: null
- };
- Object.assign(repVolume,volumeData[i]);
- repVolume.name = this.createVolumes["formGroup"].value["name"+i];
- repVolume.profileId = this.createVolumes["formGroup"].value["profileId"+i];
- repVolume.availabilityZone = "secondary";
- this.createVolumeAndReplication(volumeData[i],repVolume);
- }else{
- this.createVolume(volumeData[i]);
- }
- }
- }
- getVolumesDataArray(value){
- let dataArr = [];
- this.volumeItems.forEach(index => {
- if(!value['capacity'+index]){
- value['capacity'+index]='GB';
- }
- let unit = value['capacity'+index]==='GB' ? 1 : 1024;
- let qunantity = value['quantity'+index];
- if(qunantity && qunantity !== 1){
- for(let i=0;i
-
-
-
-
diff --git a/dashboard/src/app/business/block/create-volume/replication-group/replication-group.component.ts b/dashboard/src/app/business/block/create-volume/replication-group/replication-group.component.ts
deleted file mode 100644
index 3cc275e04..000000000
--- a/dashboard/src/app/business/block/create-volume/replication-group/replication-group.component.ts
+++ /dev/null
@@ -1,111 +0,0 @@
-import { Component, OnInit,Input,Output,EventEmitter} from '@angular/core';
-import { trigger, state, style, transition, animate } from '@angular/animations';
-
-import { ProfileService } from './../../../profile/profile.service';
-import {FormBuilder, FormControl, Validators} from "@angular/forms";
-import { I18NService,Utils } from 'app/shared/api';
-
-@Component({
- selector: 'app-replication-group',
- templateUrl: './replication-group.component.html',
- styleUrls: [
-
- ],
- animations: [
- trigger('overlayState', [
- state('hidden', style({
- opacity: 0
- })),
- state('visible', style({
- opacity: 1
- })),
- transition('visible => hidden', animate('400ms ease-in')),
- transition('hidden => visible', animate('400ms ease-out'))
- ]),
-
- trigger('notificationTopbar', [
- state('hidden', style({
- height: '0',
- opacity: 0
- })),
- state('visible', style({
- height: '*',
- opacity: 1
- })),
- transition('visible => hidden', animate('400ms ease-in')),
- transition('hidden => visible', animate('400ms ease-out'))
- ])
- ]
-})
-export class ReplicationGroupComponent implements OnInit {
- groupOptions = [];
- createOrExist = 'createGroup';
- existingGroupLists = [];
- replicationEnable:boolean;
- @Input() volumes:any;
- @Output() checkParam = new EventEmitter();
- period = 60;
- selectedProfile;
- availabilityZone=[];
- profileOptions = [
- {
- label: 'Select Profile',
- value: null
- }
- ];
-
- constructor(
- private ProfileService: ProfileService,
- private fb: FormBuilder,
- public I18N:I18NService
- ) { }
-
- ngOnInit() {
- this.groupOptions = [
- {
- label: 'Create Group',
- value: 'createGroup'
- },
- {
- label: 'Add to Existing Group',
- value: 'existingGroup'
- }
- ];
- this.availabilityZone = [
- {
- label: 'Secondary', value: 'secondary'
- }
- ];
- this.getProfiles();
- }
-
- getReplicationGroup(){
- if(this.createOrExist==='existingGroup'){
- this.existingGroupLists = [
- {
- label: 'group_for_REP',
- value: 'group_for_REP_id1'
- },
- {
- label: 'group_for_REP',
- value: 'group_for_REP_id2'
- }
- ]
- }
- }
-
- getProfiles() {
- this.ProfileService.getProfiles().subscribe((res) => {
- let profiles = res.json();
- profiles.forEach(profile => {
- this.profileOptions.push({
- label: profile.name,
- value: profile.id
- });
- });
- });
- }
- checkParamSubmit(){
- this.checkParam.emit(false);
- }
-}
diff --git a/dashboard/src/app/business/block/volume-detail/replication-list/replication-list.component.html b/dashboard/src/app/business/block/volume-detail/replication-list/replication-list.component.html
deleted file mode 100644
index e19f19af8..000000000
--- a/dashboard/src/app/business/block/volume-detail/replication-list/replication-list.component.html
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
{{volume.name}}
-
-
-
-
default
-
-
-
-
-
-
-
-
-
- {{I18N.keyID['sds_profile_rep_period']}}
- =
-
- {{periodControl.value}}
- {{I18N.keyID['sds_profile_unit_minutes']}}
-
-
-
-
{{replication['replicationStatus']}}
-
-
-
-
-
-
-
-
-
-
-
-
-
{{replication.name}}
-
-
-
-
secondary
-
-
-
-
-
-
-
-
-
- no data available
-
-
diff --git a/dashboard/src/app/business/block/volume-detail/replication-list/replication-list.component.ts b/dashboard/src/app/business/block/volume-detail/replication-list/replication-list.component.ts
deleted file mode 100644
index 6cb0c20b5..000000000
--- a/dashboard/src/app/business/block/volume-detail/replication-list/replication-list.component.ts
+++ /dev/null
@@ -1,241 +0,0 @@
-import {Component, Input, OnInit} from '@angular/core';
-import { I18NService } from 'app/shared/api';
-import { VolumeService ,ReplicationService} from './../../volume.service';
-import { ConfirmationService,ConfirmDialogModule} from '../../../../components/common/api';
-import { FormControl, FormGroup, FormBuilder, Validators, ValidatorFn, AbstractControl } from '@angular/forms';
-
-@Component({
- selector: 'app-replication-list',
- templateUrl: './replication-list.component.html',
- providers: [ConfirmationService],
- styleUrls: [
-
- ]
-})
-export class ReplicationListComponent implements OnInit {
-
- @Input() volumeId;
- volume={
- name:""
- };
- replication ={
- name:"replication",
- replicationPeriod:30,
- id:""
- };
- arrowEnable = true;
- showReplication:boolean=false;
- editReplicationDisable :boolean=true;
- periodControl:FormControl;
- //[0]:status:enble;[1]:status:disabled;[2]:status:failover;[3]:status:other
- swichMode = [
- {
- disableBtnDisplay:true,
- disableBtnDisabled:false,
- enableBtnDisplay:false,
- enableBtnDisabled:true,
- failoverBtnDisabled:false,
- },
- {
- disableBtnDisplay:false,
- disableBtnDisabled:true,
- enableBtnDisplay:true,
- enableBtnDisabled:false,
- failoverBtnDisabled:false,
- },
- {
- disableBtnDisplay:false,
- disableBtnDisabled:true,
- enableBtnDisplay:true,
- enableBtnDisabled:false,
- failoverBtnDisabled:true,
- },
- {
- disableBtnDisplay:true,
- disableBtnDisabled:true,
- enableBtnDisplay:false,
- enableBtnDisabled:true,
- failoverBtnDisabled:true,
- }
- ];
- operationStatus:any;
- constructor(
- public I18N:I18NService,
- private VolumeService:VolumeService,
- private replicationService:ReplicationService,
- private confirmationService:ConfirmationService
- ) { }
-
- ngOnInit() {
- this.operationStatus = this.swichMode[3];
- this.periodControl = new FormControl("1");
- this.getAllReplicationsDetail();
- this.periodControl.valueChanges.subscribe(
- (value)=>{
- if(Number(value) < 1){
- this.periodControl.setValue("1");
- }
- }
- );
- }
- getAllReplicationsDetail(){
- this.replicationService.getAllReplicationsDetail().subscribe((resRep)=>{
- let replications = resRep.json();
- replications.forEach(element => {
- if(element.primaryVolumeId == this.volumeId){
- this.getVolumeById(this.volumeId);
- this.replication = element;
- this.periodControl.setValue(this.replication.replicationPeriod);
- //ReplicationStatus
- switch(this.replication['replicationStatus']){
- case "enabled":
- this.operationStatus = this.swichMode[0];
- this.arrowEnable = true;
- break;
- case "disabled":
- this.operationStatus = this.swichMode[1];
- this.arrowEnable = false;
- break;
- case "failed_over":
- this.operationStatus = this.swichMode[2];
- this.arrowEnable = false;
- break;
- default:
- this.operationStatus = this.swichMode[3];
- this.arrowEnable = false;
- }
- this.showReplication = true;
- }
- if(element.secondaryVolumeId == this.volumeId){
- this.replication = element;
- this.periodControl.setValue(this.replication.replicationPeriod);
- //ReplicationStatus
- switch(this.replication['replicationStatus']){
- case "enabled":
- this.operationStatus = this.swichMode[0];
- this.arrowEnable = true;
- break;
- case "disabled":
- this.operationStatus = this.swichMode[1];
- this.arrowEnable = false;
- break;
- case "failed_over":
- this.operationStatus = this.swichMode[2];
- this.arrowEnable = false;
- break;
- default:
- this.operationStatus = this.swichMode[3];
- this.arrowEnable = false;
- }
- this.getVolumeById(element.primaryVolumeId);
- this.showReplication = true;
- }
- });
- });
- }
- getVolumeById(volumeId){
- this.VolumeService.getVolumeById(volumeId).subscribe((res) => {
- this.volume = res.json();
- });
- }
- getReplicationByVolumeId = function(volumeId){
- let param = {
- "key": "PrimaryVolumeId",
- "value":volumeId
- }
- this.replicationService.getReplicationDetailByVolumeId(param).subscribe((res) => {
- var data = res.json();
- if(data.length !== 0){
- this.replication = data[0];
- this.showReplication = true;
- }else{
- this.showReplication = false;
- }
- });
- }
- disableReplication(){
- let msg = "Are you sure you want to disable the Replication?
[ "+ this.replication.name +" ]
";
- let header ="Disable Replication";
- let acceptLabel = "Disable";
- let warming = false;
- this.confirmDialog([msg,header,acceptLabel,warming,"disable"])
- }
- enableReplication(){
- let msg = "Are you sure you want to enable the Replication?
[ "+ this.replication.name +" ]
";
- let header ="Enable Replication";
- let acceptLabel = "Enable";
- let warming = false;
- this.confirmDialog([msg,header,acceptLabel,warming,"enable"])
- }
- failoverReplication(){
- let msg = "Are you sure you want to failover the Replication?
[ "+ this.replication.name +" ]
";
- let header ="Failover Replication";
- let acceptLabel = "Failover";
- let warming = true;
- this.confirmDialog([msg,header,acceptLabel,warming,"failover"])
- }
- deleteReplication(){
- let msg = "Are you sure you want to delete the Replication?
[ "+ this.replication.name +" ]
";
- let header ="Delete Replication";
- let acceptLabel = "Delete";
- let warming = true;
- this.confirmDialog([msg,header,acceptLabel,warming,"delete"])
- }
- editReplicationPriod(){
- if(!this.editReplicationDisable){
- //wait interface modify period ,icon color:#40bcec
- if(this.replication.replicationPeriod != this.periodControl.value){
- let param = {
- name:this.replication.name,
- replicationPeriod:this.periodControl.value
- };
- this.replicationService.modifyReplication(this.replication.id,param).subscribe((res)=>{
- this.getAllReplicationsDetail();
- });
- }
- }
- this.editReplicationDisable = !this.editReplicationDisable;
-
- }
- confirmDialog([msg,header,acceptLabel,warming=true,func]){
- this.confirmationService.confirm({
- message: msg,
- header: header,
- acceptLabel: acceptLabel,
- isWarning: warming,
- accept: ()=>{
- try {
- switch(func){
- case "disable":
- this.replicationService.disableReplication(this.replication.id).subscribe((res)=>{
- this.getAllReplicationsDetail();
- });
- break;
- case "delete":
- this.replicationService.deleteReplication(this.replication.id).subscribe((res)=>{
- this.getAllReplicationsDetail();
- });
- break;
- case "failover":
- this.replicationService.failoverReplication(this.replication.id).subscribe((res)=>{
- this.getAllReplicationsDetail();
- });
- break;
- case "enable":
- this.replicationService.enableReplication(this.replication.id).subscribe((res)=>{
- this.getAllReplicationsDetail();
- });
- break;
- }
- }
- catch (e) {
- console.log(e);
- }
- finally {
- this.getAllReplicationsDetail();
- }
- },
- reject:()=>{}
- })
- }
-}
diff --git a/dashboard/src/app/business/block/volume-detail/snapshot-list/snapshot-list.component.html b/dashboard/src/app/business/block/volume-detail/snapshot-list/snapshot-list.component.html
deleted file mode 100644
index d5205626a..000000000
--- a/dashboard/src/app/business/block/volume-detail/snapshot-list/snapshot-list.component.html
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
diff --git a/dashboard/src/app/business/block/volume-detail/snapshot-list/snapshot-list.component.ts b/dashboard/src/app/business/block/volume-detail/snapshot-list/snapshot-list.component.ts
deleted file mode 100644
index 40f9604e4..000000000
--- a/dashboard/src/app/business/block/volume-detail/snapshot-list/snapshot-list.component.ts
+++ /dev/null
@@ -1,221 +0,0 @@
-import { Component, OnInit, Input } from '@angular/core';
-import { FormControl, FormGroup, FormBuilder, Validators, ValidatorFn, AbstractControl } from '@angular/forms';
-import { VolumeService,SnapshotService } from './../../volume.service';
-import { ConfirmationService,ConfirmDialogModule} from '../../../../components/common/api';
-import { I18NService, MsgBoxService, Utils } from 'app/shared/api';
-
-@Component({
- selector: 'app-snapshot-list',
- templateUrl: './snapshot-list.component.html',
- providers: [ConfirmationService],
- styleUrls: [
-
- ]
-})
-export class SnapshotListComponent implements OnInit {
-
- @Input() volumeId;
- volume;
- label;
- selectedSnapshotId;
- selectedSnapshots = [];
- snapshots;
- snapshotfilter;
- snapshotPropertyDisplay = false;
- snapshotFormGroup;
- createVolumeFormGroup;
- createVolumeDisplay: boolean = false;
-
- isCreate = false;
- isModify = false;
- snapshotProperty = {
- name: '',
- description: ''
- }
- okBtnDisabled = false;
-
- errorMessage = {
- "name": { required: "Name is required." },
- "description": { maxlength: "Max. length is 200." }
- };
- param = {
- key: 'VolumeId',
- value: null
- }
- constructor(
- private VolumeService: VolumeService,
- private SnapshotService: SnapshotService,
- private fb: FormBuilder,
- private confirmationService:ConfirmationService,
- public I18N:I18NService,
- private msg: MsgBoxService
- ) {
- this.snapshotFormGroup = this.fb.group({
- "name": ["", Validators.required],
- "description": ["", Validators.maxLength(200)]
- });
-
- this.createVolumeFormGroup = this.fb.group({
- "name": ["", Validators.required],
- "description": ["", Validators.maxLength(200)]
- });
- }
-
- ngOnInit() {
- this.getVolumeById(this.volumeId);
- this.label = {
- name: this.I18N.keyID['sds_block_volume_name'],
- volume: this.I18N.keyID['sds_block_volume_title'],
- description: this.I18N.keyID['sds_block_volume_descri']
- }
- this.param={
- key: 'VolumeId',
- value: this.volumeId
- };
- this.getSnapshots(this.param);
- }
-
- getVolumeById(volumeId){
- this.VolumeService.getVolumeById(volumeId).subscribe((res) => {
- this.volume = res.json();
- });
- }
-
- createSnapshot() {
- let param = {
- name: this.snapshotFormGroup.value.name,
- volumeId: this.volumeId,
- description: this.snapshotFormGroup.value.description
- }
- this.SnapshotService.createSnapshot(param).subscribe((res) => {
- this.getSnapshots(
- {
- key: 'VolumeId',
- value: this.volumeId
- }
- );
- });
- }
-
- batchDeleteSnapshot(param) {
- if (param) {
- let msg;
- if(param.length>1){
-
- msg = "Are you sure you want to delete the selected Snapshots?
[ "+ param.length +" Snapshots ]
";
- }else{
- msg = "Are you sure you want to delete the Snapshot?
[ "+ param[0].name +" ]
";
- }
-
- this.confirmationService.confirm({
- message: msg,
- header: this.I18N.keyID['sds_block_volume_del_sna'],
- acceptLabel: this.I18N.keyID['sds_block_volume_delete'],
- isWarning: true,
- accept: ()=>{
- param.forEach(snapshot => {
- this.deleteSnapshot(snapshot.id);
-
- });
- },
- reject:()=>{}
- })
- }
- }
-
- deleteSnapshot(id) {
- this.SnapshotService.deleteSnapshot(id).subscribe((res) => {
- Utils.arrayRemoveOneElement(this.selectedSnapshots,id,function(value,index,arr){
- return value.id === id;
- });
- this.getSnapshots(
- {
- key: 'VolumeId',
- value: this.volumeId
- }
- );
- });
- }
-
- getSnapshots(filter?) {
- this.SnapshotService.getSnapshots(filter).subscribe((res) => {
- this.snapshots = res.json();
- this.snapshotPropertyDisplay = false;
-
- this.snapshots.map((item, index, arr)=>{
- item.size = Utils.getDisplayGBCapacity(item.size);
- })
- });
- }
-
- modifySnapshot(){
- let param = {
- name: this.snapshotFormGroup.value.name,
- description: this.snapshotFormGroup.value.description
- }
- this.SnapshotService.modifySnapshot(this.selectedSnapshotId,param).subscribe((res) => {
- this.getSnapshots(
- {
- key: 'VolumeId',
- value: this.volumeId
- }
- );
- });
- }
-
- showSnapshotPropertyDialog(method,selectedSnapshot?){
- this.snapshotPropertyDisplay = true;
- if(method === 'create'){
- this.isCreate = true;
- this.isModify = false;
- this.snapshotProperty.name = '';
- this.snapshotProperty.description = '';
- }else if(method === 'modify'){
- this.isCreate = false;
- this.isModify = true;
- this.snapshotProperty.name = selectedSnapshot.name;
- this.snapshotProperty.description = selectedSnapshot.description;
- }
- if(selectedSnapshot && selectedSnapshot.id){
- this.selectedSnapshotId = selectedSnapshot.id;
- }
- }
-
- snapshotModifyOrCreate(){
- if(this.isModify){
- this.modifySnapshot();
- }else{
- this.createSnapshot();
- }
-
- }
-
- showCreateVolumeBasedonSnapshot(snapshot){
- this.createVolumeDisplay = true;
- this.selectedSnapshotId = snapshot.id;
- }
-
- createVolumeBasedonSnapshot(snapshot) {
- let param = {
- name: this.createVolumeFormGroup.value.name,
- description: this.createVolumeFormGroup.value.description,
- size: this.volume.size,
- availabilityZone: this.volume.availabilityZone,
- profileId: this.volume.profileId,
- snapshotId: this.selectedSnapshotId
- }
-
- if(this.createVolumeFormGroup.status == "VALID"){
- this.VolumeService.createVolume(param).subscribe((res) => {
- this.createVolumeDisplay = false;
- this.msg.info("The volume is being created, please go to the volume list and check it.");
- });
- }else{
- // validate
- for(let i in this.createVolumeFormGroup.controls){
- this.createVolumeFormGroup.controls[i].markAsTouched();
- }
- }
- }
-
-}
diff --git a/dashboard/src/app/business/block/volume-detail/volume-detail.component.html b/dashboard/src/app/business/block/volume-detail/volume-detail.component.html
deleted file mode 100644
index a07de63e0..000000000
--- a/dashboard/src/app/business/block/volume-detail/volume-detail.component.html
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
-
{{i18n.keyID['sds_block_volume_base_info']}}
-
{{ volumeSource }}
-
-
-
- {{label.Name}}:
-
-
- {{volume.name}}
-
-
- {{label.Profile}}:
-
-
- {{volume.profileName}}
-
-
- {{label.Status}}:
-
-
- {{volume.status}}
-
-
-
-
- {{label.Capacity}}:
-
-
- {{volume.size}}
-
-
- {{label.VolumeID}}:
-
-
- {{volume.id}}
-
-
- {{label.CreatedAt}}:
-
-
- {{volume.createdAt}}
-
-
-
-
-
-
diff --git a/dashboard/src/app/business/block/volume-detail/volume-detail.component.ts b/dashboard/src/app/business/block/volume-detail/volume-detail.component.ts
deleted file mode 100644
index f9a36cd9b..000000000
--- a/dashboard/src/app/business/block/volume-detail/volume-detail.component.ts
+++ /dev/null
@@ -1,65 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import { Router,ActivatedRoute} from '@angular/router';
-
-import { VolumeService } from './../volume.service';
-import { ProfileService } from './../../profile/profile.service';
-import { I18NService, Utils } from 'app/shared/api';
-
-@Component({
- selector: 'app-volume-detail',
- templateUrl: './volume-detail.component.html',
- styleUrls: [
-
- ]
-})
-export class VolumeDetailComponent implements OnInit {
- items;
- label;
- volume;
- volumeId;
- showVolumeSource: boolean = false;
- volumeSource: string = "";
-
- constructor(
- private VolumeService: VolumeService,
- private ActivatedRoute: ActivatedRoute,
- private ProfileService: ProfileService,
- public i18n:I18NService
- ) { }
-
- ngOnInit() {
- this.ActivatedRoute.params.subscribe((params) => this.volumeId = params.volumeId);
-
- this.items = [
- { label: this.i18n.keyID["sds_block_volume_title"], url: '/block' },
- { label: this.i18n.keyID["sds_block_volume_detail"], url: '/volumeDetail' }
- ];
-
- this.label = {
- Name: this.i18n.keyID["sds_block_volume_name"],
- Profile: this.i18n.keyID["sds_block_volume_profile"],
- Status: this.i18n.keyID["sds_block_volume_status"],
- VolumeID: this.i18n.keyID["sds_block_volume_id"],
- Capacity: this.i18n.keyID["sds_home_capacity"],
- CreatedAt: this.i18n.keyID["sds_block_volume_createat"]
- };
-
- this.getVolume(this.volumeId);
- }
-
- getVolume(id){
- this.VolumeService.getVolumeById(id).subscribe((res) => {
- this.volume = res.json();
- this.volume.size = Utils.getDisplayGBCapacity(res.json().size);
- this.ProfileService.getProfileById(this.volume.profileId).subscribe((res)=>{
- this.volume.profileName = res.json().name;
- })
-
- if(this.volume.snapshotId != ""){
- this.showVolumeSource = true;
- this.volumeSource = this.i18n.keyID['sds_block_volume_source'].replace("{{}}", this.volume.snapshotId);
- }
- });
- }
-
-}
diff --git a/dashboard/src/app/business/block/volume-detail/volume-detail.module.ts b/dashboard/src/app/business/block/volume-detail/volume-detail.module.ts
deleted file mode 100644
index 38f551aec..000000000
--- a/dashboard/src/app/business/block/volume-detail/volume-detail.module.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-import { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { ReactiveFormsModule, FormsModule } from '@angular/forms';
-import { RouterModule } from '@angular/router';
-import { VolumeDetailComponent } from './volume-detail.component';
-
-import { TabViewModule,ButtonModule, DataTableModule, DropMenuModule, DialogModule, FormModule, InputTextModule, InputTextareaModule, ConfirmDialogModule ,ConfirmationService} from './../../../components/common/api';
-import { HttpService } from './../../../shared/service/Http.service';
-import { VolumeService,SnapshotService ,ReplicationService} from './../volume.service';
-import { SnapshotListComponent } from './snapshot-list/snapshot-list.component';
-import { ReplicationListComponent } from './replication-list/replication-list.component';
-import { ProfileService } from './../../profile/profile.service';
-
-let routers = [{
- path: '',
- component: VolumeDetailComponent
-}]
-
-@NgModule({
- imports: [
- CommonModule,
- ReactiveFormsModule,
- FormsModule,
- InputTextModule,
- InputTextareaModule,
- RouterModule.forChild(routers),
- TabViewModule,
- ButtonModule,
- DataTableModule,
- DialogModule,
- FormModule,
- ConfirmDialogModule
- ],
- declarations: [
- VolumeDetailComponent,
- SnapshotListComponent,
- ReplicationListComponent
- ],
- providers: [
- HttpService,
- VolumeService,
- SnapshotService,
- ConfirmationService,
- ProfileService,
- ReplicationService
- ]
-})
-export class VolumeDetailModule { }
diff --git a/dashboard/src/app/business/block/volume-group-detail/volume-group-detail.component.html b/dashboard/src/app/business/block/volume-group-detail/volume-group-detail.component.html
deleted file mode 100644
index 15877e379..000000000
--- a/dashboard/src/app/business/block/volume-group-detail/volume-group-detail.component.html
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
-
-
{{I18N.keyID['sds_block_volume_base_info']}}
-
-
-
- {{label.Name}}:
-
-
- {{volumeGroup.name}}
-
-
- {{label.description}}:
-
-
- {{volumeGroup.description}}
-
-
- {{label.Status}}:
-
-
- {{volumeGroup.status}}
-
-
-
-
- {{label.Profile}}:
-
-
- {{volumeGroup.profileName}}
-
-
- {{label.groupId}}:
-
-
- {{volumeGroup.id}}
-
-
- {{label.CreatedAt}}:
-
-
- {{volumeGroup.createdAt}}
-
-
-
-
-
-
-
-
-
-
-
-
- {{I18N.keyID['sds_block_volume_group_remove']}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/dashboard/src/app/business/block/volume-group-detail/volume-group-detail.component.ts b/dashboard/src/app/business/block/volume-group-detail/volume-group-detail.component.ts
deleted file mode 100644
index 5d18a700c..000000000
--- a/dashboard/src/app/business/block/volume-group-detail/volume-group-detail.component.ts
+++ /dev/null
@@ -1,156 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import { Router,ActivatedRoute} from '@angular/router';
-import { VolumeService ,VolumeGroupService} from './../volume.service';
-import { ProfileService } from './../../profile/profile.service';
-import { I18NService, Utils } from 'app/shared/api';
-import { TabViewModule,ButtonModule, DataTableModule, DropMenuModule, DialogModule, FormModule, InputTextModule, InputTextareaModule, ConfirmDialogModule ,ConfirmationService} from './../../../components/common/api';
-
-@Component({
- selector: 'app-volume-group-detail',
- templateUrl: './volume-group-detail.component.html',
- providers: [ConfirmationService],
- styleUrls: []
-})
-export class VolumeGroupDetailComponent implements OnInit {
- items = [];
- volumeGroupId:string;
- volumeGroup:any;
- label:any;
- profileJson = {};
- volumes=[];
- allOptionalVolumes = [];
- selectedVolumes = [];
- showAddVolumes:boolean=false;
- constructor(
- private VolumeService: VolumeService,
- private ActivatedRoute: ActivatedRoute,
- private profileService: ProfileService,
- private VolumeGroupService:VolumeGroupService,
- private confirmationService:ConfirmationService,
- public I18N:I18NService
- ) { }
-
- ngOnInit() {
- this.ActivatedRoute.params.subscribe(
- (params) => this.volumeGroupId = params.groupId
- );
- this.getProfiles();
- this.items = [
- { label: this.I18N.keyID["sds_block_volume_group_router"], url: '/block' },
- { label: this.I18N.keyID["sds_block_volume_group_detail"], url: '/volumeGroupDetails' }
- ];
- this.label = {
- Name: this.I18N.keyID["sds_block_volume_name"],
- Profile: this.I18N.keyID["sds_block_volume_profile"],
- Status: this.I18N.keyID["sds_block_volume_status"],
- groupId: this.I18N.keyID["sds_block_volume_group_id"],
- description:this.I18N.keyID["sds_block_volume_descri"],
- CreatedAt: this.I18N.keyID["sds_block_volume_createat"]
- };
- }
- getVolumeGroupById(groupId){
- this.VolumeGroupService.getVolumeGroupById(groupId).subscribe((res)=>{
- let volumeGroup = res.json();
- if(volumeGroup && volumeGroup.length != 0){
- if(!volumeGroup.description){
- volumeGroup.description = "--";
- }
- let profileName = [];
- volumeGroup.profiles.forEach((profileId)=>{
- profileName.push(this.profileJson[profileId]);
- });
- volumeGroup.profileName = profileName;
- }
- this.volumeGroup = volumeGroup;
- this.getAllOptionalVolumes();
- });
- }
- getProfiles() {
- this.profileService.getProfiles().subscribe((res) => {
- let profiles = res.json();
- profiles.forEach(profile => {
- this.profileJson[profile.id] = profile.name;
- });
- this.getVolumeGroupById(this.volumeGroupId);
- this.getVolumesByGroupId(this.volumeGroupId);
- });
- }
- getAllOptionalVolumes(){
- this.VolumeService.getVolumes().subscribe((res)=>{
- let allVolumes = res.json();
- this.allOptionalVolumes = [];
- if(allVolumes){
- allVolumes.forEach((item)=>{
- if(item.pooId == this.volumeGroup.pooId && !item.groupId && this.volumeGroup.profiles.includes(item.profileId)){
- item.size = Utils.getDisplayGBCapacity(item.size);
- item.profileName = this.profileJson[item.profileId];
- this.allOptionalVolumes.push(item);
- }
- });
- }
- });
- }
- getVolumesByGroupId(volumeGroupId){
- this.VolumeService.getVolumeByGroupId(volumeGroupId).subscribe((res)=>{
- let volumes = res.json();
- if(volumes && volumes.length != 0){
- volumes.forEach((item)=>{
- item.size = Utils.getDisplayGBCapacity(item.size);
- item.profileName = this.profileJson[item.profileId];
- });
- }
- this.volumes = volumes;
- });
- };
- addVolumesToGroup(){
- let volumes = [];
- this.selectedVolumes.forEach((item)=>{
- volumes.push(item.id);
- });
- let param = {
- "addVolumes": volumes,
- }
- this.selectedVolumes = [];
- this.VolumeGroupService.addOrRemovevolumes(this.volumeGroupId,param).subscribe((res)=>{
- this.showAddVolumes = false;
- this.getProfiles();
- });
- }
- removeVolumeFromGroup(volume){
- let msg = "Are you sure you want to remove the selected Volume ?
[ "+ volume.name +"]
";
- let header ="Remove Volume";
- let acceptLabel = "Remove";
- let warming = true;
- this.confirmDialog([msg,header,acceptLabel,warming,"remove",volume])
- }
- confirmDialog([msg,header,acceptLabel,warming=true,func,data]){
- this.confirmationService.confirm({
- message: msg,
- header: header,
- acceptLabel: acceptLabel,
- isWarning: warming,
- accept: ()=>{
- try {
- if(func === "remove"){
- let param = {
- "removeVolumes": [
- data.id
- ],
- }
- this.VolumeGroupService.addOrRemovevolumes(this.volumeGroupId,param).subscribe((res)=>{
- this.getProfiles();
- });
- }
- }
- catch (e) {
- console.log(e);
- }
- finally {
-
- }
- },
- reject:()=>{}
- })
- }
-
-}
diff --git a/dashboard/src/app/business/block/volume-group-detail/volume-group-detail.module.ts b/dashboard/src/app/business/block/volume-group-detail/volume-group-detail.module.ts
deleted file mode 100644
index a1e665b29..000000000
--- a/dashboard/src/app/business/block/volume-group-detail/volume-group-detail.module.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-import { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { VolumeGroupDetailComponent } from './volume-group-detail.component';
-import { RouterModule } from '@angular/router';
-import { ReactiveFormsModule, FormsModule } from '@angular/forms';
-import { TabViewModule,ButtonModule, DataTableModule, DropMenuModule, DialogModule, FormModule, InputTextModule, InputTextareaModule, ConfirmDialogModule ,ConfirmationService} from './../../../components/common/api';
-import { HttpService } from './../../../shared/service/Http.service';
-import { VolumeService,VolumeGroupService} from './../volume.service';
-import { ProfileService } from './../../profile/profile.service';
-
-let routers = [{
- path: '',
- component: VolumeGroupDetailComponent
-}]
-@NgModule({
- imports: [
- CommonModule,
- RouterModule.forChild(routers),
- ReactiveFormsModule,
- FormsModule,
- InputTextModule,
- InputTextareaModule,
- TabViewModule,
- ButtonModule,
- DataTableModule,
- DialogModule,
- FormModule,
- ConfirmDialogModule
- ],
- declarations: [VolumeGroupDetailComponent],
- providers: [
- HttpService,
- VolumeService,
- ConfirmationService,
- ProfileService,
- VolumeGroupService
- ]
-})
-export class VolumeGroupDetailModule { }
diff --git a/dashboard/src/app/business/block/volume.service.ts b/dashboard/src/app/business/block/volume.service.ts
deleted file mode 100644
index 0dccc1e6a..000000000
--- a/dashboard/src/app/business/block/volume.service.ts
+++ /dev/null
@@ -1,192 +0,0 @@
-import { Injectable } from '@angular/core';
-import { I18NService, HttpService, ParamStorService } from '../../shared/api';
-import { Observable } from 'rxjs';
-
-@Injectable()
-export class VolumeService {
- constructor(
- private http: HttpService,
- private paramStor: ParamStorService
- ) { }
-
- url = 'v1beta/{project_id}/block/volumes';
-
- //Create volume
- createVolume(param) {
- return this.http.post(this.url, param);
- }
-
- //Update volume
- modifyVolume(id,param) {
- let modifyUrl = this.url + '/' + id
- return this.http.put(modifyUrl, param);
- }
-
- //Delete volume
- deleteVolume(id): Observable {
- let deleteUrl = this.url + '/' + id
- return this.http.delete(deleteUrl);
- }
-
- //Search all volumes
- getVolumes(): Observable {
- return this.http.get(this.url);
- }
-
- //Search volume
- getVolumeById(id): Observable {
- let url = this.url + '/' + id;
- return this.http.get(url);
- }
- //Search volume by groupId
- getVolumeByGroupId(id): Observable {
- let url = this.url + '?GroupId=' + id;
- return this.http.get(url);
- }
-
- //Create volumesGroup
- createVolumesGroup(param) {
- return this.http.post(this.url, param);
- }
-
- //Delete volumesGroup
- deleteVolumesGroup(id): Observable {
- let deleteUrl = this.url + '/' + id
- return this.http.delete(deleteUrl);
- }
-
- //Search volumesGroups
- getVolumesGroups(): Observable {
- return this.http.get(this.url);
- }
- expandVolume(id,param):Observable {
- let expandVolumeUrl = 'v1beta/{project_id}/block/volumes' + '/' + id + "/resize"
- return this.http.post(expandVolumeUrl,param);
- }
-}
-
-@Injectable()
-export class SnapshotService {
- constructor(
- private http: HttpService,
- private paramStor: ParamStorService
- ) { }
-
- url = 'v1beta/{project_id}/block/snapshots';
-
- //Create snapshot
- createSnapshot(param) {
- return this.http.post(this.url, param);
- }
-
- //Delete snapshot
- deleteSnapshot(id){
- let url = this.url + "/" + id;
- return this.http.delete(url);
- }
-
- //Search snapshot
- getSnapshots(filter?){
- let url = this.url;
- if(filter){
- url = this.url + "?" + filter.key + "=" + filter.value;
- }
- return this.http.get(url);
- }
-
- //Update snapshot
- modifySnapshot(id,param){
- let url = this.url + "/" + id;
- return this.http.put(url,param);
- }
-}
-@Injectable()
-export class ReplicationService {
- constructor(
- private http: HttpService,
- private paramStor: ParamStorService
- ) { }
-
- project_id = this.paramStor.CURRENT_TENANT().split("|")[1];
- replicationUrl = 'v1beta/{project_id}/block/replications';
- //create replication
- createReplication(param){
- let url = this.replicationUrl;
- return this.http.post(url,param);
- }
- getReplicationDetailByVolumeId(filter?){
- let url = this.replicationUrl+"/detail";
- if(filter){
- url = url + "?" + filter.key + "=" + filter.value;
- }
- return this.http.get(url);
- }
- disableReplication(param){
- let url = this.replicationUrl+"/"+param+"/disable";
- return this.http.post(url,param);
- }
- enableReplication(param){
- let url = this.replicationUrl+"/"+param+"/enable";
- return this.http.post(url,param);
- }
- failoverReplication(id){
- let url = this.replicationUrl+"/"+id+"/failover";
- let param = {
- "allowAttachedVolume": true,
- "secondaryBackendId": "default"
- }
- return this.http.post(url,param);
- }
- deleteReplication(param){
- let url = this.replicationUrl+"/"+param;
- return this.http.delete(url);
- }
- modifyReplication(replicationId,param){
- let url = this.replicationUrl+"/"+replicationId;
- return this.http.put(url,param);
- }
- //get all replications
- getAllReplicationsDetail(){
- let url = this.replicationUrl+"/detail";
- return this.http.get(url);
- }
-}
-@Injectable()
-export class VolumeGroupService {
- constructor(
- private http: HttpService,
- private paramStor: ParamStorService
- ) { }
-
- project_id = this.paramStor.CURRENT_TENANT().split("|")[1];
- volumeGroupUrl = 'v1beta/{project_id}/block/volumeGroup';
- //create volume group
- createVolumeGroup(param){
- let url = this.volumeGroupUrl;
- return this.http.post(url,param);
- }
- //get volume group
- getVolumeGroups(): Observable {
- return this.http.get(this.volumeGroupUrl);
- }
- //delete volume group
- deleteVolumeGroup(groupId): Observable {
- let url = this.volumeGroupUrl+"/" + groupId
- return this.http.delete(url);
- }
- //modify volume group
- modifyVolumeGroup(groupId,param): Observable {
- let url = this.volumeGroupUrl+"/" + groupId
- return this.http.put(url,param);
- }
- //get volume group by id
- getVolumeGroupById(groupId): Observable {
- let url = this.volumeGroupUrl+"/"+groupId;
- return this.http.get(url);
- }
- //add or remove volumes
- addOrRemovevolumes(groupId,param): Observable {
- let url = this.volumeGroupUrl+"/"+groupId;
- return this.http.put(url,param);
- }
-}
diff --git a/dashboard/src/app/business/block/volumeGroup.component.ts b/dashboard/src/app/business/block/volumeGroup.component.ts
deleted file mode 100644
index abde0e952..000000000
--- a/dashboard/src/app/business/block/volumeGroup.component.ts
+++ /dev/null
@@ -1,213 +0,0 @@
-import { Component, OnInit, ViewContainerRef, ViewChild, Directive, ElementRef, HostBinding, HostListener } from '@angular/core';
-import { I18NService } from 'app/shared/api';
-import { AppService } from 'app/app.service';
-import { I18nPluralPipe } from '@angular/common';
-import { trigger, state, style, transition, animate} from '@angular/animations';
-import { DialogModule } from '../../components/common/api';
-import { FormControl, FormGroup, FormBuilder, Validators, ValidatorFn, AbstractControl} from '@angular/forms';
-import { VolumeService ,VolumeGroupService} from './volume.service';
-import { ProfileService } from './../profile/profile.service';
-import { AvailabilityZonesService } from './../resource/resource.service';
-import { ConfirmationService,ConfirmDialogModule} from '../../components/common/api';
-import { Router } from '@angular/router';
-
-@Component({
- selector: 'volume-group-list',
- templateUrl: 'volumeGroup.html',
- providers: [ConfirmationService],
- styleUrls: [],
- animations: []
-})
-export class VolumeGroupComponent implements OnInit{
- volumeGroups=[];
- volemeOptions = [];
- profileOptions = [];
- currentGroup:any;
- availabilityZones = [];
- selectedOption :string;
- selectedVolumeGroups=[];
- profileJson = {};
- showVolumeGroupDialog :boolean = false;
- showModifyGroup :boolean = false;
- volumeGroupForm:any;
- modifyGroupForm:any;
- validRule= {
- 'name':'^[a-zA-Z]{1}([a-zA-Z0-9]|[_]){0,127}$'
- };
- constructor(
- public I18N: I18NService,
- private router: Router,
- private volumeGroupService : VolumeGroupService,
- private fb : FormBuilder,
- private profileService :ProfileService,
- private confirmationService:ConfirmationService,
- private availabilityZonesService:AvailabilityZonesService
- ){
- this.volumeGroupForm = this.fb.group({
- "group_name":["",{validators:[Validators.required, Validators.pattern(this.validRule.name)], updateOn:'change'} ],
- "description":[""],
- "profile":["",Validators.required],
- "zone":[""]
- });
- this.modifyGroupForm = this.fb.group({
- "group_name":["",{validators:[Validators.required, Validators.pattern(this.validRule.name)], updateOn:'change'} ],
- "description":[""]
- });
- }
- errorMessage = {
- "group_name": { required: "group name is required.", pattern:"Beginning with a letter with a length of 1-128, it can contain letters / numbers / underlines."},
- "profile": { required: "profile is required."}
- };
-
- label = {
- group_name_lable:'Group Name',
- profile_label:'Profile',
- description:this.I18N.keyID['sds_block_volume_descri'],
- zone:this.I18N.keyID['sds_block_volume_az']
- }
-
- ngOnInit() {
- this.volemeOptions = [];
- this.getProfiles();
- this.getAZ();
- }
- getAZ(){
- this.availabilityZonesService.getAZ().subscribe((azRes) => {
- let AZs=azRes.json();
- let azArr = [];
- if(AZs && AZs.length !== 0){
- AZs.forEach(item =>{
- let obj = {label: item, value: item};
- azArr.push(obj);
- })
- }
- this.availabilityZones = azArr;
- })
- }
- //show create volumes group
- createVolumeGroup(){
- this.volumeGroupForm.reset();
- this.showVolumeGroupDialog = true;
- }
- ModifyVolumeGroupDisplay(volumeGroup){
- this.modifyGroupForm.reset();
- this.currentGroup = volumeGroup;
- this.modifyGroupForm.controls['group_name'].setValue(this.currentGroup.name);
- this.modifyGroupForm.controls['description'].setValue("");
- this.showModifyGroup = true;
- }
- submit(group){
- if(!this.volumeGroupForm.valid){
- for(let i in this.volumeGroupForm.controls){
- this.volumeGroupForm.controls[i].markAsTouched();
- }
- return;
- }else{
- let param = {
- name : group.group_name,
- profiles : group.profile,
- description:group.description,
- availabilityZone:group.zone
- }
- this.volumeGroupService.createVolumeGroup(param).subscribe((res) => {
- this.getVolumeGroups();
- });
- }
- this.showVolumeGroupDialog = false;
- }
- getVolumeGroups(){
- this.volumeGroupService.getVolumeGroups().subscribe((res) => {
- let volumeGroups = res.json();
- if(volumeGroups && volumeGroups.length != 0){
- volumeGroups.forEach((item)=>{
- if(!item.description){
- item.description = "--";
- }
- let profileName = [];
- item.profiles.forEach((profileId)=>{
- profileName.push(this.profileJson[profileId]);
- });
- item.profileName = profileName;
- });
- }
- this.volumeGroups = volumeGroups;
- });
- }
- getProfiles() {
- this.profileService.getProfiles().subscribe((res) => {
- let profiles = res.json();
- profiles.forEach(profile => {
- this.profileOptions.push({
- label: profile.name,
- value: profile.id
- });
- this.profileJson[profile.id] = profile.name;
- });
- this.getVolumeGroups();
- });
- }
- deleteVolumeGroup(volumeGroup){
- this.currentGroup = volumeGroup;
- let msg = "Are you sure you want to delete the Volume Group?
[ "+ volumeGroup.name +" ]
";
- let header ="Delete Volume Group";
- let acceptLabel = "Delete";
- let warming = true;
- this.confirmDialog([msg,header,acceptLabel,warming,"delete"])
- }
- deleteMultiVolumeGroups(){
- let msg = "Are you sure you want to delete the selected Volume Groups?
[ "+ this.selectedVolumeGroups.length +" Volume Group ]
";
- let header ="Delete Volume Group";
- let acceptLabel = "Delete";
- let warming = true;
- this.confirmDialog([msg,header,acceptLabel,warming,"multiDelete"])
- }
- modifyGroup(value){
- if(!this.modifyGroupForm.valid){
- for(let i in this.modifyGroupForm.controls){
- this.modifyGroupForm.controls[i].markAsTouched();
- }
- return;
- }else{
- let param = {
- name:value.group_name,
- description:value.description,
- }
- this.volumeGroupService.modifyVolumeGroup(this.currentGroup.id,param).subscribe((res) => {
- this.getVolumeGroups();
- });
- }
- this.showModifyGroup = false;
- }
- confirmDialog([msg,header,acceptLabel,warming=true,func]){
- this.confirmationService.confirm({
- message: msg,
- header: header,
- acceptLabel: acceptLabel,
- isWarning: warming,
- accept: ()=>{
- try {
- if(func === "delete"){
- this.volumeGroupService.deleteVolumeGroup(this.currentGroup.id).subscribe((res) => {
- this.getVolumeGroups();
- })
- }else if(func === "multiDelete"){
- this.selectedVolumeGroups.forEach(item=>{
- this.volumeGroupService.deleteVolumeGroup(item.id).subscribe((res) => {
- this.getVolumeGroups();
- })
- });
- this.selectedVolumeGroups = [];
- }
- }
- catch (e) {
- console.log(e);
- }
- finally {
-
- }
- },
- reject:()=>{}
- })
- }
-
-}
diff --git a/dashboard/src/app/business/block/volumeGroup.html b/dashboard/src/app/business/block/volumeGroup.html
deleted file mode 100644
index 962c28dcb..000000000
--- a/dashboard/src/app/business/block/volumeGroup.html
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-
-
-
-
- {{group.name}}
-
-
-
-
-
-
-
-
- {{I18N.keyID['sds_block_volume_modify']}}{{I18N.keyID['sds_block_volume_delete']}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dashboard/src/app/business/block/volumeGroup.module.ts b/dashboard/src/app/business/block/volumeGroup.module.ts
deleted file mode 100644
index 091a352c2..000000000
--- a/dashboard/src/app/business/block/volumeGroup.module.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import { NgModule, APP_INITIALIZER } from '@angular/core';
-import { VolumeGroupComponent } from './volumeGroup.component';
-import { ButtonModule, DataTableModule, InputTextModule, DialogModule,FormModule,MultiSelectModule ,DropdownModule,InputTextareaModule} from '../../components/common/api';
-import { ReactiveFormsModule, FormsModule } from '@angular/forms';
-import { HttpService } from './../../shared/service/Http.service';
-import { VolumeService ,VolumeGroupService} from './volume.service';
-import { AvailabilityZonesService } from './../resource/resource.service';
-import { ConfirmationService,ConfirmDialogModule} from '../../components/common/api';
-import { RouterModule } from '@angular/router';
-
-@NgModule({
- declarations: [ VolumeGroupComponent ],
- imports: [ ButtonModule, DataTableModule, InputTextModule, DialogModule,FormModule,MultiSelectModule,DropdownModule,ReactiveFormsModule,FormsModule,ConfirmDialogModule,InputTextareaModule,RouterModule],
- exports: [ VolumeGroupComponent ],
- providers: [
- HttpService,
- VolumeService,
- VolumeGroupService,
- ConfirmationService,
- AvailabilityZonesService
- ]
-})
-export class VolumeGroupModule { }
diff --git a/dashboard/src/app/business/block/volumeList.component.ts b/dashboard/src/app/business/block/volumeList.component.ts
deleted file mode 100644
index 30c8c0e30..000000000
--- a/dashboard/src/app/business/block/volumeList.component.ts
+++ /dev/null
@@ -1,367 +0,0 @@
-import { Component, OnInit, ViewContainerRef, ViewChild, Directive, ElementRef, HostBinding, HostListener } from '@angular/core';
-import { Router } from '@angular/router';
-import { I18NService, Utils } from 'app/shared/api';
-import { FormControl, FormGroup, FormBuilder, Validators, ValidatorFn, AbstractControl } from '@angular/forms';
-import { AppService } from 'app/app.service';
-import { I18nPluralPipe } from '@angular/common';
-import { trigger, state, style, transition, animate } from '@angular/animations';
-import { MenuItem ,ConfirmationService} from '../../components/common/api';
-
-import { VolumeService, SnapshotService,ReplicationService} from './volume.service';
-import { ProfileService } from './../profile/profile.service';
-import { identifierModuleUrl } from '@angular/compiler';
-
-let _ = require("underscore");
-@Component({
- selector: 'volume-list',
- templateUrl: 'volumeList.html',
- providers: [ConfirmationService],
- styleUrls: [],
- animations: []
-})
-export class VolumeListComponent implements OnInit {
- createSnapshotDisplay = false;
- createReplicationDisplay = false;
- expandDisplay = false;
- modifyDisplay = false;
- selectVolumeSize;
- newVolumeSize;
- newVolumeSizeFormat;
- unit:number = 1;
- repPeriod : number=60;
- capacityOptions = [
- {
- label: 'GB',
- value: 'gb'
- },
- {
- label: 'TB',
- value: 'tb'
- }
-
- ];
- profileOptions = [
- {
- label: 'Select Profile',
- value: null
- }
- ];
- azOption=[{label:"Secondary",value:"secondary"}];
- selectedVolumes = [];
- volumes = [];
- menuItems: MenuItem[];
- menuDeleDisableItems: MenuItem[];
- label = {
- name: this.I18N.keyID['sds_block_volume_name'],
- volume: this.I18N.keyID['sds_block_volume_title'],
- description: this.I18N.keyID['sds_block_volume_descri']
- };
- snapshotFormGroup;
- modifyFormGroup;
- expandFormGroup;
- replicationGroup;
- errorMessage = {
- "name": { required: "Name is required." },
- "description": { maxlength: "Max. length is 200." },
- "repName":{ required: "Name is required." },
- "profileOption":{ required: "Name is required." },
- "expandSize":{required: "Expand Capacity is required."}
- };
- profiles;
- selectedVolume;
-
- constructor(
- public I18N: I18NService,
- private router: Router,
- private VolumeService: VolumeService,
- private SnapshotService: SnapshotService,
- private ProfileService: ProfileService,
- private ReplicationService: ReplicationService,
- private confirmationService: ConfirmationService,
- private fb: FormBuilder
- ) {
- this.snapshotFormGroup = this.fb.group({
- "name": ["", Validators.required],
- "description": ["", Validators.maxLength(200)]
- });
- this.modifyFormGroup = this.fb.group({
- "name": ['', Validators.required]
- });
- this.expandFormGroup = this.fb.group({
- "expandSize":[1,{validators:[Validators.required], updateOn:'change'} ],
- "capacityOption":[this.capacityOptions[0] ]
- });
- this.expandFormGroup.get("expandSize").valueChanges.subscribe(
- (value:string)=>{
- this.newVolumeSize = parseInt(this.selectedVolume.size) + parseInt(value)*this.unit;
- this.newVolumeSizeFormat = Utils.getDisplayGBCapacity(this.newVolumeSize);
- }
- );
- this.expandFormGroup.get("capacityOption").valueChanges.subscribe(
- (value:string)=>{
- this.unit =(value === "tb" ? 1024: 1);
- this.newVolumeSize = parseInt(this.selectedVolume.size) + parseInt(this.expandFormGroup.value.expandSize)*this.unit;
- this.newVolumeSizeFormat = Utils.getDisplayGBCapacity(this.newVolumeSize);
- }
- )
- this.replicationGroup = this.fb.group({
- "repName": ['',{validators:[Validators.required], updateOn:'change'}],
- "az": [this.azOption[0]],
- "profileOption":['',{validators:[Validators.required], updateOn:'change'}]
- });
-
- }
-
- ngOnInit() {
- this.menuItems = [
- {
- "label": this.I18N.keyID['sds_block_volume_modify'],
- command: () => {
- this.modifyDisplay = true;
- },
- disabled:false
- },
- {
- "label": this.I18N.keyID['sds_block_volume_expand'],
- command: () => {
- this.expandDisplay = true;
- this.expandFormGroup.reset();
- this.expandFormGroup.controls["expandSize"].setValue(1);
- this.unit = 1;
- },
- disabled:false
- },
- {
- "label": this.I18N.keyID['sds_block_volume_delete'],
- command: () => {
- if (this.selectedVolume && this.selectedVolume.id) {
- this.deleteVolumes(this.selectedVolume);
- }
- },
- disabled:false
- }
- ];
- this.menuDeleDisableItems = [
- {
- "label": this.I18N.keyID['sds_block_volume_modify'],
- command: () => {
- this.modifyDisplay = true;
- },
- disabled:false
- },
- {
- "label": this.I18N.keyID['sds_block_volume_expand'],
- command: () => {
- this.expandDisplay = true;
- this.expandFormGroup.reset();
- this.expandFormGroup.controls["expandSize"].setValue(1);
- this.unit = 1;
- },
- disabled:false
- },
- {
- "label": this.I18N.keyID['sds_block_volume_delete'],
- command: () => {
- if (this.selectedVolume && this.selectedVolume.id) {
- this.deleteVolumes(this.selectedVolume);
- }
- },
- disabled:true
- }
- ];
-
- this.getProfiles()
- }
-
- getVolumes() {
- this.selectedVolumes = [];
- this.VolumeService.getVolumes().subscribe((res) => {
- let volumes = res.json();
- this.ReplicationService.getAllReplicationsDetail().subscribe((resRep)=>{
- let replications = resRep.json();
- volumes.map((item)=>
- {
- let _profile = this.profiles.filter((profile,index,arr)=>{
- return profile.id == item.profileId;
- })[0];
- item['profileName'] = _profile != undefined ? _profile.name : "--";
- item['isDisableRep'] = false;
- replications.map((rep)=>{
- if(rep.primaryVolumeId == item.id || rep.secondaryVolumeId == item.id){
- item['isDisableRep'] = true;
- }
- });
- item.size = Utils.getDisplayGBCapacity(item.size);
- }
- );
- this.SnapshotService.getSnapshots().subscribe((resSnap)=>{
- let snaps = resSnap.json();
- volumes.map((item)=>
- {
- item['disabled'] = false;
- snaps.map((snap)=>{
- if(snap.volumeId == item.id){
- item['disabled'] = true;
- }
- });
- }
- );
- this.volumes = volumes;
- });
- });
- });
- }
-
- getProfiles() {
- this.ProfileService.getProfiles().subscribe((res) => {
- this.profiles = res.json();
- this.profiles.forEach(profile => {
- this.profileOptions.push({
- label: profile.name,
- value: profile.id
- });
- });
-
- this.getVolumes();
- });
- }
-
- batchDeleteVolume() {
- this.selectedVolumes.forEach(volume => {
- this.deleteVolume(volume.id);
- });
- }
-
- deleteVolumeById(id) {
- this.deleteVolume(id);
- }
-
- deleteVolume(id) {
- this.VolumeService.deleteVolume(id).subscribe((res) => {
- this.getVolumes();
- });
- }
-
- createSnapshot() {
- if(!this.snapshotFormGroup.valid){
- for(let i in this.snapshotFormGroup.controls){
- this.snapshotFormGroup.controls[i].markAsTouched();
- }
- return;
- }
- let param = {
- name: this.snapshotFormGroup.value.name,
- volumeId: this.selectedVolume.id,
- description: this.snapshotFormGroup.value.description
- }
- this.SnapshotService.createSnapshot(param).subscribe((res) => {
- this.createSnapshotDisplay = false;
- this.getProfiles();
- });
- }
-
- returnSelectedVolume(selectedVolume, dialog) {
- if (dialog === 'snapshot') {
- this.snapshotFormGroup.reset();
- this.createSnapshotDisplay = true;
- } else if (dialog === 'replication') {
- this.createReplicationDisplay = true;
- }
- let unit = selectedVolume.size.includes("GB") ? 1 : 10;
-
- this.selectedVolume = selectedVolume;
- this.replicationGroup.reset();
- this.replicationGroup.controls["repName"].setValue(selectedVolume.name+"-replication");
- this.replicationGroup.controls["az"].setValue(this.azOption[0]);
- this.selectVolumeSize = parseInt(selectedVolume.size)*unit;
- }
-
- modifyVolume() {
- let param = {
- name: this.modifyFormGroup.value.name
- };
- this.VolumeService.modifyVolume(this.selectedVolume.id, param).subscribe((res) => {
- this.getVolumes();
- this.modifyDisplay = false;
- });
- }
- expandVolume(){
- if(!this.expandFormGroup.valid){
- for(let i in this.expandFormGroup.controls){
- this.expandFormGroup.controls[i].markAsTouched();
- }
- return;
- }
-
- let param = {
- "newSize": this.newVolumeSize
- }
- this.VolumeService.expandVolume(this.selectedVolume.id, param).subscribe((res) => {
- this.getVolumes();
- this.expandDisplay = false;
- });
- }
- createReplication(){
- if(!this.replicationGroup.valid){
- for(let i in this.replicationGroup.controls){
- this.replicationGroup.controls[i].markAsTouched();
- }
- return;
- }
- let param = {
- "name":this.replicationGroup.value.repName ,
- "size": Number(this.selectedVolume.size.replace(" GB","")),
- "availabilityZone": this.replicationGroup.value.az.value,
- "profileId": this.replicationGroup.value.profileOption,
- }
- this.VolumeService.createVolume(param).subscribe((res) => {
- let param = {
- "name":this.replicationGroup.value.repName ,
- "primaryVolumeId": this.selectedVolume.id,
- "availabilityZone": this.replicationGroup.value.az.value,
- "profileId": this.replicationGroup.value.profileOption,
- "replicationMode":"async",
- "replicationPeriod":Number(this.repPeriod),
- "secondaryVolumeId":res.json().id
- }
- this.createReplicationDisplay = false;
- this.ReplicationService.createReplication(param).subscribe((res) => {
- this.getVolumes();
- },
- error=>{
- this.getVolumes();
- });
- });
- }
- deleteVolumes(volumes){
- let arr=[], msg;
- if(_.isArray(volumes)){
- volumes.forEach((item,index)=> {
- arr.push(item.id);
- })
- msg = "Are you sure you want to delete the selected volumes?
[ "+ volumes.length +" Volumes ]
";
- }else{
- arr.push(volumes.id);
- msg = "Are you sure you want to delete the volume?
[ "+ volumes.name +" ]
";
- }
-
- this.confirmationService.confirm({
- message: msg,
- header: this.I18N.keyID['sds_block_volume_deleVolu'],
- acceptLabel: this.I18N.keyID['sds_block_volume_delete'],
- isWarning: true,
- accept: ()=>{
- arr.forEach((item,index)=> {
- this.deleteVolume(item)
- })
-
- },
- reject:()=>{}
- })
-
- }
-
- tablePaginate() {
- this.selectedVolumes = [];
- }
-}
diff --git a/dashboard/src/app/business/block/volumeList.html b/dashboard/src/app/business/block/volumeList.html
deleted file mode 100644
index 66584d949..000000000
--- a/dashboard/src/app/business/block/volumeList.html
+++ /dev/null
@@ -1,159 +0,0 @@
-
-
-
-
-
- {{volume.name}}
-
-
-
-
-
-
-
-
- {{I18N.keyID['sds_block_volume_createsna']}}
- {{I18N.keyID['sds_block_volume_createrep']}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{selectedVolume && selectedVolume.name}}
-
-
-
-
default
-
-
-
-
-
-
-
-
-
-
- Period
- =
-
- Minutes
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dashboard/src/app/business/block/volumeList.module.ts b/dashboard/src/app/business/block/volumeList.module.ts
deleted file mode 100644
index da627be72..000000000
--- a/dashboard/src/app/business/block/volumeList.module.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-import { NgModule, APP_INITIALIZER } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { ReactiveFormsModule, FormsModule } from '@angular/forms';
-import { VolumeListComponent } from './volumeList.component';
-import { ButtonModule, DataTableModule, DropMenuModule, DialogModule, FormModule, InputTextModule, InputTextareaModule, DropdownModule ,ConfirmationService,ConfirmDialogModule} from '../../components/common/api';
-
-import { HttpService } from './../../shared/service/Http.service';
-import {VolumeService, SnapshotService, ReplicationService} from './volume.service';
-import { ProfileService } from './../profile/profile.service';
-import { RouterModule } from '@angular/router';
-
-@NgModule({
- declarations: [ VolumeListComponent ],
- imports: [
- CommonModule,
- ReactiveFormsModule,
- FormsModule,
- ButtonModule,
- InputTextModule,
- InputTextareaModule,
- DataTableModule,
- DropdownModule,
- DropMenuModule,
- DialogModule,
- FormModule,
- ConfirmDialogModule,
- RouterModule
- ],
- exports: [ VolumeListComponent ],
- providers: [
- HttpService,
- VolumeService,
- SnapshotService,
- ProfileService,
- ReplicationService,
- ConfirmationService
- ]
-})
-export class VolumeListModule { }
diff --git a/dashboard/src/app/business/cloud/cloud-service-item/cloud-service-item.component.html b/dashboard/src/app/business/cloud/cloud-service-item/cloud-service-item.component.html
deleted file mode 100644
index 6d63c84d9..000000000
--- a/dashboard/src/app/business/cloud/cloud-service-item/cloud-service-item.component.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
{{cloudService.name}}
-
-
region:{{cloudService.region}}
-
type:{{cloudService.type}}
-
-
-
\ No newline at end of file
diff --git a/dashboard/src/app/business/cloud/cloud-service-item/cloud-service-item.component.scss b/dashboard/src/app/business/cloud/cloud-service-item/cloud-service-item.component.scss
deleted file mode 100644
index 8fa4efde1..000000000
--- a/dashboard/src/app/business/cloud/cloud-service-item/cloud-service-item.component.scss
+++ /dev/null
@@ -1,15 +0,0 @@
-.img-div {
- width: 217px;
- height: 153px;
- position: relative;
- background-image: url(../../../../assets/business/images/cloud_service/u2309.png);
- text-align: center;
-}
-
-.img-center {
- height: 60px;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -40%);
-}
\ No newline at end of file
diff --git a/dashboard/src/app/business/cloud/cloud-service-item/cloud-service-item.component.spec.ts b/dashboard/src/app/business/cloud/cloud-service-item/cloud-service-item.component.spec.ts
deleted file mode 100644
index e69de29bb..000000000
diff --git a/dashboard/src/app/business/cloud/cloud-service-item/cloud-service-item.component.ts b/dashboard/src/app/business/cloud/cloud-service-item/cloud-service-item.component.ts
deleted file mode 100644
index 70ae7a471..000000000
--- a/dashboard/src/app/business/cloud/cloud-service-item/cloud-service-item.component.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { Component, OnInit, Input } from '@angular/core';
-
-@Component({
- selector: 'app-cloud-service-item',
- templateUrl: './cloud-service-item.component.html',
- styleUrls: ['./cloud-service-item.component.scss']
-})
-export class CloudServiceItemComponent implements OnInit {
-
- @Input() cloudService;
-
- constructor() { }
-
- ngOnInit() {
- }
-
- deleteCloud(name){
- alert("delete "+name);
- //删除某个云
- }
-
-}
diff --git a/dashboard/src/app/business/cloud/cloud.component.html b/dashboard/src/app/business/cloud/cloud.component.html
deleted file mode 100644
index 40a9ccf9f..000000000
--- a/dashboard/src/app/business/cloud/cloud.component.html
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/dashboard/src/app/business/cloud/cloud.component.scss b/dashboard/src/app/business/cloud/cloud.component.scss
deleted file mode 100644
index e69de29bb..000000000
diff --git a/dashboard/src/app/business/cloud/cloud.component.ts b/dashboard/src/app/business/cloud/cloud.component.ts
deleted file mode 100644
index 616b22281..000000000
--- a/dashboard/src/app/business/cloud/cloud.component.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-
-@Component({
- selector: 'app-cloud',
- templateUrl: './cloud.component.html',
- styleUrls: ['./cloud.component.scss']
-})
-export class CloudComponent implements OnInit {
-
- constructor() { }
-
- ngOnInit() {
- }
-
-}
diff --git a/dashboard/src/app/business/cloud/cloud.module.ts b/dashboard/src/app/business/cloud/cloud.module.ts
deleted file mode 100644
index eec027959..000000000
--- a/dashboard/src/app/business/cloud/cloud.module.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-import { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { RouterModule } from '@angular/router';
-import { FormsModule } from '@angular/forms';
-
-import { ButtonModule,MessageModule,TabViewModule,DialogModule,DropdownModule } from '../../components/common/api';
-
-import { CloudComponent } from './cloud.component';
-import { RegistryComponent } from './registry/registry.component';
-import { ReplicationComponent } from './replication/replication.component';
-import { MigrationComponent } from './migration/migration.component';
-import { CloudServiceItemComponent } from './cloud-service-item/cloud-service-item.component';
-
-let routers = [{
- path: '',
- component: CloudComponent
-}]
-
-@NgModule({
- imports: [
- CommonModule,
- RouterModule.forChild(routers),
- FormsModule,
- ButtonModule,
- MessageModule,
- TabViewModule,
- DialogModule,
- DropdownModule
- ],
- declarations: [
- CloudComponent,
- RegistryComponent,
- ReplicationComponent,
- MigrationComponent,
- CloudServiceItemComponent
- ]
-})
-export class CloudModule { }
diff --git a/dashboard/src/app/business/cloud/migration/migration.component.html b/dashboard/src/app/business/cloud/migration/migration.component.html
deleted file mode 100644
index 6b120b252..000000000
--- a/dashboard/src/app/business/cloud/migration/migration.component.html
+++ /dev/null
@@ -1,3 +0,0 @@
-
- migration works!
-
diff --git a/dashboard/src/app/business/cloud/migration/migration.component.scss b/dashboard/src/app/business/cloud/migration/migration.component.scss
deleted file mode 100644
index e69de29bb..000000000
diff --git a/dashboard/src/app/business/cloud/migration/migration.component.ts b/dashboard/src/app/business/cloud/migration/migration.component.ts
deleted file mode 100644
index 26ce78ea3..000000000
--- a/dashboard/src/app/business/cloud/migration/migration.component.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-
-@Component({
- selector: 'app-migration',
- templateUrl: './migration.component.html',
- styleUrls: ['./migration.component.scss']
-})
-export class MigrationComponent implements OnInit {
-
- constructor() { }
-
- ngOnInit() {
- }
-
-}
diff --git a/dashboard/src/app/business/cloud/registry/registry.component.html b/dashboard/src/app/business/cloud/registry/registry.component.html
deleted file mode 100644
index 03de8009d..000000000
--- a/dashboard/src/app/business/cloud/registry/registry.component.html
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
- {{label.name}}
-
-
-
-
-
- {{label.accessKey}}
-
-
-
- {{label.secretKey}}
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/dashboard/src/app/business/cloud/registry/registry.component.scss b/dashboard/src/app/business/cloud/registry/registry.component.scss
deleted file mode 100644
index e69de29bb..000000000
diff --git a/dashboard/src/app/business/cloud/registry/registry.component.ts b/dashboard/src/app/business/cloud/registry/registry.component.ts
deleted file mode 100644
index ca8367cd8..000000000
--- a/dashboard/src/app/business/cloud/registry/registry.component.ts
+++ /dev/null
@@ -1,90 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-
-@Component({
- selector: 'app-registry',
- templateUrl: './registry.component.html',
- styleUrls: ['./registry.component.scss']
-})
-export class RegistryComponent implements OnInit {
-
- registryServiceDisplay = false;
- label;
- cloudServices = [];
- serviceTypeOptions = [];
- regionOptions = [];
- selectedType = '';
- selectedRegion = '';
-
-
- constructor() { }
-
- ngOnInit() {
- //界面文本
- this.label = {
- name: 'Service Name',
- type: 'Service Type',
- region: 'Region',
- accessKey: 'AWS Access Key',
- secretKey: 'Secret Key'
- };
-
- //type下拉框的项
- this.serviceTypeOptions = [
- { label: 'AWS S3', value: { id: 0, name: 'New York', code: 'NY' } },
- { label: 'Microsoft Azure Blob Storage', value: { id: 1, name: 'New York', code: 'NY' } },
- { label: 'Huawei OBS', value: { id: 2, name: 'Rome', code: 'RM' } }
- ];
-
- //region下拉框的项
- this.regionOptions = [
- { label: 'CN North', value: { id: 0, name: 'New York', code: 'NY' } },
- { label: 'CN South', value: { id: 1, name: 'New York', code: 'NY' } },
- { label: 'Huawei OBS', value: { id: 2, name: 'Rome', code: 'RM' } }
- ];
-
- //查询回来已有的云服务
- this.cloudServices = [
- {
- name:'service_for_analytics',
- region:'EU(Paris)',
- type:'AWS S3'
- },
- {
- name:'service_for_finance',
- region:'CN North',
- type:'Huawei OBS'
- },
- {
- name:'service_for_media',
- region:'North Europe',
- type:'Microsoft Azure Blob Storage'
- }
- ];
-
-
-
-
-
- }
-
- showRegistryService() {
- this.registryServiceDisplay = true;
- }
-
- registryCloud() {
- //http注册新的云
- alert("registry");
- }
-
- getServiceType() {
- //http获取service type
- }
-
- getRegions() {
- //http获取regions
- }
-
- getCloudServices() {
- //http获取cloudServices
- }
-}
diff --git a/dashboard/src/app/business/cloud/replication/replication.component.html b/dashboard/src/app/business/cloud/replication/replication.component.html
deleted file mode 100644
index ac4e19a5b..000000000
--- a/dashboard/src/app/business/cloud/replication/replication.component.html
+++ /dev/null
@@ -1,29 +0,0 @@
-
\ No newline at end of file
diff --git a/dashboard/src/app/business/cloud/replication/replication.component.scss b/dashboard/src/app/business/cloud/replication/replication.component.scss
deleted file mode 100644
index e69de29bb..000000000
diff --git a/dashboard/src/app/business/cloud/replication/replication.component.ts b/dashboard/src/app/business/cloud/replication/replication.component.ts
deleted file mode 100644
index b6b2efd92..000000000
--- a/dashboard/src/app/business/cloud/replication/replication.component.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-
-@Component({
- selector: 'app-replication',
- templateUrl: './replication.component.html',
- styleUrls: ['./replication.component.scss']
-})
-export class ReplicationComponent implements OnInit {
-
- constructor() { }
-
- ngOnInit() {
- }
-
-}
diff --git a/dashboard/src/app/business/home/home.component.html b/dashboard/src/app/business/home/home.component.html
deleted file mode 100644
index 3b4104d07..000000000
--- a/dashboard/src/app/business/home/home.component.html
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
-
-
-
-
{{I18N.keyID["sds_home_block_capacity"]}}
-
{{I18N.keyID["sds_home_update"]}}
-
-
-
-
-
{{I18N.keyID["sds_home_top5"]}}
-
{{I18N.keyID["sds_home_update"]}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Trend of block storage capacity growth
-
Updated 5 minutes ago
-
-
-
-
-
Trend of quantity of volumes growth
-
Updated 5 minutes ago
-
-
-
-
-
diff --git a/dashboard/src/app/business/home/home.component.scss b/dashboard/src/app/business/home/home.component.scss
deleted file mode 100644
index 07ab7ba06..000000000
--- a/dashboard/src/app/business/home/home.component.scss
+++ /dev/null
@@ -1,43 +0,0 @@
-@import "./../scss-variable";
-.img-item-div-height {
- height: 258px;
- margin: 2em;
-}
-
-.statisBg{
- background: #f3f6f7;
- border-radius: 12px;
-}
-
-.img-item-div {
- padding: 2em;
- border-radius: 10px;
- // background-color: rgb(208, 232, 240);
-}
-
-.home-img-item-margin {
- margin: 2em 0;
-}
-
-.user-img-item-margin {
- margin-top: 3em;
-}
-
-.header-h2-title-font {
- font-size: 2em;
- padding: 0.5em 0.25em;
-}
-
-.home-font-color-class {
- color: map-get($color-title, primary);
- padding-bottom: .30rem;
-}
-
-.header-p-text {
- padding: 0 0.5em;
- // color: map-get($color-title, secondary);
-}
-
-.capacity-secondary {
- margin: 1em 0;
-}
\ No newline at end of file
diff --git a/dashboard/src/app/business/home/home.component.ts b/dashboard/src/app/business/home/home.component.ts
deleted file mode 100644
index 5d3e7551e..000000000
--- a/dashboard/src/app/business/home/home.component.ts
+++ /dev/null
@@ -1,271 +0,0 @@
-import { Component, OnInit, ViewContainerRef, ViewChild, Directive, ElementRef, HostBinding, HostListener } from '@angular/core';
-import { Http } from '@angular/http';
-import { ParamStorService } from 'app/shared/api';
-import { ProfileService } from 'app/business/profile/profile.service';
-import { Observable } from "rxjs/Rx";
-import { I18NService } from 'app/shared/api';
-
-@Component({
- templateUrl: './home.component.html',
- styleUrls: [
- './home.component.scss'
- ]
-})
-export class HomeComponent implements OnInit {
- items = [];
- chartDatas;
- chartDatasbar;
- option;
- chartBarOpion;
- profileOptions = [];
- lineData_nums;
- lineData_capacity;
- showAdminStatis = true;
- tenants =[];
- constructor(
- private http: Http,
- private paramStor: ParamStorService,
- private profileService: ProfileService,
- private I18N: I18NService,
- ) { }
-
- ngOnInit() {
- if(this.paramStor.CURRENT_USER().split("|")[0] == "admin"){
- this.showAdminStatis = true;
- this.getCountData();
- }else{
- this.showAdminStatis = false;
- this.getTenantCountData();
- }
-
- this.items = [
- {
- countNum: 0,
- label: this.I18N.keyID["sds_home_tenants"]
- },
- {
- countNum:0,
- label: this.I18N.keyID["sds_home_users"]
- },
- {
- countNum: 0,
- label: this.I18N.keyID["sds_home_storages"]
- },
- {
- countNum: 0,
- label: this.I18N.keyID["sds_home_pools"]
- },
- {
- countNum: 0,
- label: this.I18N.keyID["sds_home_volumes"]
- },
- {
- countNum: 0,
- label:this.I18N.keyID["sds_home_snapshots"]
- },
- {
- countNum: 0,
- label: this.I18N.keyID["sds_home_replications"]
- },
- {
- countNum: 0,
- label: "Cross-Region Replications"
- },
- {
- countNum: 0,
- label: "Cross-Region Migrations"
- }
- ];
-
-
- this.option = {
- cutoutPercentage: 80,
- title: {
- display: false,
- text: 'My Title',
- fontSize: 12
- },
- legend: {
- labels: {
- boxWidth: 12
- },
- display: true,
- position: 'right',
- fontSize: 12
- }
- };
- this.chartBarOpion= {
- scales: {
- yAxes: [{
- ticks: {
- min: 0,
- }
- }]
- },
- legend: {
- display: false
- }
- }
-
- this.lineData_capacity = {
- labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
- datasets: [
- {
- label: 'Capacity(GB)',
- data: [10, 11, 20, 160, 156, 195, 200],
- fill: false,
- borderColor: '#4bc0c0'
- }
- ]
- }
-
- this.lineData_nums = {
- labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
- datasets: [
- {
- label: 'Volumes',
- data: [10, 23, 40, 38, 86, 107, 190],
- fill: false,
- borderColor: '#565656'
- }
- ]
- }
-
- }
-
- getProfiles() {
- this.profileService.getProfiles().subscribe((res) => {
- let profiles = res.json();
- profiles.forEach(profile => {
- this.profileOptions.push({
- name: profile.name,
- id: profile.id,
- capacity: 0
- })
- });
- });
- }
-
- listTenants() {
- let request: any = { params:{} };
- request.params = {
- "domain_id": "default"
- }
-
- this.http.get("/v3/projects", request).subscribe((res) => {
-
- this.items[0].countNum = res.json().projects.length;
- this.tenants = res.json().projects;
- this.tenants.forEach((item, i)=>{
- if(item.name == "admin"){
- this.getAllvolumes(item.id, this.tenants.length - 1);
- this.getAllSnapshots(item.id);
- this.getAllReplications(item.id);
- this.getAllPools(item.id);
- this.getAllDocks(item.id);
- }
- });
-
-
- });
- }
- listUsers(){
- let request: any = { params:{} };
- request.params = {
- "domain_id": "default"
- }
- this.http.get("/v3/users", request).subscribe((res) => {
- this.items[1].countNum = res.json().users.length;
- });
- }
- getAllvolumes(projectId, index?){
- let url = 'v1beta/'+projectId+'/block/volumes';
- this.http.get(url).subscribe((res)=>{
- this.items[4].countNum = this.items[4].countNum + res.json().length;
-
- if(this.showAdminStatis){
- res.json().forEach(volume => {
- this.profileOptions.forEach(profile => {
- if(volume.profileId == profile.id){
- profile.capacity = profile.capacity + volume.size;
- }
- });
- });
-
- if(index == (this.tenants.length-1)){
- let [chartData, chartLabel] = [[],[]];
- this.profileOptions.forEach(ele=>{
- chartData.push(ele.capacity);
- chartLabel.push(ele.name);
- });
-
- this.chartDatasbar = {
- labels: chartLabel,
- datasets: [{
- label:"Used Capacity (GB)",
- backgroundColor: '#42A5F5',
- data: chartData
- }]
- }
- }
- }
- });
- }
- getAllSnapshots(projectId){
- let url = 'v1beta/'+projectId+'/block/snapshots';
- this.http.get(url).subscribe((res)=>{
- this.items[5].countNum = this.items[5].countNum + res.json().length;
- });
- }
- getAllReplications(projectId){
- let url = 'v1beta/'+projectId+'/block/replications';
- this.http.get(url).subscribe((res)=>{
- if(res.json()){
- this.items[6].countNum = this.items[6].countNum + res.json().length;
- }
- });
- }
- getAllPools(projectId){
- let url = 'v1beta/'+projectId+'/pools';
- this.http.get(url).subscribe((res)=>{
- this.items[3].countNum = this.items[3].countNum + res.json().length;
-
- let [storCapacityTotal, storCapacityFree]=[0,0];
- res.json().forEach(element => {
- storCapacityTotal = storCapacityTotal + element.totalCapacity;
- storCapacityFree = storCapacityFree + element.freeCapacity;
- });
-
- this.chartDatas = {
- labels: [this.I18N.keyID["sds_home_used_capacity"] + " (GB)",this.I18N.keyID["sds_home_free_capacity"] + " (GB)"],
- datasets: [
- {
- label: 'high_capacity',
- data: [(storCapacityTotal-storCapacityFree), storCapacityFree],
- backgroundColor: [
- "#438bd3",
- "rgba(224, 224, 224, .5)"
- ]
- }]
- };
- });
- }
- getAllDocks(projectId){
- let url = 'v1beta/'+projectId+'/docks';
- this.http.get(url).subscribe((res)=>{
- this.items[2].countNum = this.items[2].countNum + res.json().length;
- });
- }
- getCountData(){
- this.getProfiles();
- this.listTenants();
- this.listUsers();
- }
-
- getTenantCountData(){
- let tenantId = this.paramStor.CURRENT_TENANT().split("|")[1];
- this.getAllvolumes(tenantId);
- this.getAllSnapshots(tenantId);
- this.getAllReplications(tenantId);
- }
-}
diff --git a/dashboard/src/app/business/home/home.module.ts b/dashboard/src/app/business/home/home.module.ts
deleted file mode 100644
index 62667a672..000000000
--- a/dashboard/src/app/business/home/home.module.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import { NgModule, APP_INITIALIZER } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { HomeComponent } from './home.component';
-import { ImgItemComponent } from './imgItem.component/imgItem.component';
-import { ProfileService } from 'app/business/profile/profile.service';
-import { HttpService } from 'app/shared/service/Http.service';
-
-import { RouterModule } from '@angular/router';
-import { ButtonModule, ChartModule } from '../../components/common/api';
-
-let routers = [{
- path: '',
- component: HomeComponent
-}]
-
-@NgModule({
- declarations: [
- HomeComponent,
- ImgItemComponent,
- ],
- imports: [
- RouterModule.forChild(routers), ButtonModule,
- CommonModule,
- ChartModule
- ],
- providers: [HttpService, ProfileService]
-})
-export class HomeModule { }
\ No newline at end of file
diff --git a/dashboard/src/app/business/home/imgItem.component/imgItem.component.html b/dashboard/src/app/business/home/imgItem.component/imgItem.component.html
deleted file mode 100644
index 44dfee26c..000000000
--- a/dashboard/src/app/business/home/imgItem.component/imgItem.component.html
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
{{item.countNum}}
-
{{item.label}}
-
-
-
\ No newline at end of file
diff --git a/dashboard/src/app/business/home/imgItem.component/imgItem.component.scss b/dashboard/src/app/business/home/imgItem.component/imgItem.component.scss
deleted file mode 100644
index 53ab0a516..000000000
--- a/dashboard/src/app/business/home/imgItem.component/imgItem.component.scss
+++ /dev/null
@@ -1,13 +0,0 @@
-@import "./../../scss-variable";
-.img-item-float-class {
- float: left;
-}
-
-.img-width {
- width: 80px;
-}
-
-.title-font-class {
- color: map-get($color-primary, normal);
- font-size: 2em;
-}
diff --git a/dashboard/src/app/business/home/imgItem.component/imgItem.component.ts b/dashboard/src/app/business/home/imgItem.component/imgItem.component.ts
deleted file mode 100644
index 1542cf100..000000000
--- a/dashboard/src/app/business/home/imgItem.component/imgItem.component.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { Component, OnInit, ViewContainerRef, ViewChild, Directive, ElementRef, HostBinding, HostListener,Input } from '@angular/core';
-import { Http } from '@angular/http';
-
-@Component({
- selector: 'img-item',
- templateUrl: './imgItem.component.html',
- styleUrls: [
- './imgItem.component.scss'
- ]
-})
-export class ImgItemComponent implements OnInit{
- @Input() item;
-
-
- constructor(
- private http: Http
- ){}
-
- ngOnInit() {
- }
-}
diff --git a/dashboard/src/app/business/identity/identity.component.ts b/dashboard/src/app/business/identity/identity.component.ts
deleted file mode 100644
index b3855ea97..000000000
--- a/dashboard/src/app/business/identity/identity.component.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-import { Router } from '@angular/router';
-import { Component, OnInit, ViewContainerRef, ViewChild, Directive, ElementRef, HostBinding, HostListener } from '@angular/core';
-import { I18NService } from 'app/shared/api';
-import { AppService } from 'app/app.service';
-import { trigger, state, style, transition, animate} from '@angular/animations';
-import { I18nPluralPipe } from '@angular/common';
-
-@Component({
- templateUrl: './identity.html',
- styleUrls: [
-
- ],
- animations: [
- trigger('overlayState', [
- state('hidden', style({
- opacity: 0
- })),
- state('visible', style({
- opacity: 1
- })),
- transition('visible => hidden', animate('400ms ease-in')),
- transition('hidden => visible', animate('400ms ease-out'))
- ]),
-
- trigger('notificationTopbar', [
- state('hidden', style({
- height: '0',
- opacity: 0
- })),
- state('visible', style({
- height: '*',
- opacity: 1
- })),
- transition('visible => hidden', animate('400ms ease-in')),
- transition('hidden => visible', animate('400ms ease-out'))
- ])
- ]
-})
-export class IdentityComponent implements OnInit{
- constructor(
- public I18N: I18NService,
- // private router: Router
- ){}
-
- ngOnInit() {
-
- }
-}
diff --git a/dashboard/src/app/business/identity/identity.html b/dashboard/src/app/business/identity/identity.html
deleted file mode 100644
index 54a80ec44..000000000
--- a/dashboard/src/app/business/identity/identity.html
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/dashboard/src/app/business/identity/identity.module.ts b/dashboard/src/app/business/identity/identity.module.ts
deleted file mode 100644
index dd40892b6..000000000
--- a/dashboard/src/app/business/identity/identity.module.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { NgModule, APP_INITIALIZER } from '@angular/core';
-import { IdentityComponent } from './identity.component';
-import { RouterModule } from '@angular/router';
-import { TabViewModule } from '../../components/common/api';
-import { TenantListModule } from './tenantList.module';
-import { UserListModule } from './userList.module';
-
-let routers = [{
- path: '',
- component: IdentityComponent
-}]
-
-@NgModule({
- declarations: [
- IdentityComponent
- ],
- imports: [
- RouterModule.forChild(routers),
- TenantListModule,
- UserListModule,
- TabViewModule
- ],
- providers: []
-})
-export class IdentityModule { }
\ No newline at end of file
diff --git a/dashboard/src/app/business/identity/tenantDetail/tenantDetail.component.ts b/dashboard/src/app/business/identity/tenantDetail/tenantDetail.component.ts
deleted file mode 100644
index f26c08c2c..000000000
--- a/dashboard/src/app/business/identity/tenantDetail/tenantDetail.component.ts
+++ /dev/null
@@ -1,205 +0,0 @@
-import { Component, Input, OnInit, ViewContainerRef, ViewChild, Directive, ElementRef, HostBinding, HostListener } from '@angular/core';
-import { Http } from '@angular/http';
-import { I18NService, Utils } from 'app/shared/api';
-import { AppService } from 'app/app.service';
-import { ParamStorService } from 'app/shared/api';
-import { I18nPluralPipe } from '@angular/common';
-import { trigger, state, style, transition, animate } from '@angular/animations';
-import { MenuItem, ConfirmationService} from '../../../components/common/api';
-
-@Component({
- selector: 'tenant-detail',
- templateUrl: 'tenantDetail.html',
- styleUrls: ['tenantDetail.scss'],
- providers: [ConfirmationService],
- animations: []
-})
-export class TenantDetailComponent implements OnInit {
- @Input() projectID;
- @Input() projectName;
- @Input() isDetailFinished: Boolean;
- addUserDisplay: boolean=false;
- userfilter: string="";
- projectGroups = [];
- users = [];
- popSelectedUsers;
- allUsers;
-
- statistics_volumeSnapshots: string;
- statistics_volumes: string;
- statistics_capacity: string;
-
- constructor(
- private http: Http,
- private confirmationService: ConfirmationService,
- private paramStor: ParamStorService,
- public I18N: I18NService,
- // private router: Router
- ) { }
-
- ngOnInit() {
- this.listProjectGroup();
- this.projectResources();
- }
-
- projectResources(){
- this.http.get("/v1beta/"+ this.projectID +"/block/volumes").subscribe((res)=>{
- let originCapacity = 0;
- res.json().map(ele => {
- originCapacity += ele.size;
- })
- this.statistics_volumes = res.json().length;
- this.statistics_capacity = Utils.getDisplayGBCapacity(originCapacity);
- })
-
- this.http.get("/v1beta/"+ this.projectID +"/block/snapshots").subscribe((res)=>{
- this.statistics_volumeSnapshots = res.json().length;
- })
- }
-
- listProjectGroup(){
- this.http.get("/v3/role_assignments?scope.project.id="+ this.projectID).subscribe((res)=>{
- let arr = res.json().role_assignments;
- let newarr = [];
- let roles=[];
-
- // get roles
- let reqRole: any = { params:{} };
- this.http.get("/v3/roles", reqRole).subscribe((roleRES) => {
- let currentRoleName = this.projectName == "admin" ? "admin" : (this.projectName == "service" ? "service" : "Member");
-
- roleRES.json().roles.forEach((item, index) => {
- if(item.name == currentRoleName){ // more role can be expand
- let roleJson = {};
- roleJson["id"] = item.id;
- roleJson["name"] = item.name;
- roles.push(roleJson);
- }
- })
-
- roles.forEach((item, index)=>{
- arr.forEach(ele => {
- if(ele.role.id == item.id){
- ele.role["name"] = item.name;
- newarr.push(ele);
- }
- });
- })
-
- newarr.forEach((item, index) => {
- if(item.group){
- let groupJson = {};
- groupJson["groupid"] = item.group.id;
- groupJson["grouprole"] = item.role
- this.projectGroups.push(groupJson);
- }
- });
-
- this.listUsers();
- })
- })
- }
-
- showAddUsers(){
- this.addUserDisplay = true;
- this.listAllUsers();
- }
-
- addUsers(){
-
- let group_id;
- this.projectGroups.forEach((item)=>{
- if(item.grouprole.name == "Member"){
- group_id = item.groupid;
- }
- })
-
- this.popSelectedUsers.forEach((user, i) => {
- let request: any = {};
- this.http.put("/v3/groups/"+ group_id +"/users/"+ user.id, request).subscribe((r) => {
- if(i == (this.popSelectedUsers.length-1)){
- this.listUsers();
- this.addUserDisplay = false;
- }
- })
- });
-
- }
-
- listAllUsers(){
- this.popSelectedUsers = [];
- this.allUsers = [];
- let request: any = { params:{} };
- request.params = {
- "domain_id": "default"
- }
-
- if(this.userfilter != ""){
- request.params["name"] = this.userfilter;
- }
-
- this.http.get("/v3/users", request).subscribe((res) => {
- let newarr = [];
- res.json().users.map((item, index) => {
- item["description"] = item.description == '' ? '--' : item.description;
- newarr.push(item);
- });
-
- //Filter added users
- if(this.users.length > 0){
- this.users.forEach((addedUser) => {
- this.allUsers = newarr.filter((user, idx, arr)=>{
- return (user.name != 'admin' && user.name != 'opensds' && user.name != addedUser.name);
- })
- })
- }else{
- this.allUsers = newarr.filter((user, idx, arr)=>{
- return (user.name != 'admin' && user.name != 'opensds');
- })
- }
-
- });
- }
-
- listUsers(){
- this.users = [];
- this.isDetailFinished = false;
- this.projectGroups.forEach((item, index)=>{
- let request: any = { params:{} };
- this.http.get("/v3/groups/"+ item.groupid +"/users", request).subscribe((userRES)=>{
- userRES.json().users.forEach((ele) => {
- ele["role"] = item.grouprole.name;
- ele["description"] = ele.description == '' ? '--' : ele.description;
- this.users.push(ele);
- });
-
- this.isDetailFinished = true;
- })
- })
-
- }
-
- removeUser(user){
- let group_id;
- this.projectGroups.forEach((item)=>{
- if(item.grouprole.name == user.role){
- group_id = item.groupid;
- }
- })
-
- let msg = "Are you sure you want to remove the user?
[ "+ user.name +" ]
"
- this.confirmationService.confirm({
- message: msg,
- header: "Remove user",
- acceptLabel: "Remove",
- accept: ()=>{
- let request: any = {};
- this.http.delete("/v3/groups/"+ group_id +"/users/"+ user.id, request).subscribe((r) => {
- this.listUsers();
- })
- },
- reject:()=>{}
- })
- }
-
-}
diff --git a/dashboard/src/app/business/identity/tenantDetail/tenantDetail.html b/dashboard/src/app/business/identity/tenantDetail/tenantDetail.html
deleted file mode 100644
index 8b8bf9987..000000000
--- a/dashboard/src/app/business/identity/tenantDetail/tenantDetail.html
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-
-
{{I18N.keyID['sds_identity_res_usage']}}
-
- - {{I18N.keyID['sds_identity_tenant_cap']}}: {{ statistics_capacity }}
- - {{I18N.keyID['sds_home_volumes']}}: {{ statistics_volumes }}
- - {{I18N.keyID['sds_home_snapshots']}}: {{ statistics_volumeSnapshots }}
-
-
-
{{I18N.keyID['sds_identity_tenant_manage']}}
-
-
-
-
-
-
-
-
-
-
-
-
-
- Remove
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/dashboard/src/app/business/identity/tenantDetail/tenantDetail.module.ts b/dashboard/src/app/business/identity/tenantDetail/tenantDetail.module.ts
deleted file mode 100644
index 445f9a9a4..000000000
--- a/dashboard/src/app/business/identity/tenantDetail/tenantDetail.module.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { NgModule, APP_INITIALIZER } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { TenantDetailComponent } from './tenantDetail.component';
-import { ButtonModule, DataTableModule, DropMenuModule, DialogModule, ConfirmDialogModule, BadgeModule, InputTextModule } from '../../../components/common/api';
-
-@NgModule({
- declarations: [ TenantDetailComponent ],
- imports: [ CommonModule, ButtonModule, DataTableModule, DropMenuModule, DialogModule, ConfirmDialogModule, BadgeModule, InputTextModule ],
- exports: [ TenantDetailComponent ],
- providers: []
-})
-export class TenantDetailModule { }
\ No newline at end of file
diff --git a/dashboard/src/app/business/identity/tenantDetail/tenantDetail.scss b/dashboard/src/app/business/identity/tenantDetail/tenantDetail.scss
deleted file mode 100644
index 1fadb369d..000000000
--- a/dashboard/src/app/business/identity/tenantDetail/tenantDetail.scss
+++ /dev/null
@@ -1,15 +0,0 @@
-.table-detail-con > ul{
- display: flex;
- display: -webkit-flex;
- justify-content: space-between;
- padding-bottom: 0.25rem;
-}
-.table-detail-con > ul li{
- color: #666;
- width: 30%;
-}
-.table-detail-con > ul li span{
- padding-left: 0.1rem;
- font-size: 20px;
- color: #40BCEC;
-}
\ No newline at end of file
diff --git a/dashboard/src/app/business/identity/tenantList.component.ts b/dashboard/src/app/business/identity/tenantList.component.ts
deleted file mode 100644
index 12a9bb0c2..000000000
--- a/dashboard/src/app/business/identity/tenantList.component.ts
+++ /dev/null
@@ -1,248 +0,0 @@
-import { Component, OnInit, ViewContainerRef, ViewChild, Directive, ElementRef, HostBinding, HostListener, ViewChildren } from '@angular/core';
-import { Http } from '@angular/http';
-import { I18NService } from 'app/shared/api';
-import { AppService } from 'app/app.service';
-import { I18nPluralPipe } from '@angular/common';
-import { trigger, state, style, transition, animate } from '@angular/animations';
-import { MenuItem, ConfirmationService } from '../../components/common/api';
-import { FormControl, FormGroup, FormBuilder, Validators, ValidatorFn, AbstractControl} from '@angular/forms';
-
-let _ = require("underscore");
-
-@Component({
- selector: 'tenant-list',
- templateUrl: 'tenantList.html',
- styleUrls: [],
- providers: [ConfirmationService],
- animations: []
-})
-export class TenantListComponent implements OnInit {
- tenants = [];
- isDetailFinished = false;
- createTenantDisplay = false;
- isEditTenant = false;
-
- selectedTenants = [];
-
- sortField: string;
- currentTenant: string;
- popTitle: string;
-
- tenantFormGroup;
- projectID: string;
- projectName: string;
-
- validRule= {
- 'name':'^[a-zA-Z]{1}([a-zA-Z0-9]|[_]){0,127}$'
- };
-
- constructor(
- private http: Http,
- private confirmationService: ConfirmationService,
- public I18N: I18NService,
- // private router: Router,
- private fb: FormBuilder
- ) {
- this.tenantFormGroup = this.fb.group({
- "form_name": ["", [Validators.required, Validators.pattern(this.validRule.name), this.ifTenantExisting(this.tenants)] ],
- "form_description":["", Validators.maxLength(200) ],
- })
- }
-
- errorMessage = {
- "form_name": { required: "Username is required.", pattern:"Beginning with a letter with a length of 1-128, it can contain letters / numbers / underlines.", ifTenantExisting:"Tenant is existing."},
- "form_description": { maxlength: "Max. length is 200."}
- };
-
- ngOnInit() {
- this.listTenants();
-
- }
-
- ifTenantExisting (param: any): ValidatorFn{
- return (c: AbstractControl): {[key:string]: boolean} | null => {
- let isExisting= false;
- this.tenants.forEach(element => {
- if(element.name == c.value){
- isExisting = true;
- }
- })
- if(isExisting && this.isEditTenant == false){
- return {'ifTenantExisting': true};
- }else{
- return null;
- }
- }
- }
-
- listTenants() {
- this.tenants=[];
- this.selectedTenants = [];
-
- this.sortField = "name";
-
- let request: any = { params:{} };
- request.params = {
- "domain_id": "default"
- }
-
- this.http.get("/v3/projects", request).subscribe((res) => {
- this.tenants = res.json().projects;
- this.tenants.forEach((item)=>{
- item["description"] = item.description == '' ? '--' : item.description;
- if(item.name == "admin" || item.name == "service"){
- item["disabled"] = true;
- }
- })
- });
- }
-
- showCreateTenant(tenant?) {
- this.createTenantDisplay = true;
-
- //Reset form
- this.tenantFormGroup.reset();
-
- if(tenant){
- this.isEditTenant = true;
- this.popTitle = "Modify";
-
- this.currentTenant = tenant.id;
-
- this.tenantFormGroup.controls['form_name'].value = tenant.name;
- this.tenantFormGroup.controls['form_description'].value = tenant.description;
-
- }else{
- this.isEditTenant = false;
- this.popTitle = "Create";
-
- }
- }
-
- createTenant(){
- let request: any = { project:{} };
- request.project = {
- "domain_id": "default",
- "name": this.tenantFormGroup.value.form_name,
- "description": this.tenantFormGroup.value.form_description
- }
-
- if(this.tenantFormGroup.status == "VALID"){
- // create tenant
- this.http.post("/v3/projects", request).subscribe((res) => {
- let tenantid = res.json().project.id;
-
-
- // get roles
- let request: any = { params:{} };
- this.http.get("/v3/roles", request).subscribe((roleRES) => {
- roleRES.json().roles.forEach((item, index) => {
- if(item.name == "Member"){
- // create group for role named [Member]
- let request: any = { group:{} };
- request.group = {
- "domain_id": "default",
- "name": "group_"+ tenantid + "_Member"
- }
- this.http.post("/v3/groups/", request).subscribe((groupRES) => {
- let groupid = groupRES.json().group.id;
-
- // Assign role to group on project
- let reqRole: any = { };
- this.http.put("/v3/projects/"+ tenantid +"/groups/"+ groupid +"/roles/"+ item.id, reqRole).subscribe(() => {
- this.createTenantDisplay = false;
- this.listTenants();
- })
- });
- }
- })
-
- })
-
-
- });
- }else{
- // validate
- for(let i in this.tenantFormGroup.controls){
- this.tenantFormGroup.controls[i].markAsTouched();
- }
- }
- }
-
- updateTenant(){
- let request: any = { project:{} };
- request.project = {
- "domain_id": "default",
- "name": this.tenantFormGroup.value.form_name,
- "description": this.tenantFormGroup.value.form_description
- }
-
- if(this.tenantFormGroup.status == "VALID"){
- this.http.patch("/v3/projects/"+ this.currentTenant, request).subscribe((res) => {
- this.createTenantDisplay = false;
- this.listTenants();
- });
- }
- }
-
- deleteTenant(tenants){
- let arr=[],msg;
- if(_.isArray(tenants)){
- tenants.forEach((item,index)=> {
- arr.push(item.id);
- })
- msg = "Are you sure you want to delete the selected tenants?
[ "+ tenants.length +" Tenants ]
";
- }else{
- arr.push(tenants.id);
- msg = "Are you sure you want to delete the tenant?
[ "+ tenants.name +" ]
"
- }
-
- this.confirmationService.confirm({
- message: msg,
- header: "Delete Tenant",
- acceptLabel: "Delete",
- isWarning: true,
- accept: ()=>{
- arr.forEach((ele)=> {
- this.http.get("/v3/role_assignments?scope.project.id="+ ele).subscribe((res)=>{
- res.json().role_assignments.forEach((item, index) => {
- if(item.group){
- let request: any = {};
- this.http.delete("/v3/groups/"+ item.group.id, request).subscribe();
- }
- });
-
- let request: any = {};
- this.http.delete("/v3/projects/"+ ele, request).subscribe((r) => {
- this.listTenants();
- })
- })
- })
- },
- reject:()=>{}
- })
-
- }
-
- onRowExpand(evt) {
- this.isDetailFinished = false;
- this.projectID = evt.data.id;
- this.projectName = evt.data.name;
- }
-
- tablePaginate() {
- this.selectedTenants = [];
- }
-
- label: object = {
- tenantNameLabel: 'Name',
- descriptionLabel: 'Description',
- }
-
-}
-
-
-
-
-
-
diff --git a/dashboard/src/app/business/identity/tenantList.html b/dashboard/src/app/business/identity/tenantList.html
deleted file mode 100644
index 9b0cfd316..000000000
--- a/dashboard/src/app/business/identity/tenantList.html
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- {{I18N.keyID['sds_block_volume_modify']}}
- {{I18N.keyID['sds_block_volume_delete']}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/dashboard/src/app/business/identity/tenantList.module.ts b/dashboard/src/app/business/identity/tenantList.module.ts
deleted file mode 100644
index 3111b2c79..000000000
--- a/dashboard/src/app/business/identity/tenantList.module.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import { NgModule, APP_INITIALIZER } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { TenantListComponent } from './tenantList.component';
-import { ReactiveFormsModule, FormsModule } from '@angular/forms';
-import { FormModule, CheckboxModule, ConfirmDialogModule, ButtonModule, MultiSelectModule, DataTableModule, DropMenuModule, DialogModule, InputTextModule, InputTextareaModule, DropdownModule } from '../../components/common/api';
-import { TenantDetailModule } from './tenantDetail/tenantDetail.module';
-
-@NgModule({
- declarations: [ TenantListComponent ],
- imports: [
- CommonModule,
- ButtonModule,
- DataTableModule,
- DropMenuModule,
- DialogModule,
- InputTextModule,
- InputTextareaModule,
- ReactiveFormsModule,
- FormsModule,
- FormModule,
- ConfirmDialogModule,
- MultiSelectModule,
- CheckboxModule,
- TenantDetailModule
- ],
- exports: [ TenantListComponent ],
- providers: []
-})
-export class TenantListModule { }
\ No newline at end of file
diff --git a/dashboard/src/app/business/identity/userDetail/userDetail.component.ts b/dashboard/src/app/business/identity/userDetail/userDetail.component.ts
deleted file mode 100644
index 70ed1bd86..000000000
--- a/dashboard/src/app/business/identity/userDetail/userDetail.component.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-import { Component, Input, OnInit, ViewContainerRef, ViewChild, Directive, ElementRef, HostBinding, HostListener } from '@angular/core';
-import { Http } from '@angular/http';
-import { I18NService } from 'app/shared/api';
-import { AppService } from 'app/app.service';
-import { I18nPluralPipe } from '@angular/common';
-import { trigger, state, style, transition, animate } from '@angular/animations';
-import { MenuItem } from '../../../components/common/api';
-
-@Component({
- selector: 'user-detail',
- templateUrl: 'userDetail.html',
- styleUrls: ['userDetail.scss'],
- animations: []
-})
-export class userDetailComponent implements OnInit {
- @Input() isUserDetailFinished: Boolean;
-
- @Input() detailUserInfo: string;
-
- userID: string;
-
- unspecified: boolean = false;
-
- ownedTenant: string = "";
-
- constructor(
- private http: Http,
- // private I18N: I18NService,
- // private router: Router
- ) { }
-
- ngOnInit() {
- this.userID = this.detailUserInfo;
-
- let request: any = { params: {} };
- this.http.get("/v3/users/" + this.userID + "/projects", request).subscribe((res) => {
- if(res.json().projects.length == 0){
- this.ownedTenant = "Unspecified";
- this.unspecified = true;
- }
- res.json().projects.forEach((ele, i) => {
- if(i==0){
- this.ownedTenant = ele.name;
- }else{
- this.ownedTenant += ", "+ ele.name;
- }
- });
-
- this.isUserDetailFinished = true;
- });
-
- }
-
-}
diff --git a/dashboard/src/app/business/identity/userDetail/userDetail.html b/dashboard/src/app/business/identity/userDetail/userDetail.html
deleted file mode 100644
index a2b900600..000000000
--- a/dashboard/src/app/business/identity/userDetail/userDetail.html
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
- - {{ ownedTenant }}
- - {{ userID }}
-
-
\ No newline at end of file
diff --git a/dashboard/src/app/business/identity/userDetail/userDetail.module.ts b/dashboard/src/app/business/identity/userDetail/userDetail.module.ts
deleted file mode 100644
index 3df1c2b89..000000000
--- a/dashboard/src/app/business/identity/userDetail/userDetail.module.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { NgModule, APP_INITIALIZER } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { userDetailComponent } from './userDetail.component';
-import { ButtonModule, DataTableModule, DropMenuModule } from '../../../components/common/api';
-
-@NgModule({
- declarations: [ userDetailComponent ],
- imports: [ CommonModule, ButtonModule, DataTableModule, DropMenuModule ],
- exports: [ userDetailComponent ],
- providers: []
-})
-export class UserDetailModule { }
\ No newline at end of file
diff --git a/dashboard/src/app/business/identity/userDetail/userDetail.scss b/dashboard/src/app/business/identity/userDetail/userDetail.scss
deleted file mode 100644
index 8cbddaa0d..000000000
--- a/dashboard/src/app/business/identity/userDetail/userDetail.scss
+++ /dev/null
@@ -1,18 +0,0 @@
-.table-detail-con > ul{
- padding: 0;
-}
-.table-detail-con > ul li{
- display: flex;
- display: -webkit-flex;
- justify-content: flex-start;
- line-height: .28rem;
-}
-.table-detail-con > ul li label{
- display: inline-block;
- width: 135px;
- color: #8893a6;
-}
-.table-detail-con > ul li span{
- padding-left: 0.1rem;
- color: #657D95;
-}
\ No newline at end of file
diff --git a/dashboard/src/app/business/identity/userList.component.ts b/dashboard/src/app/business/identity/userList.component.ts
deleted file mode 100644
index 09a16edd5..000000000
--- a/dashboard/src/app/business/identity/userList.component.ts
+++ /dev/null
@@ -1,395 +0,0 @@
-import { Component, OnInit, AfterViewChecked, AfterContentChecked, ViewContainerRef, ViewChild, Directive, ElementRef, HostBinding, HostListener, ViewChildren } from '@angular/core';
-import { Http } from '@angular/http';
-import { I18NService } from 'app/shared/api';
-import { AppService } from 'app/app.service';
-import { I18nPluralPipe } from '@angular/common';
-import { trigger, state, style, transition, animate, group } from '@angular/animations';
-import { MenuItem, ConfirmationService } from '../../components/common/api';
-import { FormControl, FormGroup, FormBuilder, Validators, ValidatorFn, AbstractControl} from '@angular/forms';
-import { retry } from 'rxjs/operators';
-import { forEach } from '@angular/router/src/utils/collection';
-
-let _ = require("underscore");
-
-@Component({
- selector: 'user-list',
- templateUrl: 'userList.html',
- styleUrls: [],
- providers: [ConfirmationService],
- animations: []
-})
-export class UserListComponent implements OnInit, AfterViewChecked {
- tenantUsers = [];
- createUserDisplay = false;
- isUserDetailFinished = false;
- isEditUser = false;
- myFormGroup;
-
- selectedUsers = [];
-
- userRole: string;
- tenantLists = [];
-
- username: string;
- currentUser;
-
- detailUserInfo: string;
- popTitle: string;
-
- sortField: string;
-
- validRule= {
- 'name':'^[a-zA-Z]{1}([a-zA-Z0-9]|[_]){0,127}$'
- };
-
- newPassword = "";
-
- constructor(
- private http: Http,
- private confirmationService: ConfirmationService,
- public I18N: I18NService,
- // private router: Router,
- private fb: FormBuilder
- ) {
-
- this.myFormGroup = this.fb.group({
- "form_username": ["", {validators:[Validators.required, Validators.pattern(this.validRule.name), this.ifUserExisting(this.tenantUsers)], updateOn:'change'} ],
- "form_description":["", Validators.maxLength(200) ],
- "form_tenant": [""],
- "form_isModifyPsw": [true],
- "form_psw": ["", {validators: [Validators.required, Validators.minLength(8), this.regPassword], updateOn:'blur'} ],
- "form_pswConfirm": ["", [Validators.required, this.regConfirmPassword(this.newPassword)] ]
- })
- }
-
- errorMessage = {
- "form_username": { required: "Username is required.", pattern:"Beginning with a letter with a length of 1-128, it can contain letters / numbers / underlines.", ifUserExisting:"User is existing."},
- "form_description": { maxlength: "Max. length is 200."},
- "form_tenant": { required: "Tenant is required."},
- "form_psw": { required: "Password is required.", minlength: "At least two kinds of letters / numbers / special characters, min. length is 8.", regPassword:"At least two kinds of letters / numbers / special characters, min. length is 8." },
- "form_pswConfirm": { required: "Password is required.", regConfirmPassword: "Two inputted password inconsistencies." }
- };
-
- label:object = {
- userNameLabel:'Username',
- passwordLabel:'Password',
- descriptionLabel:'Description',
- confirmPasswordLabel:'Confirm Password',
- roleLabel:'Role',
- tenantLabel:'Tenant'
- }
-
- ifUserExisting (param: any): ValidatorFn{
- return (c: AbstractControl): {[key:string]: boolean} | null => {
- let isExisting= false;
- this.tenantUsers.forEach(element => {
- if(element.username == c.value){
- isExisting = true;
- }
- })
- if(isExisting){
- return {'ifUserExisting': true};
- }else{
- return null;
- }
- }
- }
-
- regPassword(c:AbstractControl):{[key:string]:boolean} | null {
- let reg1 = /.*[a-zA-Z]+.*/;
- let reg2 = /.*[0-9]+.*/;
- let reg3 = /.*[\ \`\~\!\@\#\$\%\^\&\*\(\)\-\_\=\+\\\|\[\{\}\]\;\:\'\"\,\<\.\>\/\?]+.*/;
- if( !reg1.test(c.value) && !reg2.test(c.value) ){
- return {'regPassword': true};
- }
- if( !reg1.test(c.value) && !reg3.test(c.value) ){
- return {'regPassword': true};
- }
- if( !reg2.test(c.value) && !reg3.test(c.value) ){
- return {'regPassword': true};
- }
- return null;
- }
-
- regConfirmPassword (param: any): ValidatorFn{
- return (c: AbstractControl): {[key:string]: boolean} | null => {
- if(c.value != this.newPassword){
- return {'regConfirmPassword': true};
- }
- return null;
- }
- }
-
- showUserForm(user?): void{
- this.getRoles();
- this.getTenants();
- this.createUserDisplay = true;
-
- //Reset form
- this.myFormGroup.reset();
-
- if(user){
- this.isEditUser = true;
- this.popTitle = "Modify";
-
- this.username = user.username;
- this.currentUser = user;
-
- this.myFormGroup.controls['form_description'].value = user.description;
- this.myFormGroup.controls['form_isModifyPsw'].value = false;
-
- this.myFormGroup.controls['form_username'].clearValidators();
- this.myFormGroup.controls['form_psw'].clearValidators();
- this.myFormGroup.controls['form_pswConfirm'].clearValidators();
-
-
- }else{
- this.isEditUser = false;
- this.popTitle = "Create";
-
- this.myFormGroup.controls['form_isModifyPsw'].value = true;
- this.myFormGroup.controls['form_username'].setValidators({validators:[Validators.required, Validators.pattern(this.validRule.name), this.ifUserExisting(this.tenantUsers)], updateOn:'change'});
- this.myFormGroup.controls['form_psw'].setValidators([Validators.required, Validators.minLength(8), this.regPassword]);
- this.myFormGroup.controls['form_pswConfirm'].setValidators([Validators.required, this.regConfirmPassword(this.newPassword)] );
- }
-
- // Update form validate status
- for(let i in this.myFormGroup.controls){
- this.myFormGroup.controls[i].updateValueAndValidity();
- }
- }
-
- createUser(){
- let request: any = { user:{} };
- request.user = {
- "domain_id": "default",
- "name": this.myFormGroup.value.form_username,
- "description": this.myFormGroup.value.form_description,
- "password": this.myFormGroup.value.form_psw
- }
-
- if(this.myFormGroup.status == "VALID"){
- this.http.post("/v3/users", request).subscribe( (res) => {
- let tenants = this.myFormGroup.value.form_tenant;
-
- if(!tenants){
- this.createUserDisplay = false;
- this.listUsers();
- return;
- }
-
- tenants.forEach( (element, i) => {
- this.http.get("/v3/role_assignments?scope.project.id="+ element).subscribe((ass_res)=>{
- let groupid;
-
- ass_res.json().role_assignments.map((element)=>{
- if(element.group){
- return groupid = element.group.id;
- }
- })
-
- let request: any = {};
- this.http.put("/v3/groups/"+ groupid + "/users/"+ res.json().user.id, request).subscribe();
- })
- if(i == (tenants.length-1)){
- this.createUserDisplay = false;
- this.listUsers();
- }
- })
- });
- }else{
- // validate
- for(let i in this.myFormGroup.controls){
- this.myFormGroup.controls[i].markAsTouched();
- }
- }
- }
-
- updateUser(){
- let request: any = { user:{} };
- request.user = {
- "description": this.myFormGroup.value.form_description
- }
- if(this.myFormGroup.value.form_isModifyPsw==true){
- request.user["password"] = this.myFormGroup.value.form_psw;
-
- if(this.myFormGroup.status == "VALID"){
- this.http.patch("/v3/users/"+ this.currentUser.userid, request).subscribe((res) => {
- this.createUserDisplay = false;
- this.listUsers();
- });
- }else{
- // validate
- for(let i in this.myFormGroup.controls){
- this.myFormGroup.controls[i].markAsTouched();
- }
- }
- }else{
-
- if(this.myFormGroup.status == "VALID"){
- this.http.patch("/v3/users/"+ this.currentUser.userid, request).subscribe((res) => {
- this.createUserDisplay = false;
- this.listUsers();
- });
- }else{
- // validate
- for(let i in this.myFormGroup.controls){
- this.myFormGroup.controls[i].markAsTouched();
- }
- }
- }
-
-
- }
-
- getRoles(){
- let request: any = { params:{} };
- this.http.get("/v3/roles", request).subscribe((res) => {
- res.json().roles.forEach((item, index) => {
- if(item.name == "Member"){
- this.userRole = item.id;
- }
- })
- });
- }
-
- getTenants(){
- this.tenantLists = [];
-
- let request: any = { params:{} };
- request.params = {
- "domain_id": "default"
- }
-
- this.http.get("/v3/projects", request).subscribe((res) => {
- res.json().projects.map((item, index) => {
- let tenant = {};
- if(item.name != "admin" && item.name != "service"){
- tenant["label"] = item.name;
- tenant["value"] = item.id;
- this.tenantLists.push(tenant);
- }
- });
- });
- }
-
-
- ngOnInit() {
- this.listUsers();
-
- }
-
- ngAfterViewChecked(){
- this.newPassword = this.myFormGroup.value.form_psw;
-
- }
-
- ModifyPswChecked(checked){
- if(checked){
- this.myFormGroup.controls['form_psw'].setValidators([Validators.required, Validators.minLength(8), this.regPassword]);
- this.myFormGroup.controls['form_pswConfirm'].setValidators([Validators.required, this.regConfirmPassword(this.newPassword)] );
-
- }else{
- this.myFormGroup.controls['form_psw'].clearValidators();
- this.myFormGroup.controls['form_pswConfirm'].clearValidators();
-
- }
-
- // Update form validate status
- for(let i in this.myFormGroup.controls){
- this.myFormGroup.controls[i].updateValueAndValidity();
- }
- }
-
- listUsers(){
- this.tenantUsers = [];
- this.selectedUsers = [];
-
- this.sortField = "username";
-
- let request: any = { params:{} };
- request.params = {
- "domain_id": "default"
- }
-
- this.http.get("/v3/users", request).subscribe((res) => {
- res.json().users.map((item, index) => {
- let user = {};
- user["enabled"] = item.enabled;
- user["username"] = item.name;
- user["userid"] = item.id;
- user["defaultTenant"] = item.default_project_id;
- user["description"] = !item.description ? '--' : item.description=='' ? '--' : item.description;
-
- if(item.name == "admin" || item.name == "opensds"){
- user["disabled"] = true;
- }
- this.tenantUsers.push(user);
- });
- });
- }
-
- userStatus(user){
- let msg = user.enabled == true ? "Are you sure you want to disable the user?
[ "+ user.username +" ]
" : "Are you sure you want to enable the user?
[ "+ user.username +" ]
";
- let status = user.enabled ? false : true;
-
- this.confirmationService.confirm({
- message: msg,
- header: user.enabled ? 'Disable User' : 'Enable User',
- acceptLabel: user.enabled ? 'Disable' : 'Enable',
- accept: ()=>{
- let request: any = { user:{} };
- request.user = {
- "enabled": status
- }
- this.http.patch("/v3/users/"+ user.userid, request).subscribe((res) => {
- this.listUsers();
- });
-
- },
- reject:()=>{}
- })
- }
-
- deleteUsers(users){
- let arr=[], msg;
- if(_.isArray(users)){
- users.forEach((item,index)=> {
- arr.push(item.userid);
- })
- msg = "Are you sure you want to delete the selected users?
[ "+ users.length +" Users ]
";
- }else{
- arr.push(users.userid);
- msg = "Are you sure you want to delete the user?
[ "+ users.username +" ]
";
- }
-
- this.confirmationService.confirm({
- message: msg,
- header: "Delete User",
- acceptLabel: "Delete",
- isWarning: true,
- accept: ()=>{
- arr.forEach((item,index)=> {
- let request: any = {};
- this.http.delete("/v3/users/"+ item, request).subscribe((res) => {
- if(index == arr.length-1){
- this.listUsers();
- }
- });
- })
-
- },
- reject:()=>{}
- })
-
- }
-
- onRowExpand(evt) {
- this.isUserDetailFinished = false;
- this.detailUserInfo = evt.data.userid;
- }
-
- tablePaginate() {
- this.selectedUsers = [];
- }
-}
diff --git a/dashboard/src/app/business/identity/userList.html b/dashboard/src/app/business/identity/userList.html
deleted file mode 100644
index 9a1ebe512..000000000
--- a/dashboard/src/app/business/identity/userList.html
+++ /dev/null
@@ -1,81 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{I18N.keyID['sds_block_volume_modify']}}
- {{ (user.enabled == true) ? "Disable" : "Enable" }}
- {{I18N.keyID['sds_block_volume_delete']}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/dashboard/src/app/business/identity/userList.module.ts b/dashboard/src/app/business/identity/userList.module.ts
deleted file mode 100644
index afbedddbc..000000000
--- a/dashboard/src/app/business/identity/userList.module.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import { NgModule, APP_INITIALIZER } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { ReactiveFormsModule, FormsModule } from '@angular/forms';
-import { UserListComponent } from './userList.component';
-import { BadgeModule, FormModule, ButtonModule, CheckboxModule, DataTableModule, DropMenuModule, MultiSelectModule, DialogModule, InputTextModule, InputTextareaModule, DropdownModule, PasswordModule, ConfirmDialogModule } from '../../components/common/api';
-
-import { UserDetailModule } from './userDetail/userDetail.module';
-
-@NgModule({
- declarations: [UserListComponent],
- imports: [
- CommonModule,
- ButtonModule,
- BadgeModule,
- DataTableModule,
- DropMenuModule,
- DialogModule,
- ConfirmDialogModule,
- InputTextModule,
- InputTextareaModule,
- DropdownModule,
- CheckboxModule,
- PasswordModule,
- FormsModule,
- ReactiveFormsModule,
- MultiSelectModule,
- FormModule,
- UserDetailModule
- ],
- exports: [UserListComponent],
- providers: []
-})
-export class UserListModule { }
\ No newline at end of file
diff --git a/dashboard/src/app/business/profile/createProfile/createProfile.component.html b/dashboard/src/app/business/profile/createProfile/createProfile.component.html
deleted file mode 100644
index c70165314..000000000
--- a/dashboard/src/app/business/profile/createProfile/createProfile.component.html
+++ /dev/null
@@ -1,185 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dashboard/src/app/business/profile/createProfile/createProfile.component.ts b/dashboard/src/app/business/profile/createProfile/createProfile.component.ts
deleted file mode 100644
index a19836eef..000000000
--- a/dashboard/src/app/business/profile/createProfile/createProfile.component.ts
+++ /dev/null
@@ -1,482 +0,0 @@
-import { Router } from '@angular/router';
-import { Component, OnInit, ViewContainerRef, ViewChild, Directive, ElementRef, HostBinding, HostListener } from '@angular/core';
-import { Validators, FormControl, FormGroup, FormBuilder } from '@angular/forms';
-import { I18NService } from 'app/shared/api';
-import { AppService } from 'app/app.service';
-import { trigger, state, style, transition, animate } from '@angular/animations';
-import { I18nPluralPipe } from '@angular/common';
-
-import { Message, SelectItem } from './../../../components/common/api';
-import { ProfileService } from './../profile.service';
-
-@Component({
- templateUrl: './createProfile.component.html',
- styleUrls: [
-
- ],
- animations: [
- trigger('overlayState', [
- state('hidden', style({
- opacity: 0
- })),
- state('visible', style({
- opacity: 1
- })),
- transition('visible => hidden', animate('400ms ease-in')),
- transition('hidden => visible', animate('400ms ease-out'))
- ]),
-
- trigger('notificationTopbar', [
- state('hidden', style({
- height: '0',
- opacity: 0
- })),
- state('visible', style({
- height: '*',
- opacity: 1
- })),
- transition('visible => hidden', animate('400ms ease-in')),
- transition('hidden => visible', animate('400ms ease-out'))
- ])
- ]
-})
-export class CreateProfileComponent implements OnInit {
- showCustomization = false;
- showStoragePool = false;
- msgs: Message[] = [];
- userform: FormGroup;
- submitted: boolean;
- genders: SelectItem[];
- description: string;
-
- profileform: FormGroup;
- qosPolicy:FormGroup;
- repPolicy:FormGroup;
- snapPolicy:FormGroup;
- paramData= {
- extras:{protocol:""},
- storageType:""
- };
- label;
- param = {
- name: '',
- description: '',
- extras: {
-
- }
- };
- qosIsChecked = false;
- replicationIsChecked = false;
- snapshotIsChecked = false;
- protocolOptions = [
- {
- label: 'iSCSI',
- value: 'iSCSI'
- },
- {
- label: 'FC',
- value: 'FC'
- },
- {
- label: 'RBD',
- value: 'RBD'
- }
- ];
-
- //用户自定义key、value,用于双向数据绑定
- customizationKey = '';
- customizationValue = '';
-
- //用户自定义项,用于
- customizationItems = [];
-
- replicationTypeOptions = [
- {
- label: 'Mirror',
- value: 'mirror'
- }/*,
- {
- label: 'Snapshot',
- value: 'snapshot'
- },
- {
- label: 'Clone',
- value: 'clone'
- },
- {
- label: 'Tokenized Clone',
- value: 'tokenized'
- }*/
- ];
-
- replicationRGOOptions = [
- {
- label: 'Availability Zone',
- value: 'availabilityZone'
- },
- {
- label: 'Rack',
- value: 'rack'
- },
- {
- label: 'Row',
- value: 'row'
- },
- {
- label: 'Server',
- value: 'server'
- },
- {
- label: 'Facility',
- value: 'facility'
- },
- {
- label: 'Region',
- value: 'region'
- }
- ];
-
- replicationModeOptions = [
- {
- label: 'Synchronous',
- value: 'Synchronous'
- },
- {
- label: 'Asynchronous',
- value: 'Asynchronous'
- },
- {
- label: 'Active',
- value: 'Active'
- },
- {
- label: 'Adaptive',
- value: 'Adaptive'
- }
- ];
-
- replicationRTOOptions = [
- {
- label: 'Immediate',
- value: 'Immediate'
- },
- {
- label: 'Online',
- value: 'Online'
- },
- {
- label: 'Nearline',
- value: 'Nearline'
- },
- {
- label: 'Offline',
- value: 'Offline'
- }
- ];
-
- replicationRPOOptions = [
- {
- label: '0',
- value: 0
- },
- {
- label: '4',
- value: 4
- },
- {
- label: '60',
- value: 60
- },
- {
- label: '3600',
- value: 3600
- }
- ];
- errorMessage={
- "name": { required: this.I18N.keyID['sds_profile_create_name_require']},
- "maxIOPS": { required: this.I18N.keyID['sds_required'].replace("{0}","MaxIOPS")},
- "maxBWS" :{ required: this.I18N.keyID['sds_required'].replace("{0}","MaxBWS")},
- "repPeriod" :{ required: this.I18N.keyID['sds_required'].replace("{0}","Period")},
- "repBandwidth" :{ required: this.I18N.keyID['sds_required'].replace("{0}","Bandwidth")},
- "repRPO" :{ required: this.I18N.keyID['sds_required'].replace("{0}","RPO")},
- "datetime" :{ required: this.I18N.keyID['sds_required'].replace("{0}","Execution Time")},
- "snapNum" :{ required: this.I18N.keyID['sds_required'].replace("{0}","Retention")},
- "duration" :{ required: this.I18N.keyID['sds_required'].replace("{0}","Retention")},
- "description":{maxlength:this.I18N.keyID['sds_validate_max_length']}
- };
- snapshotRetentionOptions = [
- {
- label: 'Time',
- value: 'Time'
- },
- {
- label: 'Quantity',
- value: 'Quantity'
- }
- ];
- snapSchedule = [
- {
- label: 'Daily',
- value: 'Daily'
- },
- {
- label: 'Weekly',
- value: 'Weekly'
- },
- {
- label: 'Monthly',
- value: 'Monthly'
- }
- ];
-
- weekDays;
-
- constructor(
- public I18N: I18NService,
- private router: Router,
- private ProfileService: ProfileService,
- private fb: FormBuilder
- ) {
- this.weekDays = [
- {
- label: 'Sun',
- value: 0,
- styleClass: 'week-select-list'
- },
- {
- label: 'Mon',
- value: 1,
- styleClass: 'week-select-list'
- },
- {
- label: 'Tue',
- value: 2,
- styleClass: 'week-select-list'
- },
- {
- label: 'Wed',
- value: 3,
- styleClass: 'week-select-list'
- },
- {
- label: 'Thu',
- value: 4,
- styleClass: 'week-select-list'
- },
- {
- label: 'Fri', value: 5,
- styleClass: 'week-select-list'
- },
- {
- label: 'Sat',
- value: 6,
- styleClass: 'week-select-list'
- }
- ];
- }
-
- ngOnInit() {
- this.label = {
- name: this.I18N.keyID['sds_block_volume_name'],
- description: this.I18N.keyID['sds_block_volume_descri'],
- protocol: this.I18N.keyID['sds_profile_access_pro'],
- type: this.I18N.keyID['sds_profile_pro_type'],
- qosPolicy: this.I18N.keyID['sds_profile_qos_policy'],
- replicationPolicy: this.I18N.keyID['sds_profile_replication_policy'],
- snapshotPolicy: this.I18N.keyID['sds_profile_snap_policy'],
- customization: this.I18N.keyID['sds_profile_create_customization'],
- storagePool: this.I18N.keyID['sds_profile_avai_pool'],
- key: this.I18N.keyID['sds_profile_extra_key'],
- value: this.I18N.keyID['sds_profile_extra_value'],
- maxIOPS: this.I18N.keyID['sds_profile_create_maxIOPS'],
- MBPS: this.I18N.keyID['sds_profile_create_maxBWS'],
- replicationLabel: {
- type:this.I18N.keyID['sds_profile_rep_type'] ,
- RGO: this.I18N.keyID['sds_profile_rep_rgo'],
- Mode:this.I18N.keyID['sds_profile_rep_mode'],
- RTO: this.I18N.keyID['sds_profile_rep_rto'],
- Period: this.I18N.keyID['sds_profile_rep_period'],
- RPO: this.I18N.keyID['sds_profile_rep_rpo'],
- Bandwidth: this.I18N.keyID['sds_profile_rep_bandwidth'],
- Consistency: this.I18N.keyID['sds_profile_rep_consis']
- },
- snapshotLabel: {
- Schedule: this.I18N.keyID['sds_profile_snap_sche'],
- executionTime:this.I18N.keyID['sds_profile_snap_exetime'],
- Retention: this.I18N.keyID['sds_profile_snap_reten']
- }
- };
-
- this.profileform = this.fb.group({
- 'name': new FormControl('', Validators.required),
- 'description':new FormControl('',Validators.maxLength(200)),
- 'protocol': new FormControl('iSCSI'),
- 'storageType': new FormControl('Thin', Validators.required),
- 'policys': new FormControl(''),
- 'snapshotRetention': new FormControl('Time')
- });
- this.qosPolicy = this.fb.group({
- "maxIOPS": new FormControl(6000, Validators.required),
- "maxBWS" : new FormControl(100, Validators.required),
- });
- this.repPolicy = this.fb.group({
- "repType": new FormControl("mirror", Validators.required),
- "repMode": new FormControl(this.replicationModeOptions[0].value, Validators.required),
- "repPeriod": new FormControl(60, Validators.required),
- "repBandwidth": new FormControl(10, Validators.required),
- "repRGO": new FormControl(this.replicationRGOOptions[0].value, Validators.required),
- "repRTO": new FormControl(this.replicationRTOOptions[0].value, Validators.required),
- "repRPO": new FormControl(0, Validators.required),
- "repCons": new FormControl([])
- });
- this.snapPolicy = this.fb.group({
- "Schedule": new FormControl(this.snapSchedule[0].value, Validators.required),
- "datetime": new FormControl("00:00", Validators.required),
- "snapNum": new FormControl(1, Validators.required),
- "duration": new FormControl(0, Validators.required),
- "retentionOptions": new FormControl(this.snapshotRetentionOptions[0].value)
- });
- this.paramData= {
- extras:{protocol:this.profileform.value.protocol},
- storageType:this.profileform.value.storageType
- };
- this.profileform.get("protocol").valueChanges.subscribe(
- (value:string)=>{
- this.paramData = {
- extras:{protocol:value},
- storageType:this.profileform.value.storageType
- }
- }
- );
- this.profileform.get("storageType").valueChanges.subscribe(
- (value:string)=>{
- this.paramData = {
- extras:{protocol:this.profileform.value.protocol},
- storageType:value
- }
- }
- );
-
-
-
- }
-
- onSubmit(value) {
- this.submitted = true;
- this.msgs = [];
- this.msgs.push({ severity: 'info', summary: 'Success', detail: 'Form Submitted' });
- this.param.name = value.name;
- this.param.description = value.description;
- if(this.qosIsChecked){
- if(!this.qosPolicy.valid){
- for(let i in this.qosPolicy.controls){
- this.qosPolicy.controls[i].markAsTouched();
- }
- return;
- }
- this.param.extras[":provisionPolicy"]= {
- "ioConnectivityLoS": {
- "maxIOPS": this.qosPolicy.value.maxIOPS,
- "maxBWS": this.qosPolicy.value.maxBWS,
- "accessProtocol": value.protocol
- },
- "dataStorageLoS": {
- "provisioningPolicy": value.storageType
- }
- }
- }else{
- this.param.extras[":provisionPolicy"]= {
- "ioConnectivityLoS": {
- "accessProtocol": value.protocol
- },
- "dataStorageLoS": {
- "provisioningPolicy": value.storageType
- }
- }
- }
- if(this.replicationIsChecked){
- if(!this.repPolicy.valid){
- for(let i in this.repPolicy.controls){
- this.repPolicy.controls[i].markAsTouched();
- }
- return;
- }
- this.param.extras["replicationType"]= "ArrayBased";
- this.param.extras[":replicationPolicy"]={
- "dataProtectionLoS": {
- "replicaTypes": this.repPolicy.value.repType,
- "recoveryGeographicObject": this.repPolicy.value.repRGO,
- "recoveryPointObjective": this.repPolicy.value.repRPO,
- "recoveryTimeObjective": this.repPolicy.value.repRTO,
- },
- "replicaInfos": {
- "replicaUpdateMode": this.repPolicy.value.repMode,
- "consistencyEnabled": this.repPolicy.value.repCons.length==0 ? false:true,
- "replicationPeriod": this.repPolicy.value.repPeriod,
- "replicationBandwidth": this.repPolicy.value.repBandwidth
- }
- }
- }
- if(this.snapshotIsChecked){
- if(!this.snapPolicy.valid){
- for(let i in this.snapPolicy.controls){
- this.snapPolicy.controls[i].markAsTouched();
- }
- return;
- }
- let reten = this.snapPolicy.value.retentionOptions === "Quantity" ? {
- "number": this.snapPolicy.value.snapNum,
- }:{"duration": this.snapPolicy.value.duration}
- this.param.extras[":snapshotPolicy"]= {
- "schedule": {
- "datetime": "1970-01-01T"+this.snapPolicy.value.datetime+":00",
- "occurrence": this.snapPolicy.value.Schedule //Monthly, Weekly, Daily, Hourly
- },
- "retention": reten
- }
- }
- if (this.customizationItems.length > 0) {
- let arrLength = this.customizationItems.length;
- for (let i = 0; i < arrLength; i++) {
- this.param.extras[this.customizationItems[i].key] = this.customizationItems[i].value;
- }
- }
- this.createProfile(this.param);
- }
-
- retentionChange(){
- console.log(this.profileform.controls['snapshotRetention'].value);
- }
-
- createProfile(param) {
- this.ProfileService.createProfile(param).subscribe((res) => {
-
- this.router.navigate(['/profile']);
- });
- }
-
-
-
- getI18n() {
- // return {};
- }
-
- showDetails(policyType) {
- this[policyType + 'IsChecked'] = !this[policyType + 'IsChecked'];
- }
-
- addCustomization() {
- this.customizationItems.push({
- key: this.customizationKey,
- value: this.customizationValue
- });
- this.showCustomization = false
- this.customizationKey = '';
- this.customizationValue = '';
- }
-
- deleteCustomization(index) {
- this.customizationItems.splice(index, 1);
- }
-
-}
diff --git a/dashboard/src/app/business/profile/createProfile/createProfile.module.ts b/dashboard/src/app/business/profile/createProfile/createProfile.module.ts
deleted file mode 100644
index 781c3e25a..000000000
--- a/dashboard/src/app/business/profile/createProfile/createProfile.module.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-import { Component, NgModule, APP_INITIALIZER } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { ReactiveFormsModule, FormsModule } from '@angular/forms';
-import { CreateProfileComponent } from './createProfile.component';
-import { RouterModule } from '@angular/router';
-import { InputTextModule,InputTextareaModule, CheckboxModule, FormModule, ButtonModule, DropdownModule, RadioButtonModule, DialogModule, Message, GrowlModule, SelectButtonModule } from '../../../components/common/api';
-import { HttpService } from './../../../shared/api';
-import { ProfileService,PoolService } from './../profile.service';
-import { PoolModule } from './../storage-pools-table/storage-pools-table.module';
-
-let routers = [{
- path: '',
- component: CreateProfileComponent
-}]
-
-@NgModule({
- declarations: [
- CreateProfileComponent
- ],
- imports: [
- CommonModule,
- ReactiveFormsModule,
- FormsModule,
- RouterModule.forChild(routers),
- InputTextModule,
- CheckboxModule,
- ButtonModule,
- DropdownModule,
- RadioButtonModule,
- DialogModule,
- GrowlModule,
- PoolModule,
- SelectButtonModule,
- FormModule,
- InputTextareaModule
- ],
- providers: [
- HttpService,
- ProfileService,
- PoolService
- ]
-})
-export class CreateProfileModule { }
diff --git a/dashboard/src/app/business/profile/modifyProfile/modifyProfile.component.html b/dashboard/src/app/business/profile/modifyProfile/modifyProfile.component.html
deleted file mode 100644
index cbfeedce4..000000000
--- a/dashboard/src/app/business/profile/modifyProfile/modifyProfile.component.html
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
-
- Access Protocol:
- {{data.extras.protocol}}
-
-
- Provisioning Type:
- {{data.storageType}}
-
-
-
QoS Policy:
-
-
Replication Policy:
-
-
Snapshot Policy:
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dashboard/src/app/business/profile/modifyProfile/modifyProfile.component.ts b/dashboard/src/app/business/profile/modifyProfile/modifyProfile.component.ts
deleted file mode 100644
index bbed0a5fc..000000000
--- a/dashboard/src/app/business/profile/modifyProfile/modifyProfile.component.ts
+++ /dev/null
@@ -1,152 +0,0 @@
-import { Router,ActivatedRoute} from '@angular/router';
-import { Component, OnInit, ViewContainerRef, ViewChild, Directive, ElementRef, HostBinding, HostListener } from '@angular/core';
-import { I18NService } from 'app/shared/api';
-import { AppService } from 'app/app.service';
-import { trigger, state, style, transition, animate } from '@angular/animations';
-import { I18nPluralPipe } from '@angular/common';
-
-import { ProfileService, PoolService} from './../profile.service';
-
-@Component({
- templateUrl: './modifyProfile.component.html',
- styleUrls: [
-
- ],
- animations: [
- trigger('overlayState', [
- state('hidden', style({
- opacity: 0
- })),
- state('visible', style({
- opacity: 1
- })),
- transition('visible => hidden', animate('400ms ease-in')),
- transition('hidden => visible', animate('400ms ease-out'))
- ]),
-
- trigger('notificationTopbar', [
- state('hidden', style({
- height: '0',
- opacity: 0
- })),
- state('visible', style({
- height: '*',
- opacity: 1
- })),
- transition('visible => hidden', animate('400ms ease-in')),
- transition('hidden => visible', animate('400ms ease-out'))
- ])
- ]
-})
-export class modifyProfileComponent implements OnInit {
- items;
- chartDatas;
- totalFreeCapacity = 0;
- option;
- data;
- cars;
- cols: any[];
- formGroup;
- errorMessage;
- pools;
- totalCapacity = 0;
- // profileId;
- constructor(
- // private I18N: I18NService,
- // private router: Router
- private ActivatedRoute: ActivatedRoute,
- private ProfileService: ProfileService,
- private poolService:PoolService
- ) { }
- ngOnInit() {
- let profileId;
- this.ActivatedRoute.params.subscribe((params) => profileId = params.profileId);
-
- this.ProfileService.getProfileById(profileId).subscribe((res) => {
- // return res.json();
- // this.profiles = res.json();
- this.data = res.json();
- this.getPools();
- });
- this.items = [
- { label: 'Profile', url: '/profile' },
- { label: 'Profile detail', url: '/modifyProfile' }
- ];
- this.option = {
- cutoutPercentage: 80,
- // rotation: (-0.2 * Math.PI),
- title: {
- display: false,
- text: 'My Title',
- fontSize: 12
- },
- legend: {
- display: true,
- labels:{
- boxWidth:12
- },
- position: 'bottom',
- fontSize: 12
- }
- };
- // this.data = {
- // "id": "5d8c3732-a248-50ed-bebc-539a6ffd25c1",
- // "name": "Gold",
- // "protocol": "FC",
- // "type": "Thin",
- // "policys": [
- // "Qos",
- // "Snapshot",
- // "Replication"
- // ],
- // "description": "provide gold storage service",
- // "extras": {
- // "key1": "value1",
- // "key2": {
- // "subKey1": "subValue1",
- // "subKey2": "subValue2"
- // },
- // "key3": "value3"
- // }
- // };
-
- }
- getPools() {
- this.poolService.getPools().subscribe((res) => {
- this.pools = res.json();
- this.totalFreeCapacity = this.getSumCapacity(this.pools, 'free');
- this.totalCapacity = this.getSumCapacity(this.pools, 'total');
- this.chartDatas = {
- labels: ['Total Capacity', 'Used Capacity'],
- datasets: [
- {
- data: [this.totalCapacity, this.totalCapacity-this.totalFreeCapacity],
- backgroundColor: [
- "rgba(224, 224, 224, 1)",
- "#438bd3"
- ]
- // hoverBackgroundColor: [
- // "#FF6384",
- // "#36A2EB",
- // "#FFCE56"
- // ]
- }]
- };
- });
- }
-
- getSumCapacity(pools, FreeOrTotal) {
- let SumCapacity: number = 0;
- let arrLength = pools.length;
- for (let i = 0; i < arrLength; i++) {
- if(this.data.extras.protocol.toLowerCase() == pools[i].extras.ioConnectivity.accessProtocol && this.data.storageType == pools[i].extras.dataStorage.provisioningPolicy){
- if (FreeOrTotal === 'free') {
- SumCapacity += pools[i].freeCapacity;
- } else {
- SumCapacity += pools[i].totalCapacity;
- }
- }
- }
- return SumCapacity;
- }
-}
diff --git a/dashboard/src/app/business/profile/modifyProfile/modifyProfile.module.ts b/dashboard/src/app/business/profile/modifyProfile/modifyProfile.module.ts
deleted file mode 100644
index c4ce0b3ee..000000000
--- a/dashboard/src/app/business/profile/modifyProfile/modifyProfile.module.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import { Component, NgModule, APP_INITIALIZER } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { modifyProfileComponent } from './modifyProfile.component';
-import { RouterModule } from '@angular/router';
-import { BreadcrumbModule,ChartModule,ButtonModule } from './../../../components/common/api';
-
-import { HttpService } from './../../../shared/api';
-import { ProfileService,PoolService } from './../profile.service';
-import { PoolModule } from './../storage-pools-table/storage-pools-table.module';
-
-let routers = [{
- path: '',
- component: modifyProfileComponent
-}]
-
-@NgModule({
- declarations: [
- modifyProfileComponent
- ],
- imports: [
- CommonModule,
- RouterModule.forChild(routers),
- BreadcrumbModule,
- ChartModule,
- ButtonModule,
- PoolModule
- // FormModule
- ],
- providers: [
- HttpService,
- ProfileService,
- PoolService
- ]
-})
-export class ModifyProfileModule { }
\ No newline at end of file
diff --git a/dashboard/src/app/business/profile/profile.component.html b/dashboard/src/app/business/profile/profile.component.html
deleted file mode 100644
index c6b3aa1e5..000000000
--- a/dashboard/src/app/business/profile/profile.component.html
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dashboard/src/app/business/profile/profile.component.ts b/dashboard/src/app/business/profile/profile.component.ts
deleted file mode 100644
index e62fbccbd..000000000
--- a/dashboard/src/app/business/profile/profile.component.ts
+++ /dev/null
@@ -1,96 +0,0 @@
-import { Router } from '@angular/router';
-import { Component, OnInit, ViewContainerRef, ViewChild, Directive, ElementRef, HostBinding, HostListener } from '@angular/core';
-import { I18NService } from 'app/shared/api';
-import { AppService } from 'app/app.service';
-import { trigger, state, style, transition, animate } from '@angular/animations';
-import { I18nPluralPipe } from '@angular/common';
-
-import { ProfileService } from './profile.service';
-import { ConfirmationService,ConfirmDialogModule} from '../../components/common/api';
-
-@Component({
- templateUrl: './profile.component.html',
- styleUrls: [
-
- ],
- animations: [
- trigger('overlayState', [
- state('hidden', style({
- opacity: 0
- })),
- state('visible', style({
- opacity: 1
- })),
- transition('visible => hidden', animate('400ms ease-in')),
- transition('hidden => visible', animate('400ms ease-out'))
- ]),
-
- trigger('notificationTopbar', [
- state('hidden', style({
- height: '0',
- opacity: 0
- })),
- state('visible', style({
- height: '*',
- opacity: 1
- })),
- transition('visible => hidden', animate('400ms ease-in')),
- transition('hidden => visible', animate('400ms ease-out'))
- ])
- ]
-})
-export class ProfileComponent implements OnInit {
- profileId;
- profiles;
- showWarningDialog = false;
- constructor(
- public I18N: I18NService,
- // private router: Router
- private ProfileService: ProfileService,
- private confirmationService:ConfirmationService
- ) { }
- showCard = true;
- ngOnInit() {
- this.getProfiles();
- this.profiles = [];
- }
-
- getProfiles() {
- this.ProfileService.getProfiles().subscribe((res) => {
- this.profiles = res.json();
- });
- }
-
- showWarningDialogFun(profile) {
- let msg = "Are you sure you want to delete the Profile?
[ "+ profile.name +" ]
";
- let header ="Delete Profile";
- let acceptLabel = "Delete";
- let warming = true;
- this.confirmDialog([msg,header,acceptLabel,warming,profile.id])
- }
- deleteProfile(id) {
- this.ProfileService.deleteProfile(id).subscribe((res) => {
- this.getProfiles();
- });
- }
- confirmDialog([msg,header,acceptLabel,warming=true,func]){
- this.confirmationService.confirm({
- message: msg,
- header: header,
- acceptLabel: acceptLabel,
- isWarning: warming,
- accept: ()=>{
- try {
- this.deleteProfile(func);
- }
- catch (e) {
- console.log(e);
- }
- finally {
-
- }
- },
- reject:()=>{}
- })
- }
-}
diff --git a/dashboard/src/app/business/profile/profile.module.ts b/dashboard/src/app/business/profile/profile.module.ts
deleted file mode 100644
index 515d0032d..000000000
--- a/dashboard/src/app/business/profile/profile.module.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-import { CommonModule } from '@angular/common';
-import { NgModule, APP_INITIALIZER } from '@angular/core';
-import { ProfileComponent } from './profile.component';
-import { RouterModule } from '@angular/router';
-
-import { ProfileCardComponent } from './profileCard/profile-card.component';
-import { ButtonModule,CardModule,ChartModule,MessageModule,OverlayPanelModule,DialogModule ,ConfirmationService,ConfirmDialogModule} from '../../components/common/api';
-import { ProfileService } from './profile.service';
-import { HttpService } from '../../shared/api';
-import { SuspensionFrameComponent } from './profileCard/suspension-frame/suspension-frame.component';
-
-let routers = [{
- path: '',
- component: ProfileComponent
-}]
-
-@NgModule({
- declarations: [
- ProfileComponent,
- ProfileCardComponent,
- SuspensionFrameComponent
- ],
- imports: [
- RouterModule.forChild(routers),
- ButtonModule,
- CommonModule,
- CardModule,
- ChartModule,
- MessageModule,
- OverlayPanelModule,
- DialogModule,
- ConfirmDialogModule
- ],
- providers: [
- HttpService,
- ProfileService,
- ConfirmationService
- ]
-})
-export class ProfileModule { }
\ No newline at end of file
diff --git a/dashboard/src/app/business/profile/profile.service.ts b/dashboard/src/app/business/profile/profile.service.ts
deleted file mode 100644
index a47f18f37..000000000
--- a/dashboard/src/app/business/profile/profile.service.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-import { Injectable } from '@angular/core';
-import { HttpService } from './../../shared/service/Http.service';
-import { Observable } from 'rxjs';
-
-@Injectable()
-export class ProfileService {
- url = 'v1beta/{project_id}/profiles'
- constructor(private http: HttpService) { }
- //创建profile
- createProfile(param) {
- return this.http.post(this.url, param);
- }
-
- //删除profile
- deleteProfile(id): Observable {
- let deleteUrl = this.url + '/' + id
- return this.http.delete(deleteUrl);
- }
-
- //查询profiles
- getProfiles(): Observable {
- return this.http.get(this.url);
- }
-
- //查询profiles
- getProfileById(id) {
- let getUrl = this.url + '/' + id
- return this.http.get(getUrl);
- }
-
- //修改profile
- modifyProfile(id, param) {
- let modifyUrl = this.url + '/' + id
- this.http.put(modifyUrl, param).subscribe((res) => {
- console.log(res.json().data);
- });
- }
-}
-
-@Injectable()
-export class PoolService{
- url = 'v1beta/{project_id}/pools';
- constructor(private http: HttpService) { }
- //查询profiles
- getPools(): Observable {
- return this.http.get(this.url);
- }
-}
diff --git a/dashboard/src/app/business/profile/profileCard/profile-card.component.html b/dashboard/src/app/business/profile/profileCard/profile-card.component.html
deleted file mode 100644
index c82a17275..000000000
--- a/dashboard/src/app/business/profile/profileCard/profile-card.component.html
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
{{data.name}}
-
-
-
{{I18N.keyID['sds_block_volume_descri']}}:
-
{{data && data.description ?data.description :"--"}}
-
-
- Access Protocol:
- {{data.extras && data.extras[':provisionPolicy'].ioConnectivityLoS.accessProtocol}}
-
-
- Provisioning Type:
- {{data.extras && data.extras[':provisionPolicy'].dataStorageLoS.provisioningPolicy}}
-
-
-
-
-
-
-
diff --git a/dashboard/src/app/business/profile/profileCard/profile-card.component.ts b/dashboard/src/app/business/profile/profileCard/profile-card.component.ts
deleted file mode 100644
index b42378e82..000000000
--- a/dashboard/src/app/business/profile/profileCard/profile-card.component.ts
+++ /dev/null
@@ -1,156 +0,0 @@
-import { Router } from '@angular/router';
-import { Component, OnInit, Input } from '@angular/core';
-import { I18NService } from 'app/shared/api';
-import { AppService } from 'app/app.service';
-import { trigger, state, style, transition, animate } from '@angular/animations';
-import { I18nPluralPipe } from '@angular/common';
-import { HttpService } from './../../../shared/api';
-
-import { ButtonModule } from './../../../components/common/api';
-
-// import {CardModule} from 'primeng/card';
-
-@Component({
- selector: 'profile-card',
- templateUrl: './profile-card.component.html',
- styleUrls: [
-
- ],
- animations: [
- trigger('overlayState', [
- state('hidden', style({
- opacity: 0
- })),
- state('visible', style({
- opacity: 1
- })),
- transition('visible => hidden', animate('400ms ease-in')),
- transition('hidden => visible', animate('400ms ease-out'))
- ]),
-
- trigger('notificationTopbar', [
- state('hidden', style({
- height: '0',
- opacity: 0
- })),
- state('visible', style({
- height: '*',
- opacity: 1
- })),
- transition('visible => hidden', animate('400ms ease-in')),
- transition('hidden => visible', animate('400ms ease-out'))
- ])
- ]
-})
-export class ProfileCardComponent implements OnInit {
- policys = [];
- data:any;
- @Input()
- set cardData(data: any) {
- this.data = data;
- this.policys = [];
- if(data.extras){
- if(data.extras[':provisionPolicy'].ioConnectivityLoS.maxIOPS){
- this.policys.push("QoS");
- }
- if(data.extras[':snapshotPolicy']){
- this.policys.push("Snapshot");
- }
- if(data.extras[':replicationPolicy']){
- this.policys.push("Replication");
- }
- }
-
- };
-
- chartDatas: any;
- constructor(
- public I18N: I18NService,
- // private router: Router
- private http: HttpService
- ) { }
- option = {};
- pools = [];
- totalFreeCapacity = 0;
- totalCapacity = 0;
- ngOnInit() {
- this.getPools();
- this.option = {
- cutoutPercentage: 80,
- // rotation: (0.5 * Math.PI),
- // circumference: (Math.PI),
- title: {
- display: false,
- text: 'My Title',
- fontSize: 12
- },
- legend: {
- labels: {
- boxWidth: 12
- },
- display: false,
- width: '5px',
- position: 'right',
- fontSize: 12
- }
- };
- }
-
- index;
- isHover;
-
- showSuspensionFrame(event){
- if(event.type === 'mouseenter'){
- this.isHover = true;
- }else if(event.type === 'mouseleave'){
- this.isHover = false;
- }
- let arrLength = event.target.parentNode.children.length;
- for(let i=0; i {
- this.pools = res.json();
- this.totalFreeCapacity = this.getSumCapacity(this.pools, 'free');
- this.totalCapacity = this.getSumCapacity(this.pools, 'total');
- this.chartDatas = {
- labels: ['Unused Capacity', 'Used Capacity'],
- datasets: [
- {
- data: [this.totalFreeCapacity,this.totalCapacity-this.totalFreeCapacity],
- backgroundColor: [
- "rgba(224, 224, 224, .5)",
- "#438bd3"
- ]
- // hoverBackgroundColor: [
- // "#FF6384",
- // "#36A2EB",
- // "#FFCE56"
- // ]
- }]
- };
- });
- }
-
- getSumCapacity(pools, FreeOrTotal) {
- let SumCapacity: number = 0;
- let arrLength = pools.length;
- for (let i = 0; i < arrLength; i++) {
- if(this.data.extras && this.data.extras[":provisionPolicy"].ioConnectivityLoS.accessProtocol.toLowerCase() == pools[i].extras.ioConnectivity.accessProtocol && this.data.extras[":provisionPolicy"].dataStorageLoS.provisioningPolicy == pools[i].extras.dataStorage.provisioningPolicy){
- if (FreeOrTotal === 'free') {
- SumCapacity += pools[i].freeCapacity;
- } else {
- SumCapacity += pools[i].totalCapacity;
- }
- }else{
- SumCapacity = 0;
- }
- }
- return SumCapacity;
- }
-}
diff --git a/dashboard/src/app/business/profile/profileCard/suspension-frame/suspension-frame.component.html b/dashboard/src/app/business/profile/profileCard/suspension-frame/suspension-frame.component.html
deleted file mode 100644
index 114f8ca8e..000000000
--- a/dashboard/src/app/business/profile/profileCard/suspension-frame/suspension-frame.component.html
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
{{policyName}} policy
-
{{item}}
-
-
-
-
diff --git a/dashboard/src/app/business/profile/profileCard/suspension-frame/suspension-frame.component.ts b/dashboard/src/app/business/profile/profileCard/suspension-frame/suspension-frame.component.ts
deleted file mode 100644
index 66bb6da59..000000000
--- a/dashboard/src/app/business/profile/profileCard/suspension-frame/suspension-frame.component.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-import { Component, OnInit, Input } from '@angular/core';
-
-@Component({
- selector: 'app-suspension-frame',
- templateUrl: './suspension-frame.component.html',
- styleUrls: [
-
- ]
-})
-export class SuspensionFrameComponent implements OnInit {
- data=[];
- policyName:string;
- @Input()
- set policy(policy: any) {
- let extra = policy[1];
- this.policyName = policy[0];
- if(this.policyName === "QoS"){
- let maxIpos ="MaxIOPS = " + extra[":provisionPolicy"].ioConnectivityLoS.maxIOPS + " IOPS/TB";
- this.data.push(maxIpos);
- let maxBWS = "MaxBWS = " + extra[":provisionPolicy"].ioConnectivityLoS.maxBWS + " MBPS/TB";
- this.data.push(maxBWS);
- }else if(this.policyName === "Replication"){
- let type ="Type = " + extra[":replicationPolicy"].dataProtectionLoS.replicaTypes;
- this.data.push(type);
- let mode = "Mode = " + extra[":replicationPolicy"].replicaInfos.replicaUpdateMode;
- this.data.push(mode);
- let Period = "Period = " + extra[":replicationPolicy"].replicaInfos.replicationPeriod +" Minutes";
- this.data.push(Period);
- let Bandwidth = "Bandwidth = " + extra[":replicationPolicy"].replicaInfos.replicationBandwidth +" MBPS/TB";
- this.data.push(Bandwidth);
- let RGO = "RGO = " + extra[":replicationPolicy"].dataProtectionLoS.recoveryGeographicObject;
- this.data.push(RGO);
- let RTO = "RTO = " + extra[":replicationPolicy"].dataProtectionLoS.recoveryTimeObjective;
- this.data.push(RTO);
- let RPO = "RPO = " + extra[":replicationPolicy"].dataProtectionLoS.recoveryPointObjective;
- this.data.push(RPO);
- let Consistency = "Consistency = " + extra[":replicationPolicy"].replicaInfos.consistencyEnabled;
- this.data.push(Consistency);
- }else{
- let schedule ="Schedule = " + extra[":snapshotPolicy"].schedule.occurrence;
- this.data.push(schedule);
- let execution = "Execution Time = " + extra[":snapshotPolicy"].schedule.datetime.split("T")[1] ;
- this.data.push(execution);
- let Retention = "Retention = " + (extra[":snapshotPolicy"].retention["number"] ? extra[":snapshotPolicy"].retention["number"]: (extra[":snapshotPolicy"].retention.duration+" Days"));
- this.data.push(Retention );
- }
- };
- constructor() { }
-
- ngOnInit() {
- // console.log(this.policy);
- }
-}
diff --git a/dashboard/src/app/business/profile/storage-pools-table/storage-pools-table.component.html b/dashboard/src/app/business/profile/storage-pools-table/storage-pools-table.component.html
deleted file mode 100644
index 701440241..000000000
--- a/dashboard/src/app/business/profile/storage-pools-table/storage-pools-table.component.html
+++ /dev/null
@@ -1,41 +0,0 @@
-
diff --git a/dashboard/src/app/business/profile/storage-pools-table/storage-pools-table.component.ts b/dashboard/src/app/business/profile/storage-pools-table/storage-pools-table.component.ts
deleted file mode 100644
index f1fb8ef71..000000000
--- a/dashboard/src/app/business/profile/storage-pools-table/storage-pools-table.component.ts
+++ /dev/null
@@ -1,75 +0,0 @@
-import { Component, OnInit,Input } from '@angular/core';
-import { PoolService } from './../profile.service';
-import { Utils } from '../../../shared/api';
-
-@Component({
- selector: 'app-storage-pools-table',
- templateUrl: './storage-pools-table.component.html',
- styleUrls: [
-
- ]
-})
-export class StoragePoolsTableComponent implements OnInit {
- cols;
- totalFreeCapacity = 0;
- pools = [];
- selectData;
- @Input()
- set selectProfile(selectProfile: any) {
- this.selectData = selectProfile;
- this.getPools();
- };
- constructor(
- private PoolService: PoolService
- ) { }
-
- getPools() {
- this.PoolService.getPools().subscribe((res) => {
- this.pools = [];
- let pools = res.json();
- if(this.selectData){
- let arrLength = pools.length
- for (let i = 0; i < arrLength; i++) {
- if (this.selectData.extras.protocol.toLowerCase() == pools[i].extras.ioConnectivity.accessProtocol && this.selectData.storageType == pools[i].extras.dataStorage.provisioningPolicy){
- this.pools.push(pools[i]);
- }
- }
- }else{
- this.pools = pools;
- }
-
- this.pools.map((pool)=>{
- pool.freeCapacityFormat = Utils.getDisplayGBCapacity(pool.freeCapacity);
- pool.totalCapacityFormat = Utils.getDisplayGBCapacity(pool.totalCapacity);
- })
-
- this.totalFreeCapacity = this.getSumCapacity(this.pools, 'free');
- });
- }
-
- getSumCapacity(pools, FreeOrTotal) {
- let SumCapacity: number = 0;
- let arrLength = pools.length;
- for (let i = 0; i < arrLength; i++) {
- if (FreeOrTotal === 'free') {
- SumCapacity += pools[i].freeCapacity;
- } else {
- SumCapacity += pools[i].totalCapacity;
- }
- }
- return SumCapacity;
- }
-
- ngOnInit() {
-
- this.cols = [
- { field: 'name', header: 'Name' },
- { field: 'freeCapacity', header: 'FreeCapacity' },
- { field: 'totalCapacity', header: 'TotalCapacity' },
- { field: 'extras.advanced.diskType', header: 'Disk' },
- { field: 'extras.dataStorage.provisioningPolicy', header: 'Backend' }
- ];
- this.getPools();
- }
-
-}
diff --git a/dashboard/src/app/business/profile/storage-pools-table/storage-pools-table.module.ts b/dashboard/src/app/business/profile/storage-pools-table/storage-pools-table.module.ts
deleted file mode 100644
index ec6b1bce2..000000000
--- a/dashboard/src/app/business/profile/storage-pools-table/storage-pools-table.module.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-import { CommonModule } from '@angular/common';
-import { NgModule, APP_INITIALIZER } from '@angular/core';
-
-import { TableModule } from './../../../components/common/api';
-import { HttpService } from './../../../shared/api';
-import { PoolService } from './../profile.service';
-
-import { StoragePoolsTableComponent } from './storage-pools-table.component';
-
-@NgModule({
- declarations: [
- StoragePoolsTableComponent
- ],
- imports: [
- CommonModule,
- TableModule
- ],
- providers: [
- HttpService,
- PoolService
- ],
- exports: [
- StoragePoolsTableComponent
- ],
-})
-export class PoolModule { }
\ No newline at end of file
diff --git a/dashboard/src/app/business/resource/region/region.component.ts b/dashboard/src/app/business/resource/region/region.component.ts
deleted file mode 100644
index d6b34c426..000000000
--- a/dashboard/src/app/business/resource/region/region.component.ts
+++ /dev/null
@@ -1,57 +0,0 @@
-import { Router } from '@angular/router';
-import { Component, OnInit, ViewContainerRef, ViewChild, Directive, ElementRef, HostBinding, HostListener } from '@angular/core';
-import { I18NService } from './../../../../app/shared/api';
-import { AppService } from './../../../../app/app.service';
-import { trigger, state, style, transition, animate} from '@angular/animations';
-import { I18nPluralPipe } from '@angular/common';
-
-@Component({
- selector: 'region-table',
- templateUrl: './region.html',
- styleUrls: [],
- animations: [
- trigger('overlayState', [
- state('hidden', style({
- opacity: 0
- })),
- state('visible', style({
- opacity: 1
- })),
- transition('visible => hidden', animate('400ms ease-in')),
- transition('hidden => visible', animate('400ms ease-out'))
- ]),
-
- trigger('notificationTopbar', [
- state('hidden', style({
- height: '0',
- opacity: 0
- })),
- state('visible', style({
- height: '*',
- opacity: 1
- })),
- transition('visible => hidden', animate('400ms ease-in')),
- transition('hidden => visible', animate('400ms ease-out'))
- ])
- ]
-})
-export class RegionComponent implements OnInit{
- regions = [];
-
- constructor(
- public I18N: I18NService,
- // private router: Router
- ){}
-
- ngOnInit() {
- this.regions = [
- { "name": this.I18N.keyID['sds_resource_region_default'], "role": "Primary Region", }
- ];
- }
-
- rowSelect(rowdata){
- console.log(rowdata);
- }
-
-}
-
diff --git a/dashboard/src/app/business/resource/region/region.html b/dashboard/src/app/business/resource/region/region.html
deleted file mode 100644
index 9d57a5d9f..000000000
--- a/dashboard/src/app/business/resource/region/region.html
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/dashboard/src/app/business/resource/region/region.module.ts b/dashboard/src/app/business/resource/region/region.module.ts
deleted file mode 100644
index c70c8a9bb..000000000
--- a/dashboard/src/app/business/resource/region/region.module.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { NgModule, APP_INITIALIZER } from '@angular/core';
-import { RegionComponent } from './region.component';
-import { ButtonModule, DataTableModule, InputTextModule } from './../../../components/common/api';
-
-
-@NgModule({
- declarations: [
- RegionComponent
- ],
- imports: [
- ButtonModule,
- DataTableModule,
- InputTextModule
- ],
- exports: [ RegionComponent ],
- providers: []
-})
-export class RegionModule { }
\ No newline at end of file
diff --git a/dashboard/src/app/business/resource/resource.component.ts b/dashboard/src/app/business/resource/resource.component.ts
deleted file mode 100644
index 9c2df5f62..000000000
--- a/dashboard/src/app/business/resource/resource.component.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-import { Router } from '@angular/router';
-import { Component, OnInit, ViewContainerRef, ViewChild, Directive, ElementRef, HostBinding, HostListener } from '@angular/core';
-import { I18NService } from '../../../app/shared/api';
-import { AppService } from '../../../app/app.service';
-import { trigger, state, style, transition, animate} from '@angular/animations';
-import { I18nPluralPipe } from '@angular/common';
-
-@Component({
- templateUrl: './resource.html',
- styleUrls: [],
- animations: [
- trigger('overlayState', [
- state('hidden', style({
- opacity: 0
- })),
- state('visible', style({
- opacity: 1
- })),
- transition('visible => hidden', animate('400ms ease-in')),
- transition('hidden => visible', animate('400ms ease-out'))
- ]),
-
- trigger('notificationTopbar', [
- state('hidden', style({
- height: '0',
- opacity: 0
- })),
- state('visible', style({
- height: '*',
- opacity: 1
- })),
- transition('visible => hidden', animate('400ms ease-in')),
- transition('hidden => visible', animate('400ms ease-out'))
- ])
- ]
-})
-export class ResourceComponent implements OnInit{
-
- constructor(
- public I18N: I18NService,
- // private router: Router
- ){}
-
- ngOnInit() {
-
- }
-
-}
-
diff --git a/dashboard/src/app/business/resource/resource.html b/dashboard/src/app/business/resource/resource.html
deleted file mode 100644
index e7727168c..000000000
--- a/dashboard/src/app/business/resource/resource.html
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/dashboard/src/app/business/resource/resource.module.ts b/dashboard/src/app/business/resource/resource.module.ts
deleted file mode 100644
index 2379ecef9..000000000
--- a/dashboard/src/app/business/resource/resource.module.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-import { NgModule, APP_INITIALIZER } from '@angular/core';
-import { ResourceComponent } from './resource.component';
-import { RouterModule } from '@angular/router';
-import { TabViewModule, ButtonModule } from '../../components/common/api';
-
-// 引入region模块
-import { RegionModule } from './region/region.module';
-// 引入zone模块
-import { ZoneModule } from './zone/zone.module';
-// 引入storage模块
-import { StorageModule } from './storage/storage.module';
-
-let routers = [{
- path: '',
- component: ResourceComponent
-}]
-
-@NgModule({
- declarations: [
- ResourceComponent
- ],
- imports: [
- RouterModule.forChild(routers),
- TabViewModule,
- ButtonModule,
- RegionModule,//region模块
- ZoneModule,//zone模块
- StorageModule//storage模块
- ],
- providers: []
-})
-export class ResourceModule { }
\ No newline at end of file
diff --git a/dashboard/src/app/business/resource/resource.service.ts b/dashboard/src/app/business/resource/resource.service.ts
deleted file mode 100644
index f748d4047..000000000
--- a/dashboard/src/app/business/resource/resource.service.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { Injectable } from '@angular/core';
-import { I18NService, HttpService, ParamStorService } from '../../shared/api';
-import { Observable } from 'rxjs';
-
-@Injectable()
-export class AvailabilityZonesService{
- constructor(
- private http: HttpService,
- private paramStor: ParamStorService
- ) { }
-
- url = 'v1beta/{project_id}/availabilityZones';
-
- //get az
- getAZ(param?): Observable{
- return this.http.get(this.url, param);
- }
-
-
-}
diff --git a/dashboard/src/app/business/resource/storage/storage.component.ts b/dashboard/src/app/business/resource/storage/storage.component.ts
deleted file mode 100644
index 3aad4f352..000000000
--- a/dashboard/src/app/business/resource/storage/storage.component.ts
+++ /dev/null
@@ -1,83 +0,0 @@
-import { Router } from '@angular/router';
-import { Component, OnInit, ViewContainerRef, ViewChild, Directive, ElementRef, HostBinding, HostListener } from '@angular/core';
-import { I18NService, ParamStorService} from 'app/shared/api';
-import { Http } from '@angular/http';
-import { trigger, state, style, transition, animate} from '@angular/animations';
-
-@Component({
- selector: 'storage-table',
- templateUrl: './storage.html',
- styleUrls: [],
- animations: [
- trigger('overlayState', [
- state('hidden', style({
- opacity: 0
- })),
- state('visible', style({
- opacity: 1
- })),
- transition('visible => hidden', animate('400ms ease-in')),
- transition('hidden => visible', animate('400ms ease-out'))
- ]),
-
- trigger('notificationTopbar', [
- state('hidden', style({
- height: '0',
- opacity: 0
- })),
- state('visible', style({
- height: '*',
- opacity: 1
- })),
- transition('visible => hidden', animate('400ms ease-in')),
- transition('hidden => visible', animate('400ms ease-out'))
- ])
- ]
-})
-export class StorageComponent implements OnInit{
-
- storages = [];
-
- constructor(
- public I18N: I18NService,
- private http: Http,
- private paramStor: ParamStorService
- ){}
-
- ngOnInit() {
- this.storages = [];
-
- this.listStorage();
- }
-
- listStorage(){
- this.storages = [];
- let reqUser: any = { params:{} };
- let user_id = this.paramStor.CURRENT_USER().split("|")[1];
- this.http.get("/v3/users/"+ user_id +"/projects", reqUser).subscribe((objRES) => {
- let project_id;
- objRES.json().projects.forEach(element => {
- if(element.name == "admin"){
- project_id = element.id;
- }
- })
-
- let reqPool: any = { params:{} };
- this.http.get("/v1beta/"+ project_id +"/pools", reqPool).subscribe((poolRES) => {
- let reqDock: any = { params:{} };
- this.http.get("/v1beta/"+ project_id +"/docks", reqDock).subscribe((dockRES) => {
- dockRES.json().forEach(ele => {
- let zone = poolRES.json().filter((pool)=>{
- return pool.dockId == ele.id;
- })[0].availabilityZone;
- let [name,ip,status,description,region,az] = [ele.name, ele.endpoint.split(":")[0], "Enabled", ele.description, "default_region", zone];
- this.storages.push({name,ip,status,description,region,az});
- })
- console.log(this.storages);
- })
- })
- })
- }
-
-}
-
diff --git a/dashboard/src/app/business/resource/storage/storage.html b/dashboard/src/app/business/resource/storage/storage.html
deleted file mode 100644
index e03b3d88b..000000000
--- a/dashboard/src/app/business/resource/storage/storage.html
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/dashboard/src/app/business/resource/storage/storage.module.ts b/dashboard/src/app/business/resource/storage/storage.module.ts
deleted file mode 100644
index bdf84cfc7..000000000
--- a/dashboard/src/app/business/resource/storage/storage.module.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { NgModule, APP_INITIALIZER } from '@angular/core';
-import { StorageComponent } from './storage.component';
-import { ButtonModule, DataTableModule, InputTextModule } from './../../../components/common/api';
-
-
-@NgModule({
- declarations: [
- StorageComponent
- ],
- imports: [
- ButtonModule,
- DataTableModule,
- InputTextModule
- ],
- exports: [
- StorageComponent
- ],
- providers: []
-})
-export class StorageModule { }
\ No newline at end of file
diff --git a/dashboard/src/app/business/resource/zone/zone.component.ts b/dashboard/src/app/business/resource/zone/zone.component.ts
deleted file mode 100644
index e7c6ee3b7..000000000
--- a/dashboard/src/app/business/resource/zone/zone.component.ts
+++ /dev/null
@@ -1,67 +0,0 @@
-import { Router } from '@angular/router';
-import { Component, OnInit, ViewContainerRef, ViewChild, Directive, ElementRef, HostBinding, HostListener } from '@angular/core';
-import { I18NService, ParamStorService} from 'app/shared/api';
-import { Http } from '@angular/http';
-import { trigger, state, style, transition, animate } from '@angular/animations';
-import {AvailabilityZonesService} from '../resource.service';
-
-@Component({
- selector: 'zone-table',
- templateUrl: './zone.html',
- styleUrls: [],
- animations: [
- trigger('overlayState', [
- state('hidden', style({
- opacity: 0
- })),
- state('visible', style({
- opacity: 1
- })),
- transition('visible => hidden', animate('400ms ease-in')),
- transition('hidden => visible', animate('400ms ease-out'))
- ]),
-
- trigger('notificationTopbar', [
- state('hidden', style({
- height: '0',
- opacity: 0
- })),
- state('visible', style({
- height: '*',
- opacity: 1
- })),
- transition('visible => hidden', animate('400ms ease-in')),
- transition('hidden => visible', animate('400ms ease-out'))
- ])
- ]
-})
-export class ZoneComponent implements OnInit {
-
- zones = [];
-
- constructor(
- public I18N: I18NService,
- private http: Http,
- private paramStor: ParamStorService,
- private availabilityZonesService: AvailabilityZonesService
- ) { }
-
- ngOnInit() {
-
- this.listAZ();
- }
-
- listAZ(){
- this.zones = [];
- this.availabilityZonesService.getAZ().subscribe((azRes) => {
- let AZs=azRes.json();
- if(AZs && AZs.length !== 0){
- AZs.forEach(item =>{
- let [name,region,description] = [item, "default_region", "--"];
- this.zones.push({name,region,description});
- })
- }
- })
- }
-}
-
diff --git a/dashboard/src/app/business/resource/zone/zone.html b/dashboard/src/app/business/resource/zone/zone.html
deleted file mode 100644
index 994629a7c..000000000
--- a/dashboard/src/app/business/resource/zone/zone.html
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/dashboard/src/app/business/resource/zone/zone.module.ts b/dashboard/src/app/business/resource/zone/zone.module.ts
deleted file mode 100644
index 971390c21..000000000
--- a/dashboard/src/app/business/resource/zone/zone.module.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { NgModule, APP_INITIALIZER } from '@angular/core';
-import { ZoneComponent } from './zone.component';
-import { ButtonModule, DataTableModule, InputTextModule } from './../../../components/common/api';
-import {AvailabilityZonesService} from '../resource.service';
-import { HttpService } from '../../../shared/service/Http.service';
-
-@NgModule({
- declarations: [
- ZoneComponent
- ],
- imports: [
- ButtonModule,
- DataTableModule,
- InputTextModule
- ],
- exports: [
- ZoneComponent
- ],
- providers: [HttpService,AvailabilityZonesService]
-})
-export class ZoneModule { }
\ No newline at end of file
diff --git a/dashboard/src/app/business/scss-variable.scss b/dashboard/src/app/business/scss-variable.scss
deleted file mode 100644
index 11a4a728f..000000000
--- a/dashboard/src/app/business/scss-variable.scss
+++ /dev/null
@@ -1,75 +0,0 @@
-$color-primary: (normal: #438bd3, hover: #4596e8, active: #1f5fac);
-$color-disabled: #c9d1d8;
-$color-text: (primary: #657D95, secondary: #8893a6, tertary: #b9c3c8, auxiliary: #c9d1d8);
-$color-title: (primary: #2e3039, secondary: #657D95);
-$color-splitline: #ecf0f2;
-$color-panelbg: #f3f6f7;
-$widget-border: (normal: #cfd7db, hover: #98a5bc, focus: #98a5bc, active: #98a5bc);
-$widget-bg: (normal: #fdfdfd, hover: #ffffff, focus: #ffffff, active: #f1f1f1);
-$border-radius: (small, 3px),
-(medium, 10px),
-(large, 20px);
-@each $type,
-$size in $border-radius {
- $radius-pos: (tl, $size 0 0 0), (tr, 0 $size 0 0), (br, 0 0 $size 0), (bl, 0 0 0 $size), (top, $size $size 0 0), (right, 0 $size $size 0), (left, $size 0 0 $size), (bottom, 0 0 $size $size), (all, $size);
- @each $pos,
- $cornerStyle in $radius-pos {
- .ui-corner-#{ $pos }-#{ $type } {
- -moz-border-radius: $cornerStyle;
- -webkit-border-radius: $cornerStyle;
- ;
- border-radius: $cornerStyle;
- }
- }
-}
-
-$fontFamily: "Roboto",
-"Trebuchet MS",
-Arial,
-Helvetica,
-sans-serif;
-$fontSize: 0.14rem;
-$borderRadius: 3px;
-$disabledOpacity: 0.35;
-//Header
-$headerBorderWidth: 1px;
-$headerBorderColor: #d9d9d9;
-$headerBgColor: #f6f7f9;
-$headerTextColor: #1b1d1f;
-$headerFontWeight: normal;
-$headerIconTextColor: #1b1d1f;
-//Content
-$contentBorderWidth: 1px;
-$contentBorderColor: #D5D5D5;
-$contentBgColor: #ffffff;
-$contentTextColor: map-get($color-text, primary);
-//Default State
-$stateDefaultBorderWidth: 1px;
-$stateDefaultBorderColor: map-get($widget-border, normal);
-$stateDefaultBgColor: map-get($widget-bg, normal);
-$stateDefaultTextColor: map-get($color-text, primary);
-//Active State
-$stateActiveBorderColor: map-get($widget-border, active);
-$stateActiveBgColor: map-get($widget-bg, active);
-$stateActiveTextColor: map-get($color-text, primary);
-//Highlight State
-$stateHighlightBorderColor: map-get($color-primary, normal);
-$stateHighlightBgColor: map-get($color-primary, normal);
-$stateHighlightTextColor: #FFFFFF;
-//Focus State
-$stateFocusBorderColor: map-get($widget-border, focus);
-$stateFocusBgColor: map-get($widget-bg, focus);
-$stateFocusTextColor: map-get($color-text, primary);
-//Error State
-$stateErrorBorderColor: #f44336;
-$stateErrorBgColor: #f5554a;
-$stateErrorTextColor: #cd0a0a;
-//Hover State
-$stateHoverBorderColor: map-get($widget-border, hover);
-$stateHoverBgColor: map-get($widget-bg, hover);
-$stateHoverTextColor: map-get($color-text, primary);
-//Forms
-$inputBgColor: #ffffff;
-$inputTextColor: map-get($color-text, primary);
-$invalidInputBorderColor: #f44336;
-$inputGroupTextColor: map-get($color-text, primary);
\ No newline at end of file
diff --git a/dashboard/src/app/business/service/service.component.html b/dashboard/src/app/business/service/service.component.html
deleted file mode 100644
index 78db672a4..000000000
--- a/dashboard/src/app/business/service/service.component.html
+++ /dev/null
@@ -1,3 +0,0 @@
-
- 我是service页面
-
\ No newline at end of file
diff --git a/dashboard/src/app/business/service/service.component.ts b/dashboard/src/app/business/service/service.component.ts
deleted file mode 100644
index 699a7b24b..000000000
--- a/dashboard/src/app/business/service/service.component.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-import { Router } from '@angular/router';
-import { Component, OnInit, ViewContainerRef, ViewChild, Directive, ElementRef, HostBinding, HostListener } from '@angular/core';
-import { I18NService } from 'app/shared/api';
-import { AppService } from 'app/app.service';
-import { trigger, state, style, transition, animate} from '@angular/animations';
-import { I18nPluralPipe } from '@angular/common';
-
-@Component({
- templateUrl: './service.component.html',
- styleUrls: [],
- animations: [
- trigger('overlayState', [
- state('hidden', style({
- opacity: 0
- })),
- state('visible', style({
- opacity: 1
- })),
- transition('visible => hidden', animate('400ms ease-in')),
- transition('hidden => visible', animate('400ms ease-out'))
- ]),
-
- trigger('notificationTopbar', [
- state('hidden', style({
- height: '0',
- opacity: 0
- })),
- state('visible', style({
- height: '*',
- opacity: 1
- })),
- transition('visible => hidden', animate('400ms ease-in')),
- transition('hidden => visible', animate('400ms ease-out'))
- ])
- ]
-})
-export class ServiceComponent implements OnInit{
-
- constructor(
- // private I18N: I18NService,
- // private router: Router
- ){}
-
- ngOnInit() {
-
- }
-
-}
diff --git a/dashboard/src/app/business/service/service.module.ts b/dashboard/src/app/business/service/service.module.ts
deleted file mode 100644
index 107592ee1..000000000
--- a/dashboard/src/app/business/service/service.module.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { NgModule, APP_INITIALIZER } from '@angular/core';
-import { ServiceComponent } from './service.component';
-import { RouterModule } from '@angular/router';
-
-let routers = [{
- path: '',
- component: ServiceComponent
-}]
-
-@NgModule({
- declarations: [
- ServiceComponent
- ],
- imports: [ RouterModule.forChild(routers) ],
- providers: []
-})
-export class ServiceModule { }
\ No newline at end of file
diff --git a/dashboard/src/app/components/accordion/accordion.css b/dashboard/src/app/components/accordion/accordion.css
deleted file mode 100644
index 606e60390..000000000
--- a/dashboard/src/app/components/accordion/accordion.css
+++ /dev/null
@@ -1,44 +0,0 @@
-.ui-accordion {
- width: 100%;
-}
-
-.ui-accordion .ui-accordion-header {
- cursor: pointer;
- position: relative;
- margin-top: 1px;
- zoom: 1;
-}
-
-.ui-accordion .ui-accordion-header a {
- display: block;
- padding: .5em;
-}
-
-.ui-accordion .ui-accordion-content {
- padding: 1em;
- border-top: 0;
- overflow: visible;
- zoom: 1;
-}
-
-.ui-accordion .ui-accordion-header.ui-state-disabled,
-.ui-accordion .ui-accordion-header.ui-state-disabled a {
- cursor: default;
-}
-
-.ui-accordion-content-wrapper-overflown {
- overflow: hidden;
-}
-
-.ui-rtl .ui-accordion .ui-accordion-header a {
- padding: .5em 2em .5em .5em;
-}
-
-.ui-rtl .ui-accordion .ui-accordion-header > .fa {
- left: initial;
- right: .5em;
-}
-
-.ui-rtl .ui-accordion .ui-accordion-header > .fa-caret-right::before {
- content: '\f0d9';
-}
\ No newline at end of file
diff --git a/dashboard/src/app/components/accordion/accordion.spec.ts b/dashboard/src/app/components/accordion/accordion.spec.ts
deleted file mode 100644
index f165fb0ea..000000000
--- a/dashboard/src/app/components/accordion/accordion.spec.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { TestBed, ComponentFixture } from '@angular/core/testing';
-import { By } from '@angular/platform-browser';
-import { Accordion } from './accordion';
-import { NoopAnimationsModule } from '@angular/platform-browser/animations';
-
-describe('Accordion', () => {
-
- let accordion: Accordion;
- let fixture: ComponentFixture;
-
- beforeEach(() => {
- TestBed.configureTestingModule({
- imports: [
- NoopAnimationsModule
- ],
- declarations: [
- Accordion
- ]
- });
-
- fixture = TestBed.createComponent(Accordion);
- accordion = fixture.componentInstance;
- });
-});
diff --git a/dashboard/src/app/components/accordion/accordion.ts b/dashboard/src/app/components/accordion/accordion.ts
deleted file mode 100644
index fafd16e8e..000000000
--- a/dashboard/src/app/components/accordion/accordion.ts
+++ /dev/null
@@ -1,209 +0,0 @@
-import { NgModule, Component, ElementRef, AfterContentInit, OnDestroy, Input, Output, EventEmitter,
- ContentChildren, QueryList, ChangeDetectorRef, Inject, forwardRef} from '@angular/core';
-import { trigger, state, style, transition, animate } from '@angular/animations';
-import { CommonModule } from '@angular/common';
-import { SharedModule, Header } from '../common/shared';
-import { BlockableUI } from '../common/blockableui';
-import { Subscription } from 'rxjs/Subscription';
-
-let idx: number = 0;
-
-@Component({
- selector: 'p-accordionTab',
- template: `
-
-
- `,
- animations: [
- trigger('tabContent', [
- state('hidden', style({
- height: '0'
- })),
- state('visible', style({
- height: '*'
- })),
- transition('visible <=> hidden', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)'))
- ])
- ]
-})
-export class AccordionTab implements OnDestroy {
-
- @Input() header: string;
-
- @Input() selected: boolean;
-
- @Input() disabled: boolean;
-
- @Output() selectedChange: EventEmitter = new EventEmitter();
-
- @ContentChildren(Header) headerFacet: QueryList;
-
- animating: boolean;
-
- id: string = `ui-accordiontab-${idx++}`;
-
- constructor( @Inject(forwardRef(() => Accordion)) public accordion: Accordion) {}
-
- toggle(event) {
- if (this.disabled || this.animating) {
- return false;
- }
-
- this.animating = true;
- let index = this.findTabIndex();
-
- if (this.selected) {
- this.selected = false;
- this.accordion.onClose.emit({ originalEvent: event, index: index });
- }
- else {
- if (!this.accordion.multiple) {
- for (var i = 0; i < this.accordion.tabs.length; i++) {
- this.accordion.tabs[i].selected = false;
- this.accordion.tabs[i].selectedChange.emit(false);
- }
- }
-
- this.selected = true;
- this.accordion.onOpen.emit({ originalEvent: event, index: index });
- }
-
- this.selectedChange.emit(this.selected);
-
- event.preventDefault();
- }
-
- findTabIndex() {
- let index = -1;
- for (var i = 0; i < this.accordion.tabs.length; i++) {
- if (this.accordion.tabs[i] == this) {
- index = i;
- break;
- }
- }
- return index;
- }
-
- get lazy(): boolean {
- return this.accordion.lazy;
- }
-
- get hasHeaderFacet(): boolean {
- return this.headerFacet && this.headerFacet.length > 0;
- }
-
- onToggleDone(event: Event) {
- this.animating = false;
- }
-
- ngOnDestroy() {
- this.accordion.tabs.splice(this.findTabIndex(), 1);
- }
-}
-
-@Component({
- selector: 'p-accordion',
- template: `
-
-
-
- `
-})
-export class Accordion implements BlockableUI, AfterContentInit, OnDestroy {
-
- @Input() multiple: boolean;
-
- @Output() onClose: EventEmitter = new EventEmitter();
-
- @Output() onOpen: EventEmitter = new EventEmitter();
-
- @Input() style: any;
-
- @Input() styleClass: string;
-
- @Input() expandIcon: string = 'fa fa-fw fa-caret-right';
-
- @Input() collapseIcon: string = 'fa fa-fw fa-caret-down';
-
- @Input() lazy: boolean;
-
- @ContentChildren(AccordionTab) tabList: QueryList;
-
- tabListSubscription: Subscription;
-
- private _activeIndex: any;
-
- public tabs: AccordionTab[] = [];
-
- constructor(public el: ElementRef, public changeDetector: ChangeDetectorRef) {}
-
- ngAfterContentInit() {
- this.initTabs();
-
- this.tabListSubscription = this.tabList.changes.subscribe(_ => {
- this.initTabs();
- this.changeDetector.markForCheck();
- });
- }
-
- initTabs(): any {
- this.tabs = this.tabList.toArray();
- this.updateSelectionState();
- }
-
- getBlockableElement(): HTMLElement {
- return this.el.nativeElement.children[0];
- }
-
- @Input() get activeIndex(): any {
- return this._activeIndex;
- }
-
- set activeIndex(val: any) {
- this._activeIndex = val;
- this.updateSelectionState();
- }
-
- updateSelectionState() {
- if (this.tabs && this.tabs.length && this._activeIndex != null) {
- for (let i = 0; i < this.tabs.length; i++) {
- let selected = this.multiple ? this._activeIndex.includes(i) : (i === this._activeIndex);
- let changed = selected !== this.tabs[i].selected;
-
- if (changed) {
- this.tabs[i].animating = true;
- }
-
- this.tabs[i].selected = selected;
- this.tabs[i].selectedChange.emit(selected);
- }
- }
- }
-
- ngOnDestroy() {
- if(this.tabListSubscription) {
- this.tabListSubscription.unsubscribe();
- }
- }
-}
-
-@NgModule({
- imports: [CommonModule],
- exports: [Accordion,AccordionTab,SharedModule],
- declarations: [Accordion,AccordionTab]
-})
-export class AccordionModule { }
diff --git a/dashboard/src/app/components/autocomplete/autocomplete.css b/dashboard/src/app/components/autocomplete/autocomplete.css
deleted file mode 100644
index 637ed7330..000000000
--- a/dashboard/src/app/components/autocomplete/autocomplete.css
+++ /dev/null
@@ -1,163 +0,0 @@
-.ui-autocomplete {
- width: auto;
- zoom: 1;
- cursor: pointer;
- -moz-box-shadow: none;
- -webkit-box-shadow: none;
- box-shadow: none;
- position: relative;
- display: inline-block;
-}
-
-.ui-autocomplete .ui-autocomplete-dropdown {
- height: 100%;
- width: 2em;
- margin-right: 0;
- vertical-align: top;
-}
-
-.ui-autocomplete .ui-autocomplete-input {
- padding-right: 1.5em;
-}
-
-.ui-autocomplete-loader {
- position: absolute;
- right: .25em;
- top: 50%;
- margin-top: -.5em;
-}
-
-.ui-autocomplete-query {
- font-weight: bold;
-}
-
-.ui-autocomplete .ui-autocomplete-panel {
- min-width: 100%;
-}
-
-.ui-autocomplete-panel {
- position: absolute;
- overflow: auto;
-}
-
-.ui-autocomplete-panel .ui-autocomplete-list {
- padding: 0.4em;
- border: 0 none;
-}
-
-.ui-autocomplete-panel .ui-autocomplete-list-item {
- border: 0 none;
- cursor: pointer;
- font-weight: normal;
- margin: 1px 0;
- padding: 0.186em 0.313em;
- text-align: left;
-}
-
-.ui-autocomplete .ui-button-icon-only,
-.ui-autocomplete .ui-button-icon-only:enabled:hover,
-.ui-autocomplete .ui-button-icon-only:enabled:focus,
-.ui-autocomplete .ui-button-icon-only:enabled:active {
- border-left: 0 none;
-}
-
-/* Multiple Selection */
-.ui-autocomplete-multiple-container {
- display: inline-block;
- vertical-align: middle;
-}
-
-.ui-autocomplete-multiple-container.ui-inputtext {
- clear: left;
- cursor: text;
- list-style-type: none;
- margin: 0;
- overflow: hidden;
- padding: 0 1.5em 0 .25em;
-}
-
-.ui-autocomplete-token {
- cursor: default;
- display: inline-block;
- vertical-align: middle;
- overflow: hidden;
- padding: .125em .5em;
- white-space: nowrap;
- position: relative;
- margin-right: .125em;
- border: 0 none;
- font-size: .9em;
-}
-
-.ui-autocomplete-token-label {
- display: block;
- margin-right: 2em;
-}
-
-.ui-autocomplete-token-icon {
- margin-top: -.5em;
- position: absolute;
- right: 0.2em;
- top: 50%;
- cursor: pointer;
-}
-
-.ui-autocomplete-input-token {
- display: inline-block;
- vertical-align: middle;
- list-style-type: none;
- margin: 0 0 0 .125em;
- padding: .25em .25em .25em 0;
-}
-
-.ui-autocomplete-input-token input {
- border: 0 none;
- width: 10em;
- outline: medium none;
- background-color: transparent;
- margin: 0;
- padding: 0;
- box-shadow: none;
- -moz-border-radius: 0;
- -webkit-border-radius: 0;
- border-radius: 0;
-}
-
-.ui-autocomplete-dd .ui-autocomplete-loader {
- right: 2.25em;
-}
-
-.ui-autocomplete-dd input.ui-corner-all ,
-.ui-autocomplete-dd .ui-autocomplete-multiple-container.ui-corner-all {
- -moz-border-radius-topright: 0px;
- -webkit-border-top-right-radius: 0px;
- border-top-right-radius: 0px;
- -moz-border-radius-bottomright: 0px;
- -webkit-border-bottom-right-radius: 0px;
- border-bottom-right-radius: 0px;
- }
-
-.ui-autocomplete-dd .ui-autocomplete-dropdown.ui-corner-all {
- -moz-border-radius-topleft: 0px;
- -webkit-border-top-left-radius: 0px;
- border-top-left-radius: 0px;
- -moz-border-radius-bottomleft: 0px;
- -webkit-border-bottom-left-radius: 0px;
- border-bottom-left-radius: 0px;
-}
-
-/** AutoComplete **/
-.ui-fluid p-autocomplete,
-.ui-fluid .ui-autocomplete,
-.ui-fluid .ui-autocomplete-input {
- width: 100%;
-}
-
-.ui-fluid .ui-autocomplete.ui-autocomplete-dd .ui-autocomplete-input,
-.ui-fluid .ui-autocomplete.ui-autocomplete-dd .ui-autocomplete-multiple-container {
- width: calc(100% - 2em);
-}
-
-.ui-fluid .ui-autocomplete .ui-autocomplete-dropdown.ui-button {
- width: 2em;
-}
diff --git a/dashboard/src/app/components/autocomplete/autocomplete.spec.ts b/dashboard/src/app/components/autocomplete/autocomplete.spec.ts
deleted file mode 100644
index 8272d75f2..000000000
--- a/dashboard/src/app/components/autocomplete/autocomplete.spec.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { TestBed, ComponentFixture } from '@angular/core/testing';
-import { By } from '@angular/platform-browser';
-import { AutoComplete } from './autocomplete';
-import { NoopAnimationsModule } from '@angular/platform-browser/animations';
-
-describe('AutoComplete', () => {
-
- let autocomplete: AutoComplete;
- let fixture: ComponentFixture;
-
- beforeEach(() => {
- TestBed.configureTestingModule({
- imports: [
- NoopAnimationsModule
- ],
- declarations: [
- AutoComplete
- ]
- });
-
- fixture = TestBed.createComponent(AutoComplete);
- autocomplete = fixture.componentInstance;
- });
-});
diff --git a/dashboard/src/app/components/autocomplete/autocomplete.ts b/dashboard/src/app/components/autocomplete/autocomplete.ts
deleted file mode 100644
index edc3c56e4..000000000
--- a/dashboard/src/app/components/autocomplete/autocomplete.ts
+++ /dev/null
@@ -1,643 +0,0 @@
-import {NgModule,Component,ViewChild,ElementRef,AfterViewInit,AfterContentInit,DoCheck,AfterViewChecked,Input,Output,EventEmitter,ContentChildren,QueryList,TemplateRef,Renderer2,forwardRef,ChangeDetectorRef,IterableDiffers} from '@angular/core';
-import {CommonModule} from '@angular/common';
-import {InputTextModule} from '../inputtext/inputtext';
-import {ButtonModule} from '../button/button';
-import {SharedModule,PrimeTemplate} from '../common/shared';
-import {DomHandler} from '../dom/domhandler';
-import {ObjectUtils} from '../utils/objectutils';
-import {NG_VALUE_ACCESSOR, ControlValueAccessor} from '@angular/forms';
-
-export const AUTOCOMPLETE_VALUE_ACCESSOR: any = {
- provide: NG_VALUE_ACCESSOR,
- useExisting: forwardRef(() => AutoComplete),
- multi: true
-};
-
-@Component({
- selector: 'p-autoComplete',
- template: `
-
-
-
-
- -
- {{field ? objectUtils.resolveFieldData(option, field) : option}}
-
-
- - {{emptyMessage}}
-
-
-
- `,
- host: {
- '[class.ui-inputwrapper-filled]': 'filled',
- '[class.ui-inputwrapper-focus]': 'focus'
- },
- providers: [DomHandler,ObjectUtils,AUTOCOMPLETE_VALUE_ACCESSOR]
-})
-export class AutoComplete implements AfterViewInit,AfterViewChecked,DoCheck,ControlValueAccessor {
-
- @Input() minLength: number = 1;
-
- @Input() delay: number = 300;
-
- @Input() style: any;
-
- @Input() styleClass: string;
-
- @Input() inputStyle: any;
-
- @Input() inputId: string;
-
- @Input() inputStyleClass: string;
-
- @Input() placeholder: string;
-
- @Input() readonly: boolean;
-
- @Input() disabled: boolean;
-
- @Input() maxlength: number;
-
- @Input() required: boolean;
-
- @Input() size: number;
-
- @Input() appendTo: any;
-
- @Input() autoHighlight: boolean;
-
- @Input() forceSelection: boolean;
-
- @Input() type: string = 'text';
-
- @Output() completeMethod: EventEmitter = new EventEmitter();
-
- @Output() onSelect: EventEmitter = new EventEmitter();
-
- @Output() onUnselect: EventEmitter = new EventEmitter();
-
- @Output() onFocus: EventEmitter = new EventEmitter();
-
- @Output() onBlur: EventEmitter = new EventEmitter();
-
- @Output() onDropdownClick: EventEmitter = new EventEmitter();
-
- @Output() onClear: EventEmitter = new EventEmitter();
-
- @Output() onKeyUp: EventEmitter = new EventEmitter();
-
- @Input() field: string;
-
- @Input() scrollHeight: string = '200px';
-
- @Input() dropdown: boolean;
-
- @Input() dropdownMode: string = 'blank';
-
- @Input() multiple: boolean;
-
- @Input() tabindex: number;
-
- @Input() dataKey: string;
-
- @Input() emptyMessage: string;
-
- @Input() immutable: boolean = true;
-
- @ViewChild('in') inputEL: ElementRef;
-
- @ViewChild('multiIn') multiInputEL: ElementRef;
-
- @ViewChild('panel') panelEL: ElementRef;
-
- @ViewChild('multiContainer') multiContainerEL: ElementRef;
-
- @ViewChild('ddBtn') dropdownButton: ElementRef;
-
- @ContentChildren(PrimeTemplate) templates: QueryList;
-
- itemTemplate: TemplateRef;
-
- selectedItemTemplate: TemplateRef;
-
- value: any;
-
- _suggestions: any[];
-
- onModelChange: Function = () => {};
-
- onModelTouched: Function = () => {};
-
- timeout: any;
-
- panelVisible: boolean = false;
-
- documentClickListener: any;
-
- suggestionsUpdated: boolean;
-
- highlightOption: any;
-
- highlightOptionChanged: boolean;
-
- focus: boolean = false;
-
- filled: boolean;
-
- inputClick: boolean;
-
- inputKeyDown: boolean;
-
- noResults: boolean;
-
- differ: any;
-
- inputFieldValue: string = null;
-
- loading: boolean;
-
- constructor(public el: ElementRef, public domHandler: DomHandler, public renderer: Renderer2, public objectUtils: ObjectUtils, public cd: ChangeDetectorRef, public differs: IterableDiffers) {
- this.differ = differs.find([]).create(null);
- }
-
- @Input() get suggestions(): any[] {
- return this._suggestions;
- }
-
- set suggestions(val:any[]) {
- this._suggestions = val;
- if(this.immutable) {
- this.handleSuggestionsChange();
- }
- }
-
- ngDoCheck() {
- if(!this.immutable) {
- let changes = this.differ.diff(this.suggestions);
- if(changes) {
- this.handleSuggestionsChange();
- }
- }
- }
-
- handleSuggestionsChange() {
- if(this.panelEL && this.panelEL.nativeElement && this.loading) {
- this.highlightOption = null;
- if(this._suggestions && this._suggestions.length) {
- this.noResults = false;
- this.show();
- this.suggestionsUpdated = true;
-
- if(this.autoHighlight) {
- this.highlightOption = this._suggestions[0];
- }
- }
- else {
- this.noResults = true;
-
- if(this.emptyMessage) {
- this.show();
- this.suggestionsUpdated = true;
- }
- else {
- this.hide();
- }
- }
- }
-
- this.loading = false;
- }
-
- ngAfterContentInit() {
- this.templates.forEach((item) => {
- switch(item.getType()) {
- case 'item':
- this.itemTemplate = item.template;
- break;
-
- case 'selectedItem':
- this.selectedItemTemplate = item.template;
- break;
-
- default:
- this.itemTemplate = item.template;
- break;
- }
- });
- }
-
- ngAfterViewInit() {
- if(this.appendTo) {
- if(this.appendTo === 'body')
- document.body.appendChild(this.panelEL.nativeElement);
- else
- this.domHandler.appendChild(this.panelEL.nativeElement, this.appendTo);
- }
- }
-
- ngAfterViewChecked() {
- //Use timeouts as since Angular 4.2, AfterViewChecked is broken and not called after panel is updated
- if(this.suggestionsUpdated && this.panelEL.nativeElement && this.panelEL.nativeElement.offsetParent) {
- setTimeout(() => this.align(), 1);
- this.suggestionsUpdated = false;
- }
-
- if(this.highlightOptionChanged) {
- setTimeout(() => {
- let listItem = this.domHandler.findSingle(this.panelEL.nativeElement, 'li.ui-state-highlight');
- if(listItem) {
- this.domHandler.scrollInView(this.panelEL.nativeElement, listItem);
- }
- }, 1);
- this.highlightOptionChanged = false;
- }
- }
-
- writeValue(value: any) : void {
- this.value = value;
- this.filled = this.value && this.value != '';
- this.updateInputField();
- }
-
- registerOnChange(fn: Function): void {
- this.onModelChange = fn;
- }
-
- registerOnTouched(fn: Function): void {
- this.onModelTouched = fn;
- }
-
- setDisabledState(val: boolean): void {
- this.disabled = val;
- }
-
- onInput(event: KeyboardEvent) {
- if(!this.inputKeyDown) {
- return;
- }
-
- if(this.timeout) {
- clearTimeout(this.timeout);
- }
-
- let value = ( event.target).value;
- if(!this.multiple && !this.forceSelection) {
- this.onModelChange(value);
- }
-
- if(value.length === 0) {
- this.hide();
- this.onClear.emit(event);
- }
-
- if(value.length >= this.minLength) {
- this.timeout = setTimeout(() => {
- this.search(event, value);
- }, this.delay);
- }
- else {
- this.suggestions = null;
- this.hide();
- }
- this.updateFilledState();
- this.inputKeyDown = false;
- }
-
- onInputClick(event: MouseEvent) {
- if(this.documentClickListener) {
- this.inputClick = true;
- }
- }
-
- search(event: any, query: string) {
- //allow empty string but not undefined or null
- if(query === undefined || query === null) {
- return;
- }
-
- this.loading = true;
-
- this.completeMethod.emit({
- originalEvent: event,
- query: query
- });
- }
-
- selectItem(option: any, focus: boolean = true) {
- if(this.multiple) {
- this.multiInputEL.nativeElement.value = '';
- this.value = this.value||[];
- if(!this.isSelected(option)) {
- this.value = [...this.value,option];
- this.onModelChange(this.value);
- }
- }
- else {
- this.inputEL.nativeElement.value = this.field ? this.objectUtils.resolveFieldData(option, this.field)||'': option;
- this.value = option;
- this.onModelChange(this.value);
- }
-
- this.onSelect.emit(option);
- this.updateFilledState();
- this._suggestions = null;
-
- if(focus) {
- this.focusInput();
- }
- }
-
- show() {
- if(this.multiInputEL || this.inputEL) {
- let hasFocus = this.multiple ? document.activeElement == this.multiInputEL.nativeElement : document.activeElement == this.inputEL.nativeElement ;
- if(!this.panelVisible && hasFocus) {
- this.panelVisible = true;
- if(this.appendTo) {
- this.panelEL.nativeElement.style.minWidth = this.domHandler.getWidth(this.el.nativeElement.children[0]) + 'px';
- }
- this.panelEL.nativeElement.style.zIndex = ++DomHandler.zindex;
- this.domHandler.fadeIn(this.panelEL.nativeElement, 200);
- this.bindDocumentClickListener();
- }
- }
- }
-
- align() {
- if(this.appendTo)
- this.domHandler.absolutePosition(this.panelEL.nativeElement, (this.multiple ? this.multiContainerEL.nativeElement : this.inputEL.nativeElement));
- else
- this.domHandler.relativePosition(this.panelEL.nativeElement, (this.multiple ? this.multiContainerEL.nativeElement : this.inputEL.nativeElement));
- }
-
- hide() {
- this.panelVisible = false;
- this.unbindDocumentClickListener();
- }
-
- handleDropdownClick(event) {
- this.focusInput();
- let queryValue = this.multiple ? this.multiInputEL.nativeElement.value : this.inputEL.nativeElement.value;
-
- if(this.dropdownMode === 'blank')
- this.search(event, '');
- else if(this.dropdownMode === 'current')
- this.search(event, queryValue);
-
- this.onDropdownClick.emit({
- originalEvent: event,
- query: queryValue
- });
- }
-
- focusInput() {
- if(this.multiple)
- this.multiInputEL.nativeElement.focus();
- else
- this.inputEL.nativeElement.focus();
- }
-
- removeItem(item: any) {
- let itemIndex = this.domHandler.index(item);
- let removedValue = this.value[itemIndex];
- this.value = this.value.filter((val, i) => i!=itemIndex);
- this.onModelChange(this.value);
- this.updateFilledState();
- this.onUnselect.emit(removedValue);
- }
-
- onKeydown(event) {
- if(this.panelVisible) {
- let highlightItemIndex = this.findOptionIndex(this.highlightOption);
-
- switch(event.which) {
- //down
- case 40:
- if(highlightItemIndex != -1) {
- var nextItemIndex = highlightItemIndex + 1;
- if(nextItemIndex != (this.suggestions.length)) {
- this.highlightOption = this.suggestions[nextItemIndex];
- this.highlightOptionChanged = true;
- }
- }
- else {
- this.highlightOption = this.suggestions[0];
- }
-
- event.preventDefault();
- break;
-
- //up
- case 38:
- if(highlightItemIndex > 0) {
- let prevItemIndex = highlightItemIndex - 1;
- this.highlightOption = this.suggestions[prevItemIndex];
- this.highlightOptionChanged = true;
- }
-
- event.preventDefault();
- break;
-
- //enter
- case 13:
- if(this.highlightOption) {
- this.selectItem(this.highlightOption);
- this.hide();
- }
- event.preventDefault();
- break;
-
- //escape
- case 27:
- this.hide();
- event.preventDefault();
- break;
-
-
- //tab
- case 9:
- if(this.highlightOption) {
- this.selectItem(this.highlightOption);
- }
- this.hide();
- break;
- }
- } else {
- if(event.which === 40 && this.suggestions) {
- this.search(event,event.target.value);
- }
- }
-
- if(this.multiple) {
- switch(event.which) {
- //backspace
- case 8:
- if(this.value && this.value.length && !this.multiInputEL.nativeElement.value) {
- this.value = [...this.value];
- let removedValue = this.value.pop();
- this.onUnselect.emit(removedValue);
- this.onModelChange(this.value);
- }
- break;
- }
- }
-
- this.inputKeyDown = true;
- }
-
- onKeyup(event) {
- this.onKeyUp.emit(event);
- }
-
- onInputFocus(event) {
- this.focus = true;
- this.onFocus.emit(event);
- }
-
- onInputBlur(event) {
- this.focus = false;
- this.onModelTouched();
- this.onBlur.emit(event);
- }
-
- onInputChange(event) {
- if(this.forceSelection && this.suggestions) {
- let valid = false;
- let inputValue = event.target.value.trim();
-
- if(this.suggestions) {
- for(let suggestion of this.suggestions) {
- let itemValue = this.field ? this.objectUtils.resolveFieldData(suggestion, this.field) : suggestion;
- if(itemValue && inputValue === itemValue.trim()) {
- valid = true;
- this.selectItem(suggestion, false);
- break;
- }
- }
- }
-
- if(!valid) {
- if(this.multiple) {
- this.multiInputEL.nativeElement.value = '';
- }
- else {
- this.value = null;
- this.inputEL.nativeElement.value = '';
- }
-
- this.onModelChange(this.value);
- }
- }
- }
-
- isSelected(val: any): boolean {
- let selected: boolean = false;
- if(this.value && this.value.length) {
- for(let i = 0; i < this.value.length; i++) {
- if(this.objectUtils.equals(this.value[i], val, this.dataKey)) {
- selected = true;
- break;
- }
- }
- }
- return selected;
- }
-
- findOptionIndex(option): number {
- let index: number = -1;
- if(this.suggestions) {
- for(let i = 0; i < this.suggestions.length; i++) {
- if(this.objectUtils.equals(option, this.suggestions[i])) {
- index = i;
- break;
- }
- }
- }
-
- return index;
- }
-
- updateFilledState() {
- if(this.multiple)
- this.filled = (this.value && this.value.length) || (this.multiInputEL && this.multiInputEL.nativeElement && this.multiInputEL.nativeElement.value != '');
- else
- this.filled = (this.inputFieldValue && this.inputFieldValue != '') || (this.inputEL && this.inputEL.nativeElement && this.inputEL.nativeElement.value != '');;
- }
-
- updateInputField() {
- let formattedValue = this.value ? (this.field ? this.objectUtils.resolveFieldData(this.value, this.field)||'' : this.value) : '';
- this.inputFieldValue = formattedValue;
-
- if(this.inputEL && this.inputEL.nativeElement) {
- this.inputEL.nativeElement.value = formattedValue;
- }
-
- this.updateFilledState();
- }
-
- bindDocumentClickListener() {
- if(!this.documentClickListener) {
- this.documentClickListener = this.renderer.listen('document', 'click', (event) => {
- if(event.which === 3) {
- return;
- }
-
- if(!this.inputClick && !this.isDropdownClick(event)) {
- this.hide();
- }
-
- this.inputClick = false;
- this.cd.markForCheck();
- });
- }
- }
-
- isDropdownClick(event) {
- if(this.dropdown) {
- let target = event.target;
- return (target === this.dropdownButton.nativeElement || target.parentNode === this.dropdownButton.nativeElement);
- }
- else {
- return false;
- }
- }
-
- unbindDocumentClickListener() {
- if(this.documentClickListener) {
- this.documentClickListener();
- this.documentClickListener = null;
- }
- }
-
- ngOnDestroy() {
- this.unbindDocumentClickListener();
-
- if(this.appendTo) {
- this.el.nativeElement.appendChild(this.panelEL.nativeElement);
- }
- }
-}
-
-@NgModule({
- imports: [CommonModule,InputTextModule,ButtonModule,SharedModule],
- exports: [AutoComplete,SharedModule],
- declarations: [AutoComplete]
-})
-export class AutoCompleteModule { }
diff --git a/dashboard/src/app/components/badge/badge.scss b/dashboard/src/app/components/badge/badge.scss
deleted file mode 100644
index f99ab601a..000000000
--- a/dashboard/src/app/components/badge/badge.scss
+++ /dev/null
@@ -1,117 +0,0 @@
-@keyframes statusProcessing {
- 0% {
- -webkit-transform: scale(.8);
- transform: scale(.8);
- opacity: .5
- }
- to {
- -webkit-transform: scale(2.4);
- transform: scale(2.4);
- opacity: 0
- }
-}
-
-.ui-badge{
- display: inline-block;
- height: .2rem;
- width:auto;
- min-width: .2rem;
- position: absolute;
- top: -.1rem;
- right: 0rem;
- overflow: hidden;
- border-radius: .1rem;
- background: nth(nth($color-alert,2),2);
- color: white;
- line-height: .2rem;
- text-align: center;
- padding: 0 .06rem;
- font-size: .12rem;
- white-space: nowrap;
- transform: translateX(50%);
- transform-origin: center center;
- transition:width ease-in .3s;
- z-index:9;
- user-select: none;
- &.ui-badge-dot{
- width: .1rem;
- min-width: .1rem;
- height:.1rem;
- padding: 0;
- top: -.05rem;
- &.ui-badge-status-content{
- background-color: transparent;
- transform: none;
- top: 0;
- overflow: visible;
- font-size: 0;
- line-height: .2rem;
- height: .2rem;
- width: auto;
- position: relative;
- .ui-badge-status{
- position:relative;
- display: inline-block;
- width:.1rem;
- height:.1rem;
- border-radius: .05rem;
- vertical-align: middle;
- &.ui-badge-status-success{
- background-color: nth(nth($color-alert,1),2);
- }
- &.ui-badge-status-processing{
- background-color: nth(nth($color-alert,3),2);
- &::after{
- position: absolute;
- top: -.01rem;
- left: -.01rem;
- width: 100%;
- height: 100%;
- border-radius: 50%;
- border: 1px solid nth(nth($color-alert,3),2);
- content: "";
- animation: statusProcessing 1.2s infinite ease-in-out;
- }
- }
- &.ui-badge-status-default{
- background-color: nth(nth($color-alert,5),2);
- }
- &.ui-badge-status-warning{
- background-color: nth(nth($color-alert,4),2);
- }
- &.ui-badge-status-error{
- background-color: nth(nth($color-alert,2),2);
- }
- }
- .ui-badge-status-text{
- font-size:.14rem;
- color: map-get($color-text, primary);
- padding-left: .08rem;
- vertical-align: middle;
- }
- }
- }
- &.ui-badge-hide{
- display: none;
- }
- .ui-badge-counts{
- width: 100%;
- height: 100%;
- position: relative;
- overflow: hidden;
- display: block;
- font-size:0;
- .ui-badge-counts-item{
- display: inline-block;
- transition: transform ease-in-out .3s;
- p{
- width: 100%;
- padding: 0;
- margin:0;
- line-height: .2rem;
- font-size: .12rem;
- color:inherit;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/dashboard/src/app/components/badge/badge.ts b/dashboard/src/app/components/badge/badge.ts
deleted file mode 100644
index d5fe91524..000000000
--- a/dashboard/src/app/components/badge/badge.ts
+++ /dev/null
@@ -1,196 +0,0 @@
-import {NgModule,Directive, ElementRef,OnInit,AfterViewInit,OnDestroy,Input,Output,SimpleChange,EventEmitter,forwardRef,Renderer} from '@angular/core';
-import {CommonModule} from '@angular/common';
-import { DomHandler } from '../dom/domhandler';
-
-@Directive({
- selector: '[pBadge]',
- providers:[DomHandler]
-})
-export class Badge implements OnInit,AfterViewInit{
- @Input('animate') animate:boolean = true;
-
- public _show:boolean = true;
-
- @Input('show') get show():boolean{
- return this._show;
- }
-
- set show(val:boolean){
- this._show = val;
- this.toggle();
- this.onBadgeChange.emit({'show':this.show,'count':this.count,'overflowCount':this.overflowCount});
- }
-
- public _count:number;
-
- get count():number{
- return this._count;
- }
-
- @Input('pBadge') set count(val:number){
- this._count = val>=0?val:0;
- this.onCountChange(val);
- this.onBadgeChange.emit({'show':this.show,'count':this.count,'overflowCount':this.overflowCount});
- }
-
- @Input('dot') dot:boolean = false;
-
- @Input() overflowCount:number = 99;
-
- @Input() showZero:boolean = false;
-
- @Input('status') status:string;//Enum{ 'success', 'processing, 'default', 'error', 'warning' }
-
- @Input('text') text:string;
-
- @Input('style') style:any;
-
- @Output() onBadgeChange:EventEmitter = new EventEmitter();
-
- public container:any;
-
- constructor(public el: ElementRef,private domHnadler: DomHandler, public renderer: Renderer) {}
-
- ngOnInit(){
- if(this.status){
- this.dot = true;
- }
- this.createContainer();
- }
-
- ngAfterViewInit(){
- this.el.nativeElement.style.position = 'relative';
- this.el.nativeElement.style.overflow = 'visible';
- if(this.style){
- this.updateContainerStyle(this.style);
- }
- }
-
- createContainer(){
- if(this.count == 0 && !this.showZero) return;
- if(this.container) this.el.nativeElement.removeChild(this.container);
- this.container = document.createElement('span');
- this.container.className = 'ui-badge ui-widget';
-
- if(!this.show){
- this.container.classList.add('ui-badge-hide');
- }
-
- if(this.dot){
- this.container.classList.add('ui-badge-dot');
- if(this.status){
- this.updateStatus();
- return;
- }
- } else {
- this.container.title = '' + this.count || '';
- }
-
- this.updateContainerStyle(this.style);
- this.updateCountsHtml();
- this.el.nativeElement.appendChild(this.container);
- }
-
- updateContainerStyle(style:any){
- if(!this.container || typeof style !== 'object') return;
- for(let key in style){
- this.container.style[key] = style[key];
- }
- }
-
- updateCountsHtml(){
- if(!this.container || this.dot) return;
- if(this.animate && this.count <= this.overflowCount){
- if(this.domHnadler.find(this.container,'.ui-badge-counts').length > 0) return;
-
- let countsContainer = document.createElement('span');
- countsContainer.className = 'ui-badge-counts';
- let overflowArr = (this.overflowCount + '').split('');
- let countArr = (this.count + '').split('');
- for(let i = 0;i' + j + '
';
- }
- countsContainer.appendChild(countsItem);
- }
- this.container.innerHTML = '';
- this.container.appendChild(countsContainer);
- } else {
- this.container.innerText = this.count > this.overflowCount?this.overflowCount + '+':this.count + '';
- }
- }
-
- updateStatus(){
- if(!this.container || !this.status) return;
-
- this.container.classList.add('ui-badge-status-content');
- this.container.innerHTML = '';
- this.container.innerHTML += '';
-
- if(this.text){
- this.container.innerHTML += '' + this.text + '';
- }
- this.el.nativeElement.appendChild(this.container);
- }
-
- updateCountsPosition(){
- if(!this.animate || this.count > this.overflowCount || this.dot) return;
- let overflowArr = (this.overflowCount + '').split('');
- let countArr = (this.count + '').split('');
- let countsContainer = this.domHnadler.find(this.container,'.ui-badge-counts')[0];
- let counteItems = countsContainer.childNodes;
- for(let i = 0;i < overflowArr.length;i++){
- if(countArr[i]){
- counteItems[i].style.display = 'inline-block';
- counteItems[i].style.transform = 'translateY(-' + 10 * parseInt(countArr[i]) + '%)';
- for(let j = 0;j < 10;j++){
- counteItems[i].childNodes[j].classList.remove('active');
- if(countArr[i] == j + ''){
- counteItems[i].childNodes[j].classList.add('active');
- }
- }
- } else {
- counteItems[i].style.display = 'none';
- counteItems[i].style.transform = 'translateY(0%)';
- }
-
- }
- }
-
- onCountChange(count:number):void{
- if(this.dot || this.status) return;
- if(!this.container){
- this.createContainer();
- return;
- }
- this.container.title = '' + this.count || '';
- if(this.count < this.overflowCount && this.animate){
- this.updateCountsHtml();
- this.updateCountsPosition();
- } else {
- this.updateCountsHtml();
- }
-
- }
-
- toggle(){
- if(!this.container) return;
- if(this.show){
- this.container.classList.remove('ui-badge-hide');
- } else {
- this.container.classList.add('ui-badge-hide');
- }
- }
-
-}
-
-@NgModule({
- imports: [CommonModule],
- exports: [Badge],
- declarations: [Badge]
-})
-export class BadgeModule { }
\ No newline at end of file
diff --git a/dashboard/src/app/components/blockui/blockui.css b/dashboard/src/app/components/blockui/blockui.css
deleted file mode 100644
index 4b00320e6..000000000
--- a/dashboard/src/app/components/blockui/blockui.css
+++ /dev/null
@@ -1,11 +0,0 @@
-.ui-blockui {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
-}
-
-.ui-blockui-document {
- position: fixed;
-}
\ No newline at end of file
diff --git a/dashboard/src/app/components/blockui/blockui.spec.ts b/dashboard/src/app/components/blockui/blockui.spec.ts
deleted file mode 100644
index 34b14af22..000000000
--- a/dashboard/src/app/components/blockui/blockui.spec.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { TestBed, ComponentFixture } from '@angular/core/testing';
-import { By } from '@angular/platform-browser';
-import { BlockUI } from './blockui';
-import { NoopAnimationsModule } from '@angular/platform-browser/animations';
-
-describe('BlockUI', () => {
-
- let blockui: BlockUI;
- let fixture: ComponentFixture;
-
- beforeEach(() => {
- TestBed.configureTestingModule({
- imports: [
- NoopAnimationsModule
- ],
- declarations: [
- BlockUI
- ]
- });
-
- fixture = TestBed.createComponent(BlockUI);
- blockui = fixture.componentInstance;
- });
-});
diff --git a/dashboard/src/app/components/blockui/blockui.ts b/dashboard/src/app/components/blockui/blockui.ts
deleted file mode 100644
index a2c6fcba5..000000000
--- a/dashboard/src/app/components/blockui/blockui.ts
+++ /dev/null
@@ -1,80 +0,0 @@
-import {NgModule,Component,Input,AfterViewInit,OnDestroy,EventEmitter,ElementRef,ViewChild} from '@angular/core';
-import {CommonModule} from '@angular/common';
-import {DomHandler} from '../dom/domhandler';
-import {BlockableUI} from '../common/blockableui';
-
-@Component({
- selector: 'p-blockUI',
- template: `
-
-
-
- `,
- providers: [DomHandler]
-})
-export class BlockUI implements AfterViewInit,OnDestroy {
-
- @Input() target: any;
-
- @Input() autoZIndex: boolean = true;
-
- @Input() baseZIndex: number = 0;
-
- @ViewChild('mask') mask: ElementRef;
-
- _blocked: boolean;
-
- constructor(public el: ElementRef,public domHandler: DomHandler) {}
-
- @Input() get blocked(): boolean {
- return this._blocked;
- }
-
- set blocked(val: boolean) {
- this._blocked = val;
-
- if(this.mask.nativeElement) {
- if(this._blocked)
- this.block();
- else
- this.unblock();
- }
- }
-
- ngAfterViewInit() {
- if(this.target && !this.target.getBlockableElement) {
- throw 'Target of BlockUI must implement BlockableUI interface';
- }
- }
-
- block() {
- if(this.target) {
- this.target.getBlockableElement().appendChild(this.mask.nativeElement);
- let style = this.target.style||{};
- style.position = 'relative';
- this.target.style = style;
- }
- else {
- document.body.appendChild(this.mask.nativeElement);
- }
-
- if(this.autoZIndex) {
- this.mask.nativeElement.style.zIndex = String(this.baseZIndex + (++DomHandler.zindex));
- }
- }
-
- unblock() {
- this.el.nativeElement.appendChild(this.mask.nativeElement);
- }
-
- ngOnDestroy() {
- this.unblock();
- }
-}
-
-@NgModule({
- imports: [CommonModule],
- exports: [BlockUI],
- declarations: [BlockUI]
-})
-export class BlockUIModule { }
\ No newline at end of file
diff --git a/dashboard/src/app/components/breadcrumb/breadcrumb.css b/dashboard/src/app/components/breadcrumb/breadcrumb.css
deleted file mode 100644
index ed4a7785a..000000000
--- a/dashboard/src/app/components/breadcrumb/breadcrumb.css
+++ /dev/null
@@ -1,21 +0,0 @@
-/** Breadcrumb **/
-
-.ui-breadcrumb {
- margin: 0;
- padding: 0;
- padding: .3em;
-}
-
-.ui-breadcrumb ul {
- margin: 0;
- padding: 0;
-}
-
-.ui-breadcrumb ul li {
- display: inline-block;
- vertical-align: middle;
-}
-
-.ui-breadcrumb ul li .ui-menuitem-link {
- text-decoration: none;
-}
\ No newline at end of file
diff --git a/dashboard/src/app/components/breadcrumb/breadcrumb.spec.ts b/dashboard/src/app/components/breadcrumb/breadcrumb.spec.ts
deleted file mode 100644
index fe715566f..000000000
--- a/dashboard/src/app/components/breadcrumb/breadcrumb.spec.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { TestBed, ComponentFixture } from '@angular/core/testing';
-import { By } from '@angular/platform-browser';
-import { Breadcrumb } from './breadcrumb';
-import { NoopAnimationsModule } from '@angular/platform-browser/animations';
-
-describe('Breadcrumb', () => {
-
- let breadcrumb: Breadcrumb;
- let fixture: ComponentFixture;
-
- beforeEach(() => {
- TestBed.configureTestingModule({
- imports: [
- NoopAnimationsModule
- ],
- declarations: [
- Breadcrumb
- ]
- });
-
- fixture = TestBed.createComponent(Breadcrumb);
- breadcrumb = fixture.componentInstance;
- });
-});
diff --git a/dashboard/src/app/components/breadcrumb/breadcrumb.ts b/dashboard/src/app/components/breadcrumb/breadcrumb.ts
deleted file mode 100644
index d6d973778..000000000
--- a/dashboard/src/app/components/breadcrumb/breadcrumb.ts
+++ /dev/null
@@ -1,80 +0,0 @@
-import {NgModule,Component,Input} from '@angular/core';
-import {CommonModule} from '@angular/common';
-import {MenuItem} from '../common/menuitem';
-import {Location} from '@angular/common';
-import {RouterModule} from '@angular/router';
-
-@Component({
- selector: 'p-breadcrumb',
- template: `
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
-
-
- `
-})
-export class Breadcrumb {
-
- @Input() model: MenuItem[];
-
- @Input() style: any;
-
- @Input() styleClass: string;
-
- @Input() home: MenuItem;
-
- itemClick(event, item: MenuItem) {
- if(item.disabled) {
- event.preventDefault();
- return;
- }
-
- if(!item.url) {
- event.preventDefault();
- }
-
- if(item.command) {
- item.command({
- originalEvent: event,
- item: item
- });
- }
- }
-
- onHomeClick(event) {
- if(this.home) {
- this.itemClick(event, this.home);
- }
- }
-}
-
-@NgModule({
- imports: [CommonModule,RouterModule],
- exports: [Breadcrumb,RouterModule],
- declarations: [Breadcrumb]
-})
-export class BreadcrumbModule { }
diff --git a/dashboard/src/app/components/button/button.scss b/dashboard/src/app/components/button/button.scss
deleted file mode 100644
index 129671202..000000000
--- a/dashboard/src/app/components/button/button.scss
+++ /dev/null
@@ -1,324 +0,0 @@
-/* Button */
-
-.ui-button {
- display: inline-block;
- position: relative;
- padding: 0 0.25rem;
- margin-right: .1rem;
- text-decoration: none !important;
- cursor: pointer;
- text-align: center;
- min-width: 1.00rem;
- zoom: 1;
- overflow: visible;
- /* the overflow property removes extra width in IE */
- &:enabled:hover {
- box-shadow: 0px 4px 8px #e3e3e3;
- border-color: map-get($widget-border, normal);
- }
- &.ui-button-icon-only {
- margin-right: 0;
- padding: 0 0.05rem;
- border: none;
- background: none;
- &:hover,
- &:active {
- border: none;
- background: none;
- box-shadow: none;
- color: map-get($map: $color-primary, $key: hover);
- }
- &:active {
- color: map-get($map: $color-primary, $key: active);
- }
- }
- &.ui-button-large {
- padding: 0 0.40rem;
- .ui-button-text {
- line-height: 0.38rem;
- }
- }
-}
-
-.ui-button-icon-only {
- min-width: 0;
-}
-
-p-button {
- display: inline-block;
-}
-
-
-/*button text element */
-
-.ui-button .ui-button-text {
- display: block;
- line-height: 0.30rem;
-}
-
-.ui-button-text-only .ui-button-text {
- padding: 0;
-}
-
-.ui-button-icon-only .ui-button-text,
-.ui-button-text-empty .ui-button-text {
- text-indent: -9999999px;
- overflow: hidden;
-}
-
-.ui-button-text-icon-left {
- padding: 0 0.2rem 0 0.40rem;
-}
-
-.ui-button-text-icon-right {
- padding: 0 0.40rem 0 0.2rem;
-}
-
-
-/*button icon element(s) */
-
-.ui-button-icon-only .fa,
-.ui-button-text-icon-left .fa,
-.ui-button-text-icon-right .fa {
- position: absolute;
- top: 50%;
- margin-top: -0.08rem;
- height: 0.16rem;
-}
-
-.ui-button-icon-only .fa {
- top: 50%;
- left: 50%;
- margin-top: -0.08rem;
- margin-left: -0.08rem;
- width: 0.16rem;
- height: 0.16rem;
-}
-
-.ui-button-icon-left {
- left: -0.40rem;
-}
-
-.ui-button-icon-right {
- right: -0.40rem;
-}
-
-
-/*button sets*/
-
-.ui-buttonset .ui-button {
- margin-left: 0;
- margin-right: 0;
-}
-
-
-/* workarounds */
-
-button.ui-button::-moz-focus-inner {
- border: 0;
- padding: 0;
- /* reset extra padding in Firefox */
-}
-
-
-/** Fluid **/
-
-.ui-fluid .ui-button {
- width: 100%;
-}
-
-.ui-fluid .ui-button-text-icon-left .ui-button-text,
-.ui-fluid .ui-button-text-icon-right .ui-button-text {
- padding-left: 0.1rem;
- padding-right: 0.1rem;
-}
-
-
-/** ButtonSet **/
-
-.ui-fluid .ui-buttonset {
- width: 100%;
-}
-
-.ui-fluid .ui-buttonset.ui-buttonset-1 .ui-button {
- width: 100%;
-}
-
-.ui-fluid .ui-buttonset.ui-buttonset-2 .ui-button {
- width: 50%;
-}
-
-.ui-fluid .ui-buttonset.ui-buttonset-3 .ui-button {
- width: 33.3%;
-}
-
-.ui-fluid .ui-buttonset.ui-buttonset-4 .ui-button {
- width: 25%;
-}
-
-.ui-fluid .ui-buttonset.ui-buttonset-5 .ui-button {
- width: 20%;
-}
-
-.ui-fluid .ui-buttonset.ui-buttonset-6 .ui-button {
- width: 16.6%;
-}
-
-@media (max-width: 640px) {
- .ui-fluid .ui-buttonset.ui-buttonset-1 .ui-button,
- .ui-fluid .ui-buttonset.ui-buttonset-2 .ui-button,
- .ui-fluid .ui-buttonset.ui-buttonset-3 .ui-button,
- .ui-fluid .ui-buttonset.ui-buttonset-4 .ui-button,
- .ui-fluid .ui-buttonset.ui-buttonset-5 .ui-button,
- .ui-fluid .ui-buttonset.ui-buttonset-6 .ui-button {
- width: 100%;
- }
-}
-
-
-/* Severity Buttons */
-
-
-/* secondary */
-
-.ui-button.ui-button-secondary.ui-state-default,
-.ui-splitbutton.ui-button-secondary .ui-button.ui-state-default {
- background-color: map-get($color-primary, normal);
- border-color: map-get($color-primary, normal);
- color: #fff;
-}
-
-.ui-button.ui-button-secondary:enabled:hover,
-.ui-button.ui-button-secondary:focus,
-.ui-splitbutton.ui-button-secondary .ui-button:enabled:hover,
-.ui-splitbutton.ui-button-secondary .ui-button:focus {
- background-color: map-get($color-primary, hover);
- border-color: map-get($color-primary, hover);
- color: #fff;
- box-shadow: 0px 4px 8px rgba(0, 101, 203, 0.4);
-}
-
-.ui-button.ui-button-secondary:enabled:active,
-.ui-splitbutton.ui-button-secondary .ui-button:enabled:active {
- background-color: map-get($color-primary, active);
- border-color: map-get($color-primary, active);
- color: #fff;
-}
-
-
-/* Success */
-
-.ui-button.ui-button-success.ui-state-default,
-.ui-splitbutton.ui-button-success .ui-button.ui-state-default {
- background-color: #5cb85c;
- border-color: #5cb85c;
- color: #ffffff;
-}
-
-.ui-button.ui-button-success:enabled:hover,
-.ui-button.ui-button-success:focus,
-.ui-splitbutton.ui-button-success .ui-button:enabled:hover,
-.ui-splitbutton.ui-button-success .ui-button:focus {
- background-color: #4cae4c;
- border-color: #5cb85c;
-}
-
-.ui-button.ui-button-success:enabled:active,
-.ui-splitbutton.ui-button-success .ui-button:enabled:active {
- background-color: #449d44;
- border-color: #5cb85c;
-}
-
-
-/* Info */
-
-.ui-button.ui-button-info.ui-state-default,
-.ui-splitbutton.ui-button-info .ui-button.ui-state-default {
- background-color: #5bc0de;
- border-color: #5bc0de;
- color: #ffffff;
-}
-
-.ui-button.ui-button-info:enabled:hover,
-.ui-button.ui-button-info:focus,
-.ui-splitbutton.ui-button-info .ui-button:enabled:hover,
-.ui-splitbutton.ui-button-info .ui-button:focus {
- background-color: #46b8da;
- border-color: #5bc0de;
-}
-
-.ui-button.ui-button-info:enabled:active,
-.ui-splitbutton.ui-button-info .ui-button:enabled:active {
- background-color: #31b0d5;
- border-color: #5bc0de;
-}
-
-
-/* Warning */
-
-.ui-button.ui-button-warning.ui-state-default,
-.ui-splitbutton.ui-button-warning .ui-button.ui-state-default {
- background-color: #FF8833;
- border-color: #FF8833;
- color: #ffffff;
-}
-
-.ui-button.ui-button-warning:enabled:hover,
-.ui-button.ui-button-warning:focus,
-.ui-splitbutton.ui-button-warning .ui-button:enabled:hover,
-.ui-splitbutton.ui-button-warning .ui-button:focus {
- background-color: #FF8833;
- border-color: #FF8833;
-}
-.ui-button.ui-button-warning:enabled:hover,
-.ui-splitbutton.ui-button-warning .ui-button:enabled:hover{
- box-shadow: 0px 4px 8px rgba(243, 163, 15, 0.4);
-}
-
-.ui-button.ui-button-warning:enabled:active,
-.ui-splitbutton.ui-button-warning .ui-button:enabled:active {
- background-color: #FF8833;
- border-color: #FF8833;
-}
-
-
-/* Danger */
-
-.ui-button.ui-button-danger.ui-state-default,
-.ui-splitbutton.ui-button-danger .ui-button.ui-state-default {
- background-color: #d9534f;
- border-color: #d9534f;
- color: #ffffff;
-}
-
-.ui-button.ui-button-danger:enabled:hover,
-.ui-button.ui-button-danger:focus,
-.ui-splitbutton.ui-button-danger .ui-button:enabled:hover,
-.ui-splitbutton.ui-button-danger .ui-button:focus {
- background-color: #d43f3a;
- border-color: #d9534f;
-}
-
-.ui-button.ui-button-danger:enabled:active,
-.ui-splitbutton.ui-button-danger .ui-button:enabled:active {
- background-color: #c9302c;
- border-color: #d9534f;
-}
-
-// custom button style
-.ui-button.ui-button-icon-only.close-class {
- position: absolute;
- top: 0;
- right: .25rem;
- background-color: #fff;
- border: 1px solid #B9C3C8 !important;
-}
-
-.cloud-servie-delete-button-radius {
- border-radius: 20px !important;
-}
-
-.week-button {
- width: 60px !important;
- border-radius: 0 !important;
-}
\ No newline at end of file
diff --git a/dashboard/src/app/components/button/button.spec.ts b/dashboard/src/app/components/button/button.spec.ts
deleted file mode 100644
index 77588b5a6..000000000
--- a/dashboard/src/app/components/button/button.spec.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { TestBed, ComponentFixture } from '@angular/core/testing';
-import { By } from '@angular/platform-browser';
-import { Button } from './button';
-import { NoopAnimationsModule } from '@angular/platform-browser/animations';
-
-describe('Button', () => {
-
- let button: Button;
- let fixture: ComponentFixture